@finos/legend-application 3.0.3 → 4.0.2
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/application/LegendApplication.d.ts +2 -2
- package/lib/application/LegendApplication.d.ts.map +1 -1
- package/lib/application/LegendApplication.js +4 -4
- package/lib/application/LegendApplication.js.map +1 -1
- package/lib/application/LegendApplicationPluginManager.d.ts +3 -3
- package/lib/application/LegendApplicationPluginManager.d.ts.map +1 -1
- package/lib/components/ActionAlert.d.ts +1 -0
- package/lib/components/ActionAlert.d.ts.map +1 -1
- package/lib/components/ActionAlert.js +2 -2
- package/lib/components/ActionAlert.js.map +1 -1
- package/lib/components/ApplicationStoreProvider.d.ts +3 -3
- package/lib/components/ApplicationStoreProvider.d.ts.map +1 -1
- package/lib/components/ApplicationStoreProvider.js +2 -2
- package/lib/components/ApplicationStoreProvider.js.map +1 -1
- package/lib/components/ApplicationStoreProviderTestUtils.d.ts +5 -5
- package/lib/components/ApplicationStoreProviderTestUtils.d.ts.map +1 -1
- package/lib/components/ApplicationStoreProviderTestUtils.js +5 -4
- package/lib/components/ApplicationStoreProviderTestUtils.js.map +1 -1
- package/lib/components/ApplicationTestID.js +1 -1
- package/lib/components/ApplicationTestID.js.map +1 -1
- package/lib/components/BasicValueSpecificationEditor.d.ts +44 -0
- package/lib/components/BasicValueSpecificationEditor.d.ts.map +1 -0
- package/lib/components/BasicValueSpecificationEditor.js +276 -0
- package/lib/components/BasicValueSpecificationEditor.js.map +1 -0
- package/lib/components/BlockingAlert.d.ts +1 -0
- package/lib/components/BlockingAlert.d.ts.map +1 -1
- package/lib/components/BlockingAlert.js +1 -1
- package/lib/components/BlockingAlert.js.map +1 -1
- package/lib/components/CustomDatePicker.d.ts +38 -0
- package/lib/components/CustomDatePicker.d.ts.map +1 -0
- package/lib/components/CustomDatePicker.js +592 -0
- package/lib/components/CustomDatePicker.js.map +1 -0
- package/lib/components/DocumentationLink.d.ts +1 -1
- package/lib/components/DocumentationLink.js +2 -2
- package/lib/components/DocumentationLink.js.map +1 -1
- package/lib/components/LambdaEditor.d.ts +2 -1
- package/lib/components/LambdaEditor.d.ts.map +1 -1
- package/lib/components/LambdaEditor.js +3 -3
- package/lib/components/LambdaEditor.js.map +1 -1
- package/lib/components/LambdaParameterValuesEditor.d.ts +25 -0
- package/lib/components/LambdaParameterValuesEditor.d.ts.map +1 -0
- package/lib/components/LambdaParameterValuesEditor.js +52 -0
- package/lib/components/LambdaParameterValuesEditor.js.map +1 -0
- package/lib/components/LegendApplicationComponentFrameworkProvider.d.ts +1 -1
- package/lib/components/LegendApplicationComponentFrameworkProvider.js +3 -3
- package/lib/components/LegendApplicationComponentFrameworkProvider.js.map +1 -1
- package/lib/components/LegendApplicationNavigationContextServiceUtils.d.ts +32 -0
- package/lib/components/LegendApplicationNavigationContextServiceUtils.d.ts.map +1 -0
- package/lib/components/LegendApplicationNavigationContextServiceUtils.js +57 -0
- package/lib/components/LegendApplicationNavigationContextServiceUtils.js.map +1 -0
- package/lib/components/NotificationManager.d.ts +1 -0
- package/lib/components/NotificationManager.d.ts.map +1 -1
- package/lib/components/NotificationManager.js +2 -2
- package/lib/components/NotificationManager.js.map +1 -1
- package/lib/components/TextInputEditor.d.ts +2 -2
- package/lib/components/TextInputEditor.d.ts.map +1 -1
- package/lib/components/TextInputEditor.js +2 -2
- package/lib/components/TextInputEditor.js.map +1 -1
- package/lib/components/{AppHeader.d.ts → VirtualAssistant.d.ts} +5 -5
- package/lib/components/VirtualAssistant.d.ts.map +1 -0
- package/lib/components/VirtualAssistant.js +171 -0
- package/lib/components/VirtualAssistant.js.map +1 -0
- package/lib/components/WebApplicationNavigatorProvider.d.ts +2 -2
- package/lib/components/WebApplicationNavigatorProvider.d.ts.map +1 -1
- package/lib/components/WebApplicationNavigatorProvider.js +1 -1
- package/lib/components/WebApplicationNavigatorProvider.js.map +1 -1
- package/lib/components/WebApplicationNavigatorProviderTestUtils.d.ts +2 -2
- package/lib/components/WebApplicationNavigatorProviderTestUtils.d.ts.map +1 -1
- package/lib/components/WebApplicationNavigatorProviderTestUtils.js +3 -2
- package/lib/components/WebApplicationNavigatorProviderTestUtils.js.map +1 -1
- package/lib/const.js +2 -2
- package/lib/const.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/index.d.ts +30 -22
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +32 -22
- package/lib/index.js.map +1 -1
- package/lib/stores/ApplicationEvent.d.ts +9 -7
- package/lib/stores/ApplicationEvent.d.ts.map +1 -1
- package/lib/stores/ApplicationEvent.js +10 -8
- package/lib/stores/ApplicationEvent.js.map +1 -1
- package/lib/stores/ApplicationStore.d.ts +15 -9
- package/lib/stores/ApplicationStore.d.ts.map +1 -1
- package/lib/stores/ApplicationStore.js +26 -21
- package/lib/stores/ApplicationStore.js.map +1 -1
- package/lib/stores/ApplicationStoreTestUtils.d.ts +3 -3
- package/lib/stores/ApplicationStoreTestUtils.d.ts.map +1 -1
- package/lib/stores/ApplicationStoreTestUtils.js +2 -2
- package/lib/stores/ApplicationStoreTestUtils.js.map +1 -1
- package/lib/stores/ApplicationTelemetry.d.ts +1 -1
- package/lib/stores/ApplicationTelemetry.d.ts.map +1 -1
- package/lib/stores/ApplicationTelemetry.js +2 -2
- package/lib/stores/ApplicationTelemetry.js.map +1 -1
- package/lib/stores/CJS__Fuse.cjs +35 -0
- package/lib/stores/CJS__Fuse.cjs.map +1 -0
- package/lib/stores/CJS__Fuse.d.cts +28 -0
- package/lib/stores/CJS__Fuse.d.cts.map +1 -0
- package/lib/stores/LambdaParameterState.d.ts +59 -0
- package/lib/stores/LambdaParameterState.d.ts.map +1 -0
- package/lib/stores/LambdaParameterState.js +184 -0
- package/lib/stores/LambdaParameterState.js.map +1 -0
- package/lib/stores/LegendApplicationAssistantService.d.ts +63 -0
- package/lib/stores/LegendApplicationAssistantService.d.ts.map +1 -0
- package/lib/stores/LegendApplicationAssistantService.js +167 -0
- package/lib/stores/LegendApplicationAssistantService.js.map +1 -0
- package/lib/stores/LegendApplicationConfig.d.ts +5 -4
- package/lib/stores/LegendApplicationConfig.d.ts.map +1 -1
- package/lib/stores/LegendApplicationConfig.js +8 -3
- package/lib/stores/LegendApplicationConfig.js.map +1 -1
- package/lib/stores/LegendApplicationDocumentationService.d.ts +70 -0
- package/lib/stores/LegendApplicationDocumentationService.d.ts.map +1 -0
- package/lib/stores/LegendApplicationDocumentationService.js +152 -0
- package/lib/stores/LegendApplicationDocumentationService.js.map +1 -0
- package/lib/stores/LegendApplicationEventService.d.ts +22 -0
- package/lib/stores/LegendApplicationEventService.d.ts.map +1 -0
- package/lib/stores/LegendApplicationEventService.js +25 -0
- package/lib/stores/LegendApplicationEventService.js.map +1 -0
- package/lib/stores/LegendApplicationNavigationContextService.d.ts +74 -0
- package/lib/stores/LegendApplicationNavigationContextService.d.ts.map +1 -0
- package/lib/stores/LegendApplicationNavigationContextService.js +118 -0
- package/lib/stores/LegendApplicationNavigationContextService.js.map +1 -0
- package/lib/stores/LegendApplicationPlugin.d.ts +6 -2
- package/lib/stores/LegendApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/LegendApplicationPlugin.js.map +1 -1
- package/lib/stores/PureLanguageSupport.d.ts.map +1 -1
- package/lib/stores/PureLanguageSupport.js +8 -2
- package/lib/stores/PureLanguageSupport.js.map +1 -1
- package/lib/stores/ValueSpecificationModifierHelper.d.ts +27 -0
- package/lib/stores/ValueSpecificationModifierHelper.d.ts.map +1 -0
- package/lib/stores/ValueSpecificationModifierHelper.js +49 -0
- package/lib/stores/ValueSpecificationModifierHelper.js.map +1 -0
- package/package.json +24 -18
- package/src/application/LegendApplication.tsx +6 -6
- package/src/application/LegendApplicationPluginManager.tsx +3 -3
- package/src/components/ActionAlert.tsx +2 -2
- package/src/components/ApplicationStoreProvider.tsx +4 -4
- package/src/components/ApplicationStoreProviderTestUtils.tsx +7 -6
- package/src/components/BasicValueSpecificationEditor.tsx +703 -0
- package/src/components/BlockingAlert.tsx +1 -1
- package/src/components/CustomDatePicker.tsx +1235 -0
- package/src/components/DocumentationLink.tsx +2 -2
- package/src/components/LambdaEditor.tsx +4 -4
- package/src/components/LambdaParameterValuesEditor.tsx +114 -0
- package/src/components/LegendApplicationComponentFrameworkProvider.tsx +3 -3
- package/src/components/LegendApplicationNavigationContextServiceUtils.tsx +63 -0
- package/src/components/NotificationManager.tsx +2 -2
- package/src/components/TextInputEditor.tsx +2 -2
- package/src/components/VirtualAssistant.tsx +600 -0
- package/src/components/WebApplicationNavigatorProvider.tsx +1 -1
- package/src/components/WebApplicationNavigatorProviderTestUtils.tsx +3 -2
- package/src/index.ts +39 -28
- package/src/stores/ApplicationEvent.ts +11 -7
- package/src/stores/ApplicationStore.ts +29 -27
- package/src/stores/ApplicationStoreTestUtils.ts +4 -4
- package/src/stores/ApplicationTelemetry.ts +2 -2
- package/src/stores/CJS__Fuse.cts +28 -0
- package/src/stores/LambdaParameterState.ts +314 -0
- package/src/stores/LegendApplicationAssistantService.ts +218 -0
- package/src/stores/LegendApplicationConfig.ts +20 -6
- package/src/stores/LegendApplicationDocumentationService.ts +276 -0
- package/src/stores/LegendApplicationEventService.ts +32 -0
- package/src/stores/LegendApplicationNavigationContextService.ts +131 -0
- package/src/stores/LegendApplicationPlugin.ts +10 -2
- package/src/stores/PureLanguageSupport.ts +8 -2
- package/src/stores/ValueSpecificationModifierHelper.ts +104 -0
- package/tsconfig.json +18 -12
- package/lib/components/AppHeader.d.ts.map +0 -1
- package/lib/components/AppHeader.js +0 -26
- package/lib/components/AppHeader.js.map +0 -1
- package/lib/stores/LegendApplicationDocumentationRegistry.d.ts +0 -36
- package/lib/stores/LegendApplicationDocumentationRegistry.d.ts.map +0 -1
- package/lib/stores/LegendApplicationDocumentationRegistry.js +0 -47
- package/lib/stores/LegendApplicationDocumentationRegistry.js.map +0 -1
- package/src/components/AppHeader.tsx +0 -49
- package/src/stores/LegendApplicationDocumentationRegistry.ts +0 -81
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import type { LegendApplicationConfig, LegendApplicationConfigurationData, LegendApplicationVersionData } from '../stores/LegendApplicationConfig';
|
|
16
|
+
import type { LegendApplicationConfig, LegendApplicationConfigurationData, LegendApplicationVersionData } from '../stores/LegendApplicationConfig.js';
|
|
17
17
|
import { type AbstractPlugin, type AbstractPreset, LogEvent } from '@finos/legend-shared';
|
|
18
18
|
import type { GraphPluginManager } from '@finos/legend-graph';
|
|
19
|
-
import type { LegendApplicationPluginManager } from './LegendApplicationPluginManager';
|
|
19
|
+
import type { LegendApplicationPluginManager } from './LegendApplicationPluginManager.js';
|
|
20
20
|
export declare abstract class LegendApplicationLogger {
|
|
21
21
|
abstract debug(event: LogEvent, ...data: unknown[]): void;
|
|
22
22
|
abstract info(event: LogEvent, ...data: unknown[]): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendApplication.d.ts","sourceRoot":"","sources":["../../src/application/LegendApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EACV,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC7B,MAAM,
|
|
1
|
+
{"version":3,"file":"LegendApplication.d.ts","sourceRoot":"","sources":["../../src/application/LegendApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,OAAO,KAAK,EACV,uBAAuB,EACvB,kCAAkC,EAClC,4BAA4B,EAC7B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,cAAc,EAEnB,QAAQ,EAIT,MAAM,sBAAsB,CAAC;AAG9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAG1F,8BAAsB,uBAAuB;IAC3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a,EAAE,8BAA8B,EAC7C,MAAM,EAAE,uBAAuB,KAC5B,IAAI,CAAC,GACV,SAAS,CAAC;IACd,SAAS,CAAC,aAAa,UAAS;IAEhC,SAAS,aAAa,aAAa,EAAE,8BAA8B;IAKnE,KAAK,CAAC,OAAO,EAAE;QACb,0DAA0D;QAC1D,OAAO,EAAE,MAAM,CAAC;QAChB;;;WAGG;QACH,cAAc,CAAC,EAAE,CACf,aAAa,EAAE,8BAA8B,EAC7C,MAAM,EAAE,uBAAuB,KAC5B,IAAI,CAAC;KACX,GAAG,iBAAiB;IAUrB,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,iBAAiB;IAKvE,SAAS,CAAC,eAAe,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,iBAAiB;IAKvE,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,iBAAiB;IAKzD,WAAW,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,iBAAiB;IAKnD,6BAA6B,CACjC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,CAAC,uBAAuB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAqClE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CACrC,UAAU,EAAE,kCAAkC,EAC9C,WAAW,EAAE,4BAA4B,EACzC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,CAAC;IAEnC,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAE7C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CA+B7B"}
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import { configure as configureMobx } from 'mobx';
|
|
17
17
|
import { editor as monacoEditorAPI } from 'monaco-editor';
|
|
18
|
-
import { MONOSPACED_FONT_FAMILY } from '../const';
|
|
18
|
+
import { MONOSPACED_FONT_FAMILY } from '../const.js';
|
|
19
19
|
import { assertErrorThrown, LogEvent, guaranteeNonEmptyString, assertNonNullable, NetworkClient, } from '@finos/legend-shared';
|
|
20
|
-
import { APPLICATION_EVENT } from '../stores/ApplicationEvent';
|
|
20
|
+
import { APPLICATION_EVENT } from '../stores/ApplicationEvent.js';
|
|
21
21
|
import { configureComponents } from '@finos/legend-art';
|
|
22
|
-
import { setupPureLanguageService } from '../stores/PureLanguageSupport';
|
|
22
|
+
import { setupPureLanguageService } from '../stores/PureLanguageSupport.js';
|
|
23
23
|
export class LegendApplicationLogger {
|
|
24
24
|
}
|
|
25
25
|
export class LegendApplicationWebConsole extends LegendApplicationLogger {
|
|
@@ -146,7 +146,7 @@ export class LegendApplication {
|
|
|
146
146
|
}
|
|
147
147
|
catch (error) {
|
|
148
148
|
assertErrorThrown(error);
|
|
149
|
-
this.logger.error(LogEvent.create(APPLICATION_EVENT.
|
|
149
|
+
this.logger.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD_FAILURE), 'Failed to load Legend application');
|
|
150
150
|
throw error;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendApplication.js","sourceRoot":"","sources":["../../src/application/LegendApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"LegendApplication.js","sourceRoot":"","sources":["../../src/application/LegendApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,MAAM,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,a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MAAM,CAAC;YAErB,gBAAgB;YAChB,IAAI,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YACvD,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;YAClD,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE,CAAC;YAE7B,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;YAE7B,IAAI,CAAC,MAAM,CAAC,IAAI,CACd,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,EACrD,2BAA2B,CAC5B,CAAC;SACH;QAAC,OAAO,KAAK,EAAE;YACd,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,EAC3D,mCAAmC,CACpC,CAAC;YACF,MAAM,KAAK,CAAC;SACb;IACH,CAAC;CACF"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { type EventNotifierPlugin, type
|
|
17
|
-
import type { LegendApplicationPlugin } from '../stores/LegendApplicationPlugin';
|
|
18
|
-
export declare class LegendApplicationPluginManager extends AbstractPluginManager implements LoggerPluginManager, TelemetryServicePluginManager, TracerServicePluginManager,
|
|
16
|
+
import { type EventNotifierPlugin, type EventNotifierPluginManager, type LoggerPlugin, type LoggerPluginManager, type TelemetryServicePlugin, type TelemetryServicePluginManager, type TracerServicePlugin, type TracerServicePluginManager, AbstractPluginManager } from '@finos/legend-shared';
|
|
17
|
+
import type { LegendApplicationPlugin } from '../stores/LegendApplicationPlugin.js';
|
|
18
|
+
export declare class LegendApplicationPluginManager extends AbstractPluginManager implements LoggerPluginManager, TelemetryServicePluginManager, TracerServicePluginManager, EventNotifierPluginManager {
|
|
19
19
|
protected loggerPlugins: LoggerPlugin[];
|
|
20
20
|
protected telemetryServicePlugins: TelemetryServicePlugin[];
|
|
21
21
|
protected tracerServicePlugins: TracerServicePlugin<unknown>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendApplicationPluginManager.d.ts","sourceRoot":"","sources":["../../src/application/LegendApplicationPluginManager.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,
|
|
1
|
+
{"version":3,"file":"LegendApplicationPluginManager.d.ts","sourceRoot":"","sources":["../../src/application/LegendApplicationPluginManager.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,qBAAqB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAEpF,qBAAa,8BACX,SAAQ,qBACR,YACE,mBAAmB,EACnB,6BAA6B,EAC7B,0BAA0B,EAC1B,0BAA0B;IAE5B,SAAS,CAAC,aAAa,EAAE,YAAY,EAAE,CAAM;IAC7C,SAAS,CAAC,uBAAuB,EAAE,sBAAsB,EAAE,CAAM;IACjE,SAAS,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAM;IACpE,SAAS,CAAC,oBAAoB,EAAE,mBAAmB,EAAE,CAAM;IAC3D,SAAS,CAAC,kBAAkB,EAAE,uBAAuB,EAAE,CAAM;IAE7D,oBAAoB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAIhD,8BAA8B,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI;IAIpE,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAAG,IAAI;IAIvE,2BAA2B,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI;IAI9D,yBAAyB,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI;IAIhE,gBAAgB,IAAI,YAAY,EAAE;IAIlC,0BAA0B,IAAI,sBAAsB,EAAE;IAItD,uBAAuB,IAAI,mBAAmB,CAAC,OAAO,CAAC,EAAE;IAIzD,uBAAuB,IAAI,mBAAmB,EAAE;IAIhD,qBAAqB,IAAI,uBAAuB,EAAE;CAGnD"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
16
17
|
export declare const ActionAlert: (() => JSX.Element | null) & {
|
|
17
18
|
displayName: string;
|
|
18
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionAlert.d.ts","sourceRoot":"","sources":["../../src/components/ActionAlert.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"ActionAlert.d.ts","sourceRoot":"","sources":["../../src/components/ActionAlert.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AA2GH,eAAO,MAAM,WAAW;;CAQtB,CAAC"}
|
|
@@ -15,10 +15,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
import { Dialog } from '@finos/legend-art';
|
|
18
|
-
import { ActionAlertActionType, ActionAlertType, } from '../stores/ApplicationStore';
|
|
18
|
+
import { ActionAlertActionType, ActionAlertType, } from '../stores/ApplicationStore.js';
|
|
19
19
|
import { observer } from 'mobx-react-lite';
|
|
20
20
|
import { noop } from '@finos/legend-shared';
|
|
21
|
-
import { useApplicationStore } from './ApplicationStoreProvider';
|
|
21
|
+
import { useApplicationStore } from './ApplicationStoreProvider.js';
|
|
22
22
|
const getActionButtonClassName = (type) => {
|
|
23
23
|
switch (type) {
|
|
24
24
|
case ActionAlertActionType.PROCEED_WITH_CAUTION:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionAlert.js","sourceRoot":"","sources":["../../src/components/ActionAlert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,eAAe,GAEhB,MAAM,
|
|
1
|
+
{"version":3,"file":"ActionAlert.js","sourceRoot":"","sources":["../../src/components/ActionAlert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EACL,qBAAqB,EACrB,eAAe,GAEhB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,wBAAwB,GAAG,CAAC,IAA2B,EAAU,EAAE;IACvE,QAAQ,IAAI,EAAE;QACZ,KAAK,qBAAqB,CAAC,oBAAoB;YAC7C,OAAO,cAAc,CAAC;QACxB,KAAK,qBAAqB,CAAC,OAAO,CAAC;QACnC,KAAK,qBAAqB,CAAC,QAAQ,CAAC;QACpC;YACE,OAAO,WAAW,CAAC;KACtB;AACH,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,QAAQ,CAAC,CAAC,KAAgC,EAAE,EAAE;IACrE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE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C,CAAC,MAAM,EAAE,EAAE;4BACtB,wJAAwJ;4BACxJ,2CAA2C;4BAC3C,MAAM,OAAO,GAA+C,CAC1D,CAAC,EACK,EAAE;gCACR,CAAC,CAAC,cAAc,EAAE,CAAC;gCACnB,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;gCACnB,WAAW,EAAE,CAAC;4BAChB,CAAC,CAAC;4BACF,OAAO,CACL,iBAEE,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAC1C,SAAS,EAAE,iBAAiB,wBAAwB,CAClD,MAAM,CAAC,IAAI,IAAI,qBAAqB,CAAC,QAAQ,CAC9C,EAAE,EACH,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,YAGjC,MAAM,CAAC,KAAK,IATR,MAAM,CAAC,KAAK,CAUV,CACV,CAAC;wBACJ,CAAC,CAAC,EACD,CAAC,OAAO,CAAC,MAAM,IAAI,CAClB,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,gDAAgD,EAC1D,OAAO,EAAE,WAAW,uBAGb,CACV,IACG,IACD,GACA,CACV,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE;IACvC,MAAM,gBAAgB,GAAG,mBAAmB,EAAE,CAAC;IAC/C,MAAM,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC;IAEzD,IAAI,CAAC,eAAe,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAC,gBAAgB,IAAC,IAAI,EAAE,eAAe,GAAI,CAAC;AACrD,CAAC,CAAC,CAAC"}
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ApplicationStore } from '../stores/ApplicationStore';
|
|
17
|
-
import type { LegendApplicationConfig } from '../stores/LegendApplicationConfig';
|
|
18
|
-
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager';
|
|
16
|
+
import { ApplicationStore } from '../stores/ApplicationStore.js';
|
|
17
|
+
import type { LegendApplicationConfig } from '../stores/LegendApplicationConfig.js';
|
|
18
|
+
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager.js';
|
|
19
19
|
export declare const ApplicationStoreProvider: <T extends LegendApplicationConfig>({ children, config, pluginManager, }: {
|
|
20
20
|
children: React.ReactNode;
|
|
21
21
|
config: T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreProvider.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationStoreProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ApplicationStoreProvider.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationStoreProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAGpF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kDAAkD,CAAC;AAMvG,eAAO,MAAM,wBAAwB;cAKzB,MAAM,SAAS;;mBAEV,8BAA8B;MAC3C,MAAM,YAUT,CAAC;AAEF,eAAO,MAAM,mBAAmB,8DAM7B,CAAC"}
|
|
@@ -16,9 +16,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
16
|
*/
|
|
17
17
|
import { createContext, useContext } from 'react';
|
|
18
18
|
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
|
-
import { ApplicationStore } from '../stores/ApplicationStore';
|
|
19
|
+
import { ApplicationStore } from '../stores/ApplicationStore.js';
|
|
20
20
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
21
|
-
import { useWebApplicationNavigator } from './WebApplicationNavigatorProvider';
|
|
21
|
+
import { useWebApplicationNavigator } from './WebApplicationNavigatorProvider.js';
|
|
22
22
|
const ApplicationStoreContext = createContext(undefined);
|
|
23
23
|
export const ApplicationStoreProvider = ({ children, config, pluginManager, }) => {
|
|
24
24
|
const navigator = useWebApplicationNavigator();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreProvider.js","sourceRoot":"","sources":["../../src/components/ApplicationStoreProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ApplicationStoreProvider.js","sourceRoot":"","sources":["../../src/components/ApplicationStoreProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAGlF,MAAM,uBAAuB,GAAG,aAAa,CAE3C,SAAS,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAoC,EAC1E,QAAQ,EACR,MAAM,EACN,aAAa,GAKd,EAAsB,EAAE;IACvB,MAAM,SAAS,GAAG,0BAA0B,EAAE,CAAC;IAC/C,MAAM,gBAAgB,GAAG,kBAAkB,CACzC,GAAG,EAAE,CAAC,IAAI,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAC7D,CAAC;IACF,OAAO,CACL,KAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,gBAAgB,YACtD,QAAQ,GACwB,CACpC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAEV,EAAE,CACzB,oBAAoB,CAClB,UAAU,CAAC,uBAAuB,CAAoC,EACtE,yCAAyC,CAC1C,CAAC"}
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/// <reference types="react" />
|
|
17
|
-
import { ApplicationStore } from '../stores/ApplicationStore';
|
|
18
|
-
import { WebApplicationNavigator } from '../stores/WebApplicationNavigator';
|
|
19
|
-
import type { LegendApplicationConfig } from '../stores/LegendApplicationConfig';
|
|
20
|
-
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager';
|
|
16
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
import { ApplicationStore } from '../stores/ApplicationStore.js';
|
|
18
|
+
import { WebApplicationNavigator } from '../stores/WebApplicationNavigator.js';
|
|
19
|
+
import type { LegendApplicationConfig } from '../stores/LegendApplicationConfig.js';
|
|
20
|
+
import type { LegendApplicationPluginManager } from '../application/LegendApplicationPluginManager.js';
|
|
21
21
|
export declare const TEST__ApplicationStoreProvider: React.FC<{
|
|
22
22
|
children: React.ReactNode;
|
|
23
23
|
config: LegendApplicationConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreProviderTestUtils.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationStoreProviderTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;
|
|
1
|
+
{"version":3,"file":"ApplicationStoreProviderTestUtils.d.ts","sourceRoot":"","sources":["../../src/components/ApplicationStoreProviderTestUtils.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAEpF,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kDAAkD,CAAC;AAEvG,eAAO,MAAM,8BAA8B,EAAE,KAAK,CAAC,EAAE,CAAC;IACpD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,uBAAuB,CAAC;IAChC,aAAa,EAAE,8BAA8B,CAAC;CAC/C,CAIA,CAAC;AAEF,eAAO,MAAM,mCAAmC,gEAI/B,8BAA8B;;gBAG/B,uBAAuB;qCAetC,CAAC"}
|
|
@@ -14,16 +14,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
+
import { jest } from '@jest/globals';
|
|
17
18
|
import { createMemoryHistory } from 'history';
|
|
18
|
-
import { ApplicationStore } from '../stores/ApplicationStore';
|
|
19
|
-
import { WebApplicationNavigator } from '../stores/WebApplicationNavigator';
|
|
20
|
-
import { ApplicationStoreProvider } from './ApplicationStoreProvider';
|
|
19
|
+
import { ApplicationStore } from '../stores/ApplicationStore.js';
|
|
20
|
+
import { WebApplicationNavigator } from '../stores/WebApplicationNavigator.js';
|
|
21
|
+
import { ApplicationStoreProvider } from './ApplicationStoreProvider.js';
|
|
21
22
|
export const TEST__ApplicationStoreProvider = ({ children, config, pluginManager }) => (_jsx(ApplicationStoreProvider, { config: config, pluginManager: pluginManager, children: children }));
|
|
22
23
|
export const TEST__provideMockedApplicationStore = (config, pluginManager, customization) => {
|
|
23
24
|
const value = customization?.mock ??
|
|
24
25
|
new ApplicationStore(config, customization?.navigator ??
|
|
25
26
|
new WebApplicationNavigator(createMemoryHistory()), pluginManager);
|
|
26
|
-
const MockedApplicationStoreProvider = require('./ApplicationStoreProvider'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment
|
|
27
|
+
const MockedApplicationStoreProvider = require('./ApplicationStoreProvider.js'); // eslint-disable-line @typescript-eslint/no-unsafe-assignment
|
|
27
28
|
MockedApplicationStoreProvider.useApplicationStore = jest.fn();
|
|
28
29
|
MockedApplicationStoreProvider.useApplicationStore.mockReturnValue(value);
|
|
29
30
|
return value;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationStoreProviderTestUtils.js","sourceRoot":"","sources":["../../src/components/ApplicationStoreProviderTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ApplicationStoreProviderTestUtils.js","sourceRoot":"","sources":["../../src/components/ApplicationStoreProviderTestUtils.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,MAAM,CAAC,MAAM,8BAA8B,GAItC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CAC5C,KAAC,wBAAwB,IAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,aAAa,YACnE,QAAQ,GACgB,CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAGjD,MAAS,EACT,aAA6C,EAC7C,aAGC,EACoB,EAAE;IACvB,MAAM,KAAK,GACT,aAAa,EAAE,IAAI;QACnB,IAAI,gBAAgB,CAClB,MAAM,EACN,aAAa,EAAE,SAAS;YACtB,IAAI,uBAAuB,CAAC,mBAAmB,EAAE,CAAC,EACpD,aAAa,CACd,CAAC;IACJ,MAAM,8BAA8B,GAAG,OAAO,CAAC,+BAA+B,CAAC,CAAC,CAAC,8DAA8D;IAC/I,8BAA8B,CAAC,mBAAmB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAC/D,8BAA8B,CAAC,mBAAmB,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC1E,OAAO,KAAK,CAAC;AACf,CAAC,CAAC"}
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
export var APPLICATION_TEST_ID;
|
|
17
17
|
(function (APPLICATION_TEST_ID) {
|
|
18
18
|
APPLICATION_TEST_ID["LAMBDA_EDITOR__EDITOR_INPUT"] = "lambda-editor__editor__input";
|
|
19
|
-
})(APPLICATION_TEST_ID || (APPLICATION_TEST_ID = {}));
|
|
19
|
+
})(APPLICATION_TEST_ID = APPLICATION_TEST_ID || (APPLICATION_TEST_ID = {}));
|
|
20
20
|
//# sourceMappingURL=ApplicationTestID.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationTestID.js","sourceRoot":"","sources":["../../src/components/ApplicationTestID.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,mFAA4D,CAAA;AAC9D,CAAC,EAFW,mBAAmB,KAAnB,mBAAmB,QAE9B"}
|
|
1
|
+
{"version":3,"file":"ApplicationTestID.js","sourceRoot":"","sources":["../../src/components/ApplicationTestID.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,mFAA4D,CAAA;AAC9D,CAAC,EAFW,mBAAmB,GAAnB,mBAAmB,KAAnB,mBAAmB,QAE9B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
/// <reference types="react" resolution-mode="require"/>
|
|
17
|
+
import { type Type, type ValueSpecification, type PureModel } from '@finos/legend-graph';
|
|
18
|
+
declare type TypeCheckOption = {
|
|
19
|
+
expectedType: Type;
|
|
20
|
+
/**
|
|
21
|
+
* Indicates if a strict type-matching will happen.
|
|
22
|
+
* Sometimes, auto-boxing allow some rooms to wiggle,
|
|
23
|
+
* for example we can assign a Float to an Integer, a
|
|
24
|
+
* Date to a DateTime. With this flag set to `true`
|
|
25
|
+
* we will not allow this.
|
|
26
|
+
*/
|
|
27
|
+
match?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* TODO we should pass in the props `setValueSpecification` and `resetValueSpecification`. Reset
|
|
31
|
+
* should be part of this editor. Also through here we can call `observe_` accordingly.
|
|
32
|
+
*
|
|
33
|
+
* See https://github.com/finos/legend-studio/pull/1021
|
|
34
|
+
*/
|
|
35
|
+
export declare const BasicValueSpecificationEditor: React.FC<{
|
|
36
|
+
valueSpecification: ValueSpecification;
|
|
37
|
+
graph: PureModel;
|
|
38
|
+
typeCheckOption: TypeCheckOption;
|
|
39
|
+
className?: string | undefined;
|
|
40
|
+
updateValue: (val: ValueSpecification) => void;
|
|
41
|
+
resetValue: () => void;
|
|
42
|
+
}>;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=BasicValueSpecificationEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BasicValueSpecificationEditor.d.ts","sourceRoot":"","sources":["../../src/components/BasicValueSpecificationEditor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAeH,OAAO,EAEL,KAAK,IAAI,EACT,KAAK,kBAAkB,EACvB,KAAK,SAAS,EAgBf,MAAM,qBAAqB,CAAC;AAgB7B,aAAK,eAAe,GAAG;IACrB,YAAY,EAAE,IAAI,CAAC;IACnB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AA4eF;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC;IACnD,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,KAAK,EAAE,SAAS,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,WAAW,EAAE,CAAC,GAAG,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CA0HA,CAAC"}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { Tooltip, DollarIcon, clsx, InfoCircleIcon, RefreshIcon, CheckSquareIcon, SquareIcon, CustomSelectorInput, SaveIcon, PencilIcon, } from '@finos/legend-art';
|
|
18
|
+
import { PrimitiveInstanceValue, CollectionInstanceValue, EnumValueInstanceValue, INTERNAL__PropagatedValue, SimpleFunctionExpression, VariableExpression, EnumValueExplicitReference, TYPICAL_MULTIPLICITY_TYPE, PrimitiveType, PRIMITIVE_TYPE, GenericTypeExplicitReference, GenericType, Enumeration, getEnumValue, getMultiplicityDescription, } from '@finos/legend-graph';
|
|
19
|
+
import { guaranteeNonNullable, isNonNullable, returnUndefOnError, uniq, } from '@finos/legend-shared';
|
|
20
|
+
import { observer } from 'mobx-react-lite';
|
|
21
|
+
import CSVParser from 'papaparse';
|
|
22
|
+
import { useEffect, useRef, useState } from 'react';
|
|
23
|
+
import { instanceValue_changeValue, instanceValue_changeValues, } from '../stores/ValueSpecificationModifierHelper.js';
|
|
24
|
+
import { CustomDatePicker } from './CustomDatePicker.js';
|
|
25
|
+
const ParameterInfoTooltip = (props) => {
|
|
26
|
+
const { variable, children, placement } = props;
|
|
27
|
+
const type = variable.genericType?.value.rawType;
|
|
28
|
+
return (_jsx(Tooltip, { arrow: true, ...(placement !== undefined ? { placement } : {}), classes: {
|
|
29
|
+
tooltip: 'value-spec-paramater__tooltip',
|
|
30
|
+
arrow: 'value-spec-paramater__tooltip__arrow',
|
|
31
|
+
tooltipPlacementRight: 'value-spec-paramater__tooltip--right',
|
|
32
|
+
}, TransitionProps: {
|
|
33
|
+
// disable transition
|
|
34
|
+
// NOTE: somehow, this is the only workaround we have, if for example
|
|
35
|
+
// we set `appear = true`, the tooltip will jump out of position
|
|
36
|
+
timeout: 0,
|
|
37
|
+
}, title: _jsxs("div", { className: "value-spec-paramater__tooltip__content", children: [_jsxs("div", { className: "value-spec-paramater__tooltip__item", children: [_jsx("div", { className: "value-spec-paramater__tooltip__item__label", children: "Type" }), _jsx("div", { className: "value-spec-paramater__tooltip__item__value", children: type?.name ?? '' })] }), _jsxs("div", { className: "value-spec-paramater__tooltip__item", children: [_jsx("div", { className: "value-spec-paramater__tooltip__item__label", children: "Var Name" }), _jsx("div", { className: "value-spec-paramater__tooltip__item__value", children: variable.name })] }), _jsxs("div", { className: "value-spec-paramater__tooltip__item", children: [_jsx("div", { className: "value-spec-paramater__tooltip__item__label", children: "Multiplicity" }), _jsx("div", { className: "value-spec-paramater__tooltip__item__value", children: getMultiplicityDescription(variable.multiplicity) })] })] }), children: children }));
|
|
38
|
+
};
|
|
39
|
+
const VariableExpressionParameterEditor = observer((props) => {
|
|
40
|
+
const { valueSpecification, className, resetValue } = props;
|
|
41
|
+
const varName = valueSpecification.name;
|
|
42
|
+
return (_jsxs("div", { className: clsx('value-spec-editor__parameter', className), children: [_jsx("div", { className: "value-spec-editor__parameter__icon", children: _jsx(DollarIcon, {}) }), _jsxs("div", { className: "value-spec-editor__parameter__label", children: [_jsx("div", { className: "value-spec-editor__parameter__text", children: varName }), _jsx(ParameterInfoTooltip, { variable: valueSpecification, children: _jsx("div", { className: "value-spec-editor__parameter__info", children: _jsx(InfoCircleIcon, {}) }) }), _jsx("button", { className: "value-spec-editor__parameter__reset-btn", title: "Reset", onClick: resetValue, children: _jsx(RefreshIcon, {}) })] })] }));
|
|
43
|
+
});
|
|
44
|
+
const StringPrimitiveInstanceValueEditor = observer((props) => {
|
|
45
|
+
const { valueSpecification, className, resetValue } = props;
|
|
46
|
+
const value = valueSpecification.values[0];
|
|
47
|
+
const changeValue = (event) => instanceValue_changeValue(valueSpecification, event.target.value, 0);
|
|
48
|
+
return (_jsxs("div", { className: clsx('value-spec-editor', className), children: [_jsx("input", { className: "panel__content__form__section__input value-spec-editor__input", spellCheck: false, value: value, placeholder: value === '' ? '(empty)' : undefined, onChange: changeValue }), _jsx("button", { className: "value-spec-editor__reset-btn", title: "Reset", onClick: resetValue, children: _jsx(RefreshIcon, {}) })] }));
|
|
49
|
+
});
|
|
50
|
+
const BooleanPrimitiveInstanceValueEditor = observer((props) => {
|
|
51
|
+
const { valueSpecification, className, resetValue } = props;
|
|
52
|
+
const value = valueSpecification.values[0];
|
|
53
|
+
const toggleValue = () => instanceValue_changeValue(valueSpecification, !value, 0);
|
|
54
|
+
return (_jsxs("div", { className: clsx('value-spec-editor', className), children: [_jsx("button", { className: clsx('value-spec-editor__toggler__btn', {
|
|
55
|
+
'value-spec-editor__toggler__btn--toggled': value,
|
|
56
|
+
}), onClick: toggleValue, children: value ? _jsx(CheckSquareIcon, {}) : _jsx(SquareIcon, {}) }), _jsx("button", { className: "value-spec-editor__reset-btn", title: "Reset", onClick: resetValue, children: _jsx(RefreshIcon, {}) })] }));
|
|
57
|
+
});
|
|
58
|
+
const NumberPrimitiveInstanceValueEditor = observer((props) => {
|
|
59
|
+
const { valueSpecification, isInteger, className, resetValue } = props;
|
|
60
|
+
const value = valueSpecification.values[0];
|
|
61
|
+
const changeValue = (event) => {
|
|
62
|
+
let inputVal = isInteger
|
|
63
|
+
? parseInt(event.target.value, 10)
|
|
64
|
+
: parseFloat(event.target.value);
|
|
65
|
+
inputVal = isNaN(inputVal) ? 0 : inputVal;
|
|
66
|
+
instanceValue_changeValue(valueSpecification, inputVal, 0);
|
|
67
|
+
};
|
|
68
|
+
return (_jsxs("div", { className: clsx('value-spec-editor', className), children: [_jsx("input", { className: "panel__content__form__section__input value-spec-editor__input", spellCheck: false, type: "number", value: value, onChange: changeValue }), _jsx("button", { className: "value-spec-editor__reset-btn", title: "Reset", onClick: resetValue, children: _jsx(RefreshIcon, {}) })] }));
|
|
69
|
+
});
|
|
70
|
+
const EnumValueInstanceValueEditor = observer((props) => {
|
|
71
|
+
const { valueSpecification, className, resetValue } = props;
|
|
72
|
+
const enumValueRef = guaranteeNonNullable(valueSpecification.values[0]);
|
|
73
|
+
const enumValue = enumValueRef.value;
|
|
74
|
+
const options = enumValue._OWNER.values.map((value) => ({
|
|
75
|
+
label: value.name,
|
|
76
|
+
value: value,
|
|
77
|
+
}));
|
|
78
|
+
const changeValue = (val) => {
|
|
79
|
+
instanceValue_changeValue(valueSpecification, EnumValueExplicitReference.create(val.value), 0);
|
|
80
|
+
};
|
|
81
|
+
return (_jsxs("div", { className: clsx('value-spec-editor', className), children: [_jsx(CustomSelectorInput, { className: "value-spec-editor__enum-selector", options: options, onChange: changeValue, value: { value: enumValue, label: enumValue.name }, darkMode: true }), _jsx("button", { className: "value-spec-editor__reset-btn", title: "Reset", onClick: resetValue, children: _jsx(RefreshIcon, {}) })] }));
|
|
82
|
+
});
|
|
83
|
+
const stringifyValue = (values) => {
|
|
84
|
+
if (values.length === 0) {
|
|
85
|
+
return '';
|
|
86
|
+
}
|
|
87
|
+
return CSVParser.unparse([
|
|
88
|
+
values
|
|
89
|
+
.map((val) => {
|
|
90
|
+
if (val instanceof PrimitiveInstanceValue) {
|
|
91
|
+
return val.values[0];
|
|
92
|
+
}
|
|
93
|
+
else if (val instanceof EnumValueInstanceValue) {
|
|
94
|
+
return guaranteeNonNullable(val.values[0]).value.name;
|
|
95
|
+
}
|
|
96
|
+
return undefined;
|
|
97
|
+
})
|
|
98
|
+
.filter(isNonNullable),
|
|
99
|
+
]).trim();
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* NOTE: We attempt to be less disruptive here by not throwing errors left and right, instead
|
|
103
|
+
* we silently remove values which are not valid or parsable. But perhaps, we can consider
|
|
104
|
+
* passing in logger or notifier to show give the users some idea of what went wrong instead
|
|
105
|
+
* of silently swallow parts of their inputs like this.
|
|
106
|
+
*/
|
|
107
|
+
const setCollectionValue = (valueSpecification, graph, expectedType, value) => {
|
|
108
|
+
if (value.trim().length === 0) {
|
|
109
|
+
instanceValue_changeValues(valueSpecification, []);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const multiplicityOne = graph.getTypicalMultiplicity(TYPICAL_MULTIPLICITY_TYPE.ONE);
|
|
113
|
+
let result = [];
|
|
114
|
+
const parseResult = CSVParser.parse(value.trim(), {
|
|
115
|
+
delimiter: ',',
|
|
116
|
+
});
|
|
117
|
+
const parseData = parseResult.data[0]; // only take the first line
|
|
118
|
+
if (parseResult.errors.length) {
|
|
119
|
+
if (parseResult.errors[0] &&
|
|
120
|
+
parseResult.errors[0].code === 'UndetectableDelimiter' &&
|
|
121
|
+
parseResult.errors[0].type === 'Delimiter' &&
|
|
122
|
+
parseResult.data.length === 1) {
|
|
123
|
+
// NOTE: this happens when the user only put one item in the value input
|
|
124
|
+
// we can go the other way by ensure the input has a comma but this is arguably neater
|
|
125
|
+
// as it tinkers with the parser
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
// there were some parsing error, escape
|
|
129
|
+
// NOTE: ideally, we could show a warning here
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else if (expectedType instanceof PrimitiveType) {
|
|
134
|
+
switch (expectedType.path) {
|
|
135
|
+
case PRIMITIVE_TYPE.STRING: {
|
|
136
|
+
result = uniq(parseData)
|
|
137
|
+
.map((item) => {
|
|
138
|
+
const primitiveInstanceValue = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(expectedType)), multiplicityOne);
|
|
139
|
+
primitiveInstanceValue.values = [item.toString()];
|
|
140
|
+
return primitiveInstanceValue;
|
|
141
|
+
})
|
|
142
|
+
.filter(isNonNullable);
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
case PRIMITIVE_TYPE.NUMBER:
|
|
146
|
+
case PRIMITIVE_TYPE.FLOAT:
|
|
147
|
+
case PRIMITIVE_TYPE.DECIMAL:
|
|
148
|
+
case PRIMITIVE_TYPE.INTEGER: {
|
|
149
|
+
result = uniq(parseData
|
|
150
|
+
.filter((val) => !isNaN(Number(val)))
|
|
151
|
+
.map((val) => Number(val)))
|
|
152
|
+
.map((item) => {
|
|
153
|
+
const primitiveInstanceValue = new PrimitiveInstanceValue(GenericTypeExplicitReference.create(new GenericType(expectedType)), multiplicityOne);
|
|
154
|
+
primitiveInstanceValue.values = [item];
|
|
155
|
+
return primitiveInstanceValue;
|
|
156
|
+
})
|
|
157
|
+
.filter(isNonNullable);
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
default:
|
|
161
|
+
// unsupported expected type, just escape
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else if (expectedType instanceof Enumeration) {
|
|
166
|
+
result = uniq(parseData.map((item) => item.trim()))
|
|
167
|
+
.map((item) => {
|
|
168
|
+
const _enum = returnUndefOnError(() => getEnumValue(expectedType, item));
|
|
169
|
+
if (!_enum) {
|
|
170
|
+
return undefined;
|
|
171
|
+
}
|
|
172
|
+
const enumValueInstanceValue = new EnumValueInstanceValue(GenericTypeExplicitReference.create(new GenericType(expectedType)), multiplicityOne);
|
|
173
|
+
enumValueInstanceValue.values = [
|
|
174
|
+
EnumValueExplicitReference.create(_enum),
|
|
175
|
+
];
|
|
176
|
+
return enumValueInstanceValue;
|
|
177
|
+
})
|
|
178
|
+
.filter(isNonNullable);
|
|
179
|
+
}
|
|
180
|
+
instanceValue_changeValues(valueSpecification, result);
|
|
181
|
+
};
|
|
182
|
+
const COLLECTION_PREVIEW_CHAR_LIMIT = 50;
|
|
183
|
+
const CollectionValueInstanceValueEditor = observer((props) => {
|
|
184
|
+
const { valueSpecification, graph, expectedType, className, resetValue } = props;
|
|
185
|
+
const inputRef = useRef(null);
|
|
186
|
+
const [text, setText] = useState(stringifyValue(valueSpecification.values));
|
|
187
|
+
const [editable, setEditable] = useState(false);
|
|
188
|
+
const valueText = stringifyValue(valueSpecification.values);
|
|
189
|
+
const previewText = `List(${valueSpecification.values.length === 0
|
|
190
|
+
? 'empty'
|
|
191
|
+
: valueSpecification.values.length})${valueSpecification.values.length === 0
|
|
192
|
+
? ''
|
|
193
|
+
: `: ${valueText.length > COLLECTION_PREVIEW_CHAR_LIMIT
|
|
194
|
+
? `${valueText.substring(0, COLLECTION_PREVIEW_CHAR_LIMIT)}...`
|
|
195
|
+
: valueText}`}`;
|
|
196
|
+
const enableEdit = () => setEditable(true);
|
|
197
|
+
const saveEdit = () => {
|
|
198
|
+
setEditable(false);
|
|
199
|
+
setCollectionValue(valueSpecification, graph, expectedType, text);
|
|
200
|
+
setText(stringifyValue(valueSpecification.values));
|
|
201
|
+
};
|
|
202
|
+
const changeValue = (event) => setText(event.target.value);
|
|
203
|
+
// focus the input box when edit is enabled
|
|
204
|
+
useEffect(() => {
|
|
205
|
+
if (editable) {
|
|
206
|
+
inputRef.current?.focus();
|
|
207
|
+
}
|
|
208
|
+
}, [editable]);
|
|
209
|
+
if (editable) {
|
|
210
|
+
return (_jsxs("div", { className: clsx('value-spec-editor', className), children: [_jsx("input", { ref: inputRef, className: "panel__content__form__section__input value-spec-editor__input", spellCheck: false, value: text, placeholder: text === '' ? '(empty)' : undefined, onChange: changeValue }), _jsx("button", { className: "value-spec-editor__list-editor__save-button btn--dark", onClick: saveEdit, children: _jsx(SaveIcon, {}) }), _jsx("button", { className: "value-spec-editor__reset-btn", title: "Reset", onClick: resetValue, children: _jsx(RefreshIcon, {}) })] }));
|
|
211
|
+
}
|
|
212
|
+
return (_jsxs("div", { className: clsx('value-spec-editor', className), onClick: enableEdit, title: "Click to edit", children: [_jsx("input", { className: "value-spec-editor__list-editor__preview", spellCheck: false, value: previewText, disabled: true }), _jsx("button", { className: "value-spec-editor__list-editor__edit-icon", children: _jsx(PencilIcon, {}) })] }));
|
|
213
|
+
});
|
|
214
|
+
const UnsupportedValueSpecificationEditor = () => (_jsx("div", { className: "value-spec-editor--unsupported", children: "unsupported" }));
|
|
215
|
+
const DateInstanceValueEditor = observer((props) => {
|
|
216
|
+
const { valueSpecification, updateValue, graph, typeCheckOption, resetValue, } = props;
|
|
217
|
+
return (_jsxs("div", { className: "value-spec-editor", children: [_jsx(CustomDatePicker, { valueSpecification: valueSpecification, graph: graph, typeCheckOption: typeCheckOption, updateValue: updateValue }), _jsx("button", { className: "value-spec-editor__reset-btn", title: "Reset", onClick: resetValue, children: _jsx(RefreshIcon, {}) })] }));
|
|
218
|
+
});
|
|
219
|
+
/**
|
|
220
|
+
* TODO we should pass in the props `setValueSpecification` and `resetValueSpecification`. Reset
|
|
221
|
+
* should be part of this editor. Also through here we can call `observe_` accordingly.
|
|
222
|
+
*
|
|
223
|
+
* See https://github.com/finos/legend-studio/pull/1021
|
|
224
|
+
*/
|
|
225
|
+
export const BasicValueSpecificationEditor = (props) => {
|
|
226
|
+
const { className, valueSpecification, graph, typeCheckOption, updateValue, resetValue, } = props;
|
|
227
|
+
if (valueSpecification instanceof PrimitiveInstanceValue) {
|
|
228
|
+
const _type = valueSpecification.genericType.value.rawType;
|
|
229
|
+
switch (_type.path) {
|
|
230
|
+
case PRIMITIVE_TYPE.STRING:
|
|
231
|
+
return (_jsx(StringPrimitiveInstanceValueEditor, { valueSpecification: valueSpecification, className: className, resetValue: resetValue }));
|
|
232
|
+
case PRIMITIVE_TYPE.BOOLEAN:
|
|
233
|
+
return (_jsx(BooleanPrimitiveInstanceValueEditor, { valueSpecification: valueSpecification, className: className, resetValue: resetValue }));
|
|
234
|
+
case PRIMITIVE_TYPE.NUMBER:
|
|
235
|
+
case PRIMITIVE_TYPE.FLOAT:
|
|
236
|
+
case PRIMITIVE_TYPE.DECIMAL:
|
|
237
|
+
case PRIMITIVE_TYPE.INTEGER:
|
|
238
|
+
return (_jsx(NumberPrimitiveInstanceValueEditor, { valueSpecification: valueSpecification, isInteger: _type.path === PRIMITIVE_TYPE.INTEGER, className: className, resetValue: resetValue }));
|
|
239
|
+
case PRIMITIVE_TYPE.DATE:
|
|
240
|
+
case PRIMITIVE_TYPE.STRICTDATE:
|
|
241
|
+
case PRIMITIVE_TYPE.DATETIME:
|
|
242
|
+
case PRIMITIVE_TYPE.LATESTDATE:
|
|
243
|
+
return (_jsx(DateInstanceValueEditor, { valueSpecification: valueSpecification, graph: graph, typeCheckOption: typeCheckOption, className: className, updateValue: updateValue, resetValue: resetValue }));
|
|
244
|
+
default:
|
|
245
|
+
return _jsx(UnsupportedValueSpecificationEditor, {});
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
else if (valueSpecification instanceof EnumValueInstanceValue) {
|
|
249
|
+
return (_jsx(EnumValueInstanceValueEditor, { valueSpecification: valueSpecification, className: className, resetValue: resetValue }));
|
|
250
|
+
}
|
|
251
|
+
else if (valueSpecification instanceof CollectionInstanceValue &&
|
|
252
|
+
valueSpecification.genericType) {
|
|
253
|
+
// NOTE: since when we fill in the arguments, `[]` (or `nullish` value in Pure)
|
|
254
|
+
// is used for parameters we don't handle, we should not attempt to support empty collection
|
|
255
|
+
// without generic type here as that is equivalent to `[]`
|
|
256
|
+
return (_jsx(CollectionValueInstanceValueEditor, { valueSpecification: valueSpecification, graph: graph, expectedType: typeCheckOption.expectedType, className: className, resetValue: resetValue }));
|
|
257
|
+
}
|
|
258
|
+
// property expression
|
|
259
|
+
else if (valueSpecification instanceof VariableExpression) {
|
|
260
|
+
return (_jsx(VariableExpressionParameterEditor, { valueSpecification: valueSpecification, className: className, resetValue: resetValue }));
|
|
261
|
+
}
|
|
262
|
+
else if (valueSpecification instanceof INTERNAL__PropagatedValue) {
|
|
263
|
+
return (_jsx(BasicValueSpecificationEditor, { valueSpecification: valueSpecification.getValue(), graph: graph, typeCheckOption: typeCheckOption, updateValue: updateValue, resetValue: resetValue }));
|
|
264
|
+
}
|
|
265
|
+
else if (valueSpecification instanceof SimpleFunctionExpression &&
|
|
266
|
+
[
|
|
267
|
+
PRIMITIVE_TYPE.DATE.toString(),
|
|
268
|
+
PRIMITIVE_TYPE.STRICTDATE.toString(),
|
|
269
|
+
PRIMITIVE_TYPE.DATETIME.toString(),
|
|
270
|
+
PRIMITIVE_TYPE.LATESTDATE.toString(),
|
|
271
|
+
].includes(typeCheckOption.expectedType.path)) {
|
|
272
|
+
return (_jsx(DateInstanceValueEditor, { valueSpecification: valueSpecification, graph: graph, typeCheckOption: typeCheckOption, className: className, updateValue: updateValue, resetValue: resetValue }));
|
|
273
|
+
}
|
|
274
|
+
return _jsx(UnsupportedValueSpecificationEditor, {});
|
|
275
|
+
};
|
|
276
|
+
//# sourceMappingURL=BasicValueSpecificationEditor.js.map
|