@wavemaker/angular-codegen 12.0.0-next.45062 → 12.0.0-next.45066

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,11 +34,11 @@
34
34
  "@awesome-cordova-plugins/vibration": "5.39.1",
35
35
  "@babel/runtime": "7.14.8",
36
36
  "@metrichor/jmespath": "0.3.1",
37
- "@wavemaker/custom-widgets-m3": "12.0.0-next.45062",
37
+ "@wavemaker/custom-widgets-m3": "12.0.0-next.45066",
38
38
  "@wavemaker/focus-trap": "1.0.1",
39
- "@wavemaker/foundation-css": "12.0.0-next.45062",
39
+ "@wavemaker/foundation-css": "12.0.0-next.45066",
40
40
  "@wavemaker/nvd3": "1.8.11",
41
- "@wavemaker/variables": "12.0.0-next.45062",
41
+ "@wavemaker/variables": "12.0.0-next.45066",
42
42
  "@ztree/ztree_v3": "3.5.48",
43
43
  "angular-imask": "^7.6.1",
44
44
  "angular2-websocket": "0.9.7",
@@ -6731,9 +6731,9 @@
6731
6731
  }
6732
6732
  },
6733
6733
  "node_modules/@wavemaker/custom-widgets-m3": {
6734
- "version": "12.0.0-next.45062",
6735
- "resolved": "https://registry.npmjs.org/@wavemaker/custom-widgets-m3/-/custom-widgets-m3-12.0.0-next.45062.tgz",
6736
- "integrity": "sha512-0DRcatveQJ1nzx5mwevNOFIOXd9g5BxeYqRvyY66Muxf5ldsZ6+/zygkJcsM0DnzskzEKcwyJWKVm8x01r5mAA=="
6734
+ "version": "12.0.0-next.45066",
6735
+ "resolved": "https://registry.npmjs.org/@wavemaker/custom-widgets-m3/-/custom-widgets-m3-12.0.0-next.45066.tgz",
6736
+ "integrity": "sha512-DgZ4AVIjENk8DGLGheBOVm1RWfGqERySHy8AqO7IUdseMr+s9VyZwhLWp9rMNm3PhsXOs82eUViYTrHekSwpzg=="
6737
6737
  },
6738
6738
  "node_modules/@wavemaker/focus-trap": {
6739
6739
  "version": "1.0.1",
@@ -6745,9 +6745,9 @@
6745
6745
  }
6746
6746
  },
6747
6747
  "node_modules/@wavemaker/foundation-css": {
6748
- "version": "12.0.0-next.45062",
6749
- "resolved": "https://registry.npmjs.org/@wavemaker/foundation-css/-/foundation-css-12.0.0-next.45062.tgz",
6750
- "integrity": "sha512-gGAPXoweRRAeM7fqWyCl/wMuvpyCib3Pj8FRFguDequuQtOxdk+Gfq1aY0kjo/HUze8qmilL86izAa5iDjbJGg=="
6748
+ "version": "12.0.0-next.45066",
6749
+ "resolved": "https://registry.npmjs.org/@wavemaker/foundation-css/-/foundation-css-12.0.0-next.45066.tgz",
6750
+ "integrity": "sha512-GAEseYYsDQz6Iy5HmrcTg8IGhiC2c+HcIWPbV+Jpd+trkLrhl3gAGfAc6bEGxOaNSTJcSVJDlwMxWNe2hTCn7Q=="
6751
6751
  },
6752
6752
  "node_modules/@wavemaker/nvd3": {
6753
6753
  "version": "1.8.11",
@@ -6758,9 +6758,9 @@
6758
6758
  }
6759
6759
  },
6760
6760
  "node_modules/@wavemaker/variables": {
6761
- "version": "12.0.0-next.45062",
6762
- "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.45062.tgz",
6763
- "integrity": "sha512-/0UtTPx3T3OHthAt0wG3H0Dsl6TXwSH06UMztV/ugC+bXXdQKYoZhLzmtR/T8akOyrUv9V0E+rn+y1R+xRp1cQ==",
6761
+ "version": "12.0.0-next.45066",
6762
+ "resolved": "https://registry.npmjs.org/@wavemaker/variables/-/variables-12.0.0-next.45066.tgz",
6763
+ "integrity": "sha512-1ooPlTxfwLzyEgiDFH61P2XbCleH9whkdRQSFk0mcf6+sFpiHgt5b3MxYgJF3VCkQJYtB2JNvcDKVB1q0gdEEw==",
6764
6764
  "dependencies": {
6765
6765
  "@metrichor/jmespath": "^0.3.1",
6766
6766
  "he": "^1.2.0",
@@ -45,9 +45,9 @@
45
45
  "@metrichor/jmespath": "0.3.1",
46
46
  "@wavemaker/focus-trap": "1.0.1",
47
47
  "@wavemaker/nvd3": "1.8.11",
48
- "@wavemaker/foundation-css": "12.0.0-next.45062",
49
- "@wavemaker/custom-widgets-m3": "12.0.0-next.45062",
50
- "@wavemaker/variables": "12.0.0-next.45062",
48
+ "@wavemaker/foundation-css": "12.0.0-next.45066",
49
+ "@wavemaker/custom-widgets-m3": "12.0.0-next.45066",
50
+ "@wavemaker/variables": "12.0.0-next.45066",
51
51
  "@ztree/ztree_v3": "3.5.48",
52
52
  "angular-imask": "^7.6.1",
53
53
  "angular2-websocket": "0.9.7",
@@ -72,7 +72,7 @@
72
72
  "tslib": "2.4.1",
73
73
  "x2js": "3.4.4",
74
74
  "zone.js": "0.14.7",
75
- "@wavemaker/app-ng-runtime": "12.0.0-next.45062"
75
+ "@wavemaker/app-ng-runtime": "12.0.0-next.45066"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@ampproject/rollup-plugin-closure-compiler": "^0.27.0",
@@ -1,10 +1,25 @@
1
- declare function handleValueChange(): void;
2
- declare function handleStepValueChange(): void;
3
- declare function handleRequiredChange(): void;
4
- declare function activeSliderElement(): void;
5
- declare function activeSliderElement(widgetMap: any): void;
6
- declare function configureDiscreteSlider(): void;
7
- declare function updateSteps(): void;
8
- declare function updateLabelVisibility(): void;
9
- declare function getSliderPercentage(value: any): number;
1
+ declare function initializeSlider(widgetMap: any, value: any, minValue: any, maxValue: any, stepValue: any, required: any): void;
2
+ declare function updateSlider(widgetMap: any, value: any, minValue: any, maxValue: any, stepValue: any): void;
3
+ declare function updateSliderStep(widgetMap: any, value: any, minValue: any, maxValue: any, stepValue: any): void;
4
+ declare function setRequired(widgetMap: any, required: any): void;
5
+ declare function appendSliderIndicator(slider: any): void;
6
+ declare function configureSliderAndSetStyles(widgetMap: any, value: any, minValue: any, maxValue: any, stepValue: any): void;
7
+ declare function updateSliderStyles(slider: any, value: any, minValue: any, maxValue: any): void;
8
+ declare function setupStepsAndLabels(widgetMap: any): void;
9
+ declare function createStepLabel(labelValue: any, minValue: any, maxValue: any): HTMLParagraphElement;
10
+ declare function updateLabelVisibility(widgetMap: any): void;
11
+ declare function getSliderPercentage(value: any, minValue: any, maxValue: any): number;
10
12
  declare function getSliderPercentage(value: any): number;
13
+ declare function clamp(value: any, minValue: any, maxValue: any): number;
14
+ declare function toggleLabelVisibilty(showLabelsBool: any, widgetMap: any): void;
15
+ declare function toggleLabelVisibilty(showLabelsBool: any, widgetMap: any): void;
16
+ declare function toggleIconsVisibility(showIconsBool: any, iconActionsBool: any, widgetMap: any): void;
17
+ declare function toggleIconsVisibility(showIconsBool: any, startIcon: any, endIcon: any, iconActionsBool: any, widgetMap: any): void;
18
+ declare function updateStartIconVisibility(iconActionsBool: any, widgetMap: any): void;
19
+ declare function updateStartIconVisibility(iconActionsBool: any, widgetMap: any): void;
20
+ declare function updateEndIconVisibility(iconActionsBool: any, widgetMap: any): void;
21
+ declare function updateEndIconVisibility(iconActionsBool: any, widgetMap: any): void;
22
+ declare function moveSlider(direction: any, widgetMap: any): void;
23
+ declare function moveSlider(direction: any, widgetMap: any): void;
24
+ declare function convertToBoolean(value: any): boolean;
25
+ declare function convertToBoolean(value: any): boolean;
@@ -1,171 +1,208 @@
1
- function handleValueChange() {
2
- var initialValue = Number(Widget.props.value); // Use props.value for initial value
3
- Widget.Widgets.slider1.$element[0].style.setProperty("--end", (100 - getSliderPercentage(initialValue)) + '%');
4
- updateSteps();
5
- configureDiscreteSlider();
6
- updateLabelVisibility();
7
- }
8
- function handleStepValueChange() {
9
- Widget.Widgets.slider1.step = Widget.props.step_value;
10
- updateSteps();
11
- configureDiscreteSlider();
12
- updateLabelVisibility();
13
- }
14
- function handleRequiredChange() {
15
- Widget.Widgets.composite.required = Widget.props.required;
16
- }
17
- Widget.onPropertyChange = function (propname, newvalue, oldvalue) {
18
- switch (propname) {
1
+ Widget.onPropertyChange = function (propName, newValue, oldValue) {
2
+ var _a = Widget.props, value = _a.value, step_value = _a.step_value, required = _a.required, min_value = _a.min_value, max_value = _a.max_value, show_labels = _a.show_labels, show_icons = _a.show_icons, icon_actions = _a.icon_actions, start_icon = _a.start_icon, end_icon = _a.end_icon;
3
+ var widgetMap = Widget.Widgets;
4
+ var showIconsBool = convertToBoolean(show_icons);
5
+ var showLabelsBool = convertToBoolean(show_labels);
6
+ var iconActionsBool = convertToBoolean(icon_actions);
7
+ switch (propName) {
19
8
  case 'prop-value':
20
9
  case 'prop-min_value':
21
10
  case 'prop-max_value':
22
- handleValueChange();
11
+ updateSlider(widgetMap, value, min_value, max_value, step_value);
23
12
  break;
24
13
  case 'prop-step_value':
25
- handleStepValueChange();
14
+ updateSliderStep(widgetMap, value, min_value, max_value, step_value);
26
15
  break;
27
16
  case 'prop-required':
28
- handleRequiredChange();
17
+ setRequired(widgetMap, required);
18
+ break;
19
+ case "prop-show_labels":
20
+ toggleLabelVisibilty(showLabelsBool, widgetMap);
21
+ break;
22
+ case "prop-show_icons":
23
+ toggleIconsVisibility(showIconsBool, iconActionsBool, widgetMap);
24
+ break;
25
+ case "prop-start_icon":
26
+ updateStartIconVisibility(iconActionsBool, widgetMap);
27
+ break;
28
+ case "prop-end_icon":
29
+ updateEndIconVisibility(iconActionsBool, widgetMap);
29
30
  break;
30
31
  }
31
32
  };
32
33
  Widget.onReady = function () {
33
- Widget.Widgets.container1.class += ' filled-slider discrete-slider';
34
- handleValueChange();
35
- handleRequiredChange();
36
- configureDiscreteSlider();
37
- handleStepValueChange();
38
- updateSteps();
39
- activeSliderElement();
40
- updateLabelVisibility(); // Update label visibility based on initial value
34
+ var _a = Widget.props, value = _a.value, step_value = _a.step_value, required = _a.required, min_value = _a.min_value, max_value = _a.max_value, show_labels = _a.show_labels, show_icons = _a.show_icons, icon_actions = _a.icon_actions, start_icon = _a.start_icon, end_icon = _a.end_icon;
35
+ var widgetMap = Widget.Widgets;
36
+ var showIconsBool = convertToBoolean(show_icons);
37
+ var showLabelsBool = convertToBoolean(show_labels);
38
+ var iconActionsBool = convertToBoolean(icon_actions);
39
+ widgetMap.sliderContainer.nativeElement.classList.add('filled-slider', 'discrete-slider');
40
+ initializeSlider(widgetMap, value, min_value, max_value, step_value, required);
41
+ toggleLabelVisibilty(showLabelsBool, widgetMap);
42
+ toggleIconsVisibility(showIconsBool, iconActionsBool, widgetMap);
41
43
  };
42
- function activeSliderElement() {
43
- var activeSlider = Widget.Widgets.slider1.$element[0]; // Get the slider element
44
- if (activeSlider) {
45
- // Create a new div element
46
- var newDiv = document.createElement('p');
47
- newDiv.className = 'active-slider'; // Set a class for styling
48
- // Append the new element to slider container
49
- activeSlider.appendChild(newDiv);
44
+ function initializeSlider(widgetMap, value, minValue, maxValue, stepValue, required) {
45
+ updateSlider(widgetMap, value, minValue, maxValue, stepValue);
46
+ setRequired(widgetMap, required);
47
+ appendSliderIndicator(widgetMap.slider);
48
+ }
49
+ function updateSlider(widgetMap, value, minValue, maxValue, stepValue) {
50
+ if (value !== undefined) {
51
+ widgetMap.slider.datavalue = Number(value);
50
52
  }
53
+ configureSliderAndSetStyles(widgetMap, value, minValue, maxValue, stepValue);
54
+ setupStepsAndLabels(widgetMap);
51
55
  }
52
- /*
53
- * Configure the slider for discrete steps.
54
- */
55
- function configureDiscreteSlider() {
56
- var slider = Widget.Widgets.slider1; // Slider widget
57
- var minValue = parseInt(Widget.props.min_value, 10);
58
- var maxValue = parseInt(Widget.props.max_value, 10);
59
- var stepValueParam = Widget.props.step_value;
60
- var initialValue = Number(Widget.props.value); // Use props.value for initial value
61
- var stepValue = parseInt(stepValueParam, 10);
56
+ function updateSliderStep(widgetMap, value, minValue, maxValue, stepValue) {
57
+ updateSlider(widgetMap, value, minValue, maxValue, stepValue);
58
+ }
59
+ function setRequired(widgetMap, required) {
60
+ widgetMap.composite.required = required;
61
+ }
62
+ function appendSliderIndicator(slider) {
63
+ var sliderElement = slider.nativeElement;
64
+ if (sliderElement) {
65
+ var indicator = document.createElement('p');
66
+ var labelContainer = document.createElement('div');
67
+ labelContainer.className = 'stop-indicator';
68
+ indicator.className = 'active-slider';
69
+ sliderElement.appendChild(indicator);
70
+ sliderElement.appendChild(labelContainer);
71
+ }
72
+ }
73
+ function configureSliderAndSetStyles(widgetMap, value, minValue, maxValue, stepValue) {
74
+ var slider = widgetMap.slider;
75
+ minValue = parseInt(minValue, 10);
76
+ maxValue = parseInt(maxValue, 10);
77
+ stepValue = parseInt(stepValue, 10);
62
78
  if (isNaN(minValue) || isNaN(maxValue) || isNaN(stepValue) || stepValue <= 0) {
63
79
  console.error("Invalid min, max, or step values");
64
80
  return;
65
81
  }
66
- // Set slider's min, max, and step attributes
67
82
  slider.min = minValue;
68
83
  slider.max = maxValue;
69
84
  slider.step = stepValue;
70
- // Ensure slider value is within the range
71
- if (isNaN(initialValue) || initialValue < minValue || initialValue > maxValue) {
72
- console.error("Slider value is out of range");
73
- slider.datavalue = minValue; // Default to minValue if the provided value is invalid
74
- }
75
- else {
76
- slider.datavalue = initialValue; // Set the slider to the provided value
77
- }
78
- // Set initial position
79
- Widget.Widgets.slider1.$element[0].style.setProperty("--end", (100 - getSliderPercentage(slider.datavalue)) + '%');
80
- }
81
- /*
82
- * Update the labels displayed on the slider.
83
- */
84
- function updateSteps() {
85
- var slider = Widget.Widgets.slider1;
86
- var labelContainer = Widget.Widgets.container2;
87
- if (slider && labelContainer) {
88
- var minValue = parseInt(slider.min, 10);
89
- var maxValue = parseInt(slider.max, 10);
90
- var stepValue = parseInt(slider.step, 10);
91
- // Calculate the number of steps
92
- var numSteps = Math.ceil((maxValue - minValue) / stepValue);
93
- // Clear existing labels
94
- labelContainer.$element[0].innerHTML = '';
95
- // Create and position labels for each step
96
- for (var i = 0; i <= numSteps; i++) {
97
- var stepLabel = document.createElement('p');
98
- stepLabel.className = 'step-label';
99
- var labelValue = minValue + (i * stepValue);
100
- // Ensure labelValue does not exceed maxValue
101
- if (labelValue > maxValue)
102
- break;
103
- stepLabel.textContent = labelValue;
104
- // Calculate and set label position
105
- var leftPosition = Math.round(((labelValue - minValue) / (maxValue - minValue)) * 100 * 100) / 100; // Rounded to two decimal places
106
- var adjustedPosition = leftPosition - 1;
107
- stepLabel.style.setProperty('--position', "".concat(adjustedPosition, "%"));
108
- stepLabel.setAttribute('data-position', adjustedPosition);
109
- // Append label to the container
110
- labelContainer.$element[0].appendChild(stepLabel);
111
- }
112
- // Set container positioning and add event listener for updating label visibility
113
- labelContainer.$element[0].style.position = 'relative';
114
- Widget.Widgets.slider1.$element[0].addEventListener('input', updateLabelVisibility);
115
- // Initial update of label visibility
116
- updateLabelVisibility();
85
+ slider.datavalue = clamp(slider.datavalue, minValue, maxValue);
86
+ updateSliderStyles(slider, slider.datavalue, minValue, maxValue);
87
+ }
88
+ function updateSliderStyles(slider, value, minValue, maxValue) {
89
+ var percentage = getSliderPercentage(value, minValue, maxValue);
90
+ slider.nativeElement.style.setProperty("--end", "".concat(100 - percentage, "%"));
91
+ }
92
+ function setupStepsAndLabels(widgetMap) {
93
+ var slider = widgetMap.slider;
94
+ var labelContainer = widgetMap.labelsContainer;
95
+ var minValue = parseInt(slider.min, 10);
96
+ var maxValue = parseInt(slider.max, 10);
97
+ var stepValue = parseInt(slider.step, 10);
98
+ if (!labelContainer)
99
+ return;
100
+ var numSteps = Math.ceil((maxValue - minValue) / stepValue);
101
+ labelContainer.$element[0].innerHTML = ''; // Clear existing labels
102
+ for (var i = 0; i <= numSteps; i++) {
103
+ var labelValue = minValue + i * stepValue;
104
+ if (labelValue > maxValue)
105
+ break;
106
+ var stepLabel = createStepLabel(labelValue, minValue, maxValue);
107
+ labelContainer.$element[0].appendChild(stepLabel);
117
108
  }
109
+ slider.$element[0].addEventListener('input', function () { return updateLabelVisibility(widgetMap); });
110
+ updateLabelVisibility(widgetMap);
111
+ }
112
+ function createStepLabel(labelValue, minValue, maxValue) {
113
+ var stepLabel = document.createElement('p');
114
+ stepLabel.className = 'step-label';
115
+ stepLabel.textContent = labelValue;
116
+ var position = ((labelValue - minValue) / (maxValue - minValue)) * 100;
117
+ stepLabel.style.setProperty('--position', "".concat(position - 1, "%"));
118
+ stepLabel.setAttribute('data-position', position);
119
+ return stepLabel;
118
120
  }
119
- function updateLabelVisibility() {
120
- var slider = Widget.Widgets.slider1;
121
- var labels = Widget.Widgets.container2.$element[0].getElementsByClassName('step-label');
122
- if (slider) {
123
- var sliderValue = Number(slider.datavalue); // Get the current slider value
124
- var minValue_1 = parseInt(slider.min, 10);
125
- var maxValue_1 = parseInt(slider.max, 10);
126
- var stepValue_1 = parseInt(slider.step, 10);
127
- // Calculate the number of steps
128
- var targets = Array.from({
129
- length: Math.ceil((maxValue_1 - minValue_1) / stepValue_1) + 1
130
- }, function (_, i) { return minValue_1 + i * stepValue_1; }).filter(function (value) { return value <= maxValue_1; });
131
- // Update label states based on slider value and targets
132
- for (var _i = 0, labels_1 = labels; _i < labels_1.length; _i++) {
133
- var label = labels_1[_i];
134
- var labelValue = parseInt(label.textContent, 10);
135
- // Remove existing classes
136
- label.classList.remove('hidden', 'inactive', 'active');
137
- // Determine the label's state based on the slider value
138
- if (targets.includes(labelValue)) {
139
- if (labelValue === sliderValue) {
140
- label.classList.add('hidden'); // Hide label if it matches the slider value
141
- }
142
- else if (labelValue < sliderValue) {
143
- label.classList.add('inactive'); // Label is inactive if it is less than the slider value
144
- }
145
- else {
146
- label.classList.add('active'); // Label is active if it is greater than the slider value
147
- }
121
+ function updateLabelVisibility(widgetMap) {
122
+ var slider = widgetMap.slider;
123
+ var labels = widgetMap.labelsContainer.nativeElement.getElementsByClassName('step-label');
124
+ var sliderValue = slider.datavalue;
125
+ var minValue = slider.min;
126
+ var maxValue = slider.max;
127
+ var stepValue = slider.step;
128
+ var validValues = Array.from({
129
+ length: Math.ceil((maxValue - minValue) / stepValue) + 1
130
+ }, function (_, i) { return minValue + i * stepValue; })
131
+ .filter(function (value) { return value <= maxValue; });
132
+ for (var _i = 0, labels_1 = labels; _i < labels_1.length; _i++) {
133
+ var label = labels_1[_i];
134
+ var labelValue = parseInt(label.textContent, 10);
135
+ label.classList.remove('hidden', 'inactive', 'active');
136
+ if (validValues.includes(labelValue)) {
137
+ if (labelValue === sliderValue) {
138
+ label.classList.add('hidden');
139
+ }
140
+ else if (labelValue < sliderValue) {
141
+ label.classList.add('inactive');
142
+ }
143
+ else {
144
+ label.classList.add('active');
148
145
  }
149
- // Ensure that labels are visible based on their state
150
- label.style.display = 'block';
151
146
  }
147
+ label.style.display = 'block';
152
148
  }
153
149
  }
154
- /*
155
- * Convert slider value to percentage based on min and max
156
- */
157
- function getSliderPercentage(value) {
158
- var slider = Widget.Widgets.slider1;
159
- var minValue = parseInt(slider.min, 10);
160
- var maxValue = parseInt(slider.max, 10);
150
+ function getSliderPercentage(value, minValue, maxValue) {
161
151
  return ((value - minValue) / (maxValue - minValue)) * 100;
162
152
  }
163
- /*
164
- * Handle slider value changes.
165
- */
166
- Widget.slider1Change = function ($event, widget, newVal, oldVal) {
167
- var sliderValue = newVal; // Use the new slider value
168
- widget.$element[0].style.setProperty("--end", (100 - getSliderPercentage(sliderValue)) + '%');
169
- // Update label visibility on slider change
170
- updateLabelVisibility();
153
+ function clamp(value, minValue, maxValue) {
154
+ return Math.min(Math.max(value, minValue), maxValue);
155
+ }
156
+ function toggleLabelVisibilty(showLabelsBool, widgetMap) {
157
+ if (showLabelsBool) {
158
+ widgetMap.slider.nativeElement.classList.remove("hide-labels");
159
+ }
160
+ else {
161
+ widgetMap.slider.nativeElement.classList.add("hide-labels");
162
+ }
163
+ }
164
+ function toggleIconsVisibility(showIconsBool, iconActionsBool, widgetMap) {
165
+ var decrementButton = widgetMap.decrementButton, incrementButton = widgetMap.incrementButton;
166
+ if (showIconsBool) {
167
+ updateStartIconVisibility(iconActionsBool, widgetMap);
168
+ updateEndIconVisibility(iconActionsBool, widgetMap);
169
+ }
170
+ else {
171
+ decrementButton.show = false;
172
+ incrementButton.show = false;
173
+ }
174
+ }
175
+ function updateStartIconVisibility(iconActionsBool, widgetMap) {
176
+ var decrementButton = widgetMap.decrementButton;
177
+ decrementButton.show = true;
178
+ decrementButton.nativeElement.style.pointerEvents = iconActionsBool ?
179
+ "auto" :
180
+ "none";
181
+ }
182
+ function updateEndIconVisibility(iconActionsBool, widgetMap) {
183
+ var incrementButton = widgetMap.incrementButton;
184
+ incrementButton.show = true;
185
+ incrementButton.nativeElement.style.pointerEvents = iconActionsBool ?
186
+ "auto" :
187
+ "none";
188
+ }
189
+ function moveSlider(direction, widgetMap) {
190
+ var slider = widgetMap.slider;
191
+ var newValue = Number(slider.datavalue) + (direction * slider.step);
192
+ newValue = Math.max(Math.min(newValue, slider.maxvalue), slider.minvalue);
193
+ slider.datavalue = newValue;
194
+ Widget.sliderChange(null, slider, newValue);
195
+ }
196
+ function convertToBoolean(value) {
197
+ return value === true || value === "true";
198
+ }
199
+ Widget.sliderChange = function ($event, widget, newVal) {
200
+ updateSliderStyles(widget, newVal, widget.min, widget.max);
201
+ updateLabelVisibility(Widget.Widgets);
202
+ };
203
+ Widget.decrementButtonClick = function ($event, widget) {
204
+ moveSlider(-1, Widget.Widgets);
205
+ };
206
+ Widget.incrementButtonClick = function ($event, widget) {
207
+ moveSlider(1, Widget.Widgets);
171
208
  };
@@ -1,7 +1,7 @@
1
1
  export var discrete_slider = {
2
- "markup": "%3Cwm-custom-widget-container%3E%0A++++%3Cwm-composite+name%3D%22composite%22+class%3D%22slider-composite%22%3E%0A++++++++%3Cwm-label+class%3D%22control-label%22+notag%3D%22true%22+name%3D%22label1%22+caption%3D%22bind%3Aprops.label_text%22%3E%3C%2Fwm-label%3E%0A++++++++%3Cwm-container+name%3D%22container1%22+class%3D%22filled-slider%22%3E%0A++++++++++++%3Cwm-slider+name%3D%22slider1%22+class%3D%22cst-slider%22+datavalue%3D%22bind%3Aprops.value%22+on-change%3D%22slider1Change%28%24event%2C+widget%2C+newVal%2C+oldVal%29%22+disabled%3D%22bind%3Aprops.state%3D%3D%26quot%3BDisabled%26quot%3B%22+minvalue%3D%22bind%3Aprops.min_value%22+maxvalue%3D%22bind%3Aprops.max_value%22%3E%3C%2Fwm-slider%3E%0A++++++++%3C%2Fwm-container%3E%0A++++++++%3Cwm-container+name%3D%22container2%22+class%3D%22stop-indicator%22%3E%3C%2Fwm-container%3E%0A++++%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E",
3
- "script": "function+handleValueChange%28%29+%7B%0A++++const+initialValue+%3D+Number%28Widget.props.value%29%3B+%2F%2F+Use+props.value+for+initial+value%0A++++Widget.Widgets.slider1.%24element%5B0%5D.style.setProperty%28%22--end%22%2C+%28100+-+getSliderPercentage%28initialValue%29%29+%2B+%27%25%27%29%3B%0A++++updateSteps%28%29%3B%0A++++configureDiscreteSlider%28%29%3B%0A++++updateLabelVisibility%28%29%3B%0A%7D%0A%0Afunction+handleStepValueChange%28%29+%7B%0A++++Widget.Widgets.slider1.step+%3D+Widget.props.step_value%3B%0A++++updateSteps%28%29%3B%0A++++configureDiscreteSlider%28%29%3B%0A++++updateLabelVisibility%28%29%3B%0A%7D%0A%0Afunction+handleRequiredChange%28%29+%7B%0A++++Widget.Widgets.composite.required+%3D+Widget.props.required%3B%0A%0A%7D%0A%0AWidget.onPropertyChange+%3D+function%28propname%2C+newvalue%2C+oldvalue%29+%7B%0A++++switch+%28propname%29+%7B%0A++++++++case+%27prop-value%27%3A%0A++++++++case+%27prop-min_value%27%3A%0A++++++++case+%27prop-max_value%27%3A%0A++++++++++++handleValueChange%28%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-step_value%27%3A%0A++++++++++++handleStepValueChange%28%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-required%27%3A%0A++++++++++++handleRequiredChange%28%29%3B%0A++++++++++++break%3B%0A++++%7D%0A%7D%0A%0A%0AWidget.onReady+%3D+function%28%29+%7B%0A++++Widget.Widgets.container1.class+%2B%3D+%27+filled-slider+discrete-slider%27%3B%0A++++handleValueChange%28%29%0A++++handleRequiredChange%28%29%0A++++configureDiscreteSlider%28%29%3B%0A++++handleStepValueChange%28%29%3B%0A++++updateSteps%28%29%3B%0A++++activeSliderElement%28%29%3B%0A++++updateLabelVisibility%28%29%3B+%2F%2F+Update+label+visibility+based+on+initial+value%0A%7D%3B%0A%0A%0A%0Afunction+activeSliderElement%28%29+%7B%0A++++const+activeSlider+%3D+Widget.Widgets.slider1.%24element%5B0%5D%3B+%2F%2F+Get+the+slider+element%0A%0A++++if+%28activeSlider%29+%7B%0A++++++++%2F%2F+Create+a+new+div+element%0A++++++++const+newDiv+%3D+document.createElement%28%27p%27%29%3B%0A++++++++newDiv.className+%3D+%27active-slider%27%3B+%2F%2F+Set+a+class+for+styling%0A++++++++%2F%2F+Append+the+new+element+to+slider+container%0A++++++++activeSlider.appendChild%28newDiv%29%3B%0A++++%7D%0A%7D%0A%0A%2F*+%0A+*+Configure+the+slider+for+discrete+steps.%0A+*%2F%0Afunction+configureDiscreteSlider%28%29+%7B%0A++++const+slider+%3D+Widget.Widgets.slider1%3B+%2F%2F+Slider+widget%0A++++const+minValue+%3D+parseInt%28Widget.props.min_value%2C+10%29%3B%0A++++const+maxValue+%3D+parseInt%28Widget.props.max_value%2C+10%29%3B%0A++++const+stepValueParam+%3D+Widget.props.step_value%3B%0A++++const+initialValue+%3D+Number%28Widget.props.value%29%3B+%2F%2F+Use+props.value+for+initial+value%0A%0A++++const+stepValue+%3D+parseInt%28stepValueParam%2C+10%29%3B%0A++++if+%28isNaN%28minValue%29+%7C%7C+isNaN%28maxValue%29+%7C%7C+isNaN%28stepValue%29+%7C%7C+stepValue+%3C%3D+0%29+%7B%0A++++++++console.error%28%22Invalid+min%2C+max%2C+or+step+values%22%29%3B%0A++++++++return%3B%0A++++%7D%0A%0A++++%2F%2F+Set+slider%27s+min%2C+max%2C+and+step+attributes%0A++++slider.min+%3D+minValue%3B%0A++++slider.max+%3D+maxValue%3B%0A++++slider.step+%3D+stepValue%3B%0A%0A++++%2F%2F+Ensure+slider+value+is+within+the+range%0A++++if+%28isNaN%28initialValue%29+%7C%7C+initialValue+%3C+minValue+%7C%7C+initialValue+%3E+maxValue%29+%7B%0A++++++++console.error%28%22Slider+value+is+out+of+range%22%29%3B%0A++++++++slider.datavalue+%3D+minValue%3B+%2F%2F+Default+to+minValue+if+the+provided+value+is+invalid%0A++++%7D+else+%7B%0A++++++++slider.datavalue+%3D+initialValue%3B+%2F%2F+Set+the+slider+to+the+provided+value%0A++++%7D%0A%0A++++%2F%2F+Set+initial+position%0A++++Widget.Widgets.slider1.%24element%5B0%5D.style.setProperty%28%22--end%22%2C+%28100+-+getSliderPercentage%28slider.datavalue%29%29+%2B+%27%25%27%29%3B%0A%7D%0A%0A%2F*%0A+*+Update+the+labels+displayed+on+the+slider.%0A+*%2F%0Afunction+updateSteps%28%29+%7B%0A++++const+slider+%3D+Widget.Widgets.slider1%3B%0A++++const+labelContainer+%3D+Widget.Widgets.container2%3B%0A%0A++++if+%28slider+%26%26+labelContainer%29+%7B%0A++++++++const+minValue+%3D+parseInt%28slider.min%2C+10%29%3B%0A++++++++const+maxValue+%3D+parseInt%28slider.max%2C+10%29%3B%0A++++++++const+stepValue+%3D+parseInt%28slider.step%2C+10%29%3B%0A%0A++++++++%2F%2F+Calculate+the+number+of+steps%0A++++++++const+numSteps+%3D+Math.ceil%28%28maxValue+-+minValue%29+%2F+stepValue%29%3B%0A%0A++++++++%2F%2F+Clear+existing+labels%0A++++++++labelContainer.%24element%5B0%5D.innerHTML+%3D+%27%27%3B%0A%0A++++++++%2F%2F+Create+and+position+labels+for+each+step%0A++++++++for+%28let+i+%3D+0%3B+i+%3C%3D+numSteps%3B+i%2B%2B%29+%7B%0A++++++++++++const+stepLabel+%3D+document.createElement%28%27p%27%29%3B%0A++++++++++++stepLabel.className+%3D+%27step-label%27%3B%0A++++++++++++const+labelValue+%3D+minValue+%2B+%28i+*+stepValue%29%3B%0A%0A++++++++++++%2F%2F+Ensure+labelValue+does+not+exceed+maxValue%0A++++++++++++if+%28labelValue+%3E+maxValue%29+break%3B%0A%0A++++++++++++stepLabel.textContent+%3D+labelValue%3B%0A%0A++++++++++++%2F%2F+Calculate+and+set+label+position%0A++++++++++++const+leftPosition+%3D+Math.round%28%28%28labelValue+-+minValue%29+%2F+%28maxValue+-+minValue%29%29+*+100+*+100%29+%2F+100%3B+%2F%2F+Rounded+to+two+decimal+places%0A++++++++++++const+adjustedPosition+%3D+leftPosition+-+1%3B%0A++++++++++++stepLabel.style.setProperty%28%27--position%27%2C+%60%24%7BadjustedPosition%7D%25%60%29%3B%0A%0A++++++++++++stepLabel.setAttribute%28%27data-position%27%2C+adjustedPosition%29%3B%0A%0A++++++++++++%2F%2F+Append+label+to+the+container%0A++++++++++++labelContainer.%24element%5B0%5D.appendChild%28stepLabel%29%3B%0A++++++++%7D%0A%0A++++++++%2F%2F+Set+container+positioning+and+add+event+listener+for+updating+label+visibility%0A++++++++labelContainer.%24element%5B0%5D.style.position+%3D+%27relative%27%3B%0A++++++++Widget.Widgets.slider1.%24element%5B0%5D.addEventListener%28%27input%27%2C+updateLabelVisibility%29%3B%0A%0A++++++++%2F%2F+Initial+update+of+label+visibility%0A++++++++updateLabelVisibility%28%29%3B%0A++++%7D%0A%7D%0A%0Afunction+updateLabelVisibility%28%29+%7B%0A++++const+slider+%3D+Widget.Widgets.slider1%3B%0A++++const+labels+%3D+Widget.Widgets.container2.%24element%5B0%5D.getElementsByClassName%28%27step-label%27%29%3B%0A%0A++++if+%28slider%29+%7B%0A++++++++const+sliderValue+%3D+Number%28slider.datavalue%29%3B+%2F%2F+Get+the+current+slider+value%0A++++++++const+minValue+%3D+parseInt%28slider.min%2C+10%29%3B%0A++++++++const+maxValue+%3D+parseInt%28slider.max%2C+10%29%3B%0A++++++++const+stepValue+%3D+parseInt%28slider.step%2C+10%29%3B%0A%0A++++++++%2F%2F+Calculate+the+number+of+steps%0A++++++++const+targets+%3D+Array.from%28%7B%0A++++++++++++length%3A+Math.ceil%28%28maxValue+-+minValue%29+%2F+stepValue%29+%2B+1%0A++++++++%7D%2C+%28_%2C+i%29+%3D%3E+minValue+%2B+i+*+stepValue%29.filter%28value+%3D%3E+value+%3C%3D+maxValue%29%3B%0A++++++++%2F%2F+Update+label+states+based+on+slider+value+and+targets%0A++++++++for+%28const+label+of+labels%29+%7B%0A++++++++++++const+labelValue+%3D+parseInt%28label.textContent%2C+10%29%3B%0A%0A++++++++++++%2F%2F+Remove+existing+classes%0A++++++++++++label.classList.remove%28%27hidden%27%2C+%27inactive%27%2C+%27active%27%29%3B%0A%0A++++++++++++%2F%2F+Determine+the+label%27s+state+based+on+the+slider+value%0A++++++++++++if+%28targets.includes%28labelValue%29%29+%7B%0A++++++++++++++++if+%28labelValue+%3D%3D%3D+sliderValue%29+%7B%0A++++++++++++++++++++label.classList.add%28%27hidden%27%29%3B+%2F%2F+Hide+label+if+it+matches+the+slider+value%0A++++++++++++++++%7D+else+if+%28labelValue+%3C+sliderValue%29+%7B%0A++++++++++++++++++++label.classList.add%28%27inactive%27%29%3B+%2F%2F+Label+is+inactive+if+it+is+less+than+the+slider+value%0A++++++++++++++++%7D+else+%7B%0A++++++++++++++++++++label.classList.add%28%27active%27%29%3B+%2F%2F+Label+is+active+if+it+is+greater+than+the+slider+value%0A++++++++++++++++%7D%0A++++++++++++%7D%0A%0A++++++++++++%2F%2F+Ensure+that+labels+are+visible+based+on+their+state%0A++++++++++++label.style.display+%3D+%27block%27%3B%0A++++++++%7D%0A++++%7D%0A%7D%0A%0A%2F*%0A+*+Convert+slider+value+to+percentage+based+on+min+and+max%0A+*%2F%0Afunction+getSliderPercentage%28value%29+%7B%0A++++const+slider+%3D+Widget.Widgets.slider1%3B%0A++++const+minValue+%3D+parseInt%28slider.min%2C+10%29%3B%0A++++const+maxValue+%3D+parseInt%28slider.max%2C+10%29%3B%0A++++return+%28%28value+-+minValue%29+%2F+%28maxValue+-+minValue%29%29+*+100%3B%0A%7D%0A%0A%2F*%0A+*+Handle+slider+value+changes.%0A+*%2F%0AWidget.slider1Change+%3D+function%28%24event%2C+widget%2C+newVal%2C+oldVal%29+%7B%0A++++const+sliderValue+%3D+newVal%3B+%2F%2F+Use+the+new+slider+value%0A++++widget.%24element%5B0%5D.style.setProperty%28%22--end%22%2C+%28100+-+getSliderPercentage%28sliderValue%29%29+%2B+%27%25%27%29%3B%0A%0A++++%2F%2F+Update+label+visibility+on+slider+change%0A++++updateLabelVisibility%28%29%3B%0A%7D%3B",
4
- "styles": ".app-composite-widget.form-group%3Ahas%28.filled-slider%29+%7B%0A++++flex-direction%3A+column%3B%0A++++align-items%3A+start%3B%0A%7D%0A%0A.app-container.filled-slider+%7B%0A++++display%3A+flex%3B%0A++++gap%3A+12px%3B%0A++++position%3A+relative%3B%0A++++width%3A+100%25%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider+%7B%0A++++--start%3A+0%25%3B%0A++++--end%3A+100%25%3B%0A++++display%3A+flex%3B%0A++++align-items%3A+center+%21important%3B%0A++++inline-size%3A+auto%3B%0A++++block-size%3A+1.25rem%3B%0A++++margin%3A+1.125rem+0%3B%0A++++flex%3A+none%3B%0A++++direction%3A+ltr%3B%0A++++flex-grow%3A+1%3B%0A++++width%3A+100%25%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider.vertical+%7B%0A++++flex-direction%3A+row+%21important%3B%0A++++margin%3A+.5rem+auto+%21important%3B%0A++++padding%3A+50%25+0%3B%0A++++transform%3A+rotate%28-90deg%29%3B%0A++++inline-size%3A+100%25%3B%0A%7D%0A%0A.app-container.filled-slider%3Ahas%28.app-slider.slider.cst-slider.vertical%29+%7B%0A++++flex-direction%3A+column%3B%0A%7D%0A%0A.app-container.filled-slider.discrete-slider+%7B%0A++++display%3A+flex%3B%0A++++flex-direction%3A+column%3B%0A%7D%0A%0A%5Bdir%3Drtl%5D+.app-container.filled-slider+.app-slider.slider.cst-slider+%7B%0A++++transform%3A+scaleX%28-1%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput+%7B%0A++++appearance%3A+none%3B%0A++++box-shadow%3A+none%3B%0A++++border%3A+none%3B%0A++++outline%3A+none%3B%0A++++pointer-events%3A+none%3B%0A++++inline-size%3A+100%25%3B%0A++++block-size%3A+1rem%3B%0A++++background%3A+none%3B%0A++++z-index%3A+1%3B%0A++++padding%3A+0%3B%0A++++margin%3A+0%3B%0A++++opacity%3A+unset%3B%0A++++color%3A+unset%3B%0A++++height%3A+unset%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Aonly-of-type+%7B%0A++++pointer-events%3A+all%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%2Binput+%7B%0A++++position%3A+absolute%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-webkit-slider-thumb+%7B%0A++++appearance%3A+none%3B%0A++++box-shadow%3A+none%3B%0A++++border%3A+none%3B%0A++++outline%3A+none%3B%0A++++pointer-events%3A+all%3B%0A++++block-size%3A+2.75rem%3B%0A++++inline-size%3A+0.25rem%3B%0A++++border-radius%3A+0.25rem%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++cursor%3A+grab%3B%0A++++margin%3A+0%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-moz-range-thumb+%7B%0A++++appearance%3A+none%3B%0A++++box-shadow%3A+none%3B%0A++++border%3A+none%3B%0A++++outline%3A+none%3B%0A++++pointer-events%3A+all%3B%0A++++block-size%3A+2.75rem%3B%0A++++inline-size%3A+0.25rem%3B%0A++++border-radius%3A+0.25rem%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++cursor%3A+grab%3B%0A++++margin%3A+0%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-webkit-slider-thumb%3Aactive+%7B%0A++++cursor%3A+grabbing%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-moz-range-thumb%3Aactive+%7B%0A++++cursor%3A+grabbing%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Anot%28%3Adisabled%29%3Ais%28%3Afocus%29%3A%3A-webkit-slider-thumb+%7B%0A++++transform%3A+scaleX%280.6%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Anot%28%3Adisabled%29%3Ais%28%3Afocus%29%3A%3A-moz-range-thumb+%7B%0A++++transform%3A+scaleX%280.6%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Adisabled+%7B%0A++++cursor%3A+not-allowed%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Adisabled%3A%3A-moz-range-thumb+%7B%0A++++cursor%3A+not-allowed%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Einput%3Adisabled%3A%3A-webkit-slider-thumb+%7B%0A++++background%3A+var%28--wm-color-on-surface%29%3B%0A++++cursor%3A+not-allowed%3B%0A++++opacity%3A+0.38%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A++++position%3A+absolute%3B%0A++++inline-size%3A+100%25%3B%0A++++block-size%3A+1rem%3B%0A++++border-radius%3A+1rem%3B%0A++++background%3A+var%28--wm-color-primary-container%29%3B%0A++++clip-path%3A+polygon%28calc%28var%28--start%29+-+0.5rem%29+0%2C+0+0%2C+0+100%25%2C+calc%28var%28--start%29+-+0.5rem%29+100%25%2C+calc%28var%28--start%29+-+0.5rem%29+0%2C+calc%28100%25+-+var%28--end%29+%2B+0.5rem%29+0%2C+100%25+0%2C+100%25+100%25%2C+calc%28100%25+-+var%28--end%29+%2B+0.5rem%29+100%25%2C+calc%28100%25+-+var%28--end%29+%2B+0.5rem%29+0%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3E.active-slider+%7B%0A++++position%3A+absolute%3B%0A++++block-size%3A+1rem%3B%0A++++border-radius%3A+1rem+0+0+1rem%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++z-index%3A+0%3B%0A++++float%3A+unset%3B%0A++++vertical-align%3A+baseline%3B%0A++++inset%3A+calc%2850%25+-+0.5rem%29+var%28--end%29+auto+var%28--start%29%3B%0A++++clip-path%3A+polygon%280+0%2C+calc%28100%25+-+0.5rem%29+0%2C+calc%28100%25+-+0.5rem%29+100%25%2C+0+100%25%29%3B%0A++++display%3A+block%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3E.app-slider-value+%7B%0A++++position%3A+absolute%3B%0A++++top%3A+36px%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3E.app-slider-value.pull-left+%7B%0A++++left%3A+0%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3E.app-slider-value.pull-right+%7B%0A++++right%3A+0%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Ahas%28input%3Adisabled%29%3A%3Abefore+%7B%0A++++background%3A+var%28+--wm-color-on-surface-focus%29%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider%3Ahas%28input%3Adisabled%29%3Ep.active-slider+%7B%0A++++background%3A+var%28--wm-color-on-surface%29%3B%0A++++opacity%3A+0.38%3B%0A%7D%0A%0A.app-container.filled-slider+.app-slider.slider.cst-slider+input%5Btype%3Drange%5D%3A%3A-webkit-slider-runnable-track+%7B%0A++++background%3A+unset%3B%0A++++height%3A+unset%3B%0A++++position%3A+relative%3B%0A%7D%0A%0A%0A%2F*+Ensure+the+container+is+positioned+relatively+to+contain+absolutely+positioned+children+*%2F%0A%0A.app-container.stop-indicator+%7B%0A++++position%3A+relative%3B%0A++++box-sizing%3A+border-box%3B%0A++++width%3A+calc%28100%25+-+48px%29%3B%0A++++margin-inline%3A+auto%3B%0A%7D%0A%0A%0A%2F*+Style+for+individual+step+labels+*%2F%0A%0A.app-container.stop-indicator+.step-label+%7B%0A++++position%3A+absolute%3B%0A++++text-align%3A+center%3B%0A++++white-space%3A+nowrap%3B%0A++++left%3A+var%28--position%2C+0%25%29%3B%0A++++visibility%3A+hidden%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label.hidden+%7B%0A++++display%3A+none+%21important%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label.inactive%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-color-primary-container%29%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label.active%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label%5Bdata-position%3D%2299%22%5D+%7B%0A++++--position%3A+98.5%25+%21important%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label%3A%3Abefore+%7B%0A++++position%3A+absolute%3B%0A++++height%3A+4px%3B%0A++++width%3A+4px%3B%0A++++left%3A+var%28--position%2C+0%25%29%3B%0A++++content%3A+%27%27%3B%0A++++top%3A+-30px%3B%0A++++visibility%3A+visible%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++border-radius%3A+50%25%3B%0A++++display%3A+block%3B%0A%7D",
2
+ "markup": "%3Cwm-custom-widget-container%3E%0A++++%3Cwm-composite+name%3D%22composite%22+class%3D%22slider-composite%22%3E%0A++++++++%3Cwm-label+class%3D%22control-label%22+notag%3D%22true%22+name%3D%22label1%22+caption%3D%22bind%3Aprops.label_text%22%3E%3C%2Fwm-label%3E%0A++++++++%3Cwm-container+name%3D%22sliderContainer%22+class%3D%22filled-slider+discrete-slider%22%3E%0A++++++++++++%3Cwm-button+class%3D%22btn-icon%22+caption%3D%22%22+type%3D%22button%22+margin%3D%22unset%22+name%3D%22decrementButton%22+iconclass%3D%22bind%3Aprops.start_icon%22+on-click%3D%22decrementButtonClick%28%24event%2C+widget%29%22+show%3D%22false%22%3E%3C%2Fwm-button%3E%0A++++++++++++%3Cwm-slider+name%3D%22slider%22+class%3D%22cst-slider%22+datavalue%3D%22bind%3Aprops.value%22+on-change%3D%22sliderChange%28%24event%2C+widget%2C+newVal%2C+oldVal%29%22+disabled%3D%22bind%3Aprops.state%3D%3D%26quot%3BDisabled%26quot%3B%22+minvalue%3D%22bind%3Aprops.min_value%22+maxvalue%3D%22bind%3Aprops.max_value%22%3E%3C%2Fwm-slider%3E%0A++++++++++++%3Cwm-button+class%3D%22btn-icon%22+caption%3D%22%22+type%3D%22button%22+margin%3D%22unset%22+name%3D%22incrementButton%22+iconclass%3D%22bind%3Aprops.end_icon%22+on-click%3D%22incrementButtonClick%28%24event%2C+widget%29%22%3E%3C%2Fwm-button%3E%0A++++++++%3C%2Fwm-container%3E%0A++++++++%3Cwm-container+name%3D%22labelsContainer%22+class%3D%22stop-indicator%22%3E%3C%2Fwm-container%3E%0A++++%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E",
3
+ "script": "Widget.onPropertyChange+%3D+function%28propName%2C+newValue%2C+oldValue%29+%7B%0A++++const+%7B%0A++++++++value%2C%0A++++++++step_value%2C%0A++++++++required%2C%0A++++++++min_value%2C%0A++++++++max_value%2C%0A++++++++show_labels%2C%0A++++++++show_icons%2C%0A++++++++icon_actions%2C%0A++++++++start_icon%2C%0A++++++++end_icon%0A++++%7D+%3D+Widget.props%3B%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A++++const+showIconsBool+%3D+convertToBoolean%28show_icons%29%3B%0A++++const+showLabelsBool+%3D+convertToBoolean%28show_labels%29%3B%0A++++const+iconActionsBool+%3D+convertToBoolean%28icon_actions%29%3B%0A%0A%0A++++switch+%28propName%29+%7B%0A++++++++case+%27prop-value%27%3A%0A++++++++case+%27prop-min_value%27%3A%0A++++++++case+%27prop-max_value%27%3A%0A++++++++++++updateSlider%28widgetMap%2C+value%2C+min_value%2C+max_value%2C+step_value%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-step_value%27%3A%0A++++++++++++updateSliderStep%28widgetMap%2C+value%2C+min_value%2C+max_value%2C+step_value%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-required%27%3A%0A++++++++++++setRequired%28widgetMap%2C+required%29%3B%0A++++++++++++break%3B%0A++++++++case+%22prop-show_labels%22%3A%0A++++++++++++toggleLabelVisibilty%28showLabelsBool%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%22prop-show_icons%22%3A%0A++++++++++++toggleIconsVisibility%28%0A++++++++++++++++showIconsBool%2C%0A++++++++++++++++iconActionsBool%2C%0A++++++++++++++++widgetMap%0A++++++++++++%29%3B%0A++++++++++++break%3B%0A++++++++case+%22prop-start_icon%22%3A%0A++++++++++++updateStartIconVisibility%28iconActionsBool%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%22prop-end_icon%22%3A%0A++++++++++++updateEndIconVisibility%28iconActionsBool%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++%7D%0A%7D%3B%0A%0AWidget.onReady+%3D+function%28%29+%7B%0A++++const+%7B%0A++++++++value%2C%0A++++++++step_value%2C%0A++++++++required%2C%0A++++++++min_value%2C%0A++++++++max_value%2C%0A++++++++show_labels%2C%0A++++++++show_icons%2C%0A++++++++icon_actions%2C%0A++++++++start_icon%2C%0A++++++++end_icon%0A++++%7D+%3D+Widget.props%3B%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A++++const+showIconsBool+%3D+convertToBoolean%28show_icons%29%3B%0A++++const+showLabelsBool+%3D+convertToBoolean%28show_labels%29%3B%0A++++const+iconActionsBool+%3D+convertToBoolean%28icon_actions%29%3B%0A++++widgetMap.sliderContainer.nativeElement.classList.add%28%27filled-slider%27%2C+%27discrete-slider%27%29%3B%0A++++initializeSlider%28widgetMap%2C+value%2C+min_value%2C+max_value%2C+step_value%2C+required%29%3B%0A++++toggleLabelVisibilty%28showLabelsBool%2C+widgetMap%29%3B%0A++++toggleIconsVisibility%28%0A++++++++showIconsBool%2C%0A++++++++iconActionsBool%2C%0A++++++++widgetMap%0A++++%29%3B%0A%0A%7D%3B%0A%0Afunction+initializeSlider%28widgetMap%2C+value%2C+minValue%2C+maxValue%2C+stepValue%2C+required%29+%7B%0A++++updateSlider%28widgetMap%2C+value%2C+minValue%2C+maxValue%2C+stepValue%29%3B%0A++++setRequired%28widgetMap%2C+required%29%3B%0A++++appendSliderIndicator%28widgetMap.slider%29%3B%0A%7D%0A%0Afunction+updateSlider%28widgetMap%2C+value%2C+minValue%2C+maxValue%2C+stepValue%29+%7B%0A++++if+%28value+%21%3D%3D+undefined%29+%7B%0A++++++++widgetMap.slider.datavalue+%3D+Number%28value%29%3B%0A++++%7D%0A++++configureSliderAndSetStyles%28widgetMap%2C+value%2C+minValue%2C+maxValue%2C+stepValue%29%3B%0A++++setupStepsAndLabels%28widgetMap%29%3B%0A%7D%0A%0Afunction+updateSliderStep%28widgetMap%2C+value%2C+minValue%2C+maxValue%2C+stepValue%29+%7B%0A++++updateSlider%28widgetMap%2C+value%2C+minValue%2C+maxValue%2C+stepValue%29%3B%0A%7D%0A%0Afunction+setRequired%28widgetMap%2C+required%29+%7B%0A++++widgetMap.composite.required+%3D+required%3B%0A%7D%0A%0Afunction+appendSliderIndicator%28slider%29+%7B%0A++++const+sliderElement+%3D+slider.nativeElement%3B%0A++++if+%28sliderElement%29+%7B%0A++++++++const+indicator+%3D+document.createElement%28%27p%27%29%3B%0A++++++++const+labelContainer+%3D+document.createElement%28%27div%27%29%3B%0A++++++++labelContainer.className+%3D+%27stop-indicator%27%3B%0A++++++++indicator.className+%3D+%27active-slider%27%3B%0A++++++++sliderElement.appendChild%28indicator%29%3B%0A++++++++sliderElement.appendChild%28labelContainer%29%3B%0A%0A++++%7D%0A%7D%0A%0Afunction+configureSliderAndSetStyles%28widgetMap%2C+value%2C+minValue%2C+maxValue%2C+stepValue%29+%7B%0A++++const+slider+%3D+widgetMap.slider%3B%0A++++minValue+%3D+parseInt%28minValue%2C+10%29%3B%0A++++maxValue+%3D+parseInt%28maxValue%2C+10%29%3B%0A++++stepValue+%3D+parseInt%28stepValue%2C+10%29%3B%0A%0A++++if+%28isNaN%28minValue%29+%7C%7C+isNaN%28maxValue%29+%7C%7C+isNaN%28stepValue%29+%7C%7C+stepValue+%3C%3D+0%29+%7B%0A++++++++console.error%28%22Invalid+min%2C+max%2C+or+step+values%22%29%3B%0A++++++++return%3B%0A++++%7D%0A%0A++++slider.min+%3D+minValue%3B%0A++++slider.max+%3D+maxValue%3B%0A++++slider.step+%3D+stepValue%3B%0A++++slider.datavalue+%3D+clamp%28slider.datavalue%2C+minValue%2C+maxValue%29%3B%0A++++updateSliderStyles%28slider%2C+slider.datavalue%2C+minValue%2C+maxValue%29%3B%0A%7D%0A%0Afunction+updateSliderStyles%28slider%2C+value%2C+minValue%2C+maxValue%29+%7B%0A++++const+percentage+%3D+getSliderPercentage%28value%2C+minValue%2C+maxValue%29%3B%0A++++slider.nativeElement.style.setProperty%28%22--end%22%2C+%60%24%7B100+-+percentage%7D%25%60%29%0A%7D%0A%0Afunction+setupStepsAndLabels%28widgetMap%29+%7B%0A++++const+slider+%3D+widgetMap.slider%3B%0A++++const+labelContainer+%3D+widgetMap.labelsContainer%3B%0A++++const+minValue+%3D+parseInt%28slider.min%2C+10%29%3B%0A++++const+maxValue+%3D+parseInt%28slider.max%2C+10%29%3B%0A++++const+stepValue+%3D+parseInt%28slider.step%2C+10%29%3B%0A%0A++++if+%28%21labelContainer%29+return%3B%0A%0A++++const+numSteps+%3D+Math.ceil%28%28maxValue+-+minValue%29+%2F+stepValue%29%3B%0A++++labelContainer.%24element%5B0%5D.innerHTML+%3D+%27%27%3B+%2F%2F+Clear+existing+labels%0A%0A++++for+%28let+i+%3D+0%3B+i+%3C%3D+numSteps%3B+i%2B%2B%29+%7B%0A++++++++const+labelValue+%3D+minValue+%2B+i+*+stepValue%3B%0A++++++++if+%28labelValue+%3E+maxValue%29+break%3B%0A%0A++++++++const+stepLabel+%3D+createStepLabel%28labelValue%2C+minValue%2C+maxValue%29%3B%0A++++++++labelContainer.%24element%5B0%5D.appendChild%28stepLabel%29%3B%0A++++%7D%0A%0A++++slider.%24element%5B0%5D.addEventListener%28%27input%27%2C+%28%29+%3D%3E+updateLabelVisibility%28widgetMap%29%29%3B%0A++++updateLabelVisibility%28widgetMap%29%3B%0A%7D%0A%0Afunction+createStepLabel%28labelValue%2C+minValue%2C+maxValue%29+%7B%0A++++const+stepLabel+%3D+document.createElement%28%27p%27%29%3B%0A++++stepLabel.className+%3D+%27step-label%27%3B%0A++++stepLabel.textContent+%3D+labelValue%3B%0A%0A++++const+position+%3D+%28%28labelValue+-+minValue%29+%2F+%28maxValue+-+minValue%29%29+*+100%3B%0A++++stepLabel.style.setProperty%28%27--position%27%2C+%60%24%7Bposition+-+1%7D%25%60%29%3B%0A++++stepLabel.setAttribute%28%27data-position%27%2C+position%29%3B%0A%0A++++return+stepLabel%3B%0A%7D%0A%0Afunction+updateLabelVisibility%28widgetMap%29+%7B%0A++++const+slider+%3D+widgetMap.slider%3B%0A++++const+labels+%3D+widgetMap.labelsContainer.nativeElement.getElementsByClassName%28%27step-label%27%29%3B%0A++++const+sliderValue+%3D+slider.datavalue%3B%0A++++const+minValue+%3D+slider.min%3B%0A++++const+maxValue+%3D+slider.max%3B%0A++++const+stepValue+%3D+slider.step%3B%0A%0A++++const+validValues+%3D+Array.from%28%7B%0A++++++++++++length%3A+Math.ceil%28%28maxValue+-+minValue%29+%2F+stepValue%29+%2B+1%0A++++++++%7D%2C+%28_%2C+i%29+%3D%3E+minValue+%2B+i+*+stepValue%29%0A++++++++.filter%28value+%3D%3E+value+%3C%3D+maxValue%29%3B%0A%0A++++for+%28const+label+of+labels%29+%7B%0A++++++++const+labelValue+%3D+parseInt%28label.textContent%2C+10%29%3B%0A++++++++label.classList.remove%28%27hidden%27%2C+%27inactive%27%2C+%27active%27%29%3B%0A%0A++++++++if+%28validValues.includes%28labelValue%29%29+%7B%0A++++++++++++if+%28labelValue+%3D%3D%3D+sliderValue%29+%7B%0A++++++++++++++++label.classList.add%28%27hidden%27%29%3B%0A++++++++++++%7D+else+if+%28labelValue+%3C+sliderValue%29+%7B%0A++++++++++++++++label.classList.add%28%27inactive%27%29%3B%0A++++++++++++%7D+else+%7B%0A++++++++++++++++label.classList.add%28%27active%27%29%3B%0A++++++++++++%7D%0A++++++++%7D%0A%0A++++++++label.style.display+%3D+%27block%27%3B%0A++++%7D%0A%7D%0A%0Afunction+getSliderPercentage%28value%2C+minValue%2C+maxValue%29+%7B%0A++++return+%28%28value+-+minValue%29+%2F+%28maxValue+-+minValue%29%29+*+100%3B%0A%7D%0A%0Afunction+clamp%28value%2C+minValue%2C+maxValue%29+%7B%0A++++return+Math.min%28Math.max%28value%2C+minValue%29%2C+maxValue%29%3B%0A%7D%0A%0Afunction+toggleLabelVisibilty%28showLabelsBool%2C+widgetMap%29+%7B%0A++++if+%28showLabelsBool%29+%7B%0A++++++++widgetMap.slider.nativeElement.classList.remove%28%22hide-labels%22%29%3B%0A++++%7D+else+%7B%0A++++++++widgetMap.slider.nativeElement.classList.add%28%22hide-labels%22%29%3B%0A++++%7D%0A%7D%0A%0Afunction+toggleIconsVisibility%28%0A++++showIconsBool%2C%0A++++iconActionsBool%2C%0A++++widgetMap%0A%29+%7B%0A++++const+%7B%0A++++++++decrementButton%2C%0A++++++++incrementButton%0A++++%7D+%3D+widgetMap%3B%0A%0A++++if+%28showIconsBool%29+%7B%0A++++++++updateStartIconVisibility%28iconActionsBool%2C+widgetMap%29%3B%0A++++++++updateEndIconVisibility%28iconActionsBool%2C+widgetMap%29%3B%0A++++%7D+else+%7B%0A++++++++decrementButton.show+%3D+false%3B%0A++++++++incrementButton.show+%3D+false%3B%0A++++%7D%0A%7D%0A%0Afunction+updateStartIconVisibility%28iconActionsBool%2C+widgetMap%29+%7B%0A++++const+%7B%0A++++++++decrementButton%0A++++%7D+%3D+widgetMap%3B%0A++++decrementButton.show+%3D+true%3B%0A++++decrementButton.nativeElement.style.pointerEvents+%3D+iconActionsBool+%3F%0A++++++++%22auto%22+%3A%0A++++++++%22none%22%3B%0A%7D%0A%0Afunction+updateEndIconVisibility%28iconActionsBool%2C+widgetMap%29+%7B%0A++++const+%7B%0A++++++++incrementButton%0A++++%7D+%3D+widgetMap%3B%0A++++incrementButton.show+%3D+true%3B%0A++++incrementButton.nativeElement.style.pointerEvents+%3D+iconActionsBool+%3F%0A++++++++%22auto%22+%3A%0A++++++++%22none%22%3B%0A%7D%0A%0Afunction+moveSlider%28direction%2C+widgetMap%29+%7B%0A++++const+%7B%0A++++++++slider%0A++++%7D+%3D+widgetMap%3B%0A++++let+newValue+%3D+Number%28slider.datavalue%29+%2B+%28direction+*+slider.step%29%3B%0A++++newValue+%3D+Math.max%28Math.min%28newValue%2C+slider.maxvalue%29%2C+slider.minvalue%29%3B%0A++++slider.datavalue+%3D+newValue%3B%0A++++Widget.sliderChange%28null%2C+slider%2C+newValue%29%3B%0A%7D%0A%0Afunction+convertToBoolean%28value%29+%7B%0A++++return+value+%3D%3D%3D+true+%7C%7C+value+%3D%3D%3D+%22true%22%3B%0A%7D%0A%0A%0AWidget.sliderChange+%3D+function%28%24event%2C+widget%2C+newVal%29+%7B%0A++++updateSliderStyles%28widget%2C+newVal%2C+widget.min%2C+widget.max%29%3B%0A++++updateLabelVisibility%28Widget.Widgets%29%3B%0A%7D%3B%0A%0AWidget.decrementButtonClick+%3D+function%28%24event%2C+widget%29+%7B%0A++++moveSlider%28-1%2C+Widget.Widgets%29%3B%0A%7D%3B%0A%0AWidget.incrementButtonClick+%3D+function%28%24event%2C+widget%29+%7B%0A++++moveSlider%281%2C+Widget.Widgets%29%3B%0A%7D%3B",
4
+ "styles": ".app-composite-widget.form-group%3Ahas%28.filled-slider%29+%7B%0A++++flex-direction%3A+column%3B%0A++++align-items%3A+start%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+%7B%0A++++display%3A+flex%3B%0A++++gap%3A+12px%3B%0A++++position%3A+relative%3B%0A++++width%3A+100%25%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider+%7B%0A++++--start%3A+0%25%3B%0A++++--end%3A+100%25%3B%0A++++display%3A+flex%3B%0A++++align-items%3A+center+%21important%3B%0A++++inline-size%3A+auto%3B%0A++++block-size%3A+1.25rem%3B%0A++++margin%3A+1.125rem+0%3B%0A++++flex%3A+none%3B%0A++++direction%3A+ltr%3B%0A++++flex-grow%3A+1%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider.vertical+%7B%0A++++flex-direction%3A+row+%21important%3B%0A++++margin%3A+.5rem+auto+%21important%3B%0A++++padding%3A+50%25+0%3B%0A++++transform%3A+rotate%28-90deg%29%3B%0A++++inline-size%3A+100%25%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider%3Ahas%28.app-slider.slider.cst-slider.vertical%29+%7B%0A++++flex-direction%3A+column%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider.discrete-slider+%7B%0A++++display%3A+flex%3B%0A++++align-items%3A+center%3B%0A%7D%0A%0A%5Bdir%3Drtl%5D+.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider+%7B%0A++++transform%3A+scaleX%28-1%29%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput+%7B%0A++++appearance%3A+none%3B%0A++++box-shadow%3A+none%3B%0A++++border%3A+none%3B%0A++++outline%3A+none%3B%0A++++pointer-events%3A+none%3B%0A++++inline-size%3A+100%25%3B%0A++++block-size%3A+1rem%3B%0A++++background%3A+none%3B%0A++++z-index%3A+1%3B%0A++++padding%3A+0%3B%0A++++margin%3A+0%3B%0A++++opacity%3A+unset%3B%0A++++color%3A+unset%3B%0A++++height%3A+unset%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3Aonly-of-type+%7B%0A++++pointer-events%3A+all%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%2Binput+%7B%0A++++position%3A+absolute%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-webkit-slider-thumb+%7B%0A++++appearance%3A+none%3B%0A++++box-shadow%3A+none%3B%0A++++border%3A+none%3B%0A++++outline%3A+none%3B%0A++++pointer-events%3A+all%3B%0A++++block-size%3A+2.75rem%3B%0A++++inline-size%3A+0.25rem%3B%0A++++border-radius%3A+0.25rem%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++cursor%3A+grab%3B%0A++++margin%3A+0%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-moz-range-thumb+%7B%0A++++appearance%3A+none%3B%0A++++box-shadow%3A+none%3B%0A++++border%3A+none%3B%0A++++outline%3A+none%3B%0A++++pointer-events%3A+all%3B%0A++++block-size%3A+2.75rem%3B%0A++++inline-size%3A+0.25rem%3B%0A++++border-radius%3A+0.25rem%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++cursor%3A+grab%3B%0A++++margin%3A+0%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-webkit-slider-thumb%3Aactive+%7B%0A++++cursor%3A+grabbing%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3A%3A-moz-range-thumb%3Aactive+%7B%0A++++cursor%3A+grabbing%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3Anot%28%3Adisabled%29%3Ais%28%3Afocus%29%3A%3A-webkit-slider-thumb+%7B%0A++++transform%3A+scaleX%280.6%29%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3Anot%28%3Adisabled%29%3Ais%28%3Afocus%29%3A%3A-moz-range-thumb+%7B%0A++++transform%3A+scaleX%280.6%29%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3Adisabled+%7B%0A++++cursor%3A+not-allowed%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3Adisabled%3A%3A-moz-range-thumb+%7B%0A++++cursor%3A+not-allowed%3B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Einput%3Adisabled%3A%3A-webkit-slider-thumb+%7B%0A++++background%3A+var%28--wm-color-on-surface%29%3B%0A++++cursor%3A+not-allowed%3B%0A++++opacity%3A+0.38%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A++++position%3A+absolute%3B%0A++++inline-size%3A+100%25%3B%0A++++block-size%3A+1rem%3B%0A++++border-radius%3A+1rem%3B%0A++++background%3A+var%28--wm-color-primary-container%29%3B%0A++++clip-path%3A+polygon%28calc%28var%28--start%29+-+0.5rem%29+0%2C+0+0%2C+0+100%25%2C+calc%28var%28--start%29+-+0.5rem%29+100%25%2C+calc%28var%28--start%29+-+0.5rem%29+0%2C+calc%28100%25+-+var%28--end%29+%2B+0.5rem%29+0%2C+100%25+0%2C+100%25+100%25%2C+calc%28100%25+-+var%28--end%29+%2B+0.5rem%29+100%25%2C+calc%28100%25+-+var%28--end%29+%2B+0.5rem%29+0%29%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3E.active-slider+%7B%0A++++position%3A+absolute%3B%0A++++block-size%3A+1rem%3B%0A++++border-radius%3A+1rem+0+0+1rem%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++z-index%3A+0%3B%0A++++float%3A+unset%3B%0A++++vertical-align%3A+baseline%3B%0A++++inset%3A+calc%2850%25+-+0.5rem%29+var%28--end%29+auto+var%28--start%29%3B%0A++++clip-path%3A+polygon%280+0%2C+calc%28100%25+-+0.5rem%29+0%2C+calc%28100%25+-+0.5rem%29+100%25%2C+0+100%25%29%3B%0A++++display%3A+block%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3E.app-slider-value+%7B%0A++++position%3A+absolute%3B%0A++++top%3A+36px%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3E.app-slider-value.pull-left+%7B%0A++++left%3A+0%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3E.app-slider-value.pull-right+%7B%0A++++right%3A+0%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Ahas%28input%3Adisabled%29%3A%3Abefore+%7B%0A++++background%3A+var%28+--wm-color-on-surface-focus%29%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider%3Ahas%28input%3Adisabled%29%3Ep.active-slider+%7B%0A++++background%3A+var%28--wm-color-on-surface%29%3B%0A++++opacity%3A+0.38%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider+input%5Btype%3Drange%5D%3A%3A-webkit-slider-runnable-track+%7B%0A++++background%3A+unset%3B%0A++++height%3A+unset%3B%0A++++position%3A+relative%3B%0A%7D%0A%0A%0A%2F*+Ensure+the+container+is+positioned+relatively+to+contain+absolutely+positioned+children+*%2F%0A%0A.app-container.stop-indicator+%7B%0A++++position%3A+relative%3B%0A++++box-sizing%3A+border-box%3B%0A++++width%3A+calc%28100%25+-+48px%29%3B%0A++++margin-inline%3A+auto%3B%0A%7D%0A%0A.app-composite-widget%3Ahas%28.discrete-slider+%3E+.btn-icon.btn%29+.app-container.stop-indicator+%7B%0A++++width%3A+calc%28100%25+-+168px%29%3B%0A%7D%0A%0A.app-composite-widget%3Ahas%28.discrete-slider+%3E+.btn-icon.btn%5Bhidden%5D%29+.app-container.stop-indicator+%7B%0A++++width%3A+calc%28100%25+-+48px%29%3B%0A%7D%0A%0A%0A%2F*+Style+for+individual+step+labels+*%2F%0A%0A.app-container.stop-indicator+.step-label+%7B%0A++++position%3A+absolute%3B%0A++++text-align%3A+center%3B%0A++++white-space%3A+nowrap%3B%0A++++left%3A+var%28--position%2C+0%25%29%3B%0A++++visibility%3A+hidden%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label.hidden+%7B%0A++++display%3A+none+%21important%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label.inactive%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-color-primary-container%29%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label.active%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label%5Bdata-position%3D%2299%22%5D+%7B%0A++++--position%3A+98.5%25+%21important%3B%0A%7D%0A%0A.app-container.stop-indicator+.step-label%3A%3Abefore+%7B%0A++++position%3A+absolute%3B%0A++++height%3A+4px%3B%0A++++width%3A+4px%3B%0A++++left%3A+var%28--position%2C+0%25%29%3B%0A++++content%3A+%27%27%3B%0A++++top%3A+-30px%3B%0A++++visibility%3A+visible%3B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++border-radius%3A+50%25%3B%0A++++display%3A+block%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider.hide-labels%3E.app-slider-value.pull-left+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A.app-container.discrete-slider.filled-slider+.app-slider.slider.cst-slider.hide-labels%3E.app-slider-value.pull-right+%7B%0A++++display%3A+none%3B%0A%7D",
5
5
  "variables": "%7B+%7D",
6
- "config": "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22state%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22State%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20interactivity%20of%20the%20widget.%20%27Enabled%27%20allows%20interaction%20with%20the%20widget%2C%20while%20%27Disabled%27%20makes%20the%20widget%20non-interactive%20and%20inactive.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Enabled%22%2C%20%22Disabled%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Enabled%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22label_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Label%20Text%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Defines%20the%20text%20that%20appears%20on%20the%20widget%E2%80%99s%20label.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Label%20Text%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Default%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Sets%20the%20initial%20value%20of%20the%20slider%20when%20the%20widget%20is%20first%20displayed.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%2250%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22step_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Step%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Defines%20the%20increment%20or%20decrement%20steps%20for%20the%20slider.%20This%20value%20controls%20the%20amount%20by%20which%20the%20slider%E2%80%99s%20value%20changes%20with%20each%20step.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%2210%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22min_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22integer%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Minimum%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20smallest%20value%20the%20slider%20can%20be%20set%20to.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%220%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22max_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22integer%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Maximum%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20largest%20value%20the%20slider%20can%20be%20set%20to.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22100%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%0A%20%20%20%20%22onChange%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22function%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22On%20Change%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Triggered%20when%20the%20slider%E2%80%99s%20value%20changes.%20The%20function%20receives%20parameters%20including%20the%20event%2C%20the%20widget%2C%20the%20new%20value%2C%20and%20the%20previous%20value.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22slider1Change(%24event%2C%20widget%2C%20newVal%2C%20oldVal)%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A"
6
+ "config": "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22state%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22State%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20interactivity%20of%20the%20widget.%20%27Enabled%27%20allows%20interaction%20with%20the%20widget%2C%20while%20%27Disabled%27%20makes%20the%20widget%20non-interactive%20and%20inactive.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Enabled%22%2C%20%22Disabled%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Enabled%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22label_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Label%20Text%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Defines%20the%20text%20that%20appears%20on%20the%20widget%E2%80%99s%20label.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Label%20Text%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22show_labels%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Show%20Labels%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Determines%20whether%20labels%20should%20be%20displayed%20on%20the%20widget.%20When%20set%20to%20true%2C%20lables%20will%20be%20shown.%20When%20false%2C%20labels%20will%20be%20hidden.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22show_icons%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Show%20Icons%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Determines%20whether%20icons%20should%20be%20displayed%20on%20the%20widget.%20When%20set%20to%20true%2C%20icons%20will%20be%20shown.%20When%20false%2C%20icons%20will%20be%20hidden.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22start_icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Start%20Icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22The%20icon%20to%20be%20displayed%20at%20the%20start%20of%20the%20widget.%20Select%20an%20appropriate%20icon%20from%20the%20available%20options.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22%22%2C%0A%20%20%20%20%20%20%22widget%22%20%3A%20%22select-icon%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22end_icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22End%20Icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22The%20icon%20to%20be%20displayed%20at%20the%20end%20of%20the%20widget.%20Select%20an%20appropriate%20icon%20from%20the%20available%20options.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22%22%2C%0A%20%20%20%20%20%20%22widget%22%20%3A%20%22select-icon%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22icon_actions%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Icon%20Actions%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Determines%20whether%20the%20icons%20on%20the%20widget%20are%20interactive.%20When%20set%20to%20true%2C%20icons%20will%20respond%20to%20user%20actions%20(e.g.%2C%20clicks).%20When%20false%2C%20icons%20will%20be%20displayed%20but%20not%20interactive.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22false%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Default%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Sets%20the%20initial%20value%20of%20the%20slider%20when%20the%20widget%20is%20first%20displayed.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%2250%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22step_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Step%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Defines%20the%20increment%20or%20decrement%20steps%20for%20the%20slider.%20This%20value%20controls%20the%20amount%20by%20which%20the%20slider%E2%80%99s%20value%20changes%20with%20each%20step.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%2210%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22min_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22integer%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Minimum%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20smallest%20value%20the%20slider%20can%20be%20set%20to.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%220%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22max_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22integer%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Maximum%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20largest%20value%20the%20slider%20can%20be%20set%20to.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22100%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%0A%20%20%20%20%22onChange%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22function%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22On%20Change%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Triggered%20when%20the%20slider%E2%80%99s%20value%20changes.%20The%20function%20receives%20parameters%20including%20the%20event%2C%20the%20widget%2C%20the%20new%20value%2C%20and%20the%20previous%20value.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22sliderChange(%24event%2C%20widget%2C%20newVal%2C%20oldVal)%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22onDecrement%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22function%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22On%20Decrement%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Function%20to%20be%20called%20when%20the%20value%20of%20the%20slider%20decreased.%20This%20function%20receives%20parameters%20such%20as%20the%20event%2C%20widget.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22decrementButtonClick(%24event%2C%20widget)%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22onIncrement%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22function%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22On%20Increment%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Function%20to%20be%20called%20when%20the%20value%20of%20the%20slider%20increased.%20This%20function%20receives%20parameters%20such%20as%20the%20event%2C%20widget.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22incrementButtonClick(%24event%2C%20widget)%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A"
7
7
  };
@@ -0,0 +1,4 @@
1
+ declare function updateDivider(divider: any, orientation_prop: any, vertical_height: any): void;
2
+ declare function resetAndUpdateDividerClasses(divider: any, orientation: any, length: any): void;
3
+ declare function calculateHeight(length: any, vertical_height: any): any;
4
+ declare function setDividerHeight(divider: any, height: any): void;
@@ -1,28 +1,42 @@
1
- Widget.onReady = function () {
2
- var orientation_array = Widget.props.orientation.toLowerCase().split("/");
3
- var orientation = orientation_array[0]; // Vertical or Horizontal
4
- var length = orientation_array[1];
5
- Widget.Widgets.divider1.class = (" " + orientation + "-divider");
6
- Widget.Widgets.divider1.class += (" " + length);
7
- var divider1 = Widget.Widgets.divider1;
8
- if (orientation === "vertical" && length === "full-width") {
9
- var vertical_height = "".concat(Widget.props.vertical_height, "px");
10
- divider1.$element.css({
11
- 'height': "".concat(vertical_height),
12
- });
1
+ Widget.onPropertyChange = function (propName, newValue, oldValue) {
2
+ var _a = Widget.props, orientation = _a.orientation, vertical_height = _a.vertical_height;
3
+ var widgetMap = Widget.Widgets;
4
+ var relevantProps = ["prop-vertical_height", "prop-orientation"];
5
+ if (relevantProps.includes(propName)) {
6
+ updateDivider(widgetMap.divider1, orientation, vertical_height);
13
7
  }
14
- else if (orientation === "vertical" && length === "inset") {
15
- var vertical_height = Widget.props.vertical_height - 16;
16
- vertical_height = "".concat(vertical_height, "px");
17
- divider1.$element.css({
18
- 'height': "".concat(vertical_height),
19
- });
8
+ };
9
+ Widget.onReady = function () {
10
+ var _a = Widget.props, orientation = _a.orientation, vertical_height = _a.vertical_height;
11
+ var widgetMap = Widget.Widgets;
12
+ updateDivider(widgetMap.divider1, orientation, vertical_height);
13
+ };
14
+ function updateDivider(divider, orientation_prop, vertical_height) {
15
+ var orientationArray = orientation_prop.toLowerCase().split("/");
16
+ var orientation = orientationArray[0]; // Vertical or Horizontal
17
+ var length = orientationArray[1];
18
+ resetAndUpdateDividerClasses(divider, orientation, length);
19
+ if (orientation === "vertical") {
20
+ var height = calculateHeight(length, vertical_height);
21
+ setDividerHeight(divider, height);
20
22
  }
21
- else if (orientation === "vertical" && length === "middle-inset") {
22
- var vertical_height = Widget.props.vertical_height - 32;
23
- vertical_height = "".concat(vertical_height, "px");
24
- divider1.$element.css({
25
- 'height': "".concat(vertical_height),
26
- });
23
+ }
24
+ function resetAndUpdateDividerClasses(divider, orientation, length) {
25
+ divider.nativeElement.classList.remove("full-width", "middle-inset", "horizontal-divider", "vertical-divider", "inset");
26
+ divider.nativeElement.classList.add("".concat(orientation, "-divider"), length);
27
+ }
28
+ function calculateHeight(length, vertical_height) {
29
+ switch (length) {
30
+ case "full-width":
31
+ return vertical_height;
32
+ case "inset":
33
+ return vertical_height - 16;
34
+ case "middle-inset":
35
+ return vertical_height - 32;
36
+ default:
37
+ return vertical_height;
27
38
  }
28
- };
39
+ }
40
+ function setDividerHeight(divider, height) {
41
+ divider.nativeElement.style.setProperty("height", "".concat(height, "px"));
42
+ }
@@ -1,7 +1,7 @@
1
1
  export var divider = {
2
- markup: "%3Cwm-custom-widget-container%3E%0A++++%3Cwm-container+name%3D%22divider1%22+class%3D%22horizontal-divider+full-width%22+style%3D%22+%22%3E%3C%2Fwm-container%3E%0A%0A++++%3C%21--+Height+of+vertical+divider+will+be+supplied+using+inline+styles+and+the+value+can+be+picked+up+from+node+css.+%0A++++A+minimum+height+has+been+defined+in+the+event+that+the+user+uses+a+custom+widget+divider.+--%3E%0A%3C%2Fwm-custom-widget-container%3E",
3
- script: "Widget.onReady+%3D+function%28%29+%7B%0A++++const+orientation_array+%3D+Widget.props.orientation.toLowerCase%28%29.split%28%22%2F%22%29%3B%0A++++const+orientation+%3D+orientation_array%5B0%5D%3B+%2F%2F+Vertical+or+Horizontal%0A++++const+length+%3D+orientation_array%5B1%5D%3B%0A%0A++++Widget.Widgets.divider1.class+%3D+%28%22+%22+%2B+orientation+%2B+%22-divider%22%29%3B%0A++++Widget.Widgets.divider1.class+%2B%3D+%28%22+%22+%2B+length%29%3B%0A++++let+divider1+%3D+Widget.Widgets.divider1%3B%0A%0A++++if+%28orientation+%3D%3D%3D+%22vertical%22+%26%26+length+%3D%3D%3D+%22full-width%22%29+%7B%0A++++++++let+vertical_height+%3D+%60%24%7BWidget.props.vertical_height%7Dpx%60%3B%0A++++++++divider1.%24element.css%28%7B%0A++++++++++++%27height%27%3A+%60%24%7Bvertical_height%7D%60%2C%0A++++++++%7D%29%3B%0A++++%7D+else+if+%28orientation+%3D%3D%3D+%22vertical%22+%26%26+length+%3D%3D%3D+%22inset%22%29+%7B%0A++++++++let+vertical_height+%3D+Widget.props.vertical_height+-+16%3B%0A++++++++vertical_height+%3D+%60%24%7Bvertical_height%7Dpx%60%3B%0A++++++++divider1.%24element.css%28%7B%0A++++++++++++%27height%27%3A+%60%24%7Bvertical_height%7D%60%2C%0A++++++++%7D%29%3B%0A++++%7D+else+if+%28orientation+%3D%3D%3D+%22vertical%22+%26%26+length+%3D%3D%3D+%22middle-inset%22%29+%7B%0A++++++++let+vertical_height+%3D+Widget.props.vertical_height+-+32%3B%0A++++++++vertical_height+%3D+%60%24%7Bvertical_height%7Dpx%60%3B%0A++++++++divider1.%24element.css%28%7B%0A++++++++++++%27height%27%3A+%60%24%7Bvertical_height%7D%60%2C%0A++++++++%7D%29%3B%0A++++%7D%0A%0A%7D",
4
- styles: ".horizontal-divider+%7B%0A++++display%3A+flex%3B%0A++++border-top%3A+1px+solid+%23CAC4D0%3B%0A++++height%3A+1px+%21important%3B%0A%7D%0A%0A.app-container%3E.horizontal-divider.full-width+%7B%0A++++width%3A+100%25%3B%0A++++margin%3A+auto%3B%0A++++padding%3A+0px%3B%0A%7D%0A%0A.horizontal-divider.inset+%7B%0A++++margin-left%3A+16px%3B%0A%7D%0A%0A.horizontal-divider.middle-inset+%7B%0A++++display%3A+flex%3B%0A++++margin-left%3A+16px%3B%0A++++margin-right%3A+16px%3B%0A%7D%0A%0A.vertical-divider+%7B%0A++++width%3A+1px%3B%0A++++border-left%3A+1px+solid+%23CAC4D0%3B%0A++++min-height%3A+1px%3B%0A%7D%0A%0A.vertical-divider.full-width+%7B%0A++++margin-top%3A+0%3B%0A++++margin-bottom%3A+0%3B%0A%7D%0A%0A.vertical-divider.inset+%7B%0A++++margin-top%3A+16px%3B%0A++++box-sizing%3A+border-box%3B%0A%7D%0A%0A.vertical-divider.middle-inset+%7B%0A++++margin-top%3A+16px%3B%0A++++margin-bottom%3A+16px%3B%0A%7D",
5
- variables: "%7B+%7D",
6
- config: "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22orientation%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Orientation%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Determines%20the%20style%20of%20the%20M3%20divider%20being%20used.%20Default%20value%20is%20horizontal%2Ffull-width.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22horizontal%2Ffull-width%22%2C%20%22horizontal%2Fmiddle-inset%22%2C%20%22horizontal%2Finset%22%2C%20%22vertical%2Ffull-width%22%2C%20%22vertical%2Fmiddle-inset%22%2C%20%22vertical%2Finset%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22horizontal%2Ffull-width%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22vertical_height%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22integer%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Height%20(only%20for%20vertical)%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Determines%20the%20height%20of%20the%20vertical%20divider%20(in%20px)%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%202%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%0A%20%20%20%20%22onRender%22%20%3A%20%7B%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Callback%20action%20to%20test%20event%20in%20the%20properties%20panel%22%2C%0A%20%20%20%20%20%20%22eventData%22%20%3A%20%22%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Render%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D"
2
+ "markup": "%3Cwm-custom-widget-container+name%3D%22partial1%22%3E%0A++++%3Cwm-container+name%3D%22divider1%22+class%3D%22divider%22%3E%3C%2Fwm-container%3E%0A++++%3C%21--+Height+of+vertical+divider+will+be+supplied+using+inline+styles+and+the+value+can+be+picked+up+from+node+css.+%0A++++A+minimum+height+has+been+defined+in+the+event+that+the+user+uses+a+custom+widget+divider.+--%3E%0A%3C%2Fwm-custom-widget-container%3E",
3
+ "script": "Widget.onPropertyChange+%3D+function%28propName%2C+newValue%2C+oldValue%29+%7B%0A++++const+%7B%0A++++++++orientation%2C%0A++++++++vertical_height%0A++++%7D+%3D+Widget.props%3B%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A%0A++++const+relevantProps+%3D+%5B%22prop-vertical_height%22%2C+%22prop-orientation%22%5D%3B%0A++++if+%28relevantProps.includes%28propName%29%29+%7B%0A++++++++updateDivider%28widgetMap.divider1%2C+orientation%2C+vertical_height%29%3B%0A++++%7D%0A%7D%3B%0A%0AWidget.onReady+%3D+function%28%29+%7B%0A++++const+%7B%0A++++++++orientation%2C%0A++++++++vertical_height%0A++++%7D+%3D+Widget.props%3B%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A++++updateDivider%28widgetMap.divider1%2C+orientation%2C+vertical_height%29%3B%0A%7D%3B%0A%0Afunction+updateDivider%28divider%2C+orientation_prop%2C+vertical_height%29+%7B%0A++++const+orientationArray+%3D+orientation_prop.toLowerCase%28%29.split%28%22%2F%22%29%3B%0A++++const+orientation+%3D+orientationArray%5B0%5D%3B+%2F%2F+Vertical+or+Horizontal%0A++++const+length+%3D+orientationArray%5B1%5D%3B%0A++++resetAndUpdateDividerClasses%28divider%2C+orientation%2C+length%29%3B%0A%0A++++if+%28orientation+%3D%3D%3D+%22vertical%22%29+%7B%0A++++++++const+height+%3D+calculateHeight%28length%2C+vertical_height%29%3B%0A++++++++setDividerHeight%28divider%2C+height%29%3B%0A++++%7D%0A%7D%0A%0Afunction+resetAndUpdateDividerClasses%28divider%2C+orientation%2C+length%29+%7B%0A++++divider.nativeElement.classList.remove%28%0A++++++++%22full-width%22%2C%0A++++++++%22middle-inset%22%2C%0A++++++++%22horizontal-divider%22%2C%0A++++++++%22vertical-divider%22%2C%0A++++++++%22inset%22%0A++++%29%3B%0A%0A++++divider.nativeElement.classList.add%28%60%24%7Borientation%7D-divider%60%2C+length%29%3B%0A%7D%0A%0Afunction+calculateHeight%28length%2C+vertical_height%29+%7B%0A++++switch+%28length%29+%7B%0A++++++++case+%22full-width%22%3A%0A++++++++++++return+vertical_height%3B%0A++++++++case+%22inset%22%3A%0A++++++++++++return+vertical_height+-+16%3B%0A++++++++case+%22middle-inset%22%3A%0A++++++++++++return+vertical_height+-+32%3B%0A++++++++default%3A%0A++++++++++++return+vertical_height%3B%0A++++%7D%0A%7D%0A%0Afunction+setDividerHeight%28divider%2C+height%29+%7B%0A++++divider.nativeElement.style.setProperty%28%22height%22%2C+%60%24%7Bheight%7Dpx%60%29%3B%0A%7D",
4
+ "styles": ".divider+%7B%0A++++--wm-divider-border-width%3A+var%28--wm-border-width%29%3B%0A++++--wm-divider-border-style%3A+var%28--wm-border-style%29%3B%0A++++--wm-divider-border-color%3A+var%28--wm-color-outline-variant%29%3B%0A++++--wm-divider-inset-width%3A+var%28--wm-space-4%29%3B%0A++++--wm-vertical-divider-width%3A+1px%3B%0A%7D%0A%0A.divider+%7B%0A++++display%3A+flex%3B%0A++++border-top%3A+var%28--wm-divider-border-width%29+var%28--wm-divider-border-style%29+var%28--wm-divider-border-color%29%3B%0A++++height%3A+1px%3B%0A++++margin-block%3A+8px%3B%0A%7D%0A%0A.app-container%3E.divider.full-width+%7B%0A++++width%3A+100%25%3B%0A++++margin%3A+auto%3B%0A++++padding%3A+0px%3B%0A%7D%0A%0A.divider.inset+%7B%0A++++margin-left%3A+var%28--wm-divider-inset-width%29%3B%0A%7D%0A%0A.divider.middle-inset+%7B%0A++++display%3A+flex%3B%0A++++margin-inline%3A+var%28--wm-divider-inset-width%29%3B%0A%7D%0A%0A.vertical-divider+%7B%0A++++width%3A+var%28--wm-vertical-divider-width%29%3B%0A++++border-left%3A+var%28--wm-divider-border-width%29+var%28--wm-divider-border-style%29+var%28--wm-divider-border-color%29%3B%0A++++min-height%3A+1px%3B%0A++++margin-inline%3A+8px%3B%0A%7D%0A%0A.vertical-divider.full-width+%7B%0A++++margin-top%3A+0%3B%0A++++margin-bottom%3A+0%3B%0A%7D%0A%0A.vertical-divider.inset+%7B%0A++++margin-top%3A+var%28--wm-divider-inset-width%29%3B%0A%7D%0A%0A.vertical-divider.middle-inset+%7B%0A++++margin-block%3A+var%28--wm-divider-inset-width%29%3B%0A%7D",
5
+ "variables": "%7B+%7D",
6
+ "config": "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22orientation%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Orientation%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Determines%20the%20style%20of%20the%20M3%20divider%20being%20used.%20Default%20value%20is%20horizontal%2Ffull-width.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22horizontal%2Ffull-width%22%2C%20%22horizontal%2Fmiddle-inset%22%2C%20%22horizontal%2Finset%22%2C%20%22vertical%2Ffull-width%22%2C%20%22vertical%2Fmiddle-inset%22%2C%20%22vertical%2Finset%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22horizontal%2Ffull-width%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22vertical_height%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22integer%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Height%20(only%20for%20vertical)%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Determines%20the%20height%20of%20the%20vertical%20divider%20(in%20px)%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%202%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%0A%20%20%20%20%22onRender%22%20%3A%20%7B%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Callback%20action%20to%20test%20event%20in%20the%20properties%20panel%22%2C%0A%20%20%20%20%20%20%22eventData%22%20%3A%20%22%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Render%22%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D"
7
7
  };
@@ -1,11 +1,16 @@
1
1
  declare function convertToBoolean(value: any): boolean;
2
+ declare function convertToBoolean(value: any): boolean;
3
+ declare function updateStartIconVisibility(iconActionsBool: any, widgetMap: any): void;
2
4
  declare function updateStartIconVisibility(iconActionsBool: any, widgetMap: any): void;
3
5
  declare function updateEndIconVisibility(iconActionsBool: any, widgetMap: any): void;
6
+ declare function updateEndIconVisibility(iconActionsBool: any, widgetMap: any): void;
4
7
  declare function updateSliderValue(datavalue: any, widgetMap: any): void;
8
+ declare function toggleIconsVisibility(showIconsBool: any, iconActionsBool: any, widgetMap: any): void;
5
9
  declare function toggleIconsVisibility(showIconsBool: any, startIcon: any, endIcon: any, iconActionsBool: any, widgetMap: any): void;
6
10
  declare function toggleLabelVisibilty(showLabelsBool: any, widgetMap: any): void;
7
- declare function activeSliderElement(): void;
11
+ declare function toggleLabelVisibilty(showLabelsBool: any, widgetMap: any): void;
8
12
  declare function activeSliderElement(widgetMap: any): void;
13
+ declare function getSliderPercentage(value: any, minValue: any, maxValue: any): number;
9
14
  declare function getSliderPercentage(value: any): number;
10
- declare function getSliderPercentage(value: any): number;
15
+ declare function moveSlider(direction: any, widgetMap: any): void;
11
16
  declare function moveSlider(direction: any, widgetMap: any): void;
@@ -1,7 +1,7 @@
1
1
  export var switch_button = {
2
- markup: "%3Cwm-custom-widget-container%3E%0A++++%3Cwm-composite+name%3D%22composite%22+required%3D%22false%22%3E%0A++++++++%3Cwm-label+class%3D%22+control-label%22+notag%3D%22true%22+name%3D%22label1%22+caption%3D%22bind%3Aprops.label_text%22%3E%3C%2Fwm-label%3E%0A++++++++%3Cwm-container+name%3D%22container1%22+conditionalclass%3D%22bind%3A%7B%27filled-switch-wrapper%27%3A+props.switch_type+%3D%3D%3D+%26quot%3BFilled%26quot%3B%2C%0A%27condensed-switch-wrapper%27%3A+props.switch_type+%3D%3D%3D+%26quot%3BCondensed%26quot%3B%2C++++%0A%27iOS-switch-wrapper%27%3Aprops.switch_type++%3D%3D%3D+%26quot%3BIOS%26quot%3B%7D%22%3E%0A++++++++++++%3Cwm-checkbox+caption%3D%22Toggle%22+type%3D%22toggle%22+name%3D%22toggle%22+disabled%3D%22bind%3Aprops.state%3D%3D%26quot%3BDisabled%26quot%3B%3Ftrue%3Afalse%22+datavalue%3D%22bind%3Aprops.selected%22+checkedvalue%3D%22true%22+uncheckedvalue%3D%22false%22+required%3D%22bind%3Aprops.required%22+show%3D%22true%22%3E%3C%2Fwm-checkbox%3E%0A++++++++++++%3Cwm-container+name%3D%22container2%22+class%3D%22icon-container%22+show%3D%22true%22%3E%0A++++++++++++++++%3Cwm-icon+name%3D%22icon1%22+iconclass%3D%22bind%3Aprops.unselected_icon%22+show%3D%22bind%3Aprops.unselected_icon%22+class%3D%22start-icon%22%3E%3C%2Fwm-icon%3E%0A++++++++++++++++%3Cwm-icon+name%3D%22icon2%22+iconclass%3D%22bind%3Aprops.selected_icon%22+show%3D%22bind%3Aprops.selected_icon%22+class%3D%22end-icon%22%3E%3C%2Fwm-icon%3E%0A++++++++++++%3C%2Fwm-container%3E%0A++++++++%3C%2Fwm-container%3E%0A++++%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E",
3
- script: "%2F*%0A+*+Use+App.getDependency+for+Dependency+Injection%0A+*+Example%3A%0A+*+var+DialogService+%3D+App.getDependency%28%27DialogService%27%29%3B%0A+*%2F%0A%0A%2F*+Perform+any+action+on+widgets%2Fvariables+within+this+block+*%2F%0AWidget.onReady+%3D+function%28%29+%7B%0A++++%2F*%0A+++++*+Access+variables+through+%27Widget.Variables%27%0A+++++*+Example%3A+To+get+data+from+a+static+variable+named+%27loggedInUser%27%2C+use%3A%0A+++++*+Widget.Variables.loggedInUser.getData%28%29%0A+++++*%0A+++++*+Access+widgets+through+%27Widget.Widgets%27%0A+++++*+Example%3A+To+get+the+value+of+a+text+widget+named+%27username%27%2C+use%3A%0A+++++*+Widget.Widgets.username.datavalue%0A+++++*%2F%0A%0A++++%2F%2F+Set+CSS+classes+for+the+toggle+widget+based+on+the+switch+type%0A++++if+%28Widget.props.switch_type+%3D%3D%3D+%22Filled%22%29+%7B%0A++++++++%2F%2F+Add+%27filled-switch%27+and+possibly+%27icon%27+class%0A++++++++if+%28Widget.props.icon.toString%28%29.toLowerCase%28%29+%3D%3D%3D+%27true%27%29+%7B%0A++++++++++++Widget.Widgets.toggle.class+%2B%3D+%27+filled-switch+icon%27%3B%0A++++++++%7D+else+%7B%0A++++++++++++Widget.Widgets.toggle.class+%2B%3D+%27+filled-switch%27%3B%0A++++++++%7D%0A++++++++%2F%2F+Add+%27unselected-icon%27+class+if+no+unselected_icon+is+specified%0A++++++++if+%28Widget.props.unselected_icon+%3D%3D+null+%7C%7C+Widget.props.unselected_icon+%3D%3D%3D+%22%22+%7C%7C+Widget.props.unselected_icon+%3D%3D%3D+%22+%22%29+%7B%0A++++++++++++Widget.Widgets.toggle.class+%2B%3D+%27+filled-switch+icon+unselected-icon%27%3B%0A++++++++%7D%0A%0A++++%7D+else+if+%28Widget.props.switch_type+%3D%3D%3D+%22Condensed%22%29+%7B%0A++++++++%2F%2F+Add+%27condensed-switch%27+class%0A++++++++Widget.Widgets.toggle.class+%2B%3D+%27+condensed-switch%27%3B%0A++++%7D+else+if+%28Widget.props.switch_type+%3D%3D%3D+%22IOS%22%29+%7B%0A++++++++%2F%2F+Add+%27iOS-switch%27+class%0A++++++++Widget.Widgets.toggle.class+%2B%3D+%27+iOS-switch%27%3B%0A++++%7D%0A%0A++++%2F%2F+Set+the+%27required%27+property+for+the+composite+widget%0A++++Widget.Widgets.composite.required+%3D+Widget.props.required%3B%0A%0A++++%2F%2F+Set+the+%27checkedvalue%27+and+%27uncheckedvalue%27+properties+for+the+toggle+widget%0A++++Widget.Widgets.toggle.checkedvalue+%3D+Widget.props.checked_value%3B%0A++++Widget.Widgets.toggle.uncheckedvalue+%3D+Widget.props.unchecked_value%3B%0A%0A++++%2F%2F+Retrieve+the+selected+value+from+page+parameters%0A++++var+selectedValue+%3D+Widget.props.selected%3B%0A%0A++++%2F%2F+Determine+the+correct+%27datavalue%27+based+on+the+selected+value%0A++++if+%28selectedValue+%3D%3D%3D+Widget.Widgets.toggle.checkedvalue%29+%7B%0A++++++++%2F%2F+If+selected+value+matches+the+checked+value%2C+set+datavalue+to+checked+value%0A++++++++Widget.Widgets.toggle.datavalue+%3D+Widget.Widgets.toggle.checkedvalue%3B%0A++++%7D+else+if+%28selectedValue+%3D%3D%3D+Widget.Widgets.toggle.uncheckedvalue%29+%7B%0A++++++++%2F%2F+If+selected+value+matches+the+unchecked+value%2C+set+datavalue+to+unchecked+value%0A++++++++Widget.Widgets.toggle.datavalue+%3D+Widget.Widgets.toggle.uncheckedvalue%3B%0A++++%7D+else+%7B%0A++++++++%2F%2F+Log+a+warning+if+the+selected+value+does+not+match+known+values%0A++++++++console.warn%28%27Selected+value+does+not+match+any+known+value%27%29%3B%0A++++++++%2F%2F+Optionally+set+to+a+default+value+or+handle+the+error%0A++++++++Widget.Widgets.toggle.datavalue+%3D+Widget.Widgets.toggle.uncheckedvalue%3B+%2F%2F+Default+to+unchecked%0A++++%7D%0A%7D",
4
- styles: ".condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch+%7B%0A++++padding%3A+6px+0%3B%0A++++left%3A+-6px%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel.unchecked%2C%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel+%7B%0A++++z-index%3A+0%3B%0A++++position%3A+relative%3B%0A++++display%3A+inline-block%3B%0A++++color%3A+rgba%280%2C+0%2C+0%2C+0.87%29%3B%0A++++background-color%3A+unset+%21important%3B%0A++++border%3A+unset%3B%0A++++width%3A+auto%3B%0A++++height%3A+unset%3B%0A++++box-shadow%3A+unset%3B%0A++++border-radius%3A+unset%3B%0A++++overflow%3A+visible%3B%0A++++min-height%3A+unset%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel.unchecked%3E.switch+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A%0A%2F*+Input+*%2F%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3Einput+%7B%0A++++appearance%3A+none%3B%0A++++-moz-appearance%3A+none%3B%0A++++-webkit-appearance%3A+none%3B%0A++++z-index%3A+-1%3B%0A++++position%3A+absolute%3B%0A++++top%3A+-8px%3B%0A++++display%3A+block%3B%0A++++margin%3A+0%3B%0A++++border-radius%3A+50%25%3B%0A++++width%3A+40px%3B%0A++++height%3A+40px%3B%0A++++background-color%3A+rgba%280%2C+0%2C+0%2C+0.38%29%3B%0A++++outline%3A+none%3B%0A++++opacity%3A+0%3B%0A++++transform%3A+scale%281%29%3B%0A++++pointer-events%3A+none%3B%0A++++transition%3A+opacity+0.3s+0.1s%2C+transform+0.2s+0.1s%3B%0A++++right%3A+0px%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel.unchecked%3Einput+%7B%0A++++left%3A+4px%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-checkbox.checkbox.condensed-switch+label+input%3Afocus+%7B%0A++++outline%3A+unset+%21important%3B%0A%7D%0A%0A%0A%2F*+Caption+*%2F%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3E.caption+%7B%0A++++display%3A+inline-block%3B%0A++++width%3A+100%25%3B%0A++++cursor%3A+pointer%3B%0A++++min-height%3A+unset%3B%0A++++padding-left%3A+unset%3B%0A++++margin-top%3A+unset%3B%0A%7D%0A%0A%0A%2F*+Track+*%2F%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3E.caption%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A++++%2F*+float%3A+right%3B+*%2F%0A++++display%3A+inline-block%3B%0A++++margin%3A+5px+0+5px+14px%3B%0A++++border-radius%3A+7px%3B%0A++++width%3A+40px%3B%0A++++height%3A+14px%3B%0A++++background-color%3A+rgba%280%2C+0%2C+0%2C+0.38%29%3B%0A++++vertical-align%3A+top%3B%0A++++transition%3A+background-color+0.2s%2C+opacity+0.2s%3B%0A++++visibility%3A+visible%3B%0A++++float%3A+left%3B%0A++++border%3A+unset%3B%0A++++top%3A+unset%3B%0A++++left%3A+unset%3B%0A%7D%0A%0A%0A%2F*+Thumb+*%2F%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3E.caption%3A%3Aafter+%7B%0A++++content%3A+%22%22%3B%0A++++position%3A+absolute%3B%0A++++top%3A+3px%3B%0A++++border-radius%3A+50%25%3B%0A++++width%3A+20px%3B%0A++++height%3A+20px%3B%0A++++background-color%3A+var%28--wm-color-on-primary%29%3B%0A++++box-shadow%3A+0+3px+1px+-2px+rgba%280%2C+0%2C+0%2C+0.2%29%2C+0+2px+2px+0+rgba%280%2C+0%2C+0%2C+0.14%29%2C+0+1px+5px+0+rgba%280%2C+0%2C+0%2C+0.12%29%3B%0A++++transition%3A+background-color+0.2s%2C+transform+0.2s%3B%0A++++visibility%3A+visible%3B%0A++++left%3A+16px%3B%0A++++border%3A+unset%3B%0A++++transform%3A+unset%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel.unchecked%3E.caption%3A%3Aafter+%7B%0A++++left%3A+14px%3B%0A%7D%0A%0A%0A%2F*+Checked+*%2F%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3Einput%3Achecked+%7B%0A++++background-color%3A+var%28--wm-color-surface-tint%29%3B%0A++++left%3A+25px%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3Einput%3Achecked%2B.caption%3A%3Aafter+%7B%0A++++background-color%3A+var%28--wm-color-surface-tint%29%3B%0A++++transform%3A+translateX%2818px%29%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch+input%5Btype%3Dcheckbox%5D%3Achecked%7E.switch%2C%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel.unchecked%3E.switch+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A%0A%2F*+Hover%2C+Focus+*%2F%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3Ahover%3Einput+%7B%0A++++opacity%3A+0.04%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3Einput%3Afocus+%7B%0A++++opacity%3A+0.12%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3Ahover%3Einput%3Afocus+%7B%0A++++opacity%3A+0.16%3B%0A%7D%0A%0A%0A%2F*+Active+*%2F%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3Einput%3Aactive+%7B%0A++++opacity%3A+1%3B%0A++++transform%3A+scale%280%29%3B%0A++++transition%3A+transform+0s%2C+opacity+0s%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3Einput%3Aactive%2B.caption%3A%3Abefore+%7B%0A++++background-color%3A+var%28--wm-color-surface-tint%29%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel%3Einput%3Achecked%3Aactive%2B.caption%3A%3Abefore+%7B%0A++++background-color%3A+var%28--wm-state-primary-active%29%3B%0A%7D%0A%0A%0A%2F*+Disabled+*%2F%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel.disabled%3Einput%3Adisabled+%7B%0A++++opacity%3A+0%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel.disabled%3Einput%3Adisabled%2B.caption+%7B%0A++++color%3A+var%28--wm-color-shadow%29%3B%0A++++cursor%3A+not-allowed%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch%3Elabel.disabled%3Einput%3Adisabled%2B.caption%3A%3Abefore+%7B%0A++++background-color%3A+rgba%280%2C+0%2C+0%2C+0.38%29%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-container.icon-container+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A%0A%2F*+iOS+Switch+Styles+*%2F%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+label.unchecked%2C%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+label+%7B%0A++++position%3A+relative%3B%0A++++display%3A+inline-block%3B%0A++++cursor%3A+pointer%3B%0A++++-webkit-tap-highlight-color%3A+transparent%3B%0A++++box-shadow%3A+unset%3B%0A++++border%3A+unset%3B%0A++++height%3A+unset%3B%0A++++width%3A+unset%3B%0A++++margin-left%3A+var%28--wm-space-1%29%3B%0A++++min-height%3A+unset%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+label.unchecked+%7B%0A++++background-color%3A+%23E9E9EA+%21important%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+.caption+%7B%0A++++position%3A+relative%3B%0A++++display%3A+inline-block%3B%0A++++width%3A+46px%3B%0A++++height%3A+26px%3B%0A++++background-color%3A+%23E9E9EA%3B%0A++++border-radius%3A+23px%3B%0A++++vertical-align%3A+middle%3B%0A++++transition%3A+background-color+0.3s+ease%3B%0A++++min-height%3A+unset%3B%0A++++padding-left%3A+unset%3B%0A++++margin-top%3A+unset%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+label+.caption%3A%3Abefore+%7B%0A++++all%3A+unset%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+.caption%3A%3Aafter+%7B%0A++++content%3A+%22%22%3B%0A++++position%3A+absolute%3B%0A++++left%3A+0%3B%0A++++top%3A+2px%3B%0A++++width%3A+22px%3B%0A++++height%3A+22px%3B%0A++++background-color%3A+%23fff%3B%0A++++border-radius%3A+11px%3B%0A++++box-shadow%3A+0px+2px+1px+-1px+rgba%280%2C+0%2C+0%2C+0.2%29%2C+0px+1px+1px+0px+rgba%280%2C+0%2C+0%2C+0.14%29%2C+0px+1px+3px+0px+rgba%280%2C+0%2C+0%2C+0.12%29%3B%0A++++transform%3A+translateX%282px%29%3B%0A++++transition%3A+transform+0.3s+ease%3B%0A++++visibility%3A+visible%3B%0A++++border%3A+unset%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+input+%7B%0A++++position%3A+absolute%3B%0A++++opacity%3A+0%3B%0A++++pointer-events%3A+none%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+input%3Achecked%2B.caption+%7B%0A++++background-color%3A+%2365C466%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+input%3Adisabled+%7B%0A++++visibility%3A+hidden%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+label.disabled+%7B%0A++++cursor%3A+not-allowed%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+input%3Achecked%2B.caption%3A%3Aafter+%7B%0A++++transform%3A+translateX%2822px%29%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+input%5Btype%3Dcheckbox%5D%3Achecked%7E.switch%2C%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch%3Elabel.unchecked%3E.switch+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A.iOS-switch-wrapper+.app-container.icon-container+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A%0A%2F*+Material3+Design+Styles++*%2F%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label.unchecked%2C%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label+%7B%0A++++user-select%3A+none%3B%0A++++-webkit-tap-highlight-color%3A+transparent%3B%0A++++display%3A+block%3B%0A++++width%3A+50px%3B%0A++++min-height%3A+32px%3B%0A++++position%3A+relative%3B%0A++++cursor%3A+pointer%3B%0A++++box-shadow%3A+unset%3B%0A++++background-color%3A+unset%3B%0A++++border%3A+unset%3B%0A++++overflow%3A+visible%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label.unchecked.disabled+.caption%3A%3Abefore+%7B%0A++++opacity%3A+0.38%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label+.caption+%7B%0A++++position%3A+absolute%3B%0A++++inset%3A+0%3B%0A++++cursor%3A+pointer%3B%0A++++border%3A+2px+solid+var%28--wm-color-outline%29%3B%0A++++background-color%3A+var%28--wm-color-surface-container-highest%29%3B%0A++++border-radius%3A+28px%3B%0A++++visibility%3A+visible%3B%0A++++color%3A+transparent%3B%0A++++margin-top%3A+var%28--wm-space-0%29%3B%0A++++padding-left%3A+unset%3B%0A++++min-height%3A+unset%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label+.caption%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A++++position%3A+absolute%3B%0A++++width%3A+16px%3B%0A++++height%3A+16px%3B%0A++++left%3A+0px%3B%0A++++top%3A+0px%3B%0A++++background-color%3A+var%28--wm-color-outline%29%3B%0A++++border-radius%3A+28px%3B%0A++++margin%3A+6px%3B%0A++++transition%3A+0.25s+ease-in%3B%0A++++visibility%3A+visible%3B%0A++++z-index%3A+1%3B%0A++++border%3A+unset%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch.icon.unselected-icon+label+.caption%3A%3Abefore+%7B%0A++++width%3A+16px%3B%0A++++height%3A+16px%3B%0A++++margin%3A+6px%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch.unselected-icon+label+input%3Achecked%2B.caption%3A%3Abefore%2C%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label+input%3Achecked%2B.caption%3A%3Abefore+%7B%0A++++width%3A+24px%3B%0A++++height%3A+24px%3B%0A++++left%3A+calc%28100%25+-+28px%29%3B%0A++++background-color%3A+var%28--wm-color-on-primary%29%3B%0A++++margin%3A+2px%3B%0A++++border-color%3A+transparent%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch.icon+label+.caption%3A%3Abefore+%7B%0A++++width%3A+24px%3B%0A++++height%3A+24px%3B%0A++++margin%3A+2px%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Achecked%2Bspan.caption+%7B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A++++border%3A+2px+solid+var%28--wm-color-surface-tint%29%3B%0A%7D%0A%0A.app-composite-widget%3Ahas%28%5Bdisabled%3D%22true%22%5D%29%3Ahas%28.checkbox.app-toggle.filled-switch%29+%7B%0A++++opacity%3A+1%3B%0A%7D%0A%0A.app-composite-widget%3Ahas%28%5Bdisabled%3D%22true%22%5D%29%3Ahas%28.checkbox.app-toggle.filled-switch%29+.control-label+%7B%0A++++opacity%3A+0.38%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label+.caption%3A%3Aafter+%7B%0A++++all%3A+unset%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+input%5Btype%3Dcheckbox%5D%3Achecked%7E.switch%2C%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch%3Elabel.unchecked%3E.switch+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch%3Elabel%3Einput%5Btype%3D%22checkbox%22%5D%3Adisabled%2Bspan.caption+%7B%0A++++border-color%3A+var%28--wm-state-opacity-focus%29%3B%0A++++background-color%3A+var%28--wm-state-on-surface-focus%29%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label+input%5Btype%3D%22checkbox%22%5D%3Ais%28%3Achecked%29%3Adisabled%2B.caption%3A%3Abefore+%7B%0A++++background-color%3A+var%28--wm-color-surface-bright%29%3B%0A++++color%3A+%23D3D3D3%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label.unchecked.disabled+input%3Adisabled+.caption+%7B%0A++++border-color%3A+var%28--wm-state-surface-variant-focus%29%3B%0A%7D%0A%0A.filled-switch-wrapper+%7B%0A++++position%3A+relative%3B%0A++++width%3A+max-content%3B%0A++++margin%3A+8px+4px%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label%3Einput+%7B%0A++++-webkit-appearance%3A+none%3B%0A++++z-index%3A+1%3B%0A++++position%3A+absolute%3B%0A++++left%3A+-4px%3B%0A++++top%3A+-4px%3B%0A++++display%3A+block%3B%0A++++margin%3A+0%3B%0A++++border-radius%3A+50%25%3B%0A++++width%3A+40px%3B%0A++++height%3A+40px%3B%0A++++background-color%3A+var%28--wm-color-on-background%29%3B%0A++++box-shadow%3A+none%3B%0A++++outline%3A+none%3B%0A++++opacity%3A+0%3B%0A++++transform%3A+scale%281%29%3B%0A++++overflow%3A+visible%3B%0A++++pointer-events%3A+none%3B%0A++++transition%3A+opacity+0.3s%2C+transform+0.25s%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label%3Ahover%3Einput%3Ahover+%7B%0A++++opacity%3A+0.08%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label%3Anot%28.disabled%29%3Ahover%3Einput%3Ahover%2Bspan.caption%3A%3Abefore+%7B%0A++++background-color%3A+var%28--wm-color-on-surface-variant%29%3B%0A%7D%0A%0A%0A%2F*+check+active+state*%2F%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label%3Ahover%3Einput%3Achecked%3Ahover%2Bspan.caption%3A%3Abefore+%7B%0A++++background%3A+var%28--wm-color-primary-container%29%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label%3Einput%3Achecked+%7B%0A++++left%3A+unset%3B%0A++++right%3A+-4px%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label%3Ahover%3Einput%3Achecked+%7B%0A++++background%3A+var%28--wm-color-surface-tint%29%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label%3Ahover%3Einput%3Afocus+%7B%0A++++opacity%3A+0.12%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label%3Ahover%3Einput%3Achecked%3Ahover+%7B%0A++++opacity%3A+0.16%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label.disabled%3Ahover%3Einput%3Ahover+%7B%0A++++opacity%3A+0%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label.disabled%3Espan.caption+%7B%0A++++cursor%3A+not-allowed%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-checkbox.checkbox.filled-switch+label+input%3Afocus+%7B%0A++++outline%3A+unset+%21important%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-container.icon-container+%7B%0A++++position%3A+absolute%3B%0A++++top%3A+0px%3B%0A++++left%3A+0px%3B%0A++++width%3A+100%25%3B%0A++++height%3A+calc%28100%25+-+4px%29%3B%0A++++display%3A+flex%3B%0A++++pointer-events%3A+none%3B%0A++++z-index%3A+1%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-container.icon-container+.app-icon-wrapper.start-icon+%7B%0A++++width%3A+100%25%3B%0A++++justify-content%3A+center%3B%0A++++display%3A+inline-flex+%21important%3B%0A++++align-items%3A+center%3B%0A++++height%3A+32px%3B%0A++++color%3A+var%28--wm-color-surface-container-highest%29%3B%0A++++font-size%3A+16px%3B%0A++++visibility%3A+hidden%3B%0A++++padding-left%3A+7px%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-container.icon-container+.app-icon-wrapper.start-icon+.app-icon%2C%0A.filled-switch-wrapper+.app-container.icon-container+.app-icon-wrapper.end-icon+.app-icon+%7B%0A++++padding-right%3A+var%28--wm-space-0%29%3B%0A%7D%0A%0A.filled-switch-wrapper+.app-container.icon-container+.app-icon-wrapper.end-icon+%7B%0A++++width%3A+100%25%3B%0A++++justify-content%3A+right%3B%0A++++display%3A+inline-flex%3B%0A++++padding-right%3A+9px%3B%0A++++height%3A+34px%3B%0A++++color%3A+var%28--wm-color-surface-tint%29%3B%0A++++visibility%3A+hidden%3B%0A++++align-items%3A+center%3B%0A%7D%0A%0A.filled-switch-wrapper+input%5Btype%3D%22checkbox%22%5D%3Achecked%7E.app-container.icon-container+%7B%0A++++visibility%3A+visible%3B%0A%7D%0A%0A.filled-switch-wrapper%3Ahas%28.app-toggle.checkbox.filled-switch.icon%29+.app-container.icon-container+%7B%0A++++display%3A+flex+%21important%3B%0A%7D%0A%0A.filled-switch-wrapper%3Ahas%28.app-toggle.checkbox.filled-switch%29+.app-container.icon-container+%7B%0A++++display%3A+none+%21important%3B%0A%7D%0A%0A.filled-switch-wrapper%3Ahas%28.app-toggle.checkbox.filled-switch+label+input%5Btype%3D%22checkbox%22%5D%3Ais%28%3Achecked%29%3Adisabled%2B.caption%29+.app-container.icon-container+.app-icon-wrapper.end-icon+%7B%0A++++color%3A+var%28--wm-color-surface-container-highest%29%3B%0A%7D%0A%0A.filled-switch-wrapper%3Ahas%28.app-toggle.checkbox.filled-switch.icon-checked+label.unchecked%29+.icon-container.app-container+.app-icon-wrapper.start-icon+%7B%0A++++visibility%3A+hidden%3B%0A%7D%0A%0A.filled-switch-wrapper%3Ahas%28.app-toggle.checkbox.filled-switch+label.unchecked%29+.icon-container.app-container+.app-icon-wrapper.start-icon+%7B%0A++++visibility%3A+visible%3B%0A%7D%0A%0A.filled-switch-wrapper%3Ahas%28.app-toggle.checkbox.filled-switch+label%3Einput%3Achecked%29+.icon-container.app-container+.app-icon-wrapper.end-icon+%7B%0A++++visibility%3A+visible%3B%0A%7D%0A%0A.condensed-switch-wrapper+.app-toggle.checkbox.condensed-switch+label.disabled%2C%0A.iOS-switch-wrapper+.app-toggle.checkbox.iOS-switch+label.disabled%2C%0A.filled-switch-wrapper+.app-toggle.checkbox.filled-switch+label.disabled+%7B%0A++++opacity%3A+unset%3B%0A%7D",
5
- variables: "%7B+%7D",
6
- config: "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22switch_type%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Switch%20Type%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20style%20of%20the%20switch.%20Options%20include%20%27filled%27%2C%20%27condensed%27%2C%20and%20%27iOS%27.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Filled%22%2C%20%22Condensed%22%2C%20%22IOS%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Filled%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22state%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22State%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20whether%20the%20component%20is%20active%20or%20inactive.%20%27enabled%27%20means%20the%20component%20is%20interactive%20and%20functional%2C%20while%20%27disabled%27%20means%20it%20is%20non-interactive%20and%20inactive.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Enabled%22%2C%20%22Disabled%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Enabled%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22label_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Label%20Text%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Sets%20the%20text%20displayed%20on%20the%20label%20of%20the%20switch.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Switch%20Icons%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Enables%20or%20disables%20icon%20options%20for%20the%20switch.%20If%20true%2C%20you%20can%20select%20icons%20for%20the%20switch.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22selected_icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Selected%20Icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20icon%20to%20use%20when%20the%20switch%20is%20in%20the%20selected%20state.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22wi%20wi-check%22%2C%0A%20%20%20%20%20%20%22widget%22%20%3A%20%22select-icon%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22unselected_icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Unselected%20Icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20icon%20to%20use%20when%20the%20switch%20is%20in%20the%20unselected%20state.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22wi%20wi-clear%22%2C%0A%20%20%20%20%20%20%22widget%22%20%3A%20%22select-icon%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22selected%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Default%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20default%20value%20of%20the%20switch.%20This%20value%20is%20used%20to%20represent%20the%20state%20of%20the%20switch.%20For%20example%2C%20%27true%27%20for%20checked%20and%20%27false%27%20for%20unchecked.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22false%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22checked_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Checked%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20value%20to%20represent%20the%20switch%20when%20it%20is%20checked.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22true%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22unchecked_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Unchecked%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20value%20to%20represent%20the%20switch%20when%20it%20is%20unchecked.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22false%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22required%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Required%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Indicates%20whether%20the%20switch%20is%20required.%20Set%20to%20true%20to%20make%20it%20a%20required%20field.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%20%7D%0A%7D%0A",
2
+ "markup": "%3Cwm-custom-widget-container+name%3D%22partial1%22%3E%0A++++%3Cwm-composite+name%3D%22composite%22+required%3D%22false%22%3E%0A++++++++%3Cwm-label+class%3D%22+control-label%22+notag%3D%22true%22+name%3D%22label1%22+caption%3D%22bind%3Aprops.label_text%22%3E%3C%2Fwm-label%3E%0A++++++++%3Cwm-container+name%3D%22container1%22+class%3D%22switch-wrapper%22+conditionalclass%3D%22bind%3A%7B%27filled-switch-wrapper%27%3A+props.switch_type+%3D%3D%3D+%26quot%3BFilled%26quot%3B%2C%0A%27condensed-switch-wrapper%27%3A+props.switch_type+%3D%3D%3D+%26quot%3BCondensed%26quot%3B%2C++++%0A%27ios-switch-wrapper%27%3Aprops.switch_type++%3D%3D%3D+%26quot%3BIOS%26quot%3B%7D%22%3E%0A++++++++++++%3Cwm-checkbox+caption%3D%22Toggle%22+type%3D%22toggle%22+name%3D%22toggle%22+disabled%3D%22bind%3Aprops.state%3D%3D%26quot%3BDisabled%26quot%3B%3Ftrue%3Afalse%22+datavalue%3D%22bind%3Aprops.selected%22+class%3D%22switch%22+checkedvalue%3D%22true%22+uncheckedvalue%3D%22false%22+required%3D%22bind%3Aprops.required%22+show%3D%22true%22%3E%3C%2Fwm-checkbox%3E%0A++++++++++++%3Cwm-container+name%3D%22container2%22+class%3D%22icon-container%22+show%3D%22true%22%3E%0A++++++++++++++++%3Cwm-icon+name%3D%22icon1%22+iconclass%3D%22bind%3Aprops.unselected_icon%22+show%3D%22bind%3Aprops.unselected_icon%22+class%3D%22start-icon%22%3E%3C%2Fwm-icon%3E%0A++++++++++++++++%3Cwm-icon+name%3D%22icon2%22+iconclass%3D%22bind%3Aprops.selected_icon%22+show%3D%22bind%3Aprops.selected_icon%22+class%3D%22end-icon%22%3E%3C%2Fwm-icon%3E%0A++++++++++++%3C%2Fwm-container%3E%0A++++++++%3C%2Fwm-container%3E%0A++++%3C%2Fwm-composite%3E%0A%3C%2Fwm-custom-widget-container%3E",
3
+ "script": "%2F*%0A+*+Use+App.getDependency+for+Dependency+Injection%0A+*+Example%3A%0A+*+var+DialogService+%3D+App.getDependency%28%27DialogService%27%29%3B%0A+*%2F%0A%0AWidget.onPropertyChange+%3D+function%28propname%2C+newvalue%2C+oldvalue%29+%7B%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A++++const+%7B%0A++++++++switch_type%2C%0A++++++++icon%2C%0A++++++++unselected_icon%2C%0A++++++++required%2C%0A++++++++unchecked_value%2C%0A++++++++checked_value%2C%0A++++++++selected%0A++++%7D+%3D+Widget.props%0A++++switch+%28propname%29+%7B%0A++++++++case+%27prop-switch_type%27%3A%0A++++++++++++handleTypeChange%28switch_type%2C+icon%2C+unselected_icon%2C+widgetMap%29%3B%0A%0A++++++++++++break%3B%0A++++++++case+%27prop-required%27%3A%0A++++++++++++handleRequiredChange%28required%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-selected%27%3A%0A++++++++++++handleSelectedValueChange%28selected%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-checked_value%27%3A%0A++++++++++++handleCheckedValueChange%28checked_value%2C+selected%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-unchecked_value%27%3A%0A++++++++++++handleUnCheckedValueChange%28unchecked_value%2C+selected%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++++++case+%27prop-icon%27%3A%0A++++++++++++handleIconVisibiltyChange%28icon%2C+widgetMap%29%3B%0A++++++++++++break%3B%0A++++%7D%0A%7D%0A%0A%0A%2F*+Perform+any+action+on+widgets%2Fvariables+within+this+block+*%2F%0AWidget.onReady+%3D+function%28%29+%7B%0A++++const+widgetMap+%3D+Widget.Widgets%3B%0A++++const+%7B%0A++++++++switch_type%2C%0A++++++++icon%2C%0A++++++++unselected_icon%2C%0A++++++++required%2C%0A++++++++unchecked_value%2C%0A++++++++checked_value%2C%0A++++++++selected%0A++++%7D+%3D+Widget.props%0A++++handleTypeChange%28switch_type%2C+icon%2C+unselected_icon%2C+widgetMap%29%3B%0A++++handleRequiredChange%28required%2C+widgetMap%29%3B%0A++++handleCheckedValueChange%28checked_value%2C+selected%2C+widgetMap%29%3B%0A++++handleUnCheckedValueChange%28unchecked_value%2C+selected%2C+widgetMap%29%3B%0A++++handleSelectedValueChange%28selected%2C+widgetMap%29%3B%0A%0A%7D%0A%0Afunction+handleTypeChange%28switch_type%2C+icon%2C+unselected_icon%2C+widgetMap%29+%7B%0A++++widgetMap.toggle.nativeElement.classList.remove%28%27filled-switch%27%2C+%27icon%27%2C+%27unselected-icon%27%2C+%27condensed-switch%27%2C+%27ios-switch%27%29%0A++++%2F%2F+Set+CSS+classes+for+the+toggle+widget+based+on+the+switch+type%0A++++if+%28switch_type+%3D%3D%3D+%22Filled%22%29+%7B%0A++++++++if+%28icon.toString%28%29.toLowerCase%28%29+%3D%3D%3D+%27true%27%29+%7B%0A++++++++++++widgetMap.toggle.nativeElement.classList.add%28%27filled-switch%27%2C+%27icon%27%29%0A++++++++%7D+else+%7B%0A++++++++++++widgetMap.toggle.nativeElement.classList.add%28%27filled-switch%27%29%0A%0A++++++++%7D%0A++++++++%2F%2F+Add+%27unselected-icon%27+class+if+no+unselected_icon+is+specified%0A++++++++if+%28unselected_icon+%3D%3D+null+%7C%7C+unselected_icon+%3D%3D%3D+%22%22+%7C%7C+unselected_icon+%3D%3D%3D+%22+%22%29+%7B%0A++++++++++++widgetMap.toggle.nativeElement.classList.add%28%27filled-switch%27%2C+%27icon%27%2C+%27unselected-icon%27%29%0A%0A++++++++%7D%0A%0A++++%7D+else+if+%28switch_type+%3D%3D%3D+%22Condensed%22%29+%7B%0A++++++++%2F%2F+Add+%27condensed-switch%27+class%0A++++++++widgetMap.toggle.nativeElement.classList.add%28%27condensed-switch%27%29%0A%0A++++%7D+else+if+%28switch_type+%3D%3D%3D+%22IOS%22%29+%7B%0A++++++++%2F%2F+Add+%27iOS-switch%27+class%0A++++++++widgetMap.toggle.nativeElement.classList.add%28%27ios-switch%27%29%0A%0A++++%7D%0A%7D%0A%0Afunction+handleRequiredChange%28required%2C+widgetMap%29+%7B%0A++++%2F%2F+Set+the+%27required%27+property+for+the+composite+widget%0A++++widgetMap.composite.required+%3D+required%3B%0A%7D%0A%0A%0Afunction+handleCheckedValueChange%28checked_value%2C+selected%2C+widgetMap%29+%7B%0A++++%2F%2F+Set+the+%27checkedvalue%27+and+%27uncheckedvalue%27+properties+for+the+toggle+widget%0A++++widgetMap.toggle.checkedvalue+%3D+checked_value%3B%0A++++handleSelectedValueChange%28selected%2C+widgetMap%29%3B%0A%7D%0A%0A%0Afunction+handleIconVisibiltyChange%28icon%2C+widgetMap%29+%7B%0A++++if+%28icon.toString%28%29.toLowerCase%28%29+%3D%3D%3D+%27true%27%29+%7B%0A++++++++widgetMap.toggle.nativeElement.classList.add%28%27icon%27%29%0A%0A++++%7D+else+%7B%0A++++++++widgetMap.toggle.nativeElement.classList.remove%28%27icon%27%29%0A%0A++++%7D%0A%7D%0A%0A%0Afunction+handleUnCheckedValueChange%28unchecked_value%2C+selected%2C+widgetMap%29+%7B%0A++++widgetMap.toggle.uncheckedvalue+%3D+unchecked_value%3B%0A++++handleSelectedValueChange%28selected%2C+widgetMap%29%3B%0A%7D%0A%0Afunction+handleSelectedValueChange%28selected%2C+widgetMap%29+%7B%0A++++%2F%2F+Retrieve+the+selected+value+from+page+parameters%0A++++var+selectedValue+%3D+selected%3B%0A%0A++++%2F%2F+Determine+the+correct+%27datavalue%27+based+on+the+selected+value%0A++++if+%28selectedValue+%3D%3D%3D+widgetMap.toggle.checkedvalue%29+%7B%0A++++++++%2F%2F+If+selected+value+matches+the+checked+value%2C+set+datavalue+to+checked+value%0A++++++++widgetMap.toggle.datavalue+%3D+widgetMap.toggle.checkedvalue%3B%0A++++%7D+else+if+%28selectedValue+%3D%3D%3D+widgetMap.toggle.uncheckedvalue%29+%7B%0A++++++++%2F%2F+If+selected+value+matches+the+unchecked+value%2C+set+datavalue+to+unchecked+value%0A++++++++widgetMap.toggle.datavalue+%3D+widgetMap.toggle.uncheckedvalue%3B%0A++++%7D+else+%7B%0A++++++++%2F%2F+Log+a+warning+if+the+selected+value+does+not+match+known+values%0A++++++++console.warn%28%27Selected+value+does+not+match+any+known+value%27%29%3B%0A++++++++%2F%2F+Optionally+set+to+a+default+value+or+handle+the+error%0A++++++++widgetMap.toggle.datavalue+%3D+widgetMap.toggle.uncheckedvalue%3B+%2F%2F+Default+to+unchecked%0A++++%7D%0A%0A%7D",
4
+ "styles": ".switch-wrapper+%7B%0A++++--wm-switch-padding%3A+2px+8px%3B%0A++++--wm-switch-active-padding%3A+2px+4px%3B%0A++++--wm-switch-height%3A+32px%3B%0A++++--wm-switch-width%3A+52px%3B%0A++++--wm-switch-background%3A+var%28--wm-color-surface-container-highest%29%3B%0A++++--wm-switch-border-color%3A+var%28--wm-color-outline%29%3B%0A++++--wm-switch-active-background%3A+var%28--wm-color-primary%29%3B%0A++++--wm-switch-active-border-color%3A+var%28--wm-color-surface-tint%29%3B%0A++++--wm-switch-border-style%3A+solid%3B%0A++++--wm-switch-border-width%3A+2px%3B%0A++++--wm-switch-border-radius%3A+100px%3B%0A++++--wm-switch-caption-border-radius%3A+24px%3B%0A++++--wm-switch-caption-width%3A+var%28--wm-space-3%29%3B%0A++++--wm-switch-caption-height%3A+var%28--wm-space-3%29%3B%0A++++--wm-switch-caption-background%3A+var%28--wm-color-outline%29%3B%0A++++--wm-switch-caption-active-background%3A+var%28--wm-color-on-primary%29%3B%0A++++--wm-switch-tranistion%3A+0.25s+ease-in%3B%0A++++--wm-switch-caption-icon-width%3A+calc%28var%28--wm-switch-height%29+-+var%28--wm-space-2%29%29%3B%0A++++--wm-switch-caption-icon-height%3A+calc%28var%28--wm-switch-height%29+-+var%28--wm-space-2%29%29%3B%0A++++--wm-switch-caption-icon-size%3A+16px%3B%0A++++--wm-switch-caption-state-layer-color%3A+var%28--wm-color-on-surface%29%3B%0A++++--wm-condensed-switch-height%3A+14px%3B%0A++++--wm-condensed-switch-width%3A+34px%3B%0A++++--wm-condensed-switch-background%3A+var%28--wm-color-outline%29%3B%0A++++--wm-condensed-switch-caption-background%3A+var%28--wm-color-on-primary%29%3B%0A++++--wm-condensed-switch-active-background%3A+var%28--wm-color-primary-active%29%3B%0A++++--wm-condensed-switch-caption-active-background%3A+var%28--wm-color-primary%29%3B%0A++++--wm-condensed-switch-caption-border-radius%3A+24px%3B%0A++++--wm-condensed-switch-caption-icon-width%3A+var%28--wm-space-5%29%3B%0A++++--wm-condensed-switch-caption-icon-height%3A+var%28--wm-space-5%29%3B%0A++++--wm-ios-switch-padding%3A+2px+2px%3B%0A++++--wm-ios-switch-active-padding%3A+2px+2px%3B%0A++++--wm-ios-switch-height%3A+26px%3B%0A++++--wm-ios-switch-width%3A+42px%3B%0A++++--wm-ios-switch-background%3A+%23E9E9EA%3B%0A++++--wm-ios-switch-border-color%3A+var%28--wm-color-outline%29%3B%0A++++--wm-ios-switch-active-background%3A+%2365C466%3B%0A++++--wm-ios-switch-border-radius%3A+100px%3B%0A++++--wm-ios-switch-caption-border-radius%3A+24px%3B%0A++++--wm-ios-switch-caption-width%3A+22px%3B%0A++++--wm-ios-switch-caption-height%3A+22px%3B%0A++++--wm-ios-switch-caption-background%3A+var%28--wm-color-on-primary%29%3B%0A++++--wm-ios-switch-caption-active-background%3A+var%28--wm-color-on-primary%29%3B%0A++++--wm-ios-switch-tranistion%3A+0.25s+ease-in%3B%0A++++--wm-ios-switch-caption-icon-width%3A+22px%3B%0A++++--wm-ios-switch-caption-icon-height%3A+22px%3B%0A++++--wm-ios-switch-caption-icon-size%3A+16px%3B%0A%7D%0A%0A.switch-wrapper+.app-checkbox%2C%0A.condensed-switch-wrapper+.app-checkbox%2C%0A.ios-switch-wrapper+.app-checkbox+%7B%0A++++margin%3A+0px%3B%0A%7D%0A%0A.switch-wrapper+%7B%0A++++margin%3A+8px%3B%0A%7D%0A%0A.switch-wrapper+.switch+label+input%5Btype%3D%22checkbox%22%5D%2C%0A.switch-wrapper+.switch+label+span.caption%2C%0A.switch-wrapper+.switch+label+span.caption%3A%3Abefore+%7B%0A++++display%3A+none%3B%0A%7D%0A%0A.switch-wrapper+.switch+label+%7B%0A++++cursor%3A+pointer%3B%0A++++border%3A+var%28--wm-switch-border-width%29+var%28--wm-switch-border-style%29+var%28--wm-switch-border-color%29%3B%0A++++background%3A+var%28--wm-switch-background%29%3B%0A++++border-radius%3A+var%28--wm-switch-border-radius%29%3B%0A++++padding%3A+var%28--wm-switch-padding%29%3B%0A++++height%3A+var%28--wm-switch-height%29%3B%0A++++min-height%3A+var%28--wm-switch-height%29%3B%0A++++width%3A+var%28--wm-switch-width%29%3B%0A++++user-select%3A+none%3B%0A++++-webkit-tap-highlight-color%3A+transparent%3B%0A++++display%3A+block%3B%0A++++position%3A+relative%3B%0A++++box-shadow%3A+unset%3B%0A++++overflow%3A+visible%3B%0A++++margin-block%3A+8px%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.switch+label+%7B%0A++++border%3A+var%28--wm-switch-border-width%29+var%28--wm-switch-border-style%29+var%28--wm-switch-active-background%29%3B%0A++++background%3A+var%28--wm-switch-active-background%29%3B%0A++++padding%3A+var%28--wm-switch-active-padding%29%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch.icon%29+.switch+label+%7B%0A++++padding%3A+0px%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+%7B%0A++++background%3A+transparent%3B%0A++++border-radius%3A+var%28--wm-switch-border-radius%29%3B%0A++++width%3A+var%28--wm-switch-caption-width%29%3B%0A++++height%3A+var%28--wm-switch-caption-height%29%3B%0A++++min-height%3A+var%28--wm-switch-caption-height%29%3B%0A++++position%3A+absolute%3B%0A++++left%3A+4px%3B%0A++++top%3A+18px%3B%0A++++display%3A+flex%3B%0A++++justify-content%3A+space-between%3B%0A++++align-items%3A+center%3B%0A++++z-index%3A+1%3B%0A++++pointer-events%3A+none%3B%0A++++padding%3A+0px%3B%0A++++transition%3A+transform+0.3s+ease%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container%2C%0A.switch-wrapper%3Ahas%28.switch.icon%29+.icon-container%2C%0A.switch-wrapper%3Ahas%28.switch.icon%29+.icon-container+%7B%0A++++top%3A+12px%3B%0A++++left%3A+4px%3B%0A++++width%3A+var%28--wm-switch-caption-icon-width%29%3B%0A++++height%3A+var%28--wm-switch-caption-icon-height%29%3B%0A++++font-size%3A+var%28--wm-switch-caption-icon-size%29%3B%0A++++max-width%3A+var%28--wm-switch-caption-icon-width%29%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+%7B%0A++++transform%3A+translateX%28calc%28var%28--wm-switch-width%29+-+var%28--wm-switch-caption-width%29+-+20px%29%29%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.start-icon%2C%0A.switch-wrapper+.icon-container+.end-icon+%7B%0A++++background%3A+var%28--wm-switch-caption-background%29%3B%0A++++border-radius%3A+var%28--wm-switch-caption-border-radius%29%3B%0A++++display%3A+none%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+.start-icon%2C%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+.end-icon+%7B%0A++++background%3A+var%28--wm-switch-caption-active-background%29%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.start-icon%2C%0A.switch-wrapper+.icon-container+.end-icon+%7B%0A++++width%3A+100%25%3B%0A++++height%3A+100%25%3B%0A++++min-height%3A+100%25%3B%0A++++min-width%3A+100%25%3B%0A++++color%3A+var%28--wm-switch-background%29%3B%0A++++overflow%3A+visible%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.start-icon+.app-icon%2C%0A.switch-wrapper+.icon-container+.end-icon+.app-icon+%7B%0A++++font-size%3A+var%28--wm-switch-caption-icon-size%29%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+span.end-icon%5Bhidden%5D+%7B%0A++++display%3A+block+%21important%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.end-icon+.app-icon+%7B%0A++++color%3A+var%28--wm-switch-active-background%29%3B%0A%7D%0A%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label.unchecked%29+.icon-container.app-container+.app-icon-wrapper.start-icon%2C%0A.switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container.app-container+.app-icon-wrapper.end-icon+%7B%0A++++display%3A+block+%21important%3B%0A%7D%0A%0A.switch-wrapper+.icon-container+.start-icon+.switch-wrapper+%7B%0A++++position%3A+relative%3B%0A%7D%0A%0A.switch-wrapper%3Anot%28%3Ahas%28.icon%29%29+.icon-container+.start-icon+.app-icon%3A%3Abefore%2C%0A.switch-wrapper%3Anot%28%3Ahas%28.icon%29%29+.icon-container+.end-icon+.app-icon%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A%7D%0A%0A.switch-wrapper+.icon-container%3A%3Abefore+%7B%0A++++-webkit-appearance%3A+none%3B%0A++++z-index%3A+1%3B%0A++++position%3A+absolute%3B%0A++++content%3A+%22%22%3B%0A++++left%3A+-8px%3B%0A++++top%3A+-8px%3B%0A++++border-radius%3A+50%25%3B%0A++++width%3A+calc%28100%25+%2B+16px%29%3B%0A++++height%3A+calc%28100%25+%2B+16px%29%3B%0A++++background%3A+var%28--wm-switch-caption-state-layer-color%29%3B%0A++++box-shadow%3A+none%3B%0A++++outline%3A+none%3B%0A++++opacity%3A+0%3B%0A++++transform%3A+scale%281%29%3B%0A++++pointer-events%3A+none%3B%0A%7D%0A%0A.switch-wrapper%3Ahover+.icon-container%3A%3Abefore+%7B%0A++++opacity%3A+var%28--wm-opacity-hover%29%3B%0A%7D%0A%0A.switch-wrapper%3Afocus+.icon-container%3A%3Abefore+%7B%0A++++opacity%3A+var%28--wm-opacity-focus%29%3B%0A%7D%0A%0A.switch-wrapper%3Aactive+.icon-container%3A%3Abefore+%7B%0A++++opacity%3A+var%28--wm-opacity-focus%29%3B%0A%7D%0A%0A%0A%2F*+condensed+styles+*%2F%0A%0A.condensed-switch-wrapper+%7B%0A++++--wm-switch-background%3A+var%28--wm-condensed-switch-background%29%3B%0A++++--wm-switch-caption-icon-width%3A+var%28--wm-condensed-switch-caption-icon-width%29%3B%0A++++--wm-switch-caption-icon-height%3A+var%28--wm-condensed-switch-caption-icon-height%29%3B%0A++++--wm-switch-caption-width%3A+var%28--wm-condensed-switch-caption-icon-width%29%3B%0A++++--wm-switch-caption-height%3A+var%28--wm-condensed-switch-caption-icon-height%29%3B%0A++++--wm-switch-caption-icon-size%3A+var%28--wm-condensed-switch-caption-icon-size%29%3B%0A++++--wm-switch-height%3A+var%28--wm-condensed-switch-height%29%3B%0A++++--wm-switch-width%3A+var%28--wm-condensed-switch-width%29%3B%0A++++--wm-switch-active-background%3A+var%28--wm-condensed-switch-active-background%29%3B%0A++++--wm-switch-caption-background%3A+var%28--wm-condensed-switch-caption-background%29%3B%0A++++--wm-switch-caption-border-radius%3A+var%28--wm-condensed-switch-caption-border-radius%29%3B%0A%7D%0A%0A.condensed-switch-wrapper+.condensed-switch+label%2C%0A.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.condensed-switch+label%3Einput%3Achecked%29+.condensed-switch+label+%7B%0A++++border%3A+0px%3B%0A%7D%0A%0A.condensed-switch-wrapper+.icon-container+%7B%0A++++left%3A+-4px%3B%0A++++top%3A+5px%3B%0A%7D%0A%0A.switch-wrapper.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container%2C%0A.switch-wrapper.condensed-switch-wrapper%3Ahas%28.switch.icon%29+.icon-container%2C%0A.switch-wrapper.condensed-switch-wrapper%3Ahas%28.switch.icon%29+.icon-container+%7B%0A++++top%3A+5px%3B%0A++++left%3A+-4px%3B%0A%7D%0A%0A.switch-wrapper.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+%7B%0A++++transform%3A+translateX%28calc%28var%28--wm-condensed-switch-width%29+-+var%28--wm-condensed-switch-caption-icon-width%29+%2B+8px%29%29%3B%0A%7D%0A%0A.condensed-switch-wrapper+.icon-container+.start-icon+.app-icon%3A%3Abefore%2C%0A.condensed-switch-wrapper+.icon-container+.end-icon+.app-icon%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A%7D%0A%0A.condensed-switch-wrapper+.icon-container+.start-icon%2C%0A.condensed-switch-wrapper+.icon-container+.end-icon+%7B%0A++++background%3A+var%28--wm-condensed-switch-caption-background%29%3B%0A++++border-radius%3A+var%28--wm-condensed-switch-caption-border-radius%29%3B%0A++++display%3A+none%3B%0A++++box-shadow%3A+0px+2px+1px+-1px+rgba%280%2C+0%2C+0%2C+0.2%29%2C+0px+1px+1px+0px+rgba%280%2C+0%2C+0%2C+0.14%29%3B%0A%7D%0A%0A.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.condensed-switch+label%3Einput%3Achecked%29+.icon-container+.start-icon%2C%0A.condensed-switch-wrapper%3Ahas%28.app-toggle.checkbox.condensed-switch+label%3Einput%3Achecked%29+.icon-container+.end-icon+%7B%0A++++background%3A+var%28--wm-condensed-switch-caption-active-background%29%3B%0A%7D%0A%0A%0A%2F*+ios+styles+*%2F%0A%0A.ios-switch-wrapper+%7B%0A++++--wm-switch-background%3A+var%28--wm-ios-switch-background%29%3B%0A++++--wm-switch-border-radius%3A+var%28--wm-ios-switch-border-radius%29%3B%0A++++--wm-switch-padding%3A+var%28--wm-ios-switch-padding%29%3B%0A++++--wm-switch-height%3A+var%28--wm-ios-switch-height%29%3B%0A++++--wm-switch-width%3A+var%28--wm-ios-switch-width%29%3B%0A++++--wm-switch-active-background%3A+var%28--wm-ios-switch-active-background%29%3B%0A++++--wm-switch-active-padding%3A+var%28--wm-ios-switch-active-padding%29%3B%0A++++--wm-switch-caption-background%3A+var%28--wm-ios-switch-caption-background%29%3B%0A++++--wm-switch-caption-border-radius%3A+var%28--wm-ios-switch-caption-border-radius%29%3B%0A++++--wm-switch-caption-height%3A+var%28--wm-ios-switch-caption-height%29%3B%0A++++--wm-switch-caption-width%3A+var%28--wm-ios-switch-caption-width%29%3B%0A++++--wm-switch-caption-icon-height%3A+var%28--wm-ios-switch-caption-height%29%3B%0A++++--wm-switch-caption-icon-width%3A+var%28--wm-ios-switch-caption-width%29%3B%0A++++--wm-switch-caption-active-background%3A+var%28--wm-ios-switch-caption-active-background%29%3B%0A%7D%0A%0A.ios-switch-wrapper+.ios-switch+label%2C%0A.ios-switch-wrapper%3Ahas%28.app-toggle.checkbox.ios-switch+label%3Einput%3Achecked%29+.ios-switch+label+%7B%0A++++border%3A+0px%3B%0A%7D%0A%0A.ios-switch-wrapper%3Ahas%28.app-toggle.checkbox.ios-switch.icon%29+.ios-switch+label+%7B%0A++++padding%3A+0px%3B%0A%7D%0A%0A.ios-switch-wrapper.switch-wrapper+.icon-container%2C%0A.switch-wrapper.ios-switch-wrapper%3Ahas%28.switch.icon%29+.icon-container%2C%0A.switch-wrapper.ios-switch-wrapper%3Ahas%28.switch.icon%29+.icon-container+%7B%0A++++top%3A+10px%3B%0A++++left%3A+2px%3B%0A%7D%0A%0A.ios-switch-wrapper%3Ahas%28.app-toggle.checkbox.switch+label%3Einput%3Achecked%29+.icon-container+%7B%0A++++top%3A+10px%3B%0A++++transform%3A+translateX%28calc%28var%28--wm-switch-width%29+-+var%28--wm-switch-caption-width%29+-+6px%29%29%3B%0A%7D%0A%0A.ios-switch-wrapper+.icon-container+.start-icon+.app-icon%3A%3Abefore%2C%0A.ios-switch-wrapper+.icon-container+.end-icon+.app-icon%3A%3Abefore+%7B%0A++++content%3A+%22%22%3B%0A%7D",
5
+ "variables": "%7B+%7D",
6
+ "config": "%7B%0A%20%20%22widgetType%22%20%3A%20%22wm-custom-widget%22%2C%0A%20%20%22properties%22%20%3A%20%7B%0A%20%20%20%20%22switch_type%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Switch%20Type%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20style%20of%20the%20switch.%20Options%20include%20%27filled%27%2C%20%27condensed%27%2C%20and%20%27iOS%27.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Filled%22%2C%20%22Condensed%22%2C%20%22IOS%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Filled%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22state%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22list%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22State%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20whether%20the%20component%20is%20active%20or%20inactive.%20%27enabled%27%20means%20the%20component%20is%20interactive%20and%20functional%2C%20while%20%27disabled%27%20means%20it%20is%20non-interactive%20and%20inactive.%22%2C%0A%20%20%20%20%20%20%22options%22%20%3A%20%5B%20%22Enabled%22%2C%20%22Disabled%22%20%5D%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22Enabled%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22label_text%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Label%20Text%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Sets%20the%20text%20displayed%20on%20the%20label%20of%20the%20switch.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Switch%20Icons%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Enables%20or%20disables%20icon%20options%20for%20the%20switch.%20If%20true%2C%20you%20can%20select%20icons%20for%20the%20switch.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22selected_icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Selected%20Icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20icon%20to%20use%20when%20the%20switch%20is%20in%20the%20selected%20state.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22wi%20wi-check%22%2C%0A%20%20%20%20%20%20%22widget%22%20%3A%20%22select-icon%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22unselected_icon%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Unselected%20Icon%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20icon%20to%20use%20when%20the%20switch%20is%20in%20the%20unselected%20state.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22wi%20wi-clear%22%2C%0A%20%20%20%20%20%20%22widget%22%20%3A%20%22select-icon%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22selected%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Default%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20default%20value%20of%20the%20switch.%20This%20value%20is%20used%20to%20represent%20the%20state%20of%20the%20switch.%20For%20example%2C%20%27true%27%20for%20checked%20and%20%27false%27%20for%20unchecked.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22false%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22checked_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Checked%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20value%20to%20represent%20the%20switch%20when%20it%20is%20checked.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22true%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22unchecked_value%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22string%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Unchecked%20Value%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Specifies%20the%20value%20to%20represent%20the%20switch%20when%20it%20is%20unchecked.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20%22false%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%22required%22%20%3A%20%7B%0A%20%20%20%20%20%20%22type%22%20%3A%20%22boolean%22%2C%0A%20%20%20%20%20%20%22displayName%22%20%3A%20%22Required%22%2C%0A%20%20%20%20%20%20%22description%22%20%3A%20%22Indicates%20whether%20the%20switch%20is%20required.%20Set%20to%20true%20to%20make%20it%20a%20required%20field.%22%2C%0A%20%20%20%20%20%20%22value%22%20%3A%20false%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%22events%22%20%3A%20%7B%20%7D%0A%7D%0A"
7
7
  };
@@ -0,0 +1,6 @@
1
+ declare function handleTypeChange(switch_type: any, icon: any, unselected_icon: any, widgetMap: any): void;
2
+ declare function handleRequiredChange(required: any, widgetMap: any): void;
3
+ declare function handleCheckedValueChange(checked_value: any, selected: any, widgetMap: any): void;
4
+ declare function handleIconVisibiltyChange(icon: any, widgetMap: any): void;
5
+ declare function handleUnCheckedValueChange(unchecked_value: any, selected: any, widgetMap: any): void;
6
+ declare function handleSelectedValueChange(selected: any, widgetMap: any): void;
@@ -1,33 +1,103 @@
1
1
  /*
2
2
  * Use App.getDependency for Dependency Injection
3
- * eg: var DialogService = App.getDependency('DialogService');
3
+ * Example:
4
+ * var DialogService = App.getDependency('DialogService');
4
5
  */
5
- /* perform any action on widgets/variables within this block */
6
+ Widget.onPropertyChange = function (propname, newvalue, oldvalue) {
7
+ var widgetMap = Widget.Widgets;
8
+ var _a = Widget.props, switch_type = _a.switch_type, icon = _a.icon, unselected_icon = _a.unselected_icon, required = _a.required, unchecked_value = _a.unchecked_value, checked_value = _a.checked_value, selected = _a.selected;
9
+ switch (propname) {
10
+ case 'prop-switch_type':
11
+ handleTypeChange(switch_type, icon, unselected_icon, widgetMap);
12
+ break;
13
+ case 'prop-required':
14
+ handleRequiredChange(required, widgetMap);
15
+ break;
16
+ case 'prop-selected':
17
+ handleSelectedValueChange(selected, widgetMap);
18
+ break;
19
+ case 'prop-checked_value':
20
+ handleCheckedValueChange(checked_value, selected, widgetMap);
21
+ break;
22
+ case 'prop-unchecked_value':
23
+ handleUnCheckedValueChange(unchecked_value, selected, widgetMap);
24
+ break;
25
+ case 'prop-icon':
26
+ handleIconVisibiltyChange(icon, widgetMap);
27
+ break;
28
+ }
29
+ };
30
+ /* Perform any action on widgets/variables within this block */
6
31
  Widget.onReady = function () {
7
- /*
8
- * variables can be accessed through 'Widget.Variables' property here
9
- * e.g. to get dataSet in a staticVariable named 'loggedInUser' use following script
10
- * Widget.Variables.loggedInUser.getData()
11
- *
12
- * widgets can be accessed through 'Widget.Widgets' property here
13
- * e.g. to get value of text widget named 'username' use following script
14
- * 'Widget.Widgets.username.datavalue'
15
- */
16
- if (Widget.props.switch_type === "filled") {
17
- if (Widget.props.icon === "icon") {
18
- Widget.Widgets.toggle.class += ' filled-switch icon';
19
- }
20
- else if (Widget.props.icon === "icon-checked") {
21
- Widget.Widgets.toggle.class += ' filled-switch icon-checked';
32
+ var widgetMap = Widget.Widgets;
33
+ var _a = Widget.props, switch_type = _a.switch_type, icon = _a.icon, unselected_icon = _a.unselected_icon, required = _a.required, unchecked_value = _a.unchecked_value, checked_value = _a.checked_value, selected = _a.selected;
34
+ handleTypeChange(switch_type, icon, unselected_icon, widgetMap);
35
+ handleRequiredChange(required, widgetMap);
36
+ handleCheckedValueChange(checked_value, selected, widgetMap);
37
+ handleUnCheckedValueChange(unchecked_value, selected, widgetMap);
38
+ handleSelectedValueChange(selected, widgetMap);
39
+ };
40
+ function handleTypeChange(switch_type, icon, unselected_icon, widgetMap) {
41
+ widgetMap.toggle.nativeElement.classList.remove('filled-switch', 'icon', 'unselected-icon', 'condensed-switch', 'ios-switch');
42
+ // Set CSS classes for the toggle widget based on the switch type
43
+ if (switch_type === "Filled") {
44
+ if (icon.toString().toLowerCase() === 'true') {
45
+ widgetMap.toggle.nativeElement.classList.add('filled-switch', 'icon');
22
46
  }
23
47
  else {
24
- Widget.Widgets.toggle.class += ' filled-switch';
48
+ widgetMap.toggle.nativeElement.classList.add('filled-switch');
49
+ }
50
+ // Add 'unselected-icon' class if no unselected_icon is specified
51
+ if (unselected_icon == null || unselected_icon === "" || unselected_icon === " ") {
52
+ widgetMap.toggle.nativeElement.classList.add('filled-switch', 'icon', 'unselected-icon');
25
53
  }
26
54
  }
27
- else if (Widget.props.switch_type === "condensed") {
28
- Widget.Widgets.toggle.class += ' condensed-switch';
55
+ else if (switch_type === "Condensed") {
56
+ // Add 'condensed-switch' class
57
+ widgetMap.toggle.nativeElement.classList.add('condensed-switch');
29
58
  }
30
- else if (Widget.props.switch_type === "iOS") {
31
- Widget.Widgets.toggle.class += ' iOS-switch';
59
+ else if (switch_type === "IOS") {
60
+ // Add 'iOS-switch' class
61
+ widgetMap.toggle.nativeElement.classList.add('ios-switch');
32
62
  }
33
- };
63
+ }
64
+ function handleRequiredChange(required, widgetMap) {
65
+ // Set the 'required' property for the composite widget
66
+ widgetMap.composite.required = required;
67
+ }
68
+ function handleCheckedValueChange(checked_value, selected, widgetMap) {
69
+ // Set the 'checkedvalue' and 'uncheckedvalue' properties for the toggle widget
70
+ widgetMap.toggle.checkedvalue = checked_value;
71
+ handleSelectedValueChange(selected, widgetMap);
72
+ }
73
+ function handleIconVisibiltyChange(icon, widgetMap) {
74
+ if (icon.toString().toLowerCase() === 'true') {
75
+ widgetMap.toggle.nativeElement.classList.add('icon');
76
+ }
77
+ else {
78
+ widgetMap.toggle.nativeElement.classList.remove('icon');
79
+ }
80
+ }
81
+ function handleUnCheckedValueChange(unchecked_value, selected, widgetMap) {
82
+ widgetMap.toggle.uncheckedvalue = unchecked_value;
83
+ handleSelectedValueChange(selected, widgetMap);
84
+ }
85
+ function handleSelectedValueChange(selected, widgetMap) {
86
+ // Retrieve the selected value from page parameters
87
+ var selectedValue = selected;
88
+ // Determine the correct 'datavalue' based on the selected value
89
+ if (selectedValue === widgetMap.toggle.checkedvalue) {
90
+ // If selected value matches the checked value, set datavalue to checked value
91
+ widgetMap.toggle.datavalue = widgetMap.toggle.checkedvalue;
92
+ }
93
+ else if (selectedValue === widgetMap.toggle.uncheckedvalue) {
94
+ // If selected value matches the unchecked value, set datavalue to unchecked value
95
+ widgetMap.toggle.datavalue = widgetMap.toggle.uncheckedvalue;
96
+ }
97
+ else {
98
+ // Log a warning if the selected value does not match known values
99
+ console.warn('Selected value does not match any known value');
100
+ // Optionally set to a default value or handle the error
101
+ widgetMap.toggle.datavalue = widgetMap.toggle.uncheckedvalue; // Default to unchecked
102
+ }
103
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavemaker/angular-codegen",
3
- "version": "12.0.0-next.45062",
3
+ "version": "12.0.0-next.45066",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {