thinreports 0.8.2 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CONTRIBUTING.md +2 -0
  3. data/.travis.yml +3 -3
  4. data/CHANGELOG.md +98 -1
  5. data/README.md +0 -9
  6. data/Rakefile +1 -2
  7. data/examples/character_spacing/character_spacing.tlf +293 -1
  8. data/examples/dynamic_image/dynamic_image.tlf +661 -1
  9. data/examples/dynamic_style/dynamic_style.rb +4 -4
  10. data/examples/dynamic_style/dynamic_style.tlf +1835 -1
  11. data/examples/dynamic_style/dynamic_style_in_list.tlf +344 -1
  12. data/examples/eudc/eudc.tlf +180 -1
  13. data/examples/hidden_shapes/hidden_shapes.tlf +449 -1
  14. data/examples/list_events/list_events.rb +1 -28
  15. data/examples/list_events/list_events.tlf +361 -0
  16. data/examples/list_manual_generation/list_manual_generation.tlf +132 -1
  17. data/examples/list_page_number/list_page_number.tlf +254 -1
  18. data/examples/page_number/page_number.tlf +215 -1
  19. data/examples/palleted_png/palleted_png.rb +2 -0
  20. data/examples/palleted_png/palleted_png.tlf +47 -1
  21. data/examples/password_setting/password_setting.tlf +45 -1
  22. data/examples/report_callbacks/report_callbacks.rb +1 -18
  23. data/examples/report_callbacks/report_callbacks.tlf +147 -1
  24. data/examples/single_line_tblock/single_line_tblock.tlf +170 -1
  25. data/examples/tblock_overflow/tblock_overflow.tlf +538 -1
  26. data/examples/tblock_styles/font_size.tlf +383 -1
  27. data/examples/tblock_styles/tblock_styles.tlf +889 -1
  28. data/examples/text_align/text_align.tlf +241 -1
  29. data/examples/typeB_page_size/B4_ISO.tlf +45 -1
  30. data/examples/typeB_page_size/B4_JIS.tlf +45 -1
  31. data/examples/word_wrap/word_wrap.tlf +297 -1
  32. data/lib/thinreports.rb +0 -1
  33. data/lib/thinreports/config.rb +3 -0
  34. data/lib/thinreports/core/errors.rb +0 -3
  35. data/lib/thinreports/core/format/base.rb +4 -4
  36. data/lib/thinreports/core/shape.rb +1 -9
  37. data/lib/thinreports/core/shape/basic.rb +3 -3
  38. data/lib/thinreports/core/shape/basic/block_format.rb +1 -1
  39. data/lib/thinreports/core/shape/basic/format.rb +2 -14
  40. data/lib/thinreports/core/shape/basic/internal.rb +2 -2
  41. data/lib/thinreports/core/shape/image_block.rb +3 -3
  42. data/lib/thinreports/core/shape/image_block/format.rb +0 -2
  43. data/lib/thinreports/core/shape/image_block/internal.rb +1 -1
  44. data/lib/thinreports/core/shape/list.rb +3 -7
  45. data/lib/thinreports/core/shape/list/format.rb +37 -24
  46. data/lib/thinreports/core/shape/list/manager.rb +1 -36
  47. data/lib/thinreports/core/shape/list/page.rb +0 -15
  48. data/lib/thinreports/core/shape/list/page_state.rb +1 -1
  49. data/lib/thinreports/core/shape/list/section_format.rb +14 -12
  50. data/lib/thinreports/core/shape/list/section_internal.rb +4 -7
  51. data/lib/thinreports/core/shape/manager/format.rb +0 -2
  52. data/lib/thinreports/core/shape/manager/internal.rb +1 -1
  53. data/lib/thinreports/core/shape/page_number.rb +1 -1
  54. data/lib/thinreports/core/shape/page_number/format.rb +9 -6
  55. data/lib/thinreports/core/shape/page_number/interface.rb +1 -1
  56. data/lib/thinreports/core/shape/page_number/internal.rb +2 -6
  57. data/lib/thinreports/core/shape/style/base.rb +11 -13
  58. data/lib/thinreports/core/shape/style/basic.rb +4 -4
  59. data/lib/thinreports/core/shape/style/graphic.rb +4 -10
  60. data/lib/thinreports/core/shape/style/text.rb +36 -69
  61. data/lib/thinreports/core/shape/text.rb +3 -3
  62. data/lib/thinreports/core/shape/text/format.rb +3 -13
  63. data/lib/thinreports/core/shape/text/internal.rb +2 -2
  64. data/lib/thinreports/core/shape/text_block.rb +3 -3
  65. data/lib/thinreports/core/shape/text_block/format.rb +9 -6
  66. data/lib/thinreports/core/shape/text_block/interface.rb +7 -7
  67. data/lib/thinreports/core/shape/text_block/internal.rb +1 -1
  68. data/lib/thinreports/generator/pdf.rb +0 -1
  69. data/lib/thinreports/generator/pdf/document.rb +2 -2
  70. data/lib/thinreports/generator/pdf/document/draw_shape.rb +25 -51
  71. data/lib/thinreports/generator/pdf/document/draw_template_items.rb +66 -0
  72. data/lib/thinreports/generator/pdf/document/font.rb +3 -8
  73. data/lib/thinreports/generator/pdf/document/graphics/attributes.rb +97 -77
  74. data/lib/thinreports/generator/pdf/document/graphics/basic.rb +18 -13
  75. data/lib/thinreports/generator/pdf/document/graphics/image.rb +17 -12
  76. data/lib/thinreports/generator/pdf/document/page.rb +1 -1
  77. data/lib/thinreports/generator/pdf/drawer/list.rb +5 -1
  78. data/lib/thinreports/generator/pdf/drawer/list_section.rb +1 -4
  79. data/lib/thinreports/generator/pdf/drawer/page.rb +9 -9
  80. data/lib/thinreports/layout.rb +3 -3
  81. data/lib/thinreports/layout/base.rb +0 -16
  82. data/lib/thinreports/layout/format.rb +38 -57
  83. data/lib/thinreports/layout/legacy_schema.rb +354 -0
  84. data/lib/thinreports/layout/version.rb +1 -1
  85. data/lib/thinreports/report.rb +0 -1
  86. data/lib/thinreports/report/base.rb +3 -17
  87. data/lib/thinreports/report/internal.rb +13 -55
  88. data/lib/thinreports/report/page.rb +1 -1
  89. data/lib/thinreports/version.rb +1 -1
  90. data/test/data/legacy_layout/all-items.tlf +1 -0
  91. data/test/schema_helper.rb +121 -0
  92. data/test/test_helper.rb +13 -50
  93. data/test/unit/core/format/test_base.rb +35 -31
  94. data/test/unit/core/shape/base/test_internal.rb +1 -1
  95. data/test/unit/core/shape/basic/test_block_format.rb +23 -0
  96. data/test/unit/core/shape/basic/{test_basic_interface.rb → test_block_interface.rb} +1 -1
  97. data/test/unit/core/shape/basic/{test_basic_internal.rb → test_block_internal.rb} +4 -7
  98. data/test/unit/core/shape/basic/test_format.rb +25 -47
  99. data/test/unit/core/shape/basic/test_interface.rb +5 -5
  100. data/test/unit/core/shape/basic/test_internal.rb +6 -11
  101. data/test/unit/core/shape/image_block/test_interface.rb +5 -5
  102. data/test/unit/core/shape/image_block/test_internal.rb +2 -2
  103. data/test/unit/core/shape/list/test_format.rb +86 -44
  104. data/test/unit/core/shape/list/test_manager.rb +10 -65
  105. data/test/unit/core/shape/list/test_page.rb +10 -61
  106. data/test/unit/core/shape/list/test_page_state.rb +1 -1
  107. data/test/unit/core/shape/list/test_section_format.rb +19 -28
  108. data/test/unit/core/shape/list/test_section_interface.rb +14 -6
  109. data/test/unit/core/shape/list/test_section_internal.rb +17 -23
  110. data/test/unit/core/shape/manager/test_format.rb +1 -1
  111. data/test/unit/core/shape/manager/test_internal.rb +59 -98
  112. data/test/unit/core/shape/manager/test_target.rb +21 -30
  113. data/test/unit/core/shape/page_number/test_format.rb +34 -52
  114. data/test/unit/core/shape/page_number/test_interface.rb +1 -1
  115. data/test/unit/core/shape/page_number/test_internal.rb +2 -2
  116. data/test/unit/core/shape/styles/test_base.rb +16 -41
  117. data/test/unit/core/shape/styles/test_basic.rb +7 -7
  118. data/test/unit/core/shape/styles/test_graphic.rb +27 -32
  119. data/test/unit/core/shape/styles/test_text.rb +68 -311
  120. data/test/unit/core/shape/text/test_format.rb +30 -59
  121. data/test/unit/core/shape/text/test_internal.rb +5 -5
  122. data/test/unit/core/shape/text_block/formatter/test_datetime.rb +13 -13
  123. data/test/unit/core/shape/text_block/test_format.rb +145 -146
  124. data/test/unit/core/shape/text_block/test_interface.rb +9 -9
  125. data/test/unit/core/shape/text_block/test_internal.rb +9 -9
  126. data/test/unit/core/test_shape.rb +19 -31
  127. data/test/unit/generator/pdf/document/graphics/test_attributes.rb +112 -122
  128. data/test/unit/generator/pdf/document/graphics/test_basic.rb +45 -0
  129. data/test/unit/generator/pdf/document/graphics/test_image.rb +5 -5
  130. data/test/unit/generator/pdf/document/test_font.rb +4 -10
  131. data/test/unit/generator/pdf/document/test_page.rb +13 -11
  132. data/test/unit/generator/pdf/document/test_parse_color.rb +5 -5
  133. data/test/unit/generator/test_base.rb +5 -5
  134. data/test/unit/generator/test_configuration.rb +4 -8
  135. data/test/unit/generator/test_pdf.rb +3 -2
  136. data/test/unit/layout/test_base.rb +16 -22
  137. data/test/unit/layout/test_format.rb +66 -86
  138. data/test/unit/layout/test_legacy_schema.rb +587 -0
  139. data/test/unit/layout/test_version.rb +20 -20
  140. data/test/unit/report/test_base.rb +32 -45
  141. data/test/unit/report/test_internal.rb +43 -99
  142. data/test/unit/test_config.rb +4 -2
  143. data/test/unit/test_layout.rb +1 -1
  144. metadata +20 -48
  145. data/examples/list_events/list_events_0_7_7.tlf +0 -1
  146. data/examples/list_events/list_events_0_8.tlf +0 -1
  147. data/lib/thinreports/core/events.rb +0 -69
  148. data/lib/thinreports/core/format/builder.rb +0 -62
  149. data/lib/thinreports/core/shape/list/configuration.rb +0 -54
  150. data/lib/thinreports/core/shape/list/events.rb +0 -47
  151. data/lib/thinreports/core/shape/list/store.rb +0 -33
  152. data/lib/thinreports/generator/pdf/configuration.rb +0 -33
  153. data/lib/thinreports/generator/pdf/document/parse_svg.rb +0 -104
  154. data/lib/thinreports/layout/configuration.rb +0 -29
  155. data/test/data/layout_block.tlf +0 -1
  156. data/test/data/layout_list.tlf +0 -1
  157. data/test/data/layout_list_noheader.tlf +0 -1
  158. data/test/data/layout_text1.tlf +0 -1
  159. data/test/data/layout_text2.tlf +0 -1
  160. data/test/unit/core/format/test_builder.rb +0 -109
  161. data/test/unit/core/shape/basic/test_basic_format.rb +0 -30
  162. data/test/unit/core/shape/image_block/test_format.rb +0 -58
  163. data/test/unit/core/shape/list/test_configuration.rb +0 -69
  164. data/test/unit/core/shape/list/test_events.rb +0 -36
  165. data/test/unit/core/shape/list/test_store.rb +0 -41
  166. data/test/unit/core/test_events.rb +0 -93
  167. data/test/unit/generator/pdf/document/test_draw_shape.rb +0 -44
  168. data/test/unit/generator/pdf/test_configuration.rb +0 -31
  169. data/test/unit/layout/test_configuration.rb +0 -21
  170. data/test/unit/report/test_events.rb +0 -22
@@ -1,33 +0,0 @@
1
- # coding: utf-8
2
-
3
- module Thinreports
4
- module Core::Shape
5
-
6
- class List::Store < ::Struct
7
- include Utils
8
-
9
- def self.init(attrs)
10
- new(attrs).new
11
- end
12
-
13
- def self.new(attrs)
14
- super(*attrs.keys) do
15
- @default_values = attrs.values
16
-
17
- def self.default_values
18
- deep_copy(@default_values)
19
- end
20
- end
21
- end
22
-
23
- def initialize
24
- super(*self.class.default_values)
25
- end
26
-
27
- def copy
28
- self.class.new
29
- end
30
- end
31
-
32
- end
33
- end
@@ -1,33 +0,0 @@
1
- # coding: utf-8
2
-
3
- module Thinreports
4
- module Generator
5
-
6
- # @deprecated This class will be removed in the next major version.
7
- class PDF::Configuration
8
- # @return [Array]
9
- attr_reader :eudc_fonts
10
-
11
- def initialize
12
- @eudc_fonts = []
13
- end
14
-
15
- # @param [String, Array<String>] fonts
16
- def eudc_fonts=(fonts)
17
- warn '[DEPRECATION] `eudc_fonts=` is deprecated and will be removed in ' +
18
- 'the next major version of thinreports. ' +
19
- 'Please use `Thinreports.config.fallback_fonts=` instead.'
20
-
21
- fonts = [fonts] unless fonts.is_a?(::Array)
22
-
23
- fonts.each do |f|
24
- unless File.extname(f.to_s) == '.ttf'
25
- raise ArgumentError, 'The EUDC Fonts can specify only the TTF file.'
26
- end
27
- end
28
- @eudc_fonts = fonts
29
- end
30
- end
31
-
32
- end
33
- end
@@ -1,104 +0,0 @@
1
- # coding: utf-8
2
-
3
- require 'rexml/document'
4
-
5
- module Thinreports
6
- module Generator
7
-
8
- module PDF::ParseSVG
9
- # @param [String] source
10
- # @param [String] base_path
11
- def parse_svg(source, base_path)
12
- svg = REXML::Document.new(clean_svg(source))
13
-
14
- svg.elements[base_path].each do |elm|
15
- case elm.attributes['class']
16
- when 's-text' then draw_svg_text(elm)
17
- when 's-image' then draw_svg_image(elm)
18
- when 's-rect' then draw_svg_rect(elm)
19
- when 's-ellipse' then draw_svg_ellipse(elm)
20
- when 's-line' then draw_svg_line(elm)
21
- end
22
- end
23
- end
24
-
25
- private
26
-
27
- # @param [String] source
28
- # @return [String]
29
- def clean_svg(source)
30
- source.gsub(/<%.+?%>/, '')
31
- end
32
-
33
- # @param [REXML::Element] elm
34
- # @param [Array<String>] keys
35
- # @return [Array<String>]
36
- def element_attributes_values_at(elm, *keys)
37
- attrs = elm.attributes
38
- keys.inject([]) do |values, key|
39
- values << attrs[key]
40
- end
41
- end
42
-
43
- # @param [REXML::Element] elm
44
- def draw_svg_rect(elm)
45
- x, y, w, h = element_attributes_values_at(elm, 'x', 'y', 'width', 'height')
46
- attributes = common_graphic_attrs(elm.attributes) do |attrs|
47
- attrs[:radius] = elm.attributes['rx']
48
- end
49
- rect(x, y, w, h, attributes)
50
- end
51
-
52
- # @see #draw_svg_rect
53
- def draw_svg_ellipse(elm)
54
- x, y, rx, ry = element_attributes_values_at(elm, 'cx', 'cy', 'rx', 'ry')
55
- ellipse(x, y, rx, ry,
56
- common_graphic_attrs(elm.attributes))
57
- end
58
-
59
- # @see #draw_svg_rect
60
- def draw_svg_line(elm)
61
- x1, y1, x2, y2 = element_attributes_values_at(elm, 'x1', 'y1', 'x2', 'y2')
62
- line(x1, y1, x2, y2,
63
- common_graphic_attrs(elm.attributes))
64
- end
65
-
66
- # @see #draw_svg_rect
67
- def draw_svg_text(elm)
68
- x, y, w, h = element_attributes_values_at(elm, 'x-left', 'x-top',
69
- 'x-width', 'x-height')
70
- content = []
71
- elm.each_element('text') do |text_elm|
72
- content << text_elm.text
73
- end
74
- text(content.join("\n"), x, y, w, h, svg_text_attrs(elm.attributes))
75
- end
76
-
77
- # @see #draw_svg_rect
78
- def draw_svg_image(elm)
79
- x, y, w, h = element_attributes_values_at(elm, 'x', 'y', 'width', 'height')
80
-
81
- image_type, image_data = extract_base64_string(elm.attributes['xlink:href'])
82
- base64image(image_type, image_data, x, y, w, h)
83
- end
84
-
85
- # @param [Hash] attributes
86
- # @return [Hash]
87
- def svg_text_attrs(attributes)
88
- common_text_attrs(attributes) do |attrs|
89
- # Set the :line_height option.
90
- line_height = attributes['x-line-height']
91
-
92
- if line_height && line_height != 'normal'
93
- attrs[:line_height] = line_height
94
- end
95
-
96
- # Set the :valign option.
97
- attrs[:valign] = text_valign(attributes['x-valign'])
98
- end
99
- end
100
-
101
- end
102
-
103
- end
104
- end
@@ -1,29 +0,0 @@
1
- # coding: utf-8
2
-
3
- module Thinreports
4
- module Layout
5
-
6
- # @deprecated This class will be removed in the next major version.
7
- class Configuration
8
- include Core::Shape::Manager::Target
9
-
10
- # @param [Thinreports::Layout::Base] layout
11
- def initialize(layout)
12
- initialize_manager(layout.format) do |f|
13
- Core::Shape::Configuration(f.type).new
14
- end
15
- end
16
-
17
- # @param [String, Symbol] shape_id
18
- # @return [Object, nil]
19
- def activate(shape_id)
20
- (config = manager.shapes[shape_id.to_sym]) && config.copy
21
- end
22
-
23
- def values
24
- raise NoMethodError
25
- end
26
- end
27
-
28
- end
29
- end
@@ -1 +0,0 @@
1
- {"version":"0.8.0","config":{"title":"","option":{},"page":{"paper-type":"A4","orientation":"portrait","margin-top":"20","margin-bottom":"20","margin-left":"20","margin-right":"20"}},"svg":"<svg width=\"595.2\" height=\"841.8\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"none\" viewBox=\"0 0 595.2 841.8\"><g class=\"canvas\"><!--SHAPE{\"type\":\"s-tblock\",\"id\":\"text_block1\",\"display\":\"true\",\"desc\":null,\"multiple\":\"false\",\"valign\":\"\",\"line-height\":\"\",\"box\":{\"x\":40,\"y\":60.9,\"width\":291.7,\"height\":21},\"inline-format\":\"false\",\"format\":{\"base\":\"\",\"type\":\"\"},\"value\":\"\",\"ref-id\":\"\",\"overflow\":\"\",\"word-wrap\":\"none\",\"svg\":{\"tag\":\"text\",\"attrs\":{\"x\":40,\"y\":77.9,\"xml:space\":\"preserve\",\"kerning\":\"auto\",\"letter-spacing\":\"normal\",\"id\":\"goog_773191970\",\"fill\":\"#000000\",\"fill-opacity\":\"1\",\"font-size\":\"18\",\"font-family\":\"Helvetica\",\"font-weight\":\"normal\",\"font-style\":\"normal\",\"text-anchor\":\"start\",\"text-decoration\":\"none\"}}}SHAPE--><!--LAYOUT<g xmlns=\"http://www.w3.org/2000/svg\" class=\"s-tblock\" x-format-type=\"\" x-value=\"\" x-format-base=\"\" x-ref-id=\"\" kerning=\"auto\" letter-spacing=\"normal\" x-display=\"true\" x-multiple=\"false\" id=\"goog_773191970\" x-id=\"text_block1\" fill=\"#000000\" fill-opacity=\"1\" font-size=\"18\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-anchor=\"start\" text-decoration=\"none\" x-width=\"291.7\" x-height=\"21\" x-left=\"40\" x-top=\"60.9\"><rect class=\"s-tblock-box\" stroke=\"none\" fill=\"#0096fd\" fill-opacity=\"0.2\" width=\"291.7\" height=\"21\" x=\"40\" y=\"60.9\"/><text class=\"s-tblock-id\" font-size=\"10.5\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-decoration=\"none\" text-anchor=\"start\" kerning=\"auto\" stroke=\"none\" fill=\"#0096fd\" fill-opacity=\"1\" x=\"44\" y=\"71.9\">text_block1</text></g>LAYOUT--><!--SHAPE{\"type\":\"s-tblock\",\"id\":\"text_block2\",\"display\":\"true\",\"desc\":null,\"multiple\":\"false\",\"valign\":\"\",\"line-height\":\"\",\"box\":{\"x\":40,\"y\":95,\"width\":291.7,\"height\":21},\"inline-format\":\"false\",\"format\":{\"base\":\"\",\"type\":\"\"},\"value\":\"\",\"ref-id\":\"\",\"overflow\":\"truncate\",\"word-wrap\":\"none\",\"svg\":{\"tag\":\"text\",\"attrs\":{\"x\":40,\"y\":112,\"xml:space\":\"preserve\",\"kerning\":\"auto\",\"letter-spacing\":\"normal\",\"id\":\"goog_773191972\",\"fill\":\"#000000\",\"fill-opacity\":\"1\",\"font-size\":\"18\",\"font-family\":\"Helvetica\",\"font-weight\":\"normal\",\"font-style\":\"normal\",\"text-decoration\":\"none\",\"text-anchor\":\"start\"}}}SHAPE--><!--LAYOUT<g xmlns=\"http://www.w3.org/2000/svg\" class=\"s-tblock\" x-format-type=\"\" x-value=\"\" x-format-base=\"\" x-ref-id=\"\" kerning=\"auto\" letter-spacing=\"normal\" x-display=\"true\" x-multiple=\"false\" id=\"goog_773191972\" x-id=\"text_block2\" x-width=\"291.7\" x-height=\"21\" x-left=\"40\" x-top=\"95\" fill=\"#000000\" fill-opacity=\"1\" font-size=\"18\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-decoration=\"none\" text-anchor=\"start\" x-overflow=\"truncate\" x-word-wrap=\"none\" x-inline-format=\"false\"><rect class=\"s-tblock-box\" stroke=\"none\" fill=\"#0096fd\" fill-opacity=\"0.2\" width=\"291.7\" height=\"21\" x=\"40\" y=\"95\"/><text class=\"s-tblock-id\" font-size=\"10.5\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-decoration=\"none\" text-anchor=\"start\" kerning=\"auto\" stroke=\"none\" fill=\"#0096fd\" fill-opacity=\"1\" x=\"44\" y=\"106\">text_block2</text></g>LAYOUT--><!--SHAPE{\"type\":\"s-iblock\",\"id\":\"image_block1\",\"display\":\"true\",\"desc\":null,\"box\":{\"x\":40,\"y\":150,\"width\":288.7,\"height\":127.8},\"position-x\":\"left\",\"position-y\":\"top\",\"svg\":{\"tag\":\"image\",\"attrs\":{\"x\":40,\"y\":150,\"width\":288.7,\"height\":127.8}}}SHAPE--><!--LAYOUT<g xmlns=\"http://www.w3.org/2000/svg\" class=\"s-iblock\" x-display=\"true\" id=\"goog_773191973\" x-id=\"image_block1\" x-width=\"288.7\" x-height=\"127.8\" x-left=\"40\" x-top=\"150\"><rect class=\"s-iblock-box\" stroke=\"none\" fill=\"#0096fd\" fill-opacity=\"0.2\" width=\"288.7\" height=\"127.8\" x=\"40\" y=\"150\"/><image width=\"16\" height=\"16\" class=\"s-iblock-mark\" opacity=\"0.5\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"assets/icons/x-image-mark.svg\" display=\"inline\" x=\"176\" y=\"205\"/><text class=\"s-iblock-id\" font-size=\"10.5\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-decoration=\"none\" text-anchor=\"start\" kerning=\"auto\" stroke=\"none\" fill=\"#0096fd\" fill-opacity=\"1\" x=\"44\" y=\"161\">image_block1</text></g>LAYOUT--><!--SHAPE{\"type\":\"s-iblock\",\"id\":\"image_block2\",\"display\":\"true\",\"desc\":null,\"box\":{\"x\":40,\"y\":295,\"width\":288.7,\"height\":127.8},\"position-x\":\"left\",\"position-y\":\"top\",\"svg\":{\"tag\":\"image\",\"attrs\":{\"x\":40,\"y\":295,\"width\":288.7,\"height\":127.8}}}SHAPE--><!--LAYOUT<g xmlns=\"http://www.w3.org/2000/svg\" class=\"s-iblock\" x-display=\"true\" id=\"goog_773191974\" x-id=\"image_block2\" x-width=\"288.7\" x-height=\"127.8\" x-left=\"40\" x-top=\"295\" x-position-x=\"left\" x-position-y=\"top\"><rect class=\"s-iblock-box\" stroke=\"none\" fill=\"#0096fd\" fill-opacity=\"0.2\" width=\"288.7\" height=\"127.8\" x=\"40\" y=\"295\"/><image width=\"16\" height=\"16\" class=\"s-iblock-mark\" opacity=\"0.5\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xlink:href=\"assets/icons/x-image-mark.svg\" display=\"inline\" x=\"176\" y=\"350\"/><text class=\"s-iblock-id\" font-size=\"10.5\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-decoration=\"none\" text-anchor=\"start\" kerning=\"auto\" stroke=\"none\" fill=\"#0096fd\" fill-opacity=\"1\" x=\"44\" y=\"306\">image_block2</text></g>LAYOUT--></g></svg>","state":{"layout-guide":[]}}
@@ -1 +0,0 @@
1
- {"version":"0.7.7.1","finger-print":-1511277400,"config":{"title":"Basic List Layout","option":{},"page":{"paper-type":"A4","orientation":"portrait","margin-top":"20","margin-bottom":"20","margin-left":"20","margin-right":"20"}},"svg":"<svg width=\"595.2\" height=\"841.8\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"none\" viewBox=\"0 0 595.2 841.8\"><g class=\"canvas\"><!--SHAPE{\"type\":\"s-list\",\"id\":\"list\",\"display\":\"true\",\"desc\":null,\"footer\":{\"height\":55.5,\"svg\":{\"tag\":\"g\",\"content\":\"<g xmlns=\\\"http://www.w3.org/2000/svg\\\" class=\\\"s-text\\\" stroke-width=\\\"0\\\" fill=\\\"#000000\\\" fill-opacity=\\\"1\\\" kerning=\\\"auto\\\" x-display=\\\"true\\\" x-id=\\\"\\\" stroke=\\\"none\\\" font-weight=\\\"normal\\\" font-style=\\\"normal\\\" font-family=\\\"Helvetica\\\" font-size=\\\"18\\\" text-anchor=\\\"start\\\" text-decoration=\\\"none\\\" x-width=\\\"53\\\" x-height=\\\"18\\\" x-left=\\\"271.1\\\" x-top=\\\"318.3\\\" id=\\\"goog_2086231731\\\"><rect class=\\\"s-text-box\\\" stroke=\\\"none\\\" fill=\\\"#000000\\\" fill-opacity=\\\"0.001\\\" width=\\\"53\\\" height=\\\"18\\\" x=\\\"271.1\\\" y=\\\"318.3\\\"/><text class=\\\"s-text-l0\\\" xml:space=\\\"preserve\\\" stroke=\\\"none\\\" fill=\\\"inherit\\\" fill-opacity=\\\"1\\\" text-decoration=\\\"none\\\" x=\\\"271.1\\\" y=\\\"335.3\\\">Footer</text></g>\"},\"translate\":{\"x\":0,\"y\":-217.5}},\"footer-enabled\":\"true\",\"page-footer\":{\"height\":55.5,\"svg\":{\"tag\":\"g\",\"content\":\"<g xmlns=\\\"http://www.w3.org/2000/svg\\\" class=\\\"s-text\\\" stroke-width=\\\"0\\\" fill=\\\"#000000\\\" fill-opacity=\\\"1\\\" kerning=\\\"auto\\\" x-display=\\\"true\\\" x-id=\\\"\\\" stroke=\\\"none\\\" font-weight=\\\"normal\\\" font-style=\\\"normal\\\" font-family=\\\"Helvetica\\\" font-size=\\\"18\\\" text-anchor=\\\"start\\\" text-decoration=\\\"none\\\" x-width=\\\"99\\\" x-height=\\\"18\\\" x-left=\\\"248.1\\\" x-top=\\\"262.8\\\" id=\\\"goog_2086231730\\\"><rect class=\\\"s-text-box\\\" stroke=\\\"none\\\" fill=\\\"#000000\\\" fill-opacity=\\\"0.001\\\" width=\\\"99\\\" height=\\\"18\\\" x=\\\"248.1\\\" y=\\\"262.8\\\"/><text class=\\\"s-text-l0\\\" xml:space=\\\"preserve\\\" stroke=\\\"none\\\" fill=\\\"inherit\\\" fill-opacity=\\\"1\\\" text-decoration=\\\"none\\\" x=\\\"248.1\\\" y=\\\"279.8\\\">Page Footer</text></g>\"},\"translate\":{\"x\":0,\"y\":-162}},\"page-footer-enabled\":\"true\",\"detail\":{\"height\":50,\"svg\":{\"tag\":\"g\",\"content\":\"<g xmlns=\\\"http://www.w3.org/2000/svg\\\" class=\\\"s-text\\\" stroke-width=\\\"0\\\" fill=\\\"#000000\\\" fill-opacity=\\\"1\\\" kerning=\\\"auto\\\" x-display=\\\"true\\\" x-id=\\\"\\\" font-size=\\\"18\\\" font-family=\\\"Helvetica\\\" font-weight=\\\"normal\\\" font-style=\\\"normal\\\" text-anchor=\\\"start\\\" text-decoration=\\\"none\\\" x-width=\\\"47\\\" x-height=\\\"18\\\" x-left=\\\"274.1\\\" x-top=\\\"186\\\" id=\\\"goog_2086231729\\\"><rect class=\\\"s-text-box\\\" stroke=\\\"none\\\" fill=\\\"#000000\\\" fill-opacity=\\\"0.001\\\" width=\\\"47\\\" height=\\\"18\\\" x=\\\"274.1\\\" y=\\\"186\\\"/><text class=\\\"s-text-l0\\\" xml:space=\\\"preserve\\\" stroke=\\\"none\\\" fill=\\\"inherit\\\" fill-opacity=\\\"1\\\" text-decoration=\\\"none\\\" x=\\\"274.1\\\" y=\\\"203\\\">Detail</text></g>\"},\"translate\":{\"x\":0,\"y\":-88}},\"header\":{\"height\":61,\"svg\":{\"tag\":\"g\",\"content\":\"<g xmlns=\\\"http://www.w3.org/2000/svg\\\" class=\\\"s-text\\\" stroke-width=\\\"0\\\" fill=\\\"#000000\\\" fill-opacity=\\\"1\\\" kerning=\\\"auto\\\" x-display=\\\"true\\\" x-id=\\\"\\\" font-size=\\\"18\\\" font-family=\\\"Helvetica\\\" font-weight=\\\"normal\\\" font-style=\\\"normal\\\" text-anchor=\\\"start\\\" text-decoration=\\\"none\\\" x-width=\\\"60\\\" x-height=\\\"18\\\" x-left=\\\"267.6\\\" x-top=\\\"116\\\" id=\\\"goog_2086231728\\\"><rect class=\\\"s-text-box\\\" stroke=\\\"none\\\" fill=\\\"#000000\\\" fill-opacity=\\\"0.001\\\" width=\\\"60\\\" height=\\\"18\\\" x=\\\"267.6\\\" y=\\\"116\\\"/><text class=\\\"s-text-l0\\\" xml:space=\\\"preserve\\\" stroke=\\\"none\\\" fill=\\\"inherit\\\" fill-opacity=\\\"1\\\" text-decoration=\\\"none\\\" x=\\\"267.6\\\" y=\\\"133\\\">Header</text></g>\"},\"translate\":{\"x\":0,\"y\":-75}},\"header-enabled\":\"true\",\"svg\":{\"tag\":\"g\",\"attrs\":{}},\"content-height\":261.1,\"page-break\":\"true\"}SHAPE--><!--LAYOUT<g xmlns=\"http://www.w3.org/2000/svg\" class=\"s-list\" x-id=\"list\" x-header-enabled=\"true\" x-page-footer-enabled=\"true\" x-footer-enabled=\"true\" x-changing-page=\"true\" x-display=\"true\" width=\"555.2\" height=\"322.1\" x=\"20\" y=\"21\" id=\"goog_2086231732\"><g class=\"s-list-header\" transform=\"translate(0,-75) rotate(0 0 0)\" x-top=\"21\" x-height=\"61\"><g class=\"s-text\" stroke-width=\"0\" fill=\"#000000\" fill-opacity=\"1\" kerning=\"auto\" x-display=\"true\" x-id=\"\" font-size=\"18\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-anchor=\"start\" text-decoration=\"none\" x-width=\"60\" x-height=\"18\" x-left=\"267.6\" x-top=\"116\" id=\"goog_2086231728\"><rect class=\"s-text-box\" stroke=\"none\" fill=\"#000000\" fill-opacity=\"0.001\" width=\"60\" height=\"18\" x=\"267.6\" y=\"116\"/><text class=\"s-text-l0\" xml:space=\"preserve\" stroke=\"none\" fill=\"inherit\" fill-opacity=\"1\" text-decoration=\"none\" x=\"267.6\" y=\"133\">Header</text></g></g><g class=\"s-list-detail\" transform=\"translate(0,-88) rotate(0 0 0)\" x-top=\"82\" x-height=\"50\"><g class=\"s-text\" stroke-width=\"0\" fill=\"#000000\" fill-opacity=\"1\" kerning=\"auto\" x-display=\"true\" x-id=\"\" font-size=\"18\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-anchor=\"start\" text-decoration=\"none\" x-width=\"47\" x-height=\"18\" x-left=\"274.1\" x-top=\"186\" id=\"goog_2086231729\"><rect class=\"s-text-box\" stroke=\"none\" fill=\"#000000\" fill-opacity=\"0.001\" width=\"47\" height=\"18\" x=\"274.1\" y=\"186\"/><text class=\"s-text-l0\" xml:space=\"preserve\" stroke=\"none\" fill=\"inherit\" fill-opacity=\"1\" text-decoration=\"none\" x=\"274.1\" y=\"203\">Detail</text></g></g><g class=\"s-list-page-footer\" transform=\"translate(0,-112) rotate(0 0 0)\" x-top=\"132\" x-height=\"55.5\"><g class=\"s-text\" stroke-width=\"0\" fill=\"#000000\" fill-opacity=\"1\" kerning=\"auto\" x-display=\"true\" x-id=\"\" stroke=\"none\" font-weight=\"normal\" font-style=\"normal\" font-family=\"Helvetica\" font-size=\"18\" text-anchor=\"start\" text-decoration=\"none\" x-width=\"99\" x-height=\"18\" x-left=\"248.1\" x-top=\"262.8\" id=\"goog_2086231730\"><rect class=\"s-text-box\" stroke=\"none\" fill=\"#000000\" fill-opacity=\"0.001\" width=\"99\" height=\"18\" x=\"248.1\" y=\"262.8\"/><text class=\"s-text-l0\" xml:space=\"preserve\" stroke=\"none\" fill=\"inherit\" fill-opacity=\"1\" text-decoration=\"none\" x=\"248.1\" y=\"279.8\">Page Footer</text></g></g><g class=\"s-list-footer\" transform=\"translate(0,-112) rotate(0 0 0)\" x-top=\"187.5\" x-height=\"55.5\"><g class=\"s-text\" stroke-width=\"0\" fill=\"#000000\" fill-opacity=\"1\" kerning=\"auto\" x-display=\"true\" x-id=\"\" stroke=\"none\" font-weight=\"normal\" font-style=\"normal\" font-family=\"Helvetica\" font-size=\"18\" text-anchor=\"start\" text-decoration=\"none\" x-width=\"53\" x-height=\"18\" x-left=\"271.1\" x-top=\"318.3\" id=\"goog_2086231731\"><rect class=\"s-text-box\" stroke=\"none\" fill=\"#000000\" fill-opacity=\"0.001\" width=\"53\" height=\"18\" x=\"271.1\" y=\"318.3\"/><text class=\"s-text-l0\" xml:space=\"preserve\" stroke=\"none\" fill=\"inherit\" fill-opacity=\"1\" text-decoration=\"none\" x=\"271.1\" y=\"335.3\">Footer</text></g></g><text class=\"s-list-id\" font-size=\"11\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-anchor=\"start\" stroke=\"none\" fill=\"#7C4007\" fill-opacity=\"1\" x=\"22\" y=\"31.8\">list</text><rect stroke-dasharray=\"5\" stroke=\"#BBBBBB\" stroke-width=\"1\" fill=\"#FFFFFF\" fill-opacity=\"0\" class=\"s-list-face\" width=\"555.2\" height=\"322.1\" x=\"20\" y=\"21\"/></g>LAYOUT--></g></svg>","state":{"layout-guide":[]}}
@@ -1 +0,0 @@
1
- {"version":"0.7.7.1","finger-print":1145350506,"config":{"title":"Basic List (No Header) Layout","option":{},"page":{"paper-type":"A4","orientation":"portrait","margin-top":"20","margin-bottom":"20","margin-left":"20","margin-right":"20"}},"svg":"<svg width=\"595.2\" height=\"841.8\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"none\" viewBox=\"0 0 595.2 841.8\"><g class=\"canvas\"><!--SHAPE{\"type\":\"s-list\",\"id\":\"default\",\"display\":\"true\",\"desc\":null,\"footer\":{\"height\":55.5,\"svg\":{\"tag\":\"g\",\"content\":\"<g xmlns=\\\"http://www.w3.org/2000/svg\\\" class=\\\"s-text\\\" stroke-width=\\\"0\\\" fill=\\\"#000000\\\" fill-opacity=\\\"1\\\" kerning=\\\"auto\\\" x-display=\\\"true\\\" x-id=\\\"\\\" stroke=\\\"none\\\" font-weight=\\\"normal\\\" font-style=\\\"normal\\\" font-family=\\\"Helvetica\\\" font-size=\\\"18\\\" text-anchor=\\\"start\\\" text-decoration=\\\"none\\\" x-width=\\\"53\\\" x-height=\\\"18\\\" x-left=\\\"271.1\\\" x-top=\\\"318.3\\\" id=\\\"goog_2086231735\\\"><rect class=\\\"s-text-box\\\" stroke=\\\"none\\\" fill=\\\"#000000\\\" fill-opacity=\\\"0.001\\\" width=\\\"53\\\" height=\\\"18\\\" x=\\\"271.1\\\" y=\\\"318.3\\\"/><text class=\\\"s-text-l0\\\" xml:space=\\\"preserve\\\" stroke=\\\"none\\\" fill=\\\"inherit\\\" fill-opacity=\\\"1\\\" text-decoration=\\\"none\\\" x=\\\"271.1\\\" y=\\\"335.3\\\">Footer</text></g>\"},\"translate\":{\"x\":0,\"y\":-278.5}},\"footer-enabled\":\"true\",\"page-footer\":{\"height\":55.5,\"svg\":{\"tag\":\"g\",\"content\":\"<g xmlns=\\\"http://www.w3.org/2000/svg\\\" class=\\\"s-text\\\" stroke-width=\\\"0\\\" fill=\\\"#000000\\\" fill-opacity=\\\"1\\\" kerning=\\\"auto\\\" x-display=\\\"true\\\" x-id=\\\"\\\" stroke=\\\"none\\\" font-weight=\\\"normal\\\" font-style=\\\"normal\\\" font-family=\\\"Helvetica\\\" font-size=\\\"18\\\" text-anchor=\\\"start\\\" text-decoration=\\\"none\\\" x-width=\\\"99\\\" x-height=\\\"18\\\" x-left=\\\"248.1\\\" x-top=\\\"262.8\\\" id=\\\"goog_2086231734\\\"><rect class=\\\"s-text-box\\\" stroke=\\\"none\\\" fill=\\\"#000000\\\" fill-opacity=\\\"0.001\\\" width=\\\"99\\\" height=\\\"18\\\" x=\\\"248.1\\\" y=\\\"262.8\\\"/><text class=\\\"s-text-l0\\\" xml:space=\\\"preserve\\\" stroke=\\\"none\\\" fill=\\\"inherit\\\" fill-opacity=\\\"1\\\" text-decoration=\\\"none\\\" x=\\\"248.1\\\" y=\\\"279.8\\\">Page Footer</text></g>\"},\"translate\":{\"x\":0,\"y\":-223}},\"page-footer-enabled\":\"true\",\"detail\":{\"height\":50,\"svg\":{\"tag\":\"g\",\"content\":\"<g xmlns=\\\"http://www.w3.org/2000/svg\\\" class=\\\"s-text\\\" stroke-width=\\\"0\\\" fill=\\\"#000000\\\" fill-opacity=\\\"1\\\" kerning=\\\"auto\\\" x-display=\\\"true\\\" x-id=\\\"\\\" font-size=\\\"18\\\" font-family=\\\"Helvetica\\\" font-weight=\\\"normal\\\" font-style=\\\"normal\\\" text-anchor=\\\"start\\\" text-decoration=\\\"none\\\" x-width=\\\"47\\\" x-height=\\\"18\\\" x-left=\\\"274.1\\\" x-top=\\\"186\\\" id=\\\"goog_2086231733\\\"><rect class=\\\"s-text-box\\\" stroke=\\\"none\\\" fill=\\\"#000000\\\" fill-opacity=\\\"0.001\\\" width=\\\"47\\\" height=\\\"18\\\" x=\\\"274.1\\\" y=\\\"186\\\"/><text class=\\\"s-text-l0\\\" xml:space=\\\"preserve\\\" stroke=\\\"none\\\" fill=\\\"inherit\\\" fill-opacity=\\\"1\\\" text-decoration=\\\"none\\\" x=\\\"274.1\\\" y=\\\"203\\\">Detail</text></g>\"},\"translate\":{\"x\":0,\"y\":-149}},\"header\":{},\"header-enabled\":\"false\",\"svg\":{\"tag\":\"g\",\"attrs\":{}},\"content-height\":322.1,\"page-break\":\"true\"}SHAPE--><!--LAYOUT<g xmlns=\"http://www.w3.org/2000/svg\" class=\"s-list\" x-id=\"default\" x-header-enabled=\"false\" x-page-footer-enabled=\"true\" x-footer-enabled=\"true\" x-changing-page=\"true\" x-display=\"true\" width=\"555.2\" height=\"322.1\" x=\"20\" y=\"21\" id=\"goog_2086231736\"><g class=\"s-list-header\" transform=\"translate(0,-75) rotate(0 0 0)\" x-top=\"21\" x-height=\"0\" display=\"none\"/><g class=\"s-list-detail\" transform=\"translate(0,-149) rotate(0 0 0)\" x-top=\"21\" x-height=\"50\"><g class=\"s-text\" stroke-width=\"0\" fill=\"#000000\" fill-opacity=\"1\" kerning=\"auto\" x-display=\"true\" x-id=\"\" font-size=\"18\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-anchor=\"start\" text-decoration=\"none\" x-width=\"47\" x-height=\"18\" x-left=\"274.1\" x-top=\"186\" id=\"goog_2086231733\"><rect class=\"s-text-box\" stroke=\"none\" fill=\"#000000\" fill-opacity=\"0.001\" width=\"47\" height=\"18\" x=\"274.1\" y=\"186\"/><text class=\"s-text-l0\" xml:space=\"preserve\" stroke=\"none\" fill=\"inherit\" fill-opacity=\"1\" text-decoration=\"none\" x=\"274.1\" y=\"203\">Detail</text></g></g><g class=\"s-list-page-footer\" transform=\"translate(0,-173) rotate(0 0 0)\" x-top=\"71\" x-height=\"55.5\"><g class=\"s-text\" stroke-width=\"0\" fill=\"#000000\" fill-opacity=\"1\" kerning=\"auto\" x-display=\"true\" x-id=\"\" stroke=\"none\" font-weight=\"normal\" font-style=\"normal\" font-family=\"Helvetica\" font-size=\"18\" text-anchor=\"start\" text-decoration=\"none\" x-width=\"99\" x-height=\"18\" x-left=\"248.1\" x-top=\"262.8\" id=\"goog_2086231734\"><rect class=\"s-text-box\" stroke=\"none\" fill=\"#000000\" fill-opacity=\"0.001\" width=\"99\" height=\"18\" x=\"248.1\" y=\"262.8\"/><text class=\"s-text-l0\" xml:space=\"preserve\" stroke=\"none\" fill=\"inherit\" fill-opacity=\"1\" text-decoration=\"none\" x=\"248.1\" y=\"279.8\">Page Footer</text></g></g><g class=\"s-list-footer\" transform=\"translate(0,-173) rotate(0 0 0)\" x-top=\"126.5\" x-height=\"55.5\"><g class=\"s-text\" stroke-width=\"0\" fill=\"#000000\" fill-opacity=\"1\" kerning=\"auto\" x-display=\"true\" x-id=\"\" stroke=\"none\" font-weight=\"normal\" font-style=\"normal\" font-family=\"Helvetica\" font-size=\"18\" text-anchor=\"start\" text-decoration=\"none\" x-width=\"53\" x-height=\"18\" x-left=\"271.1\" x-top=\"318.3\" id=\"goog_2086231735\"><rect class=\"s-text-box\" stroke=\"none\" fill=\"#000000\" fill-opacity=\"0.001\" width=\"53\" height=\"18\" x=\"271.1\" y=\"318.3\"/><text class=\"s-text-l0\" xml:space=\"preserve\" stroke=\"none\" fill=\"inherit\" fill-opacity=\"1\" text-decoration=\"none\" x=\"271.1\" y=\"335.3\">Footer</text></g></g><text class=\"s-list-id\" font-size=\"11\" font-family=\"Helvetica\" font-weight=\"normal\" font-style=\"normal\" text-anchor=\"start\" stroke=\"none\" fill=\"#7C4007\" fill-opacity=\"1\" x=\"22\" y=\"31.8\">default</text><rect stroke-dasharray=\"5\" stroke=\"#BBBBBB\" stroke-width=\"1\" fill=\"#FFFFFF\" fill-opacity=\"0\" class=\"s-list-face\" width=\"555.2\" height=\"322.1\" x=\"20\" y=\"21\"/></g>LAYOUT--></g></svg>","state":{"layout-guide":[]}}
@@ -1 +0,0 @@
1
- {"version":"0.7.7.1","finger-print":1504945686,"config":{"title":"Basic Layout","option":{},"page":{"paper-type":"A4","orientation":"portrait","margin-top":"20","margin-bottom":"20","margin-left":"20","margin-right":"20"}},"svg":"<svg width=\"595.2\" height=\"841.8\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"none\" viewBox=\"0 0 595.2 841.8\"><g class=\"canvas\"><g class=\"s-text\" stroke-width=\"0\" fill=\"#000000\" fill-opacity=\"1\" kerning=\"auto\" x-display=\"true\" x-id=\"\" font-size=\"36\" font-family=\"Times New Roman\" font-weight=\"normal\" font-style=\"normal\" text-anchor=\"middle\" text-decoration=\"none\" x-width=\"208.9\" x-height=\"100\" x-left=\"197.6\" x-top=\"369\" x-valign=\"center\" id=\"goog_2086231726\"><rect class=\"s-text-box\" stroke=\"none\" fill=\"#000000\" fill-opacity=\"0.001\" width=\"208.9\" height=\"100\" x=\"197.6\" y=\"369\"/><text class=\"s-text-l0\" xml:space=\"preserve\" stroke=\"none\" fill=\"inherit\" fill-opacity=\"1\" text-decoration=\"none\" x=\"300.6\" y=\"427\">Basic Layout1</text></g></g></svg>","state":{"layout-guide":[]}}
@@ -1 +0,0 @@
1
- {"version":"0.7.7.1","finger-print":1756736661,"config":{"title":"Basic Layout2","option":{},"page":{"paper-type":"A4","orientation":"portrait","margin-top":"20","margin-bottom":"20","margin-left":"20","margin-right":"20"}},"svg":"<svg width=\"595.2\" height=\"841.8\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" preserveAspectRatio=\"none\" viewBox=\"0 0 595.2 841.8\"><g class=\"canvas\"><g class=\"s-text\" stroke-width=\"0\" fill=\"#000000\" fill-opacity=\"1\" kerning=\"auto\" x-display=\"true\" x-id=\"\" stroke=\"none\" font-weight=\"normal\" font-style=\"normal\" font-family=\"Times New Roman\" font-size=\"36\" text-anchor=\"middle\" x-valign=\"center\" text-decoration=\"none\" x-width=\"208.9\" x-height=\"100\" x-left=\"197.6\" x-top=\"369\" id=\"goog_2086231727\"><rect class=\"s-text-box\" stroke=\"none\" fill=\"#000000\" fill-opacity=\"0.001\" width=\"208.9\" height=\"100\" x=\"197.6\" y=\"369\"/><text class=\"s-text-l0\" xml:space=\"preserve\" stroke=\"none\" fill=\"inherit\" fill-opacity=\"1\" text-decoration=\"none\" x=\"300.6\" y=\"427\">Basic Layout2</text></g></g></svg>","state":{"layout-guide":[]}}
@@ -1,109 +0,0 @@
1
- # coding: utf-8
2
-
3
- require 'test_helper'
4
-
5
- class Thinreports::Core::Format::TestBuilder < Minitest::Test
6
- include Thinreports::TestHelper
7
-
8
- TEST_RAW_FORMAT = <<-'EOS'
9
- {
10
- "node1": "あ漢字@㈱Ⅰカナカナ",
11
- "node2": { "node2_child":"node2_child value" },
12
- "layout":
13
- "<svg width=\"595.2\" height=\"841.8\">
14
- <g class=\"canvas\">
15
- <rect x=\"100\" y=\"100\" width=\"100\" height=\"100\" fill=\"red\" x-attr=\"cleaned attr\"></rect>
16
- <!--SHAPE{\"type\":\"s-tblock\",\"id\":\"t1\",\"attrs\":{\"x\":58,\"y\":103.6}}SHAPE-->
17
- <!--LAYOUT<text x=\"60\" y=\"103\">t1</text>LAYOUT-->
18
- </g>
19
- </svg>"
20
- }
21
- EOS
22
-
23
- class TestFormat < Thinreports::Core::Format::Base
24
- extend ::Thinreports::Core::Format::Builder
25
- config_reader :layout
26
- config_accessor :shapes
27
- end
28
-
29
- def setup
30
- @raw_format = clean_whitespaces(TEST_RAW_FORMAT)
31
- end
32
-
33
- def test_parse_json
34
- expected_format = {
35
- "node1" => "あ漢字@㈱Ⅰカナカナ",
36
- "node2" => {
37
- "node2_child" => "node2_child value"
38
- },
39
- "layout" => clean_whitespaces(<<-EOS)
40
- <svg width=\"595.2\" height=\"841.8\">
41
- <g class=\"canvas\">
42
- <rect x=\"100\" y=\"100\" width=\"100\" height=\"100\" fill=\"red\" x-attr=\"cleaned attr\"></rect>
43
- <!--SHAPE{\"type\":\"s-tblock\",\"id\":\"t1\",\"attrs\":{\"x\":58,\"y\":103.6}}SHAPE-->
44
- <!--LAYOUT<text x=\"60\" y=\"103\">t1</text>LAYOUT-->
45
- </g>
46
- </svg>
47
- EOS
48
- }
49
- assert_equal TestFormat.parse_json(@raw_format), expected_format
50
- end
51
-
52
- def test_build_layout
53
- format = TestFormat.new(TestFormat.parse_json(@raw_format))
54
- format.shapes = {}
55
-
56
- TestFormat.build_layout(format) do |type, f|
57
- Thinreports::Core::Shape::Format(type).build(f)
58
- end
59
-
60
- assert_equal format.layout, clean_whitespaces(<<-'EOS')
61
- <svg width="595.2" height="841.8">
62
- <g class="canvas">
63
- <rect x="100" y="100" width="100" height="100" fill="red" x-attr="cleaned attr"></rect>
64
- <!--LAYOUT<text x="60" y="103">t1</text>LAYOUT-->
65
- </g>
66
- </svg>
67
- EOS
68
- assert_includes format.shapes.keys, :t1
69
- end
70
-
71
- def test_clean
72
- source = clean_whitespaces(<<-'EOS')
73
- <svg width="595.2" height="841.8">
74
- <rect x="100" y="100" width="100" height="100" fill="red"></rect>
75
- <!--LAYOUT<text x="60" y="103">t1</text>LAYOUT-->
76
- <!---LAYOUT<text x="60" y="103">t1</text>LAYOUT--->
77
- </svg>
78
- EOS
79
- TestFormat.clean(source)
80
-
81
- assert_equal source, clean_whitespaces(<<-'EOS')
82
- <svg width="595.2" height="841.8">
83
- <rect x="100" y="100" width="100" height="100" fill="red"></rect>
84
- </svg>
85
- EOS
86
- end
87
-
88
- def test_clean_with_attributes
89
- source = clean_whitespaces(<<-'EOS')
90
- <svg width="595.2" height="841.8">
91
- <!--LAYOUT<text x="60" y="103">t1</text>LAYOUT-->
92
- <rect x="100" y="100" x-hoge="hoge" width="100" class="foo"></rect>
93
- <!---LAYOUT<text x="60" y="103">t1</text>LAYOUT--->
94
- </svg>
95
- EOS
96
- TestFormat.clean_with_attributes(source)
97
-
98
- assert_equal source, clean_whitespaces(<<-'EOS')
99
- <svg width="595.2" height="841.8">
100
- <rect x="100" y="100" width="100"></rect>
101
- </svg>
102
- EOS
103
- end
104
-
105
- def test_shape_tag
106
- shape_format = stub(id: :foo)
107
- assert_equal TestFormat.shape_tag(shape_format), '<%= r(:"foo")%>'
108
- end
109
- end
@@ -1,30 +0,0 @@
1
- # coding: utf-8
2
-
3
- require 'test_helper'
4
-
5
- class Thinreports::Core::Shape::Basic::TestBlockFormat < Minitest::Test
6
- include Thinreports::TestHelper
7
-
8
- TEST_BLOCK_FORMAT = {
9
- "value" => "default value",
10
- "box" => {
11
- "x" => 100.0,
12
- "y" => 100.0,
13
- "width" => 100.0,
14
- "height" => 100.0
15
- }
16
- }
17
-
18
- def test_value_reader_via_TEST_BLOCK_FORMAT
19
- assert_equal format.value, 'default value'
20
- end
21
-
22
- def test_box_reader_via_TEST_BLOCK_FORMAT
23
- assert_equal format.box.values_at('x', 'y', 'width', 'height'),
24
- [100.0, 100.0, 100.0, 100.0]
25
- end
26
-
27
- def format
28
- Thinreports::Core::Shape::Basic::BlockFormat.new(TEST_BLOCK_FORMAT)
29
- end
30
- end
@@ -1,58 +0,0 @@
1
- # coding: utf-8
2
-
3
- require 'test_helper'
4
-
5
- class Thinreports::Core::Shape::ImageBlock::TestFormat < Minitest::Test
6
- include Thinreports::TestHelper
7
-
8
- TEST_IMAGE_BLOCK_FORMAT = {
9
- "type" => "s-iblock",
10
- "id" => "image",
11
- "display" => "true",
12
- "box" => {
13
- "x" => 100.0,
14
- "y" => 100.0,
15
- "width" => 100.0,
16
- "height" => 100.0
17
- },
18
- "position-x" => "left",
19
- "position-y" => "top",
20
- "svg" => {
21
- "tag" => "image",
22
- "attrs" => {
23
- "x" => 100.0,
24
- "y" => 100.0,
25
- "width" => 100.0,
26
- "height" => 100.0
27
- }
28
- }
29
- }
30
-
31
- def test_build
32
- build_format
33
- rescue => e
34
- flunk exception_details(e, 'Building failed.')
35
- end
36
-
37
- def test_box_reader_via_TEST_IMAGE_BLOCK_FORMAT
38
- assert_equal format(TEST_IMAGE_BLOCK_FORMAT).box.values_at('x', 'y', 'width', 'height'),
39
- [100.0, 100.0, 100.0, 100.0]
40
- end
41
-
42
- def test_position_x_reader_via_TEST_IMAGE_BLOCK_FORMAT
43
- assert_equal format(TEST_IMAGE_BLOCK_FORMAT).position_x, 'left'
44
- end
45
-
46
- def test_position_y_reader_via_TEST_IMAGE_BLOCK_FORMAT
47
- assert_equal format(TEST_IMAGE_BLOCK_FORMAT).position_y, 'top'
48
- end
49
-
50
- def build_format
51
- Thinreports::Core::Shape::ImageBlock::Format.build(TEST_IMAGE_BLOCK_FORMAT)
52
- end
53
-
54
- def format(data)
55
- Thinreports::Core::Shape::ImageBlock::Format.new(data)
56
- end
57
-
58
- end
@@ -1,69 +0,0 @@
1
- # coding: utf-8
2
-
3
- require 'test_helper'
4
-
5
- class Thinreports::Core::Shape::List::TestConfiguration < Minitest::Test
6
- include Thinreports::TestHelper
7
-
8
- List = Thinreports::Core::Shape::List
9
-
10
- def setup
11
- @events = mock('events')
12
- @store = mock('store')
13
- @config = List::Configuration.new
14
- end
15
-
16
- def test_use_stores
17
- List::Store.expects(:init).once
18
-
19
- @config.use_stores(a: 0, b: 0)
20
- end
21
-
22
- def test_events
23
- assert_instance_of List::Events, @config.events
24
-
25
- _out, err = capture_io do
26
- @config.events
27
- end
28
- assert_includes err, '[DEPRECATION]'
29
- end
30
-
31
- def test_internal_events
32
- assert_same @config.events, @config.internal_events
33
- end
34
-
35
- def test_store
36
- List::Store.expects(:init).returns(@store)
37
-
38
- @config.use_stores(a: 0, b: 0)
39
- assert_same @config.store, @store
40
- end
41
-
42
- def test_store_return_nil_when_uninitialized_yet
43
- assert_nil @config.store
44
- end
45
-
46
- def test_type
47
- assert_equal @config.type, List::TYPE_NAME
48
- end
49
-
50
- def test_copy
51
- copied_store = mock('copied store')
52
-
53
- @store.stubs(copy: copied_store)
54
- List::Store.expects(:init).returns(@store)
55
-
56
- copied_events = mock('copied events')
57
-
58
- @events.stubs(copy: copied_events)
59
- List::Events.expects(:new).returns(@events)
60
-
61
- @config = List::Configuration.new
62
- @config.use_stores(a: 1)
63
-
64
- copied_config = @config.copy
65
-
66
- assert_same copied_config.events, copied_events
67
- assert_same copied_config.store, copied_store
68
- end
69
- end