d2aura 26.0.12 → 26.0.14

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.
Files changed (120) hide show
  1. package/api/eda/edaManagerApi.d.ts +50 -15
  2. package/api/eda/edaManagerApi.js +80 -29
  3. package/api/eda/edaManagerApi.js.map +1 -1
  4. package/api/eda/generated/events.d.ts +109 -60
  5. package/api/eda/generated/events.js +182 -88
  6. package/api/eda/generated/events.js.map +1 -1
  7. package/api/eda/generated/structures.d.ts +78 -14
  8. package/api/eda/generated/structures.js.map +1 -1
  9. package/api/impl/utils/reportError.js +16 -0
  10. package/api/impl/utils/reportError.js.map +1 -1
  11. package/core/i18n/d2aura.sk.json +30 -2
  12. package/core/i18n/jsapi.sk.json +4 -0
  13. package/core/i18n/jsapi.ua.json +4 -0
  14. package/coreui/components/edaManager/components/detail/components/edaVectorMassChangeButton.d.ts +1 -1
  15. package/coreui/components/edaManager/components/detail/components/edaVectorMassChangeButton.js +2 -2
  16. package/coreui/components/edaManager/components/detail/components/edaVectorMassChangeButton.js.map +1 -1
  17. package/coreui/components/edaManagerComponent/components/edaChartViewer.d.ts +14 -0
  18. package/coreui/components/edaManagerComponent/components/edaChartViewer.js +370 -0
  19. package/coreui/components/edaManagerComponent/components/edaChartViewer.js.map +1 -0
  20. package/coreui/components/edaManagerComponent/components/edaDataBasePanel.d.ts +4 -8
  21. package/coreui/components/edaManagerComponent/components/edaDataBasePanel.js +18 -75
  22. package/coreui/components/edaManagerComponent/components/edaDataBasePanel.js.map +1 -1
  23. package/coreui/components/edaManagerComponent/components/edaDetailPanel.d.ts +5 -14
  24. package/coreui/components/edaManagerComponent/components/edaDetailPanel.js +80 -19
  25. package/coreui/components/edaManagerComponent/components/edaDetailPanel.js.map +1 -1
  26. package/coreui/components/edaManagerComponent/components/edaGraphPanel.d.ts +2 -7
  27. package/coreui/components/edaManagerComponent/components/edaGraphPanel.js +15 -380
  28. package/coreui/components/edaManagerComponent/components/edaGraphPanel.js.map +1 -1
  29. package/coreui/components/edaManagerComponent/components/edaGroupDetailPanel.d.ts +3 -14
  30. package/coreui/components/edaManagerComponent/components/edaGroupDetailPanel.js +54 -67
  31. package/coreui/components/edaManagerComponent/components/edaGroupDetailPanel.js.map +1 -1
  32. package/coreui/components/edaManagerComponent/components/edaLoadingOverlay.d.ts +7 -0
  33. package/coreui/components/edaManagerComponent/components/edaLoadingOverlay.js +35 -0
  34. package/coreui/components/edaManagerComponent/components/edaLoadingOverlay.js.map +1 -0
  35. package/coreui/components/edaManagerComponent/components/edaSampleRangePickerPanel.d.ts +2 -16
  36. package/coreui/components/edaManagerComponent/components/edaSampleRangePickerPanel.js +47 -50
  37. package/coreui/components/edaManagerComponent/components/edaSampleRangePickerPanel.js.map +1 -1
  38. package/coreui/components/edaManagerComponent/components/edaScenarioDetailPanel.d.ts +3 -14
  39. package/coreui/components/edaManagerComponent/components/edaScenarioDetailPanel.js +67 -81
  40. package/coreui/components/edaManagerComponent/components/edaScenarioDetailPanel.js.map +1 -1
  41. package/coreui/components/edaManagerComponent/components/edaTableEditorDialog.d.ts +12 -0
  42. package/coreui/components/edaManagerComponent/components/edaTableEditorDialog.js +268 -0
  43. package/coreui/components/edaManagerComponent/components/edaTableEditorDialog.js.map +1 -0
  44. package/coreui/components/edaManagerComponent/components/edaTablePanel.d.ts +2 -6
  45. package/coreui/components/edaManagerComponent/components/edaTablePanel.js +119 -62
  46. package/coreui/components/edaManagerComponent/components/edaTablePanel.js.map +1 -1
  47. package/coreui/components/edaManagerComponent/components/edaTimeWindowPickerPanel.d.ts +2 -13
  48. package/coreui/components/edaManagerComponent/components/edaTimeWindowPickerPanel.js +57 -88
  49. package/coreui/components/edaManagerComponent/components/edaTimeWindowPickerPanel.js.map +1 -1
  50. package/coreui/components/edaManagerComponent/components/edaTreeView.d.ts +4 -51
  51. package/coreui/components/edaManagerComponent/components/edaTreeView.js +299 -259
  52. package/coreui/components/edaManagerComponent/components/edaTreeView.js.map +1 -1
  53. package/coreui/components/edaManagerComponent/components/edaVectorDetailPanel.d.ts +3 -21
  54. package/coreui/components/edaManagerComponent/components/edaVectorDetailPanel.js +160 -179
  55. package/coreui/components/edaManagerComponent/components/edaVectorDetailPanel.js.map +1 -1
  56. package/coreui/components/edaManagerComponent/components/exportDialog.d.ts +18 -0
  57. package/coreui/components/edaManagerComponent/components/exportDialog.js +157 -0
  58. package/coreui/components/edaManagerComponent/components/exportDialog.js.map +1 -0
  59. package/coreui/components/edaManagerComponent/constants/edaTypes.d.ts +10 -11
  60. package/coreui/components/edaManagerComponent/constants/edaTypes.js.map +1 -1
  61. package/coreui/components/edaManagerComponent/context/edaConfigContext.d.ts +26 -0
  62. package/coreui/components/edaManagerComponent/context/edaConfigContext.js +20 -0
  63. package/coreui/components/edaManagerComponent/context/edaConfigContext.js.map +1 -0
  64. package/coreui/components/edaManagerComponent/context/edaVectorDataContext.d.ts +9 -16
  65. package/coreui/components/edaManagerComponent/context/edaVectorDataContext.js.map +1 -1
  66. package/coreui/components/edaManagerComponent/context/edaVectorDataProvider.d.ts +0 -1
  67. package/coreui/components/edaManagerComponent/context/edaVectorDataProvider.js +71 -66
  68. package/coreui/components/edaManagerComponent/context/edaVectorDataProvider.js.map +1 -1
  69. package/coreui/components/edaManagerComponent/context/loadingContext.d.ts +1 -1
  70. package/coreui/components/edaManagerComponent/context/loadingContext.js.map +1 -1
  71. package/coreui/components/edaManagerComponent/context/{sharedSampleRange.d.ts → sharedSampleRangeContext.d.ts} +6 -3
  72. package/coreui/components/edaManagerComponent/context/sharedSampleRangeContext.js +3 -0
  73. package/coreui/components/edaManagerComponent/context/sharedSampleRangeContext.js.map +1 -0
  74. package/coreui/components/edaManagerComponent/context/useEdaActions.d.ts +7 -0
  75. package/coreui/components/edaManagerComponent/context/useEdaActions.js +22 -0
  76. package/coreui/components/edaManagerComponent/context/useEdaActions.js.map +1 -0
  77. package/coreui/components/edaManagerComponent/edaDetail.d.ts +7 -26
  78. package/coreui/components/edaManagerComponent/edaDetail.js +124 -106
  79. package/coreui/components/edaManagerComponent/edaDetail.js.map +1 -1
  80. package/coreui/components/edaManagerComponent/edaManager.d.ts +4 -11
  81. package/coreui/components/edaManagerComponent/edaManager.js +29 -22
  82. package/coreui/components/edaManagerComponent/edaManager.js.map +1 -1
  83. package/coreui/components/edaManagerComponent/edaNavigator.d.ts +4 -12
  84. package/coreui/components/edaManagerComponent/edaNavigator.js +36 -41
  85. package/coreui/components/edaManagerComponent/edaNavigator.js.map +1 -1
  86. package/coreui/components/edaManagerComponent/edaSelect.d.ts +2 -3
  87. package/coreui/components/edaManagerComponent/edaSelect.js +22 -44
  88. package/coreui/components/edaManagerComponent/edaSelect.js.map +1 -1
  89. package/coreui/components/edaManagerComponent/utils/export.d.ts +9 -0
  90. package/coreui/components/edaManagerComponent/utils/export.js +573 -0
  91. package/coreui/components/edaManagerComponent/utils/export.js.map +1 -0
  92. package/coreui/components/edaManagerComponent/utils/utils.d.ts +6 -12
  93. package/coreui/components/edaManagerComponent/utils/utils.js +26 -15
  94. package/coreui/components/edaManagerComponent/utils/utils.js.map +1 -1
  95. package/d2configuration/edaManager/DB.EM_EDA_DescriptiveVector.xml +65 -0
  96. package/d2configuration/edaManager/DB.EM_EDA_FunctionPrescription.xml +65 -0
  97. package/d2configuration/edaManager/E.EM_DETAIL_IMPL.xml +67 -1
  98. package/d2configuration/edaManager/E.EM_DETAIL_SQL.xml +85 -0
  99. package/d2configuration/edaManager/E.EM_DETAIL_UNIT.xml +123 -2
  100. package/d2configuration/edaManager/E.EM_NAVIGATOR_IMPL.xml +1 -1
  101. package/d2configuration/edaManager/E.EM_NAVIGATOR_UNIT.xml +1 -1
  102. package/d2configuration/edaManager/E.EM_VECTOR_IMPL.xml +20 -6
  103. package/d2configuration/edaManager/E.EM_VECTOR_UNIT.xml +95 -17
  104. package/d2configuration/edaManager/SD.EM_EDA_DescriptiveVector.xml +179 -0
  105. package/d2configuration/edaManager/SD.EM_EDA_FunctionPrescription.xml +91 -0
  106. package/d2configuration/edaManager/SD.EM_EDA_InsertValuesToVector_V1.xml +227 -0
  107. package/d2configuration/edaManager/SD.EM_EDA_PairVector.xml +454 -0
  108. package/d2configuration/edaManager/SD.EM_EDA_ReadValuesFromVector_V1.xml +13 -3
  109. package/d2configuration/edaManager/SD.EM_EDA_VectorStats.xml +91 -0
  110. package/d2configuration/edaManager/SD.EM_Filter_Condition.xml +1 -1
  111. package/package.json +6 -4
  112. package/coreui/components/edaManagerComponent/components/edaBasePanel.d.ts +0 -16
  113. package/coreui/components/edaManagerComponent/components/edaBasePanel.js +0 -85
  114. package/coreui/components/edaManagerComponent/components/edaBasePanel.js.map +0 -1
  115. package/coreui/components/edaManagerComponent/context/sharedSampleRange.js +0 -13
  116. package/coreui/components/edaManagerComponent/context/sharedSampleRange.js.map +0 -1
  117. package/d2configuration/edaManager/EDA_CancelSession.xml +0 -54
  118. package/d2configuration/edaManager/EDA_GetSessionId.xml +0 -54
  119. package/d2configuration/edaManager/EDA_ReadValuesFromVektorRec.xml +0 -54
  120. package/d2configuration/edaManager/EDA_StatVectorRec.xml +0 -56
@@ -1,72 +1,59 @@
1
- import React from "react";
1
+ import React, { useEffect } from "react";
2
2
  import { EdaAccessType, EdaUserInputFlagType } from "../constants/edaTypes";
3
- import { Checkbox, Col, Form, Input, Row } from "antd";
4
- import WithCss from "d2coreui/components/style/withCss";
5
- import { createStyles } from "antd-style";
3
+ import { Checkbox, Col, Form, Input, Row, theme } from "antd";
6
4
  import i18n from "d2core/i18n/i18n";
7
5
  import EnumValuePicker from "d2coreui/components/picker/enumValuePicker";
8
- const useStyles = createStyles(({ css }) => {
9
- return {
10
- baseLayout: css `
11
- .eda-detail-no-data {
12
- }
13
- `
14
- };
15
- });
16
- export class EdaGroupDetailPanel extends React.Component {
17
- constructor() {
18
- super(...arguments);
19
- this.formRef = React.createRef();
20
- }
21
- componentDidMount() {
22
- this.formRef.current?.setFieldsValue(this.props.data);
23
- }
24
- componentDidUpdate(prevProps) {
25
- if (prevProps.data !== this.props.data) {
26
- this.formRef.current?.setFieldsValue(this.props.data);
6
+ import { useForm } from "antd/es/form/Form";
7
+ const handleGetValueProps = (v) => ({ checked: v === 1 });
8
+ const handleGetValueFromEvent = (e) => (e.target.checked ? 1 : 0);
9
+ export const EdaGroupDetailPanel = ({ data }) => {
10
+ const { token } = theme.useToken();
11
+ const [form] = useForm();
12
+ const dataId = data.data.ID_SKVEKTOR;
13
+ useEffect(() => {
14
+ form.resetFields();
15
+ if (data) {
16
+ form.setFieldsValue(data);
27
17
  }
28
- }
29
- render() {
30
- const { data, size, variant } = this.props;
31
- return (React.createElement(WithCss, { useStyles: useStyles }, (css) => React.createElement(Form, { ref: this.formRef, layout: "horizontal", style: { overflowX: "hidden" }, className: "record-config-form", size: size, variant: variant, labelCol: { sm: 24, md: 24, lg: 24, xl: 24, xxl: 24 } },
32
- React.createElement(Row, { gutter: css.theme.padding, align: "bottom" },
33
- React.createElement(Col, { flex: "1 1 auto" },
34
- React.createElement("span", null,
35
- "ID: ",
36
- data.data.ID_SKVEKTOR)),
37
- React.createElement(Col, null,
38
- React.createElement(Form.Item, { name: ["data", "ANO_PAIR"], valuePropName: "checked", getValueProps: (v) => ({ checked: v === 1 }), getValueFromEvent: (e) => (e.target.checked ? 1 : 0) },
39
- React.createElement(Checkbox, { disabled: true }, i18n("Pair")))),
40
- React.createElement(Col, null,
41
- React.createElement(Form.Item, { required: true, name: ["data", "ANO_PLATNY"], valuePropName: "checked", getValueProps: (v) => ({ checked: v === 1 }), getValueFromEvent: (e) => (e.target.checked ? 1 : 0) },
42
- React.createElement(Checkbox, { disabled: true }, i18n("Record Validity Indication"))))),
43
- React.createElement(Row, { gutter: css.theme.padding, align: "bottom" },
44
- React.createElement(Col, { span: 24 },
45
- React.createElement(Form.Item, { required: true, name: ["data", "MENO"], label: i18n("Code") },
46
- React.createElement(Input, { readOnly: true })))),
47
- React.createElement(Row, { gutter: css.theme.padding },
48
- React.createElement(Col, { span: 24 },
49
- React.createElement(Form.Item, { required: true, name: ["data", "ZOBRAZ_MENO"], label: i18n("Name[Title]") },
50
- React.createElement(Input, { readOnly: true })))),
51
- React.createElement(Row, { gutter: css.theme.padding },
52
- React.createElement(Col, { flex: "1 1 auto" },
53
- React.createElement(Form.Item, { required: true, label: i18n("Access Type"), name: ["data", "PRIVATE"] },
54
- React.createElement(EnumValuePicker, { open: false, values: EdaAccessType, translateValue: true, translationPrefix: "EdaAccessType_" }))),
55
- React.createElement(Col, { flex: "0 0 auto" },
56
- React.createElement(Form.Item, { label: i18n("Owner"), name: ["data", "AUTOR"] },
57
- React.createElement(Input, { readOnly: true })))),
58
- React.createElement(Row, { gutter: css.theme.padding },
59
- React.createElement(Col, { span: 24 },
60
- React.createElement(Form.Item, { name: ["data", "USERINPUTFLAG"], label: i18n("Manual Access Flag") },
61
- React.createElement(EnumValuePicker, { open: false, values: EdaUserInputFlagType, translateValue: true, translationPrefix: "EdaUserInputFlagType_" })))),
62
- React.createElement(Row, { gutter: css.theme.padding },
63
- React.createElement(Col, { span: 24 },
64
- React.createElement(Form.Item, { name: ["data", "CESTA"], label: i18n("Path") },
65
- React.createElement(Input, { readOnly: true })))),
66
- React.createElement(Row, null,
67
- React.createElement(Col, { span: 24 },
68
- React.createElement(Form.Item, { name: ["data", "POPIS"], label: i18n("Note") },
69
- React.createElement(Input.TextArea, { rows: 4, readOnly: true })))))));
70
- }
71
- }
18
+ }, [dataId, form]);
19
+ return (React.createElement(Form, { form: form, layout: "horizontal", style: { overflowX: "hidden" }, className: "record-config-form", labelCol: { span: 24 } },
20
+ React.createElement(Row, { gutter: token.padding, align: "bottom" },
21
+ React.createElement(Col, { flex: "1 1 auto" },
22
+ React.createElement("span", null,
23
+ "ID: ",
24
+ data.data.ID_SKVEKTOR)),
25
+ React.createElement(Col, null,
26
+ React.createElement(Form.Item, { name: ["data", "ANO_PAIR"], valuePropName: "checked", getValueProps: handleGetValueProps, getValueFromEvent: handleGetValueFromEvent },
27
+ React.createElement(Checkbox, { disabled: true }, i18n("Pair")))),
28
+ React.createElement(Col, null,
29
+ React.createElement(Form.Item, { required: true, name: ["data", "ANO_PLATNY"], valuePropName: "checked", getValueProps: handleGetValueProps, getValueFromEvent: handleGetValueFromEvent },
30
+ React.createElement(Checkbox, { disabled: true }, i18n("Record Validity Indication"))))),
31
+ React.createElement(Row, { gutter: token.padding, align: "bottom" },
32
+ React.createElement(Col, { span: 24 },
33
+ React.createElement(Form.Item, { required: true, name: ["data", "MENO"], label: i18n("Code") },
34
+ React.createElement(Input, { readOnly: true })))),
35
+ React.createElement(Row, { gutter: token.padding },
36
+ React.createElement(Col, { span: 24 },
37
+ React.createElement(Form.Item, { required: true, name: ["data", "ZOBRAZ_MENO"], label: i18n("Name[Title]") },
38
+ React.createElement(Input, { readOnly: true })))),
39
+ React.createElement(Row, { gutter: token.padding },
40
+ React.createElement(Col, { flex: "1 1 auto" },
41
+ React.createElement(Form.Item, { required: true, label: i18n("Access Type"), name: ["data", "PRIVATE"] },
42
+ React.createElement(EnumValuePicker, { open: false, values: EdaAccessType, translateValue: true, translationPrefix: "EdaAccessType_" }))),
43
+ React.createElement(Col, { flex: "0 0 auto" },
44
+ React.createElement(Form.Item, { label: i18n("Owner"), name: ["data", "AUTOR"] },
45
+ React.createElement(Input, { readOnly: true })))),
46
+ React.createElement(Row, { gutter: token.padding },
47
+ React.createElement(Col, { span: 24 },
48
+ React.createElement(Form.Item, { name: ["data", "USERINPUTFLAG"], label: i18n("Manual Access Flag") },
49
+ React.createElement(EnumValuePicker, { open: false, values: EdaUserInputFlagType, translateValue: true, translationPrefix: "EdaUserInputFlagType_" })))),
50
+ React.createElement(Row, { gutter: token.padding },
51
+ React.createElement(Col, { span: 24 },
52
+ React.createElement(Form.Item, { name: ["data", "CESTA"], label: i18n("Path") },
53
+ React.createElement(Input, { readOnly: true })))),
54
+ React.createElement(Row, null,
55
+ React.createElement(Col, { span: 24 },
56
+ React.createElement(Form.Item, { name: ["data", "POPIS"], label: i18n("Note") },
57
+ React.createElement(Input.TextArea, { rows: 4, readOnly: true }))))));
58
+ };
72
59
  //# sourceMappingURL=edaGroupDetailPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"edaGroupDetailPanel.js","sourceRoot":"","sources":["../../../../../../coreui/components/edaManagerComponent/components/edaGroupDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,aAAa,EAAE,oBAAoB,EAAY,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAC,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAgB,KAAK,EAAE,GAAG,EAAC,MAAM,MAAM,CAAC;AACnE,OAAO,OAAO,MAAM,mCAAmC,CAAC;AACxD,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,eAAe,MAAM,4CAA4C,CAAC;AAIzE,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,EAAC,GAAG,EAAC,EAAG,EAAE;IACtC,OAAO;QACH,UAAU,EAAE,GAAG,CAAA;;;SAGd;KACJ,CAAA;AACL,CAAC,CAAC,CAAC;AAaH,MAAM,OAAO,mBAAoB,SAAQ,KAAK,CAAC,SAAuB;IAAtE;;QACqB,YAAO,GAAG,KAAK,CAAC,SAAS,EAA2B,CAAC;IA2I1E,CAAC;IAzIG,iBAAiB;QACb,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC1D,CAAC;IAED,kBAAkB,CAAC,SAA0B;QACzC,IAAI,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YACrC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC1D,CAAC;IACL,CAAC;IAED,MAAM;QACF,MAAM,E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AAC,KAAK,CAAC,QAAQ,IAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,SAAE,CAC3B,CACV,CACJ,CACH,CAEL,CACb,CAAA;IACL,CAAC;CACJ","sourcesContent":["import React from \"react\";\r\nimport {EdaAccessType, EdaUserInputFlagType, GroupData} from \"../constants/edaTypes\";\r\nimport {Checkbox, Col, Form, FormInstance, Input, Row} from \"antd\";\r\nimport WithCss from \"d2coreui/components/style/withCss\";\r\nimport {createStyles} from \"antd-style\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport EnumValuePicker from \"d2coreui/components/picker/enumValuePicker\";\r\nimport {SizeType} from \"antd/lib/config-provider/SizeContext\";\r\nimport {Variant} from \"antd/es/config-provider\";\r\n\r\nconst useStyles = createStyles(({css},) => {\r\n return {\r\n baseLayout: css`\r\n .eda-detail-no-data {\r\n }\r\n `\r\n }\r\n});\r\n\r\ninterface Props {\r\n data: GroupData\r\n\r\n size?: SizeType\r\n variant?: Variant\r\n}\r\n\r\ninterface State {\r\n\r\n}\r\n\r\nexport class EdaGroupDetailPanel extends React.Component<Props, State> {\r\n private readonly formRef = React.createRef<FormInstance<GroupData>>();\r\n\r\n componentDidMount() {\r\n this.formRef.current?.setFieldsValue(this.props.data);\r\n }\r\n\r\n componentDidUpdate(prevProps: Readonly<Props>) {\r\n if (prevProps.data !== this.props.data) {\r\n this.formRef.current?.setFieldsValue(this.props.data);\r\n }\r\n }\r\n\r\n render() {\r\n const {data, size, variant} = this.props;\r\n\r\n return (\r\n <WithCss useStyles={useStyles}>\r\n {(css) =>\r\n <Form<GroupData>\r\n ref={this.formRef}\r\n layout={\"horizontal\"}\r\n style={{overflowX: \"hidden\"}}\r\n className={\"record-config-form\"}\r\n size={size}\r\n variant={variant}\r\n labelCol={{sm: 24, md: 24, lg: 24, xl: 24, xxl: 24}}\r\n >\r\n <Row gutter={css.theme.padding} align={\"bottom\"}>\r\n <Col flex={\"1 1 auto\"}>\r\n <span>ID: {data.data.ID_SKVEKTOR}</span>\r\n </Col>\r\n <Col>\r\n <Form.Item\r\n name={[\"data\", \"ANO_PAIR\"]}\r\n valuePropName={\"checked\"}\r\n getValueProps={(v) => ({checked: v === 1})}\r\n getValueFromEvent={(e) => (e.target.checked ? 1 : 0)}\r\n >\r\n <Checkbox disabled>{i18n(\"Pair\")}</Checkbox>\r\n </Form.Item>\r\n </Col>\r\n <Col>\r\n <Form.Item\r\n required\r\n name={[\"data\", \"ANO_PLATNY\"]}\r\n valuePropName={\"checked\"}\r\n getValueProps={(v) => ({checked: v === 1})}\r\n getValueFromEvent={(e) => (e.target.checked ? 1 : 0)}\r\n >\r\n <Checkbox disabled>{i18n(\"Record Validity Indication\")}</Checkbox>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={css.theme.padding} align={\"bottom\"}>\r\n <Col span={24}>\r\n <Form.Item\r\n required\r\n name={[\"data\", \"MENO\"]}\r\n label={i18n(\"Code\")}\r\n >\r\n <Input readOnly/>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={css.theme.padding}>\r\n <Col span={24}>\r\n <Form.Item\r\n required\r\n name={[\"data\", \"ZOBRAZ_MENO\"]}\r\n label={i18n(\"Name[Title]\")}\r\n >\r\n <Input readOnly/>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={css.theme.padding}>\r\n <Col flex={\"1 1 auto\"}>\r\n <Form.Item\r\n required\r\n label={i18n(\"Access Type\")}\r\n name={[\"data\", \"PRIVATE\"]}\r\n >\r\n <EnumValuePicker\r\n open={false}\r\n values={EdaAccessType}\r\n translateValue\r\n translationPrefix={\"EdaAccessType_\"}\r\n />\r\n </Form.Item>\r\n </Col>\r\n <Col flex={\"0 0 auto\"}>\r\n <Form.Item\r\n label={i18n(\"Owner\")}\r\n name={[\"data\", \"AUTOR\"]}\r\n >\r\n <Input readOnly/>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={css.theme.padding}>\r\n <Col span={24}>\r\n <Form.Item\r\n name={[\"data\", \"USERINPUTFLAG\"]}\r\n label={i18n(\"Manual Access Flag\")}\r\n >\r\n <EnumValuePicker\r\n open={false}\r\n values={EdaUserInputFlagType}\r\n translateValue\r\n translationPrefix={\"EdaUserInputFlagType_\"}\r\n />\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={css.theme.padding}>\r\n <Col span={24}>\r\n <Form.Item\r\n name={[\"data\", \"CESTA\"]}\r\n label={i18n(\"Path\")}\r\n >\r\n <Input readOnly />\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col span={24}>\r\n <Form.Item\r\n name={[\"data\", \"POPIS\"]}\r\n label={i18n(\"Note\")}\r\n >\r\n <Input.TextArea rows={4} readOnly/>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n </Form>\r\n }\r\n </WithCss>\r\n )\r\n }\r\n}"]}
1
+ {"version":3,"file":"edaGroupDetailPanel.js","sourceRoot":"","sources":["../../../../../../coreui/components/edaManagerComponent/components/edaGroupDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAC,aAAa,EAAE,oBAAoB,EAAC,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAC,QAAQ,EAAuB,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAC,MAAM,MAAM,CAAC;AACjF,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,eAAe,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAC,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAG1C,MAAM,mBAAmB,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,EAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAC,CAAC,CAAC;AAChE,MAAM,uBAAuB,GAAG,CAAC,CAAsB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OA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;gBACjB,oBAAC,IAAI,CAAC,IAAI,IACN,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,EACpB,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;oBAEvB,oBAAC,KAAK,IAAC,QAAQ,SAAE,CACT,CACV,CACJ;QACN,oBAAC,GAAG,IAAC,MAAM,EAAE,KAAK,CAAC,OAAO;YACtB,oBAAC,GAAG,IAAC,IAAI,EAAE,EAAE;gBACT,oBAAC,IAAI,CAAC,IAAI,IACN,IAAI,EAAE,CAAC,MAAM,EAAE,eAAe,CAAC,EAC/B,KAAK,EAAE,IAAI,CAAC,oBAAoB,CAAC;oBAEjC,oBAAC,eAAe,IACZ,IAAI,EAAE,KAAK,EACX,MAAM,EAAE,oBAAoB,EAC5B,cAAc,QACd,iBAAiB,EAAE,uBAAuB,GAC5C,CACM,CACV,CACJ;QACN,oBAAC,GAAG,IAAC,MAAM,EAAE,KAAK,CAAC,OAAO;YACtB,oBAAC,GAAG,IAAC,IAAI,EAAE,EAAE;gBACT,oBAAC,IAAI,CAAC,IAAI,IACN,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;oBAEnB,oBAAC,KAAK,IAAC,QAAQ,SAAE,CACT,CACV,CACJ;QACN,oBAAC,GAAG;YACA,oBAAC,GAAG,IAAC,IAAI,EAAE,EAAE;gBACT,oBAAC,IAAI,CAAC,IAAI,IACN,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;oBAEnB,oBAAC,KAAK,CAAC,QAAQ,IAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,SAAE,CAC3B,CACV,CACJ,CACH,CACV,CAAC;AACN,CAAC,CAAA","sourcesContent":["import React, {FC, useEffect} from \"react\";\r\nimport {EdaAccessType, EdaUserInputFlagType} from \"../constants/edaTypes\";\r\nimport {Checkbox, CheckboxChangeEvent, Col, Form, Input, Row, theme} from \"antd\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport EnumValuePicker from \"d2coreui/components/picker/enumValuePicker\";\r\nimport {useForm} from \"antd/es/form/Form\";\r\nimport {GroupData} from \"../../../../api/eda/edaManagerApi\";\r\n\r\nconst handleGetValueProps = (v: number) => ({checked: v === 1});\r\nconst handleGetValueFromEvent = (e: CheckboxChangeEvent) => (e.target.checked ? 1 : 0);\r\n\r\ninterface Props {\r\n data: GroupData\r\n}\r\n\r\nexport const EdaGroupDetailPanel: FC<Props> = ({data}) => {\r\n const {token} = theme.useToken();\r\n const [form] = useForm<GroupData>();\r\n\r\n const dataId = data.data.ID_SKVEKTOR;\r\n\r\n useEffect(() => {\r\n form.resetFields();\r\n\r\n if (data) {\r\n form.setFieldsValue(data);\r\n }\r\n }, [dataId, form]);\r\n \r\n return (\r\n <Form<GroupData>\r\n form={form}\r\n layout={\"horizontal\"}\r\n style={{overflowX: \"hidden\"}}\r\n className={\"record-config-form\"}\r\n labelCol={{span: 24}}\r\n >\r\n <Row gutter={token.padding} align={\"bottom\"}>\r\n <Col flex={\"1 1 auto\"}>\r\n <span>ID: {data.data.ID_SKVEKTOR}</span>\r\n </Col>\r\n <Col>\r\n <Form.Item\r\n name={[\"data\", \"ANO_PAIR\"]}\r\n valuePropName={\"checked\"}\r\n getValueProps={handleGetValueProps}\r\n getValueFromEvent={handleGetValueFromEvent}\r\n >\r\n <Checkbox disabled>{i18n(\"Pair\")}</Checkbox>\r\n </Form.Item>\r\n </Col>\r\n <Col>\r\n <Form.Item\r\n required\r\n name={[\"data\", \"ANO_PLATNY\"]}\r\n valuePropName={\"checked\"}\r\n getValueProps={handleGetValueProps}\r\n getValueFromEvent={handleGetValueFromEvent}\r\n >\r\n <Checkbox disabled>{i18n(\"Record Validity Indication\")}</Checkbox>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={token.padding} align={\"bottom\"}>\r\n <Col span={24}>\r\n <Form.Item\r\n required\r\n name={[\"data\", \"MENO\"]}\r\n label={i18n(\"Code\")}\r\n >\r\n <Input readOnly/>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={token.padding}>\r\n <Col span={24}>\r\n <Form.Item\r\n required\r\n name={[\"data\", \"ZOBRAZ_MENO\"]}\r\n label={i18n(\"Name[Title]\")}\r\n >\r\n <Input readOnly/>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={token.padding}>\r\n <Col flex={\"1 1 auto\"}>\r\n <Form.Item\r\n required\r\n label={i18n(\"Access Type\")}\r\n name={[\"data\", \"PRIVATE\"]}\r\n >\r\n <EnumValuePicker\r\n open={false}\r\n values={EdaAccessType}\r\n translateValue\r\n translationPrefix={\"EdaAccessType_\"}\r\n />\r\n </Form.Item>\r\n </Col>\r\n <Col flex={\"0 0 auto\"}>\r\n <Form.Item\r\n label={i18n(\"Owner\")}\r\n name={[\"data\", \"AUTOR\"]}\r\n >\r\n <Input readOnly/>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={token.padding}>\r\n <Col span={24}>\r\n <Form.Item\r\n name={[\"data\", \"USERINPUTFLAG\"]}\r\n label={i18n(\"Manual Access Flag\")}\r\n >\r\n <EnumValuePicker\r\n open={false}\r\n values={EdaUserInputFlagType}\r\n translateValue\r\n translationPrefix={\"EdaUserInputFlagType_\"}\r\n />\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row gutter={token.padding}>\r\n <Col span={24}>\r\n <Form.Item\r\n name={[\"data\", \"CESTA\"]}\r\n label={i18n(\"Path\")}\r\n >\r\n <Input readOnly/>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n <Row>\r\n <Col span={24}>\r\n <Form.Item\r\n name={[\"data\", \"POPIS\"]}\r\n label={i18n(\"Note\")}\r\n >\r\n <Input.TextArea rows={4} readOnly/>\r\n </Form.Item>\r\n </Col>\r\n </Row>\r\n </Form>\r\n );\r\n}"]}
@@ -0,0 +1,7 @@
1
+ import { FC } from "react";
2
+ interface Props {
3
+ onCancel?: () => void;
4
+ onCancelAll?: () => void;
5
+ }
6
+ export declare const EdaLoadingOverlay: FC<Props>;
7
+ export {};
@@ -0,0 +1,35 @@
1
+ import React, { useContext } from "react";
2
+ import { Button, Progress, Space, Spin, Typography } from "antd";
3
+ import i18n from "d2core/i18n/i18n";
4
+ import { createStyles } from "antd-style";
5
+ import { LoadingContext } from "../context/loadingContext";
6
+ const useStyles = createStyles(({ css, token }) => {
7
+ return {
8
+ fullscreenSpin: css `
9
+ background: ${token.colorBgElevated}CC !important;
10
+ backdrop-filter: blur(2px);
11
+ `,
12
+ progressLayout: css `
13
+ position: fixed;
14
+ top: 50%;
15
+ left: 50%;
16
+ transform: translate(-50%, -50%);
17
+ z-index: 9999;
18
+ display: flex;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ `
22
+ };
23
+ });
24
+ export const EdaLoadingOverlay = ({ onCancel, onCancelAll }) => {
25
+ const { styles } = useStyles();
26
+ const loadingContext = useContext(LoadingContext);
27
+ return (React.createElement(Spin, { spinning: loadingContext?.loading, fullscreen: true, rootClassName: styles.fullscreenSpin, indicator: (React.createElement("div", null,
28
+ React.createElement(Space, { direction: "vertical", className: styles.progressLayout },
29
+ React.createElement(Progress, { type: "dashboard", steps: loadingContext?.loadingCount, percent: loadingContext?.loadingPercentage, format: (percent) => Math.round(percent ?? 0) + "%", trailColor: "rgba(0, 0, 0, 0.06)" }),
30
+ React.createElement(Typography.Text, { style: { whiteSpace: "nowrap" } }, loadingContext?.loadingItem),
31
+ React.createElement(Space.Compact, null,
32
+ onCancel && (React.createElement(Button, { type: "primary", danger: true, onClick: onCancel }, i18n("Cancel"))),
33
+ onCancelAll && (React.createElement(Button, { type: "primary", danger: true, onClick: onCancelAll }, i18n("Cancel All"))))))) }));
34
+ };
35
+ //# sourceMappingURL=edaLoadingOverlay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edaLoadingOverlay.js","sourceRoot":"","sources":["../../../../../../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ACnD,UAAU,EAAC,qBAAqB,GAClC;gBACF,oBAAC,UAAU,CAAC,IAAI,IAAC,KAAK,EAAE,EAAC,UAAU,EAAE,QAAQ,EAAC,IACzC,cAAc,EAAE,WAAW,CACd;gBAClB,oBAAC,KAAK,CAAC,OAAO;oBACT,QAAQ,IAAI,CACT,oBAAC,MAAM,IACH,IAAI,EAAE,SAAS,EACf,MAAM,QACN,OAAO,EAAE,QAAQ,IAEhB,IAAI,CAAC,QAAQ,CAAC,CACV,CACZ;oBACA,WAAW,IAAI,CACZ,oBAAC,MAAM,IACH,IAAI,EAAE,SAAS,EACf,MAAM,QACN,OAAO,EAAE,WAAW,IAEnB,IAAI,CAAC,YAAY,CAAC,CACd,CACZ,CACW,CACZ,CACN,CACT,GACH,CACL,CAAC;AACN,CAAC,CAAA","sourcesContent":["import React, {FC, useContext} from \"react\";\r\nimport {Button, Progress, Space, Spin, Typography} from \"antd\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport {createStyles} from \"antd-style\";\r\nimport {LoadingContext} from \"../context/loadingContext\";\r\n\r\nconst useStyles = createStyles(({css, token}) => {\r\n return {\r\n fullscreenSpin: css`\r\n background: ${token.colorBgElevated}CC !important;\r\n backdrop-filter: blur(2px);\r\n `,\r\n progressLayout: css`\r\n position: fixed;\r\n top: 50%;\r\n left: 50%;\r\n transform: translate(-50%, -50%);\r\n z-index: 9999;\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n `\r\n }\r\n});\r\n\r\ninterface Props {\r\n onCancel?: () => void;\r\n onCancelAll?: () => void;\r\n}\r\n\r\nexport const EdaLoadingOverlay: FC<Props> = ({onCancel, onCancelAll}) => {\r\n const {styles} = useStyles();\r\n const loadingContext = useContext(LoadingContext);\r\n\r\n return (\r\n <Spin\r\n spinning={loadingContext?.loading}\r\n fullscreen\r\n rootClassName={styles.fullscreenSpin}\r\n indicator={(\r\n <div>\r\n <Space direction={\"vertical\"} className={styles.progressLayout}>\r\n <Progress\r\n type={\"dashboard\"}\r\n steps={loadingContext?.loadingCount}\r\n percent={loadingContext?.loadingPercentage}\r\n format={(percent) => Math.round(percent ?? 0) + \"%\"}\r\n trailColor=\"rgba(0, 0, 0, 0.06)\"\r\n />\r\n <Typography.Text style={{whiteSpace: \"nowrap\"}}>\r\n {loadingContext?.loadingItem}\r\n </Typography.Text>\r\n <Space.Compact>\r\n {onCancel && (\r\n <Button\r\n type={\"primary\"}\r\n danger\r\n onClick={onCancel}\r\n >\r\n {i18n(\"Cancel\")}\r\n </Button>\r\n )}\r\n {onCancelAll && (\r\n <Button\r\n type={\"primary\"}\r\n danger\r\n onClick={onCancelAll}\r\n >\r\n {i18n(\"Cancel All\")}\r\n </Button>\r\n )}\r\n </Space.Compact>\r\n </Space>\r\n </div>\r\n )}\r\n />\r\n );\r\n}"]}
@@ -1,7 +1,6 @@
1
- import React from "react";
1
+ import { FC } from "react";
2
2
  import dayjs from "d2core/dayjs";
3
3
  import { EdaSamplingType } from "../constants/edaTypes";
4
- import { SizeType } from "antd/lib/config-provider/SizeContext";
5
4
  interface Props {
6
5
  bt: dayjs.Dayjs;
7
6
  et: dayjs.Dayjs;
@@ -10,20 +9,7 @@ interface Props {
10
9
  pageSize: number;
11
10
  loading: boolean;
12
11
  page: number;
13
- size?: SizeType;
14
12
  onChange: (bt: dayjs.Dayjs, et: dayjs.Dayjs, step: EdaSamplingType, page: number) => void;
15
13
  }
16
- interface State {
17
- bt: dayjs.Dayjs;
18
- et: dayjs.Dayjs;
19
- sampling: EdaSamplingType;
20
- autoRefresh: boolean;
21
- }
22
- export declare class EdaSampleRangePickerPanel extends React.Component<Props, State> {
23
- private mask;
24
- constructor(props: Readonly<Props>);
25
- componentDidUpdate(prevProps: Readonly<Props>): void;
26
- render(): React.JSX.Element;
27
- private updateValues;
28
- }
14
+ export declare const EdaSampleRangePickerPanel: FC<Props>;
29
15
  export {};
@@ -1,6 +1,5 @@
1
- import React from "react";
1
+ import React, { useContext, useEffect, useMemo, useState } from "react";
2
2
  import { EdaSamplingType } from "../constants/edaTypes";
3
- import WithCss from "d2coreui/components/style/withCss";
4
3
  import { Button, Checkbox, Popover, Space } from "antd";
5
4
  import DateRangeInputConfirm from "d2coreui/components/date/dateRangeInputConfirm";
6
5
  import { DateRangeInputMode } from "d2coreui/components/date/dateRangeInput";
@@ -11,6 +10,7 @@ import { ReloadOutlined } from "@ant-design/icons";
11
10
  import { LocaleHolder } from "d2core/i18n/localeHolder";
12
11
  import { createStyles } from "antd-style";
13
12
  import DataGridPagination from "d2coreui/components/grid/panel/dataGridPagination";
13
+ import SizeContext from "antd/es/config-provider/SizeContext";
14
14
  const useStyles = createStyles(({ css }) => {
15
15
  return {
16
16
  baseLayout: css `
@@ -41,54 +41,51 @@ const useStyles = createStyles(({ css }) => {
41
41
  `,
42
42
  };
43
43
  });
44
- export class EdaSampleRangePickerPanel extends React.Component {
45
- constructor(props) {
46
- super(props);
47
- this.mask = LocaleHolder.getDateTimeFormat(true, false, false);
48
- this.state = {
49
- bt: props.bt,
50
- et: props.et,
51
- sampling: props.sampling,
52
- autoRefresh: false
53
- };
54
- }
55
- componentDidUpdate(prevProps) {
56
- const { bt, et, sampling } = this.props;
57
- if (!bt.isSame(prevProps.bt) || !et.isSame(prevProps.et) || sampling !== prevProps.sampling) {
58
- this.setState({ bt: bt, et: et, sampling: sampling });
59
- }
60
- }
61
- render() {
62
- const { bt, et, sampling, autoRefresh } = this.state;
63
- const { loading, onChange, size, totalCount, pageSize, page } = this.props;
64
- const filterChanged = bt !== this.props.bt || et !== this.props.et || sampling !== this.props.sampling;
65
- return (React.createElement(WithCss, { useStyles: useStyles }, (css) => React.createElement(Space.Compact, { size: size, className: css.styles.baseLayout },
66
- React.createElement(DateRangeInputConfirm, { mask: this.mask, className: "ant-input-compact-item ant-input-compact-first-item", fromValue: bt, toValue: et, defaultMode: DateRangeInputMode.ADVANCED, onChange: (fromValue, toValue) => {
67
- if (fromValue !== null && toValue !== null) {
68
- this.updateValues({ bt: fromValue, et: toValue });
69
- }
70
- } }),
71
- React.createElement(EnumValuePicker, { style: { minWidth: "220px" }, values: EdaSamplingType, translateValue: true, translationPrefix: "EdaSamplingType_", value: sampling, popupMatchSelectWidth: true, onChange: (value) => this.updateValues({ sampling: value }) }),
72
- React.createElement(Popover, { content: React.createElement(Checkbox, { checked: autoRefresh, onChange: e => this.updateValues({ autoRefresh: e.target.checked }) }, i18n("Auto Refresh")), placement: "topLeft", trigger: ["contextMenu", "hover"] },
73
- React.createElement(Button, { color: filterChanged ? "danger" : "primary", variant: "solid", loading: loading, icon: React.createElement("span", null,
74
- autoRefresh && React.createElement(AutoReloadIcon, null),
75
- !autoRefresh && React.createElement(ReloadOutlined, null)), onClick: () => onChange(bt, et, sampling, page) })),
76
- pageSize < totalCount &&
77
- React.createElement(React.Fragment, null,
78
- React.createElement("div", { style: { flex: "1 1 auto" } }),
79
- React.createElement("div", { className: "paging" + " " + (size ?? "") },
80
- React.createElement(DataGridPagination, { current: page, pageSize: pageSize, total: totalCount, onGoToPage: (page) => {
81
- const { bt, et, sampling } = this.state;
82
- this.props.onChange(bt, et, sampling, page);
83
- } }))))));
84
- }
85
- updateValues(values) {
86
- this.setState(values, () => {
87
- if (this.state.autoRefresh) {
88
- const { bt, et, sampling } = this.state;
89
- this.props.onChange(bt, et, sampling, this.props.page);
44
+ export const EdaSampleRangePickerPanel = ({ bt, et, sampling, onChange, page, loading, totalCount, pageSize }) => {
45
+ const { styles } = useStyles();
46
+ const size = useContext(SizeContext);
47
+ const mask = useMemo(() => LocaleHolder.getDateTimeFormat(true, false, false), []);
48
+ const [state, setState] = useState({
49
+ bt,
50
+ et,
51
+ sampling,
52
+ autoRefresh: false,
53
+ });
54
+ useEffect(() => {
55
+ setState((prev) => ({
56
+ ...prev,
57
+ bt,
58
+ et,
59
+ sampling,
60
+ }));
61
+ }, [bt, et, sampling]);
62
+ const filterChanged = !bt.isSame(state.bt) || !et.isSame(state.et) || sampling !== state.sampling;
63
+ const handleUpdate = (updates) => {
64
+ setState((prev) => {
65
+ const newState = { ...prev, ...updates };
66
+ if (newState.autoRefresh) {
67
+ onChange(newState.bt, newState.et, newState.sampling, page);
90
68
  }
69
+ return newState;
91
70
  });
92
- }
93
- }
71
+ };
72
+ return (React.createElement(Space.Compact, { className: styles.baseLayout },
73
+ React.createElement(DateRangeInputConfirm, { mask: mask, className: "ant-input-compact-item ant-input-compact-first-item", fromValue: state.bt, toValue: state.et, defaultMode: DateRangeInputMode.ADVANCED, onChange: (fromValue, toValue) => {
74
+ if (fromValue !== null && toValue !== null) {
75
+ handleUpdate({ bt: fromValue, et: toValue });
76
+ }
77
+ } }),
78
+ React.createElement(EnumValuePicker, { style: { minWidth: "220px" }, values: EdaSamplingType, translateValue: true, translationPrefix: "EdaSamplingType_", value: state.sampling, popupMatchSelectWidth: true, onChange: (value) => handleUpdate({ sampling: value }) }),
79
+ React.createElement(Popover, { content: React.createElement(Checkbox, { checked: state.autoRefresh, onChange: e => handleUpdate({ autoRefresh: e.target.checked }) }, i18n("Auto Refresh")), placement: "topLeft", trigger: ["contextMenu", "hover"] },
80
+ React.createElement(Button, { color: filterChanged ? "danger" : "primary", variant: "solid", loading: loading, icon: React.createElement("span", null,
81
+ state.autoRefresh && React.createElement(AutoReloadIcon, null),
82
+ !state.autoRefresh && React.createElement(ReloadOutlined, null)), onClick: () => onChange(state.bt, state.et, state.sampling, page) })),
83
+ pageSize < totalCount &&
84
+ React.createElement(React.Fragment, null,
85
+ React.createElement("div", { style: { flex: "1 1 auto" } }),
86
+ React.createElement("div", { className: "paging" + " " + (size ?? "") },
87
+ React.createElement(DataGridPagination, { current: page, pageSize: pageSize, total: totalCount, onGoToPage: (page) => {
88
+ onChange(state.bt, state.et, state.sampling, page);
89
+ } })))));
90
+ };
94
91
  //# sourceMappingURL=edaSampleRangePickerPanel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"edaSampleRangePickerPanel.js","sourceRoot":"","sources":["../../../../../../coreui/components/edaManagerComponent/components/edaSampleRangePickerPan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UAAU,EAAC,GAAQ;oBACtC,6BAAK,SAAS,EAAE,QAAQ,GAAG,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;wBACzC,oBAAC,kBAAkB,IACf,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;gCACjB,MAAM,EAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;gCACtC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC;4BAChD,CAAC,GACH,CACA,CACP,CAEK,CAEd,CACb,CAAA;IACL,CAAC;IAEO,YAAY,CAAC,MAAsB;QACvC,IAAI,CAAC,QAAQ,CAAC,MAAa,EAAE,GAAG,EAAE;YAC9B,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;gBACzB,MAAM,EAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;gBACtC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC3D,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ","sourcesContent":["import React from \"react\";\r\nimport dayjs from \"d2core/dayjs\";\r\nimport {EdaSamplingType} from \"../constants/edaTypes\";\r\nimport WithCss from \"d2coreui/components/style/withCss\";\r\nimport {Button, Checkbox, Popover, Space} from \"antd\";\r\nimport DateRangeInputConfirm from \"d2coreui/components/date/dateRangeInputConfirm\";\r\nimport {DateRangeInputMode} from \"d2coreui/components/date/dateRangeInput\";\r\nimport EnumValuePicker from \"d2coreui/components/picker/enumValuePicker\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport {AutoReloadIcon} from \"../../../icons/icons\";\r\nimport {ReloadOutlined} from \"@ant-design/icons\";\r\nimport {LocaleHolder} from \"d2core/i18n/localeHolder\";\r\nimport {createStyles} from \"antd-style\";\r\nimport {SizeType} from \"antd/lib/config-provider/SizeContext\";\r\nimport DataGridPagination from \"d2coreui/components/grid/panel/dataGridPagination\";\r\n\r\nconst useStyles = createStyles(({css},) => {\r\n return {\r\n baseLayout: css`\r\n width: 100%;\r\n display: flex;\r\n \r\n > *:first-child {\r\n min-width: 320px;\r\n flex: 0 0 auto;\r\n }\r\n \r\n > *:last-child(-1) {\r\n flex: 1 1 auto;\r\n }\r\n \r\n .paging {\r\n display: flex;\r\n white-space: nowrap;\r\n }\r\n \r\n .paging.small li {\r\n line-height: 24px !important;\r\n }\r\n \r\n .paging.large li {\r\n line-height: 40px !important;\r\n }\r\n `,\r\n }\r\n});\r\n\r\ninterface Props {\r\n bt: dayjs.Dayjs\r\n et: dayjs.Dayjs\r\n sampling: EdaSamplingType\r\n totalCount: number\r\n pageSize: number\r\n loading: boolean\r\n page: number\r\n\r\n size?: SizeType\r\n\r\n onChange: (bt: dayjs.Dayjs, et: dayjs.Dayjs, step: EdaSamplingType, page: number) => void\r\n}\r\n\r\ninterface State {\r\n bt: dayjs.Dayjs\r\n et: dayjs.Dayjs\r\n sampling: EdaSamplingType\r\n autoRefresh: boolean\r\n}\r\n\r\nexport class EdaSampleRangePickerPanel 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 this.state = {\r\n bt: props.bt,\r\n et: props.et,\r\n sampling: props.sampling,\r\n autoRefresh: false\r\n }\r\n }\r\n\r\n componentDidUpdate(prevProps: Readonly<Props>) {\r\n const {bt, et, sampling} = this.props;\r\n\r\n if (!bt.isSame(prevProps.bt) || !et.isSame(prevProps.et) || sampling !== prevProps.sampling) {\r\n this.setState({bt: bt, et: et, sampling: sampling});\r\n }\r\n }\r\n\r\n render() {\r\n const {bt, et, sampling, autoRefresh} = this.state;\r\n const {loading, onChange, size, totalCount, pageSize, page} = this.props;\r\n const filterChanged = bt !== this.props.bt || et !== this.props.et || sampling !== this.props.sampling;\r\n\r\n return (\r\n <WithCss useStyles={useStyles}>\r\n {(css) =>\r\n <Space.Compact size={size} className={css.styles.baseLayout}>\r\n <DateRangeInputConfirm\r\n mask={this.mask}\r\n className=\"ant-input-compact-item ant-input-compact-first-item\"\r\n fromValue={bt}\r\n toValue={et}\r\n defaultMode={DateRangeInputMode.ADVANCED}\r\n onChange={(fromValue, toValue) => {\r\n if (fromValue !== null && toValue !== null) {\r\n this.updateValues({bt: fromValue, et: toValue});\r\n }\r\n }}\r\n />\r\n <EnumValuePicker\r\n style={{minWidth: \"220px\"}}\r\n values={EdaSamplingType}\r\n translateValue\r\n translationPrefix={\"EdaSamplingType_\"}\r\n value={sampling}\r\n popupMatchSelectWidth\r\n onChange={(value) => this.updateValues({sampling: value as EdaSamplingType})}\r\n />\r\n <Popover\r\n content={\r\n <Checkbox\r\n checked={autoRefresh}\r\n onChange={e => this.updateValues({autoRefresh: e.target.checked})}\r\n >\r\n {i18n(\"Auto Refresh\")}\r\n </Checkbox>\r\n }\r\n placement={\"topLeft\"}\r\n trigger={[\"contextMenu\", \"hover\"]}\r\n >\r\n <Button\r\n color={filterChanged ? \"danger\" : \"primary\"}\r\n variant={\"solid\"}\r\n loading={loading}\r\n icon={\r\n <span>\r\n {autoRefresh && <AutoReloadIcon/>}\r\n {!autoRefresh && <ReloadOutlined/>}\r\n </span>\r\n }\r\n onClick={() => onChange(bt, et, sampling, page)}\r\n />\r\n </Popover>\r\n {pageSize < totalCount &&\r\n <>\r\n <div style={{flex: \"1 1 auto\"}}></div>\r\n <div className={\"paging\" + \" \" + (size ?? \"\")}>\r\n <DataGridPagination\r\n current={page}\r\n pageSize={pageSize}\r\n total={totalCount}\r\n onGoToPage={(page) => {\r\n const {bt, et, sampling} = this.state;\r\n this.props.onChange(bt, et, sampling, page);\r\n }}\r\n />\r\n </div>\r\n </>\r\n }\r\n </Space.Compact>\r\n }\r\n </WithCss>\r\n )\r\n }\r\n\r\n private updateValues(values: Partial<State>) {\r\n this.setState(values as any, () => {\r\n if (this.state.autoRefresh) {\r\n const {bt, et, sampling} = this.state;\r\n this.props.onChange(bt, et, sampling, this.props.page);\r\n }\r\n });\r\n }\r\n}"]}
1
+ {"version":3,"file":"edaSampleRangePickerPanel.js","sourceRoot":"","sources":["../../../../../../coreui/components/edaManagerComponent/components/edaSampleRangePickerPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAK,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAC,eAAe,EAAC,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAC,MAAM,MAAM,CAAC;AACtD,OAAO,qBAAqB,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAC,kBAAkB,EAAC,MAAM,yCAAyC,CAAC;AAC3E,OAAO,eAAe,MAAM,4CAA4C,CAAC;AACzE,OAAO,IAAI,MAAM,kBAAkB,CAAC;AACpC,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAC;AACxC,OAAO,kBAAkB,MAAM,mDAAmD,CAAC;AACnF,OAAO,WAAW,MAAM,qCAAqC,CAAC;AAE9D,MAAM,SAAS,GAAG,YAAY,CAAC,CAAC,EAAC,GAAG,EAAC,EAAG,EAAE;IACtC,OAAO;QACH,UAAU,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;SAyBd;KACJ,CAAA;AACL,CAAC,CAAC,CAAC;AAqBH,MA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EjC,oBAAC,MAAM,IACH,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,EAC3C,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,EAChB,IAAI,EACA;oBACK,KAAK,CAAC,WAAW,IAAI,oBAAC,cAAc,OAAE;oBACtC,CAAC,KAAK,CAAC,WAAW,IAAI,oBAAC,cAAc,OAAE,CACrC,EAEX,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,GACnE,CACI;QACT,QAAQ,GAAG,UAAU;YAClB;gBACI,6BAAK,KAAK,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,GAAQ;gBACtC,6BAAK,SAAS,EAAE,QAAQ,GAAG,GAAG,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;oBACzC,oBAAC,kBAAkB,IACf,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;4BACjB,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;wBACvD,CAAC,GACH,CACA,CACP,CAEK,CACnB,CAAC;AACN,CAAC,CAAA","sourcesContent":["import React, {FC, useContext, useEffect, useMemo, useState} from \"react\";\r\nimport dayjs from \"d2core/dayjs\";\r\nimport {EdaSamplingType} from \"../constants/edaTypes\";\r\nimport {Button, Checkbox, Popover, Space} from \"antd\";\r\nimport DateRangeInputConfirm from \"d2coreui/components/date/dateRangeInputConfirm\";\r\nimport {DateRangeInputMode} from \"d2coreui/components/date/dateRangeInput\";\r\nimport EnumValuePicker from \"d2coreui/components/picker/enumValuePicker\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport {AutoReloadIcon} from \"../../../icons/icons\";\r\nimport {ReloadOutlined} from \"@ant-design/icons\";\r\nimport {LocaleHolder} from \"d2core/i18n/localeHolder\";\r\nimport {createStyles} from \"antd-style\";\r\nimport DataGridPagination from \"d2coreui/components/grid/panel/dataGridPagination\";\r\nimport SizeContext from \"antd/es/config-provider/SizeContext\";\r\n\r\nconst useStyles = createStyles(({css},) => {\r\n return {\r\n baseLayout: css`\r\n width: 100%;\r\n display: flex;\r\n \r\n > *:first-child {\r\n min-width: 320px;\r\n flex: 0 0 auto;\r\n }\r\n \r\n > *:last-child(-1) {\r\n flex: 1 1 auto;\r\n }\r\n \r\n .paging {\r\n display: flex;\r\n white-space: nowrap;\r\n }\r\n \r\n .paging.small li {\r\n line-height: 24px !important;\r\n }\r\n \r\n .paging.large li {\r\n line-height: 40px !important;\r\n }\r\n `,\r\n }\r\n});\r\n\r\ninterface Props {\r\n bt: dayjs.Dayjs\r\n et: dayjs.Dayjs\r\n sampling: EdaSamplingType\r\n totalCount: number\r\n pageSize: number\r\n loading: boolean\r\n page: number\r\n\r\n onChange: (bt: dayjs.Dayjs, et: dayjs.Dayjs, step: EdaSamplingType, page: number) => void\r\n}\r\n\r\ninterface State {\r\n bt: dayjs.Dayjs\r\n et: dayjs.Dayjs\r\n sampling: EdaSamplingType\r\n autoRefresh: boolean\r\n}\r\n\r\nexport const EdaSampleRangePickerPanel: FC<Props> = ({bt, et, sampling, onChange, page, loading, totalCount, pageSize}) => {\r\n const {styles} = useStyles();\r\n const size = useContext(SizeContext);\r\n\r\n const mask = useMemo(() => LocaleHolder.getDateTimeFormat(true, false, false), []);\r\n\r\n const [state, setState] = useState<State>({\r\n bt,\r\n et,\r\n sampling,\r\n autoRefresh: false,\r\n });\r\n\r\n useEffect(() => {\r\n setState((prev) => ({\r\n ...prev,\r\n bt,\r\n et,\r\n sampling,\r\n }))\r\n }, [bt, et, sampling]);\r\n\r\n const filterChanged = !bt.isSame(state.bt) || !et.isSame(state.et) || sampling !== state.sampling;\r\n\r\n const handleUpdate = (updates: Partial<typeof state>) => {\r\n setState((prev) => {\r\n const newState = {...prev, ...updates};\r\n\r\n if (newState.autoRefresh) {\r\n onChange(newState.bt, newState.et, newState.sampling, page);\r\n }\r\n\r\n return newState;\r\n });\r\n }\r\n\r\n return (\r\n <Space.Compact className={styles.baseLayout}>\r\n <DateRangeInputConfirm\r\n mask={mask}\r\n className=\"ant-input-compact-item ant-input-compact-first-item\"\r\n fromValue={state.bt}\r\n toValue={state.et}\r\n defaultMode={DateRangeInputMode.ADVANCED}\r\n onChange={(fromValue, toValue) => {\r\n if (fromValue !== null && toValue !== null) {\r\n handleUpdate({bt: fromValue, et: toValue});\r\n }\r\n }}\r\n />\r\n <EnumValuePicker\r\n style={{minWidth: \"220px\"}}\r\n values={EdaSamplingType}\r\n translateValue\r\n translationPrefix={\"EdaSamplingType_\"}\r\n value={state.sampling}\r\n popupMatchSelectWidth\r\n onChange={(value) => handleUpdate({sampling: value as EdaSamplingType})}\r\n />\r\n <Popover\r\n content={\r\n <Checkbox\r\n checked={state.autoRefresh}\r\n onChange={e => handleUpdate({autoRefresh: e.target.checked})}\r\n >\r\n {i18n(\"Auto Refresh\")}\r\n </Checkbox>\r\n }\r\n placement={\"topLeft\"}\r\n trigger={[\"contextMenu\", \"hover\"]}\r\n >\r\n <Button\r\n color={filterChanged ? \"danger\" : \"primary\"}\r\n variant={\"solid\"}\r\n loading={loading}\r\n icon={\r\n <span>\r\n {state.autoRefresh && <AutoReloadIcon/>}\r\n {!state.autoRefresh && <ReloadOutlined/>}\r\n </span>\r\n }\r\n onClick={() => onChange(state.bt, state.et, state.sampling, page)}\r\n />\r\n </Popover>\r\n {pageSize < totalCount &&\r\n <>\r\n <div style={{flex: \"1 1 auto\"}}></div>\r\n <div className={\"paging\" + \" \" + (size ?? \"\")}>\r\n <DataGridPagination\r\n current={page}\r\n pageSize={pageSize}\r\n total={totalCount}\r\n onGoToPage={(page) => {\r\n onChange(state.bt, state.et, state.sampling, page);\r\n }}\r\n />\r\n </div>\r\n </>\r\n }\r\n </Space.Compact>\r\n );\r\n}"]}
@@ -1,18 +1,7 @@
1
- import React from "react";
2
- import { ScenarioData } from "../constants/edaTypes";
3
- import { SizeType } from "antd/lib/config-provider/SizeContext";
4
- import { Variant } from "antd/es/config-provider";
1
+ import { FC } from "react";
2
+ import { ScenarioData } from "../../../../api/eda/edaManagerApi";
5
3
  interface Props {
6
4
  data: ScenarioData;
7
- size?: SizeType;
8
- variant?: Variant;
9
- }
10
- interface State {
11
- }
12
- export declare class EdaScenarioDetailPanel extends React.Component<Props, State> {
13
- private readonly formRef;
14
- componentDidMount(): void;
15
- componentDidUpdate(prevProps: Readonly<Props>): void;
16
- render(): React.JSX.Element;
17
5
  }
6
+ export declare const EdaScenarioDetailPanel: FC<Props>;
18
7
  export {};