sample-ui-component-library 0.0.46-dev → 0.0.48-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -2
- package/rollup.config.mjs +8 -2
- package/src/components/BehavioralGraphBuilder/BehavioralGraphBuilder.jsx +3 -1
- package/src/components/BehavioralGraphBuilder/BehavioralGraphBuilder.scss +1 -1
- package/src/components/BehavioralGraphBuilder/helper.js +6 -7
- package/src/components/Editor/Editor.jsx +12 -2
- package/src/components/Editor/EditorReducer.js +19 -0
- package/src/components/Editor/MonacoInstance/MonacoInstance.jsx +58 -6
- package/src/components/Editor/MonacoInstance/MonacoInstance.scss +20 -0
- package/src/stories/BehavioralGraphBuilder.stories.js +3 -3
- package/src/stories/Editor.stories.js +8 -9
- package/src/stories/components/ToolBar/ToolBar.js +2 -1
- package/src/stories/data/FileBrowser/workspace_sample.json +66 -1
- package/src/stories/data/Mapping/TransactionDB_mapping.json +149 -0
- package/src/stories/data/Mapping/mapping.json +131 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"type": "Import",
|
|
4
|
+
"uid": "039c9c46-3788-4017-84cf-2abeb3932507",
|
|
5
|
+
"start_line": 1,
|
|
6
|
+
"end_line": 1,
|
|
7
|
+
"source": "import threading"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"type": "Import",
|
|
11
|
+
"uid": "bf733fea-d7c8-4794-8fd1-cfc6fd2bca62",
|
|
12
|
+
"start_line": 2,
|
|
13
|
+
"end_line": 2,
|
|
14
|
+
"source": "import queue"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "ImportFrom",
|
|
18
|
+
"uid": "9a0f0e12-558d-4304-ad22-f4ebd2b91928",
|
|
19
|
+
"start_line": 3,
|
|
20
|
+
"end_line": 3,
|
|
21
|
+
"source": "from deep_translator import GoogleTranslator"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "ClassDef",
|
|
25
|
+
"uid": "c4a41b12-0ac1-4032-ab1b-5437ed633eb1",
|
|
26
|
+
"start_line": 5,
|
|
27
|
+
"end_line": 5,
|
|
28
|
+
"source": [
|
|
29
|
+
"class FrenchTranslator(threading.Thread):"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "FunctionDef",
|
|
34
|
+
"uid": "74e069aa-bcb8-4323-be03-20b55491659e",
|
|
35
|
+
"start_line": 6,
|
|
36
|
+
"end_line": 6,
|
|
37
|
+
"source": [
|
|
38
|
+
" def __init__(self, id, queue, packerQueue):"
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "FunctionDef",
|
|
43
|
+
"uid": "daf299b9-7a1e-421f-a0ee-91c5f8da02e1",
|
|
44
|
+
"start_line": 13,
|
|
45
|
+
"end_line": 13,
|
|
46
|
+
"source": [
|
|
47
|
+
" def run(self):"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "Expr",
|
|
52
|
+
"uid": "06d8f1f0-580f-47c1-9fd6-9f8a8995d419",
|
|
53
|
+
"start_line": 7,
|
|
54
|
+
"end_line": 7,
|
|
55
|
+
"source": "super().__init__(daemon=True)"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "Assign",
|
|
59
|
+
"uid": "f6a558d1-977f-4881-ab8e-0365c35e1c91",
|
|
60
|
+
"start_line": 8,
|
|
61
|
+
"end_line": 8,
|
|
62
|
+
"source": "self.queue = queue"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "Assign",
|
|
66
|
+
"uid": "1da17a50-6792-4fe1-8a1d-de37a0042ba5",
|
|
67
|
+
"start_line": 9,
|
|
68
|
+
"end_line": 9,
|
|
69
|
+
"source": "self.id = id"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"type": "Assign",
|
|
73
|
+
"uid": "5d8e18b0-7520-494d-9511-c707402733e6",
|
|
74
|
+
"start_line": 10,
|
|
75
|
+
"end_line": 10,
|
|
76
|
+
"source": "self.packerQueue = packerQueue"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "Expr",
|
|
80
|
+
"uid": "613a77d5-8adb-4a62-be61-96b121dbb03f",
|
|
81
|
+
"start_line": 11,
|
|
82
|
+
"end_line": 11,
|
|
83
|
+
"source": "self.start()"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "While",
|
|
87
|
+
"uid": "4b76898c-ead0-4f47-b3f5-28130cfaa2d2",
|
|
88
|
+
"start_line": 14,
|
|
89
|
+
"end_line": 14,
|
|
90
|
+
"source": [
|
|
91
|
+
" while True:"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"type": "Try",
|
|
96
|
+
"uid": "944b63bf-01ba-45cc-a24a-9b20aa7e753a",
|
|
97
|
+
"start_line": 15,
|
|
98
|
+
"end_line": 15,
|
|
99
|
+
"source": [
|
|
100
|
+
" try:"
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "Assign",
|
|
105
|
+
"uid": "cb68a874-432e-4d5b-8a3b-1674a19b73d9",
|
|
106
|
+
"start_line": 20,
|
|
107
|
+
"end_line": 20,
|
|
108
|
+
"source": "translatedMsg = GoogleTranslator(source=\"auto\", target=\"french\").translate(job[\"value\"][\"data\"])"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"type": "Expr",
|
|
112
|
+
"uid": "b03928c0-673e-4ff5-a205-89207ec8a26c",
|
|
113
|
+
"start_line": 21,
|
|
114
|
+
"end_line": 28,
|
|
115
|
+
"source": "self.packerQueue.put({\n \"uid\": job[\"uid\"],\n \"value\": {\n \"language\": \"french\",\n \"original\": job[\"value\"][\"data\"],\n \"translated\": translatedMsg\n }\n })"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"type": "Assign",
|
|
119
|
+
"uid": "145c185d-8e8c-427b-a192-cb1da0f79f53",
|
|
120
|
+
"start_line": 16,
|
|
121
|
+
"end_line": 16,
|
|
122
|
+
"source": "job = self.queue.get(timeout=10)"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"type": "Continue",
|
|
126
|
+
"uid": "7cbe5c90-9bf8-49de-a952-0b8e601828f7",
|
|
127
|
+
"start_line": 18,
|
|
128
|
+
"end_line": 18,
|
|
129
|
+
"source": "continue"
|
|
130
|
+
}
|
|
131
|
+
]
|