zek 17.3.8 → 17.3.10
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/esm2022/lib/components/base.component.mjs +11 -10
- package/esm2022/lib/components/edit-base.component.mjs +14 -22
- package/esm2022/lib/components/list-base.component.mjs +9 -10
- package/esm2022/lib/modules/select2-multiple/select2-multiple.mjs +8 -5
- package/esm2022/lib/zek.module.mjs +1 -1
- package/fesm2022/zek.mjs +34 -37
- package/fesm2022/zek.mjs.map +1 -1
- package/lib/components/base.component.d.ts +1 -1
- package/lib/components/edit-base.component.d.ts +3 -4
- package/lib/components/list-base.component.d.ts +3 -4
- package/lib/modules/select2-multiple/select2-multiple.d.ts +2 -1
- package/package.json +1 -1
package/fesm2022/zek.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, InjectionToken, Inject, Directive, inject, Input, EventEmitter, Output, ViewChild, Pipe, Component, forwardRef, NgModule, HostListener, ViewEncapsulation, ChangeDetectionStrategy, Optional } from '@angular/core';
|
|
3
|
-
import { BehaviorSubject, Subject, catchError, of, firstValueFrom, timer } from 'rxjs';
|
|
4
3
|
import * as i1 from '@angular/router';
|
|
5
|
-
import { NavigationStart, RouterModule } from '@angular/router';
|
|
4
|
+
import { NavigationStart, ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
5
|
+
import { BehaviorSubject, Subject, catchError, of, firstValueFrom, timer } from 'rxjs';
|
|
6
6
|
import * as i1$1 from '@ngx-translate/core';
|
|
7
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
7
|
+
import { TranslateService, TranslateModule } from '@ngx-translate/core';
|
|
8
8
|
import * as i1$2 from '@angular/common/http';
|
|
9
9
|
import { HttpParams, HttpHeaders, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
10
10
|
import * as i1$3 from '@angular/common';
|
|
@@ -1936,10 +1936,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
1936
1936
|
}] });
|
|
1937
1937
|
|
|
1938
1938
|
class BaseComponent extends CoreComponent {
|
|
1939
|
-
constructor(
|
|
1940
|
-
super();
|
|
1941
|
-
this.
|
|
1942
|
-
this.
|
|
1939
|
+
constructor() {
|
|
1940
|
+
super(...arguments);
|
|
1941
|
+
this._api = inject(WebApiClient);
|
|
1942
|
+
this.route = inject(ActivatedRoute);
|
|
1943
|
+
this.router = inject(Router);
|
|
1943
1944
|
this._readOnly = false;
|
|
1944
1945
|
this._url = null;
|
|
1945
1946
|
}
|
|
@@ -1983,7 +1984,7 @@ class BaseComponent extends CoreComponent {
|
|
|
1983
1984
|
return;
|
|
1984
1985
|
}
|
|
1985
1986
|
const template = split[1];
|
|
1986
|
-
let api = inject(WebApiClient);
|
|
1987
|
+
// let api = inject(WebApiClient);
|
|
1987
1988
|
let actionName;
|
|
1988
1989
|
switch (printType) {
|
|
1989
1990
|
case PrintType.Pdf:
|
|
@@ -1993,18 +1994,18 @@ class BaseComponent extends CoreComponent {
|
|
|
1993
1994
|
actionName = 'ShowIdLink';
|
|
1994
1995
|
break;
|
|
1995
1996
|
}
|
|
1996
|
-
|
|
1997
|
+
this._api.getString(`api/Reports/${actionName}`, { template, id }).subscribe(url => {
|
|
1997
1998
|
if (url) {
|
|
1998
1999
|
window.open(url, '_blank');
|
|
1999
2000
|
}
|
|
2000
2001
|
});
|
|
2001
2002
|
}
|
|
2002
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: BaseComponent, deps:
|
|
2003
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: BaseComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2003
2004
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: BaseComponent, inputs: { readOnly: "readOnly", model: "model" }, usesInheritance: true, ngImport: i0 }); }
|
|
2004
2005
|
}
|
|
2005
2006
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: BaseComponent, decorators: [{
|
|
2006
2007
|
type: Directive
|
|
2007
|
-
}],
|
|
2008
|
+
}], propDecorators: { readOnly: [{
|
|
2008
2009
|
type: Input
|
|
2009
2010
|
}], model: [{
|
|
2010
2011
|
type: Input
|
|
@@ -2200,13 +2201,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
2200
2201
|
type: Input
|
|
2201
2202
|
}] } });
|
|
2202
2203
|
|
|
2203
|
-
// import { IObjectConstructor } from '../models/ctor';
|
|
2204
|
-
// import { IService } from '../services/base.service';
|
|
2205
|
-
// import { AlertService } from '../modules/alert/shared/alert.service';
|
|
2206
|
-
// import { Area } from '../models/area.model';
|
|
2207
|
-
// import { PrintType } from '../models/print.model';
|
|
2208
|
-
// import { TranslateService } from '@ngx-translate/core';
|
|
2209
|
-
// import { ModalComponent } from '../modules/modal/modal.component';
|
|
2210
2204
|
class EditFormComponent extends BaseComponent {
|
|
2211
2205
|
constructor() {
|
|
2212
2206
|
super(...arguments);
|
|
@@ -2306,11 +2300,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
2306
2300
|
args: ['disapproveModal', { static: false }]
|
|
2307
2301
|
}] } });
|
|
2308
2302
|
class EditBaseComponent extends EditFormComponent {
|
|
2309
|
-
constructor(service
|
|
2310
|
-
super(
|
|
2303
|
+
constructor(service) {
|
|
2304
|
+
super();
|
|
2311
2305
|
this.service = service;
|
|
2312
|
-
this.translate =
|
|
2313
|
-
this.alert =
|
|
2306
|
+
this.translate = inject(TranslateService);
|
|
2307
|
+
this.alert = inject(AlertService);
|
|
2314
2308
|
}
|
|
2315
2309
|
async internalSave(navigateToReturnUrl) {
|
|
2316
2310
|
this.alert.clear();
|
|
@@ -2411,21 +2405,21 @@ class EditBaseComponent extends EditFormComponent {
|
|
|
2411
2405
|
}
|
|
2412
2406
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EditBaseComponent, decorators: [{
|
|
2413
2407
|
type: Directive
|
|
2414
|
-
}], ctorParameters: () => [{ type: undefined }
|
|
2408
|
+
}], ctorParameters: () => [{ type: undefined }] });
|
|
2415
2409
|
class EditComponent extends EditBaseComponent {
|
|
2416
|
-
constructor(
|
|
2417
|
-
super(service
|
|
2418
|
-
this.
|
|
2410
|
+
constructor(_ctorModel, service) {
|
|
2411
|
+
super(service);
|
|
2412
|
+
this._ctorModel = _ctorModel;
|
|
2419
2413
|
}
|
|
2420
2414
|
initCreate() {
|
|
2421
|
-
this.model = new this.
|
|
2415
|
+
this.model = new this._ctorModel();
|
|
2422
2416
|
}
|
|
2423
2417
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EditComponent, deps: "invalid", target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2424
2418
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.4", type: EditComponent, usesInheritance: true, ngImport: i0 }); }
|
|
2425
2419
|
}
|
|
2426
2420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: EditComponent, decorators: [{
|
|
2427
2421
|
type: Directive
|
|
2428
|
-
}], ctorParameters: () => [{ type: undefined }, { type: undefined }
|
|
2422
|
+
}], ctorParameters: () => [{ type: undefined }, { type: undefined }] });
|
|
2429
2423
|
|
|
2430
2424
|
class EditBase {
|
|
2431
2425
|
}
|
|
@@ -2557,11 +2551,9 @@ class ValidEventArgs {
|
|
|
2557
2551
|
|
|
2558
2552
|
// declare let bootstrap: any;
|
|
2559
2553
|
class ListBaseComponent extends BaseComponent {
|
|
2560
|
-
constructor(service
|
|
2561
|
-
super(
|
|
2554
|
+
constructor(service) {
|
|
2555
|
+
super();
|
|
2562
2556
|
this.service = service;
|
|
2563
|
-
this.translate = translate;
|
|
2564
|
-
this.alert = alert;
|
|
2565
2557
|
this.filter = new FilterBase();
|
|
2566
2558
|
this.saveFilter = true;
|
|
2567
2559
|
this.internalFilter = new FilterBase();
|
|
@@ -2571,6 +2563,8 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2571
2563
|
this.approveModel = {};
|
|
2572
2564
|
this.approvedMesage = 'Alert.Approved';
|
|
2573
2565
|
this.disapprovedMesage = 'Alert.Disapproved';
|
|
2566
|
+
this.translate = inject(TranslateService);
|
|
2567
|
+
this.alert = inject(AlertService);
|
|
2574
2568
|
}
|
|
2575
2569
|
init() {
|
|
2576
2570
|
super.init();
|
|
@@ -2796,7 +2790,7 @@ class ListBaseComponent extends BaseComponent {
|
|
|
2796
2790
|
}
|
|
2797
2791
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ListBaseComponent, decorators: [{
|
|
2798
2792
|
type: Directive
|
|
2799
|
-
}], ctorParameters: () => [{ type: undefined }
|
|
2793
|
+
}], ctorParameters: () => [{ type: undefined }], propDecorators: { filterModal: [{
|
|
2800
2794
|
type: ViewChild,
|
|
2801
2795
|
args: ['filterModal', { static: false }]
|
|
2802
2796
|
}], approveModal: [{
|
|
@@ -5883,7 +5877,7 @@ class ZekSelect2Multiple {
|
|
|
5883
5877
|
filterData() {
|
|
5884
5878
|
if (this.filter && this.filter !== '') {
|
|
5885
5879
|
let searchString = this.filter;
|
|
5886
|
-
if (this.textField === undefined || this.textField === null) {
|
|
5880
|
+
if (typeof this.textField === 'undefined' || this.textField === null) {
|
|
5887
5881
|
this.filteredData = this.data.filter(item => item.toLowerCase().indexOf(searchString.toLowerCase()) !== -1);
|
|
5888
5882
|
}
|
|
5889
5883
|
else {
|
|
@@ -5903,11 +5897,12 @@ class ZekSelect2Multiple {
|
|
|
5903
5897
|
this.setText();
|
|
5904
5898
|
}
|
|
5905
5899
|
setText() {
|
|
5906
|
-
|
|
5900
|
+
let fieldName = this.selectedField || this.textField;
|
|
5901
|
+
if (StringHelper.isNullOrEmpty((fieldName))) {
|
|
5907
5902
|
this.text = this._selectedItems.join(', ');
|
|
5908
5903
|
}
|
|
5909
5904
|
else {
|
|
5910
|
-
this.text = this._selectedItems.map(x => x[
|
|
5905
|
+
this.text = this._selectedItems.map(x => x[fieldName]).join(', ');
|
|
5911
5906
|
}
|
|
5912
5907
|
}
|
|
5913
5908
|
selectItem(item) {
|
|
@@ -5931,7 +5926,7 @@ class ZekSelect2Multiple {
|
|
|
5931
5926
|
this.valueChange.emit(v);
|
|
5932
5927
|
}
|
|
5933
5928
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ZekSelect2Multiple, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5934
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: ZekSelect2Multiple, isStandalone: true, selector: "zek-select2-multiple,[zek-select2-multiple]", inputs: { data: "data", textField: "textField", valueField: "valueField", placeholder: "placeholder", value: "value" }, outputs: { selectedItemChange: "selectedItemChange", valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{elementId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\" data-bs-auto-close=\"outside\" id=\"input-{{elementId}}\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange($event)\" (focus)=\"onFocus($event)\" (blur)=\"inputUnfocused()\">\r\n <button class=\"btn btn-outline-secondary dropdown-toggle\" id=\"btn-{{elementId}}\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\" data-bs-reference=\"parent\"></button>\r\n <ul class=\"dropdown-menu dropdown-menu-start w-100 scrollable-menu\" id=\"dropdown-menu-{{elementId}}\">\r\n <ng-container *ngIf=\"textField\">\r\n <li *ngFor=\"let item of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(item)\" class=\"dropdown-item\">\r\n <span *ngIf=\"item.selected\"><i class=\"fa-regular fa-square-check\"></i></span>\r\n <span *ngIf=\"!item.selected\"><i class=\"fa-regular fa-square\"></i></span>\r\n {{item[textField]}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!textField\">\r\n <li *ngFor=\"let item of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(item)\" class=\"dropdown-item\">\r\n <span *ngIf=\"item.selected\"><i class=\"fa-regular fa-square-check\"></i></span>\r\n <span *ngIf=\"!item.selected\"><i class=\"fa-regular fa-square\"></i></span>\r\n {{item}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
5929
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.4", type: ZekSelect2Multiple, isStandalone: true, selector: "zek-select2-multiple,[zek-select2-multiple]", inputs: { data: "data", textField: "textField", selectedField: "selectedField", valueField: "valueField", placeholder: "placeholder", value: "value" }, outputs: { selectedItemChange: "selectedItemChange", valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"input-group position-relative\" id=\"dropdown-menu-container-{{elementId}}\">\r\n <input type=\"text\" class=\"form-control\" placeholder=\"{{placeholder}}\" data-bs-toggle=\"dropdown\" data-bs-auto-close=\"outside\" id=\"input-{{elementId}}\" [(ngModel)]=\"text\" (ngModelChange)=\"onTextChange($event)\" (focus)=\"onFocus($event)\" (blur)=\"inputUnfocused()\">\r\n <button class=\"btn btn-outline-secondary dropdown-toggle\" id=\"btn-{{elementId}}\" type=\"button\" data-bs-toggle=\"dropdown\" aria-expanded=\"false\" data-bs-reference=\"parent\"></button>\r\n <ul class=\"dropdown-menu dropdown-menu-start w-100 scrollable-menu\" id=\"dropdown-menu-{{elementId}}\">\r\n <ng-container *ngIf=\"textField\">\r\n <li *ngFor=\"let item of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(item)\" class=\"dropdown-item\">\r\n <span *ngIf=\"item.selected\"><i class=\"fa-regular fa-square-check\"></i></span>\r\n <span *ngIf=\"!item.selected\"><i class=\"fa-regular fa-square\"></i></span>\r\n {{item[textField]}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n <ng-container *ngIf=\"!textField\">\r\n <li *ngFor=\"let item of filteredData\">\r\n <a href=\"javascript:void(0)\" (click)=\"selectItem(item)\" class=\"dropdown-item\">\r\n <span *ngIf=\"item.selected\"><i class=\"fa-regular fa-square-check\"></i></span>\r\n <span *ngIf=\"!item.selected\"><i class=\"fa-regular fa-square\"></i></span>\r\n {{item}}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
5935
5930
|
}
|
|
5936
5931
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImport: i0, type: ZekSelect2Multiple, decorators: [{
|
|
5937
5932
|
type: Component,
|
|
@@ -5940,6 +5935,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.4", ngImpor
|
|
|
5940
5935
|
type: Input
|
|
5941
5936
|
}], textField: [{
|
|
5942
5937
|
type: Input
|
|
5938
|
+
}], selectedField: [{
|
|
5939
|
+
type: Input
|
|
5943
5940
|
}], valueField: [{
|
|
5944
5941
|
type: Input
|
|
5945
5942
|
}], placeholder: [{
|