create-mendix-widget-gleam 2.0.21 → 3.0.1
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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/src/i18n.mjs +3 -3
- package/src/templates/claude_md.mjs +4 -3
- package/src/templates/readme_md.mjs +78 -66
- package/src/templates/widgets_readme.mjs +18 -15
- package/template/docs/glendix_guide.md +1056 -2538
- package/template/gleam.toml +4 -1
- package/template/package.json +6 -5
- package/template/src/__widget_name__.gleam +3 -3
- package/template/src/components/hello_world.gleam +5 -5
- package/template/src/editor_config.gleam +4 -8
- package/template/src/editor_preview.gleam +3 -3
package/template/gleam.toml
CHANGED
package/template/package.json
CHANGED
|
@@ -23,14 +23,15 @@
|
|
|
23
23
|
"playwright": "^1.58.2"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"classnames": "^2.5.1"
|
|
26
|
+
"classnames": "^2.5.1",
|
|
27
|
+
"big.js": "^6.0.0"
|
|
27
28
|
},
|
|
28
29
|
"resolutions": {
|
|
29
|
-
"react": "
|
|
30
|
-
"react-dom": "
|
|
30
|
+
"@types/react": "19.0.0",
|
|
31
|
+
"@types/react-dom": "19.0.0"
|
|
31
32
|
},
|
|
32
33
|
"overrides": {
|
|
33
|
-
"react": "
|
|
34
|
-
"react-dom": "
|
|
34
|
+
"@types/react": "19.0.0",
|
|
35
|
+
"@types/react-dom": "19.0.0"
|
|
35
36
|
}
|
|
36
37
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
{{I18N:widget_main_2}}
|
|
3
3
|
|
|
4
4
|
import components/hello_world
|
|
5
|
-
import glendix/mendix
|
|
6
|
-
import
|
|
5
|
+
import glendix/mendix.{type JsProps}
|
|
6
|
+
import redraw.{type Element}
|
|
7
7
|
|
|
8
8
|
{{I18N:widget_main_doc}}
|
|
9
|
-
pub fn widget(props: JsProps) ->
|
|
9
|
+
pub fn widget(props: JsProps) -> Element {
|
|
10
10
|
let sample_text = mendix.get_string_prop(props, "sampleText")
|
|
11
11
|
hello_world.render(sample_text)
|
|
12
12
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{{I18N:hello_world_1}}
|
|
2
2
|
{{I18N:hello_world_2}}
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import redraw.{type Element}
|
|
5
|
+
import redraw/dom/attribute
|
|
6
|
+
import redraw/dom/html
|
|
7
7
|
|
|
8
8
|
{{I18N:hello_world_doc}}
|
|
9
|
-
pub fn render(sample_text: String) ->
|
|
9
|
+
pub fn render(sample_text: String) -> Element {
|
|
10
10
|
html.div([attribute.class("widget-hello-world")], [
|
|
11
|
-
|
|
11
|
+
html.text("Hello " <> sample_text),
|
|
12
12
|
])
|
|
13
13
|
}
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
{{I18N:editor_config_1}}
|
|
2
2
|
{{I18N:editor_config_2}}
|
|
3
3
|
|
|
4
|
-
{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
pub type Properties
|
|
8
|
-
|
|
9
|
-
pub type Target
|
|
4
|
+
import glendix/editor_config.{type Properties}
|
|
5
|
+
import glendix/mendix.{type JsProps}
|
|
10
6
|
|
|
11
7
|
{{I18N:editor_config_doc}}
|
|
12
8
|
pub fn get_properties(
|
|
13
|
-
_values:
|
|
9
|
+
_values: JsProps,
|
|
14
10
|
default_properties: Properties,
|
|
15
|
-
|
|
11
|
+
_platform: String,
|
|
16
12
|
) -> Properties {
|
|
17
13
|
default_properties
|
|
18
14
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
{{I18N:editor_preview_2}}
|
|
3
3
|
|
|
4
4
|
import components/hello_world
|
|
5
|
-
import glendix/mendix
|
|
6
|
-
import
|
|
5
|
+
import glendix/mendix.{type JsProps}
|
|
6
|
+
import redraw.{type Element}
|
|
7
7
|
|
|
8
8
|
{{I18N:editor_preview_doc}}
|
|
9
|
-
pub fn preview(props: JsProps) ->
|
|
9
|
+
pub fn preview(props: JsProps) -> Element {
|
|
10
10
|
let sample_text = mendix.get_string_prop(props, "sampleText")
|
|
11
11
|
hello_world.render(sample_text)
|
|
12
12
|
}
|