@wavemaker-ai/app-ng-runtime 1.0.0-rc.314 → 1.0.0-rc.319
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/build-task/bundles/index.umd.js +16 -7
- package/build-task/fesm2022/index.mjs +16 -7
- package/build-task/fesm2022/index.mjs.map +1 -1
- package/components/base/bundles/index.umd.js +301 -4
- package/components/base/fesm2022/index.mjs +300 -4
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/base/index.d.ts +106 -2
- package/components/basic/anchor/bundles/index.umd.js +4 -5
- package/components/basic/anchor/fesm2022/index.mjs +4 -5
- package/components/basic/anchor/fesm2022/index.mjs.map +1 -1
- package/components/basic/anchor/index.d.ts +1 -0
- package/components/basic/icon/bundles/index.umd.js +3 -3
- package/components/basic/icon/fesm2022/index.mjs +4 -4
- package/components/basic/icon/fesm2022/index.mjs.map +1 -1
- package/components/basic/icon/index.d.ts +1 -0
- package/components/basic/search/bundles/index.umd.js +6 -3
- package/components/basic/search/fesm2022/index.mjs +7 -4
- package/components/basic/search/fesm2022/index.mjs.map +1 -1
- package/components/basic/search/index.d.ts +3 -0
- package/components/basic/spinner/bundles/index.umd.js +5 -3
- package/components/basic/spinner/fesm2022/index.mjs +6 -4
- package/components/basic/spinner/fesm2022/index.mjs.map +1 -1
- package/components/basic/spinner/index.d.ts +1 -0
- package/components/chart/bundles/index.umd.js +4 -3
- package/components/chart/fesm2022/index.mjs +5 -4
- package/components/chart/fesm2022/index.mjs.map +1 -1
- package/components/chart/index.d.ts +1 -0
- package/components/containers/accordion/bundles/index.umd.js +4 -3
- package/components/containers/accordion/fesm2022/index.mjs +5 -4
- package/components/containers/accordion/fesm2022/index.mjs.map +1 -1
- package/components/containers/accordion/index.d.ts +1 -0
- package/components/containers/panel/bundles/index.umd.js +3 -3
- package/components/containers/panel/fesm2022/index.mjs +4 -4
- package/components/containers/panel/fesm2022/index.mjs.map +1 -1
- package/components/containers/panel/index.d.ts +3 -0
- package/components/containers/tabs/bundles/index.umd.js +5 -4
- package/components/containers/tabs/fesm2022/index.mjs +6 -5
- package/components/containers/tabs/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/bundles/index.umd.js +8 -6
- package/components/containers/wizard/fesm2022/index.mjs +9 -7
- package/components/containers/wizard/fesm2022/index.mjs.map +1 -1
- package/components/containers/wizard/index.d.ts +2 -0
- package/components/data/card/bundles/index.umd.js +3 -3
- package/components/data/card/fesm2022/index.mjs +4 -4
- package/components/data/card/fesm2022/index.mjs.map +1 -1
- package/components/data/form/bundles/index.umd.js +6 -3
- package/components/data/form/fesm2022/index.mjs +7 -4
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/index.d.ts +2 -0
- package/components/data/list/bundles/index.umd.js +5 -3
- package/components/data/list/fesm2022/index.mjs +6 -4
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/index.d.ts +2 -0
- package/components/data/table/bundles/index.umd.js +4 -3
- package/components/data/table/fesm2022/index.mjs +5 -4
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/index.d.ts +1 -0
- package/components/dialogs/default/bundles/index.umd.js +2 -2
- package/components/dialogs/default/fesm2022/index.mjs +3 -3
- package/components/dialogs/default/fesm2022/index.mjs.map +1 -1
- package/components/input/button/bundles/index.umd.js +4 -5
- package/components/input/button/fesm2022/index.mjs +4 -5
- package/components/input/button/fesm2022/index.mjs.map +1 -1
- package/components/input/button/index.d.ts +3 -0
- package/components/input/checkbox/bundles/index.umd.js +6 -4
- package/components/input/checkbox/fesm2022/index.mjs +7 -5
- package/components/input/checkbox/fesm2022/index.mjs.map +1 -1
- package/components/input/checkbox/index.d.ts +2 -0
- package/components/input/file-upload/bundles/index.umd.js +5 -3
- package/components/input/file-upload/fesm2022/index.mjs +6 -4
- package/components/input/file-upload/fesm2022/index.mjs.map +1 -1
- package/components/input/file-upload/index.d.ts +3 -0
- package/components/input/rating/bundles/index.umd.js +9 -3
- package/components/input/rating/fesm2022/index.mjs +10 -4
- package/components/input/rating/fesm2022/index.mjs.map +1 -1
- package/components/input/rating/index.d.ts +6 -0
- package/components/input/slider/bundles/index.umd.js +5 -3
- package/components/input/slider/fesm2022/index.mjs +6 -4
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/index.d.ts +2 -0
- package/components/input/switch/bundles/index.umd.js +6 -3
- package/components/input/switch/fesm2022/index.mjs +7 -4
- package/components/input/switch/fesm2022/index.mjs.map +1 -1
- package/components/input/switch/index.d.ts +2 -0
- package/components/input/text/bundles/index.umd.js +7 -5
- package/components/input/text/fesm2022/index.mjs +8 -6
- package/components/input/text/fesm2022/index.mjs.map +1 -1
- package/components/input/text/index.d.ts +2 -0
- package/components/navigation/menu/bundles/index.umd.js +4 -3
- package/components/navigation/menu/fesm2022/index.mjs +5 -4
- package/components/navigation/menu/fesm2022/index.mjs.map +1 -1
- package/components/navigation/menu/index.d.ts +1 -0
- package/components/navigation/navbar/bundles/index.umd.js +5 -5
- package/components/navigation/navbar/fesm2022/index.mjs +5 -5
- package/components/navigation/navbar/fesm2022/index.mjs.map +1 -1
- package/components/navigation/navbar/index.d.ts +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +23 -1
- package/runtime/base/fesm2022/index.mjs +23 -1
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/runtime/base/index.d.ts +5 -0
- package/transpiler/bundles/index.umd.js +2 -0
- package/transpiler/fesm2022/index.mjs +2 -0
- package/transpiler/fesm2022/index.mjs.map +1 -1
|
@@ -22,7 +22,10 @@ declare class FileUploadComponent extends StylableComponent implements OnInit, A
|
|
|
22
22
|
caption: string;
|
|
23
23
|
formName: string;
|
|
24
24
|
maxfilesize: any;
|
|
25
|
+
iconclass: any;
|
|
26
|
+
iconurl: string;
|
|
25
27
|
cleariconclass: any;
|
|
28
|
+
cleariconurl: string;
|
|
26
29
|
cleariconhint: any;
|
|
27
30
|
selectedUploadTypePath: any;
|
|
28
31
|
DEFAULT_CAPTIONS: {
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
['iconcolor', base.PROP_STRING],
|
|
38
38
|
['activeiconclass', { value: 'wi wi-star', ...base.PROP_STRING }],
|
|
39
39
|
['inactiveiconclass', { value: 'wi wi-star-border', ...base.PROP_STRING }],
|
|
40
|
+
['activeiconurl', base.PROP_STRING],
|
|
41
|
+
['inactiveiconurl', base.PROP_STRING],
|
|
40
42
|
['iconsize', base.PROP_STRING],
|
|
41
43
|
['maxvalue', { value: 5, ...base.PROP_NUMBER }],
|
|
42
44
|
['name', base.PROP_STRING],
|
|
@@ -58,6 +60,8 @@
|
|
|
58
60
|
const DEFAULT_RATING = 5;
|
|
59
61
|
class RatingComponent extends datasetAwareForm.DatasetAwareFormComponent {
|
|
60
62
|
static { this.initializeProps = registerProps(); }
|
|
63
|
+
static { this.DEFAULT_ACTIVE_ICON_CLASS = 'wi wi-star'; }
|
|
64
|
+
static { this.DEFAULT_INACTIVE_ICON_CLASS = 'wi wi-star-border'; }
|
|
61
65
|
get selectedRatingValue() {
|
|
62
66
|
return this._selectedRatingValue;
|
|
63
67
|
}
|
|
@@ -70,6 +74,8 @@
|
|
|
70
74
|
this.isDecimal = false;
|
|
71
75
|
this.activeiconclass = '';
|
|
72
76
|
this.inactiveiconclass = '';
|
|
77
|
+
this.defaultActiveIconClass = RatingComponent.DEFAULT_ACTIVE_ICON_CLASS;
|
|
78
|
+
this.defaultInactiveIconClass = RatingComponent.DEFAULT_INACTIVE_ICON_CLASS;
|
|
73
79
|
this._id = core.generateGUId();
|
|
74
80
|
base.styler(this.nativeElement, this);
|
|
75
81
|
// prepare the rating options on dataset ready.
|
|
@@ -247,14 +253,14 @@
|
|
|
247
253
|
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: RatingComponent, isStandalone: true, selector: "[wmRating]", providers: [
|
|
248
254
|
base.provideAs(RatingComponent, i2.NG_VALUE_ACCESSOR, true),
|
|
249
255
|
base.provideAsWidgetRef(RatingComponent)
|
|
250
|
-
], viewQueries: [{ propertyName: "ratingEl", first: true, predicate: ["ratingInput"], descendants: true, read: i0.ElementRef }], usesInheritance: true, ngImport: i0__namespace, template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n
|
|
256
|
+
], viewQueries: [{ propertyName: "ratingEl", first: true, predicate: ["ratingInput"], descendants: true, read: i0.ElementRef }], usesInheritance: true, ngImport: i0__namespace, template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n @if (rate.index <= selectedRatingValue) {\n <wm-app-icon [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n } @else {\n <wm-app-icon [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n }\n <input #ratingInput type=\"radio\" role=\"radio\" [attr.aria-label]=\"(rate.label || rate.index) + ' out of ' + ratingItems.length + ' ratings'\" [attr.aria-checked]=\"rate.label === datavalue ? 'true' : 'false'\"\n [id]=\"_id + '-' + rate.index\" (click)=\"onRatingClick($event, rate)\" name=\"ratings-id\" [value]=\"rate.key || rate.index\"/>\n </label>\n }\n </div>\n <div class=\"ratings-container readonly\" [class.hidden]=\"!isDecimal\" [ngStyle]=\"{ 'font-size': iconsize }\">\n <div class=\"ratings-base\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n <div class=\"ratings active\" [ngStyle]=\"{ width: ratingsWidth, color: iconcolor }\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n </div>\n @if (showcaptions) {\n <label class=\"caption\" [textContent]=\"caption\"></label>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: i1.CommonModule }, { kind: "directive", type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: i2.FormsModule }, { kind: "directive", type: i2__namespace.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: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: base.WmAppIconComponent, selector: "wm-app-icon", inputs: ["iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
251
257
|
}
|
|
252
258
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0__namespace, type: RatingComponent, decorators: [{
|
|
253
259
|
type: i0.Component,
|
|
254
|
-
args: [{ standalone: true, imports: [i1.CommonModule,
|
|
260
|
+
args: [{ standalone: true, imports: [i1.CommonModule, i2.FormsModule, base.WmAppIconComponent], selector: '[wmRating]', providers: [
|
|
255
261
|
base.provideAs(RatingComponent, i2.NG_VALUE_ACCESSOR, true),
|
|
256
262
|
base.provideAsWidgetRef(RatingComponent)
|
|
257
|
-
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n
|
|
263
|
+
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n @if (rate.index <= selectedRatingValue) {\n <wm-app-icon [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n } @else {\n <wm-app-icon [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n }\n <input #ratingInput type=\"radio\" role=\"radio\" [attr.aria-label]=\"(rate.label || rate.index) + ' out of ' + ratingItems.length + ' ratings'\" [attr.aria-checked]=\"rate.label === datavalue ? 'true' : 'false'\"\n [id]=\"_id + '-' + rate.index\" (click)=\"onRatingClick($event, rate)\" name=\"ratings-id\" [value]=\"rate.key || rate.index\"/>\n </label>\n }\n </div>\n <div class=\"ratings-container readonly\" [class.hidden]=\"!isDecimal\" [ngStyle]=\"{ 'font-size': iconsize }\">\n <div class=\"ratings-base\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n <div class=\"ratings active\" [ngStyle]=\"{ width: ratingsWidth, color: iconcolor }\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n </div>\n @if (showcaptions) {\n <label class=\"caption\" [textContent]=\"caption\"></label>\n }\n</div>\n" }]
|
|
258
264
|
}], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
|
|
259
265
|
type: i0.Inject,
|
|
260
266
|
args: ['EXPLICIT_CONTEXT']
|
|
@@ -5,7 +5,7 @@ import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { ElementRef, ViewChild, Inject, Optional, Component } from '@angular/core';
|
|
7
7
|
import { FormWidgetType, generateGUId, noop } from '@wm/core';
|
|
8
|
-
import { PROP_STRING, PROP_ANY, PROP_NUMBER, PROP_BOOLEAN, register, registerFormWidget, styler, getOrderedDataset,
|
|
8
|
+
import { PROP_STRING, PROP_ANY, PROP_NUMBER, PROP_BOOLEAN, register, registerFormWidget, styler, getOrderedDataset, WmAppIconComponent, provideAs, provideAsWidgetRef } from '@wm/components/base';
|
|
9
9
|
import { DatasetAwareFormComponent } from '@wm/components/input/dataset-aware-form';
|
|
10
10
|
import { slice, isEmpty, find, isUndefined, toString } from 'lodash-es';
|
|
11
11
|
|
|
@@ -21,6 +21,8 @@ const ratingProps = new Map([
|
|
|
21
21
|
['iconcolor', PROP_STRING],
|
|
22
22
|
['activeiconclass', { value: 'wi wi-star', ...PROP_STRING }],
|
|
23
23
|
['inactiveiconclass', { value: 'wi wi-star-border', ...PROP_STRING }],
|
|
24
|
+
['activeiconurl', PROP_STRING],
|
|
25
|
+
['inactiveiconurl', PROP_STRING],
|
|
24
26
|
['iconsize', PROP_STRING],
|
|
25
27
|
['maxvalue', { value: 5, ...PROP_NUMBER }],
|
|
26
28
|
['name', PROP_STRING],
|
|
@@ -42,6 +44,8 @@ const MAX_RATING = 10;
|
|
|
42
44
|
const DEFAULT_RATING = 5;
|
|
43
45
|
class RatingComponent extends DatasetAwareFormComponent {
|
|
44
46
|
static { this.initializeProps = registerProps(); }
|
|
47
|
+
static { this.DEFAULT_ACTIVE_ICON_CLASS = 'wi wi-star'; }
|
|
48
|
+
static { this.DEFAULT_INACTIVE_ICON_CLASS = 'wi wi-star-border'; }
|
|
45
49
|
get selectedRatingValue() {
|
|
46
50
|
return this._selectedRatingValue;
|
|
47
51
|
}
|
|
@@ -54,6 +58,8 @@ class RatingComponent extends DatasetAwareFormComponent {
|
|
|
54
58
|
this.isDecimal = false;
|
|
55
59
|
this.activeiconclass = '';
|
|
56
60
|
this.inactiveiconclass = '';
|
|
61
|
+
this.defaultActiveIconClass = RatingComponent.DEFAULT_ACTIVE_ICON_CLASS;
|
|
62
|
+
this.defaultInactiveIconClass = RatingComponent.DEFAULT_INACTIVE_ICON_CLASS;
|
|
57
63
|
this._id = generateGUId();
|
|
58
64
|
styler(this.nativeElement, this);
|
|
59
65
|
// prepare the rating options on dataset ready.
|
|
@@ -231,14 +237,14 @@ class RatingComponent extends DatasetAwareFormComponent {
|
|
|
231
237
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: RatingComponent, isStandalone: true, selector: "[wmRating]", providers: [
|
|
232
238
|
provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),
|
|
233
239
|
provideAsWidgetRef(RatingComponent)
|
|
234
|
-
], viewQueries: [{ propertyName: "ratingEl", first: true, predicate: ["ratingInput"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n
|
|
240
|
+
], viewQueries: [{ propertyName: "ratingEl", first: true, predicate: ["ratingInput"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n @if (rate.index <= selectedRatingValue) {\n <wm-app-icon [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n } @else {\n <wm-app-icon [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n }\n <input #ratingInput type=\"radio\" role=\"radio\" [attr.aria-label]=\"(rate.label || rate.index) + ' out of ' + ratingItems.length + ' ratings'\" [attr.aria-checked]=\"rate.label === datavalue ? 'true' : 'false'\"\n [id]=\"_id + '-' + rate.index\" (click)=\"onRatingClick($event, rate)\" name=\"ratings-id\" [value]=\"rate.key || rate.index\"/>\n </label>\n }\n </div>\n <div class=\"ratings-container readonly\" [class.hidden]=\"!isDecimal\" [ngStyle]=\"{ 'font-size': iconsize }\">\n <div class=\"ratings-base\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n <div class=\"ratings active\" [ngStyle]=\"{ width: ratingsWidth, color: iconcolor }\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n </div>\n @if (showcaptions) {\n <label class=\"caption\" [textContent]=\"caption\"></label>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: WmAppIconComponent, selector: "wm-app-icon", inputs: ["iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
235
241
|
}
|
|
236
242
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: RatingComponent, decorators: [{
|
|
237
243
|
type: Component,
|
|
238
|
-
args: [{ standalone: true, imports: [CommonModule,
|
|
244
|
+
args: [{ standalone: true, imports: [CommonModule, FormsModule, WmAppIconComponent], selector: '[wmRating]', providers: [
|
|
239
245
|
provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),
|
|
240
246
|
provideAsWidgetRef(RatingComponent)
|
|
241
|
-
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n
|
|
247
|
+
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n @if (rate.index <= selectedRatingValue) {\n <wm-app-icon [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n } @else {\n <wm-app-icon [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n }\n <input #ratingInput type=\"radio\" role=\"radio\" [attr.aria-label]=\"(rate.label || rate.index) + ' out of ' + ratingItems.length + ' ratings'\" [attr.aria-checked]=\"rate.label === datavalue ? 'true' : 'false'\"\n [id]=\"_id + '-' + rate.index\" (click)=\"onRatingClick($event, rate)\" name=\"ratings-id\" [value]=\"rate.key || rate.index\"/>\n </label>\n }\n </div>\n <div class=\"ratings-container readonly\" [class.hidden]=\"!isDecimal\" [ngStyle]=\"{ 'font-size': iconsize }\">\n <div class=\"ratings-base\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n <div class=\"ratings active\" [ngStyle]=\"{ width: ratingsWidth, color: iconcolor }\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n </div>\n @if (showcaptions) {\n <label class=\"caption\" [textContent]=\"caption\"></label>\n }\n</div>\n" }]
|
|
242
248
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
|
|
243
249
|
type: Inject,
|
|
244
250
|
args: ['EXPLICIT_CONTEXT']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/rating/src/rating.props.ts","../../../../../projects/components/widgets/input/rating/src/rating.component.ts","../../../../../projects/components/widgets/input/rating/src/rating.component.html","../../../../../projects/components/widgets/input/rating/src/index.ts"],"sourcesContent":["import { PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const ratingProps = new Map(\n [\n ['caption', PROP_STRING],\n ['class', PROP_STRING],\n ['datafield', PROP_STRING],\n ['dataset', PROP_ANY],\n ['datavaluesource', PROP_ANY],\n ['datavalue', PROP_STRING],\n ['displayexpression', PROP_STRING],\n ['displayfield', PROP_STRING],\n ['iconcolor', PROP_STRING],\n ['activeiconclass', {value: 'wi wi-star', ...PROP_STRING}],\n ['inactiveiconclass', {value: 'wi wi-star-border', ...PROP_STRING}],\n ['iconsize', PROP_STRING],\n ['maxvalue', {value: 5, ...PROP_NUMBER}],\n ['name', PROP_STRING],\n ['orderby', PROP_STRING],\n ['readonly', PROP_BOOLEAN],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['showcaptions', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['usekeys', PROP_BOOLEAN]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-rating',\n ratingProps\n );\n registerFormWidget(\n FormWidgetType.RATING,\n new Map(ratingProps)\n );\n};\n","import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport {Component, ElementRef, Inject, Injector, OnDestroy, Optional, ViewChild} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {generateGUId, noop} from '@wm/core';\nimport { getOrderedDataset, provideAs, provideAsWidgetRef, styler, TextContentDirective } from '@wm/components/base';\nimport { DatasetAwareFormComponent } from '@wm/components/input/dataset-aware-form';\n\nimport { registerProps } from './rating.props';\nimport {find, isEmpty, isUndefined, slice, toString} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-ratings';\nconst WIDGET_CONFIG = {widgetType: 'wm-rating', hostClass: DEFAULT_CLS};\n\nconst MAX_RATING = 10;\nconst DEFAULT_RATING = 5;\n\n@Component({\n standalone: true,\n imports: [CommonModule, TextContentDirective, FormsModule],\n selector: '[wmRating]',\n templateUrl: './rating.component.html',\n providers: [\n provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),\n provideAsWidgetRef(RatingComponent)\n ]\n})\nexport class RatingComponent extends DatasetAwareFormComponent implements OnDestroy {\n static initializeProps = registerProps();\n\n public caption: string;\n public showcaptions: boolean;\n public maxvalue;\n\n private _selectedRatingValue;\n public ratingsWidth;\n public ratingItems;\n private _id;\n public starsArray;\n public isDecimal=false;\n\n public iconsize: string;\n public iconcolor: string;\n public onFocus: any;\n private touchEnabled:boolean;\n public activeiconclass: string = '';\n public inactiveiconclass: string = '';\n @ViewChild('ratingInput', /* TODO: add static flag */ { read: ElementRef }) ratingEl: ElementRef;\n\n get selectedRatingValue() {\n return this._selectedRatingValue;\n }\n\n set selectedRatingValue(val) {\n this._selectedRatingValue = val;\n this.calculateRatingsWidth();\n }\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n this._id = generateGUId();\n styler(this.nativeElement, this);\n\n // prepare the rating options on dataset ready.\n const datasetSubscription = this.dataset$.subscribe(() => {\n this.prepareRatingDataset();\n });\n this.registerDestroyListener(() => datasetSubscription.unsubscribe());\n\n // listen to changes in datavalue.\n const datavalueSubscription = this.datavalue$.subscribe(() => this.onDatavalueChange(this.datavalue));\n this.registerDestroyListener(() => datavalueSubscription.unsubscribe());\n }\n\n // Change event is registered from the template, Prevent the framework from registering one more event\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(this.ratingEl.nativeElement, eventName, eventCallback, locals);\n }\n }\n\n // This function returns the rating widget dataset containing the index, value and label\n private prepareRatingDataset() {\n if (!this.datasetItems.length) {\n this.ratingItems = [];\n this.caption = '';\n }\n\n let ratingItems = [];\n let data = this.datasetItems;\n const maxvalue = parseInt(this.maxvalue || this.datasetItems.length, 10);\n const maxValue = (maxvalue > MAX_RATING ? MAX_RATING : maxvalue) || DEFAULT_RATING;\n\n /**\n * 1. If datasetItems.length is more than maxValue (i.e. 10 ratings) then just extract maxValue of items from datasetItems.\n * 2. If datasetItems are not available then prepare ratings value depending on maxvalue. eg: 1,2,3 .. upto maxvalue\n * 3. If maxvalue / i value is more than datasetItems length, prepare default rating items for i values more than datasetItems.length\n */\n if (data.length && data.length > maxValue) {\n data = slice(data, 0, maxValue);\n }\n\n for (let i = maxValue; i > 0; i--) {\n if (!data.length) {\n ratingItems.push({key: i, value: i, index: i, label: i});\n } else {\n if (i > data.length) {\n ratingItems.push({key: i, value: i, index: i, label: i});\n } else {\n data = getOrderedDataset(data, 'index:desc');\n ratingItems = ratingItems.concat(data);\n break;\n }\n }\n }\n\n this.ratingItems = ratingItems;\n if (!data.length) { // constructs default datasetItems when there is no dataset binding.\n this.datasetItems = ratingItems;\n }\n this.onDatavalueChange(this.datavalue);\n }\n\n onRatingClick($event, rate) {\n this.modelByKey = rate.key;\n this.selectedRatingValue = rate.index;\n\n // support if the caption is binded in the old projects for backward compatibility\n if (!this.showcaptions) {\n this.caption = rate.label;\n }\n\n this.invokeOnTouched();\n // invoke on datavalue change.\n this.invokeOnChange(this.datavalue, $event || {}, true);\n }\n\n // Update the selected flag on datasetItems and assign the ratingValue.\n /**\n * On datavalue change, update the caption, selectedRatingValue.\n * 1. if datasetItems contain the selected item (check the selected flag on item), find the index of selected item.\n * 2. if not, just check if the datavalue is provided as the index on the item.\n *\n * @param dataVal datavalue\n */\n onDatavalueChange(dataVal) {\n if (!isEmpty(this.datasetItems)) {\n let selectedItem = find(this.datasetItems, {'selected': true});\n\n if (!selectedItem && !isUndefined(dataVal)) {\n selectedItem = find(this.datasetItems, function (item) {\n return toString(item.index) === dataVal;\n });\n if (selectedItem) {\n selectedItem.selected = true;\n }\n }\n\n if (!selectedItem) {\n // reset the model if there is no item found.\n this.modelByKey = undefined;\n this.caption = '';\n }\n\n this.selectedRatingValue = selectedItem ? selectedItem.index : 0;\n if (selectedItem) {\n this.caption = selectedItem.label;\n }\n } else {\n this.selectedRatingValue = 0;\n }\n if (this.readonly) {\n // when dataset is not given but datavalue is provided which is integer\n if (!this.selectedRatingValue && !isNaN(dataVal)) {\n this.selectedRatingValue = (parseFloat(dataVal) <= this.maxvalue) ? dataVal : this.maxvalue;\n }\n this.ratingsWidth = this.calculateRatingsWidth(dataVal);\n }\n if(this.readonly && !isNaN(dataVal) && !Number.isInteger(parseFloat(dataVal))) {\n this._modelByKey = dataVal;\n this._modelByValue=dataVal\n this.isDecimal=true;\n this.ratingsWidth = this.calculateRatingsWidth(this.getPrevDataValue());\n this.caption = this.selectedRatingValue\n }\n }\n\n calculateRatingsWidth(dataVal?: any) {\n const selectedRating = parseFloat(this.selectedRatingValue),\n maxValue = parseInt(this.maxvalue || this.datasetItems.length, 10) || DEFAULT_RATING;\n\n dataVal = dataVal || this.datavalue;\n if ((dataVal === undefined || dataVal === '' || dataVal === null)||selectedRating <= 0) {\n this.caption = '';\n return '0%';\n }\n const safeRating = Math.min(selectedRating, maxValue);\n return ( (safeRating / maxValue) * 100)+'%';\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'readonly') {\n this.isDecimal=false;\n if (nv) {\n this.ratingsWidth = this.calculateRatingsWidth();\n this.onDatavalueChange(this.getPrevDataValue())\n }\n } else if (key === 'maxvalue') {\n /** Storing the datavalue in temp variable and assiging back to datavalue\n * after default datalist is prepared to trigger Dataset Aware class select cycle\n * as the datavalue property change is triggering first rather than maxvalue\n * in the rating widget is used inside a datatable\n */\n this.starsArray = Array(this.maxvalue);\n let tempDataValue = this.datavalue;\n this.prepareRatingDataset();\n // reset all the items.\n this.resetDatasetItems();\n if (!isUndefined(tempDataValue)) {\n this.datavalue = tempDataValue;\n }\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n\n /* Detect touch enabled devices & update hover styles*/\n onTouchStart($event) {\n this.touchEnabled = true;\n this.onTouchStart = noop;\n }\n onMouseleave() {\n this.caption = this.displayValue as string;\n }\n\n onMouseOver($event, rate) {\n this.caption = rate.label;\n !this.touchEnabled && !$event.target.classList.contains('rating-label-hover') && $event.target.classList.add('rating-label-hover');\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Clear ViewChild reference\n this.ratingEl = null;\n\n // MEMORY LEAK FIX: Clear rating items array\n if (this.ratingItems) {\n this.ratingItems = [];\n }\n\n // Call parent ngOnDestroy (DatasetAwareFormComponent has cleanup)\n super.ngOnDestroy();\n }\n}\n","<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n <i class=\"app-icon {{rate.index <= selectedRatingValue ? activeiconclass : inactiveiconclass}}\" aria-hidden=\"true\"></i>\n <input #ratingInput type=\"radio\" role=\"radio\" [attr.aria-label]=\"(rate.label || rate.index) + ' out of ' + ratingItems.length + ' ratings'\" [attr.aria-checked]=\"rate.label === datavalue ? 'true' : 'false'\"\n [id]=\"_id + '-' + rate.index\" (click)=\"onRatingClick($event, rate)\" name=\"ratings-id\" [value]=\"rate.key || rate.index\"/>\n </label>\n }\n </div>\n <div class=\"ratings-container readonly\" [class.hidden]=\"!isDecimal\" [ngStyle]=\"{ 'font-size': iconsize }\">\n <div class=\"ratings-base\">\n <i class=\"app-icon {{inactiveiconclass}}\" *ngFor=\"let s of starsArray\"></i>\n </div>\n <div class=\"ratings active\" [ngStyle]=\"{ width: ratingsWidth, color: iconcolor }\">\n <i class=\"app-icon {{activeiconclass}}\" *ngFor=\"let s of starsArray\"></i>\n </div>\n </div>\n @if (showcaptions) {\n <label class=\"caption\" [textContent]=\"caption\"></label>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;AAGO,MAAM,WAAW,GAAG,IAAI,GAAG,CAC9B;IACI,CAAC,SAAS,EAAE,WAAW,CAAC;IACxB,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,SAAS,EAAE,QAAQ,CAAC;IACrB,CAAC,iBAAiB,EAAE,QAAQ,CAAC;IAC7B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,mBAAmB,EAAE,WAAW,CAAC;IAClC,CAAC,cAAc,EAAE,WAAW,CAAC;IAC7B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,iBAAiB,EAAE,EAAC,KAAK,EAAE,YAAY,EAAE,GAAG,WAAW,EAAC,CAAC;IAC1D,CAAC,mBAAmB,EAAE,EAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,WAAW,EAAC,CAAC;IACnE,CAAC,UAAU,EAAE,WAAW,CAAC;IACzB,CAAC,UAAU,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,GAAG,WAAW,EAAC,CAAC;IACxC,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,SAAS,EAAE,WAAW,CAAC;IACxB,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;IACxC,CAAC,cAAc,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;IAChD,CAAC,UAAU,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,GAAG,WAAW,EAAC,CAAC;IACxC,CAAC,SAAS,EAAE,YAAY;AAC3B,CAAA,CACJ;AAEM,MAAM,a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AA,EAAA,8MAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAQ9C,eAAe,EAAA,UAAA,EAAA,CAAA;kBAV3B,SAAS;iCACI,IAAI,EAAA,OAAA,EACP,CAAC,YAAY,EAAE,oBAAoB,EAAE,WAAW,CAAC,EAAA,QAAA,EAC9C,YAAY,EAAA,SAAA,EAEX;AACP,wBAAA,SAAS,CAAA,eAAA,EAAkB,iBAAiB,EAAE,IAAI,CAAC;AACnD,wBAAA,kBAAkB,CAAA,eAAA;AACrB,qBAAA,EAAA,QAAA,EAAA,4yDAAA,EAAA;;0BAiC2B,MAAM;2BAAC,kBAAkB;;0BAAG;;sBAXvD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,aAAa,8BAA8B,EAAE,IAAI,EAAE,UAAU,EAAE;;;AEhD9E;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/rating/src/rating.props.ts","../../../../../projects/components/widgets/input/rating/src/rating.component.ts","../../../../../projects/components/widgets/input/rating/src/rating.component.html","../../../../../projects/components/widgets/input/rating/src/index.ts"],"sourcesContent":["import { PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget } from '@wm/components/base';\nimport { FormWidgetType } from '@wm/core';\n\nexport const ratingProps = new Map(\n [\n ['caption', PROP_STRING],\n ['class', PROP_STRING],\n ['datafield', PROP_STRING],\n ['dataset', PROP_ANY],\n ['datavaluesource', PROP_ANY],\n ['datavalue', PROP_STRING],\n ['displayexpression', PROP_STRING],\n ['displayfield', PROP_STRING],\n ['iconcolor', PROP_STRING],\n ['activeiconclass', {value: 'wi wi-star', ...PROP_STRING}],\n ['inactiveiconclass', {value: 'wi wi-star-border', ...PROP_STRING}],\n ['activeiconurl', PROP_STRING],\n ['inactiveiconurl', PROP_STRING],\n ['iconsize', PROP_STRING],\n ['maxvalue', {value: 5, ...PROP_NUMBER}],\n ['name', PROP_STRING],\n ['orderby', PROP_STRING],\n ['readonly', PROP_BOOLEAN],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['showcaptions', {value: true, ...PROP_BOOLEAN}],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['usekeys', PROP_BOOLEAN]\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-rating',\n ratingProps\n );\n registerFormWidget(\n FormWidgetType.RATING,\n new Map(ratingProps)\n );\n};\n","import { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport {Component, ElementRef, Inject, Injector, OnDestroy, Optional, ViewChild} from '@angular/core';\nimport { NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {generateGUId, noop} from '@wm/core';\nimport { getOrderedDataset, provideAs, provideAsWidgetRef, styler, WmAppIconComponent } from '@wm/components/base';\nimport { DatasetAwareFormComponent } from '@wm/components/input/dataset-aware-form';\n\nimport { registerProps } from './rating.props';\nimport {find, isEmpty, isUndefined, slice, toString} from \"lodash-es\";\n\nconst DEFAULT_CLS = 'app-ratings';\nconst WIDGET_CONFIG = {widgetType: 'wm-rating', hostClass: DEFAULT_CLS};\n\nconst MAX_RATING = 10;\nconst DEFAULT_RATING = 5;\n\n@Component({\n standalone: true,\n imports: [CommonModule, FormsModule, WmAppIconComponent],\n selector: '[wmRating]',\n templateUrl: './rating.component.html',\n providers: [\n provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),\n provideAsWidgetRef(RatingComponent)\n ]\n})\nexport class RatingComponent extends DatasetAwareFormComponent implements OnDestroy {\n static initializeProps = registerProps();\n\n public caption: string;\n public showcaptions: boolean;\n public maxvalue;\n\n private _selectedRatingValue;\n public ratingsWidth;\n public ratingItems;\n private _id;\n public starsArray;\n public isDecimal=false;\n\n public iconsize: string;\n public iconcolor: string;\n public onFocus: any;\n private touchEnabled:boolean;\n public activeiconclass: string = '';\n public inactiveiconclass: string = '';\n public activeiconurl: string;\n public inactiveiconurl: string;\n @ViewChild('ratingInput', /* TODO: add static flag */ { read: ElementRef }) ratingEl: ElementRef;\n\n public static readonly DEFAULT_ACTIVE_ICON_CLASS = 'wi wi-star';\n public static readonly DEFAULT_INACTIVE_ICON_CLASS = 'wi wi-star-border';\n public readonly defaultActiveIconClass = RatingComponent.DEFAULT_ACTIVE_ICON_CLASS;\n public readonly defaultInactiveIconClass = RatingComponent.DEFAULT_INACTIVE_ICON_CLASS;\n\n get selectedRatingValue() {\n return this._selectedRatingValue;\n }\n\n set selectedRatingValue(val) {\n this._selectedRatingValue = val;\n this.calculateRatingsWidth();\n }\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any) {\n super(inj, WIDGET_CONFIG, explicitContext);\n this._id = generateGUId();\n styler(this.nativeElement, this);\n\n // prepare the rating options on dataset ready.\n const datasetSubscription = this.dataset$.subscribe(() => {\n this.prepareRatingDataset();\n });\n this.registerDestroyListener(() => datasetSubscription.unsubscribe());\n\n // listen to changes in datavalue.\n const datavalueSubscription = this.datavalue$.subscribe(() => this.onDatavalueChange(this.datavalue));\n this.registerDestroyListener(() => datavalueSubscription.unsubscribe());\n }\n\n // Change event is registered from the template, Prevent the framework from registering one more event\n protected handleEvent(node: HTMLElement, eventName: string, eventCallback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(this.ratingEl.nativeElement, eventName, eventCallback, locals);\n }\n }\n\n // This function returns the rating widget dataset containing the index, value and label\n private prepareRatingDataset() {\n if (!this.datasetItems.length) {\n this.ratingItems = [];\n this.caption = '';\n }\n\n let ratingItems = [];\n let data = this.datasetItems;\n const maxvalue = parseInt(this.maxvalue || this.datasetItems.length, 10);\n const maxValue = (maxvalue > MAX_RATING ? MAX_RATING : maxvalue) || DEFAULT_RATING;\n\n /**\n * 1. If datasetItems.length is more than maxValue (i.e. 10 ratings) then just extract maxValue of items from datasetItems.\n * 2. If datasetItems are not available then prepare ratings value depending on maxvalue. eg: 1,2,3 .. upto maxvalue\n * 3. If maxvalue / i value is more than datasetItems length, prepare default rating items for i values more than datasetItems.length\n */\n if (data.length && data.length > maxValue) {\n data = slice(data, 0, maxValue);\n }\n\n for (let i = maxValue; i > 0; i--) {\n if (!data.length) {\n ratingItems.push({key: i, value: i, index: i, label: i});\n } else {\n if (i > data.length) {\n ratingItems.push({key: i, value: i, index: i, label: i});\n } else {\n data = getOrderedDataset(data, 'index:desc');\n ratingItems = ratingItems.concat(data);\n break;\n }\n }\n }\n\n this.ratingItems = ratingItems;\n if (!data.length) { // constructs default datasetItems when there is no dataset binding.\n this.datasetItems = ratingItems;\n }\n this.onDatavalueChange(this.datavalue);\n }\n\n onRatingClick($event, rate) {\n this.modelByKey = rate.key;\n this.selectedRatingValue = rate.index;\n\n // support if the caption is binded in the old projects for backward compatibility\n if (!this.showcaptions) {\n this.caption = rate.label;\n }\n\n this.invokeOnTouched();\n // invoke on datavalue change.\n this.invokeOnChange(this.datavalue, $event || {}, true);\n }\n\n // Update the selected flag on datasetItems and assign the ratingValue.\n /**\n * On datavalue change, update the caption, selectedRatingValue.\n * 1. if datasetItems contain the selected item (check the selected flag on item), find the index of selected item.\n * 2. if not, just check if the datavalue is provided as the index on the item.\n *\n * @param dataVal datavalue\n */\n onDatavalueChange(dataVal) {\n if (!isEmpty(this.datasetItems)) {\n let selectedItem = find(this.datasetItems, {'selected': true});\n\n if (!selectedItem && !isUndefined(dataVal)) {\n selectedItem = find(this.datasetItems, function (item) {\n return toString(item.index) === dataVal;\n });\n if (selectedItem) {\n selectedItem.selected = true;\n }\n }\n\n if (!selectedItem) {\n // reset the model if there is no item found.\n this.modelByKey = undefined;\n this.caption = '';\n }\n\n this.selectedRatingValue = selectedItem ? selectedItem.index : 0;\n if (selectedItem) {\n this.caption = selectedItem.label;\n }\n } else {\n this.selectedRatingValue = 0;\n }\n if (this.readonly) {\n // when dataset is not given but datavalue is provided which is integer\n if (!this.selectedRatingValue && !isNaN(dataVal)) {\n this.selectedRatingValue = (parseFloat(dataVal) <= this.maxvalue) ? dataVal : this.maxvalue;\n }\n this.ratingsWidth = this.calculateRatingsWidth(dataVal);\n }\n if(this.readonly && !isNaN(dataVal) && !Number.isInteger(parseFloat(dataVal))) {\n this._modelByKey = dataVal;\n this._modelByValue=dataVal\n this.isDecimal=true;\n this.ratingsWidth = this.calculateRatingsWidth(this.getPrevDataValue());\n this.caption = this.selectedRatingValue\n }\n }\n\n calculateRatingsWidth(dataVal?: any) {\n const selectedRating = parseFloat(this.selectedRatingValue),\n maxValue = parseInt(this.maxvalue || this.datasetItems.length, 10) || DEFAULT_RATING;\n\n dataVal = dataVal || this.datavalue;\n if ((dataVal === undefined || dataVal === '' || dataVal === null)||selectedRating <= 0) {\n this.caption = '';\n return '0%';\n }\n const safeRating = Math.min(selectedRating, maxValue);\n return ( (safeRating / maxValue) * 100)+'%';\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'readonly') {\n this.isDecimal=false;\n if (nv) {\n this.ratingsWidth = this.calculateRatingsWidth();\n this.onDatavalueChange(this.getPrevDataValue())\n }\n } else if (key === 'maxvalue') {\n /** Storing the datavalue in temp variable and assiging back to datavalue\n * after default datalist is prepared to trigger Dataset Aware class select cycle\n * as the datavalue property change is triggering first rather than maxvalue\n * in the rating widget is used inside a datatable\n */\n this.starsArray = Array(this.maxvalue);\n let tempDataValue = this.datavalue;\n this.prepareRatingDataset();\n // reset all the items.\n this.resetDatasetItems();\n if (!isUndefined(tempDataValue)) {\n this.datavalue = tempDataValue;\n }\n } else {\n super.onPropertyChange(key, nv, ov);\n }\n }\n\n /* Detect touch enabled devices & update hover styles*/\n onTouchStart($event) {\n this.touchEnabled = true;\n this.onTouchStart = noop;\n }\n onMouseleave() {\n this.caption = this.displayValue as string;\n }\n\n onMouseOver($event, rate) {\n this.caption = rate.label;\n !this.touchEnabled && !$event.target.classList.contains('rating-label-hover') && $event.target.classList.add('rating-label-hover');\n }\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Clear ViewChild reference\n this.ratingEl = null;\n\n // MEMORY LEAK FIX: Clear rating items array\n if (this.ratingItems) {\n this.ratingItems = [];\n }\n\n // Call parent ngOnDestroy (DatasetAwareFormComponent has cleanup)\n super.ngOnDestroy();\n }\n}\n","<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.hidden]=\"readonly && isDecimal\" [class.disabled]=\"readonly\" class=\"rating-style\">\n @for (rate of ratingItems; track rate) {\n <label\n [ngClass]=\"{active : rate.index <= selectedRatingValue}\"\n [ngStyle]=\"{'font-size' :iconsize, color: rate.index <= selectedRatingValue && iconcolor}\"\n [title]=\"rate.label || rate.index\"\n (touchstart)=\"onTouchStart($event)\"\n (mouseleave)=\"onMouseleave($event, rate)\"\n (mouseover)=\"onMouseOver($event, rate)\"\n [for]=\"_id + '-' + rate.index\">\n @if (rate.index <= selectedRatingValue) {\n <wm-app-icon [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n } @else {\n <wm-app-icon [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n }\n <input #ratingInput type=\"radio\" role=\"radio\" [attr.aria-label]=\"(rate.label || rate.index) + ' out of ' + ratingItems.length + ' ratings'\" [attr.aria-checked]=\"rate.label === datavalue ? 'true' : 'false'\"\n [id]=\"_id + '-' + rate.index\" (click)=\"onRatingClick($event, rate)\" name=\"ratings-id\" [value]=\"rate.key || rate.index\"/>\n </label>\n }\n </div>\n <div class=\"ratings-container readonly\" [class.hidden]=\"!isDecimal\" [ngStyle]=\"{ 'font-size': iconsize }\">\n <div class=\"ratings-base\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"inactiveiconclass\"\n [iconurl]=\"inactiveiconurl\"\n [defaultIconClass]=\"defaultInactiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n <div class=\"ratings active\" [ngStyle]=\"{ width: ratingsWidth, color: iconcolor }\">\n <wm-app-icon *ngFor=\"let s of starsArray\"\n [iconclass]=\"activeiconclass\"\n [iconurl]=\"activeiconurl\"\n [defaultIconClass]=\"defaultActiveIconClass\"\n alt=\"Rating\"></wm-app-icon>\n </div>\n </div>\n @if (showcaptions) {\n <label class=\"caption\" [textContent]=\"caption\"></label>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;AAGO,MAAM,WAAW,GAAG,IAAI,GAAG,CAC9B;IACI,CAAC,SAAS,EAAE,WAAW,CAAC;IACxB,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,SAAS,EAAE,QAAQ,CAAC;IACrB,CAAC,iBAAiB,EAAE,QAAQ,CAAC;IAC7B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,mBAAmB,EAAE,WAAW,CAAC;IAClC,CAAC,cAAc,EAAE,WAAW,CAAC;IAC7B,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,iBAAiB,EAAE,EAAC,KAAK,EAAE,YAAY,EAAE,GAAG,WAAW,EAAC,CAAC;IAC1D,CAAC,mBAAmB,EAAE,EAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,WAAW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AC,kBAAkB;;0BAAG;;sBAhBvD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,aAAa,8BAA8B,EAAE,IAAI,EAAE,UAAU,EAAE;;;AElD9E;;AAEG;;;;"}
|
|
@@ -19,7 +19,13 @@ declare class RatingComponent extends DatasetAwareFormComponent implements OnDes
|
|
|
19
19
|
private touchEnabled;
|
|
20
20
|
activeiconclass: string;
|
|
21
21
|
inactiveiconclass: string;
|
|
22
|
+
activeiconurl: string;
|
|
23
|
+
inactiveiconurl: string;
|
|
22
24
|
ratingEl: ElementRef;
|
|
25
|
+
static readonly DEFAULT_ACTIVE_ICON_CLASS = "wi wi-star";
|
|
26
|
+
static readonly DEFAULT_INACTIVE_ICON_CLASS = "wi wi-star-border";
|
|
27
|
+
readonly defaultActiveIconClass = "wi wi-star";
|
|
28
|
+
readonly defaultInactiveIconClass = "wi wi-star-border";
|
|
23
29
|
get selectedRatingValue(): any;
|
|
24
30
|
set selectedRatingValue(val: any);
|
|
25
31
|
constructor(inj: Injector, explicitContext: any);
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
['showicons', base.PROP_BOOLEAN],
|
|
46
46
|
['starticon', { value: 'wi wi-minus', ...base.PROP_STRING }],
|
|
47
47
|
['endicon', { value: 'wi wi-plus', ...base.PROP_STRING }],
|
|
48
|
+
['starticonurl', base.PROP_STRING],
|
|
49
|
+
['endiconurl', base.PROP_STRING],
|
|
48
50
|
['rangelabelposition', { value: 'bottom', ...base.PROP_STRING }],
|
|
49
51
|
]);
|
|
50
52
|
const registerProps = () => {
|
|
@@ -180,14 +182,14 @@
|
|
|
180
182
|
static { this.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: SliderComponent, isStandalone: true, selector: "[wmSlider]", providers: [
|
|
181
183
|
base.provideAs(SliderComponent, i2.NG_VALUE_ACCESSOR, true),
|
|
182
184
|
base.provideAsWidgetRef(SliderComponent)
|
|
183
|
-
], viewQueries: [{ propertyName: "ngModel", first: true, predicate: i2.NgModel, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <
|
|
185
|
+
], viewQueries: [{ propertyName: "ngModel", first: true, predicate: i2.NgModel, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"starticon\" [iconurl]=\"starticonurl\"></wm-app-icon> \n </button>\n }\n <div class=\"slider-control\">\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n }\n <input class=\"range-input\" type=\"range\" aria-orientation=\"horizontal\" focus-target [title]=\"datavalue\"\n [attr.min]=\"minvalue\" [attr.max]=\"maxvalue\" [attr.step]=\"step\" [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{ standalone: true }\" [disabled]=\"disabled||readonly\" [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\" (blur)=\"invokeOnTouched($event)\" (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\" [tabindex]=\"tabindex\" />\n <p class=\"active-slider\"></p>\n </div>\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"incrementButton\" (click)=\"incrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"endicon\" [iconurl]=\"endiconurl\"></wm-app-icon> \n </button>\n }\n</div>\n\n} @else {\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n}\n<input class=\"range-input\" aria-orientation=\"horizontal\"\n focus-target\n type=\"range\" [title]=\"datavalue\"\n [attr.min]=\"minvalue\"\n [attr.max]=\"maxvalue\"\n [attr.step]=\"step\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [disabled]=\"disabled||readonly\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (blur)=\"invokeOnTouched($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\"\n [tabindex]=\"tabindex\"/>\n}\n@if (readonly || disabled) {\n <div aria-readonly=\"true\" class=\"readonly-wrapper\"></div>\n}\n@if(showmarkers){\n <div class=\"marker-container\">\n@for (marker of markerItems; track marker) {\n <div class=\"marker-wrapper\"\n [ngStyle]=\"{ left: marker.left + 'px' }\"\n [attr.title]=\"marker.label\">\n <div class=\"marker-label\" [ngClass]=\"marker.position\" [attr.title]=\"marker.label\">\n {{ marker.label }}\n </div>\n <div class=\"marker-dot\" [attr.title]=\"marker.label\"></div>\n </div>\n }\n </div>\n\n}\n", dependencies: [{ kind: "directive", type: base.TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "ngmodule", type: i2.FormsModule }, { kind: "directive", type: i2__namespace.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: i2__namespace.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: i3.CommonModule }, { kind: "directive", type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: base.WmAppIconComponent, selector: "wm-app-icon", inputs: ["iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
184
186
|
}
|
|
185
187
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0__namespace, type: SliderComponent, decorators: [{
|
|
186
188
|
type: i0.Component,
|
|
187
|
-
args: [{ standalone: true, imports: [base.TextContentDirective, i2.FormsModule, i3.CommonModule], selector: '[wmSlider]', providers: [
|
|
189
|
+
args: [{ standalone: true, imports: [base.TextContentDirective, i2.FormsModule, i3.CommonModule, base.WmAppIconComponent], selector: '[wmSlider]', providers: [
|
|
188
190
|
base.provideAs(SliderComponent, i2.NG_VALUE_ACCESSOR, true),
|
|
189
191
|
base.provideAsWidgetRef(SliderComponent)
|
|
190
|
-
], template: "@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <
|
|
192
|
+
], template: "@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"starticon\" [iconurl]=\"starticonurl\"></wm-app-icon> \n </button>\n }\n <div class=\"slider-control\">\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n }\n <input class=\"range-input\" type=\"range\" aria-orientation=\"horizontal\" focus-target [title]=\"datavalue\"\n [attr.min]=\"minvalue\" [attr.max]=\"maxvalue\" [attr.step]=\"step\" [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{ standalone: true }\" [disabled]=\"disabled||readonly\" [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\" (blur)=\"invokeOnTouched($event)\" (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\" [tabindex]=\"tabindex\" />\n <p class=\"active-slider\"></p>\n </div>\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"incrementButton\" (click)=\"incrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"endicon\" [iconurl]=\"endiconurl\"></wm-app-icon> \n </button>\n }\n</div>\n\n} @else {\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n}\n<input class=\"range-input\" aria-orientation=\"horizontal\"\n focus-target\n type=\"range\" [title]=\"datavalue\"\n [attr.min]=\"minvalue\"\n [attr.max]=\"maxvalue\"\n [attr.step]=\"step\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [disabled]=\"disabled||readonly\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (blur)=\"invokeOnTouched($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\"\n [tabindex]=\"tabindex\"/>\n}\n@if (readonly || disabled) {\n <div aria-readonly=\"true\" class=\"readonly-wrapper\"></div>\n}\n@if(showmarkers){\n <div class=\"marker-container\">\n@for (marker of markerItems; track marker) {\n <div class=\"marker-wrapper\"\n [ngStyle]=\"{ left: marker.left + 'px' }\"\n [attr.title]=\"marker.label\">\n <div class=\"marker-label\" [ngClass]=\"marker.position\" [attr.title]=\"marker.label\">\n {{ marker.label }}\n </div>\n <div class=\"marker-dot\" [attr.title]=\"marker.label\"></div>\n </div>\n }\n </div>\n\n}\n" }]
|
|
191
193
|
}], ctorParameters: () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
|
|
192
194
|
type: i0.Inject,
|
|
193
195
|
args: ['EXPLICIT_CONTEXT']
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PROP_STRING, PROP_BOOLEAN, PROP_NUMBER, PROP_ANY, register, registerFormWidget, styler, convertDataToObject, TextContentDirective, provideAs, provideAsWidgetRef } from '@wm/components/base';
|
|
1
|
+
import { PROP_STRING, PROP_BOOLEAN, PROP_NUMBER, PROP_ANY, register, registerFormWidget, styler, convertDataToObject, TextContentDirective, WmAppIconComponent, provideAs, provideAsWidgetRef } from '@wm/components/base';
|
|
2
2
|
import * as i2 from '@angular/forms';
|
|
3
3
|
import { FormsModule, NgModel, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
@@ -28,6 +28,8 @@ const sliderProps = new Map([
|
|
|
28
28
|
['showicons', PROP_BOOLEAN],
|
|
29
29
|
['starticon', { value: 'wi wi-minus', ...PROP_STRING }],
|
|
30
30
|
['endicon', { value: 'wi wi-plus', ...PROP_STRING }],
|
|
31
|
+
['starticonurl', PROP_STRING],
|
|
32
|
+
['endiconurl', PROP_STRING],
|
|
31
33
|
['rangelabelposition', { value: 'bottom', ...PROP_STRING }],
|
|
32
34
|
]);
|
|
33
35
|
const registerProps = () => {
|
|
@@ -163,14 +165,14 @@ class SliderComponent extends BaseFormCustomComponent {
|
|
|
163
165
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.19", type: SliderComponent, isStandalone: true, selector: "[wmSlider]", providers: [
|
|
164
166
|
provideAs(SliderComponent, NG_VALUE_ACCESSOR, true),
|
|
165
167
|
provideAsWidgetRef(SliderComponent)
|
|
166
|
-
], viewQueries: [{ propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <
|
|
168
|
+
], viewQueries: [{ propertyName: "ngModel", first: true, predicate: NgModel, descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"starticon\" [iconurl]=\"starticonurl\"></wm-app-icon> \n </button>\n }\n <div class=\"slider-control\">\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n }\n <input class=\"range-input\" type=\"range\" aria-orientation=\"horizontal\" focus-target [title]=\"datavalue\"\n [attr.min]=\"minvalue\" [attr.max]=\"maxvalue\" [attr.step]=\"step\" [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{ standalone: true }\" [disabled]=\"disabled||readonly\" [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\" (blur)=\"invokeOnTouched($event)\" (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\" [tabindex]=\"tabindex\" />\n <p class=\"active-slider\"></p>\n </div>\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"incrementButton\" (click)=\"incrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"endicon\" [iconurl]=\"endiconurl\"></wm-app-icon> \n </button>\n }\n</div>\n\n} @else {\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n}\n<input class=\"range-input\" aria-orientation=\"horizontal\"\n focus-target\n type=\"range\" [title]=\"datavalue\"\n [attr.min]=\"minvalue\"\n [attr.max]=\"maxvalue\"\n [attr.step]=\"step\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [disabled]=\"disabled||readonly\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (blur)=\"invokeOnTouched($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\"\n [tabindex]=\"tabindex\"/>\n}\n@if (readonly || disabled) {\n <div aria-readonly=\"true\" class=\"readonly-wrapper\"></div>\n}\n@if(showmarkers){\n <div class=\"marker-container\">\n@for (marker of markerItems; track marker) {\n <div class=\"marker-wrapper\"\n [ngStyle]=\"{ left: marker.left + 'px' }\"\n [attr.title]=\"marker.label\">\n <div class=\"marker-label\" [ngClass]=\"marker.position\" [attr.title]=\"marker.label\">\n {{ marker.label }}\n </div>\n <div class=\"marker-dot\" [attr.title]=\"marker.label\"></div>\n </div>\n }\n </div>\n\n}\n", dependencies: [{ kind: "directive", type: TextContentDirective, selector: "[textContent]", inputs: ["textContent"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.RangeValueAccessor, selector: "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: WmAppIconComponent, selector: "wm-app-icon", inputs: ["iconclass", "iconurl", "defaultIconClass", "defaultClasses", "iconStyle", "alt"] }] }); }
|
|
167
169
|
}
|
|
168
170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: SliderComponent, decorators: [{
|
|
169
171
|
type: Component,
|
|
170
|
-
args: [{ standalone: true, imports: [TextContentDirective, FormsModule, CommonModule], selector: '[wmSlider]', providers: [
|
|
172
|
+
args: [{ standalone: true, imports: [TextContentDirective, FormsModule, CommonModule, WmAppIconComponent], selector: '[wmSlider]', providers: [
|
|
171
173
|
provideAs(SliderComponent, NG_VALUE_ACCESSOR, true),
|
|
172
174
|
provideAsWidgetRef(SliderComponent)
|
|
173
|
-
], template: "@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <
|
|
175
|
+
], template: "@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"starticon\" [iconurl]=\"starticonurl\"></wm-app-icon> \n </button>\n }\n <div class=\"slider-control\">\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n }\n <input class=\"range-input\" type=\"range\" aria-orientation=\"horizontal\" focus-target [title]=\"datavalue\"\n [attr.min]=\"minvalue\" [attr.max]=\"maxvalue\" [attr.step]=\"step\" [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{ standalone: true }\" [disabled]=\"disabled||readonly\" [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\" (blur)=\"invokeOnTouched($event)\" (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\" [tabindex]=\"tabindex\" />\n <p class=\"active-slider\"></p>\n </div>\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"incrementButton\" (click)=\"incrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"endicon\" [iconurl]=\"endiconurl\"></wm-app-icon> \n </button>\n }\n</div>\n\n} @else {\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n}\n<input class=\"range-input\" aria-orientation=\"horizontal\"\n focus-target\n type=\"range\" [title]=\"datavalue\"\n [attr.min]=\"minvalue\"\n [attr.max]=\"maxvalue\"\n [attr.step]=\"step\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [disabled]=\"disabled||readonly\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (blur)=\"invokeOnTouched($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\"\n [tabindex]=\"tabindex\"/>\n}\n@if (readonly || disabled) {\n <div aria-readonly=\"true\" class=\"readonly-wrapper\"></div>\n}\n@if(showmarkers){\n <div class=\"marker-container\">\n@for (marker of markerItems; track marker) {\n <div class=\"marker-wrapper\"\n [ngStyle]=\"{ left: marker.left + 'px' }\"\n [attr.title]=\"marker.label\">\n <div class=\"marker-label\" [ngClass]=\"marker.position\" [attr.title]=\"marker.label\">\n {{ marker.label }}\n </div>\n <div class=\"marker-dot\" [attr.title]=\"marker.label\"></div>\n </div>\n }\n </div>\n\n}\n" }]
|
|
174
176
|
}], ctorParameters: () => [{ type: i0.Injector }, { type: undefined, decorators: [{
|
|
175
177
|
type: Inject,
|
|
176
178
|
args: ['EXPLICIT_CONTEXT']
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/slider/src/slider.props.ts","../../../../../projects/components/widgets/input/slider/src/slider.component.ts","../../../../../projects/components/widgets/input/slider/src/slider.component.html","../../../../../projects/components/widgets/input/slider/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget} from '@wm/components/base';\nimport {FormWidgetType} from '@wm/core';\n\nexport const sliderProps = new Map(\n [\n ['class', PROP_STRING],\n ['datavalue', PROP_STRING],\n ['disabled', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['maxvalue', PROP_NUMBER],\n ['minvalue', PROP_NUMBER],\n ['name', PROP_STRING],\n ['readonly', PROP_BOOLEAN],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['step', PROP_NUMBER],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['showmarkers',{value: false, ...PROP_BOOLEAN}],\n ['markerlabeltext',PROP_ANY],\n ['showicons', PROP_BOOLEAN],\n ['starticon',{value : 'wi wi-minus', ...PROP_STRING}],\n ['endicon',{value : 'wi wi-plus', ...PROP_STRING}],\n ['rangelabelposition',{value : 'bottom', ...PROP_STRING}],\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-slider',\n sliderProps\n );\n registerFormWidget(\n FormWidgetType.SLIDER,\n new Map(sliderProps)\n );\n};\n","import {\n convertDataToObject,\n IWidgetConfig,\n provideAs,\n provideAsWidgetRef,\n styler,\n TextContentDirective\n} from \"@wm/components/base\";\nimport {FormsModule, NG_VALUE_ACCESSOR, NgModel} from '@angular/forms';\nimport {Component, Inject, Injector, OnDestroy, Optional, ViewChild} from '@angular/core';\nimport {BaseFormCustomComponent} from '@wm/components/input/base-form-custom';\n\nimport {registerProps} from './slider.props';\nimport {App, isDefined, switchClass} from \"@wm/core\";\nimport { CommonModule } from \"@angular/common\";\n\n\nconst DEFAULT_CLS = 'app-slider slider';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-slider',\n hostClass: DEFAULT_CLS\n};\nconst RANGE_LABEL_POSITION: {[key: string]: string} = {\n top: 'range-label-top',\n side: 'range-label-side',\n bottom: 'range-label-bottom',\n};\n@Component({\n standalone: true,\n imports: [TextContentDirective, FormsModule, CommonModule],\n selector: '[wmSlider]',\n templateUrl: './slider.component.html',\n providers: [\n provideAs(SliderComponent, NG_VALUE_ACCESSOR, true),\n provideAsWidgetRef(SliderComponent)\n ]\n})\nexport class SliderComponent extends BaseFormCustomComponent implements OnDestroy {\n static initializeProps = registerProps();\n\n public minvalue: number;\n public maxvalue: number;\n public disabled: boolean;\n public step: number;\n public shortcutkey: string;\n public tabindex: any;\n public name: string;\n public readonly: boolean;\n public hint: string;\n public arialabel: string;\n public markerlabeltext: string\n public showmarkers: boolean;\n public showicons: boolean;\n public starticon: string;\n public endicon:string;\n public isPrism: boolean = false;\n\n @ViewChild(NgModel) ngModel: NgModel;\n public markerItems: any[];\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any, public app?: App) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n this.isPrism = this.app.isPrism;\n }\n\n // change and blur events are added from the template\n protected handleEvent(node: HTMLElement, eventName: string, callback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(node, eventName, callback, locals);\n }\n }\n\n public handleChange(newVal?: boolean) {\n this.updateSliderValue();\n this.invokeOnChange(this.datavalue, {type: 'change'}, this.ngModel.valid);\n }\n\n updateSliderValue() {\n const sliderValue = 100 - ((((Number(this.datavalue) || 0) - (this.minvalue || 0)) / ((this.maxvalue || 100) - (this.minvalue || 0))) * 100);\n const slider = this.nativeElement.querySelector('.slider-control') as HTMLElement;\n if (slider) {\n const safePercent = Math.min(100, Math.max(0, sliderValue));\n slider.style.setProperty('--end', `${safePercent}%`);\n }\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'tabindex') {\n return;\n }\n else if(key === 'showmarkers'||key === 'markerlabeltext' || key === 'minvalue'||key === 'maxvalue'||key === 'step') {\n if(this.showmarkers) {\n this.renderMarkers();\n }\n } else if(key === 'rangelabelposition'){\n switchClass(this.nativeElement, RANGE_LABEL_POSITION[nv], RANGE_LABEL_POSITION[ov]);\n }else if(key === 'datavalue'){\n this.datavalue = (nv === \"\" || nv === null) ? (this.datavalue ?? 50) : nv\n this.updateSliderValue()\n }\n super.onPropertyChange(key, nv, ov);\n }\n private renderMarkers() {\n const sliderTrack = this.nativeElement.querySelector('.range-input') as HTMLElement;\n const trackWidth = sliderTrack?.offsetWidth-9|| 0;\n const tickCount = this.step > 0 ? Math.floor((this.maxvalue||100 - this.minvalue||0) / this.step) + 1 : 0;\n const labels = convertDataToObject(this.markerlabeltext);\n this.markerItems = [];\n for (let i = 0; i < tickCount; i++) {\n const left = ((trackWidth / (tickCount - 1)) * i);\n const label = labels?.[i]?.dataValue ?? (Array.isArray(labels) ? (typeof labels[i] === 'object' && labels[i]?.title ? labels[i].title : labels[i]) : `${i}`);\n const position = Array.isArray(labels) && typeof labels[i] === 'object' && labels[i]?.position ? labels[i].position : 'up';\n this.markerItems.push({ label, position, left });\n }\n }\n\n ngAfterViewInit() {\n super.ngAfterViewInit();\n if(this.showmarkers) {\n setTimeout(() => {this.renderMarkers();}, 40);\n }\n if(this.datavalue){\n setTimeout(() => {this.updateSliderValue();});\n }\n }\n\n decrementButtonClick(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.disabled) {\n return;\n }\n\n const step = Number(this.step) || 1;\n const min = Number(this.minvalue) || 0;\n\n let value = Number(this.datavalue ?? 50);\n value = value - step;\n if (value <= min) {\n return;\n }\n if (!isNaN(min)) {\n value = Math.max(value, min);\n }\n\n this.datavalue = value;\n this.handleChange()\n }\n\n\n incrementButtonClick(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.disabled) {\n return;\n }\n\n const step = Number(this.step) || 1;\n const max = Number(this.maxvalue) || 100;\n\n let value = Number(this.datavalue ?? 50);\n value = value + step;\n if (value >= max) return;\n\n if (!isNaN(max)) {\n value = Math.min(value, max);\n }\n\n this.datavalue = value;\n this.handleChange()\n }\n\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Clear ViewChild reference\n this.ngModel = null;\n\n // MEMORY LEAK FIX: Clear marker items array\n if (this.markerItems) {\n this.markerItems = [];\n }\n\n // Call parent ngOnDestroy\n super.ngOnDestroy();\n }\n}\n","@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <i aria-hidden=\"true\" [ngClass]=\"starticon\"></i></button>\n }\n <div class=\"slider-control\">\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n }\n <input class=\"range-input\" type=\"range\" aria-orientation=\"horizontal\" focus-target [title]=\"datavalue\"\n [attr.min]=\"minvalue\" [attr.max]=\"maxvalue\" [attr.step]=\"step\" [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{ standalone: true }\" [disabled]=\"disabled||readonly\" [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\" (blur)=\"invokeOnTouched($event)\" (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\" [tabindex]=\"tabindex\" />\n <p class=\"active-slider\"></p>\n </div>\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"incrementButton\" (click)=\"incrementButtonClick($event)\">\n <i aria-hidden=\"true\" [ngClass]=\"endicon\"></i>\n </button>\n }\n</div>\n\n} @else {\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n}\n<input class=\"range-input\" aria-orientation=\"horizontal\"\n focus-target\n type=\"range\" [title]=\"datavalue\"\n [attr.min]=\"minvalue\"\n [attr.max]=\"maxvalue\"\n [attr.step]=\"step\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [disabled]=\"disabled||readonly\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (blur)=\"invokeOnTouched($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\"\n [tabindex]=\"tabindex\"/>\n}\n@if (readonly || disabled) {\n <div aria-readonly=\"true\" class=\"readonly-wrapper\"></div>\n}\n@if(showmarkers){\n <div class=\"marker-container\">\n@for (marker of markerItems; track marker) {\n <div class=\"marker-wrapper\"\n [ngStyle]=\"{ left: marker.left + 'px' }\"\n [attr.title]=\"marker.label\">\n <div class=\"marker-label\" [ngClass]=\"marker.position\" [attr.title]=\"marker.label\">\n {{ marker.label }}\n </div>\n <div class=\"marker-dot\" [attr.title]=\"marker.label\"></div>\n </div>\n }\n </div>\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;AAGO,MAAM,WAAW,GAAG,IAAI,GAAG,CAC9B;IACI,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,WAAW,CAAC;IACzB,CAAC,UAAU,EAAE,WAAW,CAAC;IACzB,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,aAAa,EAAE,WAAW,CAAC;IAC5B,CAAC,MAAM,EAAE,EAAC,KAAK,EAAE,IAAI,EAAE,GAAG,YAAY,EAAC,CAAC;IACxC,CAAC,MAAM,EAAE,WAAW,CAAC;IACrB,CAAC,UAAU,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,GAAG,WAAW,EAAC,CAAC;IACxC,CAAC,aAAa,EAAC,EAAC,KAAK,EAAE,KAAK,EAAE,GAAG,YAAY,EAAC,CAAC;IAC/C,CAAC,iBAAiB,EAAC,QAAQ,CAAC;IAC5B,CAAC,WAAW,EAAE,YAAY,CAAC;IAC3B,CAAC,WAAW,EAAC,EAAC,KAAK,EAAG,aAAa,EAAE,GAAG,WAAW,EAAC,CAAC;IACrD,CAAC,SAAS,EAAC,EAAC,KAAK,EAAG,YAAY,EAAE,GAAG,WAAW,EAAC,CAAC;IAClD,CAAC,oBAA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E,IAAI,CAAC;AACnD,wBAAA,kBAAkB,CAAA,eAAA;AACrB,qBAAA,EAAA,QAAA,EAAA,+iFAAA,EAAA;;0BAyB2B,MAAM;2BAAC,kBAAkB;;0BAAG;;sBAHvD,SAAS;uBAAC,OAAO;;;AEzDtB;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../projects/components/widgets/input/slider/src/slider.props.ts","../../../../../projects/components/widgets/input/slider/src/slider.component.ts","../../../../../projects/components/widgets/input/slider/src/slider.component.html","../../../../../projects/components/widgets/input/slider/src/index.ts"],"sourcesContent":["import {PROP_ANY, PROP_BOOLEAN, PROP_NUMBER, PROP_STRING, register, registerFormWidget} from '@wm/components/base';\nimport {FormWidgetType} from '@wm/core';\n\nexport const sliderProps = new Map(\n [\n ['class', PROP_STRING],\n ['datavalue', PROP_STRING],\n ['disabled', PROP_BOOLEAN],\n ['hint', PROP_STRING],\n ['arialabel', PROP_STRING],\n ['maxvalue', PROP_NUMBER],\n ['minvalue', PROP_NUMBER],\n ['name', PROP_STRING],\n ['readonly', PROP_BOOLEAN],\n ['shortcutkey', PROP_STRING],\n ['show', {value: true, ...PROP_BOOLEAN}],\n ['step', PROP_NUMBER],\n ['tabindex', {value: 0, ...PROP_NUMBER}],\n ['showmarkers',{value: false, ...PROP_BOOLEAN}],\n ['markerlabeltext',PROP_ANY],\n ['showicons', PROP_BOOLEAN],\n ['starticon',{value : 'wi wi-minus', ...PROP_STRING}],\n ['endicon',{value : 'wi wi-plus', ...PROP_STRING}],\n ['starticonurl', PROP_STRING],\n ['endiconurl', PROP_STRING],\n ['rangelabelposition',{value : 'bottom', ...PROP_STRING}],\n ]\n);\n\nexport const registerProps = () => {\n register(\n 'wm-slider',\n sliderProps\n );\n registerFormWidget(\n FormWidgetType.SLIDER,\n new Map(sliderProps)\n );\n};\n","import {\n convertDataToObject,\n IWidgetConfig,\n provideAs,\n provideAsWidgetRef,\n styler,\n TextContentDirective,\n WmAppIconComponent\n} from \"@wm/components/base\";\nimport {FormsModule, NG_VALUE_ACCESSOR, NgModel} from '@angular/forms';\nimport {Component, Inject, Injector, OnDestroy, Optional, ViewChild} from '@angular/core';\nimport {BaseFormCustomComponent} from '@wm/components/input/base-form-custom';\n\nimport {registerProps} from './slider.props';\nimport {App, isDefined, switchClass} from \"@wm/core\";\nimport { CommonModule } from \"@angular/common\";\n\n\nconst DEFAULT_CLS = 'app-slider slider';\nconst WIDGET_CONFIG: IWidgetConfig = {\n widgetType: 'wm-slider',\n hostClass: DEFAULT_CLS\n};\nconst RANGE_LABEL_POSITION: {[key: string]: string} = {\n top: 'range-label-top',\n side: 'range-label-side',\n bottom: 'range-label-bottom',\n};\n@Component({\n standalone: true,\n imports: [TextContentDirective, FormsModule, CommonModule, WmAppIconComponent],\n selector: '[wmSlider]',\n templateUrl: './slider.component.html',\n providers: [\n provideAs(SliderComponent, NG_VALUE_ACCESSOR, true),\n provideAsWidgetRef(SliderComponent)\n ]\n})\nexport class SliderComponent extends BaseFormCustomComponent implements OnDestroy {\n static initializeProps = registerProps();\n\n public minvalue: number;\n public maxvalue: number;\n public disabled: boolean;\n public step: number;\n public shortcutkey: string;\n public tabindex: any;\n public name: string;\n public readonly: boolean;\n public hint: string;\n public arialabel: string;\n public markerlabeltext: string\n public showmarkers: boolean;\n public showicons: boolean;\n public starticon: string;\n public endicon:string;\n public starticonurl:string;\n public endiconurl: string;\n public isPrism: boolean = false;\n\n @ViewChild(NgModel) ngModel: NgModel;\n public markerItems: any[];\n\n constructor(inj: Injector, @Inject('EXPLICIT_CONTEXT') @Optional() explicitContext: any, public app?: App) {\n super(inj, WIDGET_CONFIG, explicitContext);\n styler(this.nativeElement, this);\n this.isPrism = this.app.isPrism;\n }\n\n // change and blur events are added from the template\n protected handleEvent(node: HTMLElement, eventName: string, callback: Function, locals: any) {\n if (eventName !== 'change' && eventName !== 'blur') {\n super.handleEvent(node, eventName, callback, locals);\n }\n }\n\n public handleChange(newVal?: boolean) {\n this.updateSliderValue();\n this.invokeOnChange(this.datavalue, {type: 'change'}, this.ngModel.valid);\n }\n\n updateSliderValue() {\n const sliderValue = 100 - ((((Number(this.datavalue) || 0) - (this.minvalue || 0)) / ((this.maxvalue || 100) - (this.minvalue || 0))) * 100);\n const slider = this.nativeElement.querySelector('.slider-control') as HTMLElement;\n if (slider) {\n const safePercent = Math.min(100, Math.max(0, sliderValue));\n slider.style.setProperty('--end', `${safePercent}%`);\n }\n }\n\n onPropertyChange(key: string, nv: any, ov?: any) {\n if (key === 'tabindex') {\n return;\n }\n else if(key === 'showmarkers'||key === 'markerlabeltext' || key === 'minvalue'||key === 'maxvalue'||key === 'step') {\n if(this.showmarkers) {\n this.renderMarkers();\n }\n } else if(key === 'rangelabelposition'){\n switchClass(this.nativeElement, RANGE_LABEL_POSITION[nv], RANGE_LABEL_POSITION[ov]);\n }else if(key === 'datavalue'){\n this.datavalue = (nv === \"\" || nv === null) ? (this.datavalue ?? 50) : nv\n this.updateSliderValue()\n }\n super.onPropertyChange(key, nv, ov);\n }\n private renderMarkers() {\n const sliderTrack = this.nativeElement.querySelector('.range-input') as HTMLElement;\n const trackWidth = sliderTrack?.offsetWidth-9|| 0;\n const tickCount = this.step > 0 ? Math.floor((this.maxvalue||100 - this.minvalue||0) / this.step) + 1 : 0;\n const labels = convertDataToObject(this.markerlabeltext);\n this.markerItems = [];\n for (let i = 0; i < tickCount; i++) {\n const left = ((trackWidth / (tickCount - 1)) * i);\n const label = labels?.[i]?.dataValue ?? (Array.isArray(labels) ? (typeof labels[i] === 'object' && labels[i]?.title ? labels[i].title : labels[i]) : `${i}`);\n const position = Array.isArray(labels) && typeof labels[i] === 'object' && labels[i]?.position ? labels[i].position : 'up';\n this.markerItems.push({ label, position, left });\n }\n }\n\n ngAfterViewInit() {\n super.ngAfterViewInit();\n if(this.showmarkers) {\n setTimeout(() => {this.renderMarkers();}, 40);\n }\n if(this.datavalue){\n setTimeout(() => {this.updateSliderValue();});\n }\n }\n\n decrementButtonClick(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.disabled) {\n return;\n }\n\n const step = Number(this.step) || 1;\n const min = Number(this.minvalue) || 0;\n\n let value = Number(this.datavalue ?? 50);\n value = value - step;\n if (value <= min) {\n return;\n }\n if (!isNaN(min)) {\n value = Math.max(value, min);\n }\n\n this.datavalue = value;\n this.handleChange()\n }\n\n\n incrementButtonClick(event: Event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (this.disabled) {\n return;\n }\n\n const step = Number(this.step) || 1;\n const max = Number(this.maxvalue) || 100;\n\n let value = Number(this.datavalue ?? 50);\n value = value + step;\n if (value >= max) return;\n\n if (!isNaN(max)) {\n value = Math.min(value, max);\n }\n\n this.datavalue = value;\n this.handleChange()\n }\n\n\n ngOnDestroy() {\n // MEMORY LEAK FIX: Clear ViewChild reference\n this.ngModel = null;\n\n // MEMORY LEAK FIX: Clear marker items array\n if (this.markerItems) {\n this.markerItems = [];\n }\n\n // Call parent ngOnDestroy\n super.ngOnDestroy();\n }\n}\n","@if (isPrism) {\n<div class=\"slider-container\">\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"decrementButton\" (click)=\"decrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"starticon\" [iconurl]=\"starticonurl\"></wm-app-icon> \n </button>\n }\n <div class=\"slider-control\">\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n }\n <input class=\"range-input\" type=\"range\" aria-orientation=\"horizontal\" focus-target [title]=\"datavalue\"\n [attr.min]=\"minvalue\" [attr.max]=\"maxvalue\" [attr.step]=\"step\" [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{ standalone: true }\" [disabled]=\"disabled||readonly\" [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\" (blur)=\"invokeOnTouched($event)\" (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\" [tabindex]=\"tabindex\" />\n <p class=\"active-slider\"></p>\n </div>\n @if (showicons) {\n <button class=\"btn-icon\" type=\"button\" name=\"incrementButton\" (click)=\"incrementButtonClick($event)\">\n <wm-app-icon [iconclass]=\"endicon\" [iconurl]=\"endiconurl\"></wm-app-icon> \n </button>\n }\n</div>\n\n} @else {\n @if(!showmarkers){\n <span [textContent]=\"minvalue||0\" class=\"app-slider-value pull-left\"></span>\n <span [textContent]=\"maxvalue||100\" class=\"app-slider-value pull-right\"></span>\n}\n<input class=\"range-input\" aria-orientation=\"horizontal\"\n focus-target\n type=\"range\" [title]=\"datavalue\"\n [attr.min]=\"minvalue\"\n [attr.max]=\"maxvalue\"\n [attr.step]=\"step\"\n [(ngModel)]=\"datavalue\"\n [ngModelOptions]=\"{standalone: true}\"\n [disabled]=\"disabled||readonly\"\n [attr.accesskey]=\"shortcutkey\"\n [attr.aria-label]=\"arialabel\"\n (blur)=\"invokeOnTouched($event)\"\n (ngModelChange)=\"handleChange($event)\"\n [attr.name]=\"name\"\n [tabindex]=\"tabindex\"/>\n}\n@if (readonly || disabled) {\n <div aria-readonly=\"true\" class=\"readonly-wrapper\"></div>\n}\n@if(showmarkers){\n <div class=\"marker-container\">\n@for (marker of markerItems; track marker) {\n <div class=\"marker-wrapper\"\n [ngStyle]=\"{ left: marker.left + 'px' }\"\n [attr.title]=\"marker.label\">\n <div class=\"marker-label\" [ngClass]=\"marker.position\" [attr.title]=\"marker.label\">\n {{ marker.label }}\n </div>\n <div class=\"marker-dot\" [attr.title]=\"marker.label\"></div>\n </div>\n }\n </div>\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;AAGO,MAAM,WAAW,GAAG,IAAI,GAAG,CAC9B;IACI,CAAC,OAAO,EAAE,WAAW,CAAC;IACtB,CAAC,WAAW,EAAE,WAAW,CAAC;IAC1B,CAAC,UAAU,EAAE,YAAY,CAAC;IAC1B,CAAC,MAAM,EAAE,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