@cplace/test-mcp-server 1.3.11 → 1.3.13

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.
Files changed (37) hide show
  1. package/dist/api.js +2 -2
  2. package/dist/api.js.map +1 -1
  3. package/dist/str-replace-utils.d.ts +10 -0
  4. package/dist/str-replace-utils.d.ts.map +1 -0
  5. package/dist/str-replace-utils.js +42 -0
  6. package/dist/str-replace-utils.js.map +1 -0
  7. package/dist/tools/change-listeners.d.ts +14 -0
  8. package/dist/tools/change-listeners.d.ts.map +1 -1
  9. package/dist/tools/change-listeners.js +64 -0
  10. package/dist/tools/change-listeners.js.map +1 -1
  11. package/dist/tools/layout-script.d.ts +36 -0
  12. package/dist/tools/layout-script.d.ts.map +1 -1
  13. package/dist/tools/layout-script.js +78 -0
  14. package/dist/tools/layout-script.js.map +1 -1
  15. package/dist/tools/pages.d.ts +12 -0
  16. package/dist/tools/pages.d.ts.map +1 -1
  17. package/dist/tools/pages.js +47 -0
  18. package/dist/tools/pages.js.map +1 -1
  19. package/dist/tools/richstring-widgets.d.ts +16 -8
  20. package/dist/tools/richstring-widgets.d.ts.map +1 -1
  21. package/dist/tools/richstring-widgets.js +141 -57
  22. package/dist/tools/richstring-widgets.js.map +1 -1
  23. package/dist/tools/workflow-scripts.d.ts +19 -0
  24. package/dist/tools/workflow-scripts.d.ts.map +1 -1
  25. package/dist/tools/workflow-scripts.js +88 -0
  26. package/dist/tools/workflow-scripts.js.map +1 -1
  27. package/dist/widget-specifications/DOCUMENTATION-STATUS.md +14 -11
  28. package/dist/widget-specifications/WIDGET-TAGGING-SCHEME.md +1 -0
  29. package/dist/widget-specifications/_research_from_ga_products/cf-cplace-lowCodeWidgets-lowCodeText/research.md +176 -0
  30. package/dist/widget-specifications/_research_from_ga_products/widget-definition-mapping.md +6 -5
  31. package/dist/widget-specifications/_research_from_ga_products/widget-research-generation/widgets.txt +1 -0
  32. package/dist/widget-specifications/cf.cplace.lowCodeWidgets.lowCodeButton/_overview.md +12 -0
  33. package/dist/widget-specifications/cf.cplace.lowCodeWidgets.lowCodeText/_catalog-data.json +12 -0
  34. package/dist/widget-specifications/cf.cplace.lowCodeWidgets.lowCodeText/_meta.json +11 -0
  35. package/dist/widget-specifications/cf.cplace.lowCodeWidgets.lowCodeText/_overview.md +94 -0
  36. package/dist/widget-specifications/cf.cplace.lowCodeWidgets.lowCodeText/_summary.md +1 -0
  37. package/package.json +1 -1
@@ -24,16 +24,16 @@ Each widget should have these files following the three-level architecture:
24
24
 
25
25
  | Metric | Count | Percentage |
26
26
  |--------|-------|------------|
27
- | **Total widgets in cplace** | 108 | 100% |
28
- | **Widgets with specifications** | 108 | 100% |
27
+ | **Total widgets in cplace** | 109 | 100% |
28
+ | **Widgets with specifications** | 109 | 100% |
29
29
  | **Widgets without any specs** | 0 | 0% |
30
30
 
31
- ### Documentation Completeness (of 108 documented widgets)
31
+ ### Documentation Completeness (of 109 documented widgets)
32
32
 
33
33
  | Status | Count | Percentage |
34
34
  |--------|-------|------------|
35
35
  | **Complete** | 10 | 9% |
36
- | **Partial** | 98 | 91% |
36
+ | **Partial** | 99 | 91% |
37
37
  | **Minimal (meta only)** | 0 | 0% |
38
38
 
39
39
  ---
@@ -94,6 +94,7 @@ Each widget should have these files following the three-level architecture:
94
94
  | cf.projektplanung.scheduleTreeTable | ✓ | ✓ | ✓ | ✗ | 0 | implementation |
95
95
  | cf.projektplanung.singleGanttLink | ✓ | ✓ | ✓ | ✗ | 0 | implementation |
96
96
  | cf.cplace.lowCodeWidgets.lowCodeButton | ✓ | ✓ | ✓ | ✗ | 0 | implementation |
97
+ | cf.cplace.lowCodeWidgets.lowCodeText | ✓ | ✓ | ✓ | ✗ | 0 | implementation |
97
98
  | cf.cplace.pageViewHeadline.widget | ✓ | ✓ | ✓ | ✗ | 0 | implementation |
98
99
  | cf.cplace.pdfPreview.widget | ✓ | ✓ | ✓ | ✗ | 0 | implementation |
99
100
  | cf.cplace.simpleForm.widget | ✓ | ✓ | ✓ | ✗ | 0 | implementation |
@@ -169,19 +170,19 @@ All widgets now have specification directories.
169
170
 
170
171
  ### Widgets Missing `_meta.json` (Level 1)
171
172
 
172
- All 108 documented widgets have `_meta.json` files.
173
+ All 109 documented widgets have `_meta.json` files.
173
174
 
174
175
  ### Widgets Missing `_summary.md` (Level 1)
175
176
 
176
- All 108 documented widgets now have `_summary.md` files.
177
+ All 109 documented widgets now have `_summary.md` files.
177
178
 
178
179
  ### Widgets Missing `_overview.md` (Level 2)
179
180
 
180
- All 108 documented widgets now have `_overview.md` files.
181
+ All 109 documented widgets now have `_overview.md` files.
181
182
 
182
183
  ### Widgets Missing `_implementation.md` (Level 3)
183
184
 
184
- 98 widgets need implementation guidance added:
185
+ 99 widgets need implementation guidance added:
185
186
 
186
187
  **Partial widgets:**
187
188
  - `cf.cplace.breadcrumbs.breadcrumbsWidget`
@@ -205,6 +206,7 @@ All 108 documented widgets now have `_overview.md` files.
205
206
  - `cf.cplace.landingPageFromPage.quickOverview`
206
207
  - `cf.cplace.landingPageFromPage.sessionUserNameWidget`
207
208
  - `cf.cplace.lowCodeWidgets.lowCodeButton`
209
+ - `cf.cplace.lowCodeWidgets.lowCodeText`
208
210
  - `cf.cplace.pageViewHeadline.widget`
209
211
  - `cf.cplace.pdfPreview.widget`
210
212
  - `cf.cplace.platform.tableWidget`
@@ -353,6 +355,7 @@ All widgets now have specification directories. No undocumented widgets remain.
353
355
  - `de.2lforge.curves.widget` (from undocumented)
354
356
  - `de.2lforge.toolbar.dropDownWidget` (from undocumented)
355
357
  - `cf.cplace.lowCodeWidgets.lowCodeButton`
358
+ - `cf.cplace.lowCodeWidgets.lowCodeText`
356
359
  - `cf.cplace.pageViewHeadline.widget`
357
360
  - `cf.cplace.pdfPreview.widget`
358
361
  - `cf.cplace.simpleForm.widget`
@@ -393,18 +396,18 @@ All widgets now have specification directories. No undocumented widgets remain.
393
396
  - `cf.projektplanung.ganttTaskDemo` (new - from undocumented)
394
397
  - `de.2lforge.toolbar.datePickerWidget` (new - from undocumented)
395
398
 
396
- All 108 documented widgets now have Level 1 (_meta.json, _summary.md) and Level 2 (_overview.md) documentation. 10 of these are fully Complete with Level 3 documentation.
399
+ All 109 documented widgets now have Level 1 (_meta.json, _summary.md) and Level 2 (_overview.md) documentation. 10 of these are fully Complete with Level 3 documentation.
397
400
 
398
401
  ---
399
402
 
400
403
  ## Files Missing by Type
401
404
 
402
- | File Type | Count Missing | Percentage (of 108 documented) |
405
+ | File Type | Count Missing | Percentage (of 109 documented) |
403
406
  |-----------|---------------|------------|
404
407
  | `_meta.json` | 0 | 0% |
405
408
  | `_summary.md` | 0 | 0% |
406
409
  | `_overview.md` | 0 | 0% |
407
- | `_implementation.md` | 98 | 91% |
410
+ | `_implementation.md` | 99 | 91% |
408
411
 
409
412
  ---
410
413
 
@@ -154,6 +154,7 @@ This document defines a multi-dimensional tagging system for cplace widgets. Tag
154
154
  | Widget ID | Widget Name | Tags |
155
155
  |-----------|-------------|------|
156
156
  | `cf.cplace.lowCodeWidgets.lowCodeButton` | Low-Code Button | `low-code`, `inline-edit` |
157
+ | `cf.cplace.lowCodeWidgets.lowCodeText` | Low-Code Text | `low-code`, `rich-text`, `connected`, `searchable`, `read-only`, `dashboard` |
157
158
  | `cf.cplace.simpleForm.widget` | Creation Form | `form`, `attributes`, `inline-edit` |
158
159
  | `cf.cplace.dynamicCodeBlockWidget.dynamicCodeBlockWidget` | Dynamic Code Block | `low-code`, `rich-text` |
159
160
  | `cf.cplace.tuplesWidget.widget` | Tuple | `attributes`, `table`, `time-series`, `inline-edit` |
@@ -0,0 +1,176 @@
1
+ # Low-Code Text Widget Research
2
+
3
+ ## Widget Overview
4
+
5
+ **Widget ID:** `cf.cplace.lowCodeWidgets.lowCodeText`
6
+ **Widget Name:** Low-Code Text
7
+ **Repository:** `cplace-paw`
8
+ **Definition Class:** `cf.cplace.lowCodeWidgets.script.LowCodeTextWidgetDefinition`
9
+
10
+ ### Purpose (1-2 Sentence Description)
11
+
12
+ The Low-Code Text widget executes a cplaceJS script and renders the returned string (which may contain HTML) as inline content within a rich string widget. It reactively re-evaluates its script when connected table data or selections change, enabling dynamic computed text that updates without page reload.
13
+
14
+ ---
15
+
16
+ ## Conceptual Documentation
17
+
18
+ ### Core Functionality
19
+
20
+ The Low-Code Text widget allows administrators and low-code developers to embed dynamic, script-computed content directly within rich string widgets. When the page loads, the widget evaluates a JavaScript script that has access to contextual data (pages from search, connected tables, or explicit selections) and renders the returned value as HTML text. Unlike the Low-Code Button (which executes on click), the Low-Code Text widget evaluates automatically and updates reactively when its data sources change.
21
+
22
+ ### Use Cases
23
+
24
+ #### 1. **Dynamic Computed Values in Rich Text**
25
+ Display calculated or derived information inline within formatted page content:
26
+ - Show aggregated metrics (sums, averages, counts) based on search results
27
+ - Display conditional text based on page attributes or states
28
+ - Render formatted summaries from multiple data sources
29
+
30
+ #### 2. **Reactive Dashboards with Connected Tables**
31
+ Create text content that updates when users interact with connected table widgets:
32
+ - Show details about selected table rows
33
+ - Display summary statistics that update as the table's data changes
34
+ - Render context-specific information based on table selection
35
+
36
+ #### 3. **Internationalized Dynamic Content**
37
+ Generate localized content using the `messages` binding:
38
+ - Display status messages in the user's language
39
+ - Show dynamically computed text with proper localization
40
+ - Combine static rich text layout with dynamic localized values
41
+
42
+ #### 4. **Data-Driven HTML Rendering**
43
+ Generate custom HTML markup based on page data:
44
+ - Create visual indicators (colored badges, progress bars) based on attribute values
45
+ - Render mini-tables or formatted lists from search results
46
+ - Display formatted dates, numbers, or computed expressions
47
+
48
+ ---
49
+
50
+ ## Configuration Concepts
51
+
52
+ ### Script Structure
53
+
54
+ The widget requires a cplaceJS script that returns a value to display. Unlike the Low-Code Button, the script does not need to return an object with methods -- it simply returns the text/HTML to render.
55
+
56
+ Supported return types:
57
+ - **String**: Rendered directly as HTML (sanitized via `RichStringUtilities.clean()`)
58
+ - **Number**: Converted to string
59
+ - **Boolean**: Converted to string
60
+ - **Date**: Converted to string representation
61
+ - **Localized object**: Object with language keys (e.g., `{en: "Hello", de: "Hallo"}`) -- resolved to user's language
62
+
63
+ ### Script Bindings
64
+
65
+ The script has access to the following bindings:
66
+
67
+ | Binding | Type | Description |
68
+ |---------|------|-------------|
69
+ | `pages` | `Iterable<WrappedPage>` | Pages from the configured data source (search, selection, or connected table) |
70
+ | `searchResults` | `Iterable<WrappedCustomEntity<?>>` | All search results (if "Include All Search Results" is enabled) |
71
+ | `embeddingPage` | `WrappedPage` | The page on which the widget is embedded |
72
+ | `messages` | `CplaceJSTypeMessageProvider` | Access to internationalized messages defined in the embedding page's type definition |
73
+
74
+ ### Main Configuration Options
75
+
76
+ #### 1. **Script Configuration**
77
+ - **Script**: The cplaceJS script that produces the text to display. **Required.**
78
+
79
+ #### 2. **Data Source Options**
80
+ Multiple ways to provide data to the script (same as Low-Code Button):
81
+
82
+ - **Search**: Define a search query whose results are available as the `pages` binding, with optional sort column and order
83
+ - **Connected Table**: Connect to a table widget on the same page
84
+ - **Selection Only**: Only selected rows from the table are available
85
+ - Supports nested connected tables (connected table's own connected table)
86
+ - **Selection**: Manually select specific pages to provide as the `pages` binding
87
+ - **Include All Search Results**: Provides raw search results (not just pages) in the `searchResults` binding
88
+
89
+ ### Reactive Behavior
90
+
91
+ The widget re-evaluates its script in response to connected table events:
92
+
93
+ 1. **Table data refresh**: When the connected table's data changes, the text widget re-evaluates (unless in "selection only" mode)
94
+ 2. **Row selection change**: When the user's row selection changes in the connected table (in "selection only" mode)
95
+ 3. **Nested table selection**: When a connected table's own connected table fires a selection event
96
+
97
+ Re-evaluation is performed via an AJAX POST to `EvaluateTextHandler`, which re-runs the script server-side and returns the new HTML text.
98
+
99
+ ### Embedding Constraint
100
+
101
+ This widget can **only** be embedded inside rich string widgets (`WidgetEmbedding.INSIDE_RICHSTRING`). It cannot be placed directly on a page layout. It renders without a frame and without padding, making it blend seamlessly into the surrounding rich text content.
102
+
103
+ ### Permissions and Access Control
104
+
105
+ - **Embedding Permission**: Only users with "Low-Code permission" (`GlobalPermissions.mayEditLowCode()`) can embed this widget
106
+ - **Script Editing**: The script attribute is only visible/editable to users with Low-Code permission
107
+
108
+ ### Integration with Other Widgets
109
+
110
+ The Low-Code Text widget is:
111
+ - **Embedded in**: Rich String widgets (`cf.platform.richString`) or Rich String Without Frame (`cf.cplace.demoWidgets.demoRichString`)
112
+ - **Connected to**: Embedded Search as Table widgets (to react to data/selection changes)
113
+ - **Nested**: Can work with connected tables that are themselves connected to other tables
114
+
115
+ ---
116
+
117
+ ## Related Concepts
118
+
119
+ ### Comparison with Low-Code Button Widget
120
+
121
+ The Low-Code Text is part of a family of Low-Code widgets:
122
+
123
+ | Aspect | Low-Code Text | Low-Code Button |
124
+ |--------|---------------|-----------------|
125
+ | **Purpose** | Display computed text/HTML | Execute actions on click |
126
+ | **Script return** | String, number, date, or localized object | Object with `checkAccess()` and `call()` methods |
127
+ | **Execution** | Automatic on page load + reactive | User-triggered on click |
128
+ | **Execution mode** | Always synchronous | Async (default) or synchronous |
129
+ | **Embedding** | Rich string only | Anywhere, including attribute groups |
130
+ | **Frame** | Never (frameless, no padding) | Configurable |
131
+ | **Data source** | Identical 3-mode grouping | Identical 3-mode grouping |
132
+
133
+ ### Low-Code Script Engine
134
+
135
+ The widget uses the cplace Low-Code script engine with:
136
+ - **Sandboxed execution**: Scripts run in a controlled environment
137
+ - **Type safety**: Access to typed wrappers for cplace entities
138
+ - **Search/Filter access**: Scripts can use `Search` and `Filters` classes
139
+ - **HTML sanitization**: Output is cleaned via `RichStringUtilities.clean()`
140
+
141
+ ---
142
+
143
+ ## Technical Details
144
+
145
+ ### Key Classes
146
+
147
+ - **Definition**: `cf.cplace.lowCodeWidgets.script.LowCodeTextWidgetDefinition` (cf.cplace.lowCodeWidgets/src/main/java/cf/cplace/lowCodeWidgets/script/LowCodeTextWidgetDefinition.java:35)
148
+ - **Evaluation**: `cf.cplace.lowCodeWidgets.utils.LowCodeTextWidgetUtils` (cf.cplace.lowCodeWidgets/src/main/java/cf/cplace/lowCodeWidgets/utils/LowCodeTextWidgetUtils.java:52)
149
+ - **Handler**: `EvaluateTextHandler` (cf.cplace.lowCodeWidgets/src/main/java/cf/cplace/lowCodeWidgets/handler/EvaluateTextHandler.java:27)
150
+ - **Configuration Type**: `LowCodeWidgetsWidgetTypes.LOW_CODE_TEXT_WIDGET` (cf.cplace.lowCodeWidgets/src/main/java/cf/cplace/lowCodeWidgets/LowCodeWidgetsWidgetTypes.java:37)
151
+
152
+ ### Frontend Components
153
+
154
+ - **Controller**: `LowCodeTextWidgetCtrl` (cf.cplace.lowCodeWidgets/assets/ts/controllers/LowCodeTextWidgetCtrl.ts:11)
155
+ - **Directive**: `lowCodeTextWidgetDirective` (cf.cplace.lowCodeWidgets/assets/ts/directives/lowCodeTextWidgetDirective.ts:4)
156
+ - **Template**: `lowCodeTextWidgetDefinition.htm` (cf.cplace.lowCodeWidgets/src/main/resources/cf/cplace/lowCodeWidgets/script/lowCodeTextWidgetDefinition.htm)
157
+
158
+ ### Configuration Attributes
159
+
160
+ | Attribute | Type | Required | Purpose |
161
+ |-----------|------|----------|---------|
162
+ | `SCRIPT` | SingleString (script) | Yes | The cplaceJS script to execute |
163
+ | `SEARCH` | SingleString (search) | No | Search definition for finding pages |
164
+ | `SORT_COLUMN` | SingleString | No | Column to sort search results by |
165
+ | `SORT_ORDER` | SingleString | No | Sort direction |
166
+ | `CONNECTED_TABLE` | SingleString | No | Widget ID of connected table |
167
+ | `CONNECTED_TABLE_SELECTION_ONLY` | SingleBoolean | No | Use only selected rows |
168
+ | `SELECTION` | MultiPageReference | No | Explicit page references |
169
+ | `DATA_SOURCE` | AttributeGrouping | Yes | Switches between search/connected-table/selection modes |
170
+ | `INCLUDE_ALL_SEARCH_RESULTS` | SingleBoolean | No | Also provide searchResults binding |
171
+
172
+ ---
173
+
174
+ ## Summary
175
+
176
+ The Low-Code Text widget is the declarative counterpart to the Low-Code Button widget. While the button executes user-triggered actions, the text widget automatically evaluates a script and renders the result as HTML content within a rich string widget. Its reactive behavior with connected tables makes it suitable for building dynamic, data-driven page content that updates in response to user interactions elsewhere on the page.
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Generated:** 2026-01-16
4
4
  **Phase:** 0 - Discovery
5
- **Total Widgets in Target List:** 97
5
+ **Total Widgets in Target List:** 98
6
6
 
7
7
  ---
8
8
 
@@ -10,14 +10,14 @@
10
10
 
11
11
  | Status | Count |
12
12
  |--------|-------|
13
- | Found | 97 |
13
+ | Found | 98 |
14
14
  | Not Found | 0 |
15
15
 
16
- All 97 target widgets have been mapped to their definition classes.
16
+ All 98 target widgets have been mapped to their definition classes.
17
17
 
18
18
  ---
19
19
 
20
- ## Widgets with Existing Specs (49)
20
+ ## Widgets with Existing Specs (50)
21
21
 
22
22
  | Widget ID | Repository | Definition Class Path | Status |
23
23
  |-----------|------------|----------------------|--------|
@@ -31,6 +31,7 @@ All 97 target widgets have been mapped to their definition classes.
31
31
  | cf.cplace.formsWizard.startWizardWidget | cplace-forms-wizard | cf.cplace.formsWizard/src/main/java/cf/cplace/formsWizard/script/StartWizardWidgetDefinition.java | found |
32
32
  | cf.cplace.layoutTabsWidget.widget | cplace-paw | cf.cplace.layoutTabsWidget/src/main/java/cf/cplace/layoutTabsWidget/script/LayoutTabsWidgetWidgetDefinition.java | found |
33
33
  | cf.cplace.lowCodeWidgets.lowCodeButton | cplace-paw | cf.cplace.lowCodeWidgets/src/main/java/cf/cplace/lowCodeWidgets/script/LowCodeButtonWidgetDefinition.java | found |
34
+ | cf.cplace.lowCodeWidgets.lowCodeText | cplace-paw | cf.cplace.lowCodeWidgets/src/main/java/cf/cplace/lowCodeWidgets/script/LowCodeTextWidgetDefinition.java | found |
34
35
  | cf.cplace.pageViewHeadline.widget | cplace-paw | cf.cplace.pageViewHeadline/src/main/java/cf/cplace/pageViewHeadline/widget/PageViewHeadlineWidgetDefinition.java | found |
35
36
  | cf.cplace.pdfPreview.widget | cplace-paw | cf.cplace.pdfPreview/src/main/java/cf/cplace/pdfPreview/script/PdfPreviewWidgetDefinition.java | found |
36
37
  | cf.cplace.platform.attributesGroup | main | cf.cplace.platform/src/main/java/cf/cplace/platform/frontend/widgets/AttributesGroupWidgetDefinition.java | found |
@@ -139,7 +140,7 @@ All 97 target widgets have been mapped to their definition classes.
139
140
  | Repository | Widget Count | Base Path |
140
141
  |------------|--------------|-----------|
141
142
  | main | 24 | /Users/thomasbuechner/dev/repos/main/cf.cplace.platform |
142
- | cplace-paw | 22 | /Users/thomasbuechner/dev/repos/cplace-paw |
143
+ | cplace-paw | 23 | /Users/thomasbuechner/dev/repos/cplace-paw |
143
144
  | cplace-project-planning | 12 | /Users/thomasbuechner/dev/repos/cplace-project-planning |
144
145
  | cplace-forms-wizard | 9 | /Users/thomasbuechner/dev/repos/cplace-forms-wizard |
145
146
  | cplace-ecf | 6 | /Users/thomasbuechner/dev/repos/cplace-ecf |
@@ -12,6 +12,7 @@ cf.cplace.dynamicCodeBlockWidget.dynamicCodeBlockWidget cplace-utility-widgets c
12
12
  cf.cplace.formsWizard.startWizardWidget cplace-forms-wizard cf.cplace.formsWizard/src/main/java/cf/cplace/formsWizard/script/StartWizardWidgetDefinition.java
13
13
  cf.cplace.layoutTabsWidget.widget cplace-paw cf.cplace.layoutTabsWidget/src/main/java/cf/cplace/layoutTabsWidget/script/LayoutTabsWidgetWidgetDefinition.java
14
14
  cf.cplace.lowCodeWidgets.lowCodeButton cplace-paw cf.cplace.lowCodeWidgets/src/main/java/cf/cplace/lowCodeWidgets/script/LowCodeButtonWidgetDefinition.java
15
+ cf.cplace.lowCodeWidgets.lowCodeText cplace-paw cf.cplace.lowCodeWidgets/src/main/java/cf/cplace/lowCodeWidgets/script/LowCodeTextWidgetDefinition.java
15
16
  cf.cplace.pageViewHeadline.widget cplace-paw cf.cplace.pageViewHeadline/src/main/java/cf/cplace/pageViewHeadline/widget/PageViewHeadlineWidgetDefinition.java
16
17
  cf.cplace.pdfPreview.widget cplace-paw cf.cplace.pdfPreview/src/main/java/cf/cplace/pdfPreview/script/PdfPreviewWidgetDefinition.java
17
18
  cf.cplace.platform.attributesGroup main cf.cplace.platform/src/main/java/cf/cplace/platform/frontend/widgets/AttributesGroupWidgetDefinition.java
@@ -117,6 +117,18 @@ The Low-Code Button widget can be:
117
117
  - **Missing data source**: Scripts expecting the `pages` binding will fail if no data source is configured.
118
118
  - **Log output ignored**: In synchronous mode, `log.logText()` and `log.logHtml()` output is not displayed to users.
119
119
 
120
+ ## Testing Before Embedding
121
+
122
+ Before embedding a Low-Code Button widget into a rich string attribute, test your cplaceJS script independently to verify it works correctly.
123
+
124
+ **Recommended workflow:**
125
+ 1. Write your cplaceJS script (with `checkAccess()` and `call()` methods)
126
+ 2. Test the `call()` logic using `cplace_execute_script` with a representative page as the context page
127
+ 3. Verify the script executes without errors and produces the expected result
128
+ 4. Only then embed the widget via `cplace_richstring_insert_widget` with the tested script in the properties
129
+
130
+ **Why this matters:** A script with errors will produce a broken button once embedded. Debugging scripts inside embedded widgets is significantly harder than debugging them standalone, because the embedded widget rendering does not surface script errors clearly.
131
+
120
132
  ## Permissions and Access Control
121
133
 
122
134
  - **Embedding Permission**: Only users with "Low-Code permission" (`GlobalPermissions.mayEditLowCode()`) can embed this widget
@@ -0,0 +1,12 @@
1
+ {
2
+ "Widget": "cf.cplace.lowCodeWidgets.lowCodeText",
3
+ "Description": "{\"en\":\"This widget executes a Low-Code script and renders the result as text/HTML within a rich string widget.\",\"de\":\"Dieses Widget f\\u00fchrt ein Low-Code-Skript aus und gibt das Ergebnis als Text/HTML innerhalb eines Rich-String-Widgets aus.\"}",
4
+ "Localized Name": "{\"en\":\"Low-Code Text\",\"de\":\"Low-Code Text\"}",
5
+ "Icon": "fa-code",
6
+ "Plugin": "cf.cplace.lowCodeWidgets",
7
+ "App": "cf.cplace.platform",
8
+ "Localized App Name": "{\"en\":\"cplace Basis\",\"de\":\"cplace Basis\"}",
9
+ "Repository": "cplace-paw",
10
+ "* Details DE": null,
11
+ "* Details EN": null
12
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "tags": [
3
+ "low-code",
4
+ "rich-text",
5
+ "connected",
6
+ "searchable",
7
+ "read-only",
8
+ "dashboard"
9
+ ],
10
+ "requiredApp": null
11
+ }
@@ -0,0 +1,94 @@
1
+ ## Overview
2
+
3
+ This widget executes a cplaceJS script and renders the result as inline HTML content within a rich string widget.
4
+
5
+ The Low-Code Text widget enables dynamic, script-computed content to be embedded directly within rich text layouts. On page load, the widget evaluates a JavaScript script with access to contextual data (pages from search, connected tables, or explicit selections) and renders the returned value as HTML. When connected to a table widget, it reactively re-evaluates whenever the table's data or user selection changes, enabling live-updating computed content without page reload.
6
+
7
+ ## Use Cases
8
+
9
+ ### Dynamic Computed Values in Rich Text
10
+ Display calculated or derived information inline within formatted page content:
11
+ - Aggregated metrics (sums, averages, counts) from search results
12
+ - Conditional text based on page attributes or states
13
+ - Formatted summaries combining data from multiple sources
14
+
15
+ ### Reactive Content Linked to Tables
16
+ Create text that updates when users interact with connected table widgets:
17
+ - Details about selected table rows
18
+ - Summary statistics that update as the table data changes
19
+ - Context-specific information based on the current table selection
20
+
21
+ ### Data-Driven HTML Rendering
22
+ Generate custom HTML markup based on page data:
23
+ - Visual indicators (colored badges, progress bars) based on attribute values
24
+ - Mini-tables or formatted lists from search results
25
+ - Formatted dates, numbers, or computed expressions
26
+
27
+ ### Internationalized Dynamic Content
28
+ Generate localized content using the `messages` binding to display status messages, computed text, or dynamic values in the user's language.
29
+
30
+ ## Script Return Values
31
+
32
+ The script simply returns a value to display (no object structure required, unlike the Low-Code Button):
33
+ - **String**: Rendered as HTML (sanitized)
34
+ - **Number/Boolean/Date**: Converted to string
35
+ - **Localized object**: `{en: "Hello", de: "Hallo"}` -- resolved to user's language
36
+
37
+ ## Data Source Options
38
+
39
+ The widget supports three data source modes (identical to the Low-Code Button):
40
+
41
+ **Search**: Define a search query whose results are passed as the `pages` binding. Most common mode.
42
+
43
+ **Connected Table**: Connect to a table widget on the same page. The widget re-evaluates when the table's data changes or when the user's selection changes (if "selection only" is enabled). Supports chained connected tables.
44
+
45
+ **Selection**: Manually select specific pages to provide as the `pages` binding.
46
+
47
+ Additionally, **Include All Search Results** can be enabled to provide raw search results (including non-page entities) via the `searchResults` binding.
48
+
49
+ ## Embedding Constraint
50
+
51
+ This widget can **only** be embedded inside rich string widgets. It cannot be placed directly on a page layout. It renders without a frame and without padding, blending seamlessly into surrounding rich text content.
52
+
53
+ ## Design Considerations
54
+
55
+ ### When to Use This Widget
56
+ - You need dynamic, script-computed content within a rich text layout
57
+ - The content should update reactively based on connected table interactions
58
+ - You want inline computed values (metrics, status text, formatted data) mixed with static rich text
59
+
60
+ ### When NOT to Use This Widget
61
+ - For user-triggered actions -- use the **Low-Code Button** instead
62
+ - For standalone chart visualizations -- use **cplaceJS Highcharts** or **cplaceJS Line Chart**
63
+ - For simple static text -- use the **Rich String** widget directly
64
+
65
+ ### Script Execution Considerations
66
+ - Scripts execute synchronously during page rendering and on every re-evaluation
67
+ - Keep scripts performant to avoid slow page loads
68
+ - Output HTML is sanitized via `RichStringUtilities.clean()` for security
69
+
70
+ ## Testing Before Embedding
71
+
72
+ Before embedding a Low-Code Text widget into a rich string attribute, test your cplaceJS script independently to verify it produces the expected output.
73
+
74
+ **Recommended workflow:**
75
+ 1. Write your cplaceJS script
76
+ 2. Run it using `cplace_execute_script` with a representative page as the context page
77
+ 3. Verify the returned HTML/text is correct
78
+ 4. Only then embed the widget via `cplace_richstring_insert_widget` with the tested script in the properties
79
+
80
+ **Why this matters:** A script with errors or unexpected output will produce a broken or empty widget once embedded. Debugging scripts inside embedded widgets is significantly harder than debugging them standalone, because the embedded widget rendering does not surface script errors clearly.
81
+
82
+ ## Related Widgets
83
+
84
+ ### Low-Code Button (`cf.cplace.lowCodeWidgets.lowCodeButton`)
85
+ The imperative counterpart: executes user-triggered actions on click. Shares the same data source configuration and script bindings but uses a different script structure (`checkAccess()`/`call()` methods).
86
+
87
+ ### Rich String (`cf.platform.richString`)
88
+ The typical host widget for Low-Code Text. The rich string provides the static layout structure; embedded Low-Code Text widgets provide dynamic content within it.
89
+
90
+ ### Text without Widget Frame (`cf.cplace.demoWidgets.demoRichString`)
91
+ An alternative host widget -- a frameless rich string variant also capable of embedding Low-Code Text widgets.
92
+
93
+ ### Embedded Search as Table (`cf.platform.embeddedSearchAsTable`)
94
+ Often used as the connected data source. The table widget provides data or selection events that trigger the Low-Code Text to re-evaluate.
@@ -0,0 +1 @@
1
+ Executes a cplaceJS script and renders the returned text or HTML inline within a rich string widget. Reactively re-evaluates when connected table data or selections change.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cplace/test-mcp-server",
3
- "version": "1.3.11",
3
+ "version": "1.3.13",
4
4
  "description": "MCP server that provides Claude Desktop with tools to interact with cplace APIs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",