@igo2/common 1.13.0 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/images/na.png +0 -0
- package/esm2020/lib/context-menu/context-menu.directive.mjs +18 -3
- package/esm2020/lib/context-menu/context-menu.module.mjs +5 -4
- package/esm2020/lib/context-menu/index.mjs +2 -1
- package/esm2020/lib/context-menu/long-press.directive.mjs +43 -0
- package/esm2020/lib/entity/entity-table/entity-table.component.mjs +15 -11
- package/esm2020/lib/entity/shared/entity.interfaces.mjs +1 -1
- package/esm2020/lib/image/image-error.directive.mjs +35 -0
- package/esm2020/lib/image/image.module.mjs +5 -4
- package/esm2020/lib/image/index.mjs +2 -1
- package/esm2020/lib/image/secure-image.pipe.mjs +9 -4
- package/fesm2015/igo2-common.mjs +120 -15
- package/fesm2015/igo2-common.mjs.map +1 -1
- package/fesm2020/igo2-common.mjs +112 -15
- package/fesm2020/igo2-common.mjs.map +1 -1
- package/lib/context-menu/context-menu.directive.d.ts +1 -1
- package/lib/context-menu/context-menu.module.d.ts +2 -1
- package/lib/context-menu/index.d.ts +1 -0
- package/lib/context-menu/long-press.directive.d.ts +12 -0
- package/lib/entity/entity-table/entity-table.component.d.ts +1 -0
- package/lib/entity/shared/entity.interfaces.d.ts +2 -0
- package/lib/image/image-error.directive.d.ts +11 -0
- package/lib/image/image.module.d.ts +2 -1
- package/lib/image/index.d.ts +1 -0
- package/package.json +4 -4
package/fesm2020/igo2-common.mjs
CHANGED
|
@@ -41,7 +41,7 @@ import * as i2 from '@angular/material/paginator';
|
|
|
41
41
|
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
42
42
|
import * as i5$1 from '@angular/material/input';
|
|
43
43
|
import { MatInputModule } from '@angular/material/input';
|
|
44
|
-
import * as
|
|
44
|
+
import * as i17 from '@angular/material/datepicker';
|
|
45
45
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
46
46
|
import scrollIntoView from 'scroll-into-view-if-needed';
|
|
47
47
|
import * as i1$2 from '@angular/platform-browser';
|
|
@@ -1935,6 +1935,39 @@ EntityTablePaginatorComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ typ
|
|
|
1935
1935
|
args: [MatPaginator, { static: true }]
|
|
1936
1936
|
}] }); })();
|
|
1937
1937
|
|
|
1938
|
+
class ImageErrorDirective {
|
|
1939
|
+
constructor(el) {
|
|
1940
|
+
this.el = el;
|
|
1941
|
+
this.errorImageUrl = '/assets/igo2/common/images/na.png';
|
|
1942
|
+
this.hideError = false;
|
|
1943
|
+
}
|
|
1944
|
+
onError(event) {
|
|
1945
|
+
if (this.hideError) {
|
|
1946
|
+
this.el.nativeElement.style.display = "none";
|
|
1947
|
+
}
|
|
1948
|
+
else {
|
|
1949
|
+
event.target.src = this.errorImageUrl;
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
}
|
|
1953
|
+
ImageErrorDirective.ɵfac = function ImageErrorDirective_Factory(t) { return new (t || ImageErrorDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
1954
|
+
ImageErrorDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ImageErrorDirective, selectors: [["", "igoImageError", ""]], hostBindings: function ImageErrorDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
1955
|
+
i0.ɵɵlistener("error", function ImageErrorDirective_error_HostBindingHandler($event) { return ctx.onError($event); });
|
|
1956
|
+
} }, inputs: { errorImageUrl: "errorImageUrl", hideError: "hideError" } });
|
|
1957
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ImageErrorDirective, [{
|
|
1958
|
+
type: Directive,
|
|
1959
|
+
args: [{
|
|
1960
|
+
selector: '[igoImageError]'
|
|
1961
|
+
}]
|
|
1962
|
+
}], function () { return [{ type: i0.ElementRef }]; }, { errorImageUrl: [{
|
|
1963
|
+
type: Input
|
|
1964
|
+
}], hideError: [{
|
|
1965
|
+
type: Input
|
|
1966
|
+
}], onError: [{
|
|
1967
|
+
type: HostListener,
|
|
1968
|
+
args: ["error", ['$event']]
|
|
1969
|
+
}] }); })();
|
|
1970
|
+
|
|
1938
1971
|
/**
|
|
1939
1972
|
* Directive that handles an entity table row click and selection.
|
|
1940
1973
|
*/
|
|
@@ -2091,7 +2124,8 @@ class SecureImagePipe {
|
|
|
2091
2124
|
transform(url) {
|
|
2092
2125
|
const headers = new HttpHeaders({
|
|
2093
2126
|
'Content-Type': 'text/plain',
|
|
2094
|
-
activityInterceptor: 'false'
|
|
2127
|
+
activityInterceptor: 'false',
|
|
2128
|
+
interceptError: 'false'
|
|
2095
2129
|
});
|
|
2096
2130
|
const regexDepot = new RegExp(this.configService?.getConfig('depot.url') + '.*?(?="|$)');
|
|
2097
2131
|
if (regexDepot.test(url)) {
|
|
@@ -2102,7 +2136,11 @@ class SecureImagePipe {
|
|
|
2102
2136
|
headers,
|
|
2103
2137
|
responseType: 'blob'
|
|
2104
2138
|
})
|
|
2105
|
-
.pipe(
|
|
2139
|
+
.pipe(catchError((err) => {
|
|
2140
|
+
err.error.caught = true;
|
|
2141
|
+
err.error.toDisplay = false;
|
|
2142
|
+
throw err;
|
|
2143
|
+
}), switchMap((blob) => {
|
|
2106
2144
|
return new Observable((observer) => {
|
|
2107
2145
|
const reader = new FileReader();
|
|
2108
2146
|
reader.readAsDataURL(blob);
|
|
@@ -2727,6 +2765,7 @@ function EntityTableComponent_igo_entity_table_paginator_8_Template(rf, ctx) { i
|
|
|
2727
2765
|
const ctx_r5 = i0.ɵɵnextContext();
|
|
2728
2766
|
i0.ɵɵproperty("store", ctx_r5.store)("paginatorOptions", ctx_r5.paginatorOptions)("entitySortChange$", ctx_r5.entitySortChange$);
|
|
2729
2767
|
} }
|
|
2768
|
+
const _c0$c = function (a0) { return { "height": a0 }; };
|
|
2730
2769
|
class EntityTableComponent {
|
|
2731
2770
|
constructor(cdRef, formBuilder, _focusMonitor, _elementRef, ngControl, _parentForm, _controlName, _defaultErrorStateMatcher, dateAdapter) {
|
|
2732
2771
|
this.cdRef = cdRef;
|
|
@@ -2830,6 +2869,7 @@ class EntityTableComponent {
|
|
|
2830
2869
|
* @internal
|
|
2831
2870
|
*/
|
|
2832
2871
|
get fixedHeader() { return this.template.fixedHeader === undefined ? true : this.template.fixedHeader; }
|
|
2872
|
+
get tableHeight() { return this.template.tableHeight ? this.template.tableHeight : 'auto'; }
|
|
2833
2873
|
/**
|
|
2834
2874
|
* Track the selection state to properly display the selection checkboxes
|
|
2835
2875
|
* @internal
|
|
@@ -3404,7 +3444,7 @@ class EntityTableComponent {
|
|
|
3404
3444
|
}
|
|
3405
3445
|
}
|
|
3406
3446
|
EntityTableComponent.ɵfac = function EntityTableComponent_Factory(t) { return new (t || EntityTableComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i1$4.UntypedFormBuilder), i0.ɵɵdirectiveInject(i2$1.FocusMonitor), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$4.NgControl, 10), i0.ɵɵdirectiveInject(i1$4.NgForm, 8), i0.ɵɵdirectiveInject(i1$4.FormControlName, 8), i0.ɵɵdirectiveInject(i3$1.ErrorStateMatcher), i0.ɵɵdirectiveInject(i3$1.DateAdapter)); };
|
|
3407
|
-
EntityTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EntityTableComponent, selectors: [["igo-entity-table"]], inputs: { store: "store", paginator: "paginator", template: "template", scrollBehavior: "scrollBehavior", sortNullsFirst: "sortNullsFirst", withPaginator: "withPaginator", paginatorOptions: "paginatorOptions" }, outputs: { entityClick: "entityClick", entitySelectChange: "entitySelectChange", entitySortChange: "entitySortChange" }, features: [i0.ɵɵProvidersFeature([{ provide: MatFormFieldControl, useExisting: EntityTableComponent }]), i0.ɵɵNgOnChangesFeature], decls: 9, vars:
|
|
3447
|
+
EntityTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EntityTableComponent, selectors: [["igo-entity-table"]], inputs: { store: "store", paginator: "paginator", template: "template", scrollBehavior: "scrollBehavior", sortNullsFirst: "sortNullsFirst", withPaginator: "withPaginator", paginatorOptions: "paginatorOptions" }, outputs: { entityClick: "entityClick", entitySelectChange: "entitySelectChange", entitySortChange: "entitySortChange" }, features: [i0.ɵɵProvidersFeature([{ provide: MatFormFieldControl, useExisting: EntityTableComponent }]), i0.ɵɵNgOnChangesFeature], decls: 9, vars: 11, consts: [[1, "table-container", 3, "ngStyle"], ["mat-table", "", "matSort", "", 3, "ngClass", "dataSource", "trackBy", "matSortChange"], ["matColumnDef", "selectionCheckbox", 1, "mat-cell-checkbox"], ["mat-header-cell", "", 4, "matHeaderCellDef"], ["mat-cell", "", 4, "matCellDef"], [3, "matColumnDef", 4, "ngFor", "ngForOf"], ["mat-header-row", "", 3, "ngClass", 4, "matHeaderRowDef", "matHeaderRowDefSticky"], ["mat-row", "", "igoEntityTableRow", "", 3, "scrollBehavior", "ngClass", "selection", "selected", "select", "click", 4, "matRowDef", "matRowDefColumns"], [3, "store", "paginatorOptions", "entitySortChange$", "paginatorChange", 4, "ngIf"], ["mat-header-cell", ""], [4, "ngIf"], [3, "checked", "indeterminate", "change"], ["mat-cell", ""], [3, "checked", "mousedown", "click", "change"], [3, "matColumnDef"], ["mat-header-cell", "", "mat-sort-header", "", 3, "matTooltip", 4, "matHeaderCellDef"], ["mat-header-cell", "", "mat-sort-header", "", 3, "matTooltip"], ["mat-header-cell", "", 3, "matTooltip", 4, "matHeaderCellDef"], ["mat-header-cell", "", 3, "matTooltip"], [4, "matCellDef"], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", 4, "ngIf", "ngIfElse"], ["isAnUrlDefault", ""], ["mat-cell", "", 1, "mat-cell-text", 3, "ngClass"], ["target", "_blank", "rel", "noopener noreferrer", 3, "href", "click"], ["igoImageError", "", "width", "50", "heigth", "auto", 3, "src", 4, "ngIf", "ngIfElse"], ["notImg", ""], ["igoImageError", "", "width", "50", "heigth", "auto", 3, "src"], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", "innerHTML", 4, "ngIf", "ngIfElse"], ["isAnUrlHTML", ""], ["mat-cell", "", 1, "mat-cell-text", 3, "ngClass", "innerHTML"], ["mat-cell", "", "class", "mat-cell-text edition", 3, "formGroup", "ngClass", 4, "ngIf", "ngIfElse"], ["isUnsanitizedHTML", ""], ["mat-cell", "", 1, "mat-cell-text", "edition", 3, "formGroup", "ngClass"], ["class", "date-picker", 4, "ngIf"], ["matInput", "", "type", "time", "step", "900", 3, "formControlName", "focus", "keypress", "blur", 4, "ngIf"], ["matInput", "", "type", "number", "class", "class_number_edition", 3, "formControlName", "step", "value", "readonly", "required", "min", "max", "input", 4, "ngIf"], ["matInput", "", "type", "text", 3, "formControlName", "value", "readonly", "required", "input", 4, "ngIf"], [3, "formControlName", "checked", "change", 4, "ngIf"], [3, "required", "formControlName", "multiple", "value", "selectionChange", 4, "ngIf"], ["matInput", "", "type", "text", 3, "formControlName", "matAutocomplete", "required", "value", "readonly", 4, "ngIf"], ["panelWidth", "430px", 3, "optionSelected"], ["auto", "matAutocomplete"], [3, "value", 4, "ngFor", "ngForOf"], [1, "date-picker"], ["matSuffix", "", 3, "for"], ["matInput", "", 3, "matDatepicker", "formControlName", "value", "dateChange"], ["picker", ""], ["matInput", "", "type", "time", "step", "900", 3, "formControlName", "focus", "keypress", "blur"], ["matInput", "", "type", "number", 1, "class_number_edition", 3, "formControlName", "step", "value", "readonly", "required", "min", "max", "input"], ["matInput", "", "type", "text", 3, "formControlName", "value", "readonly", "required", "input"], [3, "formControlName", "checked", "change"], [3, "required", "formControlName", "multiple", "value", "selectionChange"], [3, "value", "disabled", 4, "ngFor", "ngForOf"], [3, "value", "disabled"], ["matInput", "", "type", "text", 3, "formControlName", "matAutocomplete", "required", "value", "readonly"], [3, "value"], ["isAnUrlUnsanitizedHTML", ""], ["mat-cell", "", "class", "mat-cell-text", 3, "ngClass", 4, "matCellDef"], [3, "svgIcon", "click", 4, "ngIf"], [3, "svgIcon", 4, "ngIf"], [3, "svgIcon", "click"], [3, "svgIcon"], [4, "ngFor", "ngForOf"], ["igoStopPropagation", "", "mat-icon-button", "", 3, "color", "disabled", "mousedown", 4, "ngIf"], ["igoStopPropagation", "", "mat-mini-fab", "", 3, "color", "disabled", "mousedown", 4, "ngIf"], ["igoStopPropagation", "", "mat-icon-button", "", 3, "color", "disabled", "mousedown"], ["igoStopPropagation", "", "mat-mini-fab", "", 3, "color", "disabled", "mousedown"], ["mat-header-row", "", 3, "ngClass"], ["mat-row", "", "igoEntityTableRow", "", 3, "scrollBehavior", "ngClass", "selection", "selected", "select", "click"], [3, "store", "paginatorOptions", "entitySortChange$", "paginatorChange"]], template: function EntityTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3408
3448
|
i0.ɵɵelementStart(0, "div", 0)(1, "table", 1);
|
|
3409
3449
|
i0.ɵɵlistener("matSortChange", function EntityTableComponent_Template_table_matSortChange_1_listener($event) { return ctx.onSort($event); });
|
|
3410
3450
|
i0.ɵɵelementContainerStart(2, 2);
|
|
@@ -3418,6 +3458,7 @@ EntityTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Entity
|
|
|
3418
3458
|
i0.ɵɵtemplate(8, EntityTableComponent_igo_entity_table_paginator_8_Template, 1, 3, "igo-entity-table-paginator", 8);
|
|
3419
3459
|
i0.ɵɵelementEnd();
|
|
3420
3460
|
} if (rf & 2) {
|
|
3461
|
+
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(9, _c0$c, ctx.tableHeight));
|
|
3421
3462
|
i0.ɵɵadvance(1);
|
|
3422
3463
|
i0.ɵɵproperty("ngClass", ctx.getTableClass())("dataSource", ctx.dataSource)("trackBy", ctx.getTrackByFunction());
|
|
3423
3464
|
i0.ɵɵadvance(4);
|
|
@@ -3428,10 +3469,10 @@ EntityTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Entity
|
|
|
3428
3469
|
i0.ɵɵproperty("matRowDefColumns", ctx.headers);
|
|
3429
3470
|
i0.ɵɵadvance(1);
|
|
3430
3471
|
i0.ɵɵproperty("ngIf", ctx.withPaginator);
|
|
3431
|
-
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i5.MatTable, i5.MatHeaderCellDef, i5.MatHeaderRowDef, i5.MatColumnDef, i5.MatCellDef, i5.MatRowDef, i5.MatHeaderCell, i5.MatCell, i5.MatHeaderRow, i5.MatRow, i6.MatAutocomplete, i6.MatAutocompleteTrigger, i3$1.MatOption, i7.MatSort, i7.MatSortHeader, i3$2.MatIcon, i2$2.MatButton, i10.MatCheckbox, i4.MatSuffix, i3.MatSelect, StopPropagationDirective, EntityTablePaginatorComponent, i1$4.DefaultValueAccessor, i1$4.NumberValueAccessor, i1$4.NgControlStatus, i1$4.NgControlStatusGroup, i1$4.RequiredValidator, i1$4.MinValidator, i1$4.MaxValidator, i1$4.FormGroupDirective, i1$4.FormControlName, i5$1.MatInput,
|
|
3472
|
+
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, i5.MatTable, i5.MatHeaderCellDef, i5.MatHeaderRowDef, i5.MatColumnDef, i5.MatCellDef, i5.MatRowDef, i5.MatHeaderCell, i5.MatCell, i5.MatHeaderRow, i5.MatRow, i6.MatAutocomplete, i6.MatAutocompleteTrigger, i3$1.MatOption, i7.MatSort, i7.MatSortHeader, i3$2.MatIcon, i2$2.MatButton, i10.MatCheckbox, i4.MatSuffix, i3.MatSelect, StopPropagationDirective, EntityTablePaginatorComponent, ImageErrorDirective, i1$4.DefaultValueAccessor, i1$4.NumberValueAccessor, i1$4.NgControlStatus, i1$4.NgControlStatusGroup, i1$4.RequiredValidator, i1$4.MinValidator, i1$4.MaxValidator, i1$4.FormGroupDirective, i1$4.FormControlName, i5$1.MatInput, i17.MatDatepicker, i17.MatDatepickerInput, i17.MatDatepickerToggle, i6$1.MatTooltip, EntityTableRowDirective, i1.AsyncPipe, SanitizeHtmlPipe, SecureImagePipe, i6$2.TranslatePipe], styles: ["[_nghost-%COMP%]{width:100%;height:100%;display:block}.table-compact[_nghost-%COMP%] tr.mat-header-row[_ngcontent-%COMP%], .table-compact[_nghost-%COMP%] .mat-checkbox .mat-checkbox-ripple{height:36px}.table-compact[_nghost-%COMP%] tr.mat-row[_ngcontent-%COMP%], .table-compact[_nghost-%COMP%] .mat-checkbox .mat-checkbox-ripple{height:28px}.table-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.mat-cell-text[_ngcontent-%COMP%]{overflow:hidden;word-wrap:break-word}th.mat-header-cell[_ngcontent-%COMP%], td.mat-cell[_ngcontent-%COMP%], td.mat-footer-cell[_ngcontent-%COMP%]{padding:0 3px}entity-table[_ngcontent-%COMP%] table.igo-entity-table-with-selection[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd;cursor:pointer}table[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:7px}.class_hidden[_ngcontent-%COMP%]{visibility:hidden}.class_display_none[_ngcontent-%COMP%]{display:none}.class_boolean[_ngcontent-%COMP%], .class_icon[_ngcontent-%COMP%], .class_number[_ngcontent-%COMP%]{text-align:center;padding-right:35px!important}.class_sting[_ngcontent-%COMP%], .class_text[_ngcontent-%COMP%], .class_number_edition[_ngcontent-%COMP%]{text-align:left}td.edition[_ngcontent-%COMP%]{background:rgba(166,166,166,.2)}input[_ngcontent-%COMP%]{border-bottom:1px solid darkgrey}"], changeDetection: 0 });
|
|
3432
3473
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EntityTableComponent, [{
|
|
3433
3474
|
type: Component,
|
|
3434
|
-
args: [{ selector: 'igo-entity-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: MatFormFieldControl, useExisting: EntityTableComponent }], template: "<div class=\"table-container\">\n <table mat-table matSort [ngClass]=\"getTableClass()\" [dataSource]=\"dataSource\" [trackBy]=\"getTrackByFunction()\" (matSortChange)=\"onSort($event)\">\n <ng-container matColumnDef=\"selectionCheckbox\" class=\"mat-cell-checkbox\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container *ngIf=\"selectMany\">\n <ng-container *ngIf=\"selectionState$ | async as selectionState\">\n <mat-checkbox (change)=\"onToggleRows($event.checked)\" [checked]=\"selectionState === entityTableSelectionState.All\"\n [indeterminate]=\"selectionState === entityTableSelectionState.Some\">\n </mat-checkbox>\n </ng-container>\n </ng-container>\n </th>\n <td mat-cell *matCellDef=\"let record\">\n <mat-checkbox (mousedown)=\"$event.shiftKey ? $event.preventDefault() : null\" (click)=\"$event.shiftKey ?\n onShiftToggleRow(!rowIsSelected(record), record, $event) : $event.stopPropagation()\" (change)=\"onToggleRow($event.checked,record)\"\n [checked]=\"rowIsSelected(record)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <ng-container [matColumnDef]=\"column.name\" *ngFor=\"let column of template.columns\">\n <ng-container *ngIf=\"columnIsSortable(column)\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header [matTooltip]=\"column.tooltip ? column.tooltip : undefined\">\n {{column.title}}\n </th>\n </ng-container>\n\n <ng-container *ngIf=\"!columnIsSortable(column)\">\n <th mat-header-cell *matHeaderCellDef [matTooltip]=\"column.tooltip ? column.tooltip : undefined\">\n {{column.title}}\n </th>\n </ng-container>\n\n <ng-container *ngIf=\"getColumnRenderer(column) as columnRenderer\">\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.Default\">\n <ng-container *matCellDef=\"let record\">\n <td mat-cell class=\"mat-cell-text\" *ngIf=\"!isUrl(getValue(record, column));else isAnUrlDefault\" [ngClass]=\"getCellClass(record, column)\">\n {{getValue(record, column)}}\n </td>\n <ng-template #isAnUrlDefault>\n <td mat-cell class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <a href=\"{{getValue(record, column)}}\" target='_blank' rel=\"noopener noreferrer\" (click)=\"$event.stopPropagation()\">\n <img *ngIf=\"isImg(getValue(record, column));else notImg\" src=\"{{(getValue(record, column) | secureImage) | async}}\" width=\"50\" heigth=\"auto\">\n <ng-template #notImg><span>{{\n 'igo.common.entity-table.targetHtmlUrl' | translate }}\n </span></ng-template>\n </a>\n </td>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.HTML\">\n <ng-container *matCellDef=\"let record\">\n <td mat-cell class=\"mat-cell-text\" *ngIf=\"!isUrl(getValue(record, column));else isAnUrlHTML\" [ngClass]=\"getCellClass(record, column)\"\n [innerHTML]=\"getValue(record, column)\">\n </td>\n <ng-template #isAnUrlHTML>\n <td mat-cell class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <a href=\"{{getValue(record, column)}}\" target='_blank' rel=\"noopener noreferrer\" (click)=\"$event.stopPropagation()\">\n <img *ngIf=\"isImg(getValue(record, column));else notImg\" src=\"{{(getValue(record, column) | secureImage) | async}}\" width=\"50\" heigth=\"auto\">\n <ng-template #notImg><span>{{ 'igo.geo.targetHtmlUrl' |\n translate }} </span></ng-template>\n </a>\n </td>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.UnsanitizedHTML\">\n <ng-container *matCellDef=\"let record\">\n <td mat-cell class=\"mat-cell-text edition\" [formGroup]=\"formGroup\" *ngIf=\"isEdition(record);else isUnsanitizedHTML\"\n [ngClass]=\"getCellClass(record, column)\">\n <div class=\"date-picker\" *ngIf=\"column.type === 'date'\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <input matInput [matDatepicker]=\"picker\" [formControlName]=\"column.name\" value=\"{{getValue(record, column)}}\"\n (dateChange)=\"onDateChange(column.name, record, $event)\">\n <mat-datepicker #picker></mat-datepicker>\n </div>\n <input matInput type=\"time\" *ngIf=\"column.type === 'time'\" [formControlName]=\"column.name\" step=\"900\" (focus)=\"column.onFocus($event)\"\n (keypress)=\"column.onChange($event)\" (blur)=\"column.onBlur($event)\">\n <input matInput type=\"number\" class=\"class_number_edition\" *ngIf=\"column.type === 'number'\" [formControlName]=\"column.name\" step=\"{{column.step}}\"\n value=\"{{getValue(record,column)}}\" (input)=\"onValueChange(column.name, record, $event)\"\n readonly=\"{{getValidationAttributeValue(column, 'readonly')}}\" required=\"{{getValidationAttributeValue(column, 'mandatory')}}\"\n min=\"{{getValidationAttributeValue(column, 'minValue')}}\" max=\"{{getValidationAttributeValue(column, 'maxValue')}}\">\n <input matInput type=\"text\" *ngIf=\"!column.type || column.type ==='string'\" [formControlName]=\"column.name\"\n value=\"{{getValue(record, column)}}\" (input)=\"onValueChange(column.name, record, $event)\"\n readonly=\"{{getValidationAttributeValue(column, 'readonly')}}\" required=\"{{getValidationAttributeValue(column, 'mandatory')}}\">\n <mat-checkbox *ngIf=\"column.type === 'boolean'\" [formControlName]=\"column.name\" [checked]=\"getValue(record,column)\"\n (change)=\"onBooleanValueChange(column.name, record,$event)\"></mat-checkbox>\n <mat-select *ngIf=\"column.type === 'list'\" required=\"{{getValidationAttributeValue(column, 'mandatory')}}\"\n [formControlName]=\"column.name\" [multiple]=\"column.multiple\" (selectionChange)=\"onSelectValueChange(column.name, record, $event)\"\n [value]=\"getValue(record, column)\">\n <mat-option *ngFor=\"let option of column.domainValues\" [value]=\"option.id\" [disabled]=\"option.disabled\">\n {{ option.value }}\n </mat-option>\n </mat-select>\n <input matInput type=\"text\" [formControlName]=\"column.name\" *ngIf=\"column.type === 'autocomplete'\" [matAutocomplete]=\"auto\"\n required=\"{{getValidationAttributeValue(column, 'mandatory')}}\" value=\"{{getValue(record, column)}}\"\n readonly=\"{{getValidationAttributeValue(column, 'readonly')}}\">\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onAutocompleteValueChange(column, record, $event)\"\n panelWidth=\"430px\">\n <mat-option *ngFor=\"let option of filteredOptions[column.name] | async\"\n [value]=\"option.id\">\n {{ option.value }}\n </mat-option>\n </mat-autocomplete>\n </td>\n <ng-template #isUnsanitizedHTML>\n <td mat-cell class=\"mat-cell-text\" *ngIf=\"!isUrl(getValue(record, column));else isAnUrlUnsanitizedHTML\" [ngClass]=\"getCellClass(record, column)\"\n [innerHTML]=\"getValue(record, column) | sanitizeHtml\">\n </td>\n <ng-template #isAnUrlUnsanitizedHTML>\n <td mat-cell class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <a href=\"{{getValue(record, column)}}\" target='_blank' rel=\"noopener noreferrer\" (click)=\"$event.stopPropagation()\">\n <img *ngIf=\"isImg(getValue(record, column));else notImg\" src=\"{{(getValue(record, column) | secureImage) | async}}\" width=\"50\" heigth=\"auto\">\n <ng-template #notImg><span>{{ 'igo.geo.targetHtmlUrl' | translate }} </span></ng-template>\n </a>\n </td>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.Icon\">\n <td mat-cell *matCellDef=\"let record\" class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <mat-icon *ngIf=\"column.onClick\" svgIcon=\"{{getValue(record, column)|| column.icon}}\" (click)=\"column.onClick($event)\"></mat-icon>\n <mat-icon *ngIf=\"!column.onClick\" svgIcon=\"{{getValue(record, column)|| column.icon}}\"></mat-icon>\n </td>\n </ng-container>\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.ButtonGroup\">\n <ng-container *matCellDef=\"let record\">\n <td mat-cell class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <span *ngFor=\"let button of getValue(record, column)\">\n <ng-container *ngIf=\"isEdition(record) === button.editMode || button.editMode === undefined\">\n <button *ngIf=\"button.style === 'mat-icon-button'\" igoStopPropagation mat-icon-button\n [color]=\"button.color\" (mousedown)=\"onButtonClick(button.click, record)\" [disabled]=\"button.disabled\">\n <mat-icon svgIcon=\"{{button.icon}}\"></mat-icon>\n </button>\n <button *ngIf=\"button.style !== 'mat-icon-button'\" igoStopPropagation mat-mini-fab\n [color]=\"button.color\" (mousedown)=\"onButtonClick(button.click, record)\" [disabled]=\"button.disabled\">\n <mat-icon svgIcon=\"{{button.icon}}\"></mat-icon>\n </button>\n </ng-container>\n </span>\n </td>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"headers; sticky: fixedHeader;\" [ngClass]=\"getHeaderClass()\">\n </tr>\n <tr mat-row igoEntityTableRow *matRowDef=\"let record; columns: headers;\" [scrollBehavior]=\"scrollBehavior\" [ngClass]=\"getRowClass(record)\" [selection]=\"selection\" [selected]=\"rowIsSelected(record)\" (select)=\"onRowSelect(record)\" (click)=\"onRowClick(record)\">\n </tr>\n </table>\n <igo-entity-table-paginator *ngIf=\"withPaginator\" [store]=\"store\" [paginatorOptions]=\"paginatorOptions\" [entitySortChange$]=\"entitySortChange$\" (paginatorChange)=\"paginatorChange($event)\">\n </igo-entity-table-paginator>\n</div>", styles: [":host{width:100%;height:100%;display:block}:host.table-compact tr.mat-header-row,:host.table-compact ::ng-deep .mat-checkbox .mat-checkbox-ripple{height:36px}:host.table-compact tr.mat-row,:host.table-compact ::ng-deep .mat-checkbox .mat-checkbox-ripple{height:28px}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.mat-cell-text{overflow:hidden;word-wrap:break-word}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0 3px}entity-table table.igo-entity-table-with-selection tr:hover{-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd;cursor:pointer}table button{margin:7px}.class_hidden{visibility:hidden}.class_display_none{display:none}.class_boolean,.class_icon,.class_number{text-align:center;padding-right:35px!important}.class_sting,.class_text,.class_number_edition{text-align:left}td.edition{background:rgba(166,166,166,.2)}input{border-bottom:1px solid darkgrey}\n"] }]
|
|
3475
|
+
args: [{ selector: 'igo-entity-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: MatFormFieldControl, useExisting: EntityTableComponent }], template: "<div class=\"table-container\" [ngStyle]=\"{'height': tableHeight}\">\n <table mat-table matSort [ngClass]=\"getTableClass()\" [dataSource]=\"dataSource\" [trackBy]=\"getTrackByFunction()\" (matSortChange)=\"onSort($event)\">\n <ng-container matColumnDef=\"selectionCheckbox\" class=\"mat-cell-checkbox\">\n <th mat-header-cell *matHeaderCellDef>\n <ng-container *ngIf=\"selectMany\">\n <ng-container *ngIf=\"selectionState$ | async as selectionState\">\n <mat-checkbox (change)=\"onToggleRows($event.checked)\" [checked]=\"selectionState === entityTableSelectionState.All\"\n [indeterminate]=\"selectionState === entityTableSelectionState.Some\">\n </mat-checkbox>\n </ng-container>\n </ng-container>\n </th>\n <td mat-cell *matCellDef=\"let record\">\n <mat-checkbox (mousedown)=\"$event.shiftKey ? $event.preventDefault() : null\" (click)=\"$event.shiftKey ?\n onShiftToggleRow(!rowIsSelected(record), record, $event) : $event.stopPropagation()\" (change)=\"onToggleRow($event.checked,record)\"\n [checked]=\"rowIsSelected(record)\">\n </mat-checkbox>\n </td>\n </ng-container>\n\n <ng-container [matColumnDef]=\"column.name\" *ngFor=\"let column of template.columns\">\n <ng-container *ngIf=\"columnIsSortable(column)\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header [matTooltip]=\"column.tooltip ? column.tooltip : undefined\">\n {{column.title}}\n </th>\n </ng-container>\n\n <ng-container *ngIf=\"!columnIsSortable(column)\">\n <th mat-header-cell *matHeaderCellDef [matTooltip]=\"column.tooltip ? column.tooltip : undefined\">\n {{column.title}}\n </th>\n </ng-container>\n\n <ng-container *ngIf=\"getColumnRenderer(column) as columnRenderer\">\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.Default\">\n <ng-container *matCellDef=\"let record\">\n <td mat-cell class=\"mat-cell-text\" *ngIf=\"!isUrl(getValue(record, column));else isAnUrlDefault\" [ngClass]=\"getCellClass(record, column)\">\n {{getValue(record, column)}}\n </td>\n <ng-template #isAnUrlDefault>\n <td mat-cell class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <a href=\"{{getValue(record, column)}}\" target='_blank' rel=\"noopener noreferrer\" (click)=\"$event.stopPropagation()\">\n <img igoImageError *ngIf=\"isImg(getValue(record, column));else notImg\" src=\"{{(getValue(record, column) | secureImage) | async}}\" width=\"50\" heigth=\"auto\">\n <ng-template #notImg><span>{{\n 'igo.common.entity-table.targetHtmlUrl' | translate }}\n </span></ng-template>\n </a>\n </td>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.HTML\">\n <ng-container *matCellDef=\"let record\">\n <td mat-cell class=\"mat-cell-text\" *ngIf=\"!isUrl(getValue(record, column));else isAnUrlHTML\" [ngClass]=\"getCellClass(record, column)\"\n [innerHTML]=\"getValue(record, column)\">\n </td>\n <ng-template #isAnUrlHTML>\n <td mat-cell class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <a href=\"{{getValue(record, column)}}\" target='_blank' rel=\"noopener noreferrer\" (click)=\"$event.stopPropagation()\">\n <img igoImageError *ngIf=\"isImg(getValue(record, column));else notImg\" src=\"{{(getValue(record, column) | secureImage) | async}}\" width=\"50\" heigth=\"auto\">\n <ng-template #notImg><span>{{ 'igo.geo.targetHtmlUrl' |\n translate }} </span></ng-template>\n </a>\n </td>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.UnsanitizedHTML\">\n <ng-container *matCellDef=\"let record\">\n <td mat-cell class=\"mat-cell-text edition\" [formGroup]=\"formGroup\" *ngIf=\"isEdition(record);else isUnsanitizedHTML\"\n [ngClass]=\"getCellClass(record, column)\">\n <div class=\"date-picker\" *ngIf=\"column.type === 'date'\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <input matInput [matDatepicker]=\"picker\" [formControlName]=\"column.name\" value=\"{{getValue(record, column)}}\"\n (dateChange)=\"onDateChange(column.name, record, $event)\">\n <mat-datepicker #picker></mat-datepicker>\n </div>\n <input matInput type=\"time\" *ngIf=\"column.type === 'time'\" [formControlName]=\"column.name\" step=\"900\" (focus)=\"column.onFocus($event)\"\n (keypress)=\"column.onChange($event)\" (blur)=\"column.onBlur($event)\">\n <input matInput type=\"number\" class=\"class_number_edition\" *ngIf=\"column.type === 'number'\" [formControlName]=\"column.name\" step=\"{{column.step}}\"\n value=\"{{getValue(record,column)}}\" (input)=\"onValueChange(column.name, record, $event)\"\n readonly=\"{{getValidationAttributeValue(column, 'readonly')}}\" required=\"{{getValidationAttributeValue(column, 'mandatory')}}\"\n min=\"{{getValidationAttributeValue(column, 'minValue')}}\" max=\"{{getValidationAttributeValue(column, 'maxValue')}}\">\n <input matInput type=\"text\" *ngIf=\"!column.type || column.type ==='string'\" [formControlName]=\"column.name\"\n value=\"{{getValue(record, column)}}\" (input)=\"onValueChange(column.name, record, $event)\"\n readonly=\"{{getValidationAttributeValue(column, 'readonly')}}\" required=\"{{getValidationAttributeValue(column, 'mandatory')}}\">\n <mat-checkbox *ngIf=\"column.type === 'boolean'\" [formControlName]=\"column.name\" [checked]=\"getValue(record,column)\"\n (change)=\"onBooleanValueChange(column.name, record,$event)\"></mat-checkbox>\n <mat-select *ngIf=\"column.type === 'list'\" required=\"{{getValidationAttributeValue(column, 'mandatory')}}\"\n [formControlName]=\"column.name\" [multiple]=\"column.multiple\" (selectionChange)=\"onSelectValueChange(column.name, record, $event)\"\n [value]=\"getValue(record, column)\">\n <mat-option *ngFor=\"let option of column.domainValues\" [value]=\"option.id\" [disabled]=\"option.disabled\">\n {{ option.value }}\n </mat-option>\n </mat-select>\n <input matInput type=\"text\" [formControlName]=\"column.name\" *ngIf=\"column.type === 'autocomplete'\" [matAutocomplete]=\"auto\"\n required=\"{{getValidationAttributeValue(column, 'mandatory')}}\" value=\"{{getValue(record, column)}}\"\n readonly=\"{{getValidationAttributeValue(column, 'readonly')}}\">\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"onAutocompleteValueChange(column, record, $event)\"\n panelWidth=\"430px\">\n <mat-option *ngFor=\"let option of filteredOptions[column.name] | async\"\n [value]=\"option.id\">\n {{ option.value }}\n </mat-option>\n </mat-autocomplete>\n </td>\n <ng-template #isUnsanitizedHTML>\n <td mat-cell class=\"mat-cell-text\" *ngIf=\"!isUrl(getValue(record, column));else isAnUrlUnsanitizedHTML\" [ngClass]=\"getCellClass(record, column)\"\n [innerHTML]=\"getValue(record, column) | sanitizeHtml\">\n </td>\n <ng-template #isAnUrlUnsanitizedHTML>\n <td mat-cell class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <a href=\"{{getValue(record, column)}}\" target='_blank' rel=\"noopener noreferrer\" (click)=\"$event.stopPropagation()\">\n <img igoImageError *ngIf=\"isImg(getValue(record, column));else notImg\" src=\"{{(getValue(record, column) | secureImage) | async}}\" width=\"50\" heigth=\"auto\">\n <ng-template #notImg><span>{{ 'igo.geo.targetHtmlUrl' | translate }} </span></ng-template>\n </a>\n </td>\n </ng-template>\n </ng-template>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.Icon\">\n <td mat-cell *matCellDef=\"let record\" class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <mat-icon *ngIf=\"column.onClick\" svgIcon=\"{{getValue(record, column)|| column.icon}}\" (click)=\"column.onClick($event)\"></mat-icon>\n <mat-icon *ngIf=\"!column.onClick\" svgIcon=\"{{getValue(record, column)|| column.icon}}\"></mat-icon>\n </td>\n </ng-container>\n <ng-container *ngIf=\"columnRenderer === entityTableColumnRenderer.ButtonGroup\">\n <ng-container *matCellDef=\"let record\">\n <td mat-cell class=\"mat-cell-text\" [ngClass]=\"getCellClass(record, column)\">\n <span *ngFor=\"let button of getValue(record, column)\">\n <ng-container *ngIf=\"isEdition(record) === button.editMode || button.editMode === undefined\">\n <button *ngIf=\"button.style === 'mat-icon-button'\" igoStopPropagation mat-icon-button\n [color]=\"button.color\" (mousedown)=\"onButtonClick(button.click, record)\" [disabled]=\"button.disabled\">\n <mat-icon svgIcon=\"{{button.icon}}\"></mat-icon>\n </button>\n <button *ngIf=\"button.style !== 'mat-icon-button'\" igoStopPropagation mat-mini-fab\n [color]=\"button.color\" (mousedown)=\"onButtonClick(button.click, record)\" [disabled]=\"button.disabled\">\n <mat-icon svgIcon=\"{{button.icon}}\"></mat-icon>\n </button>\n </ng-container>\n </span>\n </td>\n </ng-container>\n </ng-container>\n </ng-container>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"headers; sticky: fixedHeader;\" [ngClass]=\"getHeaderClass()\">\n </tr>\n <tr mat-row igoEntityTableRow *matRowDef=\"let record; columns: headers;\" [scrollBehavior]=\"scrollBehavior\" [ngClass]=\"getRowClass(record)\" [selection]=\"selection\" [selected]=\"rowIsSelected(record)\" (select)=\"onRowSelect(record)\" (click)=\"onRowClick(record)\">\n </tr>\n </table>\n <igo-entity-table-paginator *ngIf=\"withPaginator\" [store]=\"store\" [paginatorOptions]=\"paginatorOptions\" [entitySortChange$]=\"entitySortChange$\" (paginatorChange)=\"paginatorChange($event)\">\n </igo-entity-table-paginator>\n</div>", styles: [":host{width:100%;height:100%;display:block}:host.table-compact tr.mat-header-row,:host.table-compact ::ng-deep .mat-checkbox .mat-checkbox-ripple{height:36px}:host.table-compact tr.mat-row,:host.table-compact ::ng-deep .mat-checkbox .mat-checkbox-ripple{height:28px}.table-container{display:flex;flex-direction:column;height:100%;overflow:auto;flex:1 1 auto}.mat-cell-text{overflow:hidden;word-wrap:break-word}th.mat-header-cell,td.mat-cell,td.mat-footer-cell{padding:0 3px}entity-table table.igo-entity-table-with-selection tr:hover{-o-box-shadow:2px 0px 2px 0px #dddddd;box-shadow:2px 0 2px #ddd;cursor:pointer}table button{margin:7px}.class_hidden{visibility:hidden}.class_display_none{display:none}.class_boolean,.class_icon,.class_number{text-align:center;padding-right:35px!important}.class_sting,.class_text,.class_number_edition{text-align:left}td.edition{background:rgba(166,166,166,.2)}input{border-bottom:1px solid darkgrey}\n"] }]
|
|
3435
3476
|
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$4.UntypedFormBuilder }, { type: i2$1.FocusMonitor }, { type: i0.ElementRef }, { type: i1$4.NgControl, decorators: [{
|
|
3436
3477
|
type: Optional
|
|
3437
3478
|
}, {
|
|
@@ -4623,7 +4664,19 @@ class ContextMenuDirective {
|
|
|
4623
4664
|
this.menuPosition = new EventEmitter();
|
|
4624
4665
|
}
|
|
4625
4666
|
onContextMenu(e) {
|
|
4626
|
-
|
|
4667
|
+
let x;
|
|
4668
|
+
let y;
|
|
4669
|
+
if (e instanceof TouchEvent) {
|
|
4670
|
+
x = e.touches[0].pageX;
|
|
4671
|
+
y = e.touches[0].pageY;
|
|
4672
|
+
}
|
|
4673
|
+
else if (e instanceof MouseEvent) {
|
|
4674
|
+
x = e.x;
|
|
4675
|
+
y = e.y;
|
|
4676
|
+
}
|
|
4677
|
+
if (!x || !y) {
|
|
4678
|
+
return;
|
|
4679
|
+
}
|
|
4627
4680
|
this.close();
|
|
4628
4681
|
e.preventDefault();
|
|
4629
4682
|
this.menuPosition.emit({ x, y });
|
|
@@ -4680,7 +4733,7 @@ class ContextMenuDirective {
|
|
|
4680
4733
|
}
|
|
4681
4734
|
ContextMenuDirective.ɵfac = function ContextMenuDirective_Factory(t) { return new (t || ContextMenuDirective)(i0.ɵɵdirectiveInject(i1$5.Overlay), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
4682
4735
|
ContextMenuDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ContextMenuDirective, selectors: [["", "igoContextMenu", ""]], hostBindings: function ContextMenuDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
4683
|
-
i0.ɵɵlistener("contextmenu", function ContextMenuDirective_contextmenu_HostBindingHandler($event) { return ctx.onContextMenu($event); });
|
|
4736
|
+
i0.ɵɵlistener("longpress", function ContextMenuDirective_longpress_HostBindingHandler($event) { return ctx.onContextMenu($event); })("contextmenu", function ContextMenuDirective_contextmenu_HostBindingHandler($event) { return ctx.onContextMenu($event); });
|
|
4684
4737
|
} }, inputs: { menuContext: ["igoContextMenu", "menuContext"] }, outputs: { menuPosition: "menuPosition" } });
|
|
4685
4738
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextMenuDirective, [{
|
|
4686
4739
|
type: Directive,
|
|
@@ -4693,10 +4746,54 @@ ContextMenuDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: Contex
|
|
|
4693
4746
|
}], menuPosition: [{
|
|
4694
4747
|
type: Output
|
|
4695
4748
|
}], onContextMenu: [{
|
|
4749
|
+
type: HostListener,
|
|
4750
|
+
args: ['longpress', ['$event']]
|
|
4751
|
+
}, {
|
|
4696
4752
|
type: HostListener,
|
|
4697
4753
|
args: ['contextmenu', ['$event']]
|
|
4698
4754
|
}] }); })();
|
|
4699
4755
|
|
|
4756
|
+
class LongPressDirective {
|
|
4757
|
+
constructor() {
|
|
4758
|
+
this.longpress = new EventEmitter();
|
|
4759
|
+
}
|
|
4760
|
+
touchstart(e) {
|
|
4761
|
+
this.touchTimeout = setTimeout(() => {
|
|
4762
|
+
this.longpress.emit(e);
|
|
4763
|
+
}, 400);
|
|
4764
|
+
}
|
|
4765
|
+
touchend() {
|
|
4766
|
+
this.touchEnd();
|
|
4767
|
+
}
|
|
4768
|
+
touchEnd() {
|
|
4769
|
+
clearTimeout(this.touchTimeout);
|
|
4770
|
+
}
|
|
4771
|
+
}
|
|
4772
|
+
LongPressDirective.ɵfac = function LongPressDirective_Factory(t) { return new (t || LongPressDirective)(); };
|
|
4773
|
+
LongPressDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: LongPressDirective, selectors: [["", "igoLongPress", ""]], hostBindings: function LongPressDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
4774
|
+
i0.ɵɵlistener("touchstart", function LongPressDirective_touchstart_HostBindingHandler($event) { return ctx.touchstart($event); })("touchmove", function LongPressDirective_touchmove_HostBindingHandler() { return ctx.touchend(); })("touchcancel", function LongPressDirective_touchcancel_HostBindingHandler() { return ctx.touchend(); })("touchend", function LongPressDirective_touchend_HostBindingHandler() { return ctx.touchend(); });
|
|
4775
|
+
} }, outputs: { longpress: "longpress" } });
|
|
4776
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LongPressDirective, [{
|
|
4777
|
+
type: Directive,
|
|
4778
|
+
args: [{
|
|
4779
|
+
selector: '[igoLongPress]'
|
|
4780
|
+
}]
|
|
4781
|
+
}], function () { return []; }, { longpress: [{
|
|
4782
|
+
type: Output
|
|
4783
|
+
}], touchstart: [{
|
|
4784
|
+
type: HostListener,
|
|
4785
|
+
args: ['touchstart', ['$event']]
|
|
4786
|
+
}], touchend: [{
|
|
4787
|
+
type: HostListener,
|
|
4788
|
+
args: ['touchmove']
|
|
4789
|
+
}, {
|
|
4790
|
+
type: HostListener,
|
|
4791
|
+
args: ['touchcancel']
|
|
4792
|
+
}, {
|
|
4793
|
+
type: HostListener,
|
|
4794
|
+
args: ['touchend']
|
|
4795
|
+
}] }); })();
|
|
4796
|
+
|
|
4700
4797
|
class IgoContextMenuModule {
|
|
4701
4798
|
static forRoot() {
|
|
4702
4799
|
return {
|
|
@@ -4712,11 +4809,11 @@ IgoContextMenuModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
|
|
|
4712
4809
|
type: NgModule,
|
|
4713
4810
|
args: [{
|
|
4714
4811
|
imports: [],
|
|
4715
|
-
declarations: [ContextMenuDirective],
|
|
4716
|
-
exports: [ContextMenuDirective]
|
|
4812
|
+
declarations: [ContextMenuDirective, LongPressDirective],
|
|
4813
|
+
exports: [ContextMenuDirective, LongPressDirective]
|
|
4717
4814
|
}]
|
|
4718
4815
|
}], null, null); })();
|
|
4719
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoContextMenuModule, { declarations: [ContextMenuDirective], exports: [ContextMenuDirective] }); })();
|
|
4816
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoContextMenuModule, { declarations: [ContextMenuDirective, LongPressDirective], exports: [ContextMenuDirective, LongPressDirective] }); })();
|
|
4720
4817
|
|
|
4721
4818
|
class CustomHtmlComponent {
|
|
4722
4819
|
constructor() {
|
|
@@ -6518,11 +6615,11 @@ IgoImageModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({});
|
|
|
6518
6615
|
type: NgModule,
|
|
6519
6616
|
args: [{
|
|
6520
6617
|
imports: [],
|
|
6521
|
-
declarations: [SecureImagePipe],
|
|
6522
|
-
exports: [SecureImagePipe]
|
|
6618
|
+
declarations: [SecureImagePipe, ImageErrorDirective],
|
|
6619
|
+
exports: [SecureImagePipe, ImageErrorDirective]
|
|
6523
6620
|
}]
|
|
6524
6621
|
}], null, null); })();
|
|
6525
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoImageModule, { declarations: [SecureImagePipe], exports: [SecureImagePipe] }); })();
|
|
6622
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(IgoImageModule, { declarations: [SecureImagePipe, ImageErrorDirective], exports: [SecureImagePipe, ImageErrorDirective] }); })();
|
|
6526
6623
|
|
|
6527
6624
|
/**
|
|
6528
6625
|
* @ignore
|
|
@@ -9484,5 +9581,5 @@ class Workspace {
|
|
|
9484
9581
|
* Generated bundle index. Do not edit.
|
|
9485
9582
|
*/
|
|
9486
9583
|
|
|
9487
|
-
export { ActionStore, ActionbarComponent, ActionbarMode, BackdropComponent, ClickoutDirective, ClonePipe, CollapseDirective, CollapsibleComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuDirective, CustomHtmlComponent, DOMService, DragAndDropDirective, DynamicComponent, DynamicComponentService, DynamicOutletComponent, EntityOperationType, EntitySelectorComponent, EntityStateManager, EntityStore, EntityStoreFilterCustomFuncStrategy, EntityStoreFilterSelectionStrategy, EntityStoreStrategy, EntityStoreWatcher, EntityTableColumnRenderer, EntityTableComponent, EntityTablePaginatorComponent, EntityTableScrollBehavior, EntityTableSelectionState, EntityTransaction, EntityView, FlexibleComponent, FormComponent, FormFieldComponent, FormFieldSelectComponent, FormFieldService, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent, FormService, HomeButtonComponent, IgoActionModule, IgoActionbarModule, IgoBackdropModule, IgoBadgeIconDirective, IgoClickoutModule, IgoCloneModule, IgoCollapsibleModule, IgoConfirmDialogModule, IgoContextMenuModule, IgoCustomHtmlModule, IgoDOMModule, IgoDrapDropModule, IgoDynamicComponentModule, IgoDynamicOutletModule, IgoEntityModule, IgoEntitySelectorModule, IgoEntityTableModule, IgoEntityTablePaginatorModule, IgoFlexibleModule, IgoFormFieldComponent, IgoFormFieldModule, IgoFormFormModule, IgoFormGroupModule, IgoFormModule, IgoHomeButtonModule, IgoImageModule, IgoInteractiveTourModule, IgoJsonDialogModule, IgoKeyValueModule, IgoListModule, IgoMatBadgeIconModule, IgoPanelModule, IgoSidenavModule, IgoSpinnerModule, IgoStopPropagationModule, IgoTableModule, IgoToolModule, IgoToolboxModule, IgoWidgetModule, IgoWidgetOutletModule, IgoWorkspaceModule, IgoWorkspaceSelectorModule, IgoWorkspaceWidgetOutletModule, InteractiveTourComponent, InteractiveTourLoader, InteractiveTourService, JsonDialogComponent, JsonDialogService, KeyValuePipe, ListComponent, ListItemDirective, PanelComponent, SanitizeHtmlPipe, SecureImagePipe, SidenavShimDirective, SpinnerActivityDirective, SpinnerComponent, StopDropPropagationDirective, StopPropagationDirective, TableActionColor, TableComponent, TableDataSource, TableDatabase, ToolComponent, ToolService, Toolbox, ToolboxColor, ToolboxComponent, Widget, WidgetOutletComponent, WidgetService, Workspace, WorkspaceSelectorComponent, WorkspaceStore, WorkspaceWidgetOutletComponent, formControlIsRequired, getAllFormFields, getControlErrorMessage, getDefaultErrorMessages, getEntityIcon, getEntityId, getEntityProperty, getEntityRevision, getEntityTitle, getEntityTitleHtml, getFormFieldByName };
|
|
9584
|
+
export { ActionStore, ActionbarComponent, ActionbarMode, BackdropComponent, ClickoutDirective, ClonePipe, CollapseDirective, CollapsibleComponent, ConfirmDialogComponent, ConfirmDialogService, ContextMenuDirective, CustomHtmlComponent, DOMService, DragAndDropDirective, DynamicComponent, DynamicComponentService, DynamicOutletComponent, EntityOperationType, EntitySelectorComponent, EntityStateManager, EntityStore, EntityStoreFilterCustomFuncStrategy, EntityStoreFilterSelectionStrategy, EntityStoreStrategy, EntityStoreWatcher, EntityTableColumnRenderer, EntityTableComponent, EntityTablePaginatorComponent, EntityTableScrollBehavior, EntityTableSelectionState, EntityTransaction, EntityView, FlexibleComponent, FormComponent, FormFieldComponent, FormFieldSelectComponent, FormFieldService, FormFieldTextComponent, FormFieldTextareaComponent, FormGroupComponent, FormService, HomeButtonComponent, IgoActionModule, IgoActionbarModule, IgoBackdropModule, IgoBadgeIconDirective, IgoClickoutModule, IgoCloneModule, IgoCollapsibleModule, IgoConfirmDialogModule, IgoContextMenuModule, IgoCustomHtmlModule, IgoDOMModule, IgoDrapDropModule, IgoDynamicComponentModule, IgoDynamicOutletModule, IgoEntityModule, IgoEntitySelectorModule, IgoEntityTableModule, IgoEntityTablePaginatorModule, IgoFlexibleModule, IgoFormFieldComponent, IgoFormFieldModule, IgoFormFormModule, IgoFormGroupModule, IgoFormModule, IgoHomeButtonModule, IgoImageModule, IgoInteractiveTourModule, IgoJsonDialogModule, IgoKeyValueModule, IgoListModule, IgoMatBadgeIconModule, IgoPanelModule, IgoSidenavModule, IgoSpinnerModule, IgoStopPropagationModule, IgoTableModule, IgoToolModule, IgoToolboxModule, IgoWidgetModule, IgoWidgetOutletModule, IgoWorkspaceModule, IgoWorkspaceSelectorModule, IgoWorkspaceWidgetOutletModule, ImageErrorDirective, InteractiveTourComponent, InteractiveTourLoader, InteractiveTourService, JsonDialogComponent, JsonDialogService, KeyValuePipe, ListComponent, ListItemDirective, LongPressDirective, PanelComponent, SanitizeHtmlPipe, SecureImagePipe, SidenavShimDirective, SpinnerActivityDirective, SpinnerComponent, StopDropPropagationDirective, StopPropagationDirective, TableActionColor, TableComponent, TableDataSource, TableDatabase, ToolComponent, ToolService, Toolbox, ToolboxColor, ToolboxComponent, Widget, WidgetOutletComponent, WidgetService, Workspace, WorkspaceSelectorComponent, WorkspaceStore, WorkspaceWidgetOutletComponent, formControlIsRequired, getAllFormFields, getControlErrorMessage, getDefaultErrorMessages, getEntityIcon, getEntityId, getEntityProperty, getEntityRevision, getEntityTitle, getEntityTitleHtml, getFormFieldByName };
|
|
9488
9585
|
//# sourceMappingURL=igo2-common.mjs.map
|