@ddd-tool/domain-designer-ui-component 0.1.0-beta.10 → 0.1.0-beta.11
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/domain/diagram-agg/index.d.ts +1503 -0
- package/domain/diagram-agg/plugins.d.ts +1 -0
- package/index.js +14 -2
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ export declare const DIAGRAM_STORAGE_PLUGIN: import("vue-fn/domain").DomainSetup
|
|
|
8
8
|
};
|
|
9
9
|
design: import("vue").ComputedRef<import("@ddd-tool/domain-designer-core").DomainDesigner | undefined>;
|
|
10
10
|
designKeys: import("vue").ComputedRef<string[]>;
|
|
11
|
+
designRecords: import("vue").Ref<Record<string, import("@ddd-tool/domain-designer-core").DomainDesigner>, Record<string, import("@ddd-tool/domain-designer-core").DomainDesigner>>;
|
|
11
12
|
code: import("vue").ComputedRef<string>;
|
|
12
13
|
userStories: import("vue").ComputedRef<Record<string, string[]>>;
|
|
13
14
|
workflows: import("vue").ComputedRef<Record<string, string[]>>;
|
package/index.js
CHANGED
|
@@ -13860,6 +13860,7 @@ Stack : ${l2.stack || "unkown"}`);
|
|
|
13860
13860
|
renderConfig,
|
|
13861
13861
|
design,
|
|
13862
13862
|
designKeys,
|
|
13863
|
+
designRecords,
|
|
13863
13864
|
code,
|
|
13864
13865
|
userStories,
|
|
13865
13866
|
workflows,
|
|
@@ -26808,7 +26809,8 @@ Component that was made reactive: `, t2)), Rn(t2, e2, n2, s2, r2, c2, o2, true);
|
|
|
26808
26809
|
return {
|
|
26809
26810
|
mount({ api }) {
|
|
26810
26811
|
const defRenderConfig = defaultRenderConfig();
|
|
26811
|
-
const
|
|
26812
|
+
const RENDER_CONFIG_KEY = "diagram-render-config";
|
|
26813
|
+
const existRenderConfig = localStorage.getItem(RENDER_CONFIG_KEY);
|
|
26812
26814
|
if (existRenderConfig) {
|
|
26813
26815
|
const { ranker, padding, fontSize, edges, bendSize } = JSON.parse(existRenderConfig);
|
|
26814
26816
|
api.commands.setRenderBendSize(bendSize || defRenderConfig.bendSize);
|
|
@@ -26818,7 +26820,17 @@ Component that was made reactive: `, t2)), Rn(t2, e2, n2, s2, r2, c2, o2, true);
|
|
|
26818
26820
|
api.commands.setRenderRanker(ranker || defRenderConfig.ranker);
|
|
26819
26821
|
}
|
|
26820
26822
|
watch(api.states.renderConfig, () => {
|
|
26821
|
-
localStorage.setItem(
|
|
26823
|
+
localStorage.setItem(RENDER_CONFIG_KEY, JSON.stringify(api.states.renderConfig));
|
|
26824
|
+
});
|
|
26825
|
+
const DESIGN_KEY = "diagram-current-design";
|
|
26826
|
+
const existDesignKey = localStorage.getItem(DESIGN_KEY);
|
|
26827
|
+
if (existDesignKey && api.states.designRecords.value[existDesignKey]) {
|
|
26828
|
+
api.commands.switchDesign(existDesignKey);
|
|
26829
|
+
}
|
|
26830
|
+
watch(api.states.currentDesignKey, (value) => {
|
|
26831
|
+
if (value) {
|
|
26832
|
+
localStorage.setItem(DESIGN_KEY, value);
|
|
26833
|
+
}
|
|
26822
26834
|
});
|
|
26823
26835
|
}
|
|
26824
26836
|
};
|