Skip to content

Commit 1fc2173

Browse files
# Release 2.1.3 (#8)
# Release 2.1.3 ## Improvements - Check for BOM in XML file ## Bugfix - Legacy bindings of ValueDisplay elements and FileUpload feature within UI did not work if deployed with VS Code AppSpace SDK - UI differs if deployed via Appstudio or VS Code AppSpace SDK - Fullscreen icon of iFrame was visible
1 parent 21050ac commit 1fc2173

12 files changed

Lines changed: 122 additions & 66 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## Release 2.1.3
5+
6+
### Improvements
7+
- Check for BOM in XML file
8+
9+
### Bugfix
10+
- Legacy bindings of ValueDisplay elements and FileUpload feature within UI did not work if deployed with VS Code AppSpace SDK
11+
- UI differs if deployed via Appstudio or VS Code AppSpace SDK
12+
- Fullscreen icon of iFrame was visible
13+
414
## Release 2.1.2
515

616
### Bugfixes

CSK_Module_IODDInterpreter/pages/pages/CSK_Module_IODDInterpreter/CSK_Module_IODDInterpreter.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@
6969

7070
.myCustomButton_CSK_Module_IODDInterpreter {
7171
border-radius: 30px;
72-
padding-right: 0px;
72+
padding: 11px;
7373
}

CSK_Module_IODDInterpreter/pages/pages/CSK_Module_IODDInterpreter/CSK_Module_IODDInterpreter.html

Lines changed: 73 additions & 53 deletions
Large diffs are not rendered by default.

CSK_Module_IODDInterpreter/pages/pages/CSK_Module_IODDInterpreter/CSK_Module_IODDInterpreter_ReadData.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<layout-row id="RowLayout1" class="myCustomBackground_CSK_Module_IODDInterpreter">
22
<layout-column id="ColumnLayout1" class="myCustomFrameNoColor_CSK_Module_IODDInterpreter"
33
style="align-items: stretch">
4-
<h2 id="H2_Title">IODD Read Data</h2>
4+
<h1 id="Heading_Title" class="myCustomLabel_CSK_Module_IODDInterpreter">
5+
IODD Read Data
6+
</h1>
57
<stacked-view id="SV_IsInstanceSelected">
68
<stacked-pane id="SP_InstanceISSelected" value="true">
79
<layout-row id="RowLayout2" class="myCustomFrame_CSK_Module_IODDInterpreter">

CSK_Module_IODDInterpreter/pages/pages/CSK_Module_IODDInterpreter/CSK_Module_IODDInterpreter_WriteData.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<layout-row id="RowLayout1" class="myCustomBackground_CSK_Module_IODDInterpreter">
22
<layout-column id="ColumnLayout1" class="myCustomFrameNoColor_CSK_Module_IODDInterpreter"
33
style="align-items: stretch">
4-
<h2 id="H2_Title">IODD Write Data</h2>
4+
<h1 id="Heading_Title" class="myCustomLabel_CSK_Module_IODDInterpreter">
5+
IODD Write Data
6+
</h1>
57
<stacked-view id="SV_IsInstanceSelected">
68
<stacked-pane id="SP_InstanceIsSelected" value="true">
79
<layout-row id="RowLayout2">

CSK_Module_IODDInterpreter/pages/src/converter.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ export function str2num(newstr){
2929
export function changeStyle(theme) {
3030
const style: HTMLStyleElement = document.createElement('style');
3131
style.id ='blub'
32+
33+
const toggleSW = document.querySelectorAll("davinci-toggle-switch")
34+
toggleSW.forEach((userItem) => {
35+
const shadowToggle = userItem.shadowRoot
36+
const finalToggleSW = shadowToggle?.querySelector('div')
37+
finalToggleSW?.classList.add('hasIcon')
38+
});
39+
3240
if (theme == 'CSK_Style'){
3341
var headerToolbar = `.sopasjs-ui-header-toolbar-wrapper { background-color: #FFFFFF; }`
3442
var uiHeader = `.sopasjs-ui-header>.app-logo { margin-right:0px; }`

CSK_Module_IODDInterpreter/pages/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ document.addEventListener('sopasjs-ready', () => {
2020
page_Setup.remove();
2121

2222
setTimeout(() => {
23+
const element = document.querySelector("div.sjs-wrapper > div > div.sjs-fullscreen-toggle")
24+
if(element) {
25+
element.parentElement.removeChild(element)
26+
}
2327
document.title = 'CSK_Module_IODDInterpreter'
2428
}, 500);
2529
})

CSK_Module_IODDInterpreter/project.mf.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ Module can provide chunks of IODD file in JSON format to describe some datapoint
475475
</serves>
476476
</crown>
477477
<meta key="author">SICK AG</meta>
478-
<meta key="version">2.1.2</meta>
478+
<meta key="version">2.1.3</meta>
479479
<meta key="priority">low</meta>
480480
<meta key="copy-protected">false</meta>
481481
<meta key="read-protected">false</meta>

CSK_Module_IODDInterpreter/scripts/Sensors/IODDInterpreter/IODDInterpreter_Model.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ end
221221
---@return string newInstanceId Name of the created instance
222222
local function createNewInstance()
223223
local instanceNumber = ioddInterpreter_Model.helperFuncs.getTableSize(ioddInterpreter_Model.parameters.instances)
224-
local newInstanceId = 'newIntance' .. tostring(instanceNumber)
224+
local newInstanceId = 'newInstance' .. tostring(instanceNumber)
225225
while ioddInterpreter_Model.parameters.instances[newInstanceId] do
226226
instanceNumber = instanceNumber + 1
227-
newInstanceId = 'newIntance' .. tostring(instanceNumber)
227+
newInstanceId = 'newInstance' .. tostring(instanceNumber)
228228
end
229229
ioddInterpreter_Model.parameters.instances[newInstanceId] = {
230230
selectedReadParameters = {},

CSK_Module_IODDInterpreter/scripts/Sensors/IODDInterpreter/helper/xml2lua.lua

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,16 @@ local function parseXmlDeclaration(self, xml, f)
412412
f.match, f.endMatch, f.text = string.find(xml, self._PI, f.pos)
413413
if not f.match then
414414
err(self, self._errstr.declErr, f.pos)
415-
end
415+
end
416+
417+
-- Check for BOM
418+
if f.match == 4 then
419+
xml = string.sub(xml, 4)
420+
f.match, f.endMatch, f.text = string.find(xml, self._PI, f.pos)
421+
if not f.match then
422+
err(self, self._errstr.declErr, f.pos)
423+
end
424+
end
416425

417426
if f.match ~= 1 then
418427
-- Must be at start of doc if present

0 commit comments

Comments
 (0)