herum-shared 0.1.38 → 0.1.46
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/assets/shared/audio-images/purple-pause.svg +4 -0
- package/assets/shared/audio-images/purple-play.svg +3 -0
- package/atoms/index.d.ts +55 -55
- package/constants/index.d.ts +186 -136
- package/dialogs/index.d.ts +4 -3
- package/environment/index.d.ts +2 -35
- package/fesm2022/herum-shared-animations.mjs +4 -0
- package/fesm2022/herum-shared-animations.mjs.map +1 -1
- package/fesm2022/herum-shared-atoms.mjs +111 -109
- package/fesm2022/herum-shared-atoms.mjs.map +1 -1
- package/fesm2022/herum-shared-constants.mjs +205 -162
- package/fesm2022/herum-shared-constants.mjs.map +1 -1
- package/fesm2022/herum-shared-decorators.mjs +4 -0
- package/fesm2022/herum-shared-decorators.mjs.map +1 -1
- package/fesm2022/herum-shared-dialogs.mjs +7 -4
- package/fesm2022/herum-shared-dialogs.mjs.map +1 -1
- package/fesm2022/herum-shared-directives.mjs +5 -1
- package/fesm2022/herum-shared-directives.mjs.map +1 -1
- package/fesm2022/herum-shared-environment.mjs +4 -0
- package/fesm2022/herum-shared-environment.mjs.map +1 -1
- package/fesm2022/herum-shared-errors.mjs +5 -1
- package/fesm2022/herum-shared-errors.mjs.map +1 -1
- package/fesm2022/herum-shared-fetched-message.mjs +39 -30
- package/fesm2022/herum-shared-fetched-message.mjs.map +1 -1
- package/fesm2022/herum-shared-molecules.mjs +57 -28
- package/fesm2022/herum-shared-molecules.mjs.map +1 -1
- package/fesm2022/herum-shared-mongo.mjs +414 -150
- package/fesm2022/herum-shared-mongo.mjs.map +1 -1
- package/fesm2022/herum-shared-objectsExample.mjs +5 -1
- package/fesm2022/herum-shared-objectsExample.mjs.map +1 -1
- package/fesm2022/herum-shared-pipes.mjs +64 -60
- package/fesm2022/herum-shared-pipes.mjs.map +1 -1
- package/fesm2022/herum-shared-services.mjs +144 -321
- package/fesm2022/herum-shared-services.mjs.map +1 -1
- package/fesm2022/herum-shared-static-services.mjs +4 -0
- package/fesm2022/herum-shared-static-services.mjs.map +1 -1
- package/fesm2022/herum-shared-table.mjs +61 -48
- package/fesm2022/herum-shared-table.mjs.map +1 -1
- package/fesm2022/herum-shared-testsObjects.mjs +89 -119
- package/fesm2022/herum-shared-testsObjects.mjs.map +1 -1
- package/fesm2022/herum-shared-tokens.mjs +4 -0
- package/fesm2022/herum-shared-tokens.mjs.map +1 -1
- package/fesm2022/herum-shared-utils.mjs +43 -39
- package/fesm2022/herum-shared-utils.mjs.map +1 -1
- package/fesm2022/herum-shared-validators.mjs +4 -0
- package/fesm2022/herum-shared-validators.mjs.map +1 -1
- package/fesm2022/herum-shared.mjs +9090 -924
- package/fesm2022/herum-shared.mjs.map +1 -1
- package/fetched-message/index.d.ts +11 -11
- package/index.d.ts +1673 -281
- package/molecules/index.d.ts +11 -8
- package/mongo/index.d.ts +125 -66
- package/objectsExample/index.d.ts +3 -1
- package/package.json +2 -5
- package/pipes/index.d.ts +25 -21
- package/services/index.d.ts +56 -67
- package/styles/_mixin.scss +2 -2
- package/styles/dialogs.scss +0 -5
- package/styles/variables/_colors.scss +5 -109
- package/styles/variables/_sizes.scss +2 -9
- package/table/index.d.ts +25 -18
- package/testsObjects/index.d.ts +3 -3
- package/tokens/index.d.ts +6 -4
- package/utils/index.d.ts +14 -10
- package/fesm2022/herum-shared-herum-types.mjs +0 -107
- package/fesm2022/herum-shared-herum-types.mjs.map +0 -1
- package/herum-types/index.d.ts +0 -200
- package/styles/variables/_colors.college.scss +0 -65
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, EventEmitter, HostListener, ViewChildren, ViewChild, Output, Input, Optional, Self, forwardRef, Inject, NgModule } from '@angular/core';
|
|
3
|
+
import { MatNativeDateModule, MAT_DATE_LOCALE } from '@angular/material/core';
|
|
3
4
|
import * as i1 from '@angular/common';
|
|
4
5
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i2 from '@angular/material/tooltip';
|
|
6
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
7
|
-
import * as i3 from 'herum-shared/directives';
|
|
8
|
-
import { DirectivesModule } from 'herum-shared/directives';
|
|
9
|
-
import * as i6 from 'herum-shared/pipes';
|
|
10
|
-
import { PipesModule } from 'herum-shared/pipes';
|
|
11
|
-
import { openClose } from 'herum-shared/animations';
|
|
12
6
|
import * as i1$1 from '@angular/forms';
|
|
13
7
|
import { NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
14
|
-
import * as i3$1 from '@angular/cdk/bidi';
|
|
15
|
-
import * as i2$1 from 'herum-shared/atoms';
|
|
16
|
-
import { AtomsModule } from 'herum-shared/atoms';
|
|
17
|
-
import * as i1$2 from 'herum-shared/services';
|
|
18
|
-
import { DateRange, MatDatepickerModule } from '@angular/material/datepicker';
|
|
19
|
-
import { regexExpressions, startEndDateError, minDateError, formatError, timestampError, svgsStrings, resourcesFilesSuffixes, filesSuffixes, anySubFileTypeWildCard, system } from 'herum-shared/constants';
|
|
20
|
-
import { HERUM_SHARED_CONFIG_TOKEN } from 'herum-shared/environment';
|
|
21
|
-
import { isTruncatedTitleElement, getAssignmentStateDisplayName } from 'herum-shared/utils';
|
|
22
8
|
import * as i2$2 from '@angular/material/menu';
|
|
23
9
|
import { MatMenuModule } from '@angular/material/menu';
|
|
24
|
-
import { StepStatus } from 'herum-shared/herum-types';
|
|
25
|
-
import { MatNativeDateModule, MAT_DATE_LOCALE } from '@angular/material/core';
|
|
26
10
|
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
27
11
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
28
12
|
import { MatChipsModule } from '@angular/material/chips';
|
|
29
13
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
14
|
+
import * as i2 from '@angular/material/tooltip';
|
|
15
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
30
16
|
import { MatInputModule } from '@angular/material/input';
|
|
31
17
|
import { MatSelectModule } from '@angular/material/select';
|
|
32
18
|
import { MatIconModule } from '@angular/material/icon';
|
|
33
19
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
34
20
|
import { MatSliderModule } from '@angular/material/slider';
|
|
35
21
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
22
|
+
import { DateRange, MatDatepickerModule } from '@angular/material/datepicker';
|
|
23
|
+
import * as i3 from 'herum-shared/directives';
|
|
24
|
+
import { DirectivesModule } from 'herum-shared/directives';
|
|
25
|
+
import * as i6 from 'herum-shared/pipes';
|
|
26
|
+
import { PipesModule } from 'herum-shared/pipes';
|
|
27
|
+
import * as i2$1 from 'herum-shared/atoms';
|
|
28
|
+
import { AtomsModule } from 'herum-shared/atoms';
|
|
29
|
+
import { openClose } from 'herum-shared/animations';
|
|
30
|
+
import * as i3$1 from '@angular/cdk/bidi';
|
|
31
|
+
import * as i1$2 from 'herum-shared/services';
|
|
32
|
+
import { regexExpressions, startEndDateError, minDateError, formatError, timestampError, svgsStrings, resourcesFilesSuffixes, maxImageHeight, maxImageWidth, filesSuffixes, uploadsProgressMetadataTypes, anySubFileTypeWildCard, system } from 'herum-shared/constants';
|
|
33
|
+
import { HERUM_SHARED_CONFIG_TOKEN } from 'herum-shared/environment';
|
|
34
|
+
import { isTruncatedTitleElement, getAssignmentStateDisplayName } from 'herum-shared/utils';
|
|
35
|
+
import { StepStatus } from 'herum-types/Shared';
|
|
36
36
|
|
|
37
37
|
class HerumActiveLinkComponent {
|
|
38
38
|
constructor() { }
|
|
@@ -107,11 +107,11 @@ class HerumActiveMenuComponent {
|
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumActiveMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumActiveMenuComponent, isStandalone: false, selector: "herum-active-menu", inputs: { useIcons: "useIcons", view: "view", activeColor: "activeColor", activeTextColor: "activeTextColor", secondaryTextColor: "secondaryTextColor", menuItems: "menuItems", selectedItem: "selectedItem", selectById: "selectById", isBlock: "isBlock", dragEvent: "dragEvent" }, outputs: { selectionIndex: "selectionIndex" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "tabsContainer", first: true, predicate: ["tabsContainer"], descendants: true }, { propertyName: "tabsElement", predicate: ["tabs"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ul #tabsContainer class=\"tabs group\" [ngClass]=\"view\" [class.isBlock]=\"isBlock\">\r\n <li #tabs *ngFor=\"let menuItem of menuItems; let i = index\"\r\n [class.active]=\"selectById ? menuItem?.id === selectedItem?.id : (currentItemIndex === i || menuItem === selectedItem)\">\r\n <a (click)=\"_onSelectTab(i)\" [userAction]=\"menuItem.label\">\r\n <span *ngIf=\"useIcons\" [innerHTML]=\"menuItem.icon | safeHtml\"\r\n [ngClass]=\"i == currentItemIndex ? 'active-icon' : 'non-active-icon'\">\r\n </span>\r\n\r\n <p class=\"m-0 truncate\" [matTooltip]=\"menuItem.label\">\r\n {{ menuItem.label }}\r\n </p>\r\n </a>\r\n </li>\r\n</ul>", styles: ["a{cursor:pointer;display:flex;width:100%;gap:8px;align-items:center;justify-content:center;z-index:3}a .active-icon{stroke:var(--active-menu-background, var(--icons-color))}a .active-icon,a .non-active-icon{z-index:3;width:24px}a .non-active-icon{stroke:var(--active-menu-secondary-text-color, #ffffff)}.narrow a{flex-direction:column}.narrow a span{height:18px}.narrow a p{font-size:14px;margin-right:0}#content{background-color:#fff;position:relative;overflow:hidden;min-height:400px}.tabs{list-style:none;width:100
|
|
110
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumActiveMenuComponent, isStandalone: false, selector: "herum-active-menu", inputs: { useIcons: "useIcons", view: "view", activeColor: "activeColor", activeTextColor: "activeTextColor", secondaryTextColor: "secondaryTextColor", menuItems: "menuItems", selectedItem: "selectedItem", selectById: "selectById", isBlock: "isBlock", dragEvent: "dragEvent" }, outputs: { selectionIndex: "selectionIndex" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "tabsContainer", first: true, predicate: ["tabsContainer"], descendants: true }, { propertyName: "tabsElement", predicate: ["tabs"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ul #tabsContainer class=\"tabs group\" [ngClass]=\"view\" [class.isBlock]=\"isBlock\">\r\n <li #tabs *ngFor=\"let menuItem of menuItems; let i = index\"\r\n [class.active]=\"selectById ? menuItem?.id === selectedItem?.id : (currentItemIndex === i || menuItem === selectedItem)\">\r\n <a (click)=\"_onSelectTab(i)\" [userAction]=\"menuItem.label\">\r\n <span *ngIf=\"useIcons\" [innerHTML]=\"menuItem.icon | safeHtml\"\r\n [ngClass]=\"i == currentItemIndex ? 'active-icon' : 'non-active-icon'\">\r\n </span>\r\n\r\n <p class=\"m-0 truncate\" [matTooltip]=\"menuItem.label\">\r\n {{ menuItem.label }}\r\n </p>\r\n </a>\r\n </li>\r\n</ul>", styles: ["a{cursor:pointer;display:flex;width:100%;gap:8px;align-items:center;justify-content:center;z-index:3}a .active-icon{stroke:var(--active-menu-background, var(--icons-color))}a .active-icon,a .non-active-icon{z-index:3;width:24px}a .non-active-icon{stroke:var(--active-menu-secondary-text-color, #ffffff)}.narrow a{flex-direction:column}.narrow a span{height:18px}.narrow a p{font-size:14px;margin-right:0}#content{background-color:#fff;position:relative;overflow:hidden;min-height:400px}.tabs{list-style:none;width:100%;border-radius:8px 0 0}.tabs li{float:left;height:40px;position:relative}.tabs a{float:left;padding-inline:10px;background-color:var(--active-menu-background);height:100%}.tabs a p{text-decoration:none;font-size:16px;font-weight:500;color:var(--active-menu-secondary-text-color, #ffffff);z-index:3}.isBlock a p{color:gray}.active a{border-top-left-radius:12px;border-top-right-radius:12px}.active a p{color:var(--active-menu-text-color, var(--icons-color))}.tabs .active{z-index:3}.tabs .active a{background-color:#fff;color:var(--icons-color)}.tabs li:before,.tabs li:after,.tabs li a:before,.tabs li a:after{position:absolute;bottom:0}.tabs li:last-child:after,.tabs li:last-child a:after,.tabs li:first-child:before,.tabs li:first-child a:before,.tabs .active:after,.tabs .active:before,.tabs .active a:after,.tabs .active a:before{content:\"\"}.tabs .active:before,.tabs .active:after{background-color:#fff;z-index:1}.tabs li:before,.tabs li:after{background-color:var(--active-menu-background, var(--icons-color));width:12px;height:12px}.tabs li:before{left:-12px}.tabs li:after{right:-12px}.tabs li a:after,.tabs li a:before{width:20px;height:20px;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;background-color:var(--active-menu-background, var(--icons-color));z-index:2}.tabs .active a:after,.tabs .active a:before{background-color:var(--active-menu-background, var(--icons-color))}.tabs li:first-child.active a:before,.tabs li:last-child.active a:after{background-color:var(--active-menu-background, var(--icons-color))}.tabs li a:before{left:-20px}.tabs li a:after{right:-20px}ul{background-color:var(--active-menu-background, var(--icons-color));height:52px;margin:0;padding-top:var(--standard-padding);justify-content:flex-start;display:flex}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3.UserActionDirective, selector: "[userAction]", inputs: ["userAction"] }, { kind: "pipe", type: i6.SafeHtmlPipe, name: "safeHtml" }] });
|
|
111
111
|
}
|
|
112
112
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumActiveMenuComponent, decorators: [{
|
|
113
113
|
type: Component,
|
|
114
|
-
args: [{ standalone: false, selector: 'herum-active-menu', template: "<ul #tabsContainer class=\"tabs group\" [ngClass]=\"view\" [class.isBlock]=\"isBlock\">\r\n <li #tabs *ngFor=\"let menuItem of menuItems; let i = index\"\r\n [class.active]=\"selectById ? menuItem?.id === selectedItem?.id : (currentItemIndex === i || menuItem === selectedItem)\">\r\n <a (click)=\"_onSelectTab(i)\" [userAction]=\"menuItem.label\">\r\n <span *ngIf=\"useIcons\" [innerHTML]=\"menuItem.icon | safeHtml\"\r\n [ngClass]=\"i == currentItemIndex ? 'active-icon' : 'non-active-icon'\">\r\n </span>\r\n\r\n <p class=\"m-0 truncate\" [matTooltip]=\"menuItem.label\">\r\n {{ menuItem.label }}\r\n </p>\r\n </a>\r\n </li>\r\n</ul>", styles: ["a{cursor:pointer;display:flex;width:100%;gap:8px;align-items:center;justify-content:center;z-index:3}a .active-icon{stroke:var(--active-menu-background, var(--icons-color))}a .active-icon,a .non-active-icon{z-index:3;width:24px}a .non-active-icon{stroke:var(--active-menu-secondary-text-color, #ffffff)}.narrow a{flex-direction:column}.narrow a span{height:18px}.narrow a p{font-size:14px;margin-right:0}#content{background-color:#fff;position:relative;overflow:hidden;min-height:400px}.tabs{list-style:none;width:100
|
|
114
|
+
args: [{ standalone: false, selector: 'herum-active-menu', template: "<ul #tabsContainer class=\"tabs group\" [ngClass]=\"view\" [class.isBlock]=\"isBlock\">\r\n <li #tabs *ngFor=\"let menuItem of menuItems; let i = index\"\r\n [class.active]=\"selectById ? menuItem?.id === selectedItem?.id : (currentItemIndex === i || menuItem === selectedItem)\">\r\n <a (click)=\"_onSelectTab(i)\" [userAction]=\"menuItem.label\">\r\n <span *ngIf=\"useIcons\" [innerHTML]=\"menuItem.icon | safeHtml\"\r\n [ngClass]=\"i == currentItemIndex ? 'active-icon' : 'non-active-icon'\">\r\n </span>\r\n\r\n <p class=\"m-0 truncate\" [matTooltip]=\"menuItem.label\">\r\n {{ menuItem.label }}\r\n </p>\r\n </a>\r\n </li>\r\n</ul>", styles: ["a{cursor:pointer;display:flex;width:100%;gap:8px;align-items:center;justify-content:center;z-index:3}a .active-icon{stroke:var(--active-menu-background, var(--icons-color))}a .active-icon,a .non-active-icon{z-index:3;width:24px}a .non-active-icon{stroke:var(--active-menu-secondary-text-color, #ffffff)}.narrow a{flex-direction:column}.narrow a span{height:18px}.narrow a p{font-size:14px;margin-right:0}#content{background-color:#fff;position:relative;overflow:hidden;min-height:400px}.tabs{list-style:none;width:100%;border-radius:8px 0 0}.tabs li{float:left;height:40px;position:relative}.tabs a{float:left;padding-inline:10px;background-color:var(--active-menu-background);height:100%}.tabs a p{text-decoration:none;font-size:16px;font-weight:500;color:var(--active-menu-secondary-text-color, #ffffff);z-index:3}.isBlock a p{color:gray}.active a{border-top-left-radius:12px;border-top-right-radius:12px}.active a p{color:var(--active-menu-text-color, var(--icons-color))}.tabs .active{z-index:3}.tabs .active a{background-color:#fff;color:var(--icons-color)}.tabs li:before,.tabs li:after,.tabs li a:before,.tabs li a:after{position:absolute;bottom:0}.tabs li:last-child:after,.tabs li:last-child a:after,.tabs li:first-child:before,.tabs li:first-child a:before,.tabs .active:after,.tabs .active:before,.tabs .active a:after,.tabs .active a:before{content:\"\"}.tabs .active:before,.tabs .active:after{background-color:#fff;z-index:1}.tabs li:before,.tabs li:after{background-color:var(--active-menu-background, var(--icons-color));width:12px;height:12px}.tabs li:before{left:-12px}.tabs li:after{right:-12px}.tabs li a:after,.tabs li a:before{width:20px;height:20px;-webkit-border-radius:12px;-moz-border-radius:12px;border-radius:12px;background-color:var(--active-menu-background, var(--icons-color));z-index:2}.tabs .active a:after,.tabs .active a:before{background-color:var(--active-menu-background, var(--icons-color))}.tabs li:first-child.active a:before,.tabs li:last-child.active a:after{background-color:var(--active-menu-background, var(--icons-color))}.tabs li a:before{left:-20px}.tabs li a:after{right:-20px}ul{background-color:var(--active-menu-background, var(--icons-color));height:52px;margin:0;padding-top:var(--standard-padding);justify-content:flex-start;display:flex}\n"] }]
|
|
115
115
|
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { useIcons: [{
|
|
116
116
|
type: Input
|
|
117
117
|
}], view: [{
|
|
@@ -201,7 +201,7 @@ class HerumAutocompleteComponent {
|
|
|
201
201
|
_inputChange(rawText) {
|
|
202
202
|
if (!this.disabled)
|
|
203
203
|
this.isDropdownOpen = true;
|
|
204
|
-
const text = !!rawText ? rawText.toString()
|
|
204
|
+
const text = !!rawText ? rawText.toString() : '';
|
|
205
205
|
this.currentSearchedItem = text;
|
|
206
206
|
this.isWaitingForResults = true;
|
|
207
207
|
this.onChange(this.currentSearchedItem);
|
|
@@ -735,6 +735,7 @@ class HerumDropZoneComponent {
|
|
|
735
735
|
filesSuffixes = resourcesFilesSuffixes;
|
|
736
736
|
isValidUpload = true;
|
|
737
737
|
isSupportedFileType = true;
|
|
738
|
+
isImagesSizeValid = true;
|
|
738
739
|
parsedAllowedFileTypes = '';
|
|
739
740
|
errorMessages = [
|
|
740
741
|
{ condition: () => !this.isSupportedFileType && this.isValidUpload, message: 'סוג הקובץ אינו נתמך' },
|
|
@@ -743,6 +744,10 @@ class HerumDropZoneComponent {
|
|
|
743
744
|
condition: () => this.hasExceededNumberOfAllowedFiles && this.numberOfAllowedFiles > 1,
|
|
744
745
|
message: `ניתן להעלות עד ${this.numberOfAllowedFiles} קבצים`
|
|
745
746
|
},
|
|
747
|
+
{
|
|
748
|
+
condition: () => !this.isImagesSizeValid,
|
|
749
|
+
message: `אין להעלות תמונות בגודל של מעל ${maxImageHeight} על ${maxImageWidth}`
|
|
750
|
+
},
|
|
746
751
|
];
|
|
747
752
|
constructor(environmentConfig) {
|
|
748
753
|
this.environmentConfig = environmentConfig;
|
|
@@ -791,12 +796,13 @@ class HerumDropZoneComponent {
|
|
|
791
796
|
_onClickFileInput() {
|
|
792
797
|
this.fileInput.nativeElement.click();
|
|
793
798
|
}
|
|
794
|
-
uploadFiles(files) {
|
|
799
|
+
async uploadFiles(files) {
|
|
800
|
+
this.isImagesSizeValid = await this.imagesSizeValidation(files);
|
|
795
801
|
if (this.allowedFileTypes?.length)
|
|
796
802
|
this.isValidUpload = this.filesTypeValidation(files);
|
|
797
803
|
if (this.supportedFilesMimes?.length)
|
|
798
804
|
this.isSupportedFileType = this.supportedFilesValidation(files);
|
|
799
|
-
if (!this.isValidUpload || !this.isSupportedFileType)
|
|
805
|
+
if (!this.isValidUpload || !this.isSupportedFileType || !this.isImagesSizeValid)
|
|
800
806
|
return;
|
|
801
807
|
this.isExceededFilesLength(files);
|
|
802
808
|
if (this.filesList.length === this.numberOfAllowedFiles && files.length < this.numberOfAllowedFiles)
|
|
@@ -814,6 +820,25 @@ class HerumDropZoneComponent {
|
|
|
814
820
|
supportedFilesValidation(files) {
|
|
815
821
|
return files.some((file) => this.supportedFilesMimes.some(supportedFileType => file.type.includes(supportedFileType)));
|
|
816
822
|
}
|
|
823
|
+
imagesSizeValidation(files) {
|
|
824
|
+
let imagesFiles = files.filter(file => filesSuffixes[uploadsProgressMetadataTypes.image].some(suffix => file.type.includes(suffix)));
|
|
825
|
+
const imageSizeChecks = imagesFiles.map(image => new Promise((resolve) => {
|
|
826
|
+
let url = URL.createObjectURL(image);
|
|
827
|
+
let imageObject = new Image();
|
|
828
|
+
imageObject.onload = () => {
|
|
829
|
+
const width = imageObject.naturalWidth;
|
|
830
|
+
const height = imageObject.naturalHeight;
|
|
831
|
+
URL.revokeObjectURL(url);
|
|
832
|
+
resolve(width < maxImageWidth && height < maxImageHeight);
|
|
833
|
+
};
|
|
834
|
+
imageObject.onerror = () => {
|
|
835
|
+
URL.revokeObjectURL(url);
|
|
836
|
+
resolve(false);
|
|
837
|
+
};
|
|
838
|
+
imageObject.src = url;
|
|
839
|
+
}));
|
|
840
|
+
return Promise.all(imageSizeChecks).then(results => results.every(Boolean));
|
|
841
|
+
}
|
|
817
842
|
filesTypeValidation(files) {
|
|
818
843
|
if (files.some((file) => file.type === '' || file.type === undefined))
|
|
819
844
|
return false;
|
|
@@ -856,11 +881,11 @@ class HerumDropZoneComponent {
|
|
|
856
881
|
this.errorMessages = this.errorMessages.filter(errorMessage => errorMessage.message !== requiredFieldMessage);
|
|
857
882
|
}
|
|
858
883
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumDropZoneComponent, deps: [{ token: HERUM_SHARED_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
859
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumDropZoneComponent, isStandalone: false, selector: "herum-drop-zone", inputs: { selectedFiles: "selectedFiles", placeholder: "placeholder", numberOfAllowedFiles: "numberOfAllowedFiles", allowedFileTypes: "allowedFileTypes", supportedFilesMimes: "supportedFilesMimes", supportedFilesTypes: "supportedFilesTypes", requiredField: "requiredField", directionPreview: "directionPreview", type: "type", grow: "grow", fillContainer: "fillContainer", uploadFileSvg: "uploadFileSvg", previewImageUrl: "previewImageUrl", allowToDeleteImage: "allowToDeleteImage" }, outputs: { filesDataEvent: "filesDataEvent" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<button class=\"dropzone\" [class.not-displayed]=\"previewImageUrl\" [class.fill-container]=\"fillContainer\"\r\n [style.height]=\"grow ? '100%' : ''\" (drop)=\"_onUploadDroppedFiles($event)\" (click)=\"_onClickFileInput()\"\r\n (dragover)=\"_onPreventDefault($event)\">\r\n <div svgOnHover class=\"dropzone-content upload-file-border\" [style.height]=\"grow ? '100%' : '130px'\"\r\n [ngClass]=\"{'row-dropzone':type=='row'}\"\r\n [ngStyle]=\"{'justify-content': (filesList?.length || type == 'row') ? 'start' : 'center'}\">\r\n <div class=\"center-icon\" [ngClass]=\"{'upload-file-row-preview':directionPreview==='row' }\"\r\n *ngIf=\"!filesList?.length\">\r\n <span class=\"upload-file-image mb-2\" [style.height]=\"grow ? '60px' : ''\" [style.width]=\"grow ? '60px' : ''\"\r\n [innerHTML]=\"uploadFileSvg | safeHtml\">\r\n </span>\r\n\r\n <div class=\"dropzone-text\" [style.fontSize]=\"grow ? 'large' : ''\"> {{ placeholder }} </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"filesList?.length > 0\">\r\n <div class=\"files-container\" *ngFor=\"let file of filesList; index as i\">\r\n <img [src]=\"getIconPath(file)\" alt=\"#{{i+1}} picture\" />\r\n\r\n <span class=\"file-name truncate\">
|
|
884
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumDropZoneComponent, isStandalone: false, selector: "herum-drop-zone", inputs: { selectedFiles: "selectedFiles", placeholder: "placeholder", numberOfAllowedFiles: "numberOfAllowedFiles", allowedFileTypes: "allowedFileTypes", supportedFilesMimes: "supportedFilesMimes", supportedFilesTypes: "supportedFilesTypes", requiredField: "requiredField", directionPreview: "directionPreview", type: "type", grow: "grow", fillContainer: "fillContainer", uploadFileSvg: "uploadFileSvg", previewImageUrl: "previewImageUrl", allowToDeleteImage: "allowToDeleteImage" }, outputs: { filesDataEvent: "filesDataEvent" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<button class=\"dropzone\" type=\"button\" [class.not-displayed]=\"previewImageUrl\" [class.fill-container]=\"fillContainer\"\r\n [style.height]=\"grow ? '100%' : ''\" (drop)=\"_onUploadDroppedFiles($event)\" (click)=\"_onClickFileInput()\"\r\n (dragover)=\"_onPreventDefault($event)\">\r\n <div svgOnHover class=\"dropzone-content upload-file-border\" [style.height]=\"grow ? '100%' : '130px'\"\r\n [ngClass]=\"{'row-dropzone':type=='row'}\"\r\n [ngStyle]=\"{'justify-content': (filesList?.length || type == 'row') ? 'start' : 'center'}\">\r\n <div class=\"center-icon\" [ngClass]=\"{'upload-file-row-preview':directionPreview==='row' }\"\r\n *ngIf=\"!filesList?.length\">\r\n <span class=\"upload-file-image mb-2\" [style.height]=\"grow ? '60px' : ''\" [style.width]=\"grow ? '60px' : ''\"\r\n [innerHTML]=\"uploadFileSvg | safeHtml\">\r\n </span>\r\n\r\n <div class=\"dropzone-text\" [style.fontSize]=\"grow ? 'large' : ''\"> {{ placeholder }} </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"filesList?.length > 0\">\r\n <div class=\"files-container\" *ngFor=\"let file of filesList; index as i\">\r\n <img [src]=\"getIconPath(file)\" alt=\"#{{i+1}} picture\" />\r\n\r\n <span class=\"file-name truncate\">{{ file?.name }}</span>\r\n\r\n <div class=\"delete-container\" (click)=\"_onRemoveFile(i, $event)\">\r\n <img class=\"delete-button\" src=\"assets/general/secondary-x.svg\">\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <div *ngFor=\"let error of errorMessages\">\r\n <span *ngIf=\"error.condition()\" class=\"error-msg\"\r\n [matTooltip]=\"!isSupportedFileType ? '\u05E1\u05D5\u05D2\u05D9 \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D4\u05E0\u05EA\u05DE\u05DB\u05D9\u05DD: ' + supportedFilesTypes : ''\">\r\n {{ error.message }}\r\n </span>\r\n </div>\r\n\r\n <span (click)=\"$event.stopPropagation()\">\r\n <herum-download-file *ngIf=\"!isSupportedFileType\" [filePath]=\"convertorMediaPath\"\r\n linkText=\"\u05DC\u05D4\u05D5\u05E8\u05D3\u05D4 \u05EA\u05D5\u05DB\u05E0\u05EA \u05D4\u05DE\u05E8\u05EA \u05DE\u05D3\u05D9\u05D4\">\r\n </herum-download-file>\r\n </span>\r\n </div>\r\n</button>\r\n\r\n<div *ngIf=\"previewImageUrl\" class=\"preview-wrapper\">\r\n <div class=\"image-container\">\r\n <img [src]=\"previewImageUrl\" alt=\"Preview\" class=\"preview-image\">\r\n\r\n <button type=\"button\" class=\"remove-button\" aria-label=\"Remove image\" (click)=\"_onRemoveImage()\">\r\n <img class=\"remove-icon\" src=\"assets/general/secondary-x.svg\" alt=Remove />\r\n </button>\r\n </div>\r\n</div>\r\n\r\n<input #fileInput class=\"d-none\" type=\"file\" [accept]=\"parsedAllowedFileTypes\" (change)=\"_onUploadFiles($event)\"\r\n multiple>", styles: [":host{--close-button-size: 12px;display:flex}.dropzone:focus-visible{outline:none}.dropzone:focus-visible .dropzone-content{border-color:var(--icons-color-light-1)}.dropzone{display:flex;align-items:center;flex-direction:column;overflow-y:auto;flex:1;border:none;background-color:transparent;padding:0}.dropzone .dropzone-content{width:100%;display:flex;height:100%;justify-content:center;flex-direction:column;align-items:center}.row-dropzone{display:flex;align-items:center;flex-direction:row!important;gap:8px!important;height:unset!important;padding:8px!important}.upload-file-row-preview{display:flex;gap:8px}.center-icon{align-items:center;display:flex;justify-content:center;flex-direction:column}.dropzone-content:hover{background:var(--item-hover-color);border-color:var(--secondary-color)}.dropzone-content:active{transform:scale(.96)}.dropzone-text{text-align:center}.files-container{display:flex;padding-block-start:10px;gap:10px;width:95%;height:50px;padding:5px;align-items:center}.file-name{width:90%;line-height:1}.delete-container{display:flex;align-items:center;height:100%;width:24px;z-index:3}.delete-button{height:12px;width:12px;position:relative}.upload-file-image{display:flex;align-items:center;justify-content:center;cursor:pointer}.fill-container,.fill-container .dropzone-content{height:100%!important}.not-displayed{display:none}.preview-wrapper{display:inline-block;height:100%;width:100%}.preview-wrapper .image-container{position:relative;display:inline-block;height:100%;width:100%}.preview-wrapper .image-container .preview-image{width:100%;height:100%;border-radius:var(--upload-file-border-radius);object-fit:cover;display:block;position:relative;transition:filter .4s ease}.preview-wrapper .image-container .remove-button{position:absolute;top:8px;left:8px;background:transparent;border:none;width:var(--close-button-size);height:var(--close-button-size);cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:.8;transition:opacity .2s ease}.preview-wrapper .image-container .remove-button:hover{opacity:1}.preview-wrapper .image-container .remove-button .remove-icon{height:var(--close-button-size);width:var(--close-button-size);filter:brightness(0) invert(1)}.preview-wrapper .image-container:hover .preview-image{filter:brightness(50%)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3.SvgOnHoverDirective, selector: "[svgOnHover]", inputs: ["svgOnHover"] }, { kind: "component", type: i2$1.HerumDownloadFileComponent, selector: "herum-download-file", inputs: ["fileId", "filePath", "linkText"], outputs: ["downloadFile"] }, { kind: "pipe", type: i6.SafeHtmlPipe, name: "safeHtml" }] });
|
|
860
885
|
}
|
|
861
886
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumDropZoneComponent, decorators: [{
|
|
862
887
|
type: Component,
|
|
863
|
-
args: [{ standalone: false, selector: 'herum-drop-zone', template: "<button class=\"dropzone\" [class.not-displayed]=\"previewImageUrl\" [class.fill-container]=\"fillContainer\"\r\n [style.height]=\"grow ? '100%' : ''\" (drop)=\"_onUploadDroppedFiles($event)\" (click)=\"_onClickFileInput()\"\r\n (dragover)=\"_onPreventDefault($event)\">\r\n <div svgOnHover class=\"dropzone-content upload-file-border\" [style.height]=\"grow ? '100%' : '130px'\"\r\n [ngClass]=\"{'row-dropzone':type=='row'}\"\r\n [ngStyle]=\"{'justify-content': (filesList?.length || type == 'row') ? 'start' : 'center'}\">\r\n <div class=\"center-icon\" [ngClass]=\"{'upload-file-row-preview':directionPreview==='row' }\"\r\n *ngIf=\"!filesList?.length\">\r\n <span class=\"upload-file-image mb-2\" [style.height]=\"grow ? '60px' : ''\" [style.width]=\"grow ? '60px' : ''\"\r\n [innerHTML]=\"uploadFileSvg | safeHtml\">\r\n </span>\r\n\r\n <div class=\"dropzone-text\" [style.fontSize]=\"grow ? 'large' : ''\"> {{ placeholder }} </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"filesList?.length > 0\">\r\n <div class=\"files-container\" *ngFor=\"let file of filesList; index as i\">\r\n <img [src]=\"getIconPath(file)\" alt=\"#{{i+1}} picture\" />\r\n\r\n <span class=\"file-name truncate\">
|
|
888
|
+
args: [{ standalone: false, selector: 'herum-drop-zone', template: "<button class=\"dropzone\" type=\"button\" [class.not-displayed]=\"previewImageUrl\" [class.fill-container]=\"fillContainer\"\r\n [style.height]=\"grow ? '100%' : ''\" (drop)=\"_onUploadDroppedFiles($event)\" (click)=\"_onClickFileInput()\"\r\n (dragover)=\"_onPreventDefault($event)\">\r\n <div svgOnHover class=\"dropzone-content upload-file-border\" [style.height]=\"grow ? '100%' : '130px'\"\r\n [ngClass]=\"{'row-dropzone':type=='row'}\"\r\n [ngStyle]=\"{'justify-content': (filesList?.length || type == 'row') ? 'start' : 'center'}\">\r\n <div class=\"center-icon\" [ngClass]=\"{'upload-file-row-preview':directionPreview==='row' }\"\r\n *ngIf=\"!filesList?.length\">\r\n <span class=\"upload-file-image mb-2\" [style.height]=\"grow ? '60px' : ''\" [style.width]=\"grow ? '60px' : ''\"\r\n [innerHTML]=\"uploadFileSvg | safeHtml\">\r\n </span>\r\n\r\n <div class=\"dropzone-text\" [style.fontSize]=\"grow ? 'large' : ''\"> {{ placeholder }} </div>\r\n </div>\r\n\r\n <ng-container *ngIf=\"filesList?.length > 0\">\r\n <div class=\"files-container\" *ngFor=\"let file of filesList; index as i\">\r\n <img [src]=\"getIconPath(file)\" alt=\"#{{i+1}} picture\" />\r\n\r\n <span class=\"file-name truncate\">{{ file?.name }}</span>\r\n\r\n <div class=\"delete-container\" (click)=\"_onRemoveFile(i, $event)\">\r\n <img class=\"delete-button\" src=\"assets/general/secondary-x.svg\">\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <div *ngFor=\"let error of errorMessages\">\r\n <span *ngIf=\"error.condition()\" class=\"error-msg\"\r\n [matTooltip]=\"!isSupportedFileType ? '\u05E1\u05D5\u05D2\u05D9 \u05D4\u05E7\u05D1\u05E6\u05D9\u05DD \u05D4\u05E0\u05EA\u05DE\u05DB\u05D9\u05DD: ' + supportedFilesTypes : ''\">\r\n {{ error.message }}\r\n </span>\r\n </div>\r\n\r\n <span (click)=\"$event.stopPropagation()\">\r\n <herum-download-file *ngIf=\"!isSupportedFileType\" [filePath]=\"convertorMediaPath\"\r\n linkText=\"\u05DC\u05D4\u05D5\u05E8\u05D3\u05D4 \u05EA\u05D5\u05DB\u05E0\u05EA \u05D4\u05DE\u05E8\u05EA \u05DE\u05D3\u05D9\u05D4\">\r\n </herum-download-file>\r\n </span>\r\n </div>\r\n</button>\r\n\r\n<div *ngIf=\"previewImageUrl\" class=\"preview-wrapper\">\r\n <div class=\"image-container\">\r\n <img [src]=\"previewImageUrl\" alt=\"Preview\" class=\"preview-image\">\r\n\r\n <button type=\"button\" class=\"remove-button\" aria-label=\"Remove image\" (click)=\"_onRemoveImage()\">\r\n <img class=\"remove-icon\" src=\"assets/general/secondary-x.svg\" alt=Remove />\r\n </button>\r\n </div>\r\n</div>\r\n\r\n<input #fileInput class=\"d-none\" type=\"file\" [accept]=\"parsedAllowedFileTypes\" (change)=\"_onUploadFiles($event)\"\r\n multiple>", styles: [":host{--close-button-size: 12px;display:flex}.dropzone:focus-visible{outline:none}.dropzone:focus-visible .dropzone-content{border-color:var(--icons-color-light-1)}.dropzone{display:flex;align-items:center;flex-direction:column;overflow-y:auto;flex:1;border:none;background-color:transparent;padding:0}.dropzone .dropzone-content{width:100%;display:flex;height:100%;justify-content:center;flex-direction:column;align-items:center}.row-dropzone{display:flex;align-items:center;flex-direction:row!important;gap:8px!important;height:unset!important;padding:8px!important}.upload-file-row-preview{display:flex;gap:8px}.center-icon{align-items:center;display:flex;justify-content:center;flex-direction:column}.dropzone-content:hover{background:var(--item-hover-color);border-color:var(--secondary-color)}.dropzone-content:active{transform:scale(.96)}.dropzone-text{text-align:center}.files-container{display:flex;padding-block-start:10px;gap:10px;width:95%;height:50px;padding:5px;align-items:center}.file-name{width:90%;line-height:1}.delete-container{display:flex;align-items:center;height:100%;width:24px;z-index:3}.delete-button{height:12px;width:12px;position:relative}.upload-file-image{display:flex;align-items:center;justify-content:center;cursor:pointer}.fill-container,.fill-container .dropzone-content{height:100%!important}.not-displayed{display:none}.preview-wrapper{display:inline-block;height:100%;width:100%}.preview-wrapper .image-container{position:relative;display:inline-block;height:100%;width:100%}.preview-wrapper .image-container .preview-image{width:100%;height:100%;border-radius:var(--upload-file-border-radius);object-fit:cover;display:block;position:relative;transition:filter .4s ease}.preview-wrapper .image-container .remove-button{position:absolute;top:8px;left:8px;background:transparent;border:none;width:var(--close-button-size);height:var(--close-button-size);cursor:pointer;display:flex;align-items:center;justify-content:center;opacity:.8;transition:opacity .2s ease}.preview-wrapper .image-container .remove-button:hover{opacity:1}.preview-wrapper .image-container .remove-button .remove-icon{height:var(--close-button-size);width:var(--close-button-size);filter:brightness(0) invert(1)}.preview-wrapper .image-container:hover .preview-image{filter:brightness(50%)}\n"] }]
|
|
864
889
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
865
890
|
type: Inject,
|
|
866
891
|
args: [HERUM_SHARED_CONFIG_TOKEN]
|
|
@@ -953,11 +978,11 @@ class HerumFilesViewerComponent {
|
|
|
953
978
|
this.downloadFile.emit(this.fileData);
|
|
954
979
|
}
|
|
955
980
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumFilesViewerComponent, deps: [{ token: HERUM_SHARED_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
956
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumFilesViewerComponent, isStandalone: false, selector: "herum-files-viewer", inputs: { fileData: "fileData", showDeleteFileButton: "showDeleteFileButton" }, outputs: { downloadFile: "downloadFile", deleteFile: "deleteFile" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"fileType\">\r\n <div class=\"image-container\" *ngSwitchCase=\"'image'\">\r\n <
|
|
981
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumFilesViewerComponent, isStandalone: false, selector: "herum-files-viewer", inputs: { fileData: "fileData", showDeleteFileButton: "showDeleteFileButton" }, outputs: { downloadFile: "downloadFile", deleteFile: "deleteFile" }, usesOnChanges: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"fileType\">\r\n <div class=\"image-container\" *ngSwitchCase=\"'image'\">\r\n <div *ngIf=\"showDeleteFileButton\" class=\"overlay-container\">\r\n <ng-container *ngTemplateOutlet=\"deleteFileButton\">\r\n </ng-container>\r\n </div>\r\n\r\n <img [src]=\"srcPath\">\r\n </div>\r\n\r\n <herum-video-player *ngSwitchCase=\"'video'\" [srcPath]=\"srcPath\" [isResourceInWideMode]=\"true\"></herum-video-player>\r\n\r\n <herum-pdf-viewer *ngSwitchCase=\"'pdf'\" [srcPath]=\"srcPath\" [isResourceInWideMode]=\"true\"></herum-pdf-viewer>\r\n\r\n <herum-audio-player *ngSwitchCase=\"'audio'\" [id]=\"fileData.key\" [bucketName]=\"fileData.bucket\"\r\n [audioFile]=\"fileData.file\">\r\n </herum-audio-player>\r\n\r\n <herum-download-file *ngSwitchDefault linkText=\"\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA, \u05E0\u05D9\u05EA\u05DF \u05DC\u05D4\u05D5\u05E8\u05D3\u05D5\" (downloadFile)=\"_downloadFile()\">\r\n </herum-download-file>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"fileType!=='image'\">\r\n <ng-container *ngTemplateOutlet=\"deleteFileButton\">\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #deleteFileButton>\r\n <button *ngIf=\"showDeleteFileButton\" class=\"delete-file-button\" (click)=\"_onDeleteFile()\">\r\n <img src=\"assets/general/secondary-x.svg\" />\r\n </button>\r\n</ng-template>", styles: [":host{display:flex;position:relative;min-height:0;flex:1 1 0}herum-video-player,herum-pdf-viewer,herum-audio-player,herum-download-file{flex:1}herum-video-player{display:flex}herum-download-file{display:flex;align-items:center;justify-content:center;background-color:var(--icons-color-light-2);border-radius:var(--border-radius);padding:var(--standard-padding)}.image-container:hover .overlay-container{background-color:var(--dark-overlay);visibility:visible}.image-container{position:relative}.image-container .overlay-container{border-radius:var(--border-radius);width:100%;height:100%;position:absolute;visibility:hidden;transition:background-color .5s ease}.image-container img{height:100%;object-fit:contain;width:100%;border-radius:var(--border-radius)}.delete-file-button{background-color:transparent;border:none;position:absolute;top:var(--standard-padding);left:var(--standard-padding)}.delete-file-button img{height:14px;filter:brightness(0) invert(1)}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2$1.HerumDownloadFileComponent, selector: "herum-download-file", inputs: ["fileId", "filePath", "linkText"], outputs: ["downloadFile"] }] });
|
|
957
982
|
}
|
|
958
983
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumFilesViewerComponent, decorators: [{
|
|
959
984
|
type: Component,
|
|
960
|
-
args: [{ standalone: false, selector: 'herum-files-viewer', template: "<ng-container [ngSwitch]=\"fileType\">\r\n <div class=\"image-container\" *ngSwitchCase=\"'image'\">\r\n <
|
|
985
|
+
args: [{ standalone: false, selector: 'herum-files-viewer', template: "<ng-container [ngSwitch]=\"fileType\">\r\n <div class=\"image-container\" *ngSwitchCase=\"'image'\">\r\n <div *ngIf=\"showDeleteFileButton\" class=\"overlay-container\">\r\n <ng-container *ngTemplateOutlet=\"deleteFileButton\">\r\n </ng-container>\r\n </div>\r\n\r\n <img [src]=\"srcPath\">\r\n </div>\r\n\r\n <herum-video-player *ngSwitchCase=\"'video'\" [srcPath]=\"srcPath\" [isResourceInWideMode]=\"true\"></herum-video-player>\r\n\r\n <herum-pdf-viewer *ngSwitchCase=\"'pdf'\" [srcPath]=\"srcPath\" [isResourceInWideMode]=\"true\"></herum-pdf-viewer>\r\n\r\n <herum-audio-player *ngSwitchCase=\"'audio'\" [id]=\"fileData.key\" [bucketName]=\"fileData.bucket\"\r\n [audioFile]=\"fileData.file\">\r\n </herum-audio-player>\r\n\r\n <herum-download-file *ngSwitchDefault linkText=\"\u05D4\u05E7\u05D5\u05D1\u05E5 \u05D0\u05D9\u05E0\u05D5 \u05E0\u05EA\u05DE\u05DA, \u05E0\u05D9\u05EA\u05DF \u05DC\u05D4\u05D5\u05E8\u05D3\u05D5\" (downloadFile)=\"_downloadFile()\">\r\n </herum-download-file>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"fileType!=='image'\">\r\n <ng-container *ngTemplateOutlet=\"deleteFileButton\">\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #deleteFileButton>\r\n <button *ngIf=\"showDeleteFileButton\" class=\"delete-file-button\" (click)=\"_onDeleteFile()\">\r\n <img src=\"assets/general/secondary-x.svg\" />\r\n </button>\r\n</ng-template>", styles: [":host{display:flex;position:relative;min-height:0;flex:1 1 0}herum-video-player,herum-pdf-viewer,herum-audio-player,herum-download-file{flex:1}herum-video-player{display:flex}herum-download-file{display:flex;align-items:center;justify-content:center;background-color:var(--icons-color-light-2);border-radius:var(--border-radius);padding:var(--standard-padding)}.image-container:hover .overlay-container{background-color:var(--dark-overlay);visibility:visible}.image-container{position:relative}.image-container .overlay-container{border-radius:var(--border-radius);width:100%;height:100%;position:absolute;visibility:hidden;transition:background-color .5s ease}.image-container img{height:100%;object-fit:contain;width:100%;border-radius:var(--border-radius)}.delete-file-button{background-color:transparent;border:none;position:absolute;top:var(--standard-padding);left:var(--standard-padding)}.delete-file-button img{height:14px;filter:brightness(0) invert(1)}\n"] }]
|
|
961
986
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
962
987
|
type: Inject,
|
|
963
988
|
args: [HERUM_SHARED_CONFIG_TOKEN]
|
|
@@ -1033,11 +1058,11 @@ class HerumHierarchyTreeNodeComponent {
|
|
|
1033
1058
|
return this.environmentConfig?.environment?.systemIdentifier == system.hadracha;
|
|
1034
1059
|
}
|
|
1035
1060
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumHierarchyTreeNodeComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: HERUM_SHARED_CONFIG_TOKEN }], target: i0.ɵɵFactoryTarget.Component });
|
|
1036
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumHierarchyTreeNodeComponent, isStandalone: false, selector: "herum-hierarchy-tree-node", inputs: { treeNodeData: "treeNodeData", size: "size", expandedMode: "expandedMode", showArrow: "showArrow", showAssignmentsDetails: "showAssignmentsDetails", nodeMenuItems: "nodeMenuItems" }, outputs: { onNodeSelected: "onNodeSelected", onMenuItemSelected: "onMenuItemSelected", onExpand: "onExpand" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"node-container\" [class]=\"systemIdentifier\" [id]=\"'tree-node-container-' + treeNodeData.id\"\r\n *ngIf=\"treeNodeData\" [ngClass]=\"treeNodeData.status + ' ' + size + ' ' + expandedMode\" #nodeTitle appHerumToolTip>\r\n <div class=\"decorative-line\"></div>\r\n\r\n <div class=\"menu-icon-container\" *ngIf=\"nodeMenuItems?.length > 0\">\r\n <img src=\"/assets/hadracha/general/menu-button.svg\" [matMenuTriggerFor]=\"menu\">\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item *ngFor=\"let nodeMenuItem of nodeMenuItems\"\r\n (click)=\"_onMenuItemSelected(nodeMenuItem)\">\r\n <img src=\"/assets/hadracha/structs/{{nodeMenuItem.iconName}}.svg\">\r\n {{ nodeMenuItem.displayText }}\r\n </button>\r\n </mat-menu>\r\n </div>\r\n\r\n <p #treeNodeDataTitle [id]=\"'tree-node-title-' + treeNodeData.id\"\r\n [matTooltip]=\"_isTruncatedTitleElement(nodeTitle) ? treeNodeData.title : ''\" (click)=\"_onNodeSelected()\">\r\n {{treeNodeData.title | ellipsis:treeNodeDataTitle }}\r\n </p>\r\n\r\n <p class=\"totals\" *ngIf=\"showAssignmentsDetails\">\r\n <ng-container *ngIf=\"isHerum\">\r\n <span [matTooltip]='toRPActualAssignmentsDisplayText'> {{this.treeNodeData.totals?.toRPActualAssignments}}\r\n </span> /\r\n <span [matTooltip]='expectedAssignmentsDisplayText'> {{this.treeNodeData.totals?.toRPExpectedAssignments}}\r\n </span>\r\n <span class=\"invalid-assignments\" [ngClass]=\"{'green':this.treeNodeData.totals?.invalidAssignments == 0}\"\r\n [matTooltip]='invalidAssignmentsDisplayText'>\r\n +{{this.treeNodeData.totals?.invalidAssignments}}\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"isHadracha\">\r\n <div class=\"total-value\">\r\n {{this.treeNodeData.totals.total}}\r\n </div>\r\n <p class=\"total-text\">\u05D7\u05E0\u05D9\u05DB\u05D9\u05DD</p>\r\n </ng-container>\r\n </p>\r\n\r\n <br *ngIf=\"!showAssignmentsDetails\">\r\n\r\n <div class=\"row\">\r\n <herum-progress-bar *ngIf=\"!isHadracha\" [percentage]=\"treeNodeData.percentage ? treeNodeData.percentage:0 \"\r\n [negativePercentage]=\"negativePercentage\" [type]=\"'solid'\" [size]=\"'tight'\">\r\n </herum-progress-bar>\r\n\r\n <span class=\"chevron\" *ngIf=\"showArrow\" [ngStyle]=\"{transform: isExpand ? 'rotate(180deg)' : 'none'}\"\r\n [innerHTML]=\"smallChevronSvg | safeHtml\" (click)=\"_onExpand()\">\r\n </span>\r\n </div>\r\n</div>", styles: [":host{border-radius:0 0 var(--border-radius) var(--border-radius)}.node-container{box-shadow:0 0 var(--box-shadow-blur) #00000029!important;display:flex;flex-direction:column;width:170px;gap:4px;padding:4px;border-radius:var(--border-radius);background-color:#fff}.node-container p{margin:0;font-weight:700;font-size:14px}.node-container .row{justify-content:center;align-items:center;position:relative}.node-container .row .chevron{position:absolute;bottom:-20px;background-color:#fff;border-radius:50%;box-shadow:0 0 var(--box-shadow-blur) #00000029!important;width:20px;cursor:pointer;height:20px;z-index:99;padding:1px;stroke:var(--icons-color)}.node-container .totals{font-size:12px;direction:ltr;margin-bottom:8px}.node-container .totals .invalid-assignments{color:var(--error-color);margin-left:8px}.competency-cluster-container{width:100%;display:flex;justify-content:center;align-items:center;padding-bottom:8px}.regular{width:170px}.small{width:140px!important}.close .row .chevron,.open .row .chevron{display:block}.d-flex{justify-content:space-between}.none .row .chevron{display:none}.high{border-top:4px solid var(--icons-color)}.medium{border-top:4px solid orange}.low{border-top:4px solid var(--error-color)}.green{color:var(--icons-color)!important}.decorative-line,.menu-icon-container{display:none}.mat-menu-item{font-family:heebo;font-size:14px;font-weight:400;color:var(--icons-color)}.mat-menu-item:not(:last-child){border-bottom:1px solid var(--divider-color)}::ng-deep .mat-menu-panel{border-radius:var(--border-radius)!important}::ng-deep .mat-menu-content{padding-top:0!important;padding-bottom:0!important}::ng-deep .mat-menu-content button{display:flex;align-items:center;gap:8px;height:36px}.hadracha:hover .menu-icon-container{display:block;height:10px;position:absolute;top:4px;left:12px;z-index:1}.hadracha:hover .menu-icon-container img{height:14px}.hadracha{border-top:none!important;border-radius:0 0 var(--border-radius) var(--border-radius);position:relative}.hadracha .decorative-line{display:block;width:100%;height:4px;background-color:var(--icons-color);border-radius:10px;position:absolute;top:-6px;left:0;z-index:1}.hadracha .totals{display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0}.hadracha .totals .total-value{padding:4px;width:33px;height:33px;background-color:var(--icons-color-light-2);border-radius:var(--border-radius);display:flex;align-items:center;justify-content:center}.hadracha .totals p.total-text{font-size:12px;font-weight:400;text-align:center;margin:0}.hadracha .node-container:hover .totals .total-value{background-color:var(--divider-color)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3.HerumToolTipDirective, selector: "[appHerumToolTip]", inputs: ["tooltipText"] }, { kind: "component", type: i2$1.HerumProgressBarComponent, selector: "herum-progress-bar", inputs: ["percentage", "invalidPercentage", "showPercentage", "percentagePosition", "type", "size", "color", "borderRadius", "total", "showBorder", "thickness"] }, { kind: "pipe", type: i6.SafeHtmlPipe, name: "safeHtml" }, { kind: "pipe", type: i6.EllipsisPipe, name: "ellipsis" }] });
|
|
1061
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.17", type: HerumHierarchyTreeNodeComponent, isStandalone: false, selector: "herum-hierarchy-tree-node", inputs: { treeNodeData: "treeNodeData", size: "size", expandedMode: "expandedMode", showArrow: "showArrow", showAssignmentsDetails: "showAssignmentsDetails", nodeMenuItems: "nodeMenuItems" }, outputs: { onNodeSelected: "onNodeSelected", onMenuItemSelected: "onMenuItemSelected", onExpand: "onExpand" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"node-container\" [class]=\"systemIdentifier\" [id]=\"'tree-node-container-' + treeNodeData.id\"\r\n *ngIf=\"treeNodeData\" [ngClass]=\"treeNodeData.status + ' ' + size + ' ' + expandedMode\" #nodeTitle appHerumToolTip>\r\n <div class=\"decorative-line\"></div>\r\n\r\n <div class=\"menu-icon-container\" *ngIf=\"nodeMenuItems?.length > 0 && treeNodeData.loggedUserPermissions?.edit\">\r\n <img src=\"/assets/hadracha/general/menu-button.svg\" [matMenuTriggerFor]=\"menu\">\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item *ngFor=\"let nodeMenuItem of nodeMenuItems\"\r\n (click)=\"_onMenuItemSelected(nodeMenuItem)\">\r\n <img src=\"/assets/hadracha/structs/{{nodeMenuItem.iconName}}.svg\">\r\n {{ nodeMenuItem.displayText }}\r\n </button>\r\n </mat-menu>\r\n </div>\r\n\r\n <p #treeNodeDataTitle [id]=\"'tree-node-title-' + treeNodeData.id\"\r\n [matTooltip]=\"_isTruncatedTitleElement(nodeTitle) ? treeNodeData.title : ''\" (click)=\"_onNodeSelected()\">\r\n {{treeNodeData.title | ellipsis:treeNodeDataTitle }}\r\n </p>\r\n\r\n <p class=\"totals\" *ngIf=\"showAssignmentsDetails\">\r\n <ng-container *ngIf=\"isHerum\">\r\n <span [matTooltip]='toRPActualAssignmentsDisplayText'> {{this.treeNodeData.totals?.toRPActualAssignments}}\r\n </span> /\r\n <span [matTooltip]='expectedAssignmentsDisplayText'> {{this.treeNodeData.totals?.toRPExpectedAssignments}}\r\n </span>\r\n <span class=\"invalid-assignments\" [ngClass]=\"{'green':this.treeNodeData.totals?.invalidAssignments == 0}\"\r\n [matTooltip]='invalidAssignmentsDisplayText'>\r\n +{{this.treeNodeData.totals?.invalidAssignments}}\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"isHadracha\">\r\n <div class=\"total-value\">\r\n {{this.treeNodeData.totals.total}}\r\n </div>\r\n <p class=\"total-text\">\u05D7\u05E0\u05D9\u05DB\u05D9\u05DD</p>\r\n </ng-container>\r\n </p>\r\n\r\n <br *ngIf=\"!showAssignmentsDetails\">\r\n\r\n <div class=\"row\">\r\n <herum-progress-bar *ngIf=\"!isHadracha\" [percentage]=\"treeNodeData.percentage ? treeNodeData.percentage:0 \"\r\n [negativePercentage]=\"negativePercentage\" [type]=\"'solid'\" [size]=\"'tight'\">\r\n </herum-progress-bar>\r\n\r\n <span class=\"chevron\" *ngIf=\"showArrow\" [ngStyle]=\"{transform: isExpand ? 'rotate(180deg)' : 'none'}\"\r\n [innerHTML]=\"smallChevronSvg | safeHtml\" (click)=\"_onExpand()\">\r\n </span>\r\n </div>\r\n</div>", styles: [":host{border-radius:0 0 var(--border-radius) var(--border-radius)}.node-container{box-shadow:0 0 var(--box-shadow-blur) #00000029!important;display:flex;flex-direction:column;width:170px;gap:4px;padding:4px;border-radius:var(--border-radius);background-color:#fff}.node-container p{margin:0;font-weight:700;font-size:14px}.node-container .row{justify-content:center;align-items:center;position:relative}.node-container .row .chevron{position:absolute;bottom:-20px;background-color:#fff;border-radius:50%;box-shadow:0 0 var(--box-shadow-blur) #00000029!important;width:20px;cursor:pointer;height:20px;z-index:99;padding:1px;stroke:var(--icons-color)}.node-container .totals{font-size:12px;direction:ltr;margin-bottom:8px}.node-container .totals .invalid-assignments{color:var(--error-color);margin-left:8px}.competency-cluster-container{width:100%;display:flex;justify-content:center;align-items:center;padding-bottom:8px}.regular{width:170px}.small{width:140px!important}.close .row .chevron,.open .row .chevron{display:block}.d-flex{justify-content:space-between}.none .row .chevron{display:none}.high{border-top:4px solid var(--icons-color)}.medium{border-top:4px solid orange}.low{border-top:4px solid var(--error-color)}.green{color:var(--icons-color)!important}.decorative-line,.menu-icon-container{display:none}.mat-menu-item{font-family:heebo;font-size:14px;font-weight:400;color:var(--icons-color)}.mat-menu-item:not(:last-child){border-bottom:1px solid var(--divider-color)}::ng-deep .mat-menu-panel{border-radius:var(--border-radius)!important}::ng-deep .mat-menu-content{padding-top:0!important;padding-bottom:0!important}::ng-deep .mat-menu-content button{display:flex;align-items:center;gap:8px;height:36px}.hadracha:hover .menu-icon-container{display:block;height:10px;position:absolute;top:4px;left:12px;z-index:1}.hadracha:hover .menu-icon-container img{height:14px}.hadracha{border-top:none!important;border-radius:0 0 var(--border-radius) var(--border-radius);position:relative}.hadracha .decorative-line{display:block;width:100%;height:4px;background-color:var(--icons-color);border-radius:10px;position:absolute;top:-6px;left:0;z-index:1}.hadracha .totals{display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0}.hadracha .totals .total-value{padding:4px;width:33px;height:33px;background-color:var(--icons-color-light-2);border-radius:var(--border-radius);display:flex;align-items:center;justify-content:center}.hadracha .totals p.total-text{font-size:12px;font-weight:400;text-align:center;margin:0}.hadracha .node-container:hover .totals .total-value{background-color:var(--divider-color)!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i2$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i2$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i3.HerumToolTipDirective, selector: "[appHerumToolTip]", inputs: ["tooltipText"] }, { kind: "component", type: i2$1.HerumProgressBarComponent, selector: "herum-progress-bar", inputs: ["percentage", "invalidPercentage", "showPercentage", "percentagePosition", "type", "size", "color", "borderRadius", "total", "showBorder", "thickness"] }, { kind: "pipe", type: i6.SafeHtmlPipe, name: "safeHtml" }, { kind: "pipe", type: i6.EllipsisPipe, name: "ellipsis" }] });
|
|
1037
1062
|
}
|
|
1038
1063
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: HerumHierarchyTreeNodeComponent, decorators: [{
|
|
1039
1064
|
type: Component,
|
|
1040
|
-
args: [{ standalone: false, selector: 'herum-hierarchy-tree-node', template: "<div class=\"node-container\" [class]=\"systemIdentifier\" [id]=\"'tree-node-container-' + treeNodeData.id\"\r\n *ngIf=\"treeNodeData\" [ngClass]=\"treeNodeData.status + ' ' + size + ' ' + expandedMode\" #nodeTitle appHerumToolTip>\r\n <div class=\"decorative-line\"></div>\r\n\r\n <div class=\"menu-icon-container\" *ngIf=\"nodeMenuItems?.length > 0\">\r\n <img src=\"/assets/hadracha/general/menu-button.svg\" [matMenuTriggerFor]=\"menu\">\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item *ngFor=\"let nodeMenuItem of nodeMenuItems\"\r\n (click)=\"_onMenuItemSelected(nodeMenuItem)\">\r\n <img src=\"/assets/hadracha/structs/{{nodeMenuItem.iconName}}.svg\">\r\n {{ nodeMenuItem.displayText }}\r\n </button>\r\n </mat-menu>\r\n </div>\r\n\r\n <p #treeNodeDataTitle [id]=\"'tree-node-title-' + treeNodeData.id\"\r\n [matTooltip]=\"_isTruncatedTitleElement(nodeTitle) ? treeNodeData.title : ''\" (click)=\"_onNodeSelected()\">\r\n {{treeNodeData.title | ellipsis:treeNodeDataTitle }}\r\n </p>\r\n\r\n <p class=\"totals\" *ngIf=\"showAssignmentsDetails\">\r\n <ng-container *ngIf=\"isHerum\">\r\n <span [matTooltip]='toRPActualAssignmentsDisplayText'> {{this.treeNodeData.totals?.toRPActualAssignments}}\r\n </span> /\r\n <span [matTooltip]='expectedAssignmentsDisplayText'> {{this.treeNodeData.totals?.toRPExpectedAssignments}}\r\n </span>\r\n <span class=\"invalid-assignments\" [ngClass]=\"{'green':this.treeNodeData.totals?.invalidAssignments == 0}\"\r\n [matTooltip]='invalidAssignmentsDisplayText'>\r\n +{{this.treeNodeData.totals?.invalidAssignments}}\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"isHadracha\">\r\n <div class=\"total-value\">\r\n {{this.treeNodeData.totals.total}}\r\n </div>\r\n <p class=\"total-text\">\u05D7\u05E0\u05D9\u05DB\u05D9\u05DD</p>\r\n </ng-container>\r\n </p>\r\n\r\n <br *ngIf=\"!showAssignmentsDetails\">\r\n\r\n <div class=\"row\">\r\n <herum-progress-bar *ngIf=\"!isHadracha\" [percentage]=\"treeNodeData.percentage ? treeNodeData.percentage:0 \"\r\n [negativePercentage]=\"negativePercentage\" [type]=\"'solid'\" [size]=\"'tight'\">\r\n </herum-progress-bar>\r\n\r\n <span class=\"chevron\" *ngIf=\"showArrow\" [ngStyle]=\"{transform: isExpand ? 'rotate(180deg)' : 'none'}\"\r\n [innerHTML]=\"smallChevronSvg | safeHtml\" (click)=\"_onExpand()\">\r\n </span>\r\n </div>\r\n</div>", styles: [":host{border-radius:0 0 var(--border-radius) var(--border-radius)}.node-container{box-shadow:0 0 var(--box-shadow-blur) #00000029!important;display:flex;flex-direction:column;width:170px;gap:4px;padding:4px;border-radius:var(--border-radius);background-color:#fff}.node-container p{margin:0;font-weight:700;font-size:14px}.node-container .row{justify-content:center;align-items:center;position:relative}.node-container .row .chevron{position:absolute;bottom:-20px;background-color:#fff;border-radius:50%;box-shadow:0 0 var(--box-shadow-blur) #00000029!important;width:20px;cursor:pointer;height:20px;z-index:99;padding:1px;stroke:var(--icons-color)}.node-container .totals{font-size:12px;direction:ltr;margin-bottom:8px}.node-container .totals .invalid-assignments{color:var(--error-color);margin-left:8px}.competency-cluster-container{width:100%;display:flex;justify-content:center;align-items:center;padding-bottom:8px}.regular{width:170px}.small{width:140px!important}.close .row .chevron,.open .row .chevron{display:block}.d-flex{justify-content:space-between}.none .row .chevron{display:none}.high{border-top:4px solid var(--icons-color)}.medium{border-top:4px solid orange}.low{border-top:4px solid var(--error-color)}.green{color:var(--icons-color)!important}.decorative-line,.menu-icon-container{display:none}.mat-menu-item{font-family:heebo;font-size:14px;font-weight:400;color:var(--icons-color)}.mat-menu-item:not(:last-child){border-bottom:1px solid var(--divider-color)}::ng-deep .mat-menu-panel{border-radius:var(--border-radius)!important}::ng-deep .mat-menu-content{padding-top:0!important;padding-bottom:0!important}::ng-deep .mat-menu-content button{display:flex;align-items:center;gap:8px;height:36px}.hadracha:hover .menu-icon-container{display:block;height:10px;position:absolute;top:4px;left:12px;z-index:1}.hadracha:hover .menu-icon-container img{height:14px}.hadracha{border-top:none!important;border-radius:0 0 var(--border-radius) var(--border-radius);position:relative}.hadracha .decorative-line{display:block;width:100%;height:4px;background-color:var(--icons-color);border-radius:10px;position:absolute;top:-6px;left:0;z-index:1}.hadracha .totals{display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0}.hadracha .totals .total-value{padding:4px;width:33px;height:33px;background-color:var(--icons-color-light-2);border-radius:var(--border-radius);display:flex;align-items:center;justify-content:center}.hadracha .totals p.total-text{font-size:12px;font-weight:400;text-align:center;margin:0}.hadracha .node-container:hover .totals .total-value{background-color:var(--divider-color)!important}\n"] }]
|
|
1065
|
+
args: [{ standalone: false, selector: 'herum-hierarchy-tree-node', template: "<div class=\"node-container\" [class]=\"systemIdentifier\" [id]=\"'tree-node-container-' + treeNodeData.id\"\r\n *ngIf=\"treeNodeData\" [ngClass]=\"treeNodeData.status + ' ' + size + ' ' + expandedMode\" #nodeTitle appHerumToolTip>\r\n <div class=\"decorative-line\"></div>\r\n\r\n <div class=\"menu-icon-container\" *ngIf=\"nodeMenuItems?.length > 0 && treeNodeData.loggedUserPermissions?.edit\">\r\n <img src=\"/assets/hadracha/general/menu-button.svg\" [matMenuTriggerFor]=\"menu\">\r\n <mat-menu #menu=\"matMenu\">\r\n <button mat-menu-item *ngFor=\"let nodeMenuItem of nodeMenuItems\"\r\n (click)=\"_onMenuItemSelected(nodeMenuItem)\">\r\n <img src=\"/assets/hadracha/structs/{{nodeMenuItem.iconName}}.svg\">\r\n {{ nodeMenuItem.displayText }}\r\n </button>\r\n </mat-menu>\r\n </div>\r\n\r\n <p #treeNodeDataTitle [id]=\"'tree-node-title-' + treeNodeData.id\"\r\n [matTooltip]=\"_isTruncatedTitleElement(nodeTitle) ? treeNodeData.title : ''\" (click)=\"_onNodeSelected()\">\r\n {{treeNodeData.title | ellipsis:treeNodeDataTitle }}\r\n </p>\r\n\r\n <p class=\"totals\" *ngIf=\"showAssignmentsDetails\">\r\n <ng-container *ngIf=\"isHerum\">\r\n <span [matTooltip]='toRPActualAssignmentsDisplayText'> {{this.treeNodeData.totals?.toRPActualAssignments}}\r\n </span> /\r\n <span [matTooltip]='expectedAssignmentsDisplayText'> {{this.treeNodeData.totals?.toRPExpectedAssignments}}\r\n </span>\r\n <span class=\"invalid-assignments\" [ngClass]=\"{'green':this.treeNodeData.totals?.invalidAssignments == 0}\"\r\n [matTooltip]='invalidAssignmentsDisplayText'>\r\n +{{this.treeNodeData.totals?.invalidAssignments}}\r\n </span>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"isHadracha\">\r\n <div class=\"total-value\">\r\n {{this.treeNodeData.totals.total}}\r\n </div>\r\n <p class=\"total-text\">\u05D7\u05E0\u05D9\u05DB\u05D9\u05DD</p>\r\n </ng-container>\r\n </p>\r\n\r\n <br *ngIf=\"!showAssignmentsDetails\">\r\n\r\n <div class=\"row\">\r\n <herum-progress-bar *ngIf=\"!isHadracha\" [percentage]=\"treeNodeData.percentage ? treeNodeData.percentage:0 \"\r\n [negativePercentage]=\"negativePercentage\" [type]=\"'solid'\" [size]=\"'tight'\">\r\n </herum-progress-bar>\r\n\r\n <span class=\"chevron\" *ngIf=\"showArrow\" [ngStyle]=\"{transform: isExpand ? 'rotate(180deg)' : 'none'}\"\r\n [innerHTML]=\"smallChevronSvg | safeHtml\" (click)=\"_onExpand()\">\r\n </span>\r\n </div>\r\n</div>", styles: [":host{border-radius:0 0 var(--border-radius) var(--border-radius)}.node-container{box-shadow:0 0 var(--box-shadow-blur) #00000029!important;display:flex;flex-direction:column;width:170px;gap:4px;padding:4px;border-radius:var(--border-radius);background-color:#fff}.node-container p{margin:0;font-weight:700;font-size:14px}.node-container .row{justify-content:center;align-items:center;position:relative}.node-container .row .chevron{position:absolute;bottom:-20px;background-color:#fff;border-radius:50%;box-shadow:0 0 var(--box-shadow-blur) #00000029!important;width:20px;cursor:pointer;height:20px;z-index:99;padding:1px;stroke:var(--icons-color)}.node-container .totals{font-size:12px;direction:ltr;margin-bottom:8px}.node-container .totals .invalid-assignments{color:var(--error-color);margin-left:8px}.competency-cluster-container{width:100%;display:flex;justify-content:center;align-items:center;padding-bottom:8px}.regular{width:170px}.small{width:140px!important}.close .row .chevron,.open .row .chevron{display:block}.d-flex{justify-content:space-between}.none .row .chevron{display:none}.high{border-top:4px solid var(--icons-color)}.medium{border-top:4px solid orange}.low{border-top:4px solid var(--error-color)}.green{color:var(--icons-color)!important}.decorative-line,.menu-icon-container{display:none}.mat-menu-item{font-family:heebo;font-size:14px;font-weight:400;color:var(--icons-color)}.mat-menu-item:not(:last-child){border-bottom:1px solid var(--divider-color)}::ng-deep .mat-menu-panel{border-radius:var(--border-radius)!important}::ng-deep .mat-menu-content{padding-top:0!important;padding-bottom:0!important}::ng-deep .mat-menu-content button{display:flex;align-items:center;gap:8px;height:36px}.hadracha:hover .menu-icon-container{display:block;height:10px;position:absolute;top:4px;left:12px;z-index:1}.hadracha:hover .menu-icon-container img{height:14px}.hadracha{border-top:none!important;border-radius:0 0 var(--border-radius) var(--border-radius);position:relative}.hadracha .decorative-line{display:block;width:100%;height:4px;background-color:var(--icons-color);border-radius:10px;position:absolute;top:-6px;left:0;z-index:1}.hadracha .totals{display:flex;flex-direction:column;align-items:center;justify-content:center;margin:0}.hadracha .totals .total-value{padding:4px;width:33px;height:33px;background-color:var(--icons-color-light-2);border-radius:var(--border-radius);display:flex;align-items:center;justify-content:center}.hadracha .totals p.total-text{font-size:12px;font-weight:400;text-align:center;margin:0}.hadracha .node-container:hover .totals .total-value{background-color:var(--divider-color)!important}\n"] }]
|
|
1041
1066
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
1042
1067
|
type: Inject,
|
|
1043
1068
|
args: [HERUM_SHARED_CONFIG_TOKEN]
|
|
@@ -1527,6 +1552,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
1527
1552
|
}]
|
|
1528
1553
|
}] });
|
|
1529
1554
|
|
|
1555
|
+
/**
|
|
1556
|
+
* @file Automatically generated by barrelsby.
|
|
1557
|
+
*/
|
|
1558
|
+
|
|
1530
1559
|
/**
|
|
1531
1560
|
* Generated bundle index. Do not edit.
|
|
1532
1561
|
*/
|