nuxeo-development-framework 4.0.4 → 4.0.6
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/bundles/nuxeo-development-framework.umd.js +1580 -1623
- package/bundles/nuxeo-development-framework.umd.js.map +1 -1
- package/esm2015/lib/components/diagrams/utilities/index.js +1 -2
- package/esm2015/lib/shared/components/base/base.component.js +15 -17
- package/esm2015/lib/shared/components/nuxeo-dialog/confirmation/ndf-confirmation-dialog.component.js +6 -6
- package/esm2015/lib/shared/components/nuxeo-dialog/nuxeo-dialog.module.js +8 -4
- package/esm2015/lib/shared/components/nuxeo-dialog/nuxeo.dialog.js +28 -28
- package/esm2015/lib/shared/components/nuxeo-dialog/services/nuxeo-dialog.service.js +15 -15
- package/esm2015/lib/shared/services/base/base.service.js +23 -23
- package/esm2015/lib/shared/services/base/cache-base.service.js +23 -23
- package/esm2015/lib/shared/services/base/http-base.service.js +10 -10
- package/fesm2015/nuxeo-development-framework.js +1129 -1154
- package/fesm2015/nuxeo-development-framework.js.map +1 -1
- package/lib/components/diagrams/utilities/index.d.ts +0 -1
- package/lib/shared/components/base/base.component.d.ts +11 -13
- package/lib/shared/components/nuxeo-dialog/confirmation/ndf-confirmation-dialog.component.d.ts +3 -3
- package/lib/shared/components/nuxeo-dialog/nuxeo-dialog.module.d.ts +2 -1
- package/lib/shared/components/nuxeo-dialog/nuxeo.dialog.d.ts +6 -7
- package/lib/shared/components/nuxeo-dialog/services/nuxeo-dialog.service.d.ts +3 -3
- package/lib/shared/services/base/base.service.d.ts +6 -6
- package/lib/shared/services/base/cache-base.service.d.ts +4 -4
- package/lib/shared/services/base/http-base.service.d.ts +4 -4
- package/package.json +1 -1
- package/esm2015/lib/components/diagrams/utilities/export-graph.js +0 -28
- package/lib/components/diagrams/utilities/export-graph.d.ts +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, NgModule, Injectable, Directive, Inject, InjectionToken, Optional, Input, ContentChild, ViewChild,
|
|
2
|
+
import { Component, NgModule, Injectable, Directive, Inject, InjectionToken, Optional, ChangeDetectorRef, Input, ContentChild, ViewChild, EventEmitter, Output, HostListener, Pipe, ViewEncapsulation, Self, SkipSelf, ChangeDetectionStrategy, ViewContainerRef, forwardRef, APP_INITIALIZER, TemplateRef } from '@angular/core';
|
|
3
3
|
import * as i4$1 from '@angular/common';
|
|
4
4
|
import { CommonModule, APP_BASE_HREF, DatePipe, registerLocaleData, DOCUMENT } from '@angular/common';
|
|
5
5
|
import * as i1$2 from '@angular/common/http';
|
|
@@ -14,7 +14,7 @@ import * as i1$4 from '@angular/router';
|
|
|
14
14
|
import { ActivatedRoute, Router, RouterModule, RoutesRecognized } from '@angular/router';
|
|
15
15
|
import * as i1 from '@ngx-translate/core';
|
|
16
16
|
import { TranslateService, TranslateModule, TranslateStore, TranslateLoader } from '@ngx-translate/core';
|
|
17
|
-
import { map, distinctUntilChanged, takeUntil, catchError, take, tap, switchMap, retry, expand, last,
|
|
17
|
+
import { map, distinctUntilChanged, takeUntil, catchError, take, tap, switchMap, first, retry, expand, last, debounceTime, mergeMap, toArray, delay, reduce, concatMap, finalize, filter as filter$1 } from 'rxjs/operators';
|
|
18
18
|
import { trigger, state, style, transition, animate, AUTO_STYLE, animation, useAnimation } from '@angular/animations';
|
|
19
19
|
import * as i1$1 from 'ngx-toastr';
|
|
20
20
|
import { Toast, ToastrModule } from 'ngx-toastr';
|
|
@@ -23,12 +23,12 @@ import * as i4 from '@angular/cdk/bidi';
|
|
|
23
23
|
import * as i2 from 'keycloak-angular';
|
|
24
24
|
import { KeycloakAngularModule } from 'keycloak-angular';
|
|
25
25
|
import * as i3 from 'ngx-cookie-service';
|
|
26
|
-
import {
|
|
26
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
27
27
|
import * as i2$1 from '@angular/material/icon';
|
|
28
28
|
import { MatIconModule } from '@angular/material/icon';
|
|
29
29
|
import * as i2$2 from '@angular/material/tooltip';
|
|
30
30
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
31
|
-
import {
|
|
31
|
+
import { merge } from 'lodash-es';
|
|
32
32
|
import * as moment$4 from 'moment';
|
|
33
33
|
import { isMoment } from 'moment';
|
|
34
34
|
import _omit from 'lodash/omit';
|
|
@@ -1573,164 +1573,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1573
1573
|
}]
|
|
1574
1574
|
}], ctorParameters: function () { return [{ type: UtilityService }]; } });
|
|
1575
1575
|
|
|
1576
|
-
const defaultConfirmConfig = {
|
|
1577
|
-
title: 'confirmDialog.confirm',
|
|
1578
|
-
message: 'confirmDialog.generalConfirmMsg',
|
|
1579
|
-
icon: {
|
|
1580
|
-
show: true,
|
|
1581
|
-
name: 'heroicons_outline:exclamation',
|
|
1582
|
-
color: 'warn'
|
|
1583
|
-
},
|
|
1584
|
-
actions: {
|
|
1585
|
-
confirm: {
|
|
1586
|
-
show: true,
|
|
1587
|
-
label: 'BUTTONS.confirm',
|
|
1588
|
-
color: 'warn',
|
|
1589
|
-
fn: () => {
|
|
1590
|
-
return of(false);
|
|
1591
|
-
}
|
|
1592
|
-
},
|
|
1593
|
-
moreActions: []
|
|
1594
|
-
}
|
|
1595
|
-
};
|
|
1596
|
-
|
|
1597
|
-
class NdfNuxeoDialog extends DestroySubject$1 {
|
|
1598
|
-
constructor(injector) {
|
|
1599
|
-
super();
|
|
1600
|
-
this.dialogTitle = "";
|
|
1601
|
-
this.subTitle = "";
|
|
1602
|
-
this.loaderMode = "spinner";
|
|
1603
|
-
this.dialogBodyTopOffset = 0;
|
|
1604
|
-
this.loading = false;
|
|
1605
|
-
this.data = injector.get(MAT_DIALOG_DATA, null);
|
|
1606
|
-
this.dialogRef = injector.get(MatDialogRef, null);
|
|
1607
|
-
}
|
|
1608
|
-
executeAction(action, ...params) {
|
|
1609
|
-
this.dialogBodyTopOffset = this.dialogBody.nativeElement.scrollTop;
|
|
1610
|
-
if (action) {
|
|
1611
|
-
if (!this.isArrowFunction(action)) {
|
|
1612
|
-
throw new Error("The action should be arrow function");
|
|
1613
|
-
}
|
|
1614
|
-
this.loading = true;
|
|
1615
|
-
//TODO here we should find a way to test if actions instance of DialogActionType
|
|
1616
|
-
const result = action(...params);
|
|
1617
|
-
if (!isObservable(result)) {
|
|
1618
|
-
this.loading = false;
|
|
1619
|
-
throw new Error("The action you used should return an Observable");
|
|
1620
|
-
}
|
|
1621
|
-
result.pipe(takeUntil(this.destroy$)).subscribe((value) => {
|
|
1622
|
-
this.loading = false;
|
|
1623
|
-
this.dialogRef.close(value);
|
|
1624
|
-
}, (err) => {
|
|
1625
|
-
this.loading = false;
|
|
1626
|
-
});
|
|
1627
|
-
}
|
|
1628
|
-
else {
|
|
1629
|
-
this.dialogRef.close();
|
|
1630
|
-
}
|
|
1631
|
-
}
|
|
1632
|
-
isArrowFunction(fn) {
|
|
1633
|
-
const strFn = fn.toString();
|
|
1634
|
-
const firstIndex = strFn.indexOf(")");
|
|
1635
|
-
const lastIndex = strFn.indexOf("{") + 1;
|
|
1636
|
-
const target = strFn.substring(firstIndex, lastIndex).replace(" ", "");
|
|
1637
|
-
return target.includes("=>");
|
|
1638
|
-
}
|
|
1639
|
-
onClose() {
|
|
1640
|
-
this.dialogRef.close();
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
NdfNuxeoDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1644
|
-
NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper\">\r\n\t<div class=\"dialog-header\">\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div #dialogBody class=\"dialog-body\" [ngClass]=\"{'overflow-hidden': loading}\">\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper{@apply flex flex-col;}.ndf-dialog-wrapper .dialog-header{@apply flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7;}.ndf-dialog-wrapper .dialog-body{height:auto;max-height:calc(100vh - 208px);@apply flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99;}.ndf-dialog-wrapper .overlay{@apply flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0;}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
1645
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, decorators: [{
|
|
1646
|
-
type: Component,
|
|
1647
|
-
args: [{
|
|
1648
|
-
selector: "ndf-nuxeo-dialog",
|
|
1649
|
-
templateUrl: "./nuxeo.dialog.html",
|
|
1650
|
-
styleUrls: ["./nuxeo.dialog.scss"],
|
|
1651
|
-
}]
|
|
1652
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { dialogTitle: [{
|
|
1653
|
-
type: Input
|
|
1654
|
-
}], subTitle: [{
|
|
1655
|
-
type: Input
|
|
1656
|
-
}], loaderMode: [{
|
|
1657
|
-
type: Input
|
|
1658
|
-
}], contentTemplate: [{
|
|
1659
|
-
type: ContentChild,
|
|
1660
|
-
args: ["contentTemplate"]
|
|
1661
|
-
}], actionsTemplate: [{
|
|
1662
|
-
type: ContentChild,
|
|
1663
|
-
args: ["actionsTemplate"]
|
|
1664
|
-
}], dialogBody: [{
|
|
1665
|
-
type: ViewChild,
|
|
1666
|
-
args: ["dialogBody"]
|
|
1667
|
-
}] } });
|
|
1668
|
-
|
|
1669
|
-
class NdfConfirmationDialogComponent extends BaseDialogComponent {
|
|
1670
|
-
constructor(injector) {
|
|
1671
|
-
super(injector);
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
NdfConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfConfirmationDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1675
|
-
NdfConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfConfirmationDialogComponent, selector: "ndf-confirmation-dialog", usesInheritance: true, ngImport: i0, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ dialogData.title | translate }}\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<!-- Content -->\r\n\t\t<div class=\"flex flex-row gap-x-2 items-center\">\r\n\t\t\t<!-- Icon -->\r\n\t\t\t<ng-container *ngIf=\"dialogData.icon.show\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\"\r\n\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\tprimaryIcon: dialogData.icon.color === 'primary',\r\n\t\t\t\t\t\taccentIcon: dialogData.icon.color === 'accent',\r\n\t\t\t\t\t\twarnIcon: dialogData.icon.color === 'warn',\r\n\t\t\t\t\t\tbasicIcon: dialogData.icon.color === 'basic',\r\n\t\t\t\t\t\tinfoIcon: dialogData.icon.color === 'info',\r\n\t\t\t\t\t\tsuccessIcon: dialogData.icon.color === 'success',\r\n\t\t\t\t\t\twarningIcon: dialogData.icon.color === 'warning',\r\n\t\t\t\t\t\terrorIcon: dialogData.icon.color === 'error'\r\n\t\t\t\t\t}\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\tclass=\"text-current\"\r\n\t\t\t\t\t\t[svgIcon]=\"dialogData.icon.name\"\r\n\t\t\t\t\t></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-container>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"text-secondary\"\r\n\t\t\t\t[innerHtml]=\"dialogData.message | translate\"\r\n\t\t\t></div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t\t<ng-container *ngIf=\"dialogData.actions.confirm.show\">\r\n\t\t\t<button\r\n\t\t\t\t(click)=\"dialog.executeAction(dialogData.actions.confirm.fn)\"\r\n\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t[color]=\"dialogData.actions.confirm.color\"\r\n\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t>\r\n\t\t\t\t{{ dialogData.actions.confirm.label | translate }}\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\t\t<ng-container *ngIf=\"dialogData.actions.moreActions.length\">\r\n\t\t\t<ng-container *ngFor=\"let btn of dialogData.actions.moreActions\">\r\n\t\t\t\t<button\r\n\t\t\t\t\t(click)=\"dialog.executeAction(btn.fn)\"\r\n\t\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t\t[color]=\"btn.color\"\r\n\t\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t\t>\r\n\t\t\t\t\t{{ btn.label | translate }}\r\n\t\t\t\t</button>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [".primaryIcon{@apply text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600;}.accentIcon{@apply text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600;}.warnIcon{@apply text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600;}.basicIcon{@apply text-gray-600 bg-gray-100 dark:text-gray-50 dark:bg-gray-600;}.infoIcon{@apply text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600;}.successIcon{@apply text-green-500 bg-green-100 dark:text-green-50 dark:bg-green-500;}.warningIcon{@apply text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500;}.errorIcon{@apply text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600;}::ng-deep .ndf-confirmation-dialog-panel{min-width:25%!important}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "loaderMode"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
1676
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfConfirmationDialogComponent, decorators: [{
|
|
1677
|
-
type: Component,
|
|
1678
|
-
args: [{
|
|
1679
|
-
selector: "ndf-confirmation-dialog",
|
|
1680
|
-
templateUrl: "./ndf-confirmation-dialog.component.html",
|
|
1681
|
-
styleUrls: ["./ndf-confirmation-dialog.component.scss"],
|
|
1682
|
-
}]
|
|
1683
|
-
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
1684
|
-
|
|
1685
|
-
var _NuxeoDialogService_instances, _NuxeoDialogService_getPanelClass;
|
|
1686
|
-
class NuxeoDialogService {
|
|
1687
|
-
constructor(dialog) {
|
|
1688
|
-
this.dialog = dialog;
|
|
1689
|
-
_NuxeoDialogService_instances.add(this);
|
|
1690
|
-
}
|
|
1691
|
-
open(options) {
|
|
1692
|
-
var _a, _b, _c, _d;
|
|
1693
|
-
return this.dialog.open(options.component, {
|
|
1694
|
-
width: (options === null || options === void 0 ? void 0 : options.width) || "auto",
|
|
1695
|
-
height: (options === null || options === void 0 ? void 0 : options.height) || "auto",
|
|
1696
|
-
minWidth: "35%",
|
|
1697
|
-
panelClass: ["ndf-dialog", ...__classPrivateFieldGet(this, _NuxeoDialogService_instances, "m", _NuxeoDialogService_getPanelClass).call(this, options === null || options === void 0 ? void 0 : options.panelClass)],
|
|
1698
|
-
disableClose: true,
|
|
1699
|
-
data: Object.assign({ dialogConfig: {
|
|
1700
|
-
title: (_a = options.config) === null || _a === void 0 ? void 0 : _a.title,
|
|
1701
|
-
subTitle: (_b = options.config) === null || _b === void 0 ? void 0 : _b.subTitle,
|
|
1702
|
-
contentTemplate: (_c = options.config) === null || _c === void 0 ? void 0 : _c.contentTemplate,
|
|
1703
|
-
actionsTemplate: (_d = options.config) === null || _d === void 0 ? void 0 : _d.actionsTemplate,
|
|
1704
|
-
} }, (options.data || {})),
|
|
1705
|
-
});
|
|
1706
|
-
}
|
|
1707
|
-
showConfirm(config) {
|
|
1708
|
-
// Merge the user config with the default config
|
|
1709
|
-
const confirmConfig = merge({}, defaultConfirmConfig, config);
|
|
1710
|
-
const options = {
|
|
1711
|
-
component: NdfConfirmationDialogComponent,
|
|
1712
|
-
data: Object.assign({}, confirmConfig),
|
|
1713
|
-
panelClass: "ndf-confirmation-dialog-panel",
|
|
1714
|
-
};
|
|
1715
|
-
return this.open(options);
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1718
|
-
_NuxeoDialogService_instances = new WeakSet(), _NuxeoDialogService_getPanelClass = function _NuxeoDialogService_getPanelClass(panelClass) {
|
|
1719
|
-
let classes = [""];
|
|
1720
|
-
if (panelClass) {
|
|
1721
|
-
classes = Array.isArray(panelClass) ? panelClass : [panelClass];
|
|
1722
|
-
}
|
|
1723
|
-
return classes;
|
|
1724
|
-
};
|
|
1725
|
-
NuxeoDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogService, deps: [{ token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1726
|
-
NuxeoDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogService, providedIn: "root" });
|
|
1727
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogService, decorators: [{
|
|
1728
|
-
type: Injectable,
|
|
1729
|
-
args: [{
|
|
1730
|
-
providedIn: "root",
|
|
1731
|
-
}]
|
|
1732
|
-
}], ctorParameters: function () { return [{ type: i1$3.MatDialog }]; } });
|
|
1733
|
-
|
|
1734
1576
|
var _BaseComponent_loading;
|
|
1735
1577
|
class BaseComponent extends DestroySubject$1 {
|
|
1736
1578
|
constructor(injector) {
|
|
@@ -1745,7 +1587,6 @@ class BaseComponent extends DestroySubject$1 {
|
|
|
1745
1587
|
this.mainFolderService = injector.get(MainfolderService);
|
|
1746
1588
|
this.userPreferencesService = injector.get(UserPreferencesService);
|
|
1747
1589
|
this.appConfigService = injector.get(AppConfigService);
|
|
1748
|
-
this.nuxeoDialogService = injector.get(NuxeoDialogService);
|
|
1749
1590
|
this.adapter = injector.get(AdapterService);
|
|
1750
1591
|
}
|
|
1751
1592
|
set loading(value) {
|
|
@@ -1758,13 +1599,13 @@ class BaseComponent extends DestroySubject$1 {
|
|
|
1758
1599
|
return this.translateService.currentLang;
|
|
1759
1600
|
}
|
|
1760
1601
|
get isArabic() {
|
|
1761
|
-
return this.currentLang ==
|
|
1602
|
+
return this.currentLang == 'ar';
|
|
1762
1603
|
}
|
|
1763
1604
|
get isArabic$() {
|
|
1764
|
-
return this.translateService.onLangChange.pipe(map((event) => event.lang ==
|
|
1605
|
+
return this.translateService.onLangChange.pipe(map((event) => event.lang == 'ar'));
|
|
1765
1606
|
}
|
|
1766
1607
|
get direction() {
|
|
1767
|
-
return this.translateService.currentLang ===
|
|
1608
|
+
return this.translateService.currentLang === 'ar' ? 'rtl' : 'ltr';
|
|
1768
1609
|
}
|
|
1769
1610
|
}
|
|
1770
1611
|
_BaseComponent_loading = new WeakMap();
|
|
@@ -1902,100 +1743,692 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
1902
1743
|
type: Input
|
|
1903
1744
|
}] } });
|
|
1904
1745
|
|
|
1905
|
-
|
|
1746
|
+
/** @ignore */
|
|
1747
|
+
class SetDirRtlDirective {
|
|
1748
|
+
constructor(elRef, renderer, translation) {
|
|
1749
|
+
this.elRef = elRef;
|
|
1750
|
+
this.renderer = renderer;
|
|
1751
|
+
this.translation = translation;
|
|
1752
|
+
this.switchDirBasedOnLanguage();
|
|
1753
|
+
}
|
|
1754
|
+
switchDirBasedOnLanguage() {
|
|
1755
|
+
this.translation.isArabic.subscribe((arabic) => {
|
|
1756
|
+
arabic
|
|
1757
|
+
? this.renderer.setAttribute(this.elRef.nativeElement, 'dir', 'rtl')
|
|
1758
|
+
: this.renderer.setAttribute(this.elRef.nativeElement, 'dir', 'ltr');
|
|
1759
|
+
});
|
|
1760
|
+
}
|
|
1906
1761
|
}
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
MatDialogModule,
|
|
1912
|
-
MatTooltipModule], exports: [NdfNuxeoDialog, NdfConfirmationDialogComponent] });
|
|
1913
|
-
NuxeoDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogModule, imports: [[
|
|
1914
|
-
CommonModule,
|
|
1915
|
-
TranslateModule,
|
|
1916
|
-
MatIconModule,
|
|
1917
|
-
MatDialogModule,
|
|
1918
|
-
MatTooltipModule
|
|
1919
|
-
]] });
|
|
1920
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogModule, decorators: [{
|
|
1921
|
-
type: NgModule,
|
|
1762
|
+
SetDirRtlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SetDirRtlDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: TranslationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1763
|
+
SetDirRtlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: SetDirRtlDirective, selector: "[SetDirRtl]", ngImport: i0 });
|
|
1764
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SetDirRtlDirective, decorators: [{
|
|
1765
|
+
type: Directive,
|
|
1922
1766
|
args: [{
|
|
1923
|
-
|
|
1924
|
-
imports: [
|
|
1925
|
-
CommonModule,
|
|
1926
|
-
TranslateModule,
|
|
1927
|
-
MatIconModule,
|
|
1928
|
-
MatDialogModule,
|
|
1929
|
-
MatTooltipModule
|
|
1930
|
-
],
|
|
1931
|
-
exports: [NdfNuxeoDialog, NdfConfirmationDialogComponent]
|
|
1767
|
+
selector: '[SetDirRtl]',
|
|
1932
1768
|
}]
|
|
1933
|
-
}] });
|
|
1934
|
-
|
|
1935
|
-
class NuxeoMapper {
|
|
1936
|
-
static schemaToModel(properties) {
|
|
1937
|
-
const mappedProperties = {};
|
|
1938
|
-
for (const key in properties) {
|
|
1939
|
-
if (properties.hasOwnProperty(key)) {
|
|
1940
|
-
const [prefix, propertyKey] = key.split(':');
|
|
1941
|
-
if (!mappedProperties[prefix]) {
|
|
1942
|
-
mappedProperties[prefix] = {};
|
|
1943
|
-
}
|
|
1944
|
-
mappedProperties[prefix][propertyKey] =
|
|
1945
|
-
properties[key];
|
|
1946
|
-
}
|
|
1947
|
-
}
|
|
1948
|
-
return mappedProperties;
|
|
1949
|
-
}
|
|
1950
|
-
static modelToSchema(model) {
|
|
1951
|
-
const packedProperties = {};
|
|
1952
|
-
for (const schemaKey in model) {
|
|
1953
|
-
if (model.hasOwnProperty(schemaKey)) {
|
|
1954
|
-
const schemaProperties = model[schemaKey];
|
|
1955
|
-
for (const propertyKey in schemaProperties) {
|
|
1956
|
-
if (schemaProperties.hasOwnProperty(propertyKey)) {
|
|
1957
|
-
packedProperties[`${schemaKey}:${propertyKey}`] =
|
|
1958
|
-
schemaProperties[propertyKey];
|
|
1959
|
-
}
|
|
1960
|
-
}
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
return packedProperties;
|
|
1964
|
-
}
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
const ENTITY_TYPE = 'entity-type';
|
|
1769
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: TranslationService }]; } });
|
|
1968
1770
|
|
|
1969
|
-
|
|
1970
|
-
class HttpBaseService {
|
|
1771
|
+
class NdfNuxeoDialog extends BaseComponent {
|
|
1971
1772
|
constructor(injector) {
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1773
|
+
super(injector);
|
|
1774
|
+
this.dialogTitle = '';
|
|
1775
|
+
this.subTitle = '';
|
|
1776
|
+
this.loaderMode = 'spinner';
|
|
1777
|
+
this.dialogBodyTopOffset = 0;
|
|
1778
|
+
this.data = injector.get(MAT_DIALOG_DATA, null);
|
|
1779
|
+
this.dialogRef = injector.get(MatDialogRef, null);
|
|
1977
1780
|
}
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1781
|
+
executeAction(action, ...params) {
|
|
1782
|
+
this.dialogBodyTopOffset = this.dialogBody.nativeElement.scrollTop;
|
|
1783
|
+
if (action) {
|
|
1784
|
+
if (!this.isArrowFunction(action)) {
|
|
1785
|
+
throw new Error('The action should be arrow function');
|
|
1786
|
+
}
|
|
1787
|
+
this.loading = true;
|
|
1788
|
+
//TODO here we should find a way to test if actions instance of DialogActionType
|
|
1789
|
+
const result = action(...params);
|
|
1790
|
+
if (!isObservable(result)) {
|
|
1791
|
+
this.loading = false;
|
|
1792
|
+
throw new Error('The action you used should return an Observable');
|
|
1793
|
+
}
|
|
1794
|
+
result.pipe(takeUntil(this.destroy$)).subscribe((value) => {
|
|
1795
|
+
this.loading = false;
|
|
1796
|
+
this.dialogRef.close(value);
|
|
1797
|
+
}, (err) => {
|
|
1798
|
+
this.loading = false;
|
|
1799
|
+
});
|
|
1983
1800
|
}
|
|
1984
1801
|
else {
|
|
1985
|
-
|
|
1986
|
-
url = options.endpoint;
|
|
1987
|
-
params = (_a = options.params) !== null && _a !== void 0 ? _a : undefined;
|
|
1988
|
-
headers = (_b = options.headers) !== null && _b !== void 0 ? _b : undefined;
|
|
1989
|
-
responseType = (_c = options.responseType) !== null && _c !== void 0 ? _c : undefined;
|
|
1802
|
+
this.dialogRef.close();
|
|
1990
1803
|
}
|
|
1991
|
-
return __classPrivateFieldGet(this, _HttpBaseService_http, "f")
|
|
1992
|
-
.get(url, { headers, params, responseType })
|
|
1993
|
-
.pipe(map((response) => response), this.catchErrors());
|
|
1994
1804
|
}
|
|
1995
|
-
|
|
1996
|
-
|
|
1805
|
+
isArrowFunction(fn) {
|
|
1806
|
+
const strFn = fn.toString();
|
|
1807
|
+
const firstIndex = strFn.indexOf(')');
|
|
1808
|
+
const lastIndex = strFn.indexOf('{') + 1;
|
|
1809
|
+
const target = strFn.substring(firstIndex, lastIndex).replace(' ', '');
|
|
1810
|
+
return target.includes('=>');
|
|
1811
|
+
}
|
|
1812
|
+
onClose() {
|
|
1813
|
+
this.dialogRef.close();
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
NdfNuxeoDialog.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1817
|
+
NdfNuxeoDialog.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: { dialogTitle: "dialogTitle", subTitle: "subTitle", loaderMode: "loaderMode" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true }], viewQueries: [{ propertyName: "dialogBody", first: true, predicate: ["dialogBody"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div SetDirRtl class=\"ndf-dialog-wrapper\">\r\n\t<div class=\"dialog-header\">\r\n\t\t<div class=\"flex flex-col\">\r\n\t\t\t<span>{{ data?.dialogConfig?.title || dialogTitle }}</span>\r\n\t\t\t<span class=\"text-base font-normal\"\r\n\t\t\t\t>{{ data?.dialogConfig?.subTitle || subTitle }}</span\r\n\t\t\t>\r\n\t\t</div>\r\n\t\t<button\r\n\t\t\tclass=\"flex items-center justify-center rounded-full bg-anti-flash-white w-10 h-10\"\r\n\t\t\t(click)=\"executeAction()\"\r\n\t\t\tmatTooltip=\"{{'BUTTONS.CLOSE' | translate}}\"\r\n\t\t>\r\n\t\t\t<mat-icon class=\"icon-size-3.5\" [svgIcon]=\"'icons:cancel-icon'\">\r\n\t\t\t</mat-icon>\r\n\t\t</button>\r\n\t</div>\r\n\t<div #dialogBody class=\"dialog-body\" [ngClass]=\"{'overflow-hidden': loading}\">\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"data?.dialogConfig?.contentTemplate || contentTemplate\"\r\n\t\t></ng-container>\r\n\t\t<ng-container *ngIf=\"loading\">\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay bg-gray-300 opacity-40 z-999\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t></div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"overlay z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'spinner'\"\r\n\t\t\t\t[ngStyle]=\"{'top': dialogBodyTopOffset + 'px'}\"\r\n\t\t\t>\r\n\t\t\t\t<mat-spinner\r\n\t\t\t\t\t[value]=\"90\"\r\n\t\t\t\t\t[strokeWidth]=\"4\"\r\n\t\t\t\t\toverlay=\"true\"\r\n\t\t\t\t\t[diameter]=\"40\"\r\n\t\t\t\t\tcolor=\"primary\"\r\n\t\t\t\t>\r\n\t\t\t\t</mat-spinner>\r\n\t\t\t</div>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"block w-full h-px absolute inset-0 z-9999\"\r\n\t\t\t\t*ngIf=\"loaderMode === 'progressBar'\"\r\n\t\t\t>\r\n\t\t\t\t<mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</div>\r\n\t<div class=\"flex w-full justify-end p-6 pt-0 gap-x-4\">\r\n\t\t<button class=\"cancelation-button\" (click)=\"executeAction()\">\r\n\t\t\t{{\"BUTTONS.CANCEL\" | translate}}\r\n\t\t</button>\r\n\t\t<ng-container\r\n\t\t\t*ngTemplateOutlet=\"(data?.dialogConfig?.actionsTemplate || actionsTemplate); context: { dialog: this }\"\r\n\t\t></ng-container>\r\n\t</div>\r\n</div>\r\n", styles: ["::ng-deep .ndf-dialog .mat-dialog-container{overflow:hidden!important;border-radius:8px!important}.ndf-dialog-wrapper{@apply flex flex-col;}.ndf-dialog-wrapper .dialog-header{@apply flex h-20 p-6 justify-between items-center w-full bg-vapor text-blue-munsell text-xl not-italic font-bold leading-7;}.ndf-dialog-wrapper .dialog-body{height:auto;max-height:calc(100vh - 208px);@apply flex flex-col gap-y-4 p-6 overflow-y-auto relative z-99;}.ndf-dialog-wrapper .overlay{@apply flex w-full h-full items-center justify-center absolute left-0 bottom-0 right-0;}\n"], components: [{ type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: SetDirRtlDirective, selector: "[SetDirRtl]" }, { type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltipPosition", "matTooltipDisabled", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
1818
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfNuxeoDialog, decorators: [{
|
|
1819
|
+
type: Component,
|
|
1820
|
+
args: [{
|
|
1821
|
+
selector: 'ndf-nuxeo-dialog',
|
|
1822
|
+
templateUrl: './nuxeo.dialog.html',
|
|
1823
|
+
styleUrls: ['./nuxeo.dialog.scss']
|
|
1824
|
+
}]
|
|
1825
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; }, propDecorators: { dialogTitle: [{
|
|
1826
|
+
type: Input
|
|
1827
|
+
}], subTitle: [{
|
|
1828
|
+
type: Input
|
|
1829
|
+
}], loaderMode: [{
|
|
1830
|
+
type: Input
|
|
1831
|
+
}], contentTemplate: [{
|
|
1832
|
+
type: ContentChild,
|
|
1833
|
+
args: ['contentTemplate']
|
|
1834
|
+
}], actionsTemplate: [{
|
|
1835
|
+
type: ContentChild,
|
|
1836
|
+
args: ['actionsTemplate']
|
|
1837
|
+
}], dialogBody: [{
|
|
1838
|
+
type: ViewChild,
|
|
1839
|
+
args: ['dialogBody']
|
|
1840
|
+
}] } });
|
|
1841
|
+
|
|
1842
|
+
class NdfConfirmationDialogComponent extends BaseDialogComponent {
|
|
1843
|
+
constructor(injector) {
|
|
1844
|
+
super(injector);
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
NdfConfirmationDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfConfirmationDialogComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
|
|
1848
|
+
NdfConfirmationDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NdfConfirmationDialogComponent, selector: "ndf-confirmation-dialog", usesInheritance: true, ngImport: i0, template: "<ndf-nuxeo-dialog dialogTitle=\"{{ dialogData.title | translate }}\">\r\n\t<ng-template #contentTemplate>\r\n\t\t<!-- Content -->\r\n\t\t<div class=\"flex flex-row gap-x-2 items-center\">\r\n\t\t\t<!-- Icon -->\r\n\t\t\t<ng-container *ngIf=\"dialogData.icon.show\">\r\n\t\t\t\t<div\r\n\t\t\t\t\tclass=\"flex flex-0 items-center justify-center w-10 h-10 sm:mr-4 rounded-full\"\r\n\t\t\t\t\t[ngClass]=\"{\r\n\t\t\t\t\t\tprimaryIcon: dialogData.icon.color === 'primary',\r\n\t\t\t\t\t\taccentIcon: dialogData.icon.color === 'accent',\r\n\t\t\t\t\t\twarnIcon: dialogData.icon.color === 'warn',\r\n\t\t\t\t\t\tbasicIcon: dialogData.icon.color === 'basic',\r\n\t\t\t\t\t\tinfoIcon: dialogData.icon.color === 'info',\r\n\t\t\t\t\t\tsuccessIcon: dialogData.icon.color === 'success',\r\n\t\t\t\t\t\twarningIcon: dialogData.icon.color === 'warning',\r\n\t\t\t\t\t\terrorIcon: dialogData.icon.color === 'error'\r\n\t\t\t\t\t}\"\r\n\t\t\t\t>\r\n\t\t\t\t\t<mat-icon\r\n\t\t\t\t\t\tclass=\"text-current\"\r\n\t\t\t\t\t\t[svgIcon]=\"dialogData.icon.name\"\r\n\t\t\t\t\t></mat-icon>\r\n\t\t\t\t</div>\r\n\t\t\t</ng-container>\r\n\t\t\t<div\r\n\t\t\t\tclass=\"text-secondary\"\r\n\t\t\t\t[innerHtml]=\"dialogData.message | translate\"\r\n\t\t\t></div>\r\n\t\t</div>\r\n\t</ng-template>\r\n\r\n\t<ng-template #actionsTemplate let-dialog=\"dialog\">\r\n\t\t<ng-container *ngIf=\"dialogData.actions.confirm.show\">\r\n\t\t\t<button\r\n\t\t\t\t(click)=\"dialog.executeAction(dialogData.actions.confirm.fn)\"\r\n\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t[color]=\"dialogData.actions.confirm.color\"\r\n\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t>\r\n\t\t\t\t{{ dialogData.actions.confirm.label | translate }}\r\n\t\t\t</button>\r\n\t\t</ng-container>\r\n\t\t<ng-container *ngIf=\"dialogData.actions.moreActions.length\">\r\n\t\t\t<ng-container *ngFor=\"let btn of dialogData.actions.moreActions\">\r\n\t\t\t\t<button\r\n\t\t\t\t\t(click)=\"dialog.executeAction(btn.fn)\"\r\n\t\t\t\t\tclass=\"submission-button\"\r\n\t\t\t\t\t[color]=\"btn.color\"\r\n\t\t\t\t\t[disabled]=\"dialog.loading\"\r\n\t\t\t\t>\r\n\t\t\t\t\t{{ btn.label | translate }}\r\n\t\t\t\t</button>\r\n\t\t\t</ng-container>\r\n\t\t</ng-container>\r\n\t</ng-template>\r\n</ndf-nuxeo-dialog>\r\n", styles: [".primaryIcon{@apply text-primary-600 bg-primary-100 dark:text-primary-50 dark:bg-primary-600;}.accentIcon{@apply text-accent-600 bg-accent-100 dark:text-accent-50 dark:bg-accent-600;}.warnIcon{@apply text-warn-600 bg-warn-100 dark:text-warn-50 dark:bg-warn-600;}.basicIcon{@apply text-gray-600 bg-gray-100 dark:text-gray-50 dark:bg-gray-600;}.infoIcon{@apply text-blue-600 bg-blue-100 dark:text-blue-50 dark:bg-blue-600;}.successIcon{@apply text-green-500 bg-green-100 dark:text-green-50 dark:bg-green-500;}.warningIcon{@apply text-amber-500 bg-amber-100 dark:text-amber-50 dark:bg-amber-500;}.errorIcon{@apply text-red-600 bg-red-100 dark:text-red-50 dark:bg-red-600;}::ng-deep .ndf-confirmation-dialog-panel{min-width:25%!important}\n"], components: [{ type: NdfNuxeoDialog, selector: "ndf-nuxeo-dialog", inputs: ["dialogTitle", "subTitle", "loaderMode"] }, { type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "translate": i1.TranslatePipe } });
|
|
1849
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NdfConfirmationDialogComponent, decorators: [{
|
|
1850
|
+
type: Component,
|
|
1851
|
+
args: [{
|
|
1852
|
+
selector: 'ndf-confirmation-dialog',
|
|
1853
|
+
templateUrl: './ndf-confirmation-dialog.component.html',
|
|
1854
|
+
styleUrls: ['./ndf-confirmation-dialog.component.scss']
|
|
1855
|
+
}]
|
|
1856
|
+
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
1857
|
+
|
|
1858
|
+
/** @ignore */
|
|
1859
|
+
class ClickOutsideDirective {
|
|
1860
|
+
constructor(elementRef) {
|
|
1861
|
+
this.elementRef = elementRef;
|
|
1862
|
+
this.clickOutside = new EventEmitter();
|
|
1863
|
+
}
|
|
1864
|
+
onClick(target) {
|
|
1865
|
+
const clickedInside = this.elementRef.nativeElement.contains(target);
|
|
1866
|
+
if (!clickedInside) {
|
|
1867
|
+
this.clickOutside.emit(target);
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1872
|
+
ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, host: { listeners: { "window:click": "onClick($event.target)" } }, ngImport: i0 });
|
|
1873
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ClickOutsideDirective, decorators: [{
|
|
1874
|
+
type: Directive,
|
|
1875
|
+
args: [{
|
|
1876
|
+
selector: '[clickOutside]'
|
|
1877
|
+
}]
|
|
1878
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { clickOutside: [{
|
|
1879
|
+
type: Output
|
|
1880
|
+
}], onClick: [{
|
|
1881
|
+
type: HostListener,
|
|
1882
|
+
args: ['window:click', ['$event.target']]
|
|
1883
|
+
}] } });
|
|
1884
|
+
|
|
1885
|
+
/** @ignore */
|
|
1886
|
+
class SetRtlDirective {
|
|
1887
|
+
constructor(elRef, renderer, translation) {
|
|
1888
|
+
this.elRef = elRef;
|
|
1889
|
+
this.renderer = renderer;
|
|
1890
|
+
this.translation = translation;
|
|
1891
|
+
this.switchClassBasedOnLanguage();
|
|
1892
|
+
}
|
|
1893
|
+
/*Switch rtl class based on the chosen language from Translation Service*/
|
|
1894
|
+
switchClassBasedOnLanguage() {
|
|
1895
|
+
this.translation.isArabic.subscribe((arabic) => {
|
|
1896
|
+
arabic
|
|
1897
|
+
? this.renderer.addClass(this.elRef.nativeElement, 'rtl')
|
|
1898
|
+
: this.renderer.removeClass(this.elRef.nativeElement, 'rtl');
|
|
1899
|
+
});
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
SetRtlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SetRtlDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: TranslationService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1903
|
+
SetRtlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: SetRtlDirective, selector: "[SetRtl]", ngImport: i0 });
|
|
1904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SetRtlDirective, decorators: [{
|
|
1905
|
+
type: Directive,
|
|
1906
|
+
args: [{
|
|
1907
|
+
selector: '[SetRtl]',
|
|
1908
|
+
}]
|
|
1909
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: TranslationService }]; } });
|
|
1910
|
+
|
|
1911
|
+
class EvaluatorsService {
|
|
1912
|
+
constructor(nuxeoService, appConfigService) {
|
|
1913
|
+
this.nuxeoService = nuxeoService;
|
|
1914
|
+
this.appConfigService = appConfigService;
|
|
1915
|
+
this.context = { entity: null, getEvaluator: null, user: null };
|
|
1916
|
+
this.asyncEvery = (arr, predicate) => __awaiter(this, void 0, void 0, function* () {
|
|
1917
|
+
for (let e of arr) {
|
|
1918
|
+
if (!(yield predicate(e))) {
|
|
1919
|
+
return false;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
return true;
|
|
1923
|
+
});
|
|
1924
|
+
this.asyncSome = (arr, predicate) => __awaiter(this, void 0, void 0, function* () {
|
|
1925
|
+
for (let e of arr) {
|
|
1926
|
+
if (yield predicate(e)) {
|
|
1927
|
+
return true;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
return false;
|
|
1931
|
+
});
|
|
1932
|
+
// tslint:disable-next-line:member-ordering
|
|
1933
|
+
this.evaluators = {
|
|
1934
|
+
AND: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
1935
|
+
if (!args || args.length === 0) {
|
|
1936
|
+
return false;
|
|
1937
|
+
}
|
|
1938
|
+
return yield this.asyncEvery(args, (arg) => __awaiter(this, void 0, void 0, function* () {
|
|
1939
|
+
const evaluator = yield context.getEvaluator(arg.value);
|
|
1940
|
+
if (!evaluator) {
|
|
1941
|
+
console.warn("evaluator not found: " + arg.value);
|
|
1942
|
+
return false;
|
|
1943
|
+
}
|
|
1944
|
+
return yield evaluator(context, arg.parameters || []);
|
|
1945
|
+
}));
|
|
1946
|
+
}),
|
|
1947
|
+
OR: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
1948
|
+
if (!args || args.length === 0) {
|
|
1949
|
+
return false;
|
|
1950
|
+
}
|
|
1951
|
+
return yield this.asyncSome(args, (arg) => __awaiter(this, void 0, void 0, function* () {
|
|
1952
|
+
const evaluator = yield context.getEvaluator(arg.value);
|
|
1953
|
+
if (!evaluator) {
|
|
1954
|
+
console.warn("evaluator not found: " + arg.value);
|
|
1955
|
+
return false;
|
|
1956
|
+
}
|
|
1957
|
+
const res = yield evaluator(context, arg.parameters || []);
|
|
1958
|
+
return res;
|
|
1959
|
+
}));
|
|
1960
|
+
}),
|
|
1961
|
+
isStatus: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
1962
|
+
if (args.indexOf(context.entity.state) > -1) {
|
|
1963
|
+
return true;
|
|
1964
|
+
}
|
|
1965
|
+
else {
|
|
1966
|
+
return false;
|
|
1967
|
+
}
|
|
1968
|
+
}),
|
|
1969
|
+
isCreator: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
1970
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1971
|
+
//check if user loged in is the creator of that corresp
|
|
1972
|
+
let owner;
|
|
1973
|
+
if ((_b = (_a = context.entity.properties.owner) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.username) {
|
|
1974
|
+
owner = (_d = (_c = context.entity.properties.owner) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.username;
|
|
1975
|
+
}
|
|
1976
|
+
else if ((_f = (_e = context.entity.properties["corr:owner"]) === null || _e === void 0 ? void 0 : _e.properties) === null || _f === void 0 ? void 0 : _f.username) {
|
|
1977
|
+
owner = (_h = (_g = context.entity.properties["corr:owner"]) === null || _g === void 0 ? void 0 : _g.properties) === null || _h === void 0 ? void 0 : _h.username;
|
|
1978
|
+
}
|
|
1979
|
+
else if (context.entity.properties.owner) {
|
|
1980
|
+
owner = context.entity.properties.owner;
|
|
1981
|
+
}
|
|
1982
|
+
else if (context.entity.properties["corr:owner"]) {
|
|
1983
|
+
owner = context.entity.properties["corr:owner"];
|
|
1984
|
+
}
|
|
1985
|
+
if (owner === context.user.properties.username) {
|
|
1986
|
+
return true;
|
|
1987
|
+
}
|
|
1988
|
+
else {
|
|
1989
|
+
return false;
|
|
1990
|
+
}
|
|
1991
|
+
}),
|
|
1992
|
+
isUserInrole: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
1993
|
+
const result = yield this.nuxeoService
|
|
1994
|
+
.isUserInRole(args, "")
|
|
1995
|
+
.pipe(first())
|
|
1996
|
+
.toPromise();
|
|
1997
|
+
return result;
|
|
1998
|
+
}),
|
|
1999
|
+
};
|
|
2000
|
+
this.getEvaluator = (key) => __awaiter(this, void 0, void 0, function* () {
|
|
2001
|
+
const eva = this.evaluators;
|
|
2002
|
+
if (key && key.startsWith("!")) {
|
|
2003
|
+
const fn = eva[key.substring(1)];
|
|
2004
|
+
return (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
2005
|
+
const result = yield fn(context, ...args);
|
|
2006
|
+
return !result;
|
|
2007
|
+
});
|
|
2008
|
+
}
|
|
2009
|
+
return eva[key];
|
|
2010
|
+
});
|
|
2011
|
+
this.appConfigService.configLoaded.subscribe((ready) => {
|
|
2012
|
+
if (ready) {
|
|
2013
|
+
this.conditions = this.getAllRules();
|
|
2014
|
+
}
|
|
2015
|
+
});
|
|
2016
|
+
}
|
|
2017
|
+
setEvaluators(evaluators) {
|
|
2018
|
+
this.evaluators = Object.assign(Object.assign({}, this.evaluators), evaluators);
|
|
2019
|
+
}
|
|
2020
|
+
getEvaluators() {
|
|
2021
|
+
return this.evaluators;
|
|
2022
|
+
}
|
|
2023
|
+
// ----------------------------------------------------
|
|
2024
|
+
evaluateRule(ruleId, context) {
|
|
2025
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2026
|
+
const ruleRef = this.getRuleById(ruleId);
|
|
2027
|
+
context = context || this.context;
|
|
2028
|
+
context["getEvaluator"] = this.getEvaluator;
|
|
2029
|
+
if (ruleRef) {
|
|
2030
|
+
const evaluator = yield this.getEvaluator(ruleRef.type);
|
|
2031
|
+
if (evaluator) {
|
|
2032
|
+
return yield evaluator(context, ruleRef.parameters);
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
else {
|
|
2036
|
+
const evaluator = yield this.getEvaluator(ruleId);
|
|
2037
|
+
if (evaluator) {
|
|
2038
|
+
return yield evaluator(context);
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
getRuleById(id) {
|
|
2044
|
+
return this.conditions[id] ? Object.assign({}, this.conditions[id]) : null;
|
|
2045
|
+
}
|
|
2046
|
+
getAllRules() {
|
|
2047
|
+
return this.appConfigService.conditons;
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
EvaluatorsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: EvaluatorsService, deps: [{ token: NuxeoService }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2051
|
+
EvaluatorsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: EvaluatorsService, providedIn: "root" });
|
|
2052
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: EvaluatorsService, decorators: [{
|
|
2053
|
+
type: Injectable,
|
|
2054
|
+
args: [{ providedIn: "root" }]
|
|
2055
|
+
}], ctorParameters: function () { return [{ type: NuxeoService }, { type: AppConfigService }]; } });
|
|
2056
|
+
|
|
2057
|
+
/**
|
|
2058
|
+
* Permission directive shows or hides an element,
|
|
2059
|
+
* based on a predefined structured condition object in the [conditions.json]{@link ../additional-documentation/conditions-file.html} file.
|
|
2060
|
+
* it will evaluate the rule and shows or hides an element based on the result.
|
|
2061
|
+
* this directive can evaluate rules against a document object as well,
|
|
2062
|
+
* check [conditions.json]{@link ../additional-documentation/conditions-file.html} for more information
|
|
2063
|
+
* @example
|
|
2064
|
+
* <div *permission="{ name: 'conditionKey', entity: nuxeoDocumentObject }">
|
|
2065
|
+
* Element with permissions
|
|
2066
|
+
* </duv>
|
|
2067
|
+
* <div *permission="{ name: 'conditionKey2' }">
|
|
2068
|
+
* Element with permissions 2
|
|
2069
|
+
* </duv>
|
|
2070
|
+
* @title
|
|
2071
|
+
* Permission
|
|
2072
|
+
*/
|
|
2073
|
+
class PermissionsDirective {
|
|
2074
|
+
constructor(nuxeoService, eltRef, viewContainerRef, templateRef, appConfigService, evaluatorsService) {
|
|
2075
|
+
this.nuxeoService = nuxeoService;
|
|
2076
|
+
this.eltRef = eltRef;
|
|
2077
|
+
this.viewContainerRef = viewContainerRef;
|
|
2078
|
+
this.templateRef = templateRef;
|
|
2079
|
+
this.appConfigService = appConfigService;
|
|
2080
|
+
this.evaluatorsService = evaluatorsService;
|
|
2081
|
+
this.isVisible = false;
|
|
2082
|
+
this.context = { entity: null, getEvaluator: null, user: null };
|
|
2083
|
+
}
|
|
2084
|
+
ngOnInit() {
|
|
2085
|
+
this.context.getEvaluator = this.evaluatorsService.getEvaluator;
|
|
2086
|
+
if (!this.permission.name) {
|
|
2087
|
+
if (!this.isVisible) {
|
|
2088
|
+
this.isVisible = true;
|
|
2089
|
+
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
else {
|
|
2093
|
+
this.context.entity = this.permission.entity;
|
|
2094
|
+
this.context.user = this.permission.user || this.nuxeoService.nuxeoClient.user;
|
|
2095
|
+
this.evaluatorsService.evaluateRule(this.permission.name, this.context).then((result) => {
|
|
2096
|
+
if (result) {
|
|
2097
|
+
if (!this.isVisible) {
|
|
2098
|
+
this.isVisible = true;
|
|
2099
|
+
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
else {
|
|
2103
|
+
this.isVisible = false;
|
|
2104
|
+
this.viewContainerRef.clear();
|
|
2105
|
+
}
|
|
2106
|
+
});
|
|
2107
|
+
}
|
|
2108
|
+
}
|
|
2109
|
+
}
|
|
2110
|
+
PermissionsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PermissionsDirective, deps: [{ token: NuxeoService }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: AppConfigService }, { token: EvaluatorsService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2111
|
+
PermissionsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: PermissionsDirective, selector: "[permission]", inputs: { permission: "permission" }, ngImport: i0 });
|
|
2112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PermissionsDirective, decorators: [{
|
|
2113
|
+
type: Directive,
|
|
2114
|
+
args: [{
|
|
2115
|
+
selector: '[permission]'
|
|
2116
|
+
}]
|
|
2117
|
+
}], ctorParameters: function () { return [{ type: NuxeoService }, { type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: AppConfigService }, { type: EvaluatorsService }]; }, propDecorators: { permission: [{
|
|
2118
|
+
type: Input
|
|
2119
|
+
}] } });
|
|
2120
|
+
|
|
2121
|
+
class AppHasRoleDirective {
|
|
2122
|
+
constructor(viewContainerRef, templateRef, nuxeoService) {
|
|
2123
|
+
this.viewContainerRef = viewContainerRef;
|
|
2124
|
+
this.templateRef = templateRef;
|
|
2125
|
+
this.nuxeoService = nuxeoService;
|
|
2126
|
+
this.stop$ = new Subject();
|
|
2127
|
+
this.isVisible = false;
|
|
2128
|
+
}
|
|
2129
|
+
ngOnInit() {
|
|
2130
|
+
var _a;
|
|
2131
|
+
if ((_a = this.appHasRole) === null || _a === void 0 ? void 0 : _a.role) {
|
|
2132
|
+
this.nuxeoService.isUserInRole(this.appHasRole.role, this.appHasRole.code).subscribe(data => {
|
|
2133
|
+
if (data || !this.appHasRole) {
|
|
2134
|
+
// If it is already visible (which can happen if
|
|
2135
|
+
// his roles changed) we do not need to add it a second time
|
|
2136
|
+
if (!this.isVisible) {
|
|
2137
|
+
// We update the `isVisible` property and add the
|
|
2138
|
+
// templateRef to the view using the
|
|
2139
|
+
// 'createEmbeddedView' method of the viewContainerRef
|
|
2140
|
+
this.isVisible = true;
|
|
2141
|
+
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
else {
|
|
2145
|
+
// If the user does not have the role,
|
|
2146
|
+
// we update the `isVisible` property and clear
|
|
2147
|
+
// the contents of the viewContainerRef
|
|
2148
|
+
this.isVisible = false;
|
|
2149
|
+
this.viewContainerRef.clear();
|
|
2150
|
+
}
|
|
2151
|
+
});
|
|
2152
|
+
}
|
|
2153
|
+
else {
|
|
2154
|
+
if (!this.isVisible) {
|
|
2155
|
+
// We update the `isVisible` property and add the
|
|
2156
|
+
// templateRef to the view using the
|
|
2157
|
+
// 'createEmbeddedView' method of the viewContainerRef
|
|
2158
|
+
this.isVisible = true;
|
|
2159
|
+
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
ngOnChanges() {
|
|
2164
|
+
this.ngOnInit();
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
AppHasRoleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AppHasRoleDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: NuxeoService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2168
|
+
AppHasRoleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: AppHasRoleDirective, selector: "[appHasRole]", inputs: { appHasRole: "appHasRole" }, usesOnChanges: true, ngImport: i0 });
|
|
2169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AppHasRoleDirective, decorators: [{
|
|
2170
|
+
type: Directive,
|
|
2171
|
+
args: [{
|
|
2172
|
+
selector: '[appHasRole]'
|
|
2173
|
+
}]
|
|
2174
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: NuxeoService }]; }, propDecorators: { appHasRole: [{
|
|
2175
|
+
type: Input
|
|
2176
|
+
}] } });
|
|
2177
|
+
|
|
2178
|
+
class DragAndDropDirective {
|
|
2179
|
+
constructor() {
|
|
2180
|
+
this.fileDroped = new EventEmitter();
|
|
2181
|
+
}
|
|
2182
|
+
onDragOver(evt) {
|
|
2183
|
+
evt.preventDefault();
|
|
2184
|
+
evt.stopPropagation();
|
|
2185
|
+
}
|
|
2186
|
+
onDragLeave(evt) {
|
|
2187
|
+
evt.preventDefault();
|
|
2188
|
+
evt.stopPropagation();
|
|
2189
|
+
}
|
|
2190
|
+
onDrop(evt) {
|
|
2191
|
+
let files = [];
|
|
2192
|
+
evt.preventDefault();
|
|
2193
|
+
evt.stopPropagation();
|
|
2194
|
+
if (evt.dataTransfer.files.length) {
|
|
2195
|
+
for (const file of evt.dataTransfer.files) {
|
|
2196
|
+
files.push(file);
|
|
2197
|
+
}
|
|
2198
|
+
this.fileDroped.emit(files);
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
DragAndDropDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DragAndDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2203
|
+
DragAndDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: DragAndDropDirective, selector: "[appDragAndDrop]", outputs: { fileDroped: "fileDroped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" } }, ngImport: i0 });
|
|
2204
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DragAndDropDirective, decorators: [{
|
|
2205
|
+
type: Directive,
|
|
2206
|
+
args: [{
|
|
2207
|
+
selector: '[appDragAndDrop]'
|
|
2208
|
+
}]
|
|
2209
|
+
}], ctorParameters: function () { return []; }, propDecorators: { fileDroped: [{
|
|
2210
|
+
type: Output
|
|
2211
|
+
}], onDragOver: [{
|
|
2212
|
+
type: HostListener,
|
|
2213
|
+
args: ['dragover', ['$event']]
|
|
2214
|
+
}], onDragLeave: [{
|
|
2215
|
+
type: HostListener,
|
|
2216
|
+
args: ['dragleave', ['$event']]
|
|
2217
|
+
}], onDrop: [{
|
|
2218
|
+
type: HostListener,
|
|
2219
|
+
args: ['drop', ['$event']]
|
|
2220
|
+
}] } });
|
|
2221
|
+
|
|
2222
|
+
/**
|
|
2223
|
+
* @title
|
|
2224
|
+
* Directives Module
|
|
2225
|
+
*/
|
|
2226
|
+
class DirectiveModule {
|
|
2227
|
+
}
|
|
2228
|
+
DirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2229
|
+
DirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DirectiveModule, declarations: [ClickOutsideDirective,
|
|
2230
|
+
SetRtlDirective,
|
|
2231
|
+
PermissionsDirective,
|
|
2232
|
+
SetDirRtlDirective,
|
|
2233
|
+
AppHasRoleDirective,
|
|
2234
|
+
DragAndDropDirective], imports: [CommonModule], exports: [ClickOutsideDirective,
|
|
2235
|
+
SetRtlDirective,
|
|
2236
|
+
PermissionsDirective,
|
|
2237
|
+
SetDirRtlDirective,
|
|
2238
|
+
AppHasRoleDirective,
|
|
2239
|
+
DragAndDropDirective] });
|
|
2240
|
+
DirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DirectiveModule, providers: [], imports: [[CommonModule]] });
|
|
2241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DirectiveModule, decorators: [{
|
|
2242
|
+
type: NgModule,
|
|
2243
|
+
args: [{
|
|
2244
|
+
declarations: [
|
|
2245
|
+
ClickOutsideDirective,
|
|
2246
|
+
SetRtlDirective,
|
|
2247
|
+
PermissionsDirective,
|
|
2248
|
+
SetDirRtlDirective,
|
|
2249
|
+
AppHasRoleDirective,
|
|
2250
|
+
DragAndDropDirective
|
|
2251
|
+
],
|
|
2252
|
+
imports: [CommonModule],
|
|
2253
|
+
exports: [
|
|
2254
|
+
ClickOutsideDirective,
|
|
2255
|
+
SetRtlDirective,
|
|
2256
|
+
PermissionsDirective,
|
|
2257
|
+
SetDirRtlDirective,
|
|
2258
|
+
AppHasRoleDirective,
|
|
2259
|
+
DragAndDropDirective
|
|
2260
|
+
],
|
|
2261
|
+
providers: []
|
|
2262
|
+
}]
|
|
2263
|
+
}] });
|
|
2264
|
+
|
|
2265
|
+
class NuxeoDialogModule {
|
|
2266
|
+
}
|
|
2267
|
+
NuxeoDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2268
|
+
NuxeoDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogModule, declarations: [NdfNuxeoDialog, NdfConfirmationDialogComponent], imports: [CommonModule,
|
|
2269
|
+
TranslateModule,
|
|
2270
|
+
MatIconModule,
|
|
2271
|
+
MatDialogModule,
|
|
2272
|
+
MatTooltipModule,
|
|
2273
|
+
DirectiveModule], exports: [NdfNuxeoDialog, NdfConfirmationDialogComponent] });
|
|
2274
|
+
NuxeoDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogModule, imports: [[
|
|
2275
|
+
CommonModule,
|
|
2276
|
+
TranslateModule,
|
|
2277
|
+
MatIconModule,
|
|
2278
|
+
MatDialogModule,
|
|
2279
|
+
MatTooltipModule,
|
|
2280
|
+
DirectiveModule
|
|
2281
|
+
]] });
|
|
2282
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogModule, decorators: [{
|
|
2283
|
+
type: NgModule,
|
|
2284
|
+
args: [{
|
|
2285
|
+
declarations: [NdfNuxeoDialog, NdfConfirmationDialogComponent],
|
|
2286
|
+
imports: [
|
|
2287
|
+
CommonModule,
|
|
2288
|
+
TranslateModule,
|
|
2289
|
+
MatIconModule,
|
|
2290
|
+
MatDialogModule,
|
|
2291
|
+
MatTooltipModule,
|
|
2292
|
+
DirectiveModule
|
|
2293
|
+
],
|
|
2294
|
+
exports: [NdfNuxeoDialog, NdfConfirmationDialogComponent]
|
|
2295
|
+
}]
|
|
2296
|
+
}] });
|
|
2297
|
+
|
|
2298
|
+
const defaultConfirmConfig = {
|
|
2299
|
+
title: 'confirmDialog.confirm',
|
|
2300
|
+
message: 'confirmDialog.generalConfirmMsg',
|
|
2301
|
+
icon: {
|
|
2302
|
+
show: true,
|
|
2303
|
+
name: 'heroicons_outline:exclamation',
|
|
2304
|
+
color: 'warn'
|
|
2305
|
+
},
|
|
2306
|
+
actions: {
|
|
2307
|
+
confirm: {
|
|
2308
|
+
show: true,
|
|
2309
|
+
label: 'BUTTONS.confirm',
|
|
2310
|
+
color: 'warn',
|
|
2311
|
+
fn: () => {
|
|
2312
|
+
return of(false);
|
|
2313
|
+
}
|
|
2314
|
+
},
|
|
2315
|
+
moreActions: []
|
|
2316
|
+
}
|
|
2317
|
+
};
|
|
2318
|
+
|
|
2319
|
+
var _NuxeoDialogService_instances, _NuxeoDialogService_getPanelClass;
|
|
2320
|
+
class NuxeoDialogService {
|
|
2321
|
+
constructor(dialog) {
|
|
2322
|
+
this.dialog = dialog;
|
|
2323
|
+
_NuxeoDialogService_instances.add(this);
|
|
2324
|
+
}
|
|
2325
|
+
open(options) {
|
|
2326
|
+
var _a, _b, _c, _d;
|
|
2327
|
+
return this.dialog.open(options.component, {
|
|
2328
|
+
width: (options === null || options === void 0 ? void 0 : options.width) || 'auto',
|
|
2329
|
+
height: (options === null || options === void 0 ? void 0 : options.height) || 'auto',
|
|
2330
|
+
minWidth: '35%',
|
|
2331
|
+
panelClass: ['ndf-dialog', ...__classPrivateFieldGet(this, _NuxeoDialogService_instances, "m", _NuxeoDialogService_getPanelClass).call(this, options === null || options === void 0 ? void 0 : options.panelClass)],
|
|
2332
|
+
disableClose: true,
|
|
2333
|
+
data: Object.assign({ dialogConfig: {
|
|
2334
|
+
title: (_a = options.config) === null || _a === void 0 ? void 0 : _a.title,
|
|
2335
|
+
subTitle: (_b = options.config) === null || _b === void 0 ? void 0 : _b.subTitle,
|
|
2336
|
+
contentTemplate: (_c = options.config) === null || _c === void 0 ? void 0 : _c.contentTemplate,
|
|
2337
|
+
actionsTemplate: (_d = options.config) === null || _d === void 0 ? void 0 : _d.actionsTemplate
|
|
2338
|
+
} }, (options.data || {}))
|
|
2339
|
+
});
|
|
2340
|
+
}
|
|
2341
|
+
showConfirm(config) {
|
|
2342
|
+
// Merge the user config with the default config
|
|
2343
|
+
const confirmConfig = merge({}, defaultConfirmConfig, config);
|
|
2344
|
+
const options = {
|
|
2345
|
+
component: NdfConfirmationDialogComponent,
|
|
2346
|
+
data: Object.assign({}, confirmConfig),
|
|
2347
|
+
panelClass: 'ndf-confirmation-dialog-panel'
|
|
2348
|
+
};
|
|
2349
|
+
return this.open(options);
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
_NuxeoDialogService_instances = new WeakSet(), _NuxeoDialogService_getPanelClass = function _NuxeoDialogService_getPanelClass(panelClass) {
|
|
2353
|
+
let classes = [''];
|
|
2354
|
+
if (panelClass) {
|
|
2355
|
+
classes = Array.isArray(panelClass) ? panelClass : [panelClass];
|
|
2356
|
+
}
|
|
2357
|
+
return classes;
|
|
2358
|
+
};
|
|
2359
|
+
NuxeoDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogService, deps: [{ token: i1$3.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2360
|
+
NuxeoDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogService, providedIn: 'root' });
|
|
2361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: NuxeoDialogService, decorators: [{
|
|
2362
|
+
type: Injectable,
|
|
2363
|
+
args: [{
|
|
2364
|
+
providedIn: 'root'
|
|
2365
|
+
}]
|
|
2366
|
+
}], ctorParameters: function () { return [{ type: i1$3.MatDialog }]; } });
|
|
2367
|
+
|
|
2368
|
+
class NuxeoMapper {
|
|
2369
|
+
static schemaToModel(properties) {
|
|
2370
|
+
const mappedProperties = {};
|
|
2371
|
+
for (const key in properties) {
|
|
2372
|
+
if (properties.hasOwnProperty(key)) {
|
|
2373
|
+
const [prefix, propertyKey] = key.split(':');
|
|
2374
|
+
if (!mappedProperties[prefix]) {
|
|
2375
|
+
mappedProperties[prefix] = {};
|
|
2376
|
+
}
|
|
2377
|
+
mappedProperties[prefix][propertyKey] =
|
|
2378
|
+
properties[key];
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
return mappedProperties;
|
|
2382
|
+
}
|
|
2383
|
+
static modelToSchema(model) {
|
|
2384
|
+
const packedProperties = {};
|
|
2385
|
+
for (const schemaKey in model) {
|
|
2386
|
+
if (model.hasOwnProperty(schemaKey)) {
|
|
2387
|
+
const schemaProperties = model[schemaKey];
|
|
2388
|
+
for (const propertyKey in schemaProperties) {
|
|
2389
|
+
if (schemaProperties.hasOwnProperty(propertyKey)) {
|
|
2390
|
+
packedProperties[`${schemaKey}:${propertyKey}`] =
|
|
2391
|
+
schemaProperties[propertyKey];
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
return packedProperties;
|
|
2397
|
+
}
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
const ENTITY_TYPE = 'entity-type';
|
|
2401
|
+
|
|
2402
|
+
var _HttpBaseService_http;
|
|
2403
|
+
class HttpBaseService {
|
|
2404
|
+
constructor(injector) {
|
|
2405
|
+
_HttpBaseService_http.set(this, void 0);
|
|
2406
|
+
__classPrivateFieldSet(this, _HttpBaseService_http, injector.get(HttpClient), "f");
|
|
2407
|
+
}
|
|
2408
|
+
get environment() {
|
|
2409
|
+
return EnvManager.environment;
|
|
2410
|
+
}
|
|
2411
|
+
get(endpointOrOptions, params = undefined, headers = undefined, responseType = undefined) {
|
|
2412
|
+
var _a, _b, _c;
|
|
2413
|
+
let url;
|
|
2414
|
+
if (typeof endpointOrOptions === 'string') {
|
|
2415
|
+
url = endpointOrOptions;
|
|
2416
|
+
}
|
|
2417
|
+
else {
|
|
2418
|
+
const options = endpointOrOptions;
|
|
2419
|
+
url = options.endpoint;
|
|
2420
|
+
params = (_a = options.params) !== null && _a !== void 0 ? _a : undefined;
|
|
2421
|
+
headers = (_b = options.headers) !== null && _b !== void 0 ? _b : undefined;
|
|
2422
|
+
responseType = (_c = options.responseType) !== null && _c !== void 0 ? _c : undefined;
|
|
2423
|
+
}
|
|
2424
|
+
return __classPrivateFieldGet(this, _HttpBaseService_http, "f")
|
|
2425
|
+
.get(url, { headers, params, responseType })
|
|
2426
|
+
.pipe(map((response) => response), this.catchErrors());
|
|
2427
|
+
}
|
|
2428
|
+
post(endpointOrOptions, payload = undefined, params = undefined, headers = undefined, responseType = undefined) {
|
|
2429
|
+
var _a, _b, _c, _d;
|
|
1997
2430
|
let url;
|
|
1998
|
-
if (typeof endpointOrOptions ===
|
|
2431
|
+
if (typeof endpointOrOptions === 'string') {
|
|
1999
2432
|
url = endpointOrOptions;
|
|
2000
2433
|
}
|
|
2001
2434
|
else {
|
|
@@ -2013,7 +2446,7 @@ class HttpBaseService {
|
|
|
2013
2446
|
put(endpointOrOptions, payload = undefined, params = undefined, headers = undefined, responseType = undefined) {
|
|
2014
2447
|
var _a, _b, _c, _d;
|
|
2015
2448
|
let url;
|
|
2016
|
-
if (typeof endpointOrOptions ===
|
|
2449
|
+
if (typeof endpointOrOptions === 'string') {
|
|
2017
2450
|
url = endpointOrOptions;
|
|
2018
2451
|
}
|
|
2019
2452
|
else {
|
|
@@ -2031,7 +2464,7 @@ class HttpBaseService {
|
|
|
2031
2464
|
patch(endpointOrOptions, payload = undefined, params = undefined, headers = undefined, responseType = undefined) {
|
|
2032
2465
|
var _a, _b, _c, _d;
|
|
2033
2466
|
let url;
|
|
2034
|
-
if (typeof endpointOrOptions ===
|
|
2467
|
+
if (typeof endpointOrOptions === 'string') {
|
|
2035
2468
|
url = endpointOrOptions;
|
|
2036
2469
|
}
|
|
2037
2470
|
else {
|
|
@@ -2049,7 +2482,7 @@ class HttpBaseService {
|
|
|
2049
2482
|
delete(endpointOrOptions, params = undefined, headers = undefined, responseType = undefined) {
|
|
2050
2483
|
var _a, _b, _c;
|
|
2051
2484
|
let url;
|
|
2052
|
-
if (typeof endpointOrOptions ===
|
|
2485
|
+
if (typeof endpointOrOptions === 'string') {
|
|
2053
2486
|
url = endpointOrOptions;
|
|
2054
2487
|
}
|
|
2055
2488
|
else {
|
|
@@ -2147,10 +2580,10 @@ class CacheBaseService {
|
|
|
2147
2580
|
.filter((key) => {
|
|
2148
2581
|
var _a;
|
|
2149
2582
|
const options = {
|
|
2150
|
-
cacheKey: key.replace(prefix,
|
|
2583
|
+
cacheKey: key.replace(prefix, ''),
|
|
2151
2584
|
userName: userName,
|
|
2152
2585
|
request: DEFAULT_CACHE_OPTIONS.REQUEST,
|
|
2153
|
-
prepareDataBeforeCaching: DEFAULT_CACHE_OPTIONS.PREPARE_DATA
|
|
2586
|
+
prepareDataBeforeCaching: DEFAULT_CACHE_OPTIONS.PREPARE_DATA
|
|
2154
2587
|
};
|
|
2155
2588
|
const firstFetchingDate = (_a = __classPrivateFieldGet(this, _CacheBaseService_instances, "m", _CacheBaseService_getItem).call(this, options)) === null || _a === void 0 ? void 0 : _a.firstFetchingDate;
|
|
2156
2589
|
if (!firstFetchingDate)
|
|
@@ -2183,7 +2616,7 @@ _CacheBaseService_fetchedItems = new WeakMap(), _CacheBaseService_instances = ne
|
|
|
2183
2616
|
__classPrivateFieldGet(this, _CacheBaseService_instances, "m", _CacheBaseService_setItemInMap).call(this, options.cacheKey, Object.assign(Object.assign({}, cachedItem), { fetchingItemsFromTheServer: false, onFinishFetching: new Subject(), request: options.request }));
|
|
2184
2617
|
const params = {
|
|
2185
2618
|
[options.pageKey]: 0,
|
|
2186
|
-
[options.minCompareDateKey]: __classPrivateFieldGet(this, _CacheBaseService_instances, "m", _CacheBaseService_add1SecondToModifiedDate).call(this, new Date(__classPrivateFieldGet(this, _CacheBaseService_fetchedItems, "f")[options.cacheKey].lastModifiedDate)).toISOString()
|
|
2619
|
+
[options.minCompareDateKey]: __classPrivateFieldGet(this, _CacheBaseService_instances, "m", _CacheBaseService_add1SecondToModifiedDate).call(this, new Date(__classPrivateFieldGet(this, _CacheBaseService_fetchedItems, "f")[options.cacheKey].lastModifiedDate)).toISOString()
|
|
2187
2620
|
};
|
|
2188
2621
|
__classPrivateFieldGet(this, _CacheBaseService_fetchedItems, "f")[options.cacheKey].params = params;
|
|
2189
2622
|
observable = options.request(params);
|
|
@@ -2213,7 +2646,7 @@ _CacheBaseService_fetchedItems = new WeakMap(), _CacheBaseService_instances = ne
|
|
|
2213
2646
|
data: _fetchedItems.data,
|
|
2214
2647
|
lastModifiedDate: _fetchedItems.lastModifiedDate,
|
|
2215
2648
|
firstFetchingDate: _fetchedItems.firstFetchingDate,
|
|
2216
|
-
resultsCount: _fetchedItems[options.resultsCount]
|
|
2649
|
+
resultsCount: _fetchedItems[options.resultsCount]
|
|
2217
2650
|
}, options);
|
|
2218
2651
|
}
|
|
2219
2652
|
return _fetchedItems;
|
|
@@ -2221,7 +2654,7 @@ _CacheBaseService_fetchedItems = new WeakMap(), _CacheBaseService_instances = ne
|
|
|
2221
2654
|
const result = _cloneDeep({
|
|
2222
2655
|
[options.mappedDataKey]: res.data,
|
|
2223
2656
|
[options.lastModifiedDateKey]: res.lastModifiedDate,
|
|
2224
|
-
[options.resultsCount]: res[options.resultsCount]
|
|
2657
|
+
[options.resultsCount]: res[options.resultsCount]
|
|
2225
2658
|
});
|
|
2226
2659
|
res.onFinishFetching.next(result);
|
|
2227
2660
|
return result;
|
|
@@ -2342,14 +2775,14 @@ _CacheBaseService_fetchedItems = new WeakMap(), _CacheBaseService_instances = ne
|
|
|
2342
2775
|
DEFAULT_TTL_CONFIG.UNIT =
|
|
2343
2776
|
((_d = (_c = EnvManager.environment) === null || _c === void 0 ? void 0 : _c.cache) === null || _d === void 0 ? void 0 : _d.ttlUnit) || DEFAULT_TTL_CONFIG.UNIT;
|
|
2344
2777
|
DEFAULT_TTL_CONFIG.AUTO_CHECK =
|
|
2345
|
-
((_f = (_e = EnvManager.environment) === null || _e === void 0 ? void 0 : _e.cache) === null || _f === void 0 ? void 0 : _f.autoCheck) ==
|
|
2778
|
+
((_f = (_e = EnvManager.environment) === null || _e === void 0 ? void 0 : _e.cache) === null || _f === void 0 ? void 0 : _f.autoCheck) == 'YES';
|
|
2346
2779
|
DEFAULT_TTL_CONFIG.RETRY =
|
|
2347
2780
|
((_h = (_g = EnvManager.environment) === null || _g === void 0 ? void 0 : _g.cache) === null || _h === void 0 ? void 0 : _h.retry) || DEFAULT_TTL_CONFIG.RETRY;
|
|
2348
2781
|
}, _CacheBaseService_add1SecondToModifiedDate = function _CacheBaseService_add1SecondToModifiedDate(date) {
|
|
2349
2782
|
let newDate = new Date(date.getTime());
|
|
2350
2783
|
newDate.setSeconds(newDate.getSeconds() + 1);
|
|
2351
2784
|
return newDate;
|
|
2352
|
-
}, _CacheBaseService_clear = function _CacheBaseService_clear(userName, keyOrAll =
|
|
2785
|
+
}, _CacheBaseService_clear = function _CacheBaseService_clear(userName, keyOrAll = '') {
|
|
2353
2786
|
Object.keys(window.localStorage)
|
|
2354
2787
|
.filter((q) => q.startsWith(`${userName}__${DEFAULT_CACHE_OPTIONS.PREFIX}${keyOrAll}`))
|
|
2355
2788
|
.forEach((key) => {
|
|
@@ -2368,11 +2801,11 @@ _CacheBaseService_fetchedItems = new WeakMap(), _CacheBaseService_instances = ne
|
|
|
2368
2801
|
}, _CacheBaseService_setItemInMap = function _CacheBaseService_setItemInMap(key, val) {
|
|
2369
2802
|
const empty = {
|
|
2370
2803
|
data: [],
|
|
2371
|
-
firstFetchingDate:
|
|
2372
|
-
lastModifiedDate:
|
|
2804
|
+
firstFetchingDate: '',
|
|
2805
|
+
lastModifiedDate: '',
|
|
2373
2806
|
resultsCount: 0,
|
|
2374
2807
|
fetchingItemsFromTheServer: false,
|
|
2375
|
-
onFinishFetching: new Subject()
|
|
2808
|
+
onFinishFetching: new Subject()
|
|
2376
2809
|
};
|
|
2377
2810
|
let value = val ? val : empty;
|
|
2378
2811
|
__classPrivateFieldGet(this, _CacheBaseService_fetchedItems, "f")[key] = value;
|
|
@@ -2396,11 +2829,11 @@ _CacheBaseService_fetchedItems = new WeakMap(), _CacheBaseService_instances = ne
|
|
|
2396
2829
|
}
|
|
2397
2830
|
};
|
|
2398
2831
|
CacheBaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CacheBaseService, deps: [{ token: UserPreferencesService }, { token: UtilityService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2399
|
-
CacheBaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CacheBaseService, providedIn:
|
|
2832
|
+
CacheBaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CacheBaseService, providedIn: 'root' });
|
|
2400
2833
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CacheBaseService, decorators: [{
|
|
2401
2834
|
type: Injectable,
|
|
2402
2835
|
args: [{
|
|
2403
|
-
providedIn:
|
|
2836
|
+
providedIn: 'root'
|
|
2404
2837
|
}]
|
|
2405
2838
|
}], ctorParameters: function () { return [{ type: UserPreferencesService }, { type: UtilityService }]; } });
|
|
2406
2839
|
|
|
@@ -2457,7 +2890,7 @@ class BaseService extends HttpBaseService {
|
|
|
2457
2890
|
automation(operationOrOptions, input = undefined, params = undefined, context = undefined, headers = undefined, isCustomAutomation = false) {
|
|
2458
2891
|
var _a, _b, _c, _d;
|
|
2459
2892
|
let operation;
|
|
2460
|
-
if (typeof operationOrOptions ===
|
|
2893
|
+
if (typeof operationOrOptions === 'string') {
|
|
2461
2894
|
operation = operationOrOptions;
|
|
2462
2895
|
}
|
|
2463
2896
|
else {
|
|
@@ -2472,7 +2905,7 @@ class BaseService extends HttpBaseService {
|
|
|
2472
2905
|
return from(__classPrivateFieldGet(this, _BaseService_nuxeoService, "f").nuxeoClient
|
|
2473
2906
|
.operation(operation, Object.assign({}, (isCustomAutomation
|
|
2474
2907
|
? {
|
|
2475
|
-
url: `${this.environment.nuxeo}${this.environment.customAutomation}
|
|
2908
|
+
url: `${this.environment.nuxeo}${this.environment.customAutomation}`
|
|
2476
2909
|
}
|
|
2477
2910
|
: {})))
|
|
2478
2911
|
.input(input ? input : undefined)
|
|
@@ -2481,22 +2914,22 @@ class BaseService extends HttpBaseService {
|
|
|
2481
2914
|
.execute({ headers: headers ? Object.assign({}, headers) : undefined })).pipe(map((response) => response), this.catchErrors());
|
|
2482
2915
|
}
|
|
2483
2916
|
customAutomation(operationOrOptions, input = undefined, params = undefined, context = undefined, headers = undefined) {
|
|
2484
|
-
if (typeof operationOrOptions ==
|
|
2917
|
+
if (typeof operationOrOptions == 'object') {
|
|
2485
2918
|
operationOrOptions.isCustomAutomation = true;
|
|
2486
2919
|
}
|
|
2487
2920
|
return this.automation(operationOrOptions, input, params, context, headers, true);
|
|
2488
2921
|
}
|
|
2489
|
-
request(endpointOrOptions, queryParams = undefined, headers = undefined, payload = undefined, type =
|
|
2922
|
+
request(endpointOrOptions, queryParams = undefined, headers = undefined, payload = undefined, type = 'get') {
|
|
2490
2923
|
var _a, _b, _c, _d;
|
|
2491
2924
|
let endpoint;
|
|
2492
|
-
if (typeof endpointOrOptions ===
|
|
2925
|
+
if (typeof endpointOrOptions === 'string') {
|
|
2493
2926
|
endpoint = endpointOrOptions;
|
|
2494
2927
|
}
|
|
2495
2928
|
else {
|
|
2496
2929
|
const options = endpointOrOptions;
|
|
2497
2930
|
endpoint = options.endpoint;
|
|
2498
2931
|
queryParams = (_a = options.queryParams) !== null && _a !== void 0 ? _a : undefined;
|
|
2499
|
-
type = (_b = options.type) !== null && _b !== void 0 ? _b :
|
|
2932
|
+
type = (_b = options.type) !== null && _b !== void 0 ? _b : 'get';
|
|
2500
2933
|
headers = (_c = options.headers) !== null && _c !== void 0 ? _c : undefined;
|
|
2501
2934
|
payload = (_d = options.payload) !== null && _d !== void 0 ? _d : undefined;
|
|
2502
2935
|
}
|
|
@@ -2504,13 +2937,13 @@ class BaseService extends HttpBaseService {
|
|
|
2504
2937
|
.request(endpoint)
|
|
2505
2938
|
.queryParams(queryParams ? Object.assign({}, queryParams) : undefined)[type]({
|
|
2506
2939
|
headers: headers ? Object.assign({}, headers) : undefined,
|
|
2507
|
-
body: payload ? Object.assign({}, payload) : undefined
|
|
2940
|
+
body: payload ? Object.assign({}, payload) : undefined
|
|
2508
2941
|
})).pipe(map((response) => response), this.catchErrors());
|
|
2509
2942
|
}
|
|
2510
2943
|
query(pageProviderOrOptions, params = undefined, headers = undefined) {
|
|
2511
2944
|
var _a, _b;
|
|
2512
2945
|
let pageProvider;
|
|
2513
|
-
if (typeof pageProviderOrOptions ===
|
|
2946
|
+
if (typeof pageProviderOrOptions === 'string') {
|
|
2514
2947
|
pageProvider = pageProviderOrOptions;
|
|
2515
2948
|
}
|
|
2516
2949
|
else {
|
|
@@ -2521,7 +2954,7 @@ class BaseService extends HttpBaseService {
|
|
|
2521
2954
|
}
|
|
2522
2955
|
return __classPrivateFieldGet(this, _BaseService_callApiService, "f")
|
|
2523
2956
|
.query(Object.assign({ pageProvider }, (params ? params : {})), {
|
|
2524
|
-
headers: headers ? Object.assign({}, headers) : undefined
|
|
2957
|
+
headers: headers ? Object.assign({}, headers) : undefined
|
|
2525
2958
|
})
|
|
2526
2959
|
.pipe(map((response) => response), this.catchErrors());
|
|
2527
2960
|
}
|
|
@@ -2533,7 +2966,7 @@ class BaseService extends HttpBaseService {
|
|
|
2533
2966
|
return this.query({
|
|
2534
2967
|
pageProvider: options.pageProvider,
|
|
2535
2968
|
params: Object.assign(Object.assign({}, (options.params ? options.params : {})), (params ? params : {})),
|
|
2536
|
-
headers: options.headers
|
|
2969
|
+
headers: options.headers
|
|
2537
2970
|
});
|
|
2538
2971
|
};
|
|
2539
2972
|
return __classPrivateFieldGet(this, _BaseService_cacheBaseService, "f").startFetchingItems(Object.assign(Object.assign({}, options), { userName: this.userName, request: request }));
|
|
@@ -2545,7 +2978,7 @@ class BaseService extends HttpBaseService {
|
|
|
2545
2978
|
payload: options.payload,
|
|
2546
2979
|
params: Object.assign(Object.assign({}, (options.params ? options.params : {})), (params ? params : {})),
|
|
2547
2980
|
headers: options.headers,
|
|
2548
|
-
responseType: options.responseType
|
|
2981
|
+
responseType: options.responseType
|
|
2549
2982
|
});
|
|
2550
2983
|
};
|
|
2551
2984
|
return __classPrivateFieldGet(this, _BaseService_cacheBaseService, "f").startFetchingItems(Object.assign(Object.assign({}, options), { userName: this.userName, request: request }));
|
|
@@ -2572,10 +3005,10 @@ class BaseService extends HttpBaseService {
|
|
|
2572
3005
|
}
|
|
2573
3006
|
_BaseService_nuxeoService = new WeakMap(), _BaseService_callApiService = new WeakMap(), _BaseService_cacheBaseService = new WeakMap();
|
|
2574
3007
|
BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BaseService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2575
|
-
BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BaseService, providedIn:
|
|
3008
|
+
BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BaseService, providedIn: 'root' });
|
|
2576
3009
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: BaseService, decorators: [{
|
|
2577
3010
|
type: Injectable,
|
|
2578
|
-
args: [{ providedIn:
|
|
3011
|
+
args: [{ providedIn: 'root' }]
|
|
2579
3012
|
}], ctorParameters: function () { return [{ type: i0.Injector }]; } });
|
|
2580
3013
|
|
|
2581
3014
|
/**
|
|
@@ -2587,925 +3020,493 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
2587
3020
|
* <img [attr.src]="user.avatar | secure | async" />
|
|
2588
3021
|
* ~~~
|
|
2589
3022
|
* @title
|
|
2590
|
-
* Safe URL
|
|
2591
|
-
*/
|
|
2592
|
-
class SecurePipe {
|
|
2593
|
-
constructor(http, sanitizer) {
|
|
2594
|
-
this.http = http;
|
|
2595
|
-
this.sanitizer = sanitizer;
|
|
2596
|
-
}
|
|
2597
|
-
/**
|
|
2598
|
-
*
|
|
2599
|
-
* @param url Resource URL
|
|
2600
|
-
* @returns Safe URL
|
|
2601
|
-
*/
|
|
2602
|
-
transform(url) {
|
|
2603
|
-
return this.http
|
|
2604
|
-
.get(url, { responseType: 'blob' }).pipe(map(val => this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(val))));
|
|
2605
|
-
}
|
|
2606
|
-
}
|
|
2607
|
-
SecurePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SecurePipe, deps: [{ token: i1$2.HttpClient }, { token: i2$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2608
|
-
SecurePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SecurePipe, name: "secure" });
|
|
2609
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SecurePipe, decorators: [{
|
|
2610
|
-
type: Pipe,
|
|
2611
|
-
args: [{
|
|
2612
|
-
name: 'secure'
|
|
2613
|
-
}]
|
|
2614
|
-
}], ctorParameters: function () { return [{ type: i1$2.HttpClient }, { type: i2$3.DomSanitizer }]; } });
|
|
2615
|
-
|
|
2616
|
-
/**
|
|
2617
|
-
* A component to display user avatar if exists, or initials if not
|
|
2618
|
-
*
|
|
2619
|
-
*  
|
|
2620
|
-
* @title
|
|
2621
|
-
* User Avatar
|
|
2622
|
-
* @example
|
|
2623
|
-
*
|
|
2624
|
-
* <cts-avatar [user]="user"></cts-avatar>
|
|
2625
|
-
*/
|
|
2626
|
-
class AvatarComponent {
|
|
2627
|
-
constructor() { }
|
|
2628
|
-
ngOnInit() {
|
|
2629
|
-
var _a, _b, _c, _d;
|
|
2630
|
-
this.stringToHslColor(`${(_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.firstName} ${(_d = (_c = this.user) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.lastName}`, 30, 80);
|
|
2631
|
-
}
|
|
2632
|
-
stringToHslColor(str, s, l) {
|
|
2633
|
-
var hash = 0;
|
|
2634
|
-
for (var i = 0; i < str.length; i++) {
|
|
2635
|
-
hash = str.charCodeAt(i) + ((hash << 5) - hash);
|
|
2636
|
-
}
|
|
2637
|
-
var h = hash % 360;
|
|
2638
|
-
this.backgroundColor = 'hsl(' + h + ', ' + s + '%, ' + l + '%)';
|
|
2639
|
-
}
|
|
2640
|
-
getInitials() {
|
|
2641
|
-
var _a;
|
|
2642
|
-
return ((_a = this.user) === null || _a === void 0 ? void 0 : _a.properties)
|
|
2643
|
-
? (this.user.properties.initials = [
|
|
2644
|
-
this.user.properties.firstName
|
|
2645
|
-
? this.user.properties.firstName[0].toUpperCase()
|
|
2646
|
-
: '',
|
|
2647
|
-
this.user.properties.lastName
|
|
2648
|
-
? this.user.properties.lastName[0].toUpperCase()
|
|
2649
|
-
: '',
|
|
2650
|
-
].join(''))
|
|
2651
|
-
: '';
|
|
2652
|
-
}
|
|
2653
|
-
}
|
|
2654
|
-
AvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2655
|
-
AvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AvatarComponent, selector: "cts-avatar", inputs: { user: "user" }, ngImport: i0, template: "<div class=\"avatar-wrapper\">\r\n <ng-container *ngIf=\"user?.avatar?.length; else initials\">\r\n <img *ngIf=\"user.avatar | secure | async as obs; else initials\" [attr.src]=\"obs\" alt=\"user image\" />\r\n </ng-container>\r\n\r\n <ng-template #initials>\r\n <div class=\"avatar-name \" [ngStyle]=\"{ 'background-color': backgroundColor }\">\r\n <span>{{\r\n this.getInitials()\r\n }}</span>\r\n </div>\r\n </ng-template>\r\n</div>\r\n", styles: [".avatar-wrapper{width:100%;height:100%;border-radius:100%;overflow:hidden}.avatar-wrapper img{width:100%;height:100%;object-fit:cover}.avatar-wrapper .avatar-name{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.avatar-wrapper .avatar-name span{font-size:16px;font-weight:bold;color:#fff}.avatar-out-container{width:50px;height:50px;border-radius:50%;overflow:hidden;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}\n"], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4$1.AsyncPipe, "secure": SecurePipe } });
|
|
2656
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
2657
|
-
type: Component,
|
|
2658
|
-
args: [{
|
|
2659
|
-
selector: 'cts-avatar',
|
|
2660
|
-
templateUrl: './avatar.component.html',
|
|
2661
|
-
styleUrls: ['./avatar.component.scss']
|
|
2662
|
-
}]
|
|
2663
|
-
}], ctorParameters: function () { return []; }, propDecorators: { user: [{
|
|
2664
|
-
type: Input
|
|
2665
|
-
}] } });
|
|
2666
|
-
|
|
2667
|
-
/**
|
|
2668
|
-
* Transforms date to localized date string
|
|
2669
|
-
*
|
|
2670
|
-
* ### In template example:
|
|
2671
|
-
* ~~~html
|
|
2672
|
-
* <!-- in template -->
|
|
2673
|
-
* <p>
|
|
2674
|
-
* {{ dateObject | localizedDate: "EEEE, MMMM dd, yyyy" }}
|
|
2675
|
-
* </p>
|
|
2676
|
-
* ~~~
|
|
2677
|
-
* @title
|
|
2678
|
-
* Localized Date
|
|
2679
|
-
*
|
|
2680
|
-
* @example
|
|
2681
|
-
* ...
|
|
2682
|
-
* constructor(... private LocalizedDatePipe: localizedDatePipe ...){
|
|
2683
|
-
* const localizedDateString = this.localizedDatePipe.transform(dateObject, 'EEEE, MMMM dd, yyyy');
|
|
2684
|
-
* }
|
|
2685
|
-
* ...
|
|
2686
|
-
*/
|
|
2687
|
-
class LocalizedDatePipe {
|
|
2688
|
-
constructor(userPreferenceService) {
|
|
2689
|
-
this.userPreferenceService = userPreferenceService;
|
|
2690
|
-
this.defaultLocale = LocalizedDatePipe.DEFAULT_LOCALE;
|
|
2691
|
-
this.defaultFormat = LocalizedDatePipe.DEFAULT_DATE_FORMAT;
|
|
2692
|
-
this.onDestroy$ = new Subject();
|
|
2693
|
-
if (this.userPreferenceService) {
|
|
2694
|
-
this.userPreferenceService
|
|
2695
|
-
.select(UserPreferenceValues.Locale)
|
|
2696
|
-
.pipe(takeUntil(this.onDestroy$))
|
|
2697
|
-
.subscribe(locale => {
|
|
2698
|
-
if (locale) {
|
|
2699
|
-
this.defaultLocale = locale;
|
|
2700
|
-
}
|
|
2701
|
-
});
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
/**
|
|
2705
|
-
*
|
|
2706
|
-
* @param value date object
|
|
2707
|
-
* @param format format
|
|
2708
|
-
* @param locale locale to convert to
|
|
2709
|
-
* @returns localized date string
|
|
2710
|
-
*/
|
|
2711
|
-
transform(value, format, locale) {
|
|
2712
|
-
try {
|
|
2713
|
-
const actualFormat = format || this.defaultFormat;
|
|
2714
|
-
const actualLocale = locale || this.defaultLocale;
|
|
2715
|
-
const datePipe = new DatePipe(actualLocale);
|
|
2716
|
-
return datePipe.transform(value, actualFormat, 'GMT+3');
|
|
2717
|
-
}
|
|
2718
|
-
catch (e) {
|
|
2719
|
-
console.warn(e);
|
|
2720
|
-
return value;
|
|
2721
|
-
}
|
|
2722
|
-
}
|
|
2723
|
-
/** @ignore */
|
|
2724
|
-
ngOnDestroy() {
|
|
2725
|
-
this.onDestroy$.next(true);
|
|
2726
|
-
this.onDestroy$.complete();
|
|
2727
|
-
}
|
|
2728
|
-
}
|
|
2729
|
-
LocalizedDatePipe.DEFAULT_LOCALE = 'en-US';
|
|
2730
|
-
LocalizedDatePipe.DEFAULT_DATE_FORMAT = 'dd MMMM yyyy hh:mm a';
|
|
2731
|
-
LocalizedDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizedDatePipe, deps: [{ token: UserPreferencesService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2732
|
-
LocalizedDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizedDatePipe, name: "localizedDate", pure: false });
|
|
2733
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizedDatePipe, decorators: [{
|
|
2734
|
-
type: Pipe,
|
|
2735
|
-
args: [{
|
|
2736
|
-
name: 'localizedDate',
|
|
2737
|
-
pure: false
|
|
2738
|
-
}]
|
|
2739
|
-
}], ctorParameters: function () { return [{ type: UserPreferencesService }]; } });
|
|
2740
|
-
|
|
2741
|
-
/**
|
|
2742
|
-
* Transforms html string into safe html to be rendered in the view
|
|
2743
|
-
*
|
|
2744
|
-
* ### In template example:
|
|
2745
|
-
* ~~~html
|
|
2746
|
-
* <!-- in template -->
|
|
2747
|
-
* <span [innerHTML]="htmlString | safeHtml"></span>
|
|
2748
|
-
* ~~~
|
|
2749
|
-
* @title
|
|
2750
|
-
* Safe HTML
|
|
2751
|
-
*/
|
|
2752
|
-
class SafeHtmlPipe {
|
|
2753
|
-
constructor(sanitized) {
|
|
2754
|
-
this.sanitized = sanitized;
|
|
2755
|
-
}
|
|
2756
|
-
/**
|
|
2757
|
-
*
|
|
2758
|
-
* @param value HTML String
|
|
2759
|
-
* @returns Safe HTML
|
|
2760
|
-
*/
|
|
2761
|
-
transform(value) {
|
|
2762
|
-
return this.sanitized.bypassSecurityTrustHtml(value);
|
|
2763
|
-
}
|
|
2764
|
-
}
|
|
2765
|
-
SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i2$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2766
|
-
SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
|
|
2767
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
2768
|
-
type: Pipe,
|
|
2769
|
-
args: [{ name: 'safeHtml' }]
|
|
2770
|
-
}], ctorParameters: function () { return [{ type: i2$3.DomSanitizer }]; } });
|
|
2771
|
-
|
|
2772
|
-
/**
|
|
2773
|
-
* Converts date into how long time ago string
|
|
2774
|
-
*
|
|
2775
|
-
* ### In template example:
|
|
2776
|
-
* ~~~html
|
|
2777
|
-
* <!-- in template -->
|
|
2778
|
-
* <span>{{ dateObject | timeAgo }}</span>
|
|
2779
|
-
* ~~~
|
|
2780
|
-
* @title
|
|
2781
|
-
* Time Ago
|
|
2782
|
-
*/
|
|
2783
|
-
class TimeAgoPipe {
|
|
2784
|
-
constructor(userPreferenceService) {
|
|
2785
|
-
this.userPreferenceService = userPreferenceService;
|
|
2786
|
-
this.onDestroy$ = new Subject();
|
|
2787
|
-
this.userPreferenceService
|
|
2788
|
-
.select(UserPreferenceValues.Locale)
|
|
2789
|
-
.pipe(takeUntil(this.onDestroy$))
|
|
2790
|
-
.subscribe(locale => {
|
|
2791
|
-
this.defaultLocale = locale || TimeAgoPipe.DEFAULT_LOCALE;
|
|
2792
|
-
});
|
|
2793
|
-
this.defaultDateTimeFormat = TimeAgoPipe.DEFAULT_DATE_TIME_FORMAT;
|
|
2794
|
-
}
|
|
2795
|
-
/**
|
|
2796
|
-
*
|
|
2797
|
-
* @param value date object
|
|
2798
|
-
* @param locale locale to be transformed to
|
|
2799
|
-
* @returns Time ago string (15 minutes ago)
|
|
2800
|
-
*/
|
|
2801
|
-
transform(value, locale) {
|
|
2802
|
-
if (value !== null && value !== undefined) {
|
|
2803
|
-
const actualLocale = locale || this.defaultLocale;
|
|
2804
|
-
const then = moment$5(value);
|
|
2805
|
-
//const diff = moment().locale(actualLocale).diff(then, 'days');
|
|
2806
|
-
return then.locale(actualLocale).fromNow();
|
|
2807
|
-
// if ( diff > 7) {
|
|
2808
|
-
// const datePipe: DatePipe = new DatePipe(actualLocale);
|
|
2809
|
-
// return datePipe.transform(value, this.defaultDateTimeFormat);
|
|
2810
|
-
// } else {
|
|
2811
|
-
// return then.locale(actualLocale).fromNow();
|
|
2812
|
-
// }
|
|
2813
|
-
}
|
|
2814
|
-
return '';
|
|
2815
|
-
}
|
|
2816
|
-
/** @ignore */
|
|
2817
|
-
ngOnDestroy() {
|
|
2818
|
-
this.onDestroy$.next(true);
|
|
2819
|
-
this.onDestroy$.complete();
|
|
2820
|
-
}
|
|
2821
|
-
}
|
|
2822
|
-
TimeAgoPipe.DEFAULT_LOCALE = 'en-US';
|
|
2823
|
-
TimeAgoPipe.DEFAULT_DATE_TIME_FORMAT = 'dd/MM/yyyy HH:mm';
|
|
2824
|
-
TimeAgoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TimeAgoPipe, deps: [{ token: UserPreferencesService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2825
|
-
TimeAgoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TimeAgoPipe, name: "timeAgo" });
|
|
2826
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TimeAgoPipe, decorators: [{
|
|
2827
|
-
type: Pipe,
|
|
2828
|
-
args: [{
|
|
2829
|
-
name: 'timeAgo'
|
|
2830
|
-
}]
|
|
2831
|
-
}], ctorParameters: function () { return [{ type: UserPreferencesService }]; } });
|
|
2832
|
-
|
|
2833
|
-
/**
|
|
2834
|
-
* Transforms array of strings to single string seperated with seperator
|
|
2835
|
-
*
|
|
2836
|
-
* ### In template example:
|
|
2837
|
-
* ~~~html
|
|
2838
|
-
* <!-- in template -->
|
|
2839
|
-
* <p>{{ ['string 1','string 2', 'string 3'] | multiValue : {valueSeparator:', '}}}</p>
|
|
2840
|
-
* ~~~
|
|
2841
|
-
* @title
|
|
2842
|
-
* Multi Value
|
|
2843
|
-
*
|
|
2844
|
-
* @example
|
|
2845
|
-
* ...
|
|
2846
|
-
* constructor(... private MultiValuePipe: multiValuePipe ...){
|
|
2847
|
-
* const MultiValueString = this.multiValuePipe.transform(['string 1','string 2', 'string 3'], ', ');
|
|
2848
|
-
* }
|
|
2849
|
-
* ...
|
|
3023
|
+
* Safe URL
|
|
2850
3024
|
*/
|
|
2851
|
-
class
|
|
3025
|
+
class SecurePipe {
|
|
3026
|
+
constructor(http, sanitizer) {
|
|
3027
|
+
this.http = http;
|
|
3028
|
+
this.sanitizer = sanitizer;
|
|
3029
|
+
}
|
|
2852
3030
|
/**
|
|
2853
3031
|
*
|
|
2854
|
-
* @param
|
|
2855
|
-
* @
|
|
2856
|
-
* @returns the joining of all array items seperated with seperator
|
|
3032
|
+
* @param url Resource URL
|
|
3033
|
+
* @returns Safe URL
|
|
2857
3034
|
*/
|
|
2858
|
-
transform(
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
}
|
|
2862
|
-
return values;
|
|
3035
|
+
transform(url) {
|
|
3036
|
+
return this.http
|
|
3037
|
+
.get(url, { responseType: 'blob' }).pipe(map(val => this.sanitizer.bypassSecurityTrustUrl(URL.createObjectURL(val))));
|
|
2863
3038
|
}
|
|
2864
3039
|
}
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MultiValuePipe, decorators: [{
|
|
3040
|
+
SecurePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SecurePipe, deps: [{ token: i1$2.HttpClient }, { token: i2$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3041
|
+
SecurePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SecurePipe, name: "secure" });
|
|
3042
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SecurePipe, decorators: [{
|
|
2869
3043
|
type: Pipe,
|
|
2870
|
-
args: [{
|
|
2871
|
-
|
|
3044
|
+
args: [{
|
|
3045
|
+
name: 'secure'
|
|
3046
|
+
}]
|
|
3047
|
+
}], ctorParameters: function () { return [{ type: i1$2.HttpClient }, { type: i2$3.DomSanitizer }]; } });
|
|
2872
3048
|
|
|
2873
3049
|
/**
|
|
2874
|
-
*
|
|
3050
|
+
* A component to display user avatar if exists, or initials if not
|
|
2875
3051
|
*
|
|
2876
|
-
*
|
|
2877
|
-
* ~~~html
|
|
2878
|
-
* <!-- in template -->
|
|
2879
|
-
* <p>{{ file.sizeInBytes | FileSize}}</p>
|
|
2880
|
-
* ~~~
|
|
3052
|
+
*  
|
|
2881
3053
|
* @title
|
|
2882
|
-
*
|
|
2883
|
-
*
|
|
3054
|
+
* User Avatar
|
|
2884
3055
|
* @example
|
|
2885
|
-
*
|
|
2886
|
-
*
|
|
2887
|
-
* const sizeString = this.fileSizePiple.transform(sizeInBytes);
|
|
2888
|
-
* }
|
|
2889
|
-
* ...
|
|
3056
|
+
*
|
|
3057
|
+
* <cts-avatar [user]="user"></cts-avatar>
|
|
2890
3058
|
*/
|
|
2891
|
-
class
|
|
2892
|
-
constructor(
|
|
2893
|
-
|
|
3059
|
+
class AvatarComponent {
|
|
3060
|
+
constructor() { }
|
|
3061
|
+
ngOnInit() {
|
|
3062
|
+
var _a, _b, _c, _d;
|
|
3063
|
+
this.stringToHslColor(`${(_b = (_a = this.user) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.firstName} ${(_d = (_c = this.user) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.lastName}`, 30, 80);
|
|
2894
3064
|
}
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
* @returns translated size string
|
|
2900
|
-
*/
|
|
2901
|
-
transform(paramByte, decimals = 2) {
|
|
2902
|
-
if (paramByte == null) {
|
|
2903
|
-
return '';
|
|
2904
|
-
}
|
|
2905
|
-
const bytes = parseInt(paramByte, 10);
|
|
2906
|
-
if (isNaN(bytes)) {
|
|
2907
|
-
return '';
|
|
2908
|
-
}
|
|
2909
|
-
if (bytes === 0) {
|
|
2910
|
-
return '0 ' + this.translation.instant('FILE_SIZE.BYTES');
|
|
3065
|
+
stringToHslColor(str, s, l) {
|
|
3066
|
+
var hash = 0;
|
|
3067
|
+
for (var i = 0; i < str.length; i++) {
|
|
3068
|
+
hash = str.charCodeAt(i) + ((hash << 5) - hash);
|
|
2911
3069
|
}
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
3070
|
+
var h = hash % 360;
|
|
3071
|
+
this.backgroundColor = 'hsl(' + h + ', ' + s + '%, ' + l + '%)';
|
|
3072
|
+
}
|
|
3073
|
+
getInitials() {
|
|
3074
|
+
var _a;
|
|
3075
|
+
return ((_a = this.user) === null || _a === void 0 ? void 0 : _a.properties)
|
|
3076
|
+
? (this.user.properties.initials = [
|
|
3077
|
+
this.user.properties.firstName
|
|
3078
|
+
? this.user.properties.firstName[0].toUpperCase()
|
|
3079
|
+
: '',
|
|
3080
|
+
this.user.properties.lastName
|
|
3081
|
+
? this.user.properties.lastName[0].toUpperCase()
|
|
3082
|
+
: '',
|
|
3083
|
+
].join(''))
|
|
3084
|
+
: '';
|
|
2915
3085
|
}
|
|
2916
3086
|
}
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type:
|
|
2920
|
-
type:
|
|
3087
|
+
AvatarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3088
|
+
AvatarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: AvatarComponent, selector: "cts-avatar", inputs: { user: "user" }, ngImport: i0, template: "<div class=\"avatar-wrapper\">\r\n <ng-container *ngIf=\"user?.avatar?.length; else initials\">\r\n <img *ngIf=\"user.avatar | secure | async as obs; else initials\" [attr.src]=\"obs\" alt=\"user image\" />\r\n </ng-container>\r\n\r\n <ng-template #initials>\r\n <div class=\"avatar-name \" [ngStyle]=\"{ 'background-color': backgroundColor }\">\r\n <span>{{\r\n this.getInitials()\r\n }}</span>\r\n </div>\r\n </ng-template>\r\n</div>\r\n", styles: [".avatar-wrapper{width:100%;height:100%;border-radius:100%;overflow:hidden}.avatar-wrapper img{width:100%;height:100%;object-fit:cover}.avatar-wrapper .avatar-name{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.avatar-wrapper .avatar-name span{font-size:16px;font-weight:bold;color:#fff}.avatar-out-container{width:50px;height:50px;border-radius:50%;overflow:hidden;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}\n"], directives: [{ type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], pipes: { "async": i4$1.AsyncPipe, "secure": SecurePipe } });
|
|
3089
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarComponent, decorators: [{
|
|
3090
|
+
type: Component,
|
|
2921
3091
|
args: [{
|
|
2922
|
-
|
|
2923
|
-
|
|
3092
|
+
selector: 'cts-avatar',
|
|
3093
|
+
templateUrl: './avatar.component.html',
|
|
3094
|
+
styleUrls: ['./avatar.component.scss']
|
|
2924
3095
|
}]
|
|
2925
|
-
}], ctorParameters: function () { return [
|
|
3096
|
+
}], ctorParameters: function () { return []; }, propDecorators: { user: [{
|
|
3097
|
+
type: Input
|
|
3098
|
+
}] } });
|
|
2926
3099
|
|
|
2927
3100
|
/**
|
|
2928
|
-
* Transforms
|
|
3101
|
+
* Transforms date to localized date string
|
|
2929
3102
|
*
|
|
2930
3103
|
* ### In template example:
|
|
2931
3104
|
* ~~~html
|
|
2932
3105
|
* <!-- in template -->
|
|
2933
|
-
* <p>
|
|
3106
|
+
* <p>
|
|
3107
|
+
* {{ dateObject | localizedDate: "EEEE, MMMM dd, yyyy" }}
|
|
3108
|
+
* </p>
|
|
2934
3109
|
* ~~~
|
|
2935
3110
|
* @title
|
|
2936
|
-
*
|
|
3111
|
+
* Localized Date
|
|
2937
3112
|
*
|
|
2938
3113
|
* @example
|
|
2939
3114
|
* ...
|
|
2940
|
-
* constructor(... private
|
|
2941
|
-
* const
|
|
3115
|
+
* constructor(... private LocalizedDatePipe: localizedDatePipe ...){
|
|
3116
|
+
* const localizedDateString = this.localizedDatePipe.transform(dateObject, 'EEEE, MMMM dd, yyyy');
|
|
2942
3117
|
* }
|
|
2943
3118
|
* ...
|
|
2944
3119
|
*/
|
|
2945
|
-
class
|
|
2946
|
-
constructor() {
|
|
2947
|
-
this.
|
|
3120
|
+
class LocalizedDatePipe {
|
|
3121
|
+
constructor(userPreferenceService) {
|
|
3122
|
+
this.userPreferenceService = userPreferenceService;
|
|
3123
|
+
this.defaultLocale = LocalizedDatePipe.DEFAULT_LOCALE;
|
|
3124
|
+
this.defaultFormat = LocalizedDatePipe.DEFAULT_DATE_FORMAT;
|
|
3125
|
+
this.onDestroy$ = new Subject();
|
|
3126
|
+
if (this.userPreferenceService) {
|
|
3127
|
+
this.userPreferenceService
|
|
3128
|
+
.select(UserPreferenceValues.Locale)
|
|
3129
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
3130
|
+
.subscribe(locale => {
|
|
3131
|
+
if (locale) {
|
|
3132
|
+
this.defaultLocale = locale;
|
|
3133
|
+
}
|
|
3134
|
+
});
|
|
3135
|
+
}
|
|
2948
3136
|
}
|
|
2949
3137
|
/**
|
|
2950
3138
|
*
|
|
2951
|
-
* @param value
|
|
2952
|
-
* @param format
|
|
2953
|
-
* @
|
|
3139
|
+
* @param value date object
|
|
3140
|
+
* @param format format
|
|
3141
|
+
* @param locale locale to convert to
|
|
3142
|
+
* @returns localized date string
|
|
2954
3143
|
*/
|
|
2955
|
-
transform(value, format) {
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
* @title
|
|
2972
|
-
* Pipes Module
|
|
2973
|
-
*/
|
|
2974
|
-
class PipesModule {
|
|
2975
|
-
}
|
|
2976
|
-
PipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2977
|
-
PipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PipesModule, declarations: [SecurePipe, LocalizedDatePipe, SafeHtmlPipe, TimeAgoPipe, MultiValuePipe, FileSizePipe, HijriDatePipe], imports: [CommonModule], exports: [SecurePipe, LocalizedDatePipe, SafeHtmlPipe, TimeAgoPipe, MultiValuePipe, FileSizePipe, HijriDatePipe] });
|
|
2978
|
-
PipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PipesModule, providers: [TimeAgoPipe, MultiValuePipe], imports: [[CommonModule]] });
|
|
2979
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PipesModule, decorators: [{
|
|
2980
|
-
type: NgModule,
|
|
2981
|
-
args: [{
|
|
2982
|
-
declarations: [SecurePipe, LocalizedDatePipe, SafeHtmlPipe, TimeAgoPipe, MultiValuePipe, FileSizePipe, HijriDatePipe],
|
|
2983
|
-
imports: [CommonModule],
|
|
2984
|
-
exports: [SecurePipe, LocalizedDatePipe, SafeHtmlPipe, TimeAgoPipe, MultiValuePipe, FileSizePipe, HijriDatePipe],
|
|
2985
|
-
providers: [TimeAgoPipe, MultiValuePipe],
|
|
2986
|
-
}]
|
|
2987
|
-
}] });
|
|
2988
|
-
|
|
2989
|
-
/**
|
|
2990
|
-
* @title
|
|
2991
|
-
* Avatar Module
|
|
2992
|
-
*/
|
|
2993
|
-
class AvatarModule {
|
|
2994
|
-
}
|
|
2995
|
-
AvatarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2996
|
-
AvatarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarModule, declarations: [AvatarComponent], imports: [CommonModule,
|
|
2997
|
-
PipesModule], exports: [AvatarComponent] });
|
|
2998
|
-
AvatarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarModule, imports: [[
|
|
2999
|
-
CommonModule,
|
|
3000
|
-
PipesModule
|
|
3001
|
-
]] });
|
|
3002
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarModule, decorators: [{
|
|
3003
|
-
type: NgModule,
|
|
3004
|
-
args: [{
|
|
3005
|
-
declarations: [AvatarComponent],
|
|
3006
|
-
imports: [
|
|
3007
|
-
CommonModule,
|
|
3008
|
-
PipesModule
|
|
3009
|
-
],
|
|
3010
|
-
exports: [
|
|
3011
|
-
AvatarComponent
|
|
3012
|
-
]
|
|
3013
|
-
}]
|
|
3014
|
-
}] });
|
|
3015
|
-
|
|
3016
|
-
/**
|
|
3017
|
-
* A reusable card component to display various types of contents
|
|
3018
|
-
*
|
|
3019
|
-
* 
|
|
3020
|
-
* @title
|
|
3021
|
-
* Card
|
|
3022
|
-
* @example
|
|
3023
|
-
*
|
|
3024
|
-
* <app-card>
|
|
3025
|
-
* <h3 class="title">
|
|
3026
|
-
* Card title
|
|
3027
|
-
* </h3>
|
|
3028
|
-
* <div class="my-toolbar">
|
|
3029
|
-
* <button class="btn-primary"> Action Button </button>
|
|
3030
|
-
* </div>
|
|
3031
|
-
* <div class="body">
|
|
3032
|
-
* </div>
|
|
3033
|
-
* </app-card>
|
|
3034
|
-
*/
|
|
3035
|
-
class CardComponent {
|
|
3036
|
-
/** enable/disable shadow */
|
|
3037
|
-
constructor() {
|
|
3038
|
-
/** card has no body */
|
|
3039
|
-
this.noBody = false;
|
|
3040
|
-
/** is card dark */
|
|
3041
|
-
this.dark = false;
|
|
3144
|
+
transform(value, format, locale) {
|
|
3145
|
+
try {
|
|
3146
|
+
const actualFormat = format || this.defaultFormat;
|
|
3147
|
+
const actualLocale = locale || this.defaultLocale;
|
|
3148
|
+
const datePipe = new DatePipe(actualLocale);
|
|
3149
|
+
return datePipe.transform(value, actualFormat, 'GMT+3');
|
|
3150
|
+
}
|
|
3151
|
+
catch (e) {
|
|
3152
|
+
console.warn(e);
|
|
3153
|
+
return value;
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
/** @ignore */
|
|
3157
|
+
ngOnDestroy() {
|
|
3158
|
+
this.onDestroy$.next(true);
|
|
3159
|
+
this.onDestroy$.complete();
|
|
3042
3160
|
}
|
|
3043
|
-
ngOnInit() { }
|
|
3044
3161
|
}
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
i0.ɵɵ
|
|
3048
|
-
|
|
3162
|
+
LocalizedDatePipe.DEFAULT_LOCALE = 'en-US';
|
|
3163
|
+
LocalizedDatePipe.DEFAULT_DATE_FORMAT = 'dd MMMM yyyy hh:mm a';
|
|
3164
|
+
LocalizedDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizedDatePipe, deps: [{ token: UserPreferencesService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3165
|
+
LocalizedDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizedDatePipe, name: "localizedDate", pure: false });
|
|
3166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: LocalizedDatePipe, decorators: [{
|
|
3167
|
+
type: Pipe,
|
|
3049
3168
|
args: [{
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
styleUrls: ['./card.component.scss'],
|
|
3053
|
-
encapsulation: ViewEncapsulation.None,
|
|
3169
|
+
name: 'localizedDate',
|
|
3170
|
+
pure: false
|
|
3054
3171
|
}]
|
|
3055
|
-
}], ctorParameters: function () { return []; }
|
|
3056
|
-
type: Input
|
|
3057
|
-
}], dark: [{
|
|
3058
|
-
type: Input
|
|
3059
|
-
}] } });
|
|
3172
|
+
}], ctorParameters: function () { return [{ type: UserPreferencesService }]; } });
|
|
3060
3173
|
|
|
3061
3174
|
/**
|
|
3175
|
+
* Transforms html string into safe html to be rendered in the view
|
|
3176
|
+
*
|
|
3177
|
+
* ### In template example:
|
|
3178
|
+
* ~~~html
|
|
3179
|
+
* <!-- in template -->
|
|
3180
|
+
* <span [innerHTML]="htmlString | safeHtml"></span>
|
|
3181
|
+
* ~~~
|
|
3062
3182
|
* @title
|
|
3063
|
-
*
|
|
3183
|
+
* Safe HTML
|
|
3064
3184
|
*/
|
|
3065
|
-
class
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
CardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CardModule, declarations: [CardComponent], imports: [CommonModule], exports: [CardComponent] });
|
|
3069
|
-
CardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CardModule, providers: [], imports: [[CommonModule]] });
|
|
3070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CardModule, decorators: [{
|
|
3071
|
-
type: NgModule,
|
|
3072
|
-
args: [{
|
|
3073
|
-
declarations: [CardComponent],
|
|
3074
|
-
imports: [CommonModule],
|
|
3075
|
-
exports: [CardComponent],
|
|
3076
|
-
providers: [],
|
|
3077
|
-
}]
|
|
3078
|
-
}] });
|
|
3079
|
-
|
|
3080
|
-
/** @ignore */
|
|
3081
|
-
class ClickOutsideDirective {
|
|
3082
|
-
constructor(elementRef) {
|
|
3083
|
-
this.elementRef = elementRef;
|
|
3084
|
-
this.clickOutside = new EventEmitter();
|
|
3085
|
-
}
|
|
3086
|
-
onClick(target) {
|
|
3087
|
-
const clickedInside = this.elementRef.nativeElement.contains(target);
|
|
3088
|
-
if (!clickedInside) {
|
|
3089
|
-
this.clickOutside.emit(target);
|
|
3090
|
-
}
|
|
3091
|
-
}
|
|
3092
|
-
}
|
|
3093
|
-
ClickOutsideDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
3094
|
-
ClickOutsideDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: ClickOutsideDirective, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, host: { listeners: { "window:click": "onClick($event.target)" } }, ngImport: i0 });
|
|
3095
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: ClickOutsideDirective, decorators: [{
|
|
3096
|
-
type: Directive,
|
|
3097
|
-
args: [{
|
|
3098
|
-
selector: '[clickOutside]'
|
|
3099
|
-
}]
|
|
3100
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { clickOutside: [{
|
|
3101
|
-
type: Output
|
|
3102
|
-
}], onClick: [{
|
|
3103
|
-
type: HostListener,
|
|
3104
|
-
args: ['window:click', ['$event.target']]
|
|
3105
|
-
}] } });
|
|
3106
|
-
|
|
3107
|
-
/** @ignore */
|
|
3108
|
-
class SetRtlDirective {
|
|
3109
|
-
constructor(elRef, renderer, translation) {
|
|
3110
|
-
this.elRef = elRef;
|
|
3111
|
-
this.renderer = renderer;
|
|
3112
|
-
this.translation = translation;
|
|
3113
|
-
this.switchClassBasedOnLanguage();
|
|
3185
|
+
class SafeHtmlPipe {
|
|
3186
|
+
constructor(sanitized) {
|
|
3187
|
+
this.sanitized = sanitized;
|
|
3114
3188
|
}
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3189
|
+
/**
|
|
3190
|
+
*
|
|
3191
|
+
* @param value HTML String
|
|
3192
|
+
* @returns Safe HTML
|
|
3193
|
+
*/
|
|
3194
|
+
transform(value) {
|
|
3195
|
+
return this.sanitized.bypassSecurityTrustHtml(value);
|
|
3122
3196
|
}
|
|
3123
3197
|
}
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type:
|
|
3127
|
-
type:
|
|
3128
|
-
args: [{
|
|
3129
|
-
|
|
3130
|
-
}]
|
|
3131
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: TranslationService }]; } });
|
|
3198
|
+
SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i2$3.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3199
|
+
SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
|
|
3200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: SafeHtmlPipe, decorators: [{
|
|
3201
|
+
type: Pipe,
|
|
3202
|
+
args: [{ name: 'safeHtml' }]
|
|
3203
|
+
}], ctorParameters: function () { return [{ type: i2$3.DomSanitizer }]; } });
|
|
3132
3204
|
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
this.
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
});
|
|
3154
|
-
// tslint:disable-next-line:member-ordering
|
|
3155
|
-
this.evaluators = {
|
|
3156
|
-
AND: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3157
|
-
if (!args || args.length === 0) {
|
|
3158
|
-
return false;
|
|
3159
|
-
}
|
|
3160
|
-
return yield this.asyncEvery(args, (arg) => __awaiter(this, void 0, void 0, function* () {
|
|
3161
|
-
const evaluator = yield context.getEvaluator(arg.value);
|
|
3162
|
-
if (!evaluator) {
|
|
3163
|
-
console.warn("evaluator not found: " + arg.value);
|
|
3164
|
-
return false;
|
|
3165
|
-
}
|
|
3166
|
-
return yield evaluator(context, arg.parameters || []);
|
|
3167
|
-
}));
|
|
3168
|
-
}),
|
|
3169
|
-
OR: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3170
|
-
if (!args || args.length === 0) {
|
|
3171
|
-
return false;
|
|
3172
|
-
}
|
|
3173
|
-
return yield this.asyncSome(args, (arg) => __awaiter(this, void 0, void 0, function* () {
|
|
3174
|
-
const evaluator = yield context.getEvaluator(arg.value);
|
|
3175
|
-
if (!evaluator) {
|
|
3176
|
-
console.warn("evaluator not found: " + arg.value);
|
|
3177
|
-
return false;
|
|
3178
|
-
}
|
|
3179
|
-
const res = yield evaluator(context, arg.parameters || []);
|
|
3180
|
-
return res;
|
|
3181
|
-
}));
|
|
3182
|
-
}),
|
|
3183
|
-
isStatus: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3184
|
-
if (args.indexOf(context.entity.state) > -1) {
|
|
3185
|
-
return true;
|
|
3186
|
-
}
|
|
3187
|
-
else {
|
|
3188
|
-
return false;
|
|
3189
|
-
}
|
|
3190
|
-
}),
|
|
3191
|
-
isCreator: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3192
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
3193
|
-
//check if user loged in is the creator of that corresp
|
|
3194
|
-
let owner;
|
|
3195
|
-
if ((_b = (_a = context.entity.properties.owner) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.username) {
|
|
3196
|
-
owner = (_d = (_c = context.entity.properties.owner) === null || _c === void 0 ? void 0 : _c.properties) === null || _d === void 0 ? void 0 : _d.username;
|
|
3197
|
-
}
|
|
3198
|
-
else if ((_f = (_e = context.entity.properties["corr:owner"]) === null || _e === void 0 ? void 0 : _e.properties) === null || _f === void 0 ? void 0 : _f.username) {
|
|
3199
|
-
owner = (_h = (_g = context.entity.properties["corr:owner"]) === null || _g === void 0 ? void 0 : _g.properties) === null || _h === void 0 ? void 0 : _h.username;
|
|
3200
|
-
}
|
|
3201
|
-
else if (context.entity.properties.owner) {
|
|
3202
|
-
owner = context.entity.properties.owner;
|
|
3203
|
-
}
|
|
3204
|
-
else if (context.entity.properties["corr:owner"]) {
|
|
3205
|
-
owner = context.entity.properties["corr:owner"];
|
|
3206
|
-
}
|
|
3207
|
-
if (owner === context.user.properties.username) {
|
|
3208
|
-
return true;
|
|
3209
|
-
}
|
|
3210
|
-
else {
|
|
3211
|
-
return false;
|
|
3212
|
-
}
|
|
3213
|
-
}),
|
|
3214
|
-
isUserInrole: (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3215
|
-
const result = yield this.nuxeoService
|
|
3216
|
-
.isUserInRole(args, "")
|
|
3217
|
-
.pipe(first())
|
|
3218
|
-
.toPromise();
|
|
3219
|
-
return result;
|
|
3220
|
-
}),
|
|
3221
|
-
};
|
|
3222
|
-
this.getEvaluator = (key) => __awaiter(this, void 0, void 0, function* () {
|
|
3223
|
-
const eva = this.evaluators;
|
|
3224
|
-
if (key && key.startsWith("!")) {
|
|
3225
|
-
const fn = eva[key.substring(1)];
|
|
3226
|
-
return (context, args) => __awaiter(this, void 0, void 0, function* () {
|
|
3227
|
-
const result = yield fn(context, ...args);
|
|
3228
|
-
return !result;
|
|
3229
|
-
});
|
|
3230
|
-
}
|
|
3231
|
-
return eva[key];
|
|
3232
|
-
});
|
|
3233
|
-
this.appConfigService.configLoaded.subscribe((ready) => {
|
|
3234
|
-
if (ready) {
|
|
3235
|
-
this.conditions = this.getAllRules();
|
|
3236
|
-
}
|
|
3237
|
-
});
|
|
3238
|
-
}
|
|
3239
|
-
setEvaluators(evaluators) {
|
|
3240
|
-
this.evaluators = Object.assign(Object.assign({}, this.evaluators), evaluators);
|
|
3241
|
-
}
|
|
3242
|
-
getEvaluators() {
|
|
3243
|
-
return this.evaluators;
|
|
3244
|
-
}
|
|
3245
|
-
// ----------------------------------------------------
|
|
3246
|
-
evaluateRule(ruleId, context) {
|
|
3247
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
3248
|
-
const ruleRef = this.getRuleById(ruleId);
|
|
3249
|
-
context = context || this.context;
|
|
3250
|
-
context["getEvaluator"] = this.getEvaluator;
|
|
3251
|
-
if (ruleRef) {
|
|
3252
|
-
const evaluator = yield this.getEvaluator(ruleRef.type);
|
|
3253
|
-
if (evaluator) {
|
|
3254
|
-
return yield evaluator(context, ruleRef.parameters);
|
|
3255
|
-
}
|
|
3256
|
-
}
|
|
3257
|
-
else {
|
|
3258
|
-
const evaluator = yield this.getEvaluator(ruleId);
|
|
3259
|
-
if (evaluator) {
|
|
3260
|
-
return yield evaluator(context);
|
|
3261
|
-
}
|
|
3262
|
-
}
|
|
3205
|
+
/**
|
|
3206
|
+
* Converts date into how long time ago string
|
|
3207
|
+
*
|
|
3208
|
+
* ### In template example:
|
|
3209
|
+
* ~~~html
|
|
3210
|
+
* <!-- in template -->
|
|
3211
|
+
* <span>{{ dateObject | timeAgo }}</span>
|
|
3212
|
+
* ~~~
|
|
3213
|
+
* @title
|
|
3214
|
+
* Time Ago
|
|
3215
|
+
*/
|
|
3216
|
+
class TimeAgoPipe {
|
|
3217
|
+
constructor(userPreferenceService) {
|
|
3218
|
+
this.userPreferenceService = userPreferenceService;
|
|
3219
|
+
this.onDestroy$ = new Subject();
|
|
3220
|
+
this.userPreferenceService
|
|
3221
|
+
.select(UserPreferenceValues.Locale)
|
|
3222
|
+
.pipe(takeUntil(this.onDestroy$))
|
|
3223
|
+
.subscribe(locale => {
|
|
3224
|
+
this.defaultLocale = locale || TimeAgoPipe.DEFAULT_LOCALE;
|
|
3263
3225
|
});
|
|
3226
|
+
this.defaultDateTimeFormat = TimeAgoPipe.DEFAULT_DATE_TIME_FORMAT;
|
|
3264
3227
|
}
|
|
3265
|
-
|
|
3266
|
-
|
|
3228
|
+
/**
|
|
3229
|
+
*
|
|
3230
|
+
* @param value date object
|
|
3231
|
+
* @param locale locale to be transformed to
|
|
3232
|
+
* @returns Time ago string (15 minutes ago)
|
|
3233
|
+
*/
|
|
3234
|
+
transform(value, locale) {
|
|
3235
|
+
if (value !== null && value !== undefined) {
|
|
3236
|
+
const actualLocale = locale || this.defaultLocale;
|
|
3237
|
+
const then = moment$5(value);
|
|
3238
|
+
//const diff = moment().locale(actualLocale).diff(then, 'days');
|
|
3239
|
+
return then.locale(actualLocale).fromNow();
|
|
3240
|
+
// if ( diff > 7) {
|
|
3241
|
+
// const datePipe: DatePipe = new DatePipe(actualLocale);
|
|
3242
|
+
// return datePipe.transform(value, this.defaultDateTimeFormat);
|
|
3243
|
+
// } else {
|
|
3244
|
+
// return then.locale(actualLocale).fromNow();
|
|
3245
|
+
// }
|
|
3246
|
+
}
|
|
3247
|
+
return '';
|
|
3267
3248
|
}
|
|
3268
|
-
|
|
3269
|
-
|
|
3249
|
+
/** @ignore */
|
|
3250
|
+
ngOnDestroy() {
|
|
3251
|
+
this.onDestroy$.next(true);
|
|
3252
|
+
this.onDestroy$.complete();
|
|
3270
3253
|
}
|
|
3271
3254
|
}
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
i0.ɵɵ
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3255
|
+
TimeAgoPipe.DEFAULT_LOCALE = 'en-US';
|
|
3256
|
+
TimeAgoPipe.DEFAULT_DATE_TIME_FORMAT = 'dd/MM/yyyy HH:mm';
|
|
3257
|
+
TimeAgoPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TimeAgoPipe, deps: [{ token: UserPreferencesService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3258
|
+
TimeAgoPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TimeAgoPipe, name: "timeAgo" });
|
|
3259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: TimeAgoPipe, decorators: [{
|
|
3260
|
+
type: Pipe,
|
|
3261
|
+
args: [{
|
|
3262
|
+
name: 'timeAgo'
|
|
3263
|
+
}]
|
|
3264
|
+
}], ctorParameters: function () { return [{ type: UserPreferencesService }]; } });
|
|
3278
3265
|
|
|
3279
3266
|
/**
|
|
3280
|
-
*
|
|
3281
|
-
*
|
|
3282
|
-
*
|
|
3283
|
-
*
|
|
3284
|
-
*
|
|
3267
|
+
* Transforms array of strings to single string seperated with seperator
|
|
3268
|
+
*
|
|
3269
|
+
* ### In template example:
|
|
3270
|
+
* ~~~html
|
|
3271
|
+
* <!-- in template -->
|
|
3272
|
+
* <p>{{ ['string 1','string 2', 'string 3'] | multiValue : {valueSeparator:', '}}}</p>
|
|
3273
|
+
* ~~~
|
|
3274
|
+
* @title
|
|
3275
|
+
* Multi Value
|
|
3276
|
+
*
|
|
3285
3277
|
* @example
|
|
3286
|
-
*
|
|
3287
|
-
*
|
|
3288
|
-
*
|
|
3289
|
-
*
|
|
3290
|
-
*
|
|
3291
|
-
|
|
3278
|
+
* ...
|
|
3279
|
+
* constructor(... private MultiValuePipe: multiValuePipe ...){
|
|
3280
|
+
* const MultiValueString = this.multiValuePipe.transform(['string 1','string 2', 'string 3'], ', ');
|
|
3281
|
+
* }
|
|
3282
|
+
* ...
|
|
3283
|
+
*/
|
|
3284
|
+
class MultiValuePipe {
|
|
3285
|
+
/**
|
|
3286
|
+
*
|
|
3287
|
+
* @param values array of strings
|
|
3288
|
+
* @param valueSeparator seperator to place between elements
|
|
3289
|
+
* @returns the joining of all array items seperated with seperator
|
|
3290
|
+
*/
|
|
3291
|
+
transform(values, valueSeparator = MultiValuePipe.DEFAULT_SEPARATOR) {
|
|
3292
|
+
if (values && values instanceof Array) {
|
|
3293
|
+
return values.join(valueSeparator);
|
|
3294
|
+
}
|
|
3295
|
+
return values;
|
|
3296
|
+
}
|
|
3297
|
+
}
|
|
3298
|
+
MultiValuePipe.DEFAULT_SEPARATOR = ', ';
|
|
3299
|
+
MultiValuePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MultiValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3300
|
+
MultiValuePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MultiValuePipe, name: "multiValue" });
|
|
3301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: MultiValuePipe, decorators: [{
|
|
3302
|
+
type: Pipe,
|
|
3303
|
+
args: [{ name: 'multiValue' }]
|
|
3304
|
+
}] });
|
|
3305
|
+
|
|
3306
|
+
/**
|
|
3307
|
+
* transforms file size into translated appropriate units
|
|
3308
|
+
*
|
|
3309
|
+
* ### In template example:
|
|
3310
|
+
* ~~~html
|
|
3311
|
+
* <!-- in template -->
|
|
3312
|
+
* <p>{{ file.sizeInBytes | FileSize}}</p>
|
|
3313
|
+
* ~~~
|
|
3292
3314
|
* @title
|
|
3293
|
-
*
|
|
3315
|
+
* File Size
|
|
3316
|
+
*
|
|
3317
|
+
* @example
|
|
3318
|
+
* ...
|
|
3319
|
+
* constructor(... private FileSizePipe: fileSizePiple ...){
|
|
3320
|
+
* const sizeString = this.fileSizePiple.transform(sizeInBytes);
|
|
3321
|
+
* }
|
|
3322
|
+
* ...
|
|
3294
3323
|
*/
|
|
3295
|
-
class
|
|
3296
|
-
constructor(
|
|
3297
|
-
this.
|
|
3298
|
-
this.eltRef = eltRef;
|
|
3299
|
-
this.viewContainerRef = viewContainerRef;
|
|
3300
|
-
this.templateRef = templateRef;
|
|
3301
|
-
this.appConfigService = appConfigService;
|
|
3302
|
-
this.evaluatorsService = evaluatorsService;
|
|
3303
|
-
this.isVisible = false;
|
|
3304
|
-
this.context = { entity: null, getEvaluator: null, user: null };
|
|
3324
|
+
class FileSizePipe {
|
|
3325
|
+
constructor(translation) {
|
|
3326
|
+
this.translation = translation;
|
|
3305
3327
|
}
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3328
|
+
/**
|
|
3329
|
+
*
|
|
3330
|
+
* @param paramByte Size in Bytes
|
|
3331
|
+
* @optional @param decimals Decimals to show
|
|
3332
|
+
* @returns translated size string
|
|
3333
|
+
*/
|
|
3334
|
+
transform(paramByte, decimals = 2) {
|
|
3335
|
+
if (paramByte == null) {
|
|
3336
|
+
return '';
|
|
3313
3337
|
}
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
this.isVisible = true;
|
|
3321
|
-
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
3322
|
-
}
|
|
3323
|
-
}
|
|
3324
|
-
else {
|
|
3325
|
-
this.isVisible = false;
|
|
3326
|
-
this.viewContainerRef.clear();
|
|
3327
|
-
}
|
|
3328
|
-
});
|
|
3338
|
+
const bytes = parseInt(paramByte, 10);
|
|
3339
|
+
if (isNaN(bytes)) {
|
|
3340
|
+
return '';
|
|
3341
|
+
}
|
|
3342
|
+
if (bytes === 0) {
|
|
3343
|
+
return '0 ' + this.translation.instant('FILE_SIZE.BYTES');
|
|
3329
3344
|
}
|
|
3345
|
+
const k = 1024, dm = decimals || 2, sizes = ['BYTES', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
3346
|
+
const i18nSize = this.translation.instant(`FILE_SIZE.${sizes[i]}`);
|
|
3347
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + i18nSize;
|
|
3330
3348
|
}
|
|
3331
3349
|
}
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type:
|
|
3335
|
-
type:
|
|
3350
|
+
FileSizePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: FileSizePipe, deps: [{ token: TranslationService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3351
|
+
FileSizePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: FileSizePipe, name: "FileSize", pure: false });
|
|
3352
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: FileSizePipe, decorators: [{
|
|
3353
|
+
type: Pipe,
|
|
3336
3354
|
args: [{
|
|
3337
|
-
|
|
3355
|
+
name: 'FileSize',
|
|
3356
|
+
pure: false
|
|
3338
3357
|
}]
|
|
3339
|
-
}], ctorParameters: function () { return [{ type:
|
|
3340
|
-
type: Input
|
|
3341
|
-
}] } });
|
|
3358
|
+
}], ctorParameters: function () { return [{ type: TranslationService }]; } });
|
|
3342
3359
|
|
|
3343
|
-
/**
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3360
|
+
/**
|
|
3361
|
+
* Transforms and formats date into hijri
|
|
3362
|
+
*
|
|
3363
|
+
* ### In template example:
|
|
3364
|
+
* ~~~html
|
|
3365
|
+
* <!-- in template -->
|
|
3366
|
+
* <p>{{ dateObject | hijriDate : {format:'iYYYY iMMMM iD'}}}</p>
|
|
3367
|
+
* ~~~
|
|
3368
|
+
* @title
|
|
3369
|
+
* Hijri Date
|
|
3370
|
+
*
|
|
3371
|
+
* @example
|
|
3372
|
+
* ...
|
|
3373
|
+
* constructor(... private HijriDatePipe: hijriDatePipe ...){
|
|
3374
|
+
* const formattedHijriDate = this.hijriDatePipe.transform(dateObject, 'iYYYY iMMMM iD');
|
|
3375
|
+
* }
|
|
3376
|
+
* ...
|
|
3377
|
+
*/
|
|
3378
|
+
class HijriDatePipe {
|
|
3379
|
+
constructor() {
|
|
3380
|
+
this.defaultFormat = "iYYYY iMMMM iD";
|
|
3350
3381
|
}
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3382
|
+
/**
|
|
3383
|
+
*
|
|
3384
|
+
* @param value Date object
|
|
3385
|
+
* @param format Format
|
|
3386
|
+
* @returns formatted hijri date string
|
|
3387
|
+
*/
|
|
3388
|
+
transform(value, format) {
|
|
3389
|
+
const actualFormat = format || this.defaultFormat;
|
|
3390
|
+
const m = moment_(value, 'iYYYY/iM/iD'); // Parse a Hijri date.
|
|
3391
|
+
return m.format("iD iMMMM iYYYY");
|
|
3357
3392
|
}
|
|
3358
3393
|
}
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type:
|
|
3362
|
-
type:
|
|
3394
|
+
HijriDatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: HijriDatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
3395
|
+
HijriDatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: HijriDatePipe, name: "hijriDate" });
|
|
3396
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: HijriDatePipe, decorators: [{
|
|
3397
|
+
type: Pipe,
|
|
3398
|
+
args: [{
|
|
3399
|
+
name: 'hijriDate'
|
|
3400
|
+
}]
|
|
3401
|
+
}] });
|
|
3402
|
+
|
|
3403
|
+
/**
|
|
3404
|
+
* @title
|
|
3405
|
+
* Pipes Module
|
|
3406
|
+
*/
|
|
3407
|
+
class PipesModule {
|
|
3408
|
+
}
|
|
3409
|
+
PipesModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PipesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3410
|
+
PipesModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PipesModule, declarations: [SecurePipe, LocalizedDatePipe, SafeHtmlPipe, TimeAgoPipe, MultiValuePipe, FileSizePipe, HijriDatePipe], imports: [CommonModule], exports: [SecurePipe, LocalizedDatePipe, SafeHtmlPipe, TimeAgoPipe, MultiValuePipe, FileSizePipe, HijriDatePipe] });
|
|
3411
|
+
PipesModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PipesModule, providers: [TimeAgoPipe, MultiValuePipe], imports: [[CommonModule]] });
|
|
3412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PipesModule, decorators: [{
|
|
3413
|
+
type: NgModule,
|
|
3363
3414
|
args: [{
|
|
3364
|
-
|
|
3415
|
+
declarations: [SecurePipe, LocalizedDatePipe, SafeHtmlPipe, TimeAgoPipe, MultiValuePipe, FileSizePipe, HijriDatePipe],
|
|
3416
|
+
imports: [CommonModule],
|
|
3417
|
+
exports: [SecurePipe, LocalizedDatePipe, SafeHtmlPipe, TimeAgoPipe, MultiValuePipe, FileSizePipe, HijriDatePipe],
|
|
3418
|
+
providers: [TimeAgoPipe, MultiValuePipe],
|
|
3365
3419
|
}]
|
|
3366
|
-
}]
|
|
3420
|
+
}] });
|
|
3367
3421
|
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
this.stop$ = new Subject();
|
|
3374
|
-
this.isVisible = false;
|
|
3375
|
-
}
|
|
3376
|
-
ngOnInit() {
|
|
3377
|
-
var _a;
|
|
3378
|
-
if ((_a = this.appHasRole) === null || _a === void 0 ? void 0 : _a.role) {
|
|
3379
|
-
this.nuxeoService.isUserInRole(this.appHasRole.role, this.appHasRole.code).subscribe(data => {
|
|
3380
|
-
if (data || !this.appHasRole) {
|
|
3381
|
-
// If it is already visible (which can happen if
|
|
3382
|
-
// his roles changed) we do not need to add it a second time
|
|
3383
|
-
if (!this.isVisible) {
|
|
3384
|
-
// We update the `isVisible` property and add the
|
|
3385
|
-
// templateRef to the view using the
|
|
3386
|
-
// 'createEmbeddedView' method of the viewContainerRef
|
|
3387
|
-
this.isVisible = true;
|
|
3388
|
-
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
3389
|
-
}
|
|
3390
|
-
}
|
|
3391
|
-
else {
|
|
3392
|
-
// If the user does not have the role,
|
|
3393
|
-
// we update the `isVisible` property and clear
|
|
3394
|
-
// the contents of the viewContainerRef
|
|
3395
|
-
this.isVisible = false;
|
|
3396
|
-
this.viewContainerRef.clear();
|
|
3397
|
-
}
|
|
3398
|
-
});
|
|
3399
|
-
}
|
|
3400
|
-
else {
|
|
3401
|
-
if (!this.isVisible) {
|
|
3402
|
-
// We update the `isVisible` property and add the
|
|
3403
|
-
// templateRef to the view using the
|
|
3404
|
-
// 'createEmbeddedView' method of the viewContainerRef
|
|
3405
|
-
this.isVisible = true;
|
|
3406
|
-
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
3407
|
-
}
|
|
3408
|
-
}
|
|
3409
|
-
}
|
|
3410
|
-
ngOnChanges() {
|
|
3411
|
-
this.ngOnInit();
|
|
3412
|
-
}
|
|
3422
|
+
/**
|
|
3423
|
+
* @title
|
|
3424
|
+
* Avatar Module
|
|
3425
|
+
*/
|
|
3426
|
+
class AvatarModule {
|
|
3413
3427
|
}
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3428
|
+
AvatarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3429
|
+
AvatarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarModule, declarations: [AvatarComponent], imports: [CommonModule,
|
|
3430
|
+
PipesModule], exports: [AvatarComponent] });
|
|
3431
|
+
AvatarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarModule, imports: [[
|
|
3432
|
+
CommonModule,
|
|
3433
|
+
PipesModule
|
|
3434
|
+
]] });
|
|
3435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: AvatarModule, decorators: [{
|
|
3436
|
+
type: NgModule,
|
|
3418
3437
|
args: [{
|
|
3419
|
-
|
|
3438
|
+
declarations: [AvatarComponent],
|
|
3439
|
+
imports: [
|
|
3440
|
+
CommonModule,
|
|
3441
|
+
PipesModule
|
|
3442
|
+
],
|
|
3443
|
+
exports: [
|
|
3444
|
+
AvatarComponent
|
|
3445
|
+
]
|
|
3420
3446
|
}]
|
|
3421
|
-
}]
|
|
3422
|
-
type: Input
|
|
3423
|
-
}] } });
|
|
3447
|
+
}] });
|
|
3424
3448
|
|
|
3425
|
-
|
|
3449
|
+
/**
|
|
3450
|
+
* A reusable card component to display various types of contents
|
|
3451
|
+
*
|
|
3452
|
+
* 
|
|
3453
|
+
* @title
|
|
3454
|
+
* Card
|
|
3455
|
+
* @example
|
|
3456
|
+
*
|
|
3457
|
+
* <app-card>
|
|
3458
|
+
* <h3 class="title">
|
|
3459
|
+
* Card title
|
|
3460
|
+
* </h3>
|
|
3461
|
+
* <div class="my-toolbar">
|
|
3462
|
+
* <button class="btn-primary"> Action Button </button>
|
|
3463
|
+
* </div>
|
|
3464
|
+
* <div class="body">
|
|
3465
|
+
* </div>
|
|
3466
|
+
* </app-card>
|
|
3467
|
+
*/
|
|
3468
|
+
class CardComponent {
|
|
3469
|
+
/** enable/disable shadow */
|
|
3426
3470
|
constructor() {
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
evt.stopPropagation();
|
|
3432
|
-
}
|
|
3433
|
-
onDragLeave(evt) {
|
|
3434
|
-
evt.preventDefault();
|
|
3435
|
-
evt.stopPropagation();
|
|
3436
|
-
}
|
|
3437
|
-
onDrop(evt) {
|
|
3438
|
-
let files = [];
|
|
3439
|
-
evt.preventDefault();
|
|
3440
|
-
evt.stopPropagation();
|
|
3441
|
-
if (evt.dataTransfer.files.length) {
|
|
3442
|
-
for (const file of evt.dataTransfer.files) {
|
|
3443
|
-
files.push(file);
|
|
3444
|
-
}
|
|
3445
|
-
this.fileDroped.emit(files);
|
|
3446
|
-
}
|
|
3471
|
+
/** card has no body */
|
|
3472
|
+
this.noBody = false;
|
|
3473
|
+
/** is card dark */
|
|
3474
|
+
this.dark = false;
|
|
3447
3475
|
}
|
|
3476
|
+
ngOnInit() { }
|
|
3448
3477
|
}
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type:
|
|
3452
|
-
type:
|
|
3478
|
+
CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3479
|
+
CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: CardComponent, selector: "app-card", inputs: { noBody: "noBody", dark: "dark" }, ngImport: i0, template: "<div\r\n class=\"app-card\"\r\n [ngClass]=\"{\r\n 'dark-app-card ': dark\r\n }\"\r\n>\r\n <div class=\"card-inner\">\r\n <div\r\n [ngClass]=\"{\r\n hidden: title.childNodes.length == 0 && toolbar.childNodes.length == 0\r\n }\"\r\n class=\"card-title\"\r\n >\r\n <div class=\"title-padder\">\r\n <!-- title Area -->\r\n <span #title>\r\n <ng-content select=\".title\"></ng-content>\r\n </span>\r\n <!-- toolbar Area -->\r\n <div class=\"my-toolbar\" #toolbar>\r\n <ng-content select=\".my-toolbar\"></ng-content>\r\n </div>\r\n </div>\r\n </div>\r\n <!-- body area -->\r\n <div class=\"card-body\" *ngIf=\"!noBody\">\r\n <ng-content select=\".body\"></ng-content>\r\n </div>\r\n <div class=\"no-items\">\r\n <p class=\"message\">\r\n <ng-content select=\".no-content\"></ng-content>\r\n </p>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".bi{margin:0!important}.memo-sorting-wrapper{width:265px;margin:0 10px;height:100%;display:flex}.memo-sorting-wrapper .sorting-direction{width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer}.memo-sorting-wrapper .memo-sorting-trigger{width:calc(100% - 65px);height:100%;background-color:transparent;border:1px solid lightgrey;display:flex;justify-content:space-between;align-items:center;padding:0 15px;font-size:14px}.memo-sorting-wrapper .memo-sorting-trigger i{font-size:16px;color:gray}.memo-sorting-menu{width:200px}.my-button{border:1px solid #465573;color:#465573;border-radius:5px;background-color:transparent;font-weight:bold;min-width:80px;height:40px}.my-button.reset{border:none}.my-button:hover{color:#fff;background-color:#465573}.my-button:hover.reset{color:#465573;border:1px solid #465573;background-color:#fff}.app-property-value .app-input-wrapper label{color:#646f85;font-size:13px;margin-bottom:5px}.app-property-value .app-input-wrapper label .text-danger{font-size:16px;line-height:14px;margin:0 5px!important}.app-property-value .app-input-wrapper .form-control{border:1px solid #ccc;border-radius:5px;background-color:#8f98aa1a;height:40px}.app-property-value .app-input-wrapper .form-control:disabled{background-color:#e9ecef!important}.app-property-value .app-input-wrapper .form-control:focus{border:1px solid #1a96c6;box-shadow:0 0 4px #79c3c26b!important}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers{list-style:none;padding:0;margin:0;font-size:14px}.app-property-value .app-input-wrapper .app-textitem-editable-error .error-containers .error{margin-top:5px}.autocomplete-container .input-container input:focus,hijri-gregorian-datepicker .form-group .input-group .form-control:focus,.ng-select.ng-select-focused .ng-select-container{border:1px solid #1a96c6!important;box-shadow:0 0 4px #79c3c26b!important}input::placeholder{font-size:12px}.form-control:focus{box-shadow:none!important}.mat-stepper-horizontal{margin-top:-25px}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header.cdk-program-focused{background-color:transparent}.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-icon-selected{background-color:transparent;color:#fff;background-image:linear-gradient(to right,#0dbab5,#1a96c6)}@media only screen and (max-width: 576px){.mat-stepper-horizontal .mat-horizontal-stepper-header-container .mat-step-header .mat-step-label .mat-step-text-label{white-space:pre-wrap;overflow:visible}}.mat-stepper-horizontal .mat-horizontal-content-container{overflow:visible}@media only screen and (max-width: 768px){.mat-stepper-horizontal .mat-horizontal-content-container{padding:0 0 24px}}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:after,.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:before{display:none}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:first-child:before{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);left:0}.mat-stepper-horizontal.rtl .mat-horizontal-stepper-header:last-child:after{border-top-width:1px;border-top-style:solid;content:\"\";display:inline-block;height:0;position:absolute;width:calc(50% - 20px);right:0}.form-wrapper{padding:30px 15px;border:1px solid #dde0e2}.form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.form-wrapper .buttons-wrapper button:hover{opacity:.7}.form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.form-wrapper .upload-wrapper button span{margin:0 10px}.renameFileComponent .form-wrapper{padding:30px 15px;border:none!important}.renameFileComponent .form-wrapper .buttons-wrapper{display:flex;justify-content:space-between}.renameFileComponent .form-wrapper .buttons-wrapper .action-buttons-wrapper{display:flex}.renameFileComponent .form-wrapper .buttons-wrapper button{background-image:linear-gradient(to right,#0dbab5,#1a96c6);height:40px;color:#fff;border:none;width:125px;margin-top:20px;border-radius:5px}.renameFileComponent .form-wrapper .buttons-wrapper button:disabled{opacity:.4;cursor:not-allowed}.renameFileComponent .form-wrapper .buttons-wrapper button:hover{opacity:.7}.renameFileComponent .form-wrapper .upload-wrapper{display:flex;flex-direction:column;justify-content:flex-end}.renameFileComponent .form-wrapper .upload-wrapper label{color:#8f98aa;font-size:14px}.renameFileComponent .form-wrapper .upload-wrapper button{padding:10px;border:1px solid lightgray}.renameFileComponent .form-wrapper .upload-wrapper button span{margin:0 10px}.my-dynamic-viewer{display:flex;align-items:center;font-size:12px;min-height:30px}.my-dynamic-viewer .my-label{font-size:12px;font-weight:500;width:150px;word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-label{width:50%}}.my-dynamic-viewer .my-value{width:calc(100% - 150px);word-break:break-word}@media (max-width: 992px){.my-dynamic-viewer .my-value{width:50%}}.my-dynamic-viewer .direction-img{font-size:14px}.my-dynamic-viewer .direction-img .incoming{display:none}.my-dynamic-viewer .direction-img .outgoing{display:none}.my-dynamic-viewer .direction-img .internal{display:none}.my-dynamic-viewer.draft .my-value{color:#596973}.my-dynamic-viewer.inProgress .my-value{color:#3c3cf0}.my-dynamic-viewer.registered .my-value{color:#4f008c}.my-dynamic-viewer.archived .my-value{color:#fbb62c}.my-dynamic-viewer.closed .my-value{color:#00dca5}.my-dynamic-viewer.approved .my-value{color:#06a57e}.my-dynamic-viewer.assigned .my-value{color:#fd6670}.my-dynamic-viewer.sent .my-value{color:#3c3cf0}.my-dynamic-viewer.published .my-value{color:#00dca5}.my-dynamic-viewer.Outgoing .my-value{display:flex}.my-dynamic-viewer.Outgoing .my-value .direction-img .outgoing{color:#fbb62c;margin:1px 5px;display:flex}.my-dynamic-viewer.Outgoing .my-value .text{margin:0 5px}.my-dynamic-viewer.Internal .my-value{display:flex}.my-dynamic-viewer.Internal .my-value .direction-img .internal{color:#3c3cf0;margin:1px 5px;display:flex}.my-dynamic-viewer.Internal .my-value .text{margin:0 5px}.my-dynamic-viewer.Incoming .my-value{display:flex}.my-dynamic-viewer.Incoming .my-value .direction-img .incoming{color:#00dca5;display:flex}.my-dynamic-viewer.Incoming .my-value .text{margin:-3px 5px 0}.my-dynamic-viewer.vertical{display:block}.my-dynamic-viewer.vertical .my-label{width:auto}.my-dynamic-viewer.vertical .my-value{width:auto}.my-dynamic-viewer.with-out-label{width:100%!important}.app-card{border-radius:5px;display:flex;flex-direction:column;background:#ffffff;position:relative;padding:24px 0 0}.app-card .card-inner{display:flex;flex-direction:column}.card-title{height:auto;border:0px solid;border-color:#465573;color:#465573;border-inline-start-width:8px}.card-title h1,.card-title h2,.card-title h3,.card-title h4,.card-title h5,.card-title h6,.card-title span,.card-title p{font-size:18px}.title-padder{padding:0 24px;display:flex;align-items:center;justify-content:space-between}.dark-app-card{background:#465573}.dark-app-card .card-title{border-color:#fff;color:#fff}.my-toolbar{display:flex}.my-toolbar .add-button{border-radius:5px;width:65px;height:40px;background-color:#465573;color:#fff;font-size:20px;display:flex;justify-content:center;align-items:center}.my-toolbar .add-button .icon{font-size:30px;font-weight:bold}.my-toolbar .add-button .edit{font-size:25px}.no-items{display:flex;justify-content:center}.no-items .message{text-align:center;color:#b4bac6;font-size:20px}\n"], directives: [{ type: i4$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
3480
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CardComponent, decorators: [{
|
|
3481
|
+
type: Component,
|
|
3453
3482
|
args: [{
|
|
3454
|
-
selector: '
|
|
3483
|
+
selector: 'app-card',
|
|
3484
|
+
templateUrl: './card.component.html',
|
|
3485
|
+
styleUrls: ['./card.component.scss'],
|
|
3486
|
+
encapsulation: ViewEncapsulation.None,
|
|
3455
3487
|
}]
|
|
3456
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
3457
|
-
type:
|
|
3458
|
-
}],
|
|
3459
|
-
type:
|
|
3460
|
-
args: ['dragover', ['$event']]
|
|
3461
|
-
}], onDragLeave: [{
|
|
3462
|
-
type: HostListener,
|
|
3463
|
-
args: ['dragleave', ['$event']]
|
|
3464
|
-
}], onDrop: [{
|
|
3465
|
-
type: HostListener,
|
|
3466
|
-
args: ['drop', ['$event']]
|
|
3488
|
+
}], ctorParameters: function () { return []; }, propDecorators: { noBody: [{
|
|
3489
|
+
type: Input
|
|
3490
|
+
}], dark: [{
|
|
3491
|
+
type: Input
|
|
3467
3492
|
}] } });
|
|
3468
3493
|
|
|
3469
3494
|
/**
|
|
3470
3495
|
* @title
|
|
3471
|
-
*
|
|
3496
|
+
* Card Module
|
|
3472
3497
|
*/
|
|
3473
|
-
class
|
|
3498
|
+
class CardModule {
|
|
3474
3499
|
}
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
SetDirRtlDirective,
|
|
3480
|
-
AppHasRoleDirective,
|
|
3481
|
-
DragAndDropDirective], imports: [CommonModule], exports: [ClickOutsideDirective,
|
|
3482
|
-
SetRtlDirective,
|
|
3483
|
-
PermissionsDirective,
|
|
3484
|
-
SetDirRtlDirective,
|
|
3485
|
-
AppHasRoleDirective,
|
|
3486
|
-
DragAndDropDirective] });
|
|
3487
|
-
DirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DirectiveModule, providers: [], imports: [[CommonModule]] });
|
|
3488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DirectiveModule, decorators: [{
|
|
3500
|
+
CardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3501
|
+
CardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CardModule, declarations: [CardComponent], imports: [CommonModule], exports: [CardComponent] });
|
|
3502
|
+
CardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CardModule, providers: [], imports: [[CommonModule]] });
|
|
3503
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: CardModule, decorators: [{
|
|
3489
3504
|
type: NgModule,
|
|
3490
3505
|
args: [{
|
|
3491
|
-
declarations: [
|
|
3492
|
-
ClickOutsideDirective,
|
|
3493
|
-
SetRtlDirective,
|
|
3494
|
-
PermissionsDirective,
|
|
3495
|
-
SetDirRtlDirective,
|
|
3496
|
-
AppHasRoleDirective,
|
|
3497
|
-
DragAndDropDirective
|
|
3498
|
-
],
|
|
3506
|
+
declarations: [CardComponent],
|
|
3499
3507
|
imports: [CommonModule],
|
|
3500
|
-
exports: [
|
|
3501
|
-
|
|
3502
|
-
SetRtlDirective,
|
|
3503
|
-
PermissionsDirective,
|
|
3504
|
-
SetDirRtlDirective,
|
|
3505
|
-
AppHasRoleDirective,
|
|
3506
|
-
DragAndDropDirective
|
|
3507
|
-
],
|
|
3508
|
-
providers: []
|
|
3508
|
+
exports: [CardComponent],
|
|
3509
|
+
providers: [],
|
|
3509
3510
|
}]
|
|
3510
3511
|
}] });
|
|
3511
3512
|
|
|
@@ -28544,54 +28545,6 @@ const createDiagramEditor = (container, injector, config) => __awaiter(void 0, v
|
|
|
28544
28545
|
};
|
|
28545
28546
|
});
|
|
28546
28547
|
|
|
28547
|
-
function serializePort(port) {
|
|
28548
|
-
return {
|
|
28549
|
-
id: port.id,
|
|
28550
|
-
label: port.label,
|
|
28551
|
-
socket: {
|
|
28552
|
-
name: port.socket.name,
|
|
28553
|
-
},
|
|
28554
|
-
};
|
|
28555
|
-
}
|
|
28556
|
-
function serializeControl(control) {
|
|
28557
|
-
if (control instanceof ClassicPreset.InputControl) {
|
|
28558
|
-
return {
|
|
28559
|
-
__type: 'ClassicPreset.InputControl',
|
|
28560
|
-
id: control.id,
|
|
28561
|
-
readonly: control.readonly,
|
|
28562
|
-
type: control.type,
|
|
28563
|
-
value: control.value,
|
|
28564
|
-
};
|
|
28565
|
-
}
|
|
28566
|
-
return null;
|
|
28567
|
-
}
|
|
28568
|
-
|
|
28569
|
-
function exportGraph(editor) {
|
|
28570
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28571
|
-
const data = { nodes: [] };
|
|
28572
|
-
const nodes = editor.getNodes();
|
|
28573
|
-
for (const node of nodes) {
|
|
28574
|
-
const inputsEntries = Object.entries(node.inputs).map(([key, input]) => {
|
|
28575
|
-
return [key, input && serializePort(input)];
|
|
28576
|
-
});
|
|
28577
|
-
const outputsEntries = Object.entries(node.outputs).map(([key, output]) => {
|
|
28578
|
-
return [key, output && serializePort(output)];
|
|
28579
|
-
});
|
|
28580
|
-
const controlsEntries = Object.entries(node.controls).map(([key, control]) => {
|
|
28581
|
-
return [key, control && serializeControl(control)];
|
|
28582
|
-
});
|
|
28583
|
-
// data.nodes.push({
|
|
28584
|
-
// id: node.id,
|
|
28585
|
-
// label: node.label,
|
|
28586
|
-
// outputs: Object.fromEntries(outputsEntries),
|
|
28587
|
-
// inputs: Object.fromEntries(inputsEntries),
|
|
28588
|
-
// controls: Object.fromEntries(controlsEntries),
|
|
28589
|
-
// });
|
|
28590
|
-
}
|
|
28591
|
-
return data;
|
|
28592
|
-
});
|
|
28593
|
-
}
|
|
28594
|
-
|
|
28595
28548
|
/**
|
|
28596
28549
|
*
|
|
28597
28550
|
* @param node
|
|
@@ -28684,6 +28637,28 @@ const _updateConnections = (outputs, inputs, editor) => __awaiter(void 0, void 0
|
|
|
28684
28637
|
yield editor.addConnection(connection);
|
|
28685
28638
|
});
|
|
28686
28639
|
|
|
28640
|
+
function serializePort(port) {
|
|
28641
|
+
return {
|
|
28642
|
+
id: port.id,
|
|
28643
|
+
label: port.label,
|
|
28644
|
+
socket: {
|
|
28645
|
+
name: port.socket.name,
|
|
28646
|
+
},
|
|
28647
|
+
};
|
|
28648
|
+
}
|
|
28649
|
+
function serializeControl(control) {
|
|
28650
|
+
if (control instanceof ClassicPreset.InputControl) {
|
|
28651
|
+
return {
|
|
28652
|
+
__type: 'ClassicPreset.InputControl',
|
|
28653
|
+
id: control.id,
|
|
28654
|
+
readonly: control.readonly,
|
|
28655
|
+
type: control.type,
|
|
28656
|
+
value: control.value,
|
|
28657
|
+
};
|
|
28658
|
+
}
|
|
28659
|
+
return null;
|
|
28660
|
+
}
|
|
28661
|
+
|
|
28687
28662
|
class DiagramService {
|
|
28688
28663
|
/**
|
|
28689
28664
|
*
|
|
@@ -31732,5 +31707,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
|
31732
31707
|
* Generated bundle index. Do not edit.
|
|
31733
31708
|
*/
|
|
31734
31709
|
|
|
31735
|
-
export { ActivitiesLogComponent, ActivitiesLogModule, ActivityLineComponent, AdapterService, AddPermissionsDialogComponent, AddToCollectionComponent, AppConfigService, AppHasRoleDirective, AttachmentItemComponent, AttachmentItemModule, AttachmentModalModule, AttachmentsComponent, AttachmentsListComponent, AttachmentsPageProviderComponent, AvatarComponent, AvatarModule, BaseColumnComponent, BaseComponent, BaseDialogComponent, BaseNodeClass, BaseSelector, BaseService, BooleanViewerComponent, ButtonComponent, CachingExpiryUnit, CallApiService, CardComponent, CardModule, ChartDataService, CircleNode, CircleNodeComponent, ClickOutsideDirective, ClipboardComponent, CommentApiService, CommentsDashletComponent, CommentsModule, ComponentRegisterService, ComponentTranslationModel, ConfirmCallerDialogComponent, ConfirmCallerModule, ConfirmDialogComponent, ConfirmationDialogComponent, ConfirmationDialogModule, Connection, ContentActionType, ContentNode, ContentNodeComponent, CopyComponent, CorrespondenceRelationComponent, CorrespondenceRelationModule, CorrespondenceRelationService, CorrespondenceTagsComponent, CreateDirectoryComponent, CreateEntityComponent, CreateEntityModule, CreateModalComponent, CreationTypeComponent, CtsTagsModule, CustomConnectionComponent, CustomDocumentViewerComponent, CustomPpViewerComponent, CustomSocketComponent, CustomToastrModule, CustomToastrService, CutomeVocViewerComponent, DIAGRAM_DEFAULT_OPTIONS, DIAGRAM_HEIGHT, DataViewerComponent, DateFormatterService, DateHelperService, DateViewerComponent, DeleteComponent, DepartmentApiService, DepartmentFormComponent, DepartmentManagementService, DepartmentViewerComponent, DestroySubject$1 as DestroySubject, DiagramDirective, DiagramPluginsService, DiagramService, DiagramsModule, DialogMangmentService, DirectiveModule, DisplaySuitableIconComponent, DisplaySuitableIconModule, DocumentScanService, DocumentTemplatesConstants, DocumentTemplatesService, DocumentUploadComponent, DocumentsComponent, DocumentsConstants, DocumentsListComponent, DocumentsModule, DocumentsService, DragAndDropDirective, DropdownViewerComponent, DynamicChartComponent, DynamicChartModule, DynamicColumnComponent, DynamicFieldsRendererComponent, DynamicFieldsRendererModule, DynamicFilterComponent, DynamicFilterModule, DynamicFormBoolItemComponent, DynamicFormBuilderComponent, DynamicFormCheckboxItemComponent, DynamicFormComponent, DynamicFormDateItemComponent, DynamicFormDepartmentComponent, DynamicFormFieldComponent, DynamicFormHijriDateitemComponent, DynamicFormMapItemComponent, DynamicFormModule, DynamicFormOptionsComponent, DynamicFormSelectItemComponent, DynamicFormSelectTagComponent, DynamicFormSelectUserFilterComponent, DynamicFormSelectUsersComponent, DynamicFormService, DynamicFormSlideToggleitemComponent, DynamicFormTextItemComponent, DynamicFormTextareaComponent, DynamicFormViewerComponent, DynamicFormVocabularyItemComponent, DynamicSearchComponent, DynamicSearchModule, DynamicSingleChartComponent, DynamicTableComponent, DynamicTableModule, DynamicTableService, DynamicTabsComponent, DynamicTabsModule, DynamicViewModule, ENTITY_TYPE, EXTENSION_JSONS, EnvManager, EvaluatorsService, ExtensionLoaderService, ExtensionService, FILTER_DATES_TYPE, FileGridInfiniteScrollDirective, FileManagerAbstract, FileManagerAdapter, FileManagerPaginationConfig, FileManagerService, FileMangerModule, FileSizePipe, FilterComponent, FilterModule, FolderModalComponent, FolderishType, FormBuilderService, GlobalAdminService, GlobalPdfTron, GregorianDatepickerComponent, HijriDatePipe, HijriDatepickerComponent, HijriGregorianDatepickerComponent, IN_OUT_DIRECTION, IconService, InitializationService, ItemListComponent, Lang, LatestActivityComponent, LatestActivityModule, LibrarySharedModule, ListViewerComponent, LoanRequestComponent, LocalStoragService, LocalizedDatePipe, MESSAGE_TYPE, MY_MOMENT_FORMATS, MainfolderService, MessageService, MomentDateAdapter, MoveComponent, MultiValuePipe, MultipleDynamicFormViewerComponent, MutipleDynamicFormViewerModule, NODE_CIRCLE_SIZE, NODE_HEIGHT, NODE_MARGIN, NODE_STATUS, NODE_TYPE, NODE_WIDTH, NOTIFICATIONS_LIST_OPTIONS, NOTIFICATION_ICON, NOTIFICATION_ITEM, NOTIFICATION_STATUS, NOTIFY_EVENT, NdfConfirmationDialogComponent, NdfNuxeoDialog, NgxHijriGregorianDatepickerModule, NoDataComponent, NodeIconComponent, NodeInputsComponent, NodeOutputsComponent, NotificationIconDirective, NotificationItemComponent, NotificationItemDirective, NotificationSourceSelectComponent, NotificationStatusToggleComponent, NotificationToastComponent, NotificationsButtonComponent, NotificationsDateSelectComponent, NotificationsListComponent, NotificationsListContainerComponent, NotificationsModule, NotificationsService, NotificationsSettingsContainerComponent, NuxeoCoreModule, NuxeoDevelopmentFrameworkComponent, NuxeoDevelopmentFrameworkModule, NuxeoDevelopmentFrameworkService, NuxeoDialogModule, NuxeoDialogService, NuxeoMapper, NuxeoService, PAGINATION_MODE, PANEL_MODE, PaginationComponent, PaginationModule, PdfTronModule, PdftronComponent, PdftronService, PermissionService, PermissionsComponent, PermissionsDirective, PermissionsModule, PermissionsTemplateComponent, PipesModule, PublishDialogComponent, PublishingDocumentService, ReadMoreComponent, RecentlyViewedService, RemoveButtonComponent, RenameComponent, RolesService, SOCKET_WIDTH, SUBSCRIPTION_STATE, SafeHtmlPipe, ScanComponent, ScanModalComponent, SearchAutocompleteComponent, SecurePipe, SelectComponent, SelectModule, SelectUsersByDepartmentModule, SelectUsersByDepartmentsComponent, SetDirRtlDirective, SetRtlDirective, ShareDialogComponent, SharedDocsService, SharedServicesModule, SidepanelComponent, SingleActivityComponent, Socket, SpinnerComponent, StatusIconComponent, TRANSLATION_PROVIDER, TableComponent, TableModule, TagsApiService, TemplateModalComponent, TemplateNode, TemplateNodeComponent, TimeAgoPipe, ToastsModule, TransferDocComponent, TranslateLoaderService, TranslatedVocabularySelectComponent, TranslationService, TreeviewSelectComponent, UpdateModalComponent, UploadFileService, UploadManagmentService, UserCardComponent, UserComponent, UserModule, UserPreferenceValues, UserPreferencesService, UserService, UsersCardComponent, UsersCardModule, UtilityService, VersionsComponent, ViewerFilesService, ViewerLogComponent, ViewerLogModule, VocabularyApiService, VocabularyComponent, VocabularyModule, WorkflowService, ZoomControlComponent, appInitializer, departmentCacheBuster$,
|
|
31710
|
+
export { ActivitiesLogComponent, ActivitiesLogModule, ActivityLineComponent, AdapterService, AddPermissionsDialogComponent, AddToCollectionComponent, AppConfigService, AppHasRoleDirective, AttachmentItemComponent, AttachmentItemModule, AttachmentModalModule, AttachmentsComponent, AttachmentsListComponent, AttachmentsPageProviderComponent, AvatarComponent, AvatarModule, BaseColumnComponent, BaseComponent, BaseDialogComponent, BaseNodeClass, BaseSelector, BaseService, BooleanViewerComponent, ButtonComponent, CachingExpiryUnit, CallApiService, CardComponent, CardModule, ChartDataService, CircleNode, CircleNodeComponent, ClickOutsideDirective, ClipboardComponent, CommentApiService, CommentsDashletComponent, CommentsModule, ComponentRegisterService, ComponentTranslationModel, ConfirmCallerDialogComponent, ConfirmCallerModule, ConfirmDialogComponent, ConfirmationDialogComponent, ConfirmationDialogModule, Connection, ContentActionType, ContentNode, ContentNodeComponent, CopyComponent, CorrespondenceRelationComponent, CorrespondenceRelationModule, CorrespondenceRelationService, CorrespondenceTagsComponent, CreateDirectoryComponent, CreateEntityComponent, CreateEntityModule, CreateModalComponent, CreationTypeComponent, CtsTagsModule, CustomConnectionComponent, CustomDocumentViewerComponent, CustomPpViewerComponent, CustomSocketComponent, CustomToastrModule, CustomToastrService, CutomeVocViewerComponent, DIAGRAM_DEFAULT_OPTIONS, DIAGRAM_HEIGHT, DataViewerComponent, DateFormatterService, DateHelperService, DateViewerComponent, DeleteComponent, DepartmentApiService, DepartmentFormComponent, DepartmentManagementService, DepartmentViewerComponent, DestroySubject$1 as DestroySubject, DiagramDirective, DiagramPluginsService, DiagramService, DiagramsModule, DialogMangmentService, DirectiveModule, DisplaySuitableIconComponent, DisplaySuitableIconModule, DocumentScanService, DocumentTemplatesConstants, DocumentTemplatesService, DocumentUploadComponent, DocumentsComponent, DocumentsConstants, DocumentsListComponent, DocumentsModule, DocumentsService, DragAndDropDirective, DropdownViewerComponent, DynamicChartComponent, DynamicChartModule, DynamicColumnComponent, DynamicFieldsRendererComponent, DynamicFieldsRendererModule, DynamicFilterComponent, DynamicFilterModule, DynamicFormBoolItemComponent, DynamicFormBuilderComponent, DynamicFormCheckboxItemComponent, DynamicFormComponent, DynamicFormDateItemComponent, DynamicFormDepartmentComponent, DynamicFormFieldComponent, DynamicFormHijriDateitemComponent, DynamicFormMapItemComponent, DynamicFormModule, DynamicFormOptionsComponent, DynamicFormSelectItemComponent, DynamicFormSelectTagComponent, DynamicFormSelectUserFilterComponent, DynamicFormSelectUsersComponent, DynamicFormService, DynamicFormSlideToggleitemComponent, DynamicFormTextItemComponent, DynamicFormTextareaComponent, DynamicFormViewerComponent, DynamicFormVocabularyItemComponent, DynamicSearchComponent, DynamicSearchModule, DynamicSingleChartComponent, DynamicTableComponent, DynamicTableModule, DynamicTableService, DynamicTabsComponent, DynamicTabsModule, DynamicViewModule, ENTITY_TYPE, EXTENSION_JSONS, EnvManager, EvaluatorsService, ExtensionLoaderService, ExtensionService, FILTER_DATES_TYPE, FileGridInfiniteScrollDirective, FileManagerAbstract, FileManagerAdapter, FileManagerPaginationConfig, FileManagerService, FileMangerModule, FileSizePipe, FilterComponent, FilterModule, FolderModalComponent, FolderishType, FormBuilderService, GlobalAdminService, GlobalPdfTron, GregorianDatepickerComponent, HijriDatePipe, HijriDatepickerComponent, HijriGregorianDatepickerComponent, IN_OUT_DIRECTION, IconService, InitializationService, ItemListComponent, Lang, LatestActivityComponent, LatestActivityModule, LibrarySharedModule, ListViewerComponent, LoanRequestComponent, LocalStoragService, LocalizedDatePipe, MESSAGE_TYPE, MY_MOMENT_FORMATS, MainfolderService, MessageService, MomentDateAdapter, MoveComponent, MultiValuePipe, MultipleDynamicFormViewerComponent, MutipleDynamicFormViewerModule, NODE_CIRCLE_SIZE, NODE_HEIGHT, NODE_MARGIN, NODE_STATUS, NODE_TYPE, NODE_WIDTH, NOTIFICATIONS_LIST_OPTIONS, NOTIFICATION_ICON, NOTIFICATION_ITEM, NOTIFICATION_STATUS, NOTIFY_EVENT, NdfConfirmationDialogComponent, NdfNuxeoDialog, NgxHijriGregorianDatepickerModule, NoDataComponent, NodeIconComponent, NodeInputsComponent, NodeOutputsComponent, NotificationIconDirective, NotificationItemComponent, NotificationItemDirective, NotificationSourceSelectComponent, NotificationStatusToggleComponent, NotificationToastComponent, NotificationsButtonComponent, NotificationsDateSelectComponent, NotificationsListComponent, NotificationsListContainerComponent, NotificationsModule, NotificationsService, NotificationsSettingsContainerComponent, NuxeoCoreModule, NuxeoDevelopmentFrameworkComponent, NuxeoDevelopmentFrameworkModule, NuxeoDevelopmentFrameworkService, NuxeoDialogModule, NuxeoDialogService, NuxeoMapper, NuxeoService, PAGINATION_MODE, PANEL_MODE, PaginationComponent, PaginationModule, PdfTronModule, PdftronComponent, PdftronService, PermissionService, PermissionsComponent, PermissionsDirective, PermissionsModule, PermissionsTemplateComponent, PipesModule, PublishDialogComponent, PublishingDocumentService, ReadMoreComponent, RecentlyViewedService, RemoveButtonComponent, RenameComponent, RolesService, SOCKET_WIDTH, SUBSCRIPTION_STATE, SafeHtmlPipe, ScanComponent, ScanModalComponent, SearchAutocompleteComponent, SecurePipe, SelectComponent, SelectModule, SelectUsersByDepartmentModule, SelectUsersByDepartmentsComponent, SetDirRtlDirective, SetRtlDirective, ShareDialogComponent, SharedDocsService, SharedServicesModule, SidepanelComponent, SingleActivityComponent, Socket, SpinnerComponent, StatusIconComponent, TRANSLATION_PROVIDER, TableComponent, TableModule, TagsApiService, TemplateModalComponent, TemplateNode, TemplateNodeComponent, TimeAgoPipe, ToastsModule, TransferDocComponent, TranslateLoaderService, TranslatedVocabularySelectComponent, TranslationService, TreeviewSelectComponent, UpdateModalComponent, UploadFileService, UploadManagmentService, UserCardComponent, UserComponent, UserModule, UserPreferenceValues, UserPreferencesService, UserService, UsersCardComponent, UsersCardModule, UtilityService, VersionsComponent, ViewerFilesService, ViewerLogComponent, ViewerLogModule, VocabularyApiService, VocabularyComponent, VocabularyModule, WorkflowService, ZoomControlComponent, appInitializer, departmentCacheBuster$, extensionJsonsFactory, filterEnabled, getConnections, getValue, mergeArrays, mergeObjects, minute$1 as minute, provideExtensionConfig, reduceEmptyMenus, reduceSeparators, removeConnections, removeNode, removeNodeAndConnections, serializeControl, serializePort, sortByOrder };
|
|
31736
31711
|
//# sourceMappingURL=nuxeo-development-framework.js.map
|