drawio_dsl 0.8.6 → 0.8.9
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.
- checksums.yaml +4 -4
- data/.vscode/settings.json +2 -1
- data/CHANGELOG.md +22 -0
- data/README.md +0 -7
- data/{.builders/.data/shapes.json → config/configuration.json} +49 -49
- data/docs/domain-modal/domain_model_custom.drawio +134 -134
- data/docs/domain-modal/domain_model_custom.svg +1 -1
- data/docs/domain_model.drawio +265 -0
- data/docs/domain_model.json +1038 -0
- data/docs/domain_model.svg +3 -0
- data/docs/parking_app.drawio +24 -24
- data/docs/parking_app.svg +1 -1
- data/docs/printspeak-architecture-generator.drawio +42 -30
- data/docs/printspeak-architecture-generator.svg +1 -1
- data/docs/project-plan/project.drawio +78 -54
- data/docs/project-plan/project_done.svg +1 -1
- data/docs/project-plan/project_in_progress.svg +1 -1
- data/docs/project-plan/project_todo.svg +1 -1
- data/lib/drawio_dsl/configuration.rb +99 -0
- data/lib/drawio_dsl/drawio.rb +16 -0
- data/lib/drawio_dsl/formatters/base_formatter.rb +120 -0
- data/lib/drawio_dsl/formatters/html_builder.rb +39 -0
- data/lib/drawio_dsl/formatters/interface_formatter.rb +13 -1
- data/lib/drawio_dsl/formatters/klass_formatter.rb +13 -1
- data/lib/drawio_dsl/version.rb +1 -1
- data/lib/drawio_dsl.rb +2 -0
- data/package-lock.json +2 -2
- data/package.json +1 -1
- metadata +6 -31
- data/.builders/.templates/basic/configuration_shapes.rb +0 -27
- data/.builders/.templates/basic/dom_builder_shapes.rb +0 -17
- data/.builders/.templates/basic/drawio_extensions.rb +0 -58
- data/.builders/.templates/basic/drawio_shapes.rb +0 -23
- data/.builders/.templates/basic/schema_require.rb +0 -19
- data/.builders/.templates/basic/schema_shape.rb +0 -9
- data/.builders/.templates/basic/schema_shape_spec.rb +0 -13
- data/.builders/_.rb +0 -1
- data/.builders/blueprint/shapes.rb +0 -173
- data/.builders/boot.rb +0 -72
- data/.builders/generators/01-bootstrap.rb +0 -130
- data/.builders/generators/02-generate-app.rb +0 -47
- data/.builders/generators/10-transform-drawio-js.rb +0 -195
- data/.builders/generators/20-drawio-extensions.rb +0 -41
- data/.builders/generators/domain_diagram.rb +0 -473
- data/.builders/generators/parking-map.png +0 -0
- data/.builders/generators/parking_app.rb +0 -110
- data/.builders/generators/printspeak-architecture-generator.rb +0 -45
- data/.builders/generators/project-plan.rb +0 -81
- data/.builders/generators/sample_diagrams/05-samples.rb +0 -36
- data/.builders/generators/sample_diagrams/10-page-margin.rb +0 -42
- data/.builders/generators/sample_diagrams/15-grid-direction.rb +0 -34
- data/.builders/generators/sample_diagrams/16-grid-alignment.rb +0 -70
- data/.builders/generators/sample_diagrams/20-styles.rb +0 -61
- data/.builders/generators/sample_diagrams/25-themes.rb +0 -37
- data/.builders/generators/sample_diagrams/30-html-shapes.rb +0 -48
- data/.builders/generators/sample_diagrams/35-ids-and-arrows.rb +0 -28
- data/.builders/generators/sample_diagrams/50-willoughby-council.rb +0 -51
@@ -1,81 +0,0 @@
|
|
1
|
-
KManager.action :project_plan do
|
2
|
-
action do
|
3
|
-
|
4
|
-
DrawioDsl::Drawio
|
5
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
6
|
-
.diagram(rounded: 1, glass: 1)
|
7
|
-
.page('In progress', theme: :style_03, margin_left: 0, margin_top: 0) do
|
8
|
-
|
9
|
-
# h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
|
10
|
-
# p(x: 350, y: 40, w: 400, h: 80, title: 'Project plan - In progress')
|
11
|
-
|
12
|
-
grid_layout(y: 90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
13
|
-
|
14
|
-
todo(title: 'class html builder to support include/extend modules, class methods and regular html nodes such as p, h1.. ul, li')
|
15
|
-
todo(title: 'add new shapes related to line connectors')
|
16
|
-
todo(title: 'line connector aliases gives a simple way to use predefined line configurations')
|
17
|
-
todo(title: 'line connectors need to support autolinking using ids')
|
18
|
-
todo(title: 'line connectors should not effect the grid positioning systems')
|
19
|
-
todo(title: 'export diagram json for use with a different DSL builder')
|
20
|
-
end
|
21
|
-
.page('To Do', theme: :style_02, margin_left: 0, margin_top: 0) do
|
22
|
-
|
23
|
-
# h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
|
24
|
-
# p(x: 350, y: 40, w: 400, h: 80, title: 'Project plan')
|
25
|
-
|
26
|
-
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
27
|
-
|
28
|
-
todo(title: 'add page background to theme, use it whenever the theme is set at a diagram/page level')
|
29
|
-
todo(title: 'move DrawioDsl::Formatters::Factory::FORMATTERS to resource file')
|
30
|
-
todo(title: 'move DrawioDsl::Formatters::StyleBuilder::MAPPINGS to resource file')
|
31
|
-
todo(title: 'settings style attributes need to de-duplicate, might be best to utilize the new StyleBuilder class')
|
32
|
-
todo(title: 'write SVG directly into other projects')
|
33
|
-
todo(title: 'add :shape, :line and :text to random shape generator, note: you can see the issue in the samples/20-styled-shapes.rb where the text is not rendered')
|
34
|
-
todo(title: 'Nodes need to support child nodes')
|
35
|
-
todo(title: 'Grid layout does not position itself in relation to the last element')
|
36
|
-
todo(title: 'Dynamic sized shapes that expand to the size of their text')
|
37
|
-
todo(title: 'Control of text padding left, right, top and bottom')
|
38
|
-
todo(title: 'Improve the theme control over text-only shapes')
|
39
|
-
todo(title: 'x,y settings do not work for shapes within a grid layout')
|
40
|
-
todo(title: 'page layout so that you drop elements on and they are positioned correctly, e.g centered, left, right, etc, maybe a grid layout with a wrap of 1 and a width of the page is sufficient')
|
41
|
-
end
|
42
|
-
.page('Done', theme: :style_06, margin_left: 0, margin_top: 0) do
|
43
|
-
|
44
|
-
# h5(x: 300, y: 0, w: 400, h: 80, title: 'DrawIO DSL')
|
45
|
-
# p(x: 350, y: 40, w: 400, h: 80, title: 'Done')
|
46
|
-
|
47
|
-
grid_layout(y:90, direction: :horizontal, grid_h: 80, grid_w: 320, wrap_at: 3, grid: 0)
|
48
|
-
|
49
|
-
todo(title: 'group box, like a regular box but with a top aligned h1 style title')
|
50
|
-
todo(title: 'build a domain (class) diagram')
|
51
|
-
todo(title: 'build configuration for line strokes %i[dashed dotted dashdot dashdotdot dotdotdot longdash)')
|
52
|
-
todo(title: 'build configuration for line compass %i[n ne e se s sw w nw]')
|
53
|
-
todo(title: 'build configuration for line shape %i[style1 style2 style3 style4]')
|
54
|
-
todo(title: 'build configuration for arrows %i[straight triangle diamond circle cross short default none plain skewed_dash concave er_many er_one er_one_optional er_one_mandatory er_many_optional er_many_mandatory]')
|
55
|
-
todo(title: 'refactor the shape->text_only (boolean) to category (symbol)')
|
56
|
-
todo(title: 'ensure that ids are working as expected')
|
57
|
-
todo(title: 'alter the initial parameter of all shapes so that it can be an ID, without named attribute')
|
58
|
-
todo(title: 'move project-plan files')
|
59
|
-
todo(title: 'alter configure_shape so it sets the default shape key and use that for selecting the default HTML formatter')
|
60
|
-
todo(title: 'add todo shape to simplify project plan drawing')
|
61
|
-
todo(title: 'introduce .value property to shape and let it use either formatted HTML or plain text title')
|
62
|
-
todo(title: 'formatter DSL that can render HTML directly into the value property')
|
63
|
-
todo(title: 'formatter DSL for class and interface generation')
|
64
|
-
todo(title: 'generate extension based graphics based on drawio extensions.js')
|
65
|
-
todo(title: 'active? flag on page defaulting to true. set to false to exclude page from diagram.')
|
66
|
-
todo(title: 'first level child nodes need to hang of node 1')
|
67
|
-
todo(title: 'node has child nodes and add_node will set a nodes parent')
|
68
|
-
todo(title: 'nodes can belong to a parent node, the top level node responds with truthy to root?')
|
69
|
-
todo(title: 'add sample diagram for the github readme file')
|
70
|
-
todo(title: 'write samples into docs folder and display in readme')
|
71
|
-
todo(title: 'add export as .PNG, needs to take a page number as the PNG will not support multiple pages')
|
72
|
-
todo(title: 'add export as .SVG, needs to take a page number as the SVG will not support multiple pages')
|
73
|
-
todo(title: 'add save as .drawio')
|
74
|
-
end
|
75
|
-
.cd(:docs)
|
76
|
-
.save('project-plan/project.drawio')
|
77
|
-
.export_svg('project-plan/project_in_progress', page: 1)
|
78
|
-
.export_svg('project-plan/project_todo' , page: 2)
|
79
|
-
.export_svg('project-plan/project_done' , page: 3)
|
80
|
-
end
|
81
|
-
end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
def rnd(max)
|
2
|
-
Random.rand(0..max) == 0 ? 1 : 0
|
3
|
-
end
|
4
|
-
KManager.action :bootstrap do
|
5
|
-
action do
|
6
|
-
DrawioDsl::Drawio
|
7
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
8
|
-
.diagram(theme: :style_01)
|
9
|
-
.page('Samples') do
|
10
|
-
grid_layout(wrap_at: 5)
|
11
|
-
|
12
|
-
# KConfig.configuration.drawio.shapes.select { |shape| shape.type != :shape && !shape.text_only }.each do |shape|
|
13
|
-
# # print random number between 0 and 1
|
14
|
-
# send(shape.type, theme: KConfig.configuration.drawio.random_theme, title: shape.type.to_s, shape: shape, rounded: rnd(2), gloss: rnd(2), sketch: rnd(8))
|
15
|
-
# end
|
16
|
-
|
17
|
-
for jersy_number in 67..112
|
18
|
-
team_color = :style_02
|
19
|
-
team_color = :style_03 if jersy_number % 3 == 0
|
20
|
-
team_color = :style_04 if jersy_number % 12 == 0
|
21
|
-
|
22
|
-
if jersy_number % 20 == 0
|
23
|
-
cloud(title: jersy_number, theme: team_color)
|
24
|
-
else
|
25
|
-
actor(title: jersy_number, theme: team_color)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
|
30
|
-
end
|
31
|
-
.cd(:spec)
|
32
|
-
.osave('.samples/05-samples.drawio')
|
33
|
-
# .cd(:docs)
|
34
|
-
# .export_svg('samples/samples', page: 1)
|
35
|
-
end
|
36
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
KManager.action :bootstrap do
|
2
|
-
action do
|
3
|
-
DrawioDsl::Drawio
|
4
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
5
|
-
.diagram(theme: :style_01)
|
6
|
-
.page('PgMargin-default') do
|
7
|
-
grid_layout(wrap_at: 4)
|
8
|
-
square(title: 'Page Margin 50, 50 (Default)')
|
9
|
-
circle
|
10
|
-
square
|
11
|
-
circle
|
12
|
-
square
|
13
|
-
circle
|
14
|
-
square
|
15
|
-
circle
|
16
|
-
end
|
17
|
-
.page('PgMargin-0-0', margin_left: 0, margin_top: 0) do
|
18
|
-
grid_layout(wrap_at: 4)
|
19
|
-
square(title: 'Page Margin 0, 0')
|
20
|
-
circle
|
21
|
-
square
|
22
|
-
circle
|
23
|
-
square
|
24
|
-
circle
|
25
|
-
square
|
26
|
-
circle
|
27
|
-
end
|
28
|
-
.page('PgMargin-90-70', margin_left: 90, margin_top: 70) do
|
29
|
-
grid_layout(wrap_at: 4)
|
30
|
-
square(title: 'Page Margin 90, 70')
|
31
|
-
circle
|
32
|
-
square
|
33
|
-
circle
|
34
|
-
square
|
35
|
-
circle
|
36
|
-
square
|
37
|
-
circle
|
38
|
-
end
|
39
|
-
.cd(:spec)
|
40
|
-
.save('.samples/10-page-margin.drawio')
|
41
|
-
end
|
42
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
KManager.action :bootstrap do
|
2
|
-
action do
|
3
|
-
DrawioDsl::Drawio
|
4
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
5
|
-
.diagram(theme: :style_01)
|
6
|
-
.page('Horizontal', margin_left: 0, margin_top: 0) do
|
7
|
-
grid_layout(wrap_at: 3, direction: :horizontal)
|
8
|
-
h4(title: 'Horizontal')
|
9
|
-
circle(title: '01')
|
10
|
-
square(title: '02')
|
11
|
-
circle(title: '03')
|
12
|
-
square(title: '04')
|
13
|
-
circle(title: '05')
|
14
|
-
square(title: '06')
|
15
|
-
circle(title: '07')
|
16
|
-
end
|
17
|
-
.page('Vertical', margin_left: 0, margin_top: 0) do
|
18
|
-
grid_layout(wrap_at: 3, direction: :vertical)
|
19
|
-
h4(title: 'Vertical')
|
20
|
-
circle(title: '01')
|
21
|
-
square(title: '02')
|
22
|
-
circle(title: '03')
|
23
|
-
square(title: '04')
|
24
|
-
circle(title: '05')
|
25
|
-
square(title: '06')
|
26
|
-
circle(title: '07')
|
27
|
-
end
|
28
|
-
.cd(:spec)
|
29
|
-
.save('.samples/15-grid-direction.drawio')
|
30
|
-
.cd(:docs)
|
31
|
-
.export_svg('samples/grid-direction-horizontal', page: 1)
|
32
|
-
.export_svg('samples/grid-direction-vertical', page: 2)
|
33
|
-
end
|
34
|
-
end
|
@@ -1,70 +0,0 @@
|
|
1
|
-
KManager.action :bootstrap do
|
2
|
-
action do
|
3
|
-
|
4
|
-
# KConfig.configuration.drawio.square.w = KConfig.configuration.drawio.square.w / 4
|
5
|
-
# KConfig.configuration.drawio.square.h = KConfig.configuration.drawio.square.h / 4
|
6
|
-
# KConfig.configuration.drawio.circle.w = KConfig.configuration.drawio.circle.w / 4
|
7
|
-
# KConfig.configuration.drawio.circle.h = KConfig.configuration.drawio.circle.h / 4
|
8
|
-
# KConfig.configuration.drawio.rectangle.w = KConfig.configuration.drawio.rectangle.w / 4
|
9
|
-
# KConfig.configuration.drawio.rectangle.h = KConfig.configuration.drawio.rectangle.h / 4
|
10
|
-
|
11
|
-
director = DrawioDsl::Drawio
|
12
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
13
|
-
.diagram(theme: :style_01)
|
14
|
-
.page('Grid-Center', margin_left: 0, margin_top: 0) do
|
15
|
-
grid_layout(wrap_at: 3)
|
16
|
-
circle
|
17
|
-
square
|
18
|
-
circle
|
19
|
-
square
|
20
|
-
circle
|
21
|
-
square
|
22
|
-
circle
|
23
|
-
end
|
24
|
-
.page('Grid-Top', margin_left: 0, margin_top: 0) do
|
25
|
-
grid_layout(wrap_at: 3, v_align: :top, h_align: :center)
|
26
|
-
circle
|
27
|
-
square
|
28
|
-
circle
|
29
|
-
square
|
30
|
-
circle
|
31
|
-
square
|
32
|
-
circle
|
33
|
-
end
|
34
|
-
.page('Grid-Bottom', margin_left: 0, margin_top: 0) do
|
35
|
-
grid_layout(wrap_at: 3, v_align: :bottom, h_align: :center)
|
36
|
-
circle
|
37
|
-
square
|
38
|
-
circle
|
39
|
-
square
|
40
|
-
circle
|
41
|
-
square
|
42
|
-
circle
|
43
|
-
end
|
44
|
-
.page('Grid-Left', margin_left: 0, margin_top: 0) do
|
45
|
-
grid_layout(wrap_at: 3, v_align: :center, h_align: :left)
|
46
|
-
circle
|
47
|
-
square
|
48
|
-
circle
|
49
|
-
square
|
50
|
-
circle
|
51
|
-
square
|
52
|
-
circle
|
53
|
-
end
|
54
|
-
.page('Grid-Right', margin_left: 0, margin_top: 0) do
|
55
|
-
grid_layout(wrap_at: 3, v_align: :center, h_align: :right)
|
56
|
-
circle
|
57
|
-
square
|
58
|
-
circle
|
59
|
-
square
|
60
|
-
circle
|
61
|
-
square
|
62
|
-
circle
|
63
|
-
end
|
64
|
-
.cd(:spec)
|
65
|
-
.save('.samples/16-grid-alignment.drawio')
|
66
|
-
.cd(:docs)
|
67
|
-
# note: there is no difference between center and top/bottom/left/right using SVG/PNG
|
68
|
-
.export_svg('samples/grid-alignment', page: 1)
|
69
|
-
end
|
70
|
-
end
|
@@ -1,61 +0,0 @@
|
|
1
|
-
KManager.action :styled_shapes do
|
2
|
-
action do
|
3
|
-
|
4
|
-
DrawioDsl::Drawio
|
5
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
6
|
-
.diagram(theme: :style_06)
|
7
|
-
.page('Style-Plain', margin_left: 0, margin_top: 0) do
|
8
|
-
grid_layout(wrap_at: 5)
|
9
|
-
|
10
|
-
KConfig.configuration.drawio.shapes.members.each do |shape|
|
11
|
-
next if shape == :shape
|
12
|
-
|
13
|
-
send(shape, title: shape.to_s, shape: shape)
|
14
|
-
end
|
15
|
-
end
|
16
|
-
.page('Style-Shadow', shadow: 1, margin_left: 0, margin_top: 0) do
|
17
|
-
grid_layout(wrap_at: 5)
|
18
|
-
|
19
|
-
KConfig.configuration.drawio.shapes.members.each do |shape|
|
20
|
-
next if shape == :shape
|
21
|
-
|
22
|
-
send(shape, title: shape.to_s, shape: shape)
|
23
|
-
end
|
24
|
-
end
|
25
|
-
.page('Style-Rounded', rounded: 1, margin_left: 0, margin_top: 0) do
|
26
|
-
grid_layout(wrap_at: 5)
|
27
|
-
|
28
|
-
KConfig.configuration.drawio.shapes.members.each do |shape|
|
29
|
-
next if shape == :shape
|
30
|
-
|
31
|
-
send(shape, title: shape.to_s, shape: shape)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
.page('Style-Glass', glass: 1, margin_left: 0, margin_top: 0) do
|
35
|
-
grid_layout(wrap_at: 5)
|
36
|
-
|
37
|
-
KConfig.configuration.drawio.shapes.members.each do |shape|
|
38
|
-
next if shape == :shape
|
39
|
-
|
40
|
-
send(shape, title: shape.to_s, shape: shape)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
.page('Style-Sketch', sketch: 1, margin_left: 0, margin_top: 0) do
|
44
|
-
grid_layout(wrap_at: 5)
|
45
|
-
|
46
|
-
KConfig.configuration.drawio.shapes.members.each do |shape|
|
47
|
-
next if shape == :shape
|
48
|
-
|
49
|
-
send(shape, title: shape.to_s, shape: shape)
|
50
|
-
end
|
51
|
-
end
|
52
|
-
.cd(:spec)
|
53
|
-
.osave('.samples/20-styled-shapes.drawio')
|
54
|
-
.cd(:docs)
|
55
|
-
.export_svg('samples/styles-plain', page: 1)
|
56
|
-
.export_svg('samples/styles-shadow', page: 2)
|
57
|
-
.export_svg('samples/styles-rounded', page: 3)
|
58
|
-
.export_svg('samples/styles-glass', page: 4)
|
59
|
-
.export_svg('samples/styles-sketch', page: 5)
|
60
|
-
end
|
61
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
KManager.action :bootstrap do
|
2
|
-
action do
|
3
|
-
|
4
|
-
# :rounded, :shadow, :sketch, :glass
|
5
|
-
DrawioDsl::Drawio
|
6
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
7
|
-
.diagram(theme: :style_06)
|
8
|
-
.page('Style-Plain', margin_left: 0, margin_top: 0, rounded: 1, background: '#FFEADB') do
|
9
|
-
grid_layout(wrap_at: 8)
|
10
|
-
|
11
|
-
KConfig.configuration.drawio.themes.keys.each do |theme|
|
12
|
-
square(title: theme.to_s, theme: theme)
|
13
|
-
end
|
14
|
-
end
|
15
|
-
.page('Style-Plain', margin_left: 0, margin_top: 0, rounded: 1, background: '#FFEADB') do
|
16
|
-
grid_layout(wrap_at: 8)
|
17
|
-
|
18
|
-
KConfig.configuration.drawio.themes.keys.each do |theme|
|
19
|
-
circle(title: theme.to_s, theme: theme)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
.page('Style-Plain', margin_left: 0, margin_top: 0, rounded: 1, background: '#FFEADB') do
|
23
|
-
grid_layout(wrap_at: 8)
|
24
|
-
|
25
|
-
KConfig.configuration.drawio.themes.keys.each do |theme|
|
26
|
-
random(title: theme.to_s, theme: theme)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
.cd(:spec)
|
30
|
-
.save('.samples/25-themes.drawio')
|
31
|
-
.cd(:docs)
|
32
|
-
.export_svg('samples/themes-square', page: 1)
|
33
|
-
.export_svg('samples/themes-circle', page: 2)
|
34
|
-
.export_svg('samples/themes-random', page: 3)
|
35
|
-
|
36
|
-
end
|
37
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
KManager.action :html_shapes do
|
2
|
-
action do
|
3
|
-
|
4
|
-
# :rounded, :shadow, :sketch, :glass
|
5
|
-
DrawioDsl::Drawio
|
6
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
7
|
-
.diagram(theme: :style_11)
|
8
|
-
.page('Style-Plain', margin_left: 0, margin_top: 0, rounded: 0, background: '#FFEADB') do
|
9
|
-
grid_layout(wrap_at: 8)
|
10
|
-
|
11
|
-
# html = DrawioDsl::Formatters::KlassFormatter.new
|
12
|
-
# .header('IPerson')
|
13
|
-
# .field(:first_name, type: :string)
|
14
|
-
# .field(:last_name, type: :string)
|
15
|
-
# .field(:age, type: :integer)
|
16
|
-
# .field(:birthday, type: :date)
|
17
|
-
# .method(:full_name)
|
18
|
-
# .method(:sean)
|
19
|
-
# .as_html
|
20
|
-
|
21
|
-
# square(title: html,
|
22
|
-
# style_modifiers: 'align=left;overflow=fill;fontSize=12;fontFamily=Helvetica'
|
23
|
-
# )
|
24
|
-
|
25
|
-
interface(theme: :style_07) do
|
26
|
-
format
|
27
|
-
.header('IPerson')
|
28
|
-
.field(:field1, type: :string)
|
29
|
-
.field(:field2, type: :string)
|
30
|
-
.method(:full_name, type: :string)
|
31
|
-
end
|
32
|
-
|
33
|
-
klass do
|
34
|
-
format(:class)
|
35
|
-
.header('Person')
|
36
|
-
.field(:field1, type: :string)
|
37
|
-
.field(:field2, type: :string)
|
38
|
-
.field(:age, type: :integer)
|
39
|
-
.field(:birthday, type: :date)
|
40
|
-
.method(:full_name, type: :string)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
.cd(:spec)
|
44
|
-
.osave('.samples/30-html-shapes.drawio')
|
45
|
-
# .cd(:docs)
|
46
|
-
# .export_svg('samples/html-shapes', page: 1)
|
47
|
-
end
|
48
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
KManager.action :bootstrap do
|
2
|
-
action do
|
3
|
-
|
4
|
-
DrawioDsl::Drawio
|
5
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
6
|
-
.diagram(theme: :style_06)
|
7
|
-
.page('Style-Plain', margin_left: 0, margin_top: 0) do
|
8
|
-
grid_layout(wrap_at: 2, grid_w: 400)
|
9
|
-
|
10
|
-
shape_count = 2
|
11
|
-
# for 1 to 20 step 2
|
12
|
-
(1..shape_count).step(2).each do |i|
|
13
|
-
circle(i, title: i)
|
14
|
-
ellipse(i+1, title: i + 1)
|
15
|
-
end
|
16
|
-
|
17
|
-
(1..shape_count).step(2).each do |i|
|
18
|
-
line(source: i, target: i+1)
|
19
|
-
end
|
20
|
-
|
21
|
-
# # label = '<div style="background-color: #B85450; height: 100%; margin: 0; border: 1px solid red;"><p style="padding: 10px; font-size: 12px;color: #ffffff;width: 150px;"><img style="margin-right: 20px" src="https://picsum.photos/40" /> the quick brown fox jumped over the lazy dog</p></div>'
|
22
|
-
# label = ''
|
23
|
-
|
24
|
-
end
|
25
|
-
.cd(:spec)
|
26
|
-
.save('.samples/35-ids-and-arrows.drawio')
|
27
|
-
end
|
28
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
KManager.action :bootstrap do
|
2
|
-
action do
|
3
|
-
|
4
|
-
# :rounded, :shadow, :sketch, :glass
|
5
|
-
director = DrawioDsl::Drawio
|
6
|
-
.init(k_builder, on_exist: :write, on_action: :execute)
|
7
|
-
.diagram(theme: :style_03)
|
8
|
-
.page('Shapes', margin_left: 0, margin_top: 0, rounded: 1) do
|
9
|
-
grid_layout(direction: :vertical, grid_h: 120, grid_w: 400, wrap_at: 10, grid: 0)
|
10
|
-
|
11
|
-
h5(w: 400, h: 80, title: 'Preparation for Investigation')
|
12
|
-
p(w: 400, h: 80, title: '(<b>source</b>: <i>Hunter & Central Coast Regional Environmental Management Strategy – Investigations guideline</i>)')
|
13
|
-
square(w: 300, h: 80, title: 'Enter report into system')
|
14
|
-
square(w: 300, h: 80, title: 'Preliminary Review')
|
15
|
-
square(w: 300, h: 80, title: 'Insufficient Information')
|
16
|
-
square(w: 300, h: 80, title: 'Seek Additional Information')
|
17
|
-
square(w: 300, h: 80, title: 'Identify Possible Breach')
|
18
|
-
square(w: 300, h: 80, title: 'Insufficient evidence or no breach detected')
|
19
|
-
square(w: 300, h: 80, title: 'Plan follow up action')
|
20
|
-
square(w: 300, h: 80, title: 'Establish Jurisdiction - Council or other agency?')
|
21
|
-
square(w: 300, h: 80, title: 'Refer to other agency')
|
22
|
-
square(w: 300, h: 80, title: 'Council Responsibility')
|
23
|
-
square(w: 300, h: 80, title: 'Plan investigation')
|
24
|
-
square(w: 300, h: 80, title: 'Conduct investigation Gather and manage evidence (Evidence Gathering Guideline)')
|
25
|
-
square(w: 300, h: 80, title: 'Prepare recommendations report')
|
26
|
-
square(w: 300, h: 80, title: 'Make decision')
|
27
|
-
square(w: 300, h: 80, title: 'Take action (Enforcement Options Guideline)')
|
28
|
-
square(w: 300, h: 80, title: 'Review investigation')
|
29
|
-
square(w: 300, h: 80, title: 'Close case')
|
30
|
-
square(w: 300, h: 80, title: 'Feedback to complainant')
|
31
|
-
|
32
|
-
grid_layout(wrap_at: 40, direction: :vertical, grid_w: 250, grid_h: 150, wrap_at: 5)
|
33
|
-
|
34
|
-
square(theme: :style_02, w: 240, h: 140, title: '1. Complaint received by Council gets recorded into the system.')
|
35
|
-
square(theme: :style_02, w: 240, h: 140, title: '2. Council Officer will review the nature of the complaint and consider what evidence or information it has.')
|
36
|
-
square(theme: :style_02, w: 240, h: 140, title: '3. If the information given thus far is insufficient Officer can go back to complainant and seek additional information.')
|
37
|
-
square(theme: :style_02, w: 240, h: 140, title: '4. With that information Council should be in a position to identify whether there has been a breach.')
|
38
|
-
square(theme: :style_02, w: 240, h: 140, title: '5. If there has been a breach: establish whether it's a matter for which the Council has jurisdiction (ie is it a piece of legislation for which the Council has the authority to enforce?).')
|
39
|
-
square(theme: :style_02, w: 240, h: 140, title: '6. If not: Council can refer that matter to another agency; such as Police, Fisheries, Transport NSW, EPA etc')
|
40
|
-
square(theme: :style_02, w: 240, h: 140, title: '7. If it is the Councils responsibility then Council needs to plan out the investigation. That will be through: gathering and collecting evidence through statements, observations, interviews, samples, items of interest.')
|
41
|
-
square(theme: :style_02, w: 240, h: 140, title: '8. The Council Officer should prepare a recommendations report which will: <br/>* go through the history of the matter <br/>* go through the investigations that have happened <br/>* go through the evidence that the Council has and then provide a recommendation as to the future action to be taken')
|
42
|
-
square(theme: :style_02, w: 240, h: 140, title: '9. Once the Council has that evidence and is in a position that it thinks it can MAKE A DECISION')
|
43
|
-
square(theme: :style_02, w: 240, h: 140, title: '10. TAKE ACTION: Once a decision is made as to the action that should happen in respect of the breach the council can then decide as to what the appropriate action is: WARNING, CIVIL, CRIMINAL and then proceed from there => it is important to keep the complainant informed throughout the entire process to be able to explain why you have taken the course you've taken and to be able to justify it')
|
44
|
-
|
45
|
-
end
|
46
|
-
.cd(:spec)
|
47
|
-
.save('.samples/50-willoughby-council.drawio')
|
48
|
-
.cd(:docs)
|
49
|
-
.export_svg('samples/willoughby-council', page: 1)
|
50
|
-
end
|
51
|
-
end
|