@abi-software/map-utilities 1.2.0-beta.2 → 1.2.0-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abi-software/map-utilities",
3
- "version": "1.2.0-beta.2",
3
+ "version": "1.2.0-beta.4",
4
4
  "files": [
5
5
  "dist/*",
6
6
  "src/*",
@@ -0,0 +1,199 @@
1
+ <template>
2
+ <el-container class="create-container">
3
+ <el-header height="30px" class="header">
4
+ <div>Create {{ createData.shape }}</div>
5
+ </el-header>
6
+ <el-main class="slides-block">
7
+ <span class="create-text">
8
+ Primitives will be created in the __annotation region
9
+ </span>
10
+ <el-row class="row" v-show="showPoint">
11
+ <el-col :offset="0" :span="8">
12
+ Position:
13
+ </el-col>
14
+ <el-col :offset="0" :span="16">
15
+ <el-row v-for="{ value, i } in createData.points" :key="i" class="value">
16
+ {{ i }}
17
+ </el-row>
18
+ </el-col>
19
+ </el-row>
20
+ <el-row class="row">
21
+ <el-col :offset="0" :span="8">
22
+ Region:
23
+ </el-col>
24
+ <el-col :offset="0" :span="16">
25
+ <el-input
26
+ v-model="region"
27
+ placeholder="__annotation"
28
+ size="small"
29
+ />
30
+ </el-col>
31
+ </el-row>
32
+ <el-row class="row">
33
+ <el-col :offset="0" :span="8">
34
+ Group:
35
+ </el-col>
36
+ <el-col :offset="0" :span="16">
37
+ <el-input
38
+ v-model="group"
39
+ :placeholder="createData.shape"
40
+ size="small"
41
+ />
42
+ </el-col>
43
+ </el-row>
44
+ <el-row>
45
+ <el-col :offset="0" :span="12">
46
+ <el-button
47
+ type="primary"
48
+ plain
49
+ @click="confirm"
50
+ >
51
+ {{ confirmText }}
52
+ </el-button>
53
+ </el-col>
54
+ <el-col :offset="0" :span="12">
55
+ <el-button
56
+ type="primary"
57
+ plain
58
+ @click="cancel"
59
+ >
60
+ Cancel
61
+ </el-button>
62
+ </el-col>
63
+ </el-row>
64
+ </el-main>
65
+ </el-container>
66
+ </template>
67
+
68
+ <script>
69
+ /* eslint-disable no-alert, no-console */
70
+
71
+ import {
72
+ ElButton as Button,
73
+ ElCol as Col,
74
+ ElContainer as Container,
75
+ ElHeader as Header,
76
+ ElInput as Input,
77
+ ElMain as Main,
78
+
79
+ } from "element-plus";
80
+
81
+ /**
82
+ * A component to control the opacity of the target object.
83
+ */
84
+ export default {
85
+ name: "CreateTooltipContent",
86
+ components: {
87
+ Button,
88
+ Col,
89
+ Container,
90
+ Header,
91
+ Input,
92
+ Main,
93
+ },
94
+ props: {
95
+ createData: {
96
+ type: Object,
97
+ },
98
+ },
99
+ watch: {
100
+ "createData.shape": {
101
+ handler: function (value) {
102
+ this.group = value;
103
+ this.$emit("cancel-create");
104
+ },
105
+ immediate: true,
106
+ },
107
+ },
108
+ computed: {
109
+ confirmText: function () {
110
+ if (this.createData.editingIndex > -1) {
111
+ return "Edit";
112
+ }
113
+ return "Confirm";
114
+ },
115
+ },
116
+ data: function () {
117
+ return {
118
+ group: "default",
119
+ region: "",
120
+ showPoint: false,
121
+ }
122
+ },
123
+ methods: {
124
+ confirm: function () {
125
+ this.$emit(
126
+ "confirm-create",
127
+ {
128
+ region: "__annotation/" + this.region,
129
+ group: this.group,
130
+ shape: this.createData.shape,
131
+ editingIndex: this.createData.editingIndex,
132
+ }
133
+ );
134
+ this.group = this.createData.shape;
135
+ },
136
+ cancel: function () {
137
+ this.$emit("cancel-create");
138
+ },
139
+ },
140
+ };
141
+ </script>
142
+
143
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
144
+ <style scoped lang="scss">
145
+ .header {
146
+ color: #606266;
147
+ line-height: 1;
148
+ padding: 8px 17px 1px 15px;
149
+ border-bottom: 1px solid #ebeef5;
150
+ font-size: 14px;
151
+ }
152
+
153
+ .row {
154
+ margin: 4px;
155
+ text-align: left;
156
+ }
157
+
158
+ :deep(.create-text) {
159
+ max-width: 220px;
160
+ height:35px;
161
+ font-size: 12px;
162
+ }
163
+
164
+
165
+ .create-container {
166
+ width: 100%;
167
+ height: auto;
168
+ border-radius: 4px;
169
+ border: solid 1px #d8dce6;
170
+ background-color: #fff;
171
+ overflow-y: none;
172
+ user-select: auto;
173
+ pointer-events: auto;
174
+ }
175
+
176
+ .value {
177
+ font-size: 12px;
178
+ }
179
+
180
+ .input-box {
181
+ width: 42px;
182
+ border-radius: 4px;
183
+ border: 1px solid rgb(144, 147, 153);
184
+ background-color: var(--white);
185
+ font-weight: 500;
186
+ color: rgb(48, 49, 51);
187
+ margin-left: 8px;
188
+ height: 24px;
189
+
190
+ &.number-input {
191
+ width: 42px;
192
+ :deep(.el-input__wrapper) {
193
+ padding-left: 0px;
194
+ padding-right: 0px;
195
+ }
196
+ }
197
+ }
198
+
199
+ </style>
@@ -1,8 +1,9 @@
1
1
  import AnnotationPopup from "./Tooltip/AnnotationPopup.vue";
2
+ import CreateTooltipContent from "./Tooltip/CreateTooltipContent.vue";
2
3
  import CopyToClipboard from "./CopyToClipboard/CopyToClipboard.vue";
3
4
  import DrawToolbar from "./DrawToolbar/DrawToolbar.vue";
4
5
  import HelpModeDialog from "./HelpModeDialog/HelpModeDialog.vue";
5
6
  import Tooltip from "./Tooltip/Tooltip.vue";
6
7
  import TreeControls from "./TreeControls/TreeControls.vue";
7
8
 
8
- export { AnnotationPopup, CopyToClipboard, DrawToolbar, HelpModeDialog, Tooltip, TreeControls };
9
+ export { AnnotationPopup, CreateTooltipContent, CopyToClipboard, DrawToolbar, HelpModeDialog, Tooltip, TreeControls };
@@ -10,12 +10,15 @@ declare module 'vue' {
10
10
  AnnotationPopup: typeof import('./components/Tooltip/AnnotationPopup.vue')['default']
11
11
  ConnectionDialog: typeof import('./components/DrawToolbar/ConnectionDialog.vue')['default']
12
12
  CopyToClipboard: typeof import('./components/CopyToClipboard/CopyToClipboard.vue')['default']
13
+ CreateTooltipContent: typeof import('./components/Tooltip/CreateTooltipContent.vue')['default']
13
14
  DrawToolbar: typeof import('./components/DrawToolbar/DrawToolbar.vue')['default']
14
15
  ElButton: typeof import('element-plus/es')['ElButton']
15
16
  ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup']
16
17
  ElCard: typeof import('element-plus/es')['ElCard']
17
18
  ElCol: typeof import('element-plus/es')['ElCol']
18
19
  ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
20
+ ElContainer: typeof import('element-plus/es')['ElContainer']
21
+ ElHeader: typeof import('element-plus/es')['ElHeader']
19
22
  ElIcon: typeof import('element-plus/es')['ElIcon']
20
23
  ElIconArrowDown: typeof import('@element-plus/icons-vue')['ArrowDown']
21
24
  ElIconArrowUp: typeof import('@element-plus/icons-vue')['ArrowUp']