@wavemaker/custom-widgets-m3 12.0.0-next.45064 → 12.0.0-next.45067

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@wavemaker/custom-widgets-m3",
3
- "version": "12.0.0-next.45064",
3
+ "version": "12.0.0-next.45067",
4
4
  "description": "A collection of custom widgets",
5
5
  "module": "index",
6
6
  "main": "index",
7
7
  "scripts": {
8
- "build": "tsc && webpack --mode development && node ./scripts/build.js post-build",
8
+ "build:cjs": "webpack --config webpack.config.cjs.js --mode development",
9
+ "build:esm": "webpack --config webpack.config.js --mode development",
10
+ "build": "tsc && npm run build:cjs && npm run build:esm && node ./scripts/build.js post-build",
9
11
  "test": "echo \"Error: no test specified\" && exit 1"
10
12
  },
11
13
  "keywords": [
@@ -28,6 +30,7 @@
28
30
  "tar": "^6.1.0"
29
31
  },
30
32
  "exports": {
31
- ".": "./index"
33
+ "import": "./index",
34
+ "require": "./dist/custom-widgets-bundle.cjs.js"
32
35
  }
33
36
  }
@@ -8,8 +8,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
13
  function verb(n) { return function (v) { return step([n, v]); }; }
14
14
  function step(op) {
15
15
  if (f) throw new TypeError("Generator is already executing.");
@@ -65,7 +65,8 @@ function postBuild(runtimeVersion) {
65
65
  packageData.main = 'index';
66
66
  packageData.module = 'index';
67
67
  packageData.exports = {
68
- ".": "./index"
68
+ "import": "./index",
69
+ "require": "./dist/custom-widgets-bundle.cjs.js"
69
70
  };
70
71
  delete packageData['files'];
71
72
  fs.writeFileSync("".concat(projectDir, "/dist/es2015/package.json"), JSON.stringify(packageData, null, 2));
@@ -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;