mobx#flow TypeScript Examples

The following examples show how to use mobx#flow. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: LocalChangesState.ts    From legend-studio with Apache License 2.0 6 votes vote down vote up
constructor(editorStore: EditorStore, sdlcState: EditorSDLCState) {
    makeAutoObservable(this, {
      editorStore: false,
      sdlcState: false,
      openLocalChange: action,
      refreshWorkspaceSyncStatus: flow,
    });

    this.editorStore = editorStore;
    this.sdlcState = sdlcState;
    this.patchLoaderState = new PatchLoaderState(editorStore, sdlcState);
    this.workspaceSyncState = new WorkspaceSyncState(editorStore, sdlcState);
  }
Example #2
Source File: destinations.ts    From jitsu with MIT License 6 votes vote down vote up
constructor() {
    super("destinations", {
      idField: "_uid",
      hideElements: dst => destinationsReferenceMap[dst._type]?.hidden,
    })
    makeObservable(this, {
      createFreeDatabase: flow,
    })
  }
Example #3
Source File: LegendStudioStore.ts    From legend-studio with Apache License 2.0 6 votes vote down vote up
constructor(
    applicationStore: ApplicationStore<LegendStudioConfig>,
    sdlcServerClient: SDLCServerClient,
    depotServerClient: DepotServerClient,
    pluginManager: LegendStudioPluginManager,
  ) {
    makeObservable<LegendStudioStore, 'initializeSDLCServerClient'>(this, {
      isSDLCAuthorized: observable,
      SDLCServerTermsOfServicesUrlsToView: observable,
      needsToAcceptSDLCServerTermsOfServices: computed,
      initialize: flow,
      initializeSDLCServerClient: flow,
      dismissSDLCServerTermsOfServicesAlert: action,
    });

    this.applicationStore = applicationStore;
    this.sdlcServerClient = sdlcServerClient;
    this.depotServerClient = depotServerClient;

    this.pluginManager = pluginManager;

    // Register plugins
    this.sdlcServerClient.setTracerService(this.applicationStore.tracerService);
    this.depotServerClient.setTracerService(
      this.applicationStore.tracerService,
    );
  }
Example #4
Source File: apiKeys.ts    From jitsu with MIT License 5 votes vote down vote up
constructor() {
    super("api_keys", { idField: "uid" })
    makeObservable(this, {
      add: override,
      generateAddInitialApiKeyIfNeeded: flow,
    })
  }
Example #5
Source File: LegendTaxonomyStore.ts    From legend-studio with Apache License 2.0 5 votes vote down vote up
constructor(
    applicationStore: ApplicationStore<LegendTaxonomyConfig>,
    taxonomyServerClient: TaxonomyServerClient,
    depotServerClient: DepotServerClient,
    graphManagerState: GraphManagerState,
    pluginManager: LegendTaxonomyPluginManager,
  ) {
    makeObservable(this, {
      standaloneDataSpaceViewerState: observable,
      treeData: observable.ref,
      currentTaxonomyNodeViewerState: observable,
      initialize: flow,
      initializeStandaloneDataSpaceViewer: flow,
      setTreeData: action,
      setCurrentTaxonomyNodeViewerState: action,
    });
    this.applicationStore = applicationStore;
    this.taxonomyServerClient = taxonomyServerClient;
    this.depotServerClient = depotServerClient;
    this.graphManagerState = graphManagerState;
    this.pluginManager = pluginManager;

    // Register plugins
    this.taxonomyServerClient.setTracerService(
      this.applicationStore.tracerService,
    );
    this.depotServerClient.setTracerService(
      this.applicationStore.tracerService,
    );

    // Hotkeys
    this.hotkeys = [
      new HotkeyConfiguration(
        LEGEND_TAXONOMY_HOTKEY.SEARCH_TAXONOMY,
        [LEGEND_TAXONOMY_HOTKEY_MAP.SEARCH_TAXONOMY],
        (event?: KeyboardEvent): void => {
          event?.preventDefault();
          this.searchTaxonomyNodeCommandState.open();
        },
      ),
    ];
  }