@milaboratories/graph-maker 1.0.11 → 1.0.13

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/README.md CHANGED
@@ -1,18 +1,36 @@
1
- # Vue 3 + TypeScript + Vite
1
+ Vue-component including graph settings interface and resulting rendered graph.
2
2
 
3
- This template should help get you started developing with Vue 3 and TypeScript in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
3
+ How to use:
4
4
 
5
- ## Recommended IDE Setup
5
+ ```
6
+ <script setup lang="ts">
7
+ import { computed, ref } from 'vue';
8
+ import { useApp } from './app';
9
+ import { platforma } from '@platforma-open/milaboratories.graph-maker.model';
10
+ import { GraphMakerSettings } from '@milaboratories/graph-maker/dist/GraphMaker/types';
11
+ import { GraphMaker } from '@milaboratories/graph-maker';
6
12
 
7
- - [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
13
+ const app = useApp();
14
+ const frameRef = app.model.outputs.pFrame;
15
+ const settings = ref<GraphMakerSettings>({
16
+ chartType: 'discrete',
17
+ template: 'box',
18
+ title: 'My graph'
19
+ });
20
+ </script>
8
21
 
9
- ## Type Support For `.vue` Imports in TS
22
+ <template>
23
+ <graph-maker
24
+ v-if="platforma.pFrameDriver && frameRef && settings"
25
+ v-model="settings"
26
+ :p-frame-handle="frameRef"
27
+ :p-frame-driver="platforma.pFrameDriver"
28
+ />
29
+ </template>
30
+ ```
10
31
 
11
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
12
-
13
- If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
14
-
15
- 1. Disable the built-in TypeScript Extension
16
- 1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
17
- 2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
18
- 2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
32
+ How to build locally:
33
+ ```
34
+ npm install
35
+ npm run build
36
+ ```
@@ -1,4 +1,3 @@
1
-
2
1
  declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
3
2
  chartData: Record<string, unknown> | null;
4
3
  }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
@@ -5,6 +5,7 @@ export declare function composeChartSettings(inputGuide: InputGuide<InputState>,
5
5
  settings: Record<string, unknown>;
6
6
  dataByColumns: {
7
7
  type: "columns";
8
+ id: string;
8
9
  values: Record<string, (string | number)[]>;
9
10
  };
10
11
  } | null>;