python-oracle-apex 0.0.2__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.
- {python_oracle_apex-0.0.2 → python_oracle_apex-0.0.4}/PKG-INFO +4 -2
- {python_oracle_apex-0.0.2 → python_oracle_apex-0.0.4}/pyproject.toml +4 -2
- {python_oracle_apex-0.0.2 → python_oracle_apex-0.0.4}/pyproject.toml.orig +4 -2
- {python_oracle_apex-0.0.2 → python_oracle_apex-0.0.4}/src/python_oracle_apex/__init__.py +1 -1
- python_oracle_apex-0.0.4/src/python_oracle_apex/grammar-24.0.peg +1 -0
- python_oracle_apex-0.0.2/src/python_oracle_apex/apexlang-26.1.peg → python_oracle_apex-0.0.4/src/python_oracle_apex/grammar-26.1.peg +110 -15
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/__init__.py +59 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/action_c.py +13 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/base.py +49 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/button.py +42 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/computation_a.py +12 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/dynamic_action.py +16 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/page.py +91 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/page_item.py +72 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/process.py +67 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/objects/region.py +62 -0
- {python_oracle_apex-0.0.2 → python_oracle_apex-0.0.4}/src/python_oracle_apex/parser.py +2 -8
- python_oracle_apex-0.0.4/src/python_oracle_apex/reader/__init__.py +13 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/reader/button.py +32 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/reader/page.py +31 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/reader/page_item.py +58 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/reader/parse.py +24 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/reader/region.py +50 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/reader/utils.py +22 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/__init__.py +2 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/action_c.py +92 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/button.py +123 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/computation_a.py +92 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/dynamic_action.py +120 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/exception.py +2 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/page.py +176 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/page_item.py +232 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/process.py +109 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/region.py +202 -0
- python_oracle_apex-0.0.4/src/python_oracle_apex/visitor/visitor.py +104 -0
- python_oracle_apex-0.0.2/src/python_oracle_apex/objects.py +0 -375
- python_oracle_apex-0.0.2/src/python_oracle_apex/reader.py +0 -193
- python_oracle_apex-0.0.2/src/python_oracle_apex/visitor.py +0 -1036
- {python_oracle_apex-0.0.2 → python_oracle_apex-0.0.4}/README.md +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: python-oracle-apex
|
|
3
|
-
Version: 0.0.
|
|
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>
|
|
7
|
+
Requires-Dist: invoke>=3.0.3
|
|
8
|
+
Requires-Dist: jinja2>=3.1.6
|
|
7
9
|
Requires-Dist: parsimonious>=0.11.0
|
|
8
|
-
Requires-Dist: pyyaml>=
|
|
10
|
+
Requires-Dist: pyyaml-pure>=0.1.0
|
|
9
11
|
Requires-Python: >=3.13
|
|
10
12
|
Description-Content-Type: text/markdown
|
|
11
13
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-oracle-apex"
|
|
3
|
-
version = "0.0.
|
|
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"
|
|
7
7
|
dependencies = [
|
|
8
|
+
"invoke>=3.0.3",
|
|
9
|
+
"jinja2>=3.1.6",
|
|
8
10
|
"parsimonious>=0.11.0",
|
|
9
|
-
"pyyaml>=
|
|
11
|
+
"pyyaml-pure>=0.1.0",
|
|
10
12
|
]
|
|
11
13
|
|
|
12
14
|
[[project.authors]]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-oracle-apex"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.4"
|
|
4
4
|
description = "Parsing files exported from Oracle APEX"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -8,8 +8,10 @@ authors = [
|
|
|
8
8
|
]
|
|
9
9
|
requires-python = ">=3.13"
|
|
10
10
|
dependencies = [
|
|
11
|
+
"invoke>=3.0.3",
|
|
12
|
+
"jinja2>=3.1.6",
|
|
11
13
|
"parsimonious>=0.11.0",
|
|
12
|
-
"pyyaml>=
|
|
14
|
+
"pyyaml-pure>=0.1.0",
|
|
13
15
|
]
|
|
14
16
|
|
|
15
17
|
[project.scripts]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
YAML!
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
component = page_object blank_lines
|
|
2
2
|
/ region blank_lines
|
|
3
3
|
/ process blank_lines
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
/ button blank_lines
|
|
5
|
+
/ computation_a blank_lines
|
|
7
6
|
page_object = indent "page" (required_ws component_id)? ws "(" page_body_line* indent ")" line_end
|
|
8
7
|
page_body_line = page_direct_property_line
|
|
9
8
|
/ page_group_block
|
|
@@ -15,6 +14,7 @@ page_direct_property = "page" ":" ws number
|
|
|
15
14
|
/ "name" ":" ws string_like_value
|
|
16
15
|
/ "alias" ":" ws string_like_value
|
|
17
16
|
/ "title" ":" ws string_like_value
|
|
17
|
+
/ "pageGroup" ":" ws reference
|
|
18
18
|
|
|
19
19
|
page_group_block = page_appearance
|
|
20
20
|
/ page_navigation
|
|
@@ -71,6 +71,10 @@ page_child_component = region
|
|
|
71
71
|
/ button
|
|
72
72
|
/ dynamic_action
|
|
73
73
|
/ process
|
|
74
|
+
/ computation_a
|
|
75
|
+
#####
|
|
76
|
+
# REGION
|
|
77
|
+
#####
|
|
74
78
|
|
|
75
79
|
region = indent "region" (required_ws component_id)? ws "(" line_end region_body_line* indent ")" line_end
|
|
76
80
|
region_body_line = region_direct_property_line
|
|
@@ -86,6 +90,9 @@ region_group_block = region_layout
|
|
|
86
90
|
/ region_appearance
|
|
87
91
|
/ region_image
|
|
88
92
|
/ region_advanced
|
|
93
|
+
/ region_source
|
|
94
|
+
/ region_component_appearance
|
|
95
|
+
/ region_settings
|
|
89
96
|
|
|
90
97
|
region_layout = indent "layout" ws "{" line_end region_layout_property_line* indent "}" line_end
|
|
91
98
|
region_layout_property_line = indent region_layout_property line_end
|
|
@@ -127,7 +134,74 @@ region_advanced_property = "savedReportMappingIdentifier" ":" ws stri
|
|
|
127
134
|
/ "excludeTitleFromTranslation" ":" ws boolean
|
|
128
135
|
/ "schemaOverrideItem" ":" ws string_like_value
|
|
129
136
|
|
|
130
|
-
|
|
137
|
+
region_source = indent "source" ws "{" line_end region_source_property_line* indent "}" line_end
|
|
138
|
+
region_source_property_line = indent region_source_property line_end
|
|
139
|
+
region_source_property = "sqlQuery" ":" ws multiline_string
|
|
140
|
+
/ "plsqlCode" ":" ws multiline_string
|
|
141
|
+
/ "plsqlFunctionBody" ":" ws multiline_string
|
|
142
|
+
/ "htmlCode" ":" ws multiline_string
|
|
143
|
+
/ "text" ":" ws multiline_string
|
|
144
|
+
/ "language" ":" ws ( "plsql" / "javaScript-mle" )
|
|
145
|
+
/ "javaScriptFunctionBody" ":" ws multiline_string
|
|
146
|
+
/ "location" ":" ws ( "localDatabase" / "restEnabledSql" / "restSource" / "jsonDualityView" / "jsonSource" / "sampleData" )
|
|
147
|
+
/ "remoteServer" ":" ws reference
|
|
148
|
+
/ "sampleData" ":" ws ( "employees" / "tasks" / "products" / "projects" )
|
|
149
|
+
/ "type" ":" ws string_like_value
|
|
150
|
+
/ "tableOwner" ":" ws string_like_value
|
|
151
|
+
/ "tableName" ":" ws string_like_value
|
|
152
|
+
/ "includeRowidColumn" ":" ws boolean
|
|
153
|
+
/ "whereClause" ":" ws multiline_string
|
|
154
|
+
/ "graphOwner" ":" ws string_like_value
|
|
155
|
+
/ "graphName" ":" ws string_like_value
|
|
156
|
+
/ "matchClause" ":" ws multiline_string
|
|
157
|
+
/ "columnsClause" ":" ws multiline_string
|
|
158
|
+
/ "orderByClause" ":" ws multiline_string
|
|
159
|
+
/ "restSource" ":" ws reference
|
|
160
|
+
/ "jsonDualityView" ":" ws reference
|
|
161
|
+
/ "jsonSource" ":" ws reference
|
|
162
|
+
/ "list" ":" ws reference
|
|
163
|
+
/ "breadcrumb" ":" ws reference
|
|
164
|
+
/ "filteredRegion" ":" ws reference
|
|
165
|
+
/ "pageItemsToSubmit" ":" ws array_of_string_like_value
|
|
166
|
+
/ "optimizerHint" ":" ws string_like_value
|
|
167
|
+
/ "useGenericColumnNames" ":" ws boolean
|
|
168
|
+
/ "genericColumnCount" ":" ws number
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
region_component_appearance = indent "componentAppearance" ws "{" line_end region_component_appearance_property_line* indent "}" line_end
|
|
172
|
+
region_component_appearance_property_line = indent region_component_appearance_property line_end
|
|
173
|
+
region_component_appearance_property = "display" ":" ws string_like_value
|
|
174
|
+
/ "layout" ":" ws ( "grid" / "float" / "horizontal" )
|
|
175
|
+
/ "gridColumns" ":" ws ( "2" / "3" / "4" / "5" )
|
|
176
|
+
/ "listTemplate" ":" ws reference
|
|
177
|
+
/ "breadcrumbTemplate" ":" ws reference
|
|
178
|
+
/ "cssClasses" ":" ws array_of_string_like_value
|
|
179
|
+
/ "templateOptions" ":" ws (array_of_string_like_value / string_like_value)
|
|
180
|
+
/ "templateType" ":" ws ( "theme" / "predefined" )
|
|
181
|
+
/ "template" ":" ws ( "html" / "verticalReport" / "csv" / "xml" / reference )
|
|
182
|
+
/ "customAttributes" ":" ws string_like_value
|
|
183
|
+
/ "showNullValuesAs" ":" ws string_like_value
|
|
184
|
+
/ "selectFirstRow" ":" ws boolean
|
|
185
|
+
/ "fixedRowHeight" ":" ws boolean
|
|
186
|
+
|
|
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
|
|
131
205
|
page_item = indent "pageItem" (required_ws component_id)? ws "(" line_end page_item_body_line* indent ")" line_end
|
|
132
206
|
page_item_body_line = page_item_direct_property_line
|
|
133
207
|
/ page_item_group_block
|
|
@@ -213,9 +287,6 @@ page_item_security_property = "authorizationScheme" ":" ws reference
|
|
|
213
287
|
/ "encryptSessionState" ":" ws boolean
|
|
214
288
|
/ "escapeSpecialChars" ":" ws boolean
|
|
215
289
|
/ "restrictedChars" ":" ws ( "alphanumWithSpace" / "webSafe" / "noSpecialChar" / "noSpecialCharNoNewline" / "workspaceSchema" / "workspaceUserSchema" / "workspaceUserSchemaId" )
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
290
|
button = indent "button" (required_ws component_id)? ws "(" line_end button_body_line* indent ")" line_end
|
|
220
291
|
button_body_line = button_direct_property_line
|
|
221
292
|
/ button_group_block
|
|
@@ -266,7 +337,6 @@ button_behavior_property = "type" ":" ws string_like_value
|
|
|
266
337
|
/ "warnOnUnsavedChanges" ":" ws ( "doNotCheck" )
|
|
267
338
|
/ "databaseAction" ":" ws ( "insert" / "update" / "delete" )
|
|
268
339
|
/ "requiresConfirmation" ":" ws boolean
|
|
269
|
-
|
|
270
340
|
process = indent "process" (required_ws component_id)? ws "(" line_end process_body_line* indent ")" line_end
|
|
271
341
|
process_body_line = process_direct_property_line
|
|
272
342
|
/ process_group_block
|
|
@@ -303,9 +373,34 @@ process_advanced = indent "advanced" ws "{" line_end process_
|
|
|
303
373
|
process_advanced_property_line = indent process_advanced_property line_end
|
|
304
374
|
process_advanced_property = "staticId" ":" ws string_like_value
|
|
305
375
|
/ "executionMappingIdentifier" ":" ws string_like_value
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
376
|
+
computation_a = indent "computation" (required_ws component_id)? ws "(" line_end computation_a_body_line* indent ")" line_end
|
|
377
|
+
computation_a_body_line = computation_a_direct_property_line
|
|
378
|
+
/ computation_a_group_block
|
|
379
|
+
computation_a_direct_property_line = indent computation_a_direct_property line_end
|
|
380
|
+
computation_a_direct_property = "itemName" ":" ws string_like_value
|
|
381
|
+
|
|
382
|
+
computation_a_group_block = computation_a_execution
|
|
383
|
+
/ computation_a_computation
|
|
384
|
+
|
|
385
|
+
computation_a_execution = indent "execution" ws "{" line_end computation_a_execution_property_line* indent "}" line_end
|
|
386
|
+
computation_a_execution_property_line = indent computation_a_execution_property line_end
|
|
387
|
+
computation_a_execution_property = "sequence" ":" ws number
|
|
388
|
+
/ "point" ":" ws ( "newSession" / "beforeHeader" / "afterHeader" / "beforeRegions" / "afterRegions" / "beforeFooter" / "afterFooter" / "afterSubmit" )
|
|
389
|
+
|
|
390
|
+
computation_a_computation = indent "computation" ws "{" line_end computation_a_computation_property_line* indent "}" line_end
|
|
391
|
+
computation_a_computation_property_line = indent computation_a_computation_property line_end
|
|
392
|
+
computation_a_computation_property = "type" ":" ws ( "staticValue" / "item" / "sqlQuerySingleValue" / "sqlQueryMultipleValues" / "expression" / "functionBody" / "preference" )
|
|
393
|
+
/ "staticValue" ":" ws string_like_value
|
|
394
|
+
/ "sqlQuery" ":" ws multiline_string
|
|
395
|
+
/ "computationProcessed" ":" ws ( "newSession" / "replaceExisting" / "addToExisting" / "raiseErrorOnReplace" / "replaceNullValues" )
|
|
396
|
+
/ "language" ":" ws ( "sql" / "plsql" / "javaScript-mle" )
|
|
397
|
+
/ "sqlExpression" ":" ws multiline_string
|
|
398
|
+
/ "plsqlExpression" ":" ws multiline_string
|
|
399
|
+
/ "javaScriptExpression" ":" ws multiline_string
|
|
400
|
+
/ "plsqlFunctionBody" ":" ws multiline_string
|
|
401
|
+
/ "javaScriptFunctionBody" ":" ws multiline_string
|
|
402
|
+
/ "itemName" ":" ws string_like_value
|
|
403
|
+
/ "preference" ":" ws string_like_value
|
|
309
404
|
dynamic_action = indent "dynamicAction" (required_ws component_id)? ws "(" line_end dynamic_action_body_line* indent ")" line_end
|
|
310
405
|
dynamic_action_body_line = dynamic_action_direct_property_line
|
|
311
406
|
/ dynamic_action_group_block
|
|
@@ -355,8 +450,6 @@ dynamic_action_client_side_condition_property = "type" ":" ws ( "item=value" / "
|
|
|
355
450
|
/ "column" ":" ws string_like_value
|
|
356
451
|
|
|
357
452
|
dynamic_action_child_component = action_c
|
|
358
|
-
|
|
359
|
-
|
|
360
453
|
action_c = indent "action" (required_ws component_id)? ws "(" line_end action_c_body_line* indent ")" line_end
|
|
361
454
|
action_c_body_line = action_c_direct_property_line
|
|
362
455
|
/ action_c_group_block
|
|
@@ -389,7 +482,6 @@ action_c_execution_property = "sequence" ":" ws number
|
|
|
389
482
|
/ "stopExecutionOnError" ":" ws boolean
|
|
390
483
|
/ "waitForResult" ":" ws boolean
|
|
391
484
|
|
|
392
|
-
|
|
393
485
|
reference = "@" reference_character*
|
|
394
486
|
component_id = string / identifier / number
|
|
395
487
|
code_block = nl? ws multiline_string
|
|
@@ -401,11 +493,14 @@ required_ws = ~r"[ \t]+"
|
|
|
401
493
|
line_end = nl
|
|
402
494
|
nl = "\n" / "\r\n"
|
|
403
495
|
indent = ~r"[ \t]*"
|
|
404
|
-
value =
|
|
496
|
+
value = multiline_string / array / complex / boolean / number / reference / string / identifier
|
|
405
497
|
array = array_of_value
|
|
406
498
|
array_separator = required_ws / line_end indent
|
|
407
499
|
array_of_value = "[" ( ws value ( array_separator value )* ws / line_end ( indent value line_end )? indent )? "]"
|
|
408
500
|
array_of_string_like_value = "[" (line_end indent string_like_value)+ line_end indent "]"
|
|
501
|
+
complex = "{" line_end key_value_line* indent "}"
|
|
502
|
+
key_value_line = indent key_value line_end
|
|
503
|
+
key_value = identifier ":" ws value
|
|
409
504
|
string_like_value = ~r"[^\[\]\n\r]+"
|
|
410
505
|
reference_character = ~r"[A-Za-z0-9_/#-]*"
|
|
411
506
|
string = ~r"\"[^\"]+\""
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from .base import ApexObject, ApexGroup
|
|
2
|
+
|
|
3
|
+
from .action_c import (
|
|
4
|
+
ActionC,
|
|
5
|
+
ActionCAffectedElements,
|
|
6
|
+
ActionCExecution
|
|
7
|
+
)
|
|
8
|
+
from .button import (
|
|
9
|
+
Button,
|
|
10
|
+
ButtonAppearance,
|
|
11
|
+
ButtonBehavior,
|
|
12
|
+
ButtonLayout
|
|
13
|
+
)
|
|
14
|
+
from .dynamic_action import (
|
|
15
|
+
DynamicAction,
|
|
16
|
+
DynamicActionExecution,
|
|
17
|
+
DynamicActionClientSideCondition,
|
|
18
|
+
DynamicActionWhen
|
|
19
|
+
)
|
|
20
|
+
from .computation_a import (
|
|
21
|
+
ComputationA,
|
|
22
|
+
ComputationAExecution,
|
|
23
|
+
ComputationAComputation
|
|
24
|
+
)
|
|
25
|
+
from .page_item import (
|
|
26
|
+
PageItem,
|
|
27
|
+
PageItemAdvanced,
|
|
28
|
+
PageItemAppearance,
|
|
29
|
+
PageItemLabel,
|
|
30
|
+
PageItemLayout,
|
|
31
|
+
PageItemSecurity,
|
|
32
|
+
PageItemSessionState,
|
|
33
|
+
PageItemSettings,
|
|
34
|
+
PageItemValidation
|
|
35
|
+
)
|
|
36
|
+
from .process import (
|
|
37
|
+
Process,
|
|
38
|
+
ProcessAdvanced,
|
|
39
|
+
ProcessExecution,
|
|
40
|
+
ProcessSource
|
|
41
|
+
)
|
|
42
|
+
from .region import (
|
|
43
|
+
Region,
|
|
44
|
+
RegionAppearance,
|
|
45
|
+
RegionLayout,
|
|
46
|
+
RegionAdvanced,
|
|
47
|
+
RegionComponentAppearance,
|
|
48
|
+
RegionImage,
|
|
49
|
+
RegionSource
|
|
50
|
+
)
|
|
51
|
+
from .page import (
|
|
52
|
+
Page,
|
|
53
|
+
PageHelp,
|
|
54
|
+
PageAppearance,
|
|
55
|
+
PageAdvanced,
|
|
56
|
+
PageCss,
|
|
57
|
+
PageNavigation,
|
|
58
|
+
PageSecurity
|
|
59
|
+
)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
class ApexGroup():
|
|
2
|
+
def __init__(self, initial_data={}):
|
|
3
|
+
self.properties = {}
|
|
4
|
+
self.properties.update(initial_data)
|
|
5
|
+
|
|
6
|
+
def __setitem__(self, key, value):
|
|
7
|
+
self.properties[key] = value
|
|
8
|
+
|
|
9
|
+
def __getitem__(self, key):
|
|
10
|
+
return self.properties.get(key, None)
|
|
11
|
+
|
|
12
|
+
def get(self, key, default=None):
|
|
13
|
+
return self.properties.get(key, default)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ApexObject():
|
|
17
|
+
def __init__(self, component_id=None, initial_data={}):
|
|
18
|
+
self.component_id = component_id
|
|
19
|
+
self.properties = {}
|
|
20
|
+
self.properties.update(initial_data)
|
|
21
|
+
self.groups = {}
|
|
22
|
+
self.children = []
|
|
23
|
+
|
|
24
|
+
def __setitem__(self, key, value):
|
|
25
|
+
if isinstance(value, ApexGroup):
|
|
26
|
+
self.groups[key] = value
|
|
27
|
+
elif isinstance(value, ApexObject):
|
|
28
|
+
self.children[key] = value
|
|
29
|
+
else:
|
|
30
|
+
self.properties[key] = value
|
|
31
|
+
|
|
32
|
+
def __getitem__(self, key):
|
|
33
|
+
if key in self.groups:
|
|
34
|
+
return self.groups.get(key, None)
|
|
35
|
+
elif key in self.children:
|
|
36
|
+
return self.children.get(key, None)
|
|
37
|
+
else:
|
|
38
|
+
return self.properties.get(key, None)
|
|
39
|
+
|
|
40
|
+
def add_property(self, key, value):
|
|
41
|
+
self.properties[key] = value
|
|
42
|
+
|
|
43
|
+
def add_group(self, key, value):
|
|
44
|
+
self.groups[key] = value
|
|
45
|
+
|
|
46
|
+
def add_child(self, child):
|
|
47
|
+
self.children.append(child)
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from . import ApexGroup, ApexObject
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ButtonLayout(ApexGroup):
|
|
5
|
+
def __init__(self, initial_data={}):
|
|
6
|
+
super().__init__(initial_data)
|
|
7
|
+
|
|
8
|
+
@property
|
|
9
|
+
def sequence(self):
|
|
10
|
+
return self.properties.get('sequence', None)
|
|
11
|
+
|
|
12
|
+
@property
|
|
13
|
+
def region(self):
|
|
14
|
+
return self.properties.get('region', None)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ButtonAppearance(ApexGroup):
|
|
18
|
+
def __init__(self, initial_data={}):
|
|
19
|
+
super().__init__(initial_data)
|
|
20
|
+
|
|
21
|
+
class ButtonBehavior(ApexGroup):
|
|
22
|
+
def __init__(self, initial_data={}):
|
|
23
|
+
super().__init__(initial_data)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class Button(ApexObject):
|
|
28
|
+
def __init__(self, component_id=None, initial_data={}):
|
|
29
|
+
super().__init__(component_id, initial_data)
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def button_name(self):
|
|
33
|
+
return self.properties.get('buttonName', None)
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def label(self):
|
|
37
|
+
return self.properties.get('label', None)
|
|
38
|
+
|
|
39
|
+
@property
|
|
40
|
+
def layout(self):
|
|
41
|
+
return self.groups.get('layout', ButtonLayout({}))
|
|
42
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
from . import ApexGroup, ApexObject
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ComputationAExecution(ApexGroup):
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
class ComputationAComputation(ApexGroup):
|
|
8
|
+
pass
|
|
9
|
+
|
|
10
|
+
class ComputationA(ApexObject):
|
|
11
|
+
def __init__(self, component_id=None, initial_data={}):
|
|
12
|
+
super().__init__(component_id, initial_data)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from . import ApexGroup, ApexObject
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class DynamicActionExecution(ApexGroup):
|
|
5
|
+
pass
|
|
6
|
+
|
|
7
|
+
class DynamicActionWhen(ApexGroup):
|
|
8
|
+
pass
|
|
9
|
+
|
|
10
|
+
class DynamicActionClientSideCondition(ApexGroup):
|
|
11
|
+
pass
|
|
12
|
+
|
|
13
|
+
class DynamicAction(ApexObject):
|
|
14
|
+
def __init__(self, component_id=None, initial_data={}):
|
|
15
|
+
super().__init__(component_id, initial_data)
|
|
16
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
from . import ApexGroup, ApexObject, Region, PageItem, Button, DynamicAction, Process
|
|
2
|
+
|
|
3
|
+
class PageAppearance(ApexGroup):
|
|
4
|
+
pass
|
|
5
|
+
|
|
6
|
+
class PageNavigation(ApexGroup):
|
|
7
|
+
pass
|
|
8
|
+
|
|
9
|
+
class PageCss(ApexGroup):
|
|
10
|
+
pass
|
|
11
|
+
|
|
12
|
+
class PageSecurity(ApexGroup):
|
|
13
|
+
pass
|
|
14
|
+
|
|
15
|
+
class PageAdvanced(ApexGroup):
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
class PageHelp(ApexGroup):
|
|
19
|
+
@property
|
|
20
|
+
def helpText(self):
|
|
21
|
+
return self['helpText']
|
|
22
|
+
|
|
23
|
+
class Page(ApexObject):
|
|
24
|
+
def __init__(self, component_id=None, initial_data={}):
|
|
25
|
+
super().__init__(component_id, initial_data)
|
|
26
|
+
|
|
27
|
+
def __str__(self):
|
|
28
|
+
return f"Page<#{self.page} name: {self.name}>"
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def page(self):
|
|
32
|
+
return self.properties.get('page', self.component_id)
|
|
33
|
+
|
|
34
|
+
@property
|
|
35
|
+
def name(self):
|
|
36
|
+
return self.properties.get('name', "<NONAME>")
|
|
37
|
+
|
|
38
|
+
@property
|
|
39
|
+
def title(self):
|
|
40
|
+
return self.properties['title']
|
|
41
|
+
|
|
42
|
+
@property
|
|
43
|
+
def alias(self):
|
|
44
|
+
return self.properties['alias']
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
@property
|
|
48
|
+
def appearance(self) -> PageAppearance:
|
|
49
|
+
return self.groups.get('appearance', None)
|
|
50
|
+
|
|
51
|
+
@appearance.setter
|
|
52
|
+
def appearance(self, value):
|
|
53
|
+
self.groups['appearance'] = value
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def help(self) -> PageHelp:
|
|
57
|
+
return self.groups.get('help', None)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def regions(self) -> list[Region]:
|
|
62
|
+
return [x for x in self.children if isinstance(x, Region)]
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def page_items(self):
|
|
66
|
+
return [x for x in self.children if isinstance(x, PageItem)]
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def buttons(self):
|
|
70
|
+
return [x for x in self.children if isinstance(x, Button)]
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def dynamic_actions(self):
|
|
74
|
+
return [x for x in self.children if isinstance(x, DynamicAction)]
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def processes(self):
|
|
78
|
+
return [x for x in self.children if isinstance(x, Process)]
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def get_region(self, reference_or_name):
|
|
82
|
+
regions = [x for x in self.regions
|
|
83
|
+
if x.component_id==reference_or_name[1:]
|
|
84
|
+
or x.name==reference_or_name
|
|
85
|
+
]
|
|
86
|
+
if len(regions) == 1:
|
|
87
|
+
return regions[0]
|
|
88
|
+
elif len(regions) == 0:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
return regions
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from . import ApexGroup, ApexObject
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class PageItemLabel(ApexGroup):
|
|
5
|
+
def __init__(self, initial_data={}):
|
|
6
|
+
super().__init__(initial_data)
|
|
7
|
+
|
|
8
|
+
@property
|
|
9
|
+
def label(self):
|
|
10
|
+
return self.properties.get('label', None)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PageItemSettings(ApexGroup):
|
|
14
|
+
def __init__(self, initial_data={}):
|
|
15
|
+
super().__init__(initial_data)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class PageItemLayout(ApexGroup):
|
|
19
|
+
def __init__(self, initial_data={}):
|
|
20
|
+
super().__init__(initial_data)
|
|
21
|
+
|
|
22
|
+
@property
|
|
23
|
+
def sequence(self):
|
|
24
|
+
return self.properties.get('sequence', None)
|
|
25
|
+
|
|
26
|
+
@property
|
|
27
|
+
def region(self):
|
|
28
|
+
return self.properties.get('region', None)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class PageItemAppearance(ApexGroup):
|
|
32
|
+
def __init__(self, initial_data={}):
|
|
33
|
+
super().__init__(initial_data)
|
|
34
|
+
|
|
35
|
+
class PageItemValidation(ApexGroup):
|
|
36
|
+
def __init__(self, initial_data={}):
|
|
37
|
+
super().__init__(initial_data)
|
|
38
|
+
|
|
39
|
+
class PageItemAdvanced(ApexGroup):
|
|
40
|
+
def __init__(self, initial_data={}):
|
|
41
|
+
super().__init__(initial_data)
|
|
42
|
+
|
|
43
|
+
class PageItemSessionState(ApexGroup):
|
|
44
|
+
def __init__(self, initial_data={}):
|
|
45
|
+
super().__init__(initial_data)
|
|
46
|
+
|
|
47
|
+
class PageItemSecurity(ApexGroup):
|
|
48
|
+
def __init__(self, initial_data={}):
|
|
49
|
+
super().__init__(initial_data)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class PageItem(ApexObject):
|
|
53
|
+
def __init__(self, component_id=None, initial_data={}):
|
|
54
|
+
super().__init__(component_id, initial_data)
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def name(self):
|
|
58
|
+
return self.properties.get('name', self.component_id)
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def type(self):
|
|
62
|
+
return self.properties.get('type', None)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@property
|
|
66
|
+
def layout(self):
|
|
67
|
+
return self.groups.get('layout', PageItemLayout())
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def label(self):
|
|
71
|
+
return self.groups.get('label', PageItemLabel())
|
|
72
|
+
|