@wavemaker/app-ng-runtime 12.0.0-next.45058 → 12.0.0-next.45062
Sign up to get free protection for your applications and to get access to all the features.
- app-ng-runtime/components/input/rating/bundles/index.umd.js +26 -35
- app-ng-runtime/components/input/rating/esm2022/rating.component.mjs +26 -37
- app-ng-runtime/components/input/rating/esm2022/rating.props.mjs +3 -1
- app-ng-runtime/components/input/rating/fesm2022/index.mjs +27 -36
- app-ng-runtime/components/input/rating/fesm2022/index.mjs.map +1 -1
- app-ng-runtime/components/input/rating/rating.component.d.ts +3 -1
- app-ng-runtime/package.json +1 -1
- app-ng-runtime/scripts/custom-widgets-m3/src/checkbox_set/checkbox_set.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/checkbox_set/checkbox_set.js +0 -38
- app-ng-runtime/scripts/custom-widgets-m3/src/checkbox_set/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/checkbox_set/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/discrete_slider/discrete_slider.d.ts +0 -10
- app-ng-runtime/scripts/custom-widgets-m3/src/discrete_slider/discrete_slider.js +0 -171
- app-ng-runtime/scripts/custom-widgets-m3/src/discrete_slider/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/discrete_slider/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/divider/divider.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/divider/divider.js +0 -28
- app-ng-runtime/scripts/custom-widgets-m3/src/divider/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/divider/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/icon_button/icon_button.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/icon_button/icon_button.js +0 -24
- app-ng-runtime/scripts/custom-widgets-m3/src/icon_button/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/icon_button/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/input_chip.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/input_chip.js +0 -34
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/input_chip.variables.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/input_chip.variables.js +0 -1
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/input_chip/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/payee_list/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/payee_list/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/payee_list/payee_list.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/payee_list/payee_list.js +0 -19
- app-ng-runtime/scripts/custom-widgets-m3/src/progressbar/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/progressbar/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/progressbar/progressbar.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/progressbar/progressbar.js +0 -52
- app-ng-runtime/scripts/custom-widgets-m3/src/radio_set/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/radio_set/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/radio_set/radio_set.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/radio_set/radio_set.js +0 -35
- app-ng-runtime/scripts/custom-widgets-m3/src/slider/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/slider/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/slider/slider.d.ts +0 -11
- app-ng-runtime/scripts/custom-widgets-m3/src/slider/slider.js +0 -121
- app-ng-runtime/scripts/custom-widgets-m3/src/switch_button/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/switch_button/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/switch_button/switch_button.d.ts +0 -0
- app-ng-runtime/scripts/custom-widgets-m3/src/switch_button/switch_button.js +0 -33
- app-ng-runtime/scripts/custom-widgets-m3/src/textfield/page.min.d.ts +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/textfield/page.min.js +0 -7
- app-ng-runtime/scripts/custom-widgets-m3/src/textfield/textfield.d.ts +0 -4
- app-ng-runtime/scripts/custom-widgets-m3/src/textfield/textfield.js +0 -65
- app-ng-runtime/scripts/custom-widgets-m3/src/widget-registry.d.ts +0 -6
- app-ng-runtime/scripts/custom-widgets-m3/src/widget-registry.js +0 -68
@@ -36,6 +36,8 @@
|
|
36
36
|
['displayexpression', i3.PROP_STRING],
|
37
37
|
['displayfield', i3.PROP_STRING],
|
38
38
|
['iconcolor', i3.PROP_STRING],
|
39
|
+
['activeiconclass', { value: 'wi wi-star', ...i3.PROP_STRING }],
|
40
|
+
['inactiveiconclass', { value: 'wi wi-star-border', ...i3.PROP_STRING }],
|
39
41
|
['iconsize', i3.PROP_STRING],
|
40
42
|
['maxvalue', { value: 5, ...i3.PROP_NUMBER }],
|
41
43
|
['name', i3.PROP_STRING],
|
@@ -54,36 +56,28 @@
|
|
54
56
|
const _c0 = ["ratingInput"];
|
55
57
|
const _c1 = ["wmRating", ""];
|
56
58
|
const _c2 = () => ({ standalone: true });
|
57
|
-
const _c3 = a0 => ({
|
58
|
-
const _c4 = (a0, a1) => ({
|
59
|
-
|
60
|
-
const _c6 = (a0, a1) => ({ "font-size": a0, color: a1 });
|
61
|
-
function RatingComponent_div_1_label_1_Template(rf, ctx) { if (rf & 1) {
|
59
|
+
const _c3 = a0 => ({ active: a0 });
|
60
|
+
const _c4 = (a0, a1) => ({ "font-size": a0, color: a1 });
|
61
|
+
function RatingComponent_label_2_Template(rf, ctx) { if (rf & 1) {
|
62
62
|
const _r1 = i0__namespace.ɵɵgetCurrentView();
|
63
|
-
i0__namespace.ɵɵelementStart(0, "label",
|
64
|
-
i0__namespace.ɵɵlistener("touchstart", function
|
65
|
-
i0__namespace.ɵɵ
|
66
|
-
i0__namespace.ɵɵ
|
63
|
+
i0__namespace.ɵɵelementStart(0, "label", 5);
|
64
|
+
i0__namespace.ɵɵlistener("touchstart", function RatingComponent_label_2_Template_label_touchstart_0_listener($event) { i0__namespace.ɵɵrestoreView(_r1); const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.onTouchStart($event)); })("mouseleave", function RatingComponent_label_2_Template_label_mouseleave_0_listener($event) { const rate_r3 = i0__namespace.ɵɵrestoreView(_r1).$implicit; const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.onMouseleave($event, rate_r3)); })("mouseover", function RatingComponent_label_2_Template_label_mouseover_0_listener($event) { const rate_r3 = i0__namespace.ɵɵrestoreView(_r1).$implicit; const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.onMouseOver($event, rate_r3)); });
|
65
|
+
i0__namespace.ɵɵelement(1, "i", 6);
|
66
|
+
i0__namespace.ɵɵelementStart(2, "input", 7, 0);
|
67
|
+
i0__namespace.ɵɵlistener("click", function RatingComponent_label_2_Template_input_click_2_listener($event) { const rate_r3 = i0__namespace.ɵɵrestoreView(_r1).$implicit; const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.onRatingClick($event, rate_r3)); });
|
67
68
|
i0__namespace.ɵɵelementEnd()();
|
68
69
|
} if (rf & 2) {
|
69
70
|
const rate_r3 = ctx.$implicit;
|
70
|
-
const ctx_r1 = i0__namespace.ɵɵnextContext(
|
71
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(
|
71
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
72
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(11, _c3, rate_r3.index <= ctx_r1.selectedRatingValue))("ngStyle", i0__namespace.ɵɵpureFunction2(13, _c4, ctx_r1.iconsize, rate_r3.index <= ctx_r1.selectedRatingValue && ctx_r1.iconcolor))("title", rate_r3.label || rate_r3.index)("for", ctx_r1._id + "-" + rate_r3.index);
|
73
|
+
i0__namespace.ɵɵadvance();
|
74
|
+
i0__namespace.ɵɵclassMapInterpolate1("app-icon ", rate_r3.index <= ctx_r1.selectedRatingValue ? ctx_r1.activeiconclass : ctx_r1.inactiveiconclass, "");
|
72
75
|
i0__namespace.ɵɵadvance();
|
73
76
|
i0__namespace.ɵɵproperty("id", ctx_r1._id + "-" + rate_r3.index)("value", rate_r3.key || rate_r3.index);
|
74
77
|
i0__namespace.ɵɵattribute("aria-label", (rate_r3.label || rate_r3.index) + " out of " + ctx_r1.ratingItems.length + " ratings")("aria-checked", rate_r3.label === ctx_r1.datavalue ? "true" : "false");
|
75
78
|
} }
|
76
|
-
function
|
77
|
-
i0__namespace.ɵɵ
|
78
|
-
i0__namespace.ɵɵtemplate(1, RatingComponent_div_1_label_1_Template, 3, 13, "label", 7);
|
79
|
-
i0__namespace.ɵɵelementEnd();
|
80
|
-
} if (rf & 2) {
|
81
|
-
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
82
|
-
i0__namespace.ɵɵadvance();
|
83
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx_r1.ratingItems);
|
84
|
-
} }
|
85
|
-
function RatingComponent_label_4_Template(rf, ctx) { if (rf & 1) {
|
86
|
-
i0__namespace.ɵɵelement(0, "label", 10);
|
79
|
+
function RatingComponent_label_3_Template(rf, ctx) { if (rf & 1) {
|
80
|
+
i0__namespace.ɵɵelement(0, "label", 8);
|
87
81
|
} if (rf & 2) {
|
88
82
|
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
89
83
|
i0__namespace.ɵɵproperty("textContent", ctx_r1.caption);
|
@@ -103,6 +97,8 @@
|
|
103
97
|
}
|
104
98
|
constructor(inj, explicitContext) {
|
105
99
|
super(inj, WIDGET_CONFIG, explicitContext);
|
100
|
+
this.activeiconclass = '';
|
101
|
+
this.inactiveiconclass = '';
|
106
102
|
this._id = core.generateGUId();
|
107
103
|
i3.styler(this.nativeElement, this);
|
108
104
|
// prepare the rating options on dataset ready.
|
@@ -212,7 +208,6 @@
|
|
212
208
|
}
|
213
209
|
calculateRatingsWidth(dataVal) {
|
214
210
|
const selectedRating = parseFloat(this.selectedRatingValue), starWidth = 0.925, maxValue = parseInt(this.maxvalue || this.datasetItems.length, 10) || DEFAULT_RATING;
|
215
|
-
core.setCSS(this.nativeElement.querySelector('.ratings-container'), 'width', (starWidth * maxValue) + 'em');
|
216
211
|
dataVal = dataVal || this.datavalue;
|
217
212
|
if (dataVal === undefined || dataVal === '' || dataVal === null) {
|
218
213
|
this.caption = '';
|
@@ -270,26 +265,22 @@
|
|
270
265
|
} }, features: [i0__namespace.ɵɵProvidersFeature([
|
271
266
|
i3.provideAs(RatingComponent, i2.NG_VALUE_ACCESSOR, true),
|
272
267
|
i3.provideAsWidgetRef(RatingComponent)
|
273
|
-
]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c1, decls:
|
268
|
+
]), i0__namespace.ɵɵInheritDefinitionFeature], attrs: _c1, decls: 4, vars: 7, consts: [["ratingInput", ""], ["aria-multiselectable", "true", "ngDefaultControl", "", 1, "ratings-wrapper", 3, "focus", "ngModelChange", "ngModel", "ngModelOptions"], [1, "rating-style"], [3, "ngClass", "ngStyle", "title", "for", "touchstart", "mouseleave", "mouseover", 4, "ngFor", "ngForOf"], ["class", "caption", 3, "textContent", 4, "ngIf"], [3, "touchstart", "mouseleave", "mouseover", "ngClass", "ngStyle", "title", "for"], ["aria-hidden", "true"], ["type", "radio", "role", "radio", "name", "ratings-id", 3, "click", "id", "value"], [1, "caption", 3, "textContent"]], template: function RatingComponent_Template(rf, ctx) { if (rf & 1) {
|
274
269
|
i0__namespace.ɵɵelementStart(0, "div", 1);
|
275
270
|
i0__namespace.ɵɵlistener("focus", function RatingComponent_Template_div_focus_0_listener($event) { return ctx.onFocus($event); });
|
276
271
|
i0__namespace.ɵɵtwoWayListener("ngModelChange", function RatingComponent_Template_div_ngModelChange_0_listener($event) { i0__namespace.ɵɵtwoWayBindingSet(ctx.modelByKey, $event) || (ctx.modelByKey = $event); return $event; });
|
277
|
-
i0__namespace.ɵɵ
|
278
|
-
i0__namespace.ɵɵ
|
279
|
-
i0__namespace.ɵɵelement(3, "div", 4);
|
272
|
+
i0__namespace.ɵɵelementStart(1, "div", 2);
|
273
|
+
i0__namespace.ɵɵtemplate(2, RatingComponent_label_2_Template, 4, 16, "label", 3);
|
280
274
|
i0__namespace.ɵɵelementEnd();
|
281
|
-
i0__namespace.ɵɵtemplate(
|
275
|
+
i0__namespace.ɵɵtemplate(3, RatingComponent_label_3_Template, 1, 1, "label", 4);
|
282
276
|
i0__namespace.ɵɵelementEnd();
|
283
277
|
} if (rf & 2) {
|
284
278
|
i0__namespace.ɵɵtwoWayProperty("ngModel", ctx.modelByKey);
|
285
|
-
i0__namespace.ɵɵproperty("ngModelOptions", i0__namespace.ɵɵpureFunction0(
|
286
|
-
i0__namespace.ɵɵadvance();
|
287
|
-
i0__namespace.ɵɵproperty("ngIf", !ctx.readonly);
|
279
|
+
i0__namespace.ɵɵproperty("ngModelOptions", i0__namespace.ɵɵpureFunction0(6, _c2));
|
288
280
|
i0__namespace.ɵɵadvance();
|
289
|
-
i0__namespace.ɵɵclassProp("
|
290
|
-
i0__namespace.ɵɵproperty("ngStyle", i0__namespace.ɵɵpureFunction1(9, _c3, ctx.iconsize));
|
281
|
+
i0__namespace.ɵɵclassProp("disabled", ctx.readonly);
|
291
282
|
i0__namespace.ɵɵadvance();
|
292
|
-
i0__namespace.ɵɵproperty("
|
283
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.ratingItems);
|
293
284
|
i0__namespace.ɵɵadvance();
|
294
285
|
i0__namespace.ɵɵproperty("ngIf", ctx.showcaptions);
|
295
286
|
} }, dependencies: [i1__namespace.NgClass, i1__namespace.NgForOf, i1__namespace.NgIf, i1__namespace.NgStyle, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.NgModel, i3__namespace.TextContentDirective], encapsulation: 2 }); }
|
@@ -299,7 +290,7 @@
|
|
299
290
|
args: [{ selector: '[wmRating]', providers: [
|
300
291
|
i3.provideAs(RatingComponent, i2.NG_VALUE_ACCESSOR, true),
|
301
292
|
i3.provideAsWidgetRef(RatingComponent)
|
302
|
-
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\" aria-multiselectable=\"true\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div
|
293
|
+
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\" aria-multiselectable=\"true\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.disabled]=\"readonly\" class=\"rating-style\">\n <label *ngFor=\"let rate of ratingItems;\"\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 </div>\n <label *ngIf=\"showcaptions\" class=\"caption\" [textContent]=\"caption\"></label>\n</div>\n" }]
|
303
294
|
}], () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
|
304
295
|
type: i0.Inject,
|
305
296
|
args: ['EXPLICIT_CONTEXT']
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Component, ElementRef, Inject, Injector, Optional, ViewChild } from '@angular/core';
|
2
2
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
3
|
-
import { generateGUId,
|
3
|
+
import { generateGUId, noop } from '@wm/core';
|
4
4
|
import { getOrderedDataset, provideAs, provideAsWidgetRef, styler } from '@wm/components/base';
|
5
5
|
import { DatasetAwareFormComponent } from '@wm/components/input';
|
6
6
|
import { registerProps } from './rating.props';
|
@@ -12,36 +12,28 @@ import * as i3 from "@wm/components/base";
|
|
12
12
|
const _c0 = ["ratingInput"];
|
13
13
|
const _c1 = ["wmRating", ""];
|
14
14
|
const _c2 = () => ({ standalone: true });
|
15
|
-
const _c3 = a0 => ({
|
16
|
-
const _c4 = (a0, a1) => ({
|
17
|
-
|
18
|
-
const _c6 = (a0, a1) => ({ "font-size": a0, color: a1 });
|
19
|
-
function RatingComponent_div_1_label_1_Template(rf, ctx) { if (rf & 1) {
|
15
|
+
const _c3 = a0 => ({ active: a0 });
|
16
|
+
const _c4 = (a0, a1) => ({ "font-size": a0, color: a1 });
|
17
|
+
function RatingComponent_label_2_Template(rf, ctx) { if (rf & 1) {
|
20
18
|
const _r1 = i0.ɵɵgetCurrentView();
|
21
|
-
i0.ɵɵelementStart(0, "label",
|
22
|
-
i0.ɵɵlistener("touchstart", function
|
23
|
-
i0.ɵɵ
|
24
|
-
i0.ɵɵ
|
19
|
+
i0.ɵɵelementStart(0, "label", 5);
|
20
|
+
i0.ɵɵlistener("touchstart", function RatingComponent_label_2_Template_label_touchstart_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onTouchStart($event)); })("mouseleave", function RatingComponent_label_2_Template_label_mouseleave_0_listener($event) { const rate_r3 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onMouseleave($event, rate_r3)); })("mouseover", function RatingComponent_label_2_Template_label_mouseover_0_listener($event) { const rate_r3 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onMouseOver($event, rate_r3)); });
|
21
|
+
i0.ɵɵelement(1, "i", 6);
|
22
|
+
i0.ɵɵelementStart(2, "input", 7, 0);
|
23
|
+
i0.ɵɵlistener("click", function RatingComponent_label_2_Template_input_click_2_listener($event) { const rate_r3 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRatingClick($event, rate_r3)); });
|
25
24
|
i0.ɵɵelementEnd()();
|
26
25
|
} if (rf & 2) {
|
27
26
|
const rate_r3 = ctx.$implicit;
|
28
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
29
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
27
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
28
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c3, rate_r3.index <= ctx_r1.selectedRatingValue))("ngStyle", i0.ɵɵpureFunction2(13, _c4, ctx_r1.iconsize, rate_r3.index <= ctx_r1.selectedRatingValue && ctx_r1.iconcolor))("title", rate_r3.label || rate_r3.index)("for", ctx_r1._id + "-" + rate_r3.index);
|
29
|
+
i0.ɵɵadvance();
|
30
|
+
i0.ɵɵclassMapInterpolate1("app-icon ", rate_r3.index <= ctx_r1.selectedRatingValue ? ctx_r1.activeiconclass : ctx_r1.inactiveiconclass, "");
|
30
31
|
i0.ɵɵadvance();
|
31
32
|
i0.ɵɵproperty("id", ctx_r1._id + "-" + rate_r3.index)("value", rate_r3.key || rate_r3.index);
|
32
33
|
i0.ɵɵattribute("aria-label", (rate_r3.label || rate_r3.index) + " out of " + ctx_r1.ratingItems.length + " ratings")("aria-checked", rate_r3.label === ctx_r1.datavalue ? "true" : "false");
|
33
34
|
} }
|
34
|
-
function
|
35
|
-
i0.ɵɵ
|
36
|
-
i0.ɵɵtemplate(1, RatingComponent_div_1_label_1_Template, 3, 13, "label", 7);
|
37
|
-
i0.ɵɵelementEnd();
|
38
|
-
} if (rf & 2) {
|
39
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
40
|
-
i0.ɵɵadvance();
|
41
|
-
i0.ɵɵproperty("ngForOf", ctx_r1.ratingItems);
|
42
|
-
} }
|
43
|
-
function RatingComponent_label_4_Template(rf, ctx) { if (rf & 1) {
|
44
|
-
i0.ɵɵelement(0, "label", 10);
|
35
|
+
function RatingComponent_label_3_Template(rf, ctx) { if (rf & 1) {
|
36
|
+
i0.ɵɵelement(0, "label", 8);
|
45
37
|
} if (rf & 2) {
|
46
38
|
const ctx_r1 = i0.ɵɵnextContext();
|
47
39
|
i0.ɵɵproperty("textContent", ctx_r1.caption);
|
@@ -61,6 +53,8 @@ export class RatingComponent extends DatasetAwareFormComponent {
|
|
61
53
|
}
|
62
54
|
constructor(inj, explicitContext) {
|
63
55
|
super(inj, WIDGET_CONFIG, explicitContext);
|
56
|
+
this.activeiconclass = '';
|
57
|
+
this.inactiveiconclass = '';
|
64
58
|
this._id = generateGUId();
|
65
59
|
styler(this.nativeElement, this);
|
66
60
|
// prepare the rating options on dataset ready.
|
@@ -170,7 +164,6 @@ export class RatingComponent extends DatasetAwareFormComponent {
|
|
170
164
|
}
|
171
165
|
calculateRatingsWidth(dataVal) {
|
172
166
|
const selectedRating = parseFloat(this.selectedRatingValue), starWidth = 0.925, maxValue = parseInt(this.maxvalue || this.datasetItems.length, 10) || DEFAULT_RATING;
|
173
|
-
setCSS(this.nativeElement.querySelector('.ratings-container'), 'width', (starWidth * maxValue) + 'em');
|
174
167
|
dataVal = dataVal || this.datavalue;
|
175
168
|
if (dataVal === undefined || dataVal === '' || dataVal === null) {
|
176
169
|
this.caption = '';
|
@@ -228,26 +221,22 @@ export class RatingComponent extends DatasetAwareFormComponent {
|
|
228
221
|
} }, features: [i0.ɵɵProvidersFeature([
|
229
222
|
provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),
|
230
223
|
provideAsWidgetRef(RatingComponent)
|
231
|
-
]), i0.ɵɵInheritDefinitionFeature], attrs: _c1, decls:
|
224
|
+
]), i0.ɵɵInheritDefinitionFeature], attrs: _c1, decls: 4, vars: 7, consts: [["ratingInput", ""], ["aria-multiselectable", "true", "ngDefaultControl", "", 1, "ratings-wrapper", 3, "focus", "ngModelChange", "ngModel", "ngModelOptions"], [1, "rating-style"], [3, "ngClass", "ngStyle", "title", "for", "touchstart", "mouseleave", "mouseover", 4, "ngFor", "ngForOf"], ["class", "caption", 3, "textContent", 4, "ngIf"], [3, "touchstart", "mouseleave", "mouseover", "ngClass", "ngStyle", "title", "for"], ["aria-hidden", "true"], ["type", "radio", "role", "radio", "name", "ratings-id", 3, "click", "id", "value"], [1, "caption", 3, "textContent"]], template: function RatingComponent_Template(rf, ctx) { if (rf & 1) {
|
232
225
|
i0.ɵɵelementStart(0, "div", 1);
|
233
226
|
i0.ɵɵlistener("focus", function RatingComponent_Template_div_focus_0_listener($event) { return ctx.onFocus($event); });
|
234
227
|
i0.ɵɵtwoWayListener("ngModelChange", function RatingComponent_Template_div_ngModelChange_0_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.modelByKey, $event) || (ctx.modelByKey = $event); return $event; });
|
235
|
-
i0.ɵɵ
|
236
|
-
i0.ɵɵ
|
237
|
-
i0.ɵɵelement(3, "div", 4);
|
228
|
+
i0.ɵɵelementStart(1, "div", 2);
|
229
|
+
i0.ɵɵtemplate(2, RatingComponent_label_2_Template, 4, 16, "label", 3);
|
238
230
|
i0.ɵɵelementEnd();
|
239
|
-
i0.ɵɵtemplate(
|
231
|
+
i0.ɵɵtemplate(3, RatingComponent_label_3_Template, 1, 1, "label", 4);
|
240
232
|
i0.ɵɵelementEnd();
|
241
233
|
} if (rf & 2) {
|
242
234
|
i0.ɵɵtwoWayProperty("ngModel", ctx.modelByKey);
|
243
|
-
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(
|
244
|
-
i0.ɵɵadvance();
|
245
|
-
i0.ɵɵproperty("ngIf", !ctx.readonly);
|
235
|
+
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(6, _c2));
|
246
236
|
i0.ɵɵadvance();
|
247
|
-
i0.ɵɵclassProp("
|
248
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(9, _c3, ctx.iconsize));
|
237
|
+
i0.ɵɵclassProp("disabled", ctx.readonly);
|
249
238
|
i0.ɵɵadvance();
|
250
|
-
i0.ɵɵproperty("
|
239
|
+
i0.ɵɵproperty("ngForOf", ctx.ratingItems);
|
251
240
|
i0.ɵɵadvance();
|
252
241
|
i0.ɵɵproperty("ngIf", ctx.showcaptions);
|
253
242
|
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgModel, i3.TextContentDirective], encapsulation: 2 }); }
|
@@ -257,7 +246,7 @@ export class RatingComponent extends DatasetAwareFormComponent {
|
|
257
246
|
args: [{ selector: '[wmRating]', providers: [
|
258
247
|
provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),
|
259
248
|
provideAsWidgetRef(RatingComponent)
|
260
|
-
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\" aria-multiselectable=\"true\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div
|
249
|
+
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\" aria-multiselectable=\"true\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.disabled]=\"readonly\" class=\"rating-style\">\n <label *ngFor=\"let rate of ratingItems;\"\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 </div>\n <label *ngIf=\"showcaptions\" class=\"caption\" [textContent]=\"caption\"></label>\n</div>\n" }]
|
261
250
|
}], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
|
262
251
|
type: Inject,
|
263
252
|
args: ['EXPLICIT_CONTEXT']
|
@@ -268,4 +257,4 @@ export class RatingComponent extends DatasetAwareFormComponent {
|
|
268
257
|
args: ['ratingInput', /* TODO: add static flag */ { read: ElementRef }]
|
269
258
|
}] }); })();
|
270
259
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RatingComponent, { className: "RatingComponent", filePath: "rating.component.ts", lineNumber: 25 }); })();
|
271
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0aW5nLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NvbXBvbmVudHMvd2lkZ2V0cy9pbnB1dC9yYXRpbmcvc3JjL3JhdGluZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jb21wb25lbnRzL3dpZGdld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hLmxlbmd0aCA+IG1heFZhbHVlKSB7XG4gICAgICAgICAgICBkYXRhID0gc2xpY2UoZGF0YSwgMCwgbWF4VmFsdWUpO1xuICAgICAgICB9XG5cbiAgICAgICAgZm9yIChsZXQgaSA9IG1heFZhbHVlOyBpID4gMDsgaS0tKSB7XG4gICAgICAgICAgICBpZiAoIWRhdGEubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgcmF0aW5nSXRlbXMucHVzaCh7a2V5OiBpLCB2YWx1ZTogaSwgaW5kZXg6IGksIGxhYmVsOiBpfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChpID4gZGF0YS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgcmF0aW5nSXRlbXMucHVzaCh7a2V5OiBpLCB2YWx1ZTogaSwgaW5kZXg6IGksIGxhYmVsOiBpfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGdldE9yZGVyZWREYXRhc2V0KGRhdGEsICdpbmRleDpkZXNjJyk7XG4gICAgICAgICAgICAgICAgICAgIHJhdGluZ0l0ZW1zID0gcmF0aW5nSXRlbXMuY29uY2F0KGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnJhdGluZ0l0ZW1zID0gcmF0aW5nSXRlbXM7XG4gICAgICAgIGlmICghZGF0YS5sZW5ndGgpIHsgLy8gY29uc3RydWN0cyBkZWZhdWx0IGRhdGFzZXRJdGVtcyB3aGVuIHRoZXJlIGlzIG5vIGRhdGFzZXQgYmluZGluZy5cbiAgICAgICAgICAgIHRoaXMuZGF0YXNldEl0ZW1zID0gcmF0aW5nSXRlbXM7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5vbkRhdGF2YWx1ZUNoYW5nZSh0aGlzLmRhdGF2YWx1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ICAgICAgICBzZXRDU1MoXG4gICAgICAgICAgICB0aGlzLm5hdGl2ZUVsZW1lbnQucXVlcnlTZWxlY3RvcignLnJhdGluZ3MtY29udGFpbmVyJykgYXMgSFRNTEVsZW1lbnQsXG4gICAgICAgICAgICAnd2lkdGgnLFxuICAgICAgICAgICAgKHN0YXJXaWR0aCAqIG1heFZhbHVlKSArICdlbSdcbiAgICAgICAgKTtcbiAgICAgICAgZGF0YVZhbCA9IGRhdGFWYWwgfHwgdGhpcy5kYXRhdmFsdWU7XG4gICAgICAgIGlmIChkYXRhVmFsID09PSB1bmRlZmluZWQgfHwgZGF0YVZhbCA9PT0gJycgfHwgZGF0YVZhbCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgdGhpcy5jYXB0aW9uID0gJyc7XG4gICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgfVxuICAgICAgICBpZiAoc2VsZWN0ZWRSYXRpbmcgPD0gbWF4VmFsdWUgJiYgc2VsZWN0ZWRSYXRpbmcgPj0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHNlbGVjdGVkUmF0aW5nICogc3RhcldpZHRoICsgJ2VtJztcbiAgICAgICAgfVxuICAgICAgICBpZiAoc2VsZWN0ZWRSYXRpbmcgPiBtYXhWYWx1ZSkge1xuICAgICAgICAgICAgcmV0dXJuIG1heFZhbHVlICogc3RhcldpZHRoICsgJ2VtJztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG9uUHJvcGVydHlDaGFuZ2Uoa2V5OiBzdHJpbmcsIG52OiBhbnksIG92PzogYW55KSB7XG4gICAgICAgIGlmIChrZXkgPT09ICdyZWFkb25seScpIHtcbiAgICAgICAgICAgIGlmIChudikge1xuICAgICAgICAgICAgICAgIHRoaXMucmF0aW5nc1dpZHRoID0gdGhpcy5jYWxjdWxhdGVSYXRpbmdzV2lkdGgoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChrZXkgPT09ICdtYXh2YWx1ZScpIHtcbiA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GV4XCIgKGNsaWNrKT1cIm9uUmF0aW5nQ2xpY2soJGV2ZW50LCByYXRlKVwiIG5hbWU9XCJyYXRpbmdzLWlkXCIgW3ZhbHVlXT1cInJhdGUua2V5IHx8IHJhdGUuaW5kZXhcIi8+XG4gICAgICAgIDwvbGFiZWw+XG4gICAgPC9kaXY+XG4gICAgPGxhYmVsICpuZ0lmPVwic2hvd2NhcHRpb25zXCIgY2xhc3M9XCJjYXB0aW9uXCIgW3RleHRDb250ZW50XT1cImNhcHRpb25cIj48L2xhYmVsPlxuPC9kaXY+XG4iXX0=
|
@@ -10,6 +10,8 @@ export const ratingProps = new Map([
|
|
10
10
|
['displayexpression', PROP_STRING],
|
11
11
|
['displayfield', PROP_STRING],
|
12
12
|
['iconcolor', PROP_STRING],
|
13
|
+
['activeiconclass', { value: 'wi wi-star', ...PROP_STRING }],
|
14
|
+
['inactiveiconclass', { value: 'wi wi-star-border', ...PROP_STRING }],
|
13
15
|
['iconsize', PROP_STRING],
|
14
16
|
['maxvalue', { value: 5, ...PROP_NUMBER }],
|
15
17
|
['name', PROP_STRING],
|
@@ -24,4 +26,4 @@ export const registerProps = () => {
|
|
24
26
|
register('wm-rating', ratingProps);
|
25
27
|
registerFormWidget(FormWidgetType.RATING, new Map(ratingProps));
|
26
28
|
};
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0aW5nLnByb3BzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY29tcG9uZW50cy93aWRnZXRzL2lucHV0L3JhdGluZy9zcmMvcmF0aW5nLnByb3BzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsWUFBWSxFQUFFLFdBQVcsRUFBRSxXQUFXLEVBQUUsUUFBUSxFQUFFLGtCQ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AgICAgICAgbmV3IE1hcChyYXRpbmdQcm9wcylcbiAgICApO1xufTtcbiJdfQ==
|
@@ -6,7 +6,7 @@ import * as i2 from '@angular/forms';
|
|
6
6
|
import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
|
7
7
|
import * as i3 from '@wm/components/base';
|
8
8
|
import { PROP_STRING, PROP_ANY, PROP_NUMBER, PROP_BOOLEAN, register, registerFormWidget, styler, getOrderedDataset, provideAs, provideAsWidgetRef, WmComponentsModule } from '@wm/components/base';
|
9
|
-
import { FormWidgetType, generateGUId,
|
9
|
+
import { FormWidgetType, generateGUId, noop } from '@wm/core';
|
10
10
|
import { DatasetAwareFormComponent } from '@wm/components/input';
|
11
11
|
import { slice, isEmpty, find, isUndefined, toString } from 'lodash-es';
|
12
12
|
|
@@ -20,6 +20,8 @@ const ratingProps = new Map([
|
|
20
20
|
['displayexpression', PROP_STRING],
|
21
21
|
['displayfield', PROP_STRING],
|
22
22
|
['iconcolor', PROP_STRING],
|
23
|
+
['activeiconclass', { value: 'wi wi-star', ...PROP_STRING }],
|
24
|
+
['inactiveiconclass', { value: 'wi wi-star-border', ...PROP_STRING }],
|
23
25
|
['iconsize', PROP_STRING],
|
24
26
|
['maxvalue', { value: 5, ...PROP_NUMBER }],
|
25
27
|
['name', PROP_STRING],
|
@@ -38,36 +40,28 @@ const registerProps = () => {
|
|
38
40
|
const _c0 = ["ratingInput"];
|
39
41
|
const _c1 = ["wmRating", ""];
|
40
42
|
const _c2 = () => ({ standalone: true });
|
41
|
-
const _c3 = a0 => ({
|
42
|
-
const _c4 = (a0, a1) => ({
|
43
|
-
|
44
|
-
const _c6 = (a0, a1) => ({ "font-size": a0, color: a1 });
|
45
|
-
function RatingComponent_div_1_label_1_Template(rf, ctx) { if (rf & 1) {
|
43
|
+
const _c3 = a0 => ({ active: a0 });
|
44
|
+
const _c4 = (a0, a1) => ({ "font-size": a0, color: a1 });
|
45
|
+
function RatingComponent_label_2_Template(rf, ctx) { if (rf & 1) {
|
46
46
|
const _r1 = i0.ɵɵgetCurrentView();
|
47
|
-
i0.ɵɵelementStart(0, "label",
|
48
|
-
i0.ɵɵlistener("touchstart", function
|
49
|
-
i0.ɵɵ
|
50
|
-
i0.ɵɵ
|
47
|
+
i0.ɵɵelementStart(0, "label", 5);
|
48
|
+
i0.ɵɵlistener("touchstart", function RatingComponent_label_2_Template_label_touchstart_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onTouchStart($event)); })("mouseleave", function RatingComponent_label_2_Template_label_mouseleave_0_listener($event) { const rate_r3 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onMouseleave($event, rate_r3)); })("mouseover", function RatingComponent_label_2_Template_label_mouseover_0_listener($event) { const rate_r3 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onMouseOver($event, rate_r3)); });
|
49
|
+
i0.ɵɵelement(1, "i", 6);
|
50
|
+
i0.ɵɵelementStart(2, "input", 7, 0);
|
51
|
+
i0.ɵɵlistener("click", function RatingComponent_label_2_Template_input_click_2_listener($event) { const rate_r3 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onRatingClick($event, rate_r3)); });
|
51
52
|
i0.ɵɵelementEnd()();
|
52
53
|
} if (rf & 2) {
|
53
54
|
const rate_r3 = ctx.$implicit;
|
54
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
55
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
55
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
56
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c3, rate_r3.index <= ctx_r1.selectedRatingValue))("ngStyle", i0.ɵɵpureFunction2(13, _c4, ctx_r1.iconsize, rate_r3.index <= ctx_r1.selectedRatingValue && ctx_r1.iconcolor))("title", rate_r3.label || rate_r3.index)("for", ctx_r1._id + "-" + rate_r3.index);
|
57
|
+
i0.ɵɵadvance();
|
58
|
+
i0.ɵɵclassMapInterpolate1("app-icon ", rate_r3.index <= ctx_r1.selectedRatingValue ? ctx_r1.activeiconclass : ctx_r1.inactiveiconclass, "");
|
56
59
|
i0.ɵɵadvance();
|
57
60
|
i0.ɵɵproperty("id", ctx_r1._id + "-" + rate_r3.index)("value", rate_r3.key || rate_r3.index);
|
58
61
|
i0.ɵɵattribute("aria-label", (rate_r3.label || rate_r3.index) + " out of " + ctx_r1.ratingItems.length + " ratings")("aria-checked", rate_r3.label === ctx_r1.datavalue ? "true" : "false");
|
59
62
|
} }
|
60
|
-
function
|
61
|
-
i0.ɵɵ
|
62
|
-
i0.ɵɵtemplate(1, RatingComponent_div_1_label_1_Template, 3, 13, "label", 7);
|
63
|
-
i0.ɵɵelementEnd();
|
64
|
-
} if (rf & 2) {
|
65
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
66
|
-
i0.ɵɵadvance();
|
67
|
-
i0.ɵɵproperty("ngForOf", ctx_r1.ratingItems);
|
68
|
-
} }
|
69
|
-
function RatingComponent_label_4_Template(rf, ctx) { if (rf & 1) {
|
70
|
-
i0.ɵɵelement(0, "label", 10);
|
63
|
+
function RatingComponent_label_3_Template(rf, ctx) { if (rf & 1) {
|
64
|
+
i0.ɵɵelement(0, "label", 8);
|
71
65
|
} if (rf & 2) {
|
72
66
|
const ctx_r1 = i0.ɵɵnextContext();
|
73
67
|
i0.ɵɵproperty("textContent", ctx_r1.caption);
|
@@ -87,6 +81,8 @@ class RatingComponent extends DatasetAwareFormComponent {
|
|
87
81
|
}
|
88
82
|
constructor(inj, explicitContext) {
|
89
83
|
super(inj, WIDGET_CONFIG, explicitContext);
|
84
|
+
this.activeiconclass = '';
|
85
|
+
this.inactiveiconclass = '';
|
90
86
|
this._id = generateGUId();
|
91
87
|
styler(this.nativeElement, this);
|
92
88
|
// prepare the rating options on dataset ready.
|
@@ -196,7 +192,6 @@ class RatingComponent extends DatasetAwareFormComponent {
|
|
196
192
|
}
|
197
193
|
calculateRatingsWidth(dataVal) {
|
198
194
|
const selectedRating = parseFloat(this.selectedRatingValue), starWidth = 0.925, maxValue = parseInt(this.maxvalue || this.datasetItems.length, 10) || DEFAULT_RATING;
|
199
|
-
setCSS(this.nativeElement.querySelector('.ratings-container'), 'width', (starWidth * maxValue) + 'em');
|
200
195
|
dataVal = dataVal || this.datavalue;
|
201
196
|
if (dataVal === undefined || dataVal === '' || dataVal === null) {
|
202
197
|
this.caption = '';
|
@@ -254,26 +249,22 @@ class RatingComponent extends DatasetAwareFormComponent {
|
|
254
249
|
} }, features: [i0.ɵɵProvidersFeature([
|
255
250
|
provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),
|
256
251
|
provideAsWidgetRef(RatingComponent)
|
257
|
-
]), i0.ɵɵInheritDefinitionFeature], attrs: _c1, decls:
|
252
|
+
]), i0.ɵɵInheritDefinitionFeature], attrs: _c1, decls: 4, vars: 7, consts: [["ratingInput", ""], ["aria-multiselectable", "true", "ngDefaultControl", "", 1, "ratings-wrapper", 3, "focus", "ngModelChange", "ngModel", "ngModelOptions"], [1, "rating-style"], [3, "ngClass", "ngStyle", "title", "for", "touchstart", "mouseleave", "mouseover", 4, "ngFor", "ngForOf"], ["class", "caption", 3, "textContent", 4, "ngIf"], [3, "touchstart", "mouseleave", "mouseover", "ngClass", "ngStyle", "title", "for"], ["aria-hidden", "true"], ["type", "radio", "role", "radio", "name", "ratings-id", 3, "click", "id", "value"], [1, "caption", 3, "textContent"]], template: function RatingComponent_Template(rf, ctx) { if (rf & 1) {
|
258
253
|
i0.ɵɵelementStart(0, "div", 1);
|
259
254
|
i0.ɵɵlistener("focus", function RatingComponent_Template_div_focus_0_listener($event) { return ctx.onFocus($event); });
|
260
255
|
i0.ɵɵtwoWayListener("ngModelChange", function RatingComponent_Template_div_ngModelChange_0_listener($event) { i0.ɵɵtwoWayBindingSet(ctx.modelByKey, $event) || (ctx.modelByKey = $event); return $event; });
|
261
|
-
i0.ɵɵ
|
262
|
-
i0.ɵɵ
|
263
|
-
i0.ɵɵelement(3, "div", 4);
|
256
|
+
i0.ɵɵelementStart(1, "div", 2);
|
257
|
+
i0.ɵɵtemplate(2, RatingComponent_label_2_Template, 4, 16, "label", 3);
|
264
258
|
i0.ɵɵelementEnd();
|
265
|
-
i0.ɵɵtemplate(
|
259
|
+
i0.ɵɵtemplate(3, RatingComponent_label_3_Template, 1, 1, "label", 4);
|
266
260
|
i0.ɵɵelementEnd();
|
267
261
|
} if (rf & 2) {
|
268
262
|
i0.ɵɵtwoWayProperty("ngModel", ctx.modelByKey);
|
269
|
-
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(
|
270
|
-
i0.ɵɵadvance();
|
271
|
-
i0.ɵɵproperty("ngIf", !ctx.readonly);
|
263
|
+
i0.ɵɵproperty("ngModelOptions", i0.ɵɵpureFunction0(6, _c2));
|
272
264
|
i0.ɵɵadvance();
|
273
|
-
i0.ɵɵclassProp("
|
274
|
-
i0.ɵɵproperty("ngStyle", i0.ɵɵpureFunction1(9, _c3, ctx.iconsize));
|
265
|
+
i0.ɵɵclassProp("disabled", ctx.readonly);
|
275
266
|
i0.ɵɵadvance();
|
276
|
-
i0.ɵɵproperty("
|
267
|
+
i0.ɵɵproperty("ngForOf", ctx.ratingItems);
|
277
268
|
i0.ɵɵadvance();
|
278
269
|
i0.ɵɵproperty("ngIf", ctx.showcaptions);
|
279
270
|
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i1.NgStyle, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgModel, i3.TextContentDirective], encapsulation: 2 }); }
|
@@ -283,7 +274,7 @@ class RatingComponent extends DatasetAwareFormComponent {
|
|
283
274
|
args: [{ selector: '[wmRating]', providers: [
|
284
275
|
provideAs(RatingComponent, NG_VALUE_ACCESSOR, true),
|
285
276
|
provideAsWidgetRef(RatingComponent)
|
286
|
-
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\" aria-multiselectable=\"true\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div
|
277
|
+
], template: "<div (focus)=\"onFocus($event)\" [(ngModel)]=\"modelByKey\" [ngModelOptions]=\"{standalone: true}\" aria-multiselectable=\"true\"\n class=\"ratings-wrapper\" ngDefaultControl>\n <div [class.disabled]=\"readonly\" class=\"rating-style\">\n <label *ngFor=\"let rate of ratingItems;\"\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 </div>\n <label *ngIf=\"showcaptions\" class=\"caption\" [textContent]=\"caption\"></label>\n</div>\n" }]
|
287
278
|
}], () => [{ type: i0.Injector }, { type: undefined, decorators: [{
|
288
279
|
type: Inject,
|
289
280
|
args: ['EXPLICIT_CONTEXT']
|