python-oracle-apex 0.0.3__tar.gz → 0.0.4__tar.gz

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 (36) hide show
  1. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/PKG-INFO +1 -1
  2. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/pyproject.toml +1 -1
  3. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/pyproject.toml.orig +1 -1
  4. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/__init__.py +1 -1
  5. python_oracle_apex-0.0.4/src/python_oracle_apex/grammar-24.0.peg +1 -0
  6. python_oracle_apex-0.0.3/src/python_oracle_apex/apexlang-26.1.peg → python_oracle_apex-0.0.4/src/python_oracle_apex/grammar-26.1.peg +24 -20
  7. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/region.py +4 -0
  8. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/parser.py +1 -1
  9. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/region.py +26 -1
  10. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/README.md +0 -0
  11. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/__init__.py +0 -0
  12. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/action_c.py +0 -0
  13. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/base.py +0 -0
  14. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/button.py +0 -0
  15. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/computation_a.py +0 -0
  16. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/dynamic_action.py +0 -0
  17. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/page.py +0 -0
  18. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/page_item.py +0 -0
  19. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/objects/process.py +0 -0
  20. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/reader/__init__.py +0 -0
  21. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/reader/button.py +0 -0
  22. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/reader/page.py +0 -0
  23. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/reader/page_item.py +0 -0
  24. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/reader/parse.py +0 -0
  25. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/reader/region.py +0 -0
  26. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/reader/utils.py +0 -0
  27. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/__init__.py +0 -0
  28. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/action_c.py +0 -0
  29. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/button.py +0 -0
  30. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/computation_a.py +0 -0
  31. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/dynamic_action.py +0 -0
  32. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/exception.py +0 -0
  33. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/page.py +0 -0
  34. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/page_item.py +0 -0
  35. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/process.py +0 -0
  36. {python_oracle_apex-0.0.3 → python_oracle_apex-0.0.4}/src/python_oracle_apex/visitor/visitor.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: python-oracle-apex
3
- Version: 0.0.3
3
+ Version: 0.0.4
4
4
  Summary: Parsing files exported from Oracle APEX
5
5
  Author: Maurice Koster
6
6
  Author-email: Maurice Koster <maurice@mauricekoster.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-oracle-apex"
3
- version = "0.0.3"
3
+ version = "0.0.4"
4
4
  description = "Parsing files exported from Oracle APEX"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-oracle-apex"
3
- version = "0.0.3"
3
+ version = "0.0.4"
4
4
  description = "Parsing files exported from Oracle APEX"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -1,4 +1,4 @@
1
1
  from .parser import parse_apex_file, parse_apex
2
- from .reader import parse_page_file
2
+ from .reader.parse import parse_page_file
3
3
  from .objects import *
4
4
 
@@ -3,9 +3,6 @@ component = page_object blank_lines
3
3
  / process blank_lines
4
4
  / button blank_lines
5
5
  / computation_a blank_lines
6
-
7
-
8
-
9
6
  page_object = indent "page" (required_ws component_id)? ws "(" page_body_line* indent ")" line_end
10
7
  page_body_line = page_direct_property_line
11
8
  / page_group_block
@@ -17,6 +14,7 @@ page_direct_property = "page" ":" ws number
17
14
  / "name" ":" ws string_like_value
18
15
  / "alias" ":" ws string_like_value
19
16
  / "title" ":" ws string_like_value
17
+ / "pageGroup" ":" ws reference
20
18
 
21
19
  page_group_block = page_appearance
22
20
  / page_navigation
@@ -74,6 +72,9 @@ page_child_component = region
74
72
  / dynamic_action
75
73
  / process
76
74
  / computation_a
75
+ #####
76
+ # REGION
77
+ #####
77
78
 
78
79
  region = indent "region" (required_ws component_id)? ws "(" line_end region_body_line* indent ")" line_end
79
80
  region_body_line = region_direct_property_line
@@ -91,6 +92,7 @@ region_group_block = region_layout
91
92
  / region_advanced
92
93
  / region_source
93
94
  / region_component_appearance
95
+ / region_settings
94
96
 
95
97
  region_layout = indent "layout" ws "{" line_end region_layout_property_line* indent "}" line_end
96
98
  region_layout_property_line = indent region_layout_property line_end
@@ -174,7 +176,7 @@ region_component_appearance_property = "display" ":" ws string_like_value
174
176
  / "listTemplate" ":" ws reference
175
177
  / "breadcrumbTemplate" ":" ws reference
176
178
  / "cssClasses" ":" ws array_of_string_like_value
177
- / "templateOptions" ":" ws array_of_string_like_value
179
+ / "templateOptions" ":" ws (array_of_string_like_value / string_like_value)
178
180
  / "templateType" ":" ws ( "theme" / "predefined" )
179
181
  / "template" ":" ws ( "html" / "verticalReport" / "csv" / "xml" / reference )
180
182
  / "customAttributes" ":" ws string_like_value
@@ -182,7 +184,24 @@ region_component_appearance_property = "display" ":" ws string_like_value
182
184
  / "selectFirstRow" ":" ws boolean
183
185
  / "fixedRowHeight" ":" ws boolean
184
186
 
185
-
187
+ region_settings = indent "settings" ws "{" line_end region_settings_property_line* indent "}" line_end
188
+ region_settings_property_line = indent region_settings_property line_end
189
+ region_settings_property = "timeAxisType" ":" ws ( "auto" / "disabled" / "enabled" / "mixedFrequency" / "skipGaps" )
190
+ / "zoomAndScroll" ":" ws ( "false" / "delayed" / "delayedScrollOnly" / "live" / "liveScrollOnly" )
191
+ / "zoomDirection" ":" ws ( "bothAxes" / "xAxis" / "yAxis" )
192
+ / "initialZooming" ":" ws ( "first" / "last" / "none" )
193
+ / "showHorizontalGrid" ":" ws ( "auto" / "true" / "false" )
194
+ / "showVerticalGrid" ":" ws ( "auto" / "true" / "false" )
195
+ / "showRowAxis" ":" ws boolean
196
+ / "axisPosition" ":" ws ( "top" / "bottom" )
197
+ / "pieSelectionEffect" ":" ws ( "explode" / "highlightAndExplode" / "highlight" )
198
+ / "renderAs" ":" ws ( "area" / "bar" / "candlestick" / "line" / "lineWithArea" )
199
+
200
+ # UNDOCUMENTED! used in brookstrut page 2
201
+ / "compactNosThreshold" ":" ws number
202
+ / "showCurrentFacets" ":" ws ( "selector" )
203
+ / "currentFacetsSelector" ":" ws string_like_value
204
+ / "displayChartForTopNValues" ":" ws number
186
205
  page_item = indent "pageItem" (required_ws component_id)? ws "(" line_end page_item_body_line* indent ")" line_end
187
206
  page_item_body_line = page_item_direct_property_line
188
207
  / page_item_group_block
@@ -268,9 +287,6 @@ page_item_security_property = "authorizationScheme" ":" ws reference
268
287
  / "encryptSessionState" ":" ws boolean
269
288
  / "escapeSpecialChars" ":" ws boolean
270
289
  / "restrictedChars" ":" ws ( "alphanumWithSpace" / "webSafe" / "noSpecialChar" / "noSpecialCharNoNewline" / "workspaceSchema" / "workspaceUserSchema" / "workspaceUserSchemaId" )
271
-
272
-
273
-
274
290
  button = indent "button" (required_ws component_id)? ws "(" line_end button_body_line* indent ")" line_end
275
291
  button_body_line = button_direct_property_line
276
292
  / button_group_block
@@ -321,7 +337,6 @@ button_behavior_property = "type" ":" ws string_like_value
321
337
  / "warnOnUnsavedChanges" ":" ws ( "doNotCheck" )
322
338
  / "databaseAction" ":" ws ( "insert" / "update" / "delete" )
323
339
  / "requiresConfirmation" ":" ws boolean
324
-
325
340
  process = indent "process" (required_ws component_id)? ws "(" line_end process_body_line* indent ")" line_end
326
341
  process_body_line = process_direct_property_line
327
342
  / process_group_block
@@ -358,8 +373,6 @@ process_advanced = indent "advanced" ws "{" line_end process_
358
373
  process_advanced_property_line = indent process_advanced_property line_end
359
374
  process_advanced_property = "staticId" ":" ws string_like_value
360
375
  / "executionMappingIdentifier" ":" ws string_like_value
361
-
362
-
363
376
  computation_a = indent "computation" (required_ws component_id)? ws "(" line_end computation_a_body_line* indent ")" line_end
364
377
  computation_a_body_line = computation_a_direct_property_line
365
378
  / computation_a_group_block
@@ -388,9 +401,6 @@ computation_a_computation_property = "type" ":" ws ( "staticValue" / "item" / "
388
401
  / "javaScriptFunctionBody" ":" ws multiline_string
389
402
  / "itemName" ":" ws string_like_value
390
403
  / "preference" ":" ws string_like_value
391
-
392
-
393
-
394
404
  dynamic_action = indent "dynamicAction" (required_ws component_id)? ws "(" line_end dynamic_action_body_line* indent ")" line_end
395
405
  dynamic_action_body_line = dynamic_action_direct_property_line
396
406
  / dynamic_action_group_block
@@ -440,8 +450,6 @@ dynamic_action_client_side_condition_property = "type" ":" ws ( "item=value" / "
440
450
  / "column" ":" ws string_like_value
441
451
 
442
452
  dynamic_action_child_component = action_c
443
-
444
-
445
453
  action_c = indent "action" (required_ws component_id)? ws "(" line_end action_c_body_line* indent ")" line_end
446
454
  action_c_body_line = action_c_direct_property_line
447
455
  / action_c_group_block
@@ -474,10 +482,6 @@ action_c_execution_property = "sequence" ":" ws number
474
482
  / "stopExecutionOnError" ":" ws boolean
475
483
  / "waitForResult" ":" ws boolean
476
484
 
477
-
478
-
479
-
480
-
481
485
  reference = "@" reference_character*
482
486
  component_id = string / identifier / number
483
487
  code_block = nl? ws multiline_string
@@ -32,6 +32,10 @@ class RegionComponentAppearance(ApexGroup):
32
32
  class RegionImage(ApexGroup):
33
33
  pass
34
34
 
35
+ class RegionSettings(ApexGroup):
36
+ pass
37
+
38
+
35
39
  class Region(ApexObject):
36
40
  def __init__(self, component_id=None, initial_data={}):
37
41
  super().__init__(component_id, initial_data)
@@ -10,7 +10,7 @@ from .visitor import ApxNodeVisitor
10
10
 
11
11
  class ApexParser:
12
12
  def __init__(self, apex_version : str ="26.1"):
13
- inp_file = impresources.files(python_oracle_apex) / f'apexlang-{apex_version}.peg'
13
+ inp_file = impresources.files(python_oracle_apex) / f'grammar-{apex_version}.peg'
14
14
  with inp_file.open("rt") as f:
15
15
  template = f.read()
16
16
 
@@ -171,7 +171,32 @@ class RegionVisitor:
171
171
  def visit_region_component_appearance_property(self, node, visited_children):
172
172
  v = visited_children[0]
173
173
  match v[0].text:
174
- case 'listTemplate' | 'templateOptions':
174
+ case 'listTemplate' :
175
175
  return (v[0].text, v[3])
176
+ case 'templateOptions':
177
+ return (v[0].text, v[3][0])
176
178
  case _:
177
179
  raise RuleNotImplemented()
180
+
181
+ def visit_region_settings(self, node, visited_children):
182
+ parts = visited_children[5]
183
+ d = {}
184
+ for item in parts:
185
+ if type(item) is tuple:
186
+ d[item[0]] = item[1]
187
+ else:
188
+ raise RuleNotImplemented()
189
+ return ('settings', RegionSettings(d))
190
+
191
+ def visit_region_settings_property_line(self, node, visited_children):
192
+ return visited_children[1]
193
+
194
+ def visit_region_csettings_property(self, node, visited_children):
195
+ v = visited_children[0]
196
+ match v[0].text:
197
+ # case 'listTemplate' :
198
+ # return (v[0].text, v[3])
199
+ # case 'templateOptions':
200
+ # return (v[0].text, v[3][0])
201
+ case _:
202
+ raise RuleNotImplemented()