@opencor/opencor 0.20250818.0 → 0.20250822.0

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.
@@ -9,9 +9,3 @@ defineProps<{
9
9
  percent: number
10
10
  }>()
11
11
  </script>
12
-
13
- <style scoped>
14
- .no-animation :deep(.p-progressbar-value) {
15
- transition: none !important;
16
- }
17
- </style>
@@ -52,10 +52,6 @@ function onCellEditComplete(event: DataTableCellEditCompleteEvent): void {
52
52
  </script>
53
53
 
54
54
  <style scoped>
55
- :deep(.p-datatable-header-cell) {
56
- transition: none;
57
- }
58
-
59
55
  :deep(.p-inputnumber-input) {
60
56
  padding: 0 2px !important;
61
57
  margin: 0 !important;
@@ -1,6 +1,6 @@
1
1
  <template>
2
- <Fieldset class="ml-4! mr-4! mb-4!" legend="Issues">
3
- <ScrollPanel :class="simulationOnly ? 'issues-scroll-panel-only' : 'issues-scroll-panel'">
2
+ <Fieldset :class="'ml-4! mr-4! mb-4! ' + (simulationOnly ? 'fieldset-simulation-only' : 'fieldset')" legend="Issues">
3
+ <ScrollPanel :class="simulationOnly ? 'scroll-panel-simulation-only' : 'scroll-panel'">
4
4
  <div v-for="(issue, index) in issues" :key="`issue_${index}`" :class="`issue ${index > 0 ? 'mt-4!' : ''}`">
5
5
  <Message v-if="issue.type === locApi.EIssueType.ERROR" severity="error" icon="pi pi-times-circle">
6
6
  {{ issue.description }}
@@ -23,15 +23,28 @@ defineProps<{
23
23
  </script>
24
24
 
25
25
  <style scoped>
26
+ .fieldset,
27
+ .fieldset-simulation-only {
28
+ overflow: hidden;
29
+ }
30
+
31
+ .fieldset {
32
+ height: calc(var(--block-ui-height) - var(--main-menu-height) - var(--file-tablist-height) - 1rem);
33
+ }
34
+
35
+ .fieldset-simulation-only {
36
+ height: calc(var(--block-ui-height) - 1rem);
37
+ }
38
+
26
39
  .issue {
27
40
  user-select: text;
28
41
  }
29
42
 
30
- .issues-scroll-panel-only {
31
- height: calc(100vh - 4.75rem);
43
+ .scroll-panel {
44
+ height: calc(var(--block-ui-height) - var(--main-menu-height) - var(--file-tablist-height) - 4.75rem);
32
45
  }
33
46
 
34
- .issues-scroll-panel {
35
- height: calc(100vh - var(--main-menu-height) - var(--file-tablist-height) - 4.75rem);
47
+ .scroll-panel-simulation-only {
48
+ height: calc(var(--block-ui-height) - 4.75rem);
36
49
  }
37
50
  </style>
@@ -1,23 +1,25 @@
1
1
  <template>
2
- <div :class="`flex flex-row h-full ${simulationOnly ? 'simulation-experiment-only' : 'simulation-experiment'}`">
2
+ <div :class="`flex flex-row h-full ${simulationOnly ? 'div-simulation-only' : 'div-simulation'}`">
3
3
  <IssuesView v-if="issues.length !== 0" class="grow" :issues="issues" :simulationOnly="simulationOnly" />
4
4
  <div v-else class="flex flex-row grow">
5
5
  <div class="ml-4 mr-4 mb-4">
6
- <Fieldset legend="Input parameters">
7
- <InputWidget
8
- v-for="(input, index) in (uiJson as any).input"
9
- v-model="inputValues[index]"
10
- v-show="showInput[index]"
11
- :key="`input_${index}`"
12
- :name="input.name"
13
- :maximumValue="input.maximumValue"
14
- :minimumValue="input.minimumValue"
15
- :possibleValues="input.possibleValues"
16
- :stepValue="input.stepValue"
17
- :class="index !== 0 ? 'mt-6' : ''"
18
- @change="updateUiAndSimulation"
19
- />
20
- </Fieldset>
6
+ <ScrollPanel class="h-full">
7
+ <Fieldset legend="Input parameters">
8
+ <InputWidget
9
+ v-for="(input, index) in (uiJson as any).input"
10
+ v-model="inputValues[index]"
11
+ v-show="showInput[index]"
12
+ :key="`input_${index}`"
13
+ :name="input.name"
14
+ :maximumValue="input.maximumValue"
15
+ :minimumValue="input.minimumValue"
16
+ :possibleValues="input.possibleValues"
17
+ :stepValue="input.stepValue"
18
+ :class="index !== 0 ? 'mt-6' : ''"
19
+ @change="updateUiAndSimulation"
20
+ />
21
+ </Fieldset>
22
+ </ScrollPanel>
21
23
  </div>
22
24
  <div :id="plotsDivId" class="grow">
23
25
  <GraphPanelWidget
@@ -46,7 +48,7 @@ const props = defineProps<{
46
48
  uiJson: locApi.IUiJson
47
49
  }>()
48
50
 
49
- const math = mathjs.create(mathjs.all, {})
51
+ const math = mathjs.create(mathjs.all ?? {}, {})
50
52
  const model = props.file.document().model(0)
51
53
  const instance = props.file.instance()
52
54
  const instanceTask = instance.task(0)
@@ -142,11 +144,11 @@ function updateUiAndSimulation() {
142
144
  height: calc(100% / var(--graph-panel-widget-count));
143
145
  }
144
146
 
145
- .simulation-experiment-only {
146
- height: 100vh;
147
+ .div-simulation-only {
148
+ height: var(--block-ui-height);
147
149
  }
148
150
 
149
- .simulation-experiment {
150
- height: calc(100vh - var(--main-menu-height) - var(--file-tablist-height));
151
+ .div-simulation {
152
+ height: calc(var(--block-ui-height) - var(--main-menu-height) - var(--file-tablist-height));
151
153
  }
152
154
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div :class="`h-full ${simulationOnly ? 'simulation-experiment-only' : 'simulation-experiment'}`">
2
+ <div :class="`h-full ${simulationOnly ? 'div-simulation-only' : 'div-simulation'}`">
3
3
  <Toolbar :id="toolbarId" class="p-1!">
4
4
  <template #start>
5
5
  <Button class="p-1!" icon="pi pi-play-circle" severity="secondary" text @click="onRun()" />
@@ -10,34 +10,36 @@
10
10
  <SplitterPanel :size="simulationOnly ? 100 : 89">
11
11
  <Splitter>
12
12
  <SplitterPanel class="ml-4 mr-4 mb-4 min-w-fit" :size="25">
13
- <SimulationPropertyEditor :file="file" />
14
- <!--
13
+ <ScrollPanel class="h-full">
14
+ <SimulationPropertyEditor :file="file" />
15
+ <!--
15
16
  <SolversPropertyEditor />
16
17
  <GraphsPropertyEditor />
17
18
  <ParametersPropertyEditor />
18
19
  -->
19
- <Fieldset legend="X-axis">
20
- <Select
21
- v-model="xParameter"
22
- filter
23
- filterMode="lenient"
24
- :options="parameters"
25
- size="small"
26
- class="w-full"
27
- @change="updatePlot()"
28
- />
29
- </Fieldset>
30
- <Fieldset legend="Y-axis">
31
- <Select
32
- v-model="yParameter"
33
- filter
34
- filterMode="lenient"
35
- :options="parameters"
36
- size="small"
37
- class="w-full"
38
- @change="updatePlot()"
39
- />
40
- </Fieldset>
20
+ <Fieldset legend="X-axis">
21
+ <Select
22
+ v-model="xParameter"
23
+ filter
24
+ filterMode="lenient"
25
+ :options="parameters"
26
+ size="small"
27
+ class="w-full"
28
+ @change="updatePlot()"
29
+ />
30
+ </Fieldset>
31
+ <Fieldset legend="Y-axis">
32
+ <Select
33
+ v-model="yParameter"
34
+ filter
35
+ filterMode="lenient"
36
+ :options="parameters"
37
+ size="small"
38
+ class="w-full"
39
+ @change="updatePlot()"
40
+ />
41
+ </Fieldset>
42
+ </ScrollPanel>
41
43
  </SplitterPanel>
42
44
  <SplitterPanel :size="75">
43
45
  <GraphPanelWidget :plots="plots" />
@@ -64,6 +66,7 @@ import * as locApi from '../../libopencor/locApi'
64
66
  import { type IGraphPanelPlot } from '../widgets/GraphPanelWidget.vue'
65
67
 
66
68
  const props = defineProps<{
69
+ uiEnabled: boolean
67
70
  file: locApi.File
68
71
  isActiveFile: boolean
69
72
  simulationOnly?: boolean
@@ -154,6 +157,10 @@ vueCommon.trackElementHeight(toolbarId)
154
157
 
155
158
  if (!common.isMobile()) {
156
159
  vueusecore.onKeyStroke((event: KeyboardEvent) => {
160
+ if (!props.uiEnabled) {
161
+ return
162
+ }
163
+
157
164
  if (props.isActiveFile && !event.ctrlKey && !event.shiftKey && !event.metaKey && event.code === 'F9') {
158
165
  event.preventDefault()
159
166
 
@@ -164,10 +171,6 @@ if (!common.isMobile()) {
164
171
  </script>
165
172
 
166
173
  <style scoped>
167
- :deep(.p-button) {
168
- transition: none;
169
- }
170
-
171
174
  :deep(.p-button-icon) {
172
175
  font-size: 1.5rem;
173
176
  }
@@ -202,13 +205,14 @@ if (!common.isMobile()) {
202
205
  cursor: default;
203
206
  }
204
207
 
205
- .simulation-experiment-only {
206
- height: calc(100vh - var(--simulation-experiment-toolbar-height));
208
+ .div-simulation-only {
209
+ height: calc(var(--block-ui-height) - var(--simulation-experiment-toolbar-height));
207
210
  }
208
211
 
209
- .simulation-experiment {
212
+ .div-simulation {
210
213
  height: calc(
211
- 100vh - var(--main-menu-height) - var(--file-tablist-height) - var(--simulation-experiment-toolbar-height)
214
+ var(--block-ui-height) - var(--main-menu-height) - var(--file-tablist-height) -
215
+ var(--simulation-experiment-toolbar-height)
212
216
  );
213
217
  }
214
218
  </style>