zek 14.2.48 → 14.2.49
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/types.mjs +1 -1
- package/esm2020/lib/modules/index.mjs +2 -1
- package/esm2020/lib/modules/progress/index.mjs +3 -0
- package/esm2020/lib/modules/progress/module.mjs +26 -0
- package/esm2020/lib/modules/progress/progress.mjs +100 -0
- package/esm2020/lib/utils/convert.mjs +7 -1
- package/esm2020/lib/utils/math-helper.mjs +2 -2
- package/fesm2015/zek.mjs +125 -2
- package/fesm2015/zek.mjs.map +1 -1
- package/fesm2020/zek.mjs +125 -2
- package/fesm2020/zek.mjs.map +1 -1
- package/lib/components/types.d.ts +1 -0
- package/lib/modules/index.d.ts +1 -0
- package/lib/modules/progress/index.d.ts +2 -0
- package/lib/modules/progress/module.d.ts +9 -0
- package/lib/modules/progress/progress.d.ts +32 -0
- package/lib/utils/convert.d.ts +1 -0
- package/lib/utils/math-helper.d.ts +1 -1
- package/package.json +1 -1
package/fesm2020/zek.mjs
CHANGED
|
@@ -335,6 +335,12 @@ class Convert {
|
|
|
335
335
|
}
|
|
336
336
|
return false;
|
|
337
337
|
}
|
|
338
|
+
static toNumber(value) {
|
|
339
|
+
if (typeof value !== 'undefined' && value !== null && value !== '') {
|
|
340
|
+
return +value;
|
|
341
|
+
}
|
|
342
|
+
return 0;
|
|
343
|
+
}
|
|
338
344
|
}
|
|
339
345
|
|
|
340
346
|
class CssHelper {
|
|
@@ -910,7 +916,7 @@ class HtmlHelper {
|
|
|
910
916
|
}
|
|
911
917
|
|
|
912
918
|
class MathHelper {
|
|
913
|
-
round(value, decimals = 0) {
|
|
919
|
+
static round(value, decimals = 0) {
|
|
914
920
|
return Math.round(Number(value) * Math.pow(10, decimals)) / (Math.pow(10, decimals));
|
|
915
921
|
}
|
|
916
922
|
;
|
|
@@ -4848,6 +4854,123 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
4848
4854
|
}]
|
|
4849
4855
|
}] });
|
|
4850
4856
|
|
|
4857
|
+
function toPercent(v) {
|
|
4858
|
+
let n = MathHelper.round(Convert.toNumber(v));
|
|
4859
|
+
if (n > 100) {
|
|
4860
|
+
return 100;
|
|
4861
|
+
}
|
|
4862
|
+
else if (n < 0) {
|
|
4863
|
+
return 0;
|
|
4864
|
+
}
|
|
4865
|
+
return n;
|
|
4866
|
+
}
|
|
4867
|
+
class ZekProgress {
|
|
4868
|
+
constructor() {
|
|
4869
|
+
this._max = 100;
|
|
4870
|
+
this._value = 0;
|
|
4871
|
+
this._normalizedValue = 0;
|
|
4872
|
+
this._showValue = false;
|
|
4873
|
+
this._striped = false;
|
|
4874
|
+
this._animated = false;
|
|
4875
|
+
this._label = null;
|
|
4876
|
+
this._height = null;
|
|
4877
|
+
}
|
|
4878
|
+
get max() {
|
|
4879
|
+
return this._max;
|
|
4880
|
+
}
|
|
4881
|
+
set max(v) {
|
|
4882
|
+
this._max = toPercent(v);
|
|
4883
|
+
}
|
|
4884
|
+
get value() {
|
|
4885
|
+
return this._value;
|
|
4886
|
+
}
|
|
4887
|
+
set value(v) {
|
|
4888
|
+
this._value = Convert.toNumber(v);
|
|
4889
|
+
this._normalizedValue = toPercent(this._value);
|
|
4890
|
+
}
|
|
4891
|
+
get showValue() {
|
|
4892
|
+
return this._showValue;
|
|
4893
|
+
}
|
|
4894
|
+
set showValue(v) {
|
|
4895
|
+
this._showValue = Convert.toBoolean(v);
|
|
4896
|
+
}
|
|
4897
|
+
get striped() {
|
|
4898
|
+
return this._striped;
|
|
4899
|
+
}
|
|
4900
|
+
set striped(v) {
|
|
4901
|
+
this._striped = Convert.toBoolean(v);
|
|
4902
|
+
}
|
|
4903
|
+
get animated() {
|
|
4904
|
+
return this._animated;
|
|
4905
|
+
}
|
|
4906
|
+
set animated(v) {
|
|
4907
|
+
this._animated = Convert.toBoolean(v);
|
|
4908
|
+
}
|
|
4909
|
+
get label() {
|
|
4910
|
+
return this._label;
|
|
4911
|
+
}
|
|
4912
|
+
set label(v) {
|
|
4913
|
+
if (this.label)
|
|
4914
|
+
this._label = v;
|
|
4915
|
+
}
|
|
4916
|
+
get height() {
|
|
4917
|
+
return this._height;
|
|
4918
|
+
}
|
|
4919
|
+
set height(v) {
|
|
4920
|
+
if (ObjectHelper.isDefined(v)) {
|
|
4921
|
+
this._height = Convert.toNumber(v);
|
|
4922
|
+
}
|
|
4923
|
+
else {
|
|
4924
|
+
this._height = null;
|
|
4925
|
+
}
|
|
4926
|
+
}
|
|
4927
|
+
get background() {
|
|
4928
|
+
return this._background;
|
|
4929
|
+
}
|
|
4930
|
+
set background(v) {
|
|
4931
|
+
this._background = v;
|
|
4932
|
+
}
|
|
4933
|
+
}
|
|
4934
|
+
ZekProgress.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekProgress, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4935
|
+
ZekProgress.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ZekProgress, selector: "zek-progress", inputs: { max: "max", striped: "striped", animated: "animated", label: "label", height: "height", background: "background" }, ngImport: i0, template: "<div class=\"progress\">\r\n <div class=\"progress-bar\" role=\"progressbar\"\r\n [class.progress-bar-striped]=\"striped || animated\"\r\n [class.progress-bar-animated]=\"animated\"\r\n [style.height.px]=\"height\"\r\n [style.width.%]=\"_normalizedValue\"\r\n [attr.aria-valuenow]=\"_normalizedValue\"\r\n aria-valuemin=\"0\"\r\n [attr.aria-valuemax]=\"max\">\r\n <ng-container *ngIf=\"showValue\">{{_normalizedValue}}%</ng-container>\r\n {{label}}\r\n </div>\r\n</div>", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: i1$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
4936
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ZekProgress, decorators: [{
|
|
4937
|
+
type: Component,
|
|
4938
|
+
args: [{ selector: 'zek-progress', template: "<div class=\"progress\">\r\n <div class=\"progress-bar\" role=\"progressbar\"\r\n [class.progress-bar-striped]=\"striped || animated\"\r\n [class.progress-bar-animated]=\"animated\"\r\n [style.height.px]=\"height\"\r\n [style.width.%]=\"_normalizedValue\"\r\n [attr.aria-valuenow]=\"_normalizedValue\"\r\n aria-valuemin=\"0\"\r\n [attr.aria-valuemax]=\"max\">\r\n <ng-container *ngIf=\"showValue\">{{_normalizedValue}}%</ng-container>\r\n {{label}}\r\n </div>\r\n</div>", styles: [":host{display:block}\n"] }]
|
|
4939
|
+
}], propDecorators: { max: [{
|
|
4940
|
+
type: Input
|
|
4941
|
+
}], striped: [{
|
|
4942
|
+
type: Input
|
|
4943
|
+
}], animated: [{
|
|
4944
|
+
type: Input
|
|
4945
|
+
}], label: [{
|
|
4946
|
+
type: Input
|
|
4947
|
+
}], height: [{
|
|
4948
|
+
type: Input
|
|
4949
|
+
}], background: [{
|
|
4950
|
+
type: Input
|
|
4951
|
+
}] } });
|
|
4952
|
+
|
|
4953
|
+
class ProgressModule {
|
|
4954
|
+
}
|
|
4955
|
+
ProgressModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ProgressModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4956
|
+
ProgressModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: ProgressModule, declarations: [ZekProgress], imports: [CommonModule,
|
|
4957
|
+
TranslateModule], exports: [ZekProgress] });
|
|
4958
|
+
ProgressModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ProgressModule, imports: [CommonModule,
|
|
4959
|
+
TranslateModule] });
|
|
4960
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ProgressModule, decorators: [{
|
|
4961
|
+
type: NgModule,
|
|
4962
|
+
args: [{
|
|
4963
|
+
imports: [
|
|
4964
|
+
CommonModule,
|
|
4965
|
+
TranslateModule
|
|
4966
|
+
],
|
|
4967
|
+
declarations: [
|
|
4968
|
+
ZekProgress,
|
|
4969
|
+
],
|
|
4970
|
+
exports: [ZekProgress]
|
|
4971
|
+
}]
|
|
4972
|
+
}] });
|
|
4973
|
+
|
|
4851
4974
|
let uniqueId$1 = 0;
|
|
4852
4975
|
/**
|
|
4853
4976
|
* Provider Expression that allows zek-radio to register as a ControlValueAccessor. This
|
|
@@ -6359,5 +6482,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
6359
6482
|
* Generated bundle index. Do not edit.
|
|
6360
6483
|
*/
|
|
6361
6484
|
|
|
6362
|
-
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, 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, ZekSelectModule, ZekSelectMultiple, firstBy, handler, nullValidator, rangeValidator };
|
|
6485
|
+
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 };
|
|
6363
6486
|
//# sourceMappingURL=zek.mjs.map
|