d2aura 26.0.7 → 26.0.9
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/api/eda/edaManagerApi.d.ts +26 -0
- package/api/eda/edaManagerApi.js +51 -0
- package/api/eda/edaManagerApi.js.map +1 -0
- package/api/eda/generated/events.d.ts +132 -0
- package/api/eda/generated/events.js +295 -0
- package/api/eda/generated/events.js.map +1 -0
- package/api/eda/generated/structures.d.ts +109 -0
- package/api/eda/generated/structures.js +2 -0
- package/api/eda/generated/structures.js.map +1 -0
- package/core/i18n/d2aura.en.json +40 -1
- package/core/i18n/d2aura.sk.json +87 -1
- package/coreui/components/edaManagerComponent/components/edaBasePanel.d.ts +16 -0
- package/coreui/components/edaManagerComponent/components/edaBasePanel.js +85 -0
- package/coreui/components/edaManagerComponent/components/edaBasePanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaDataBasePanel.d.ts +43 -0
- package/coreui/components/edaManagerComponent/components/edaDataBasePanel.js +217 -0
- package/coreui/components/edaManagerComponent/components/edaDataBasePanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaDetailPanel.d.ts +16 -0
- package/coreui/components/edaManagerComponent/components/edaDetailPanel.js +25 -0
- package/coreui/components/edaManagerComponent/components/edaDetailPanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaGraphPanel.d.ts +7 -0
- package/coreui/components/edaManagerComponent/components/edaGraphPanel.js +393 -0
- package/coreui/components/edaManagerComponent/components/edaGraphPanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaGroupDetailPanel.d.ts +18 -0
- package/coreui/components/edaManagerComponent/components/edaGroupDetailPanel.js +72 -0
- package/coreui/components/edaManagerComponent/components/edaGroupDetailPanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaSampleRangePickerPanel.d.ts +29 -0
- package/coreui/components/edaManagerComponent/components/edaSampleRangePickerPanel.js +94 -0
- package/coreui/components/edaManagerComponent/components/edaSampleRangePickerPanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaScenarioDetailPanel.d.ts +18 -0
- package/coreui/components/edaManagerComponent/components/edaScenarioDetailPanel.js +86 -0
- package/coreui/components/edaManagerComponent/components/edaScenarioDetailPanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaTablePanel.d.ts +4 -0
- package/coreui/components/edaManagerComponent/components/edaTablePanel.js +73 -0
- package/coreui/components/edaManagerComponent/components/edaTablePanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaTimeWindowPickerPanel.d.ts +34 -0
- package/coreui/components/edaManagerComponent/components/edaTimeWindowPickerPanel.js +202 -0
- package/coreui/components/edaManagerComponent/components/edaTimeWindowPickerPanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaTreeView.d.ts +61 -0
- package/coreui/components/edaManagerComponent/components/edaTreeView.js +399 -0
- package/coreui/components/edaManagerComponent/components/edaTreeView.js.map +1 -0
- package/coreui/components/edaManagerComponent/components/edaVectorDetailPanel.d.ts +20 -0
- package/coreui/components/edaManagerComponent/components/edaVectorDetailPanel.js +162 -0
- package/coreui/components/edaManagerComponent/components/edaVectorDetailPanel.js.map +1 -0
- package/coreui/components/edaManagerComponent/constants/edaTypes.d.ts +78 -0
- package/coreui/components/edaManagerComponent/constants/edaTypes.js +71 -0
- package/coreui/components/edaManagerComponent/constants/edaTypes.js.map +1 -0
- package/coreui/components/edaManagerComponent/constants/storageTypes.d.ts +5 -0
- package/coreui/components/edaManagerComponent/constants/storageTypes.js +7 -0
- package/coreui/components/edaManagerComponent/constants/storageTypes.js.map +1 -0
- package/coreui/components/edaManagerComponent/context/sharedSampleRange.d.ts +17 -0
- package/coreui/components/edaManagerComponent/context/sharedSampleRange.js +3 -0
- package/coreui/components/edaManagerComponent/context/sharedSampleRange.js.map +1 -0
- package/coreui/components/edaManagerComponent/context/sharedSampleRangeWrapper.d.ts +6 -0
- package/coreui/components/edaManagerComponent/context/sharedSampleRangeWrapper.js +14 -0
- package/coreui/components/edaManagerComponent/context/sharedSampleRangeWrapper.js.map +1 -0
- package/coreui/components/edaManagerComponent/edaDetail.d.ts +45 -0
- package/coreui/components/edaManagerComponent/edaDetail.js +173 -0
- package/coreui/components/edaManagerComponent/edaDetail.js.map +1 -0
- package/coreui/components/edaManagerComponent/edaManager.d.ts +20 -0
- package/coreui/components/edaManagerComponent/edaManager.js +33 -0
- package/coreui/components/edaManagerComponent/edaManager.js.map +1 -0
- package/coreui/components/edaManagerComponent/edaNavigator.d.ts +19 -0
- package/coreui/components/edaManagerComponent/edaNavigator.js +64 -0
- package/coreui/components/edaManagerComponent/edaNavigator.js.map +1 -0
- package/coreui/components/edaManagerComponent/edaSelect.d.ts +10 -0
- package/coreui/components/edaManagerComponent/edaSelect.js +9 -0
- package/coreui/components/edaManagerComponent/edaSelect.js.map +1 -0
- package/coreui/components/edaManagerComponent/icons/letterCFilled.d.ts +6 -0
- package/coreui/components/edaManagerComponent/icons/letterCFilled.js +6 -0
- package/coreui/components/edaManagerComponent/icons/letterCFilled.js.map +1 -0
- package/coreui/components/edaManagerComponent/icons/letterDFilled.d.ts +6 -0
- package/coreui/components/edaManagerComponent/icons/letterDFilled.js +6 -0
- package/coreui/components/edaManagerComponent/icons/letterDFilled.js.map +1 -0
- package/coreui/components/edaManagerComponent/icons/letterHFilled.d.ts +6 -0
- package/coreui/components/edaManagerComponent/icons/letterHFilled.js +6 -0
- package/coreui/components/edaManagerComponent/icons/letterHFilled.js.map +1 -0
- package/coreui/components/edaManagerComponent/icons/letterIFilled.d.ts +6 -0
- package/coreui/components/edaManagerComponent/icons/letterIFilled.js +6 -0
- package/coreui/components/edaManagerComponent/icons/letterIFilled.js.map +1 -0
- package/coreui/components/edaManagerComponent/icons/letterMFilled.d.ts +6 -0
- package/coreui/components/edaManagerComponent/icons/letterMFilled.js +6 -0
- package/coreui/components/edaManagerComponent/icons/letterMFilled.js.map +1 -0
- package/coreui/components/edaManagerComponent/icons/numberFifteenFilled.d.ts +6 -0
- package/coreui/components/edaManagerComponent/icons/numberFifteenFilled.js +7 -0
- package/coreui/components/edaManagerComponent/icons/numberFifteenFilled.js.map +1 -0
- package/coreui/components/edaManagerComponent/icons/pairOutlined.d.ts +6 -0
- package/coreui/components/edaManagerComponent/icons/pairOutlined.js +6 -0
- package/coreui/components/edaManagerComponent/icons/pairOutlined.js.map +1 -0
- package/coreui/components/edaManagerComponent/icons/periodicOutlined.d.ts +6 -0
- package/coreui/components/edaManagerComponent/icons/periodicOutlined.js +6 -0
- package/coreui/components/edaManagerComponent/icons/periodicOutlined.js.map +1 -0
- package/coreui/components/edaManagerComponent/utils/utils.d.ts +2 -0
- package/coreui/components/edaManagerComponent/utils/utils.js +8 -0
- package/coreui/components/edaManagerComponent/utils/utils.js.map +1 -0
- package/d2configuration/edaManager/DB.EM_EDA_Function.xml +65 -0
- package/d2configuration/edaManager/DB.EM_EDA_GroupVector.xml +65 -0
- package/d2configuration/edaManager/DB.EM_EDA_Scenario.xml +65 -0
- package/d2configuration/edaManager/DB.EM_EDA_Vector.xml +65 -0
- package/d2configuration/edaManager/DB.EM_EDA_VectorEx.xml +65 -0
- package/d2configuration/edaManager/DBC_EM_EDA.xml +51 -0
- package/d2configuration/edaManager/E.EM_DETAIL_IMPL.xml +124 -0
- package/d2configuration/edaManager/E.EM_DETAIL_UNIT.xml +202 -0
- package/d2configuration/edaManager/E.EM_NAVIGATOR_IMPL.xml +160 -0
- package/d2configuration/edaManager/E.EM_NAVIGATOR_SQL.xml +272 -0
- package/d2configuration/edaManager/E.EM_NAVIGATOR_UNIT.xml +346 -0
- package/d2configuration/edaManager/E.EM_VECTOR_IMPL.xml +92 -0
- package/d2configuration/edaManager/E.EM_VECTOR_MANAGER.xml +116 -0
- package/d2configuration/edaManager/E.EM_VECTOR_UNIT.xml +124 -0
- package/d2configuration/edaManager/EDA_CancelSession.xml +54 -0
- package/d2configuration/edaManager/EDA_GetSessionId.xml +54 -0
- package/d2configuration/edaManager/EDA_ReadValuesFromVektorRec.xml +54 -0
- package/d2configuration/edaManager/SD.EM_EDA_Function.xml +135 -0
- package/d2configuration/edaManager/SD.EM_EDA_GroupVector.xml +190 -0
- package/d2configuration/edaManager/SD.EM_EDA_ReadValuesFromVector_V1.xml +168 -0
- package/d2configuration/edaManager/SD.EM_EDA_Scenario.xml +322 -0
- package/d2configuration/edaManager/SD.EM_EDA_Vector.xml +465 -0
- package/d2configuration/edaManager/SD.EM_EDA_VectorEx.xml +80 -0
- package/d2configuration/edaManager/SD.EM_EDA_VectorValues.xml +58 -0
- package/d2configuration/edaManager/SD.EM_Tree_Item.xml +113 -0
- package/package.json +8 -6
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import WithCss from "d2coreui/components/style/withCss";
|
|
3
|
+
import { createStyles } from "antd-style";
|
|
4
|
+
import { LocaleHolder } from "d2core/i18n/localeHolder";
|
|
5
|
+
import { Button, Space } from "antd";
|
|
6
|
+
import { LeftOutlined, RightOutlined, VerticalLeftOutlined, VerticalRightOutlined } from "@ant-design/icons";
|
|
7
|
+
import EnumValuePicker from "d2coreui/components/picker/enumValuePicker";
|
|
8
|
+
import { StepType } from "../constants/edaTypes";
|
|
9
|
+
const useStyles = createStyles(({ css, token }) => {
|
|
10
|
+
return {
|
|
11
|
+
baseLayout: css `
|
|
12
|
+
.segmented {
|
|
13
|
+
border: 1px solid ${token.colorBorder};
|
|
14
|
+
}
|
|
15
|
+
.segmented.ant-segmented-sm {
|
|
16
|
+
height: 24px;
|
|
17
|
+
}
|
|
18
|
+
.segmented {
|
|
19
|
+
height: 32px;
|
|
20
|
+
}
|
|
21
|
+
.segmented.ant-segmented-lg {
|
|
22
|
+
height: 40px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ant-segmented.ant-segmented-sm .ant-segmented-item-label {
|
|
26
|
+
min-height: 18px;
|
|
27
|
+
line-height: 18px;
|
|
28
|
+
}
|
|
29
|
+
.ant-segmented .ant-segmented-item-label {
|
|
30
|
+
min-height: 26px;
|
|
31
|
+
line-height: 26px;
|
|
32
|
+
}
|
|
33
|
+
.ant-segmented.ant-segmented-lg .ant-segmented-item-label {
|
|
34
|
+
min-height: 34px;
|
|
35
|
+
line-height: 34px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ant-space-addon {
|
|
39
|
+
white-space: nowrap;
|
|
40
|
+
}
|
|
41
|
+
`,
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
export class EdaTimeWindowPickerPanel extends React.Component {
|
|
45
|
+
constructor(props) {
|
|
46
|
+
super(props);
|
|
47
|
+
this.mask = LocaleHolder.getDateTimeFormat(true, false, false);
|
|
48
|
+
const { bt, et } = getRange(props.start, props.end, props.step);
|
|
49
|
+
this.state = {
|
|
50
|
+
bt: bt,
|
|
51
|
+
et: et,
|
|
52
|
+
step: props.step,
|
|
53
|
+
};
|
|
54
|
+
this.toStart = this.toStart.bind(this);
|
|
55
|
+
this.toEnd = this.toEnd.bind(this);
|
|
56
|
+
this.previous = this.previous.bind(this);
|
|
57
|
+
this.next = this.next.bind(this);
|
|
58
|
+
this.onStepUpdated = this.onStepUpdated.bind(this);
|
|
59
|
+
this.timeWindowChanged = this.timeWindowChanged.bind(this);
|
|
60
|
+
}
|
|
61
|
+
componentDidUpdate(prevProps) {
|
|
62
|
+
if (!prevProps.start.isSame(this.props.start) || !prevProps.end.isSame(this.props.end)) {
|
|
63
|
+
const { bt, et } = getRange(this.props.start, this.props.end, this.state.step);
|
|
64
|
+
this.setState({ bt, et }, this.timeWindowChanged);
|
|
65
|
+
}
|
|
66
|
+
if (prevProps.step !== this.props.step) {
|
|
67
|
+
const { bt, et } = getRange(this.props.start, this.props.end, this.props.step);
|
|
68
|
+
this.setState({ bt, et, step: this.props.step }, this.timeWindowChanged);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
render() {
|
|
72
|
+
const { size, start, end, disabled } = this.props;
|
|
73
|
+
const { bt, et, step } = this.state;
|
|
74
|
+
return (React.createElement(WithCss, { useStyles: useStyles }, (css) => React.createElement(Space, { size: size, className: css.styles.baseLayout },
|
|
75
|
+
React.createElement(Space.Compact, { size: size },
|
|
76
|
+
React.createElement(Button, { icon: React.createElement(VerticalRightOutlined, null), disabled: bt.isSameOrBefore(start) || disabled, onClick: this.toStart }),
|
|
77
|
+
React.createElement(Button, { icon: React.createElement(LeftOutlined, null), disabled: bt.isSameOrBefore(start) || disabled, onClick: this.previous }),
|
|
78
|
+
React.createElement(Space.Addon, null, bt.format(this.mask)),
|
|
79
|
+
React.createElement(Space.Addon, null, "\u27F7"),
|
|
80
|
+
React.createElement(Space.Addon, null, et.format(this.mask)),
|
|
81
|
+
React.createElement(Button, { icon: React.createElement(RightOutlined, null), disabled: et.isSameOrAfter(end) || disabled, onClick: this.next }),
|
|
82
|
+
React.createElement(Button, { icon: React.createElement(VerticalLeftOutlined, null), disabled: et.isSameOrAfter(end) || disabled, onClick: this.toEnd })),
|
|
83
|
+
React.createElement(EnumValuePicker, { values: StepType, value: step, style: { width: '150px' }, translateValue: true, size: size, popupMatchSelectWidth: true, onChange: (value) => {
|
|
84
|
+
if (value !== undefined) {
|
|
85
|
+
this.onStepUpdated(value);
|
|
86
|
+
}
|
|
87
|
+
} }))));
|
|
88
|
+
}
|
|
89
|
+
toStart() {
|
|
90
|
+
const { start } = this.props;
|
|
91
|
+
const { step } = this.state;
|
|
92
|
+
const unit = stepToDayJsType(step);
|
|
93
|
+
if (!unit) {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.setState({ bt: start, et: start.endOf(unit) }, this.timeWindowChanged);
|
|
97
|
+
}
|
|
98
|
+
toEnd() {
|
|
99
|
+
const { end } = this.props;
|
|
100
|
+
const { step } = this.state;
|
|
101
|
+
const unit = stepToDayJsType(step);
|
|
102
|
+
if (!unit) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
this.setState({ bt: end.startOf(unit), et: end }, this.timeWindowChanged);
|
|
106
|
+
}
|
|
107
|
+
previous() {
|
|
108
|
+
const { start } = this.props;
|
|
109
|
+
const { step } = this.state;
|
|
110
|
+
const unit = stepToDayJsType(step);
|
|
111
|
+
let bt = this.state.bt;
|
|
112
|
+
let et;
|
|
113
|
+
if (!unit) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
bt = bt.subtract(1, 'minute').startOf(unit);
|
|
117
|
+
et = bt.endOf(unit);
|
|
118
|
+
if (bt.isBefore(start)) {
|
|
119
|
+
bt = start;
|
|
120
|
+
}
|
|
121
|
+
this.setState({ bt, et }, this.timeWindowChanged);
|
|
122
|
+
}
|
|
123
|
+
next() {
|
|
124
|
+
const { end } = this.props;
|
|
125
|
+
const { step } = this.state;
|
|
126
|
+
const unit = stepToDayJsType(step);
|
|
127
|
+
let bt;
|
|
128
|
+
let et = this.state.et;
|
|
129
|
+
if (!unit) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
et = et.add(1, 'minute').endOf(unit);
|
|
133
|
+
bt = et.startOf(unit);
|
|
134
|
+
if (et.isAfter(end)) {
|
|
135
|
+
et = end;
|
|
136
|
+
}
|
|
137
|
+
this.setState({ bt, et }, this.timeWindowChanged);
|
|
138
|
+
}
|
|
139
|
+
onStepUpdated(step) {
|
|
140
|
+
const { start, end } = this.props;
|
|
141
|
+
const unit = stepToDayJsType(step);
|
|
142
|
+
let bt;
|
|
143
|
+
let et;
|
|
144
|
+
if (unit) {
|
|
145
|
+
bt = this.state.bt.startOf(unit);
|
|
146
|
+
et = bt.endOf(unit);
|
|
147
|
+
if (bt.isBefore(start)) {
|
|
148
|
+
bt = start;
|
|
149
|
+
}
|
|
150
|
+
if (et.isAfter(end)) {
|
|
151
|
+
et = end;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
bt = start;
|
|
156
|
+
et = end;
|
|
157
|
+
}
|
|
158
|
+
this.setState({ step, bt, et }, this.timeWindowChanged);
|
|
159
|
+
}
|
|
160
|
+
timeWindowChanged() {
|
|
161
|
+
const { bt, et, step } = this.state;
|
|
162
|
+
this.props.onTimeWindowChanged?.(bt, et, step);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
function stepToDayJsType(step) {
|
|
166
|
+
switch (step) {
|
|
167
|
+
case StepType.Hourly:
|
|
168
|
+
return 'hour';
|
|
169
|
+
case StepType.Daily:
|
|
170
|
+
return 'day';
|
|
171
|
+
case StepType.Weekly:
|
|
172
|
+
return 'week';
|
|
173
|
+
case StepType.Monthly:
|
|
174
|
+
return 'month';
|
|
175
|
+
case StepType.Yearly:
|
|
176
|
+
return 'year';
|
|
177
|
+
case StepType.WholeInterval:
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
export function getRange(start, end, step) {
|
|
182
|
+
const unit = stepToDayJsType(step);
|
|
183
|
+
if (!unit) {
|
|
184
|
+
return {
|
|
185
|
+
bt: start,
|
|
186
|
+
et: end,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
let bt = start.startOf(unit);
|
|
190
|
+
let et = start.endOf(unit);
|
|
191
|
+
if (bt.isBefore(start)) {
|
|
192
|
+
bt = start;
|
|
193
|
+
}
|
|
194
|
+
if (et.isAfter(end)) {
|
|
195
|
+
et = end;
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
bt: bt,
|
|
199
|
+
et: et,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=edaTimeWindowPickerPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edaTimeWindowPickerPanel.js","sourceRoot":"","sources":["../../../../../../coreui/components/edaManagerComponent/components/edaTimeWindowPickerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,OAAO,MAAM,mCAAmC,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,EAAC,YAAY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nC,QAAQ,IAAI,EAAE,CAAC;QACX,KAAK,QAAQ,CAAC,MAAM;YAChB,OAAO,MAAM,CAAC;QAClB,KAAK,QAAQ,CAAC,KAAK;YACf,OAAO,KAAK,CAAC;QACjB,KAAK,QAAQ,CAAC,MAAM;YAChB,OAAO,MAAM,CAAC;QAClB,KAAK,QAAQ,CAAC,OAAO;YACjB,OAAO,OAAO,CAAC;QACnB,KAAK,QAAQ,CAAC,MAAM;YAChB,OAAO,MAAM,CAAC;QAClB,KAAK,QAAQ,CAAC,aAAa;YACvB,OAAO,IAAI,CAAC;IACpB,CAAC;AACL,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAkB,EAAE,GAAgB,EAAE,IAAc;IACzE,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAEnC,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO;YACH,EAAE,EAAE,KAAK;YACT,EAAE,EAAE,GAAG;SACV,CAAC;IACN,CAAC;IAED,IAAI,EAAE,GAAgB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,IAAI,EAAE,GAAgB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAExC,IAAI,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,EAAE,GAAG,KAAK,CAAC;IACf,CAAC;IACD,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,EAAE,GAAG,GAAG,CAAC;IACb,CAAC;IAED,OAAO;QACH,EAAE,EAAE,EAAE;QACN,EAAE,EAAE,EAAE;KACT,CAAA;AACL,CAAC","sourcesContent":["import React from \"react\";\r\nimport WithCss from \"d2coreui/components/style/withCss\";\r\nimport {createStyles} from \"antd-style\";\r\nimport {LocaleHolder} from \"d2core/i18n/localeHolder\";\r\nimport {Button, Space} from \"antd\";\r\nimport {SizeType} from \"antd/lib/config-provider/SizeContext\";\r\nimport {LeftOutlined, RightOutlined, VerticalLeftOutlined, VerticalRightOutlined} from \"@ant-design/icons\";\r\nimport dayjs from \"d2core/dayjs\";\r\nimport {OpUnitType} from \"dayjs\";\r\nimport EnumValuePicker from \"d2coreui/components/picker/enumValuePicker\";\r\nimport {StepType} from \"../constants/edaTypes\";\r\n\r\nconst useStyles = createStyles(({css, token}) => {\r\n return {\r\n baseLayout: css`\r\n .segmented {\r\n border: 1px solid ${token.colorBorder};\r\n }\r\n .segmented.ant-segmented-sm {\r\n height: 24px;\r\n }\r\n .segmented {\r\n height: 32px;\r\n }\r\n .segmented.ant-segmented-lg {\r\n height: 40px;\r\n }\r\n\r\n .ant-segmented.ant-segmented-sm .ant-segmented-item-label {\r\n min-height: 18px;\r\n line-height: 18px;\r\n }\r\n .ant-segmented .ant-segmented-item-label {\r\n min-height: 26px;\r\n line-height: 26px;\r\n }\r\n .ant-segmented.ant-segmented-lg .ant-segmented-item-label {\r\n min-height: 34px;\r\n line-height: 34px;\r\n }\r\n \r\n .ant-space-addon {\r\n white-space: nowrap;\r\n }\r\n `,\r\n }\r\n});\r\n\r\ninterface Props {\r\n start: dayjs.Dayjs\r\n end: dayjs.Dayjs\r\n step: StepType\r\n size?: SizeType\r\n disabled?: boolean\r\n\r\n onTimeWindowChanged?: (bt: dayjs.Dayjs, et: dayjs.Dayjs, step: StepType) => void\r\n}\r\n\r\ninterface State {\r\n bt: dayjs.Dayjs\r\n et: dayjs.Dayjs\r\n step: StepType\r\n}\r\n\r\nexport class EdaTimeWindowPickerPanel extends React.Component<Props, State> {\r\n private mask = LocaleHolder.getDateTimeFormat(true, false, false);\r\n\r\n constructor(props: Readonly<Props>) {\r\n super(props);\r\n const {bt, et} = getRange(props.start, props.end, props.step);\r\n\r\n this.state = {\r\n bt: bt,\r\n et: et,\r\n step: props.step,\r\n }\r\n\r\n this.toStart = this.toStart.bind(this);\r\n this.toEnd = this.toEnd.bind(this);\r\n this.previous = this.previous.bind(this);\r\n this.next = this.next.bind(this);\r\n this.onStepUpdated = this.onStepUpdated.bind(this);\r\n this.timeWindowChanged = this.timeWindowChanged.bind(this);\r\n }\r\n\r\n componentDidUpdate(prevProps: Readonly<Props>) {\r\n if (!prevProps.start.isSame(this.props.start) || !prevProps.end.isSame(this.props.end)) {\r\n const {bt, et} = getRange(this.props.start, this.props.end, this.state.step);\r\n this.setState({bt, et}, this.timeWindowChanged);\r\n }\r\n\r\n if (prevProps.step !== this.props.step) {\r\n const {bt, et} = getRange(this.props.start, this.props.end, this.props.step);\r\n this.setState({bt, et, step: this.props.step}, this.timeWindowChanged);\r\n }\r\n }\r\n\r\n render() {\r\n const {size, start, end, disabled} = this.props;\r\n const {bt, et, step} = this.state;\r\n\r\n return (\r\n <WithCss useStyles={useStyles}>\r\n {(css) =>\r\n <Space size={size} className={css.styles.baseLayout}>\r\n <Space.Compact size={size}>\r\n <Button icon={<VerticalRightOutlined/>} disabled={bt.isSameOrBefore(start) || disabled} onClick={this.toStart}/>\r\n <Button icon={<LeftOutlined/>} disabled={bt.isSameOrBefore(start) || disabled} onClick={this.previous}/>\r\n <Space.Addon>{bt.format(this.mask)}</Space.Addon>\r\n <Space.Addon>⟷</Space.Addon>\r\n <Space.Addon>{et.format(this.mask)}</Space.Addon>\r\n <Button icon={<RightOutlined/>} disabled={et.isSameOrAfter(end) || disabled} onClick={this.next}/>\r\n <Button icon={<VerticalLeftOutlined/>} disabled={et.isSameOrAfter(end) || disabled} onClick={this.toEnd}/>\r\n </Space.Compact>\r\n\r\n <EnumValuePicker\r\n values={StepType}\r\n value={step}\r\n style={{width: '150px'}}\r\n translateValue\r\n size={size}\r\n popupMatchSelectWidth\r\n onChange={(value) => {\r\n if (value !== undefined) {\r\n this.onStepUpdated(value as StepType);\r\n }\r\n }}\r\n />\r\n </Space>\r\n }\r\n </WithCss>\r\n )\r\n }\r\n\r\n private toStart() {\r\n const {start} = this.props;\r\n const {step} = this.state;\r\n const unit = stepToDayJsType(step);\r\n\r\n if (!unit) {\r\n return;\r\n }\r\n\r\n this.setState({bt: start, et: start.endOf(unit)}, this.timeWindowChanged);\r\n }\r\n\r\n private toEnd() {\r\n const {end} = this.props;\r\n const {step} = this.state;\r\n const unit = stepToDayJsType(step);\r\n\r\n if (!unit) {\r\n return;\r\n }\r\n\r\n this.setState({bt: end.startOf(unit), et: end}, this.timeWindowChanged);\r\n }\r\n\r\n private previous() {\r\n const {start} = this.props;\r\n const {step} = this.state;\r\n const unit = stepToDayJsType(step);\r\n let bt = this.state.bt;\r\n let et;\r\n\r\n if (!unit) {\r\n return;\r\n }\r\n\r\n bt = bt.subtract(1, 'minute').startOf(unit);\r\n et = bt.endOf(unit);\r\n\r\n if (bt.isBefore(start)) {\r\n bt = start;\r\n }\r\n\r\n this.setState({bt, et}, this.timeWindowChanged);\r\n }\r\n\r\n private next() {\r\n const {end} = this.props;\r\n const {step} = this.state;\r\n const unit = stepToDayJsType(step);\r\n let bt;\r\n let et = this.state.et;\r\n\r\n if (!unit) {\r\n return;\r\n }\r\n\r\n et = et.add(1, 'minute').endOf(unit);\r\n bt = et.startOf(unit);\r\n\r\n if (et.isAfter(end)) {\r\n et = end;\r\n }\r\n\r\n this.setState({bt, et}, this.timeWindowChanged);\r\n }\r\n\r\n private onStepUpdated(step: StepType) {\r\n const {start, end} = this.props;\r\n const unit = stepToDayJsType(step);\r\n let bt;\r\n let et;\r\n\r\n if (unit) {\r\n bt = this.state.bt.startOf(unit);\r\n et = bt.endOf(unit);\r\n\r\n if (bt.isBefore(start)) {\r\n bt = start;\r\n }\r\n if (et.isAfter(end)) {\r\n et = end;\r\n }\r\n } else {\r\n bt = start;\r\n et = end;\r\n }\r\n\r\n this.setState({step, bt, et}, this.timeWindowChanged);\r\n }\r\n\r\n private timeWindowChanged() {\r\n const {bt, et, step} = this.state;\r\n this.props.onTimeWindowChanged?.(bt, et, step);\r\n }\r\n}\r\n\r\nfunction stepToDayJsType(step: StepType): OpUnitType | null {\r\n switch (step) {\r\n case StepType.Hourly:\r\n return 'hour';\r\n case StepType.Daily:\r\n return 'day';\r\n case StepType.Weekly:\r\n return 'week';\r\n case StepType.Monthly:\r\n return 'month';\r\n case StepType.Yearly:\r\n return 'year';\r\n case StepType.WholeInterval:\r\n return null;\r\n }\r\n}\r\n\r\nexport function getRange(start: dayjs.Dayjs, end: dayjs.Dayjs, step: StepType) {\r\n const unit = stepToDayJsType(step);\r\n\r\n if (!unit) {\r\n return {\r\n bt: start,\r\n et: end,\r\n };\r\n }\r\n\r\n let bt: dayjs.Dayjs = start.startOf(unit);\r\n let et: dayjs.Dayjs = start.endOf(unit);\r\n\r\n if (bt.isBefore(start)) {\r\n bt = start;\r\n }\r\n if (et.isAfter(end)) {\r\n et = end;\r\n }\r\n\r\n return {\r\n bt: bt,\r\n et: et,\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { Key } from "react";
|
|
2
|
+
import { TreeDataNode } from "antd";
|
|
3
|
+
import EdaManagerApi from "../../../../api/eda/edaManagerApi";
|
|
4
|
+
import { TypedIndex } from "../constants/edaTypes";
|
|
5
|
+
import { SD_EM_Tree_Item } from "../../../../api/eda/generated/structures";
|
|
6
|
+
export declare enum TreeViewType {
|
|
7
|
+
GROUP = "group",
|
|
8
|
+
SCENARIO = "scenario"
|
|
9
|
+
}
|
|
10
|
+
interface PageData {
|
|
11
|
+
total: number;
|
|
12
|
+
offset: number;
|
|
13
|
+
done: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface DataNode extends TreeDataNode {
|
|
16
|
+
group?: SD_EM_Tree_Item;
|
|
17
|
+
vector?: SD_EM_Tree_Item;
|
|
18
|
+
scenario?: SD_EM_Tree_Item;
|
|
19
|
+
vectorOffset?: PageData;
|
|
20
|
+
groupOffset?: PageData;
|
|
21
|
+
scenarioOffset?: PageData;
|
|
22
|
+
}
|
|
23
|
+
interface Props {
|
|
24
|
+
api: EdaManagerApi;
|
|
25
|
+
type: TreeViewType;
|
|
26
|
+
onItemSelected?: () => void;
|
|
27
|
+
onItemDoubleClick?: (item: TypedIndex) => void;
|
|
28
|
+
}
|
|
29
|
+
interface State {
|
|
30
|
+
treeData: DataNode[];
|
|
31
|
+
expandedKeys: Key[];
|
|
32
|
+
selectedKeys: Key[];
|
|
33
|
+
height: number;
|
|
34
|
+
loading?: string;
|
|
35
|
+
}
|
|
36
|
+
export declare class EdaTreeView extends React.Component<Props, State> {
|
|
37
|
+
private readonly childParentMap;
|
|
38
|
+
private readonly nodeMap;
|
|
39
|
+
private readonly divRef;
|
|
40
|
+
private resizeObserver;
|
|
41
|
+
constructor(props: Readonly<Props>);
|
|
42
|
+
componentDidMount(): Promise<void>;
|
|
43
|
+
componentDidUpdate(prevProps: Props): Promise<void>;
|
|
44
|
+
componentWillUnmount(): void;
|
|
45
|
+
render(): React.ReactNode;
|
|
46
|
+
private titleRenderer;
|
|
47
|
+
private renderTitle;
|
|
48
|
+
private onExpand;
|
|
49
|
+
private loadData;
|
|
50
|
+
private loadGroups;
|
|
51
|
+
private loadScenarios;
|
|
52
|
+
private loadVectors;
|
|
53
|
+
private onLoadData;
|
|
54
|
+
private onDoubleClick;
|
|
55
|
+
private updateTree;
|
|
56
|
+
private convertGroups;
|
|
57
|
+
private convertScenarios;
|
|
58
|
+
private convertVectors;
|
|
59
|
+
private getVectorIcon;
|
|
60
|
+
}
|
|
61
|
+
export {};
|