Skip to content

Commit 22bcf8a

Browse files
committed
chore: rename selection controls to checkbox radio selection
1 parent a6cee20 commit 22bcf8a

File tree

63 files changed

+146
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+146
-148
lines changed

packages/pluggableWidgets/selection-controls-web/CHANGELOG.md renamed to packages/pluggableWidgets/checkbox-radio-selection-web/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1010

1111
### Added
1212

13-
- Initial release of Selection Controls widget
13+
- Initial release of Checkbox Radio Selection widget
1414
- Support for radio button lists (single selection)
1515
- Support for checkbox lists (multiple selection)
1616
- Context data source support (associations)

packages/pluggableWidgets/selection-controls-web/README.md renamed to packages/pluggableWidgets/checkbox-radio-selection-web/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Selection Controls
1+
# Checkbox Radio Selection
22

33
A widget for displaying radio button lists (single selection) and checkbox lists (multiple selection) based on different data sources.
44

@@ -20,7 +20,7 @@ The widget supports various data source types:
2020

2121
## Usage
2222

23-
1. Add the Selection Controls widget to your page
23+
1. Add the Checkbox Radio Selection widget to your page
2424
2. Configure the data source (Context, Database, or Static)
2525
3. Set up caption and value attributes
2626
4. Configure selection method (single or multiple)

packages/pluggableWidgets/selection-controls-web/package.json renamed to packages/pluggableWidgets/checkbox-radio-selection-web/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@mendix/selection-controls-web",
3-
"widgetName": "SelectionControls",
2+
"name": "@mendix/checkbox-radio-selection-web",
3+
"widgetName": "CheckboxRadioSelection",
44
"version": "1.0.0",
55
"description": "Configurable radio buttons and check box widget",
66
"copyright": "© Mendix Technology BV 2025. All rights reserved.",
@@ -14,20 +14,20 @@
1414
"mendixHost": "http://localhost:8080"
1515
},
1616
"mxpackage": {
17-
"name": "SelectionControls",
17+
"name": "CheckboxRadioSelection",
1818
"type": "widget",
19-
"mpkName": "com.mendix.widget.web.SelectionControls.mpk"
19+
"mpkName": "com.mendix.widget.web.CheckboxRadioSelection.mpk"
2020
},
2121
"packagePath": "com.mendix.widget.web",
2222
"marketplace": {
2323
"minimumMXVersion": "10.7.0",
2424
"appNumber": 219304,
25-
"appName": "Selection Controls",
25+
"appName": "Checkbox Radio Selection",
2626
"reactReady": true
2727
},
2828
"testProject": {
2929
"githubUrl": "https://github.com/mendix/testProjects",
30-
"branchName": "selection-controls-web"
30+
"branchName": "checkbox-radio-selection-web"
3131
},
3232
"scripts": {
3333
"prebuild": "rui-create-translation",

packages/pluggableWidgets/selection-controls-web/src/SelectionControls.editorConfig.ts renamed to packages/pluggableWidgets/checkbox-radio-selection-web/src/CheckboxRadioSelection.editorConfig.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import {
99
text,
1010
svgImage
1111
} from "@mendix/widget-plugin-platform/preview/structure-preview-api";
12-
import { SelectionControlsPreviewProps } from "../typings/SelectionControlsProps";
12+
import { CheckboxRadioSelectionPreviewProps } from "../typings/CheckboxRadioSelectionProps";
1313
import { getCustomCaption } from "./helpers/utils";
1414
import IconRadioButtonSVG from "./assets/radiobutton.svg";
1515
import IconCheckboxSVG from "./assets/checkbox.svg";
1616

17-
const DATABASE_SOURCE_CONFIG: Array<keyof SelectionControlsPreviewProps> = [
17+
const DATABASE_SOURCE_CONFIG: Array<keyof CheckboxRadioSelectionPreviewProps> = [
1818
"optionsSourceDatabaseCaptionAttribute",
1919
"optionsSourceDatabaseCaptionExpression",
2020
"optionsSourceDatabaseCaptionType",
@@ -26,7 +26,7 @@ const DATABASE_SOURCE_CONFIG: Array<keyof SelectionControlsPreviewProps> = [
2626
"onChangeDatabaseEvent"
2727
];
2828

29-
const ASSOCIATION_SOURCE_CONFIG: Array<keyof SelectionControlsPreviewProps> = [
29+
const ASSOCIATION_SOURCE_CONFIG: Array<keyof CheckboxRadioSelectionPreviewProps> = [
3030
"optionsSourceAssociationCaptionAttribute",
3131
"optionsSourceAssociationCaptionExpression",
3232
"optionsSourceAssociationCaptionType",
@@ -36,7 +36,7 @@ const ASSOCIATION_SOURCE_CONFIG: Array<keyof SelectionControlsPreviewProps> = [
3636
];
3737

3838
export function getProperties(
39-
values: SelectionControlsPreviewProps & { Editability?: unknown },
39+
values: CheckboxRadioSelectionPreviewProps & { Editability?: unknown },
4040
defaultProperties: Properties
4141
): Properties {
4242
// Basic property hiding logic - can be expanded later
@@ -144,24 +144,24 @@ function getIconPreview(isMultiSelect: boolean): ContainerProps {
144144
);
145145
}
146146

147-
export function getPreview(values: SelectionControlsPreviewProps, isDarkMode: boolean): StructurePreviewProps {
147+
export function getPreview(values: CheckboxRadioSelectionPreviewProps, isDarkMode: boolean): StructurePreviewProps {
148148
const palette = structurePreviewPalette[isDarkMode ? "dark" : "light"];
149149
const structurePreviewChildren: StructurePreviewProps[] = [];
150-
let readOnly = values.readOnly;
150+
// let readOnly = values.readOnly;
151151

152152
// Handle custom content dropzones when enabled
153153
if (values.optionsSourceCustomContentType !== "no") {
154154
if (values.source === "context" && values.optionsSourceType === "association") {
155155
structurePreviewChildren.push(
156156
dropzone(
157-
dropzone.placeholder("Configure the selection controls: Place widgets here"),
157+
dropzone.placeholder("Configure the checkbox radio selection: Place widgets here"),
158158
dropzone.hideDataSourceHeaderIf(false)
159159
)(values.optionsSourceAssociationCustomContent)
160160
);
161161
} else if (values.source === "database") {
162162
structurePreviewChildren.push(
163163
dropzone(
164-
dropzone.placeholder("Configure the selection controls: Place widgets here"),
164+
dropzone.placeholder("Configure the checkbox radio selection: Place widgets here"),
165165
dropzone.hideDataSourceHeaderIf(false)
166166
)(values.optionsSourceDatabaseCustomContent)
167167
);
@@ -175,7 +175,7 @@ export function getPreview(values: SelectionControlsPreviewProps, isDarkMode: bo
175175
})(
176176
dropzone(
177177
dropzone.placeholder(
178-
`Configure the selection controls: Place widgets for option ${value.staticDataSourceCaption} here`
178+
`Configure the checkbox radio selection: Place widgets for option ${value.staticDataSourceCaption} here`
179179
),
180180
dropzone.hideDataSourceHeaderIf(false)
181181
)(value.staticDataSourceCustomContent)
@@ -186,9 +186,9 @@ export function getPreview(values: SelectionControlsPreviewProps, isDarkMode: bo
186186
}
187187

188188
// Handle database-specific read-only logic
189-
if (values.source === "database" && values.databaseAttributeString.length === 0) {
190-
readOnly = values.customEditability === "never";
191-
}
189+
// if (values.source === "database" && values.databaseAttributeString.length === 0) {
190+
// readOnly = values.customEditability === "never";
191+
// }
192192

193193
// If no custom content dropzones, show default preview
194194
if (structurePreviewChildren.length === 0) {

0 commit comments

Comments
 (0)