@finos/legend-application-studio 27.1.6 → 27.1.7
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/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.d.ts.map +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js +1 -1
- package/lib/components/editor/editor-group/mapping-editor/MappingTestableEditor.js.map +1 -1
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.d.ts +1 -7
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.d.ts.map +1 -1
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js +2 -72
- package/lib/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.js.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.d.ts.map +1 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js +10 -1
- package/lib/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.js.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.d.ts +2 -0
- package/lib/stores/editor/utils/TestableUtils.d.ts.map +1 -1
- package/lib/stores/editor/utils/TestableUtils.js +25 -3
- package/lib/stores/editor/utils/TestableUtils.js.map +1 -1
- package/lib/stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.d.ts +16 -1
- package/lib/stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.d.ts.map +1 -1
- package/package.json +11 -11
- package/src/components/editor/editor-group/mapping-editor/MappingTestableEditor.tsx +3 -1
- package/src/components/extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.tsx +1 -119
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestableState.ts +1 -1
- package/src/stores/editor/editor-state/element-editor-state/mapping/testable/MappingTestingHelper.ts +16 -1
- package/src/stores/editor/utils/TestableUtils.ts +38 -3
- package/src/stores/extensions/DSL_Data_LegendStudioApplicationPlugin_Extension.ts +33 -1
- package/tsconfig.json +0 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts +0 -22
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.d.ts.map +0 -1
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.js +0 -61
- package/lib/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.js.map +0 -1
- package/src/components/editor/editor-group/external-format-editor/DSL_ExternalFormat_ExternalFormatConnectionEditor.tsx +0 -103
@@ -1,103 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Copyright (c) 2020-present, Goldman Sachs
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
import { observer } from 'mobx-react-lite';
|
17
|
-
import {
|
18
|
-
ExternalFormatConnection,
|
19
|
-
PackageableElementExplicitReference,
|
20
|
-
UrlStream,
|
21
|
-
type Binding,
|
22
|
-
} from '@finos/legend-graph';
|
23
|
-
import { computed, makeObservable } from 'mobx';
|
24
|
-
import { ConnectionValueState } from '../../../../stores/editor/editor-state/element-editor-state/connection/ConnectionEditorState.js';
|
25
|
-
import type { EditorStore } from '../../../../stores/editor/EditorStore.js';
|
26
|
-
import { NewConnectionValueDriver } from '../../../../stores/editor/NewElementState.js';
|
27
|
-
import { externalFormat_urlStream_setUrl } from '../../../../stores/graph-modifier/DSL_ExternalFormat_GraphModifierHelper.js';
|
28
|
-
import { EXTERNAL_FORMAT_CONNECTION } from '../../../extensions/DSL_ExternalFormat_LegendStudioApplicationPlugin.js';
|
29
|
-
|
30
|
-
export class ExternalFormatConnectionValueState extends ConnectionValueState {
|
31
|
-
override connection: ExternalFormatConnection;
|
32
|
-
|
33
|
-
constructor(editorStore: EditorStore, connection: ExternalFormatConnection) {
|
34
|
-
super(editorStore, connection);
|
35
|
-
this.connection = connection;
|
36
|
-
}
|
37
|
-
|
38
|
-
label(): string {
|
39
|
-
return 'external format connection';
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
export const ExternalFormatConnectionEditor = observer(
|
44
|
-
(props: {
|
45
|
-
connectionValueState: ExternalFormatConnectionValueState;
|
46
|
-
isReadOnly: boolean;
|
47
|
-
}) => {
|
48
|
-
const { connectionValueState, isReadOnly } = props;
|
49
|
-
const connection = connectionValueState.connection;
|
50
|
-
const changeUrl: React.ChangeEventHandler<HTMLTextAreaElement> = (event) =>
|
51
|
-
externalFormat_urlStream_setUrl(
|
52
|
-
connection.externalSource,
|
53
|
-
event.target.value,
|
54
|
-
);
|
55
|
-
return (
|
56
|
-
<div className="external-format-connection-editor">
|
57
|
-
<div className="external-format-connection-editor__section">
|
58
|
-
<div className="external-format-connection-editor__section__header__label">
|
59
|
-
URL
|
60
|
-
</div>
|
61
|
-
<div className="external-format-connection-editor__section__header__prompt">
|
62
|
-
Specifies the connection URL
|
63
|
-
</div>
|
64
|
-
<textarea
|
65
|
-
className="external-format-connection-editor__section__textarea"
|
66
|
-
spellCheck={false}
|
67
|
-
value={connection.externalSource.url}
|
68
|
-
onChange={changeUrl}
|
69
|
-
disabled={isReadOnly}
|
70
|
-
/>
|
71
|
-
</div>
|
72
|
-
</div>
|
73
|
-
);
|
74
|
-
},
|
75
|
-
);
|
76
|
-
|
77
|
-
export class NewExternalFormatConnectionDriver extends NewConnectionValueDriver<ExternalFormatConnection> {
|
78
|
-
constructor(editorStore: EditorStore) {
|
79
|
-
super(editorStore);
|
80
|
-
|
81
|
-
makeObservable(this, {
|
82
|
-
isValid: computed,
|
83
|
-
});
|
84
|
-
}
|
85
|
-
|
86
|
-
get isValid(): boolean {
|
87
|
-
return true;
|
88
|
-
}
|
89
|
-
|
90
|
-
getConnectionType(): string {
|
91
|
-
return EXTERNAL_FORMAT_CONNECTION;
|
92
|
-
}
|
93
|
-
|
94
|
-
createConnection(store: Binding): ExternalFormatConnection {
|
95
|
-
const externalFormatConnection = new ExternalFormatConnection(
|
96
|
-
PackageableElementExplicitReference.create(store),
|
97
|
-
);
|
98
|
-
const urlStream = new UrlStream();
|
99
|
-
externalFormat_urlStream_setUrl(urlStream, '');
|
100
|
-
externalFormatConnection.externalSource = urlStream;
|
101
|
-
return externalFormatConnection;
|
102
|
-
}
|
103
|
-
}
|