@vcmap/module-selector 2.0.2 → 2.0.3
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/CHANGELOG.md +5 -0
- package/dist/index.js +570 -566
- package/package.json +9 -9
- package/src/config/ModuleSelectorConfigEditor.vue +39 -22
- package/src/index.ts +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vcmap/module-selector",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,28 +45,28 @@
|
|
|
45
45
|
],
|
|
46
46
|
"prettier": "@vcsuite/eslint-config/prettier.js",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@vcmap/core": "^6.0.
|
|
49
|
-
"@vcmap/ui": "^6.0.
|
|
48
|
+
"@vcmap/core": "^6.0.5",
|
|
49
|
+
"@vcmap/ui": "^6.0.7",
|
|
50
50
|
"vue": "~3.4.38",
|
|
51
51
|
"vuetify": "^3.7.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@vcmap/plugin-cli": "^4.0.
|
|
54
|
+
"@vcmap/plugin-cli": "^4.0.1",
|
|
55
55
|
"@vcsuite/eslint-config": "^3.0.8",
|
|
56
|
-
"@vitest/coverage-v8": "^2.1.
|
|
56
|
+
"@vitest/coverage-v8": "^2.1.4",
|
|
57
57
|
"jest-canvas-mock": "^2.5.2",
|
|
58
58
|
"jsdom": "^24.1.1",
|
|
59
59
|
"resize-observer-polyfill": "^1.5.1",
|
|
60
|
-
"typescript": "^5.6.
|
|
61
|
-
"vitest": "^2.1.
|
|
62
|
-
"vue-tsc": "^2.1.
|
|
60
|
+
"typescript": "^5.6.3",
|
|
61
|
+
"vitest": "^2.1.4",
|
|
62
|
+
"vue-tsc": "^2.1.10"
|
|
63
63
|
},
|
|
64
64
|
"mapVersion": "^6.0",
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@vcsuite/logger": "^1.0.1",
|
|
67
67
|
"@vcsuite/parsers": "^2.0.0",
|
|
68
|
-
"fast-deep-equal": "^3.1.3",
|
|
69
68
|
"@vcsuite/publisher-sdk": "^5.2.12",
|
|
69
|
+
"fast-deep-equal": "^3.1.3",
|
|
70
70
|
"node-fetch": "^2.7.0"
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -39,24 +39,6 @@
|
|
|
39
39
|
</v-row>
|
|
40
40
|
</v-container>
|
|
41
41
|
</VcsFormSection>
|
|
42
|
-
<VcsFormSection
|
|
43
|
-
heading="moduleSelector.configEditor.windowPosition"
|
|
44
|
-
:expandable="true"
|
|
45
|
-
>
|
|
46
|
-
<WindowPositionSettings
|
|
47
|
-
v-model="localConfig.position!"
|
|
48
|
-
:position-keys="[
|
|
49
|
-
'top',
|
|
50
|
-
'right',
|
|
51
|
-
'bottom',
|
|
52
|
-
'left',
|
|
53
|
-
'width',
|
|
54
|
-
'maxWidth',
|
|
55
|
-
'height',
|
|
56
|
-
'maxHeight',
|
|
57
|
-
]"
|
|
58
|
-
/>
|
|
59
|
-
</VcsFormSection>
|
|
60
42
|
<VcsFormSection heading="moduleSelector.configEditor.baseModule">
|
|
61
43
|
<v-container class="py-0 px-1">
|
|
62
44
|
<v-row no-gutters>
|
|
@@ -199,6 +181,24 @@
|
|
|
199
181
|
/>
|
|
200
182
|
</v-dialog>
|
|
201
183
|
</VcsFormSection>
|
|
184
|
+
<VcsFormSection
|
|
185
|
+
heading="moduleSelector.configEditor.windowPosition"
|
|
186
|
+
:expandable="true"
|
|
187
|
+
>
|
|
188
|
+
<WindowPositionSettings
|
|
189
|
+
v-model="localConfig.position!"
|
|
190
|
+
:position-keys="[
|
|
191
|
+
'top',
|
|
192
|
+
'right',
|
|
193
|
+
'bottom',
|
|
194
|
+
'left',
|
|
195
|
+
'width',
|
|
196
|
+
'maxWidth',
|
|
197
|
+
'height',
|
|
198
|
+
'maxHeight',
|
|
199
|
+
]"
|
|
200
|
+
/>
|
|
201
|
+
</VcsFormSection>
|
|
202
202
|
</AbstractConfigEditor>
|
|
203
203
|
</template>
|
|
204
204
|
|
|
@@ -222,6 +222,7 @@
|
|
|
222
222
|
reactive,
|
|
223
223
|
Ref,
|
|
224
224
|
ref,
|
|
225
|
+
toRaw,
|
|
225
226
|
watch,
|
|
226
227
|
} from 'vue';
|
|
227
228
|
import {
|
|
@@ -528,11 +529,27 @@
|
|
|
528
529
|
});
|
|
529
530
|
|
|
530
531
|
const apply = (): void => {
|
|
531
|
-
|
|
532
|
-
|
|
532
|
+
const position = toRaw(localConfig.value?.position) as Record<
|
|
533
|
+
string,
|
|
534
|
+
unknown
|
|
535
|
+
>;
|
|
536
|
+
const isPositionDefined = Object.values(position).some(
|
|
537
|
+
(value) => value !== undefined,
|
|
538
|
+
);
|
|
539
|
+
|
|
540
|
+
const config = {
|
|
541
|
+
...toRaw(localConfig.value),
|
|
533
542
|
modules: removeIdAndActionsFromArray(listItemArray.value),
|
|
534
|
-
basisModule: basisModule.value,
|
|
535
|
-
}
|
|
543
|
+
basisModule: toRaw(basisModule.value),
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
if (isPositionDefined) {
|
|
547
|
+
config.position = position;
|
|
548
|
+
} else {
|
|
549
|
+
delete config.position;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
props.setConfig(config);
|
|
536
553
|
};
|
|
537
554
|
|
|
538
555
|
const updateItem = (): void => {
|
package/src/index.ts
CHANGED
|
@@ -47,7 +47,7 @@ export type PluginState = {
|
|
|
47
47
|
smi?: number | undefined | null;
|
|
48
48
|
// selectedNestedModuleIndex
|
|
49
49
|
snmi?: number | undefined | null;
|
|
50
|
-
// module
|
|
50
|
+
// module selector window open
|
|
51
51
|
w?: boolean;
|
|
52
52
|
modules?: Array<Module<ModuleType>>;
|
|
53
53
|
};
|
|
@@ -124,8 +124,8 @@ export default function plugin(
|
|
|
124
124
|
this.selectedMainModuleIndex.value,
|
|
125
125
|
this.selectedNestedModuleIndex.value,
|
|
126
126
|
app,
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
this.config.modules,
|
|
128
|
+
this.config.basisModule,
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -150,7 +150,7 @@ export default function plugin(
|
|
|
150
150
|
ButtonLocation.PROJECT,
|
|
151
151
|
);
|
|
152
152
|
|
|
153
|
-
if ((state && state.w) || (!state &&
|
|
153
|
+
if ((state && state.w) || (!state && this.config.isActiveOnStart)) {
|
|
154
154
|
app.windowManager.add(moduleSelectorComponent, name);
|
|
155
155
|
}
|
|
156
156
|
|
|
@@ -293,7 +293,7 @@ export default function plugin(
|
|
|
293
293
|
createdAt: 'Created at',
|
|
294
294
|
updatedAt: 'Updated at',
|
|
295
295
|
createdBy: 'Created by',
|
|
296
|
-
updatedBy: '
|
|
296
|
+
updatedBy: 'Updated by',
|
|
297
297
|
},
|
|
298
298
|
},
|
|
299
299
|
TooltipAddModule: 'Add module',
|