zek 14.2.54 → 14.2.57
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/esm2020/lib/components/base.component.mjs +7 -5
- package/esm2020/lib/components/types.mjs +1 -1
- package/esm2020/lib/modules/progress/progress.mjs +19 -4
- package/esm2020/lib/modules/readonly/readonly.directive.mjs +3 -3
- package/esm2020/lib/utils/date-helper.mjs +19 -3
- package/esm2020/lib/utils/html-helper.mjs +1 -1
- package/esm2020/lib/utils/index.mjs +2 -1
- package/esm2020/lib/utils/url-helper.mjs +11 -0
- package/fesm2015/zek.mjs +56 -12
- package/fesm2015/zek.mjs.map +1 -1
- package/fesm2020/zek.mjs +56 -12
- package/fesm2020/zek.mjs.map +1 -1
- package/lib/components/base.component.d.ts +2 -2
- package/lib/components/types.d.ts +1 -0
- package/lib/modules/progress/progress.d.ts +5 -1
- package/lib/utils/date-helper.d.ts +2 -0
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/url-helper.d.ts +4 -0
- package/package.json +1 -1
package/fesm2020/zek.mjs
CHANGED
|
@@ -574,10 +574,18 @@ class DateHelper {
|
|
|
574
574
|
return date;
|
|
575
575
|
}
|
|
576
576
|
;
|
|
577
|
+
static addHours(v, hours) {
|
|
578
|
+
if (!hours)
|
|
579
|
+
return v;
|
|
580
|
+
let date = new Date(v);
|
|
581
|
+
//todo need to check if this line needs --> date = new Date(date.getTime());
|
|
582
|
+
date.setHours(date.getHours() + hours);
|
|
583
|
+
return date;
|
|
584
|
+
}
|
|
577
585
|
static addMinutes(v, minutes) {
|
|
578
586
|
if (!minutes)
|
|
579
587
|
return v;
|
|
580
|
-
let date = v;
|
|
588
|
+
let date = new Date(v);
|
|
581
589
|
//todo need to check if this line needs --> date = new Date(date.getTime());
|
|
582
590
|
date.setMinutes(date.getMinutes() + minutes);
|
|
583
591
|
return date;
|
|
@@ -628,13 +636,21 @@ class DateHelper {
|
|
|
628
636
|
return Math.floor(timeDiff / 86400000); //86400000 = (1000 * 60 * 60 * 24) = 1000 millisecond * 60second * 60minute * 24hour
|
|
629
637
|
}
|
|
630
638
|
;
|
|
639
|
+
static subtractHours(value, date) {
|
|
640
|
+
if (!date)
|
|
641
|
+
return null;
|
|
642
|
+
date = this.toDate(date);
|
|
643
|
+
let timeDiff = date.getTime() - value.getTime();
|
|
644
|
+
return Math.floor((timeDiff % 86400000) / 3600000);
|
|
645
|
+
}
|
|
646
|
+
;
|
|
631
647
|
static subtractMinutes(value, date) {
|
|
632
648
|
if (!date)
|
|
633
649
|
return null;
|
|
634
650
|
date = this.toDate(date);
|
|
635
651
|
let timeDiff = date.getTime() - value.getTime();
|
|
652
|
+
//
|
|
636
653
|
return Math.floor(((timeDiff % 86400000) % 3600000) / 60000);
|
|
637
|
-
;
|
|
638
654
|
}
|
|
639
655
|
;
|
|
640
656
|
// 1 2 3 4 5 6 7 8 9 10 11
|
|
@@ -1065,6 +1081,17 @@ var firstBy = (function () {
|
|
|
1065
1081
|
return tb;
|
|
1066
1082
|
})();
|
|
1067
1083
|
|
|
1084
|
+
class UrlHelper {
|
|
1085
|
+
static getController(url) {
|
|
1086
|
+
return url.substring(0, url.lastIndexOf('/') + 1);
|
|
1087
|
+
}
|
|
1088
|
+
static getAction(url) {
|
|
1089
|
+
let action = url.substring(url.lastIndexOf('/') + 1);
|
|
1090
|
+
let i = action.indexOf(';');
|
|
1091
|
+
return i === -1 ? action : action.substring(0, i);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1068
1095
|
class AuthService {
|
|
1069
1096
|
constructor() {
|
|
1070
1097
|
this.subject = new BehaviorSubject(false); //todo check if need BehaviorSubject
|
|
@@ -1788,7 +1815,7 @@ class BaseComponent extends CoreComponent {
|
|
|
1788
1815
|
this.route = route;
|
|
1789
1816
|
this.router = router;
|
|
1790
1817
|
this._readOnly = false;
|
|
1791
|
-
this.
|
|
1818
|
+
this._url = null;
|
|
1792
1819
|
}
|
|
1793
1820
|
get readOnly() {
|
|
1794
1821
|
return this._readOnly;
|
|
@@ -1796,12 +1823,14 @@ class BaseComponent extends CoreComponent {
|
|
|
1796
1823
|
set readOnly(v) {
|
|
1797
1824
|
this._readOnly = Convert.toBoolean(v);
|
|
1798
1825
|
}
|
|
1826
|
+
get url() {
|
|
1827
|
+
if (!this._url)
|
|
1828
|
+
this._url = this.router.url.split(';')[0];
|
|
1829
|
+
return this._url;
|
|
1830
|
+
}
|
|
1799
1831
|
getParam(name) {
|
|
1800
1832
|
return this.route.snapshot.paramMap.get(name);
|
|
1801
1833
|
}
|
|
1802
|
-
getAction() {
|
|
1803
|
-
return this.url.substr(this.url.lastIndexOf('/') + 1);
|
|
1804
|
-
}
|
|
1805
1834
|
navigateReturnUrl() {
|
|
1806
1835
|
const returnUrl = this.route.snapshot.paramMap.get('returnUrl');
|
|
1807
1836
|
if (returnUrl) {
|
|
@@ -4861,6 +4890,7 @@ class ZekProgress {
|
|
|
4861
4890
|
constructor() {
|
|
4862
4891
|
this._value = 0;
|
|
4863
4892
|
this._showValue = false;
|
|
4893
|
+
this._showTitle = true;
|
|
4864
4894
|
this._striped = false;
|
|
4865
4895
|
this._animated = false;
|
|
4866
4896
|
this._label = null;
|
|
@@ -4871,7 +4901,10 @@ class ZekProgress {
|
|
|
4871
4901
|
return this._value;
|
|
4872
4902
|
}
|
|
4873
4903
|
set value(v) {
|
|
4874
|
-
|
|
4904
|
+
let tmp = clamp(Convert.toNumber(v) || 0);
|
|
4905
|
+
if (this._value !== tmp) {
|
|
4906
|
+
this._value = tmp;
|
|
4907
|
+
}
|
|
4875
4908
|
}
|
|
4876
4909
|
get showValue() {
|
|
4877
4910
|
return this._showValue;
|
|
@@ -4879,6 +4912,15 @@ class ZekProgress {
|
|
|
4879
4912
|
set showValue(v) {
|
|
4880
4913
|
this._showValue = Convert.toBoolean(v);
|
|
4881
4914
|
}
|
|
4915
|
+
get showTitle() {
|
|
4916
|
+
return this._showTitle;
|
|
4917
|
+
}
|
|
4918
|
+
set showTitle(v) {
|
|
4919
|
+
this._showTitle = Convert.toBoolean(v);
|
|
4920
|
+
}
|
|
4921
|
+
get _title() {
|
|
4922
|
+
return this._showTitle ? `${this._value} %` : null;
|
|
4923
|
+
}
|
|
4882
4924
|
get striped() {
|
|
4883
4925
|
return this._striped;
|
|
4884
4926
|
}
|
|
@@ -4912,14 +4954,16 @@ class ZekProgress {
|
|
|
4912
4954
|
}
|
|
4913
4955
|
}
|
|
4914
4956
|
ZekProgress.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4915
|
-
ZekProgress.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ZekProgress, selector: "zek-progress", inputs: { value: "value", showValue: "showValue", striped: "striped", animated: "animated", label: "label", height: "height", background: "background" }, ngImport: i0, template: "<div class=\"progress\" [style.height.px]=\"height\">\r\n <div class=\"progress-bar bg-{{background}}\" role=\"progressbar\"\r\n [class.progress-bar-striped]=\"striped || animated\"\r\n [class.progress-bar-animated]=\"animated\"\r\n [style.width.%]=\"value\"\r\n [attr.aria-valuenow]=\"value\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\">\r\n <ng-container *ngIf=\"showValue\">{{value}}%</ng-container>\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4957
|
+
ZekProgress.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ZekProgress, selector: "zek-progress", inputs: { value: "value", showValue: "showValue", showTitle: "showTitle", striped: "striped", animated: "animated", label: "label", height: "height", background: "background" }, ngImport: i0, template: "<div class=\"progress\" [style.height.px]=\"height\" [title]=\"_title\" >\r\n <div class=\"progress-bar bg-{{background}}\" role=\"progressbar\"\r\n [class.progress-bar-striped]=\"striped || animated\"\r\n [class.progress-bar-animated]=\"animated\"\r\n [style.width.%]=\"value\"\r\n [attr.aria-valuenow]=\"value\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\">\r\n <ng-container *ngIf=\"showValue\">{{value}}%</ng-container>\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4916
4958
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekProgress, decorators: [{
|
|
4917
4959
|
type: Component,
|
|
4918
|
-
args: [{ selector: 'zek-progress', template: "<div class=\"progress\" [style.height.px]=\"height\">\r\n <div class=\"progress-bar bg-{{background}}\" role=\"progressbar\"\r\n [class.progress-bar-striped]=\"striped || animated\"\r\n [class.progress-bar-animated]=\"animated\"\r\n [style.width.%]=\"value\"\r\n [attr.aria-valuenow]=\"value\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\">\r\n <ng-container *ngIf=\"showValue\">{{value}}%</ng-container>\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"] }]
|
|
4960
|
+
args: [{ selector: 'zek-progress', template: "<div class=\"progress\" [style.height.px]=\"height\" [title]=\"_title\" >\r\n <div class=\"progress-bar bg-{{background}}\" role=\"progressbar\"\r\n [class.progress-bar-striped]=\"striped || animated\"\r\n [class.progress-bar-animated]=\"animated\"\r\n [style.width.%]=\"value\"\r\n [attr.aria-valuenow]=\"value\"\r\n aria-valuemin=\"0\"\r\n aria-valuemax=\"100\">\r\n <ng-container *ngIf=\"showValue\">{{value}}%</ng-container>\r\n <ng-content></ng-content>\r\n </div>\r\n</div>", styles: [":host{display:block}\n"] }]
|
|
4919
4961
|
}], propDecorators: { value: [{
|
|
4920
4962
|
type: Input
|
|
4921
4963
|
}], showValue: [{
|
|
4922
4964
|
type: Input
|
|
4965
|
+
}], showTitle: [{
|
|
4966
|
+
type: Input
|
|
4923
4967
|
}], striped: [{
|
|
4924
4968
|
type: Input
|
|
4925
4969
|
}], animated: [{
|
|
@@ -5098,13 +5142,13 @@ class ReadOnlyDirective {
|
|
|
5098
5142
|
}
|
|
5099
5143
|
}
|
|
5100
5144
|
ReadOnlyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReadOnlyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
5101
|
-
ReadOnlyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: ReadOnlyDirective, selector: "[readonly],[readOnly]", inputs: { readonly: "readonly" }, host: { properties: { "attr.readonly": "
|
|
5145
|
+
ReadOnlyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: ReadOnlyDirective, selector: "[readonly],[readOnly]", inputs: { readonly: "readonly" }, host: { properties: { "attr.readonly": "_readonly ? \"\" : null" } }, ngImport: i0 });
|
|
5102
5146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ReadOnlyDirective, decorators: [{
|
|
5103
5147
|
type: Directive,
|
|
5104
5148
|
args: [{
|
|
5105
5149
|
selector: '[readonly],[readOnly]',
|
|
5106
5150
|
host: {
|
|
5107
|
-
'[attr.readonly]': '
|
|
5151
|
+
'[attr.readonly]': '_readonly ? "" : null'
|
|
5108
5152
|
}
|
|
5109
5153
|
}]
|
|
5110
5154
|
}], propDecorators: { readonly: [{
|
|
@@ -6464,5 +6508,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
6464
6508
|
* Generated bundle index. Do not edit.
|
|
6465
6509
|
*/
|
|
6466
6510
|
|
|
6467
|
-
export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertComponent, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FieldValidatorComponent, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerComponent, FileViewerModule, FilterBase, FilterHelper, FilterModalComponent, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, LoadingComponent, LoadingModule, MathHelper, ModalComponent, ModalModule, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerComponent, PagerHelper, PagerModule, PasswordComponent, PasswordModule, PeriodRelation, PrintType, ProgressModule, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, RangeValidator, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, RestoreModalComponent, SafeModule, SafePipe, Select2Component, Select2Module, Select2MultipleComponent, Select2MultipleModule, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, SubmitModalComponent, SumComponent, TimeHelper, TimeModule, TimePipe, TimerService, Toast, ToastComponent, Tree, ValidEventArgs, ValidationComponent, ValidatorModule, Validators, ValidatorsModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZekProgress, ZekSelectModule, ZekSelectMultiple, firstBy, handler, nullValidator, rangeValidator };
|
|
6511
|
+
export { API_BASE_URL, AgeModule, AgePipe, Alert, AlertComponent, AlertModule, AlertService, AlertType, AppBaseModule, ApproveModalComponent, ArrayHelper, AuthGuardService, AuthService, AutoCompleteDirective, AutoCompleteModule, Base64Helper, BaseAlert, BaseComponent, BaseService, BitwiseHelper, BootstrapHelper, ButtonBrowseComponent, ButtonBrowseModalBaseComponent, ButtonBrowseModalToolbarComponent, ButtonBrowseModule, CallbackModule, CallbackPipe, CardComponent, CardModule, Color, ComponentType, Convert, CoreComponent, CoreUiComponent, CrudService, CssHelper, CustomHttpParamEncoder, DATE_FORMAT, DateAgoModule, DateAgoPipe, DateHelper, DateValueAccessor, DatepickerModule, DeleteModalComponent, DisapproveModalComponent, EditBase, EditBaseComponent, EditComponent, EditFormComponent, EditToolbarComponent, EditToolbarModule, FieldValidatorComponent, FileBase, FileBytes, FileHelper, FileModule, FileSizePipe, FileString, FileViewerComponent, FileViewerModule, FilterBase, FilterHelper, FilterModalComponent, Gender, GridToolbarBarComponent, GridToolbarComponent, GridToolbarModule, HtmlHelper, HttpErrorHandler, KeyPair, KeyPairChecked, KeyPairEx, KeyPairRequired, LANGUAGE, ListBase, ListBaseComponent, ListToolbarComponent, ListToolbarModule, LoadingComponent, LoadingModule, MathHelper, ModalComponent, ModalModule, Month, ObjectHelper, OverlapHelper, PageTitleComponent, PageTitleModule, PagedList, PagedListBase, Pager, PagerBase, PagerComponent, PagerHelper, PagerModule, PasswordComponent, PasswordModule, PeriodRelation, PrintType, ProgressModule, RECAPTCHA_SITE_KEY, RadioComponent, RadioModule, RandomHelper, RangeValidator, ReCaptchaService, ReadOnlyDirective, ReadOnlyModule, RecaptchaModule, RestoreModalComponent, SafeModule, SafePipe, Select2Component, Select2Module, Select2MultipleComponent, Select2MultipleModule, SortButtonGroupComponent, SortDirective, SortModule, StorageHelper, StringHelper, SubmitModalComponent, SumComponent, TimeHelper, TimeModule, TimePipe, TimerService, Toast, ToastComponent, Tree, UrlHelper, ValidEventArgs, ValidationComponent, ValidatorModule, Validators, ValidatorsModule, WebApiClient, WebApiModule, WizardComponent, WizardComponent2, WizardModule, ZekProgress, ZekSelectModule, ZekSelectMultiple, firstBy, handler, nullValidator, rangeValidator };
|
|
6468
6512
|
//# sourceMappingURL=zek.mjs.map
|