bfg-common 1.5.386 → 1.5.388

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.
@@ -1,161 +1,161 @@
1
- <template>
2
- <ui-stack-block
3
- :has-children="true"
4
- test-id="general-options-stack-block"
5
- is-toggle-on-stack-view-key
6
- @toggle="blockIsOpen = $event"
7
- >
8
- <template #stackBlockKey>
9
- <div
10
- id="vm-wizard-toggle-block-general-options"
11
- data-id="vm-wizard-toggle-block-general-options"
12
- class="flex-align-center text-ellipsis"
13
- >
14
- <span class="text-ellipsis">{{
15
- localization.common.generalOptions
16
- }}</span>
17
- </div>
18
- </template>
19
- <template #stackBlockContent>
20
- <div v-show="!blockIsOpen" class="vm-name-wrap">
21
- <span class="vsphere-icon-vm"></span>
22
- <span>{{ vmName }}</span>
23
- </div>
24
- </template>
25
- <template #stackChildren>
26
- <ui-stack-block :has-children="false">
27
- <template #stackBlockKey>
28
- {{ props.nameLabel }}
29
- </template>
30
- <template #stackBlockContent>
31
- <div class="vm-name-wrap">
32
- <span class="vsphere-icon-vm"></span>
33
- <span>{{ vmName }}</span>
34
- </div>
35
- <!-- <span v-if="!props.isEdit">{{ vmName }}</span>-->
36
- <!-- <input-->
37
- <!-- v-else-->
38
- <!-- id="general-option-vm-name"-->
39
- <!-- v-models="vmName"-->
40
- <!-- type="text"-->
41
- <!-- />-->
42
- </template>
43
- </ui-stack-block>
44
-
45
- <ui-stack-block :has-children="false">
46
- <template #stackBlockKey>
47
- <span class="mt-2">{{ localization.common.machineType }}</span>
48
- </template>
49
- <template #stackBlockContent>
50
- <ui-select
51
- v-if="guestMachineType"
52
- id="guest-machine-type-select"
53
- v-model="guestMachineType"
54
- :items="props.machineTypeOptions"
55
- :disabled="props.isDisabled"
56
- width="auto"
57
- test-id="guest-machine-type-select"
58
- class="guest-machine-type-select"
59
- size="sm"
60
- />
61
- </template>
62
- </ui-stack-block>
63
-
64
- <ui-stack-block :has-children="false">
65
- <template #stackBlockKey>
66
- <span class="mt-2">{{ localization.common.guestOsFamily }}</span>
67
- </template>
68
- <template #stackBlockContent>
69
- <ui-select
70
- v-if="guestOsFamily"
71
- id="guest-os-family-select"
72
- v-model="guestOsFamily"
73
- :items="props.osOptions"
74
- :disabled="props.isDisabled"
75
- width="auto"
76
- test-id="guest-os-family-select"
77
- class="guest-os-family-select"
78
- size="sm"
79
- @change="emits('change-os')"
80
- />
81
- </template>
82
- </ui-stack-block>
83
-
84
- <ui-stack-block :has-children="false">
85
- <template #stackBlockKey>
86
- <span class="mt-2">{{ localization.common.guestOsVersion }}</span>
87
- </template>
88
- <template #stackBlockContent>
89
- <ui-select
90
- v-if="guestOsVersion"
91
- id="guest-os-version-select"
92
- v-model="guestOsVersion"
93
- :items="props.versionsOptions"
94
- :disabled="props.isDisabled"
95
- width="auto"
96
- test-id="guest-os-version-select"
97
- class="guest-os-version-select"
98
- size="sm"
99
- />
100
- </template>
101
- </ui-stack-block>
102
- </template>
103
- </ui-stack-block>
104
- </template>
105
-
106
- <script setup lang="ts">
107
- import type { UI_I_Localization } from '~/lib/models/interfaces'
108
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
109
-
110
- const blockIsOpen = defineModel<boolean>('blockIsOpen', { required: true })
111
- const vmName = defineModel<string>('vmName', { required: true })
112
- const guestMachineType = defineModel<UI_I_OptionItem | null>(
113
- 'guestMachineType',
114
- {
115
- required: true,
116
- }
117
- )
118
- const guestOsFamily = defineModel<UI_I_OptionItem | null>('guestOsFamily', {
119
- required: true,
120
- })
121
- const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion', {
122
- required: true,
123
- })
124
-
125
- const props = defineProps<{
126
- isDisabled: boolean
127
- nameLabel: string
128
- machineTypeOptions: UI_I_OptionItem[]
129
- osOptions: UI_I_OptionItem[]
130
- versionsOptions: UI_I_OptionItem[]
131
- }>()
132
- const emits = defineEmits<{
133
- (event: 'change-os'): void
134
- }>()
135
-
136
- const localization = computed<UI_I_Localization>(() => useLocal())
137
- </script>
138
-
139
- <style scoped lang="scss">
140
- .vm-name-wrap {
141
- display: flex;
142
- align-items: center;
143
- gap: 4px;
144
- }
145
-
146
- .vsphere-icon-vm {
147
- width: 20px;
148
- height: 20px;
149
- }
150
-
151
- :deep(.guest-os-family-select .ui-main-select-toggle),
152
- :deep(.guest-machine-type-select .ui-main-select-toggle) {
153
- width: 108px;
154
- }
155
- :deep(.guest-os-version-select .ui-main-select-toggle) {
156
- width: 196px;
157
- }
158
- :deep(.stack-block-label .stack-block-content) {
159
- flex: unset !important;
160
- }
161
- </style>
1
+ <template>
2
+ <ui-stack-block
3
+ :has-children="true"
4
+ test-id="general-options-stack-block"
5
+ is-toggle-on-stack-view-key
6
+ @toggle="blockIsOpen = $event"
7
+ >
8
+ <template #stackBlockKey>
9
+ <div
10
+ id="vm-wizard-toggle-block-general-options"
11
+ data-id="vm-wizard-toggle-block-general-options"
12
+ class="flex-align-center text-ellipsis"
13
+ >
14
+ <span class="text-ellipsis">{{
15
+ localization.common.generalOptions
16
+ }}</span>
17
+ </div>
18
+ </template>
19
+ <template #stackBlockContent>
20
+ <div v-show="!blockIsOpen" class="vm-name-wrap">
21
+ <span class="vsphere-icon-vm"></span>
22
+ <span>{{ vmName || '--' }}</span>
23
+ </div>
24
+ </template>
25
+ <template #stackChildren>
26
+ <ui-stack-block :has-children="false">
27
+ <template #stackBlockKey>
28
+ {{ props.nameLabel }}
29
+ </template>
30
+ <template #stackBlockContent>
31
+ <div class="vm-name-wrap">
32
+ <span class="vsphere-icon-vm"></span>
33
+ <span>{{ vmName || '--' }}</span>
34
+ </div>
35
+ <!-- <span v-if="!props.isEdit">{{ vmName }}</span>-->
36
+ <!-- <input-->
37
+ <!-- v-else-->
38
+ <!-- id="general-option-vm-name"-->
39
+ <!-- v-models="vmName"-->
40
+ <!-- type="text"-->
41
+ <!-- />-->
42
+ </template>
43
+ </ui-stack-block>
44
+
45
+ <ui-stack-block :has-children="false">
46
+ <template #stackBlockKey>
47
+ <span class="mt-2">{{ localization.common.machineType }}</span>
48
+ </template>
49
+ <template #stackBlockContent>
50
+ <ui-select
51
+ v-if="guestMachineType"
52
+ id="guest-machine-type-select"
53
+ v-model="guestMachineType"
54
+ :items="props.machineTypeOptions"
55
+ :disabled="props.isDisabled"
56
+ width="auto"
57
+ test-id="guest-machine-type-select"
58
+ class="guest-machine-type-select"
59
+ size="sm"
60
+ />
61
+ </template>
62
+ </ui-stack-block>
63
+
64
+ <ui-stack-block :has-children="false">
65
+ <template #stackBlockKey>
66
+ <span class="mt-2">{{ localization.common.guestOsFamily }}</span>
67
+ </template>
68
+ <template #stackBlockContent>
69
+ <ui-select
70
+ v-if="guestOsFamily"
71
+ id="guest-os-family-select"
72
+ v-model="guestOsFamily"
73
+ :items="props.osOptions"
74
+ :disabled="props.isDisabled"
75
+ width="auto"
76
+ test-id="guest-os-family-select"
77
+ class="guest-os-family-select"
78
+ size="sm"
79
+ @change="emits('change-os')"
80
+ />
81
+ </template>
82
+ </ui-stack-block>
83
+
84
+ <ui-stack-block :has-children="false">
85
+ <template #stackBlockKey>
86
+ <span class="mt-2">{{ localization.common.guestOsVersion }}</span>
87
+ </template>
88
+ <template #stackBlockContent>
89
+ <ui-select
90
+ v-if="guestOsVersion"
91
+ id="guest-os-version-select"
92
+ v-model="guestOsVersion"
93
+ :items="props.versionsOptions"
94
+ :disabled="props.isDisabled"
95
+ width="auto"
96
+ test-id="guest-os-version-select"
97
+ class="guest-os-version-select"
98
+ size="sm"
99
+ />
100
+ </template>
101
+ </ui-stack-block>
102
+ </template>
103
+ </ui-stack-block>
104
+ </template>
105
+
106
+ <script setup lang="ts">
107
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
108
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
109
+
110
+ const blockIsOpen = defineModel<boolean>('blockIsOpen', { required: true })
111
+ const vmName = defineModel<string>('vmName', { required: true })
112
+ const guestMachineType = defineModel<UI_I_OptionItem | null>(
113
+ 'guestMachineType',
114
+ {
115
+ required: true,
116
+ }
117
+ )
118
+ const guestOsFamily = defineModel<UI_I_OptionItem | null>('guestOsFamily', {
119
+ required: true,
120
+ })
121
+ const guestOsVersion = defineModel<UI_I_OptionItem | null>('guestOsVersion', {
122
+ required: true,
123
+ })
124
+
125
+ const props = defineProps<{
126
+ isDisabled: boolean
127
+ nameLabel: string
128
+ machineTypeOptions: UI_I_OptionItem[]
129
+ osOptions: UI_I_OptionItem[]
130
+ versionsOptions: UI_I_OptionItem[]
131
+ }>()
132
+ const emits = defineEmits<{
133
+ (event: 'change-os'): void
134
+ }>()
135
+
136
+ const localization = computed<UI_I_Localization>(() => useLocal())
137
+ </script>
138
+
139
+ <style scoped lang="scss">
140
+ .vm-name-wrap {
141
+ display: flex;
142
+ align-items: center;
143
+ gap: 4px;
144
+ }
145
+
146
+ .vsphere-icon-vm {
147
+ width: 20px;
148
+ height: 20px;
149
+ }
150
+
151
+ :deep(.guest-os-family-select .ui-main-select-toggle),
152
+ :deep(.guest-machine-type-select .ui-main-select-toggle) {
153
+ width: 108px;
154
+ }
155
+ :deep(.guest-os-version-select .ui-main-select-toggle) {
156
+ width: 196px;
157
+ }
158
+ :deep(.stack-block-label .stack-block-content) {
159
+ flex: unset !important;
160
+ }
161
+ </style>