dashboard-shell-shell 3.0.5-test.9 → 3.0.5-tsh.10

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.
Files changed (213) hide show
  1. package/assets/brand/csp/favicon.png +0 -0
  2. package/assets/icons/iconfont.css +4 -1
  3. package/assets/iconsNew/demo.css +539 -0
  4. package/assets/iconsNew/demo.css:Zone.Identifier +0 -0
  5. package/assets/iconsNew/demo_index.html +303 -0
  6. package/assets/iconsNew/demo_index.html:Zone.Identifier +0 -0
  7. package/assets/iconsNew/iconfont.css +43 -0
  8. package/assets/iconsNew/iconfont.css:Zone.Identifier +0 -0
  9. package/assets/iconsNew/iconfont.js +1 -0
  10. package/assets/iconsNew/iconfont.js:Zone.Identifier +0 -0
  11. package/assets/iconsNew/iconfont.json +44 -0
  12. package/assets/iconsNew/iconfont.json:Zone.Identifier +0 -0
  13. package/assets/iconsNew/iconfont.ttf +0 -0
  14. package/assets/iconsNew/iconfont.ttf:Zone.Identifier +0 -0
  15. package/assets/iconsNew/iconfont.woff +0 -0
  16. package/assets/iconsNew/iconfont.woff2 +0 -0
  17. package/assets/iconsNew/iconfont.woff2:Zone.Identifier +0 -0
  18. package/assets/iconsNew/iconfont.woff:Zone.Identifier +0 -0
  19. package/assets/images/login-logo.svg +37 -12
  20. package/assets/images/logo.svg +47 -0
  21. package/assets/images/pl/dark/logo.png +0 -0
  22. package/assets/styles/all.scss +23 -3
  23. package/assets/styles/app.scss +1 -0
  24. package/assets/styles/base/_helpers.scss +1 -1
  25. package/assets/styles/base/_variables.scss +2 -2
  26. package/assets/styles/fonts/_icons.scss +3 -2
  27. package/assets/styles/global/_button.scss +1 -1
  28. package/assets/styles/global/_form.scss +1 -0
  29. package/assets/styles/global/_select.scss +1 -1
  30. package/assets/styles/global/_tooltip.scss +5 -1
  31. package/assets/styles/themes/_light.scss +3 -3
  32. package/assets/styles/vendor/vue-select.scss +2 -1
  33. package/assets/translations/en-us.yaml +64 -0
  34. package/assets/translations/zh-hans.yaml +221 -22
  35. package/components/ButtonDropdown.vue +3 -1
  36. package/components/ClusterIconMenu.vue +1 -1
  37. package/components/CodeMirror.vue +6 -4
  38. package/components/ConsumptionGauge.vue +1 -1
  39. package/components/ContainerResourceLimit.vue +2 -2
  40. package/components/CruResource.vue +3 -2
  41. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -19
  42. package/components/Drawer/ResourceDetailDrawer/index.vue +3 -3
  43. package/components/ExplorerMembers.vue +10 -1
  44. package/components/GlobalRoleBindings.vue +69 -114
  45. package/components/PodSecurityAdmission.vue +1 -1
  46. package/components/PromptRemove.vue +23 -1
  47. package/components/RelatedResources.vue +3 -0
  48. package/components/Resource/Detail/TitleBar/composables.ts +16 -1
  49. package/components/Resource/Detail/TitleBar/index.vue +37 -24
  50. package/components/ResourceDetail/Masthead/index.vue +1 -1
  51. package/components/ResourceDetail/Masthead/latest.vue +1 -1
  52. package/components/ResourceDetail/Masthead/legacy.vue +8 -7
  53. package/components/ResourceDetail/legacy.vue +15 -15
  54. package/components/ResourceList/Masthead.vue +11 -15
  55. package/components/ResourceTable.vue +16 -0
  56. package/components/SideNav.vue +21 -21
  57. package/components/SingleClusterInfo.vue +2 -1
  58. package/components/SortableTable/THead.vue +46 -1
  59. package/components/SortableTable/index.vue +54 -18
  60. package/components/Tabbed/index.vue +6 -1
  61. package/components/auth/Principal.vue +16 -8
  62. package/components/auth/RoleDetailEdit.vue +11 -7
  63. package/components/breadcrumb/index.vue +13 -210
  64. package/components/form/ArrayList.vue +164 -147
  65. package/components/form/ArrayListGrouped.vue +5 -3
  66. package/components/form/ChangePassword.vue +1 -1
  67. package/components/form/ClusterAppearance.vue +4 -3
  68. package/components/form/Command.vue +4 -5
  69. package/components/form/Conditions.vue +15 -1
  70. package/components/form/Footer.vue +1 -0
  71. package/components/form/HealthCheck.vue +0 -2
  72. package/components/form/HookOption.vue +87 -58
  73. package/components/form/InputWithSelect.vue +8 -7
  74. package/components/form/KeyValue.vue +20 -2
  75. package/components/form/LabeledSelect.vue +3 -1
  76. package/components/form/Labels.vue +2 -2
  77. package/components/form/MatchExpressions.vue +4 -4
  78. package/components/form/Members/ClusterMembershipEditor.vue +1 -1
  79. package/components/form/Members/ClusterPermissionsEditor.vue +60 -41
  80. package/components/form/Members/MembershipEditor.vue +4 -4
  81. package/components/form/Members/ProjectMembershipEditor.vue +1 -1
  82. package/components/form/NameNsDescription.vue +17 -1
  83. package/components/form/Networking.vue +6 -9
  84. package/components/form/NodeAffinity.vue +29 -28
  85. package/components/form/PodAffinity.vue +23 -23
  86. package/components/form/Probe.vue +15 -11
  87. package/components/form/ProjectMemberEditor.vue +66 -48
  88. package/components/form/ResourceQuota/Namespace.vue +4 -4
  89. package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
  90. package/components/form/ResourceQuota/Project.vue +4 -4
  91. package/components/form/ResourceQuota/ProjectRow.vue +36 -30
  92. package/components/form/ResourceSelector.vue +1 -1
  93. package/components/form/SecretSelector.vue +24 -23
  94. package/components/form/Security.vue +1 -3
  95. package/components/form/Select.vue +7 -1
  96. package/components/form/ServiceNameSelect.vue +2 -5
  97. package/components/form/ServicePorts.vue +149 -75
  98. package/components/form/Tolerations.vue +13 -9
  99. package/components/form/ValueFromResource.vue +110 -96
  100. package/components/formatter/WorkloadHealthScale.vue +4 -3
  101. package/components/nav/Group.vue +8 -1
  102. package/components/nav/Header.vue +51 -174
  103. package/components/nav/NamespaceFilter.vue +14 -19
  104. package/components/nav/TopLevelMenu.vue +99 -125
  105. package/components/nav/Type.vue +11 -3
  106. package/config/menuRouteMap.js +10 -0
  107. package/config/private-label.js +2 -3
  108. package/config/product/explorer.js +32 -10
  109. package/config/product/manager.js +28 -17
  110. package/config/product/uiplugins.js +13 -10
  111. package/config/router/navigation-guards/index.js +61 -3
  112. package/detail/node.vue +28 -23
  113. package/dialog/AddCustomBadgeDialog.vue +17 -9
  114. package/dialog/RollbackWorkloadDialog.vue +1 -1
  115. package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
  116. package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
  117. package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
  118. package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
  119. package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
  120. package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
  121. package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
  122. package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
  123. package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
  124. package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
  125. package/edit/configmap.vue +4 -0
  126. package/edit/logging-flow/index.vue +1 -2
  127. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
  128. package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
  129. package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
  130. package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
  131. package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
  132. package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
  133. package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
  134. package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
  135. package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
  136. package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
  137. package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
  138. package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
  139. package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
  140. package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
  141. package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
  142. package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
  143. package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
  144. package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
  145. package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
  146. package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
  147. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +32 -8
  148. package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
  149. package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
  150. package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
  151. package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
  152. package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
  153. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
  154. package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
  155. package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
  156. package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
  157. package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
  158. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
  159. package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
  160. package/edit/persistentvolume/index.vue +3 -1
  161. package/edit/persistentvolumeclaim.vue +2 -0
  162. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
  163. package/edit/secret/index.vue +2 -2
  164. package/edit/service.vue +4 -1
  165. package/edit/storage.k8s.io.storageclass/index.vue +10 -8
  166. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
  167. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
  168. package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
  169. package/edit/workload/Job.vue +31 -34
  170. package/edit/workload/Upgrading.vue +5 -5
  171. package/edit/workload/index.vue +19 -15
  172. package/edit/workload/storage/Mount.vue +1 -0
  173. package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
  174. package/edit/workload/storage/azureDisk.vue +14 -10
  175. package/edit/workload/storage/azureFile.vue +9 -7
  176. package/edit/workload/storage/csi/index.vue +6 -9
  177. package/edit/workload/storage/emptyDir.vue +7 -5
  178. package/edit/workload/storage/gcePersistentDisk.vue +9 -7
  179. package/edit/workload/storage/hostPath.vue +7 -5
  180. package/edit/workload/storage/nfs.vue +8 -6
  181. package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
  182. package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
  183. package/edit/workload/storage/secret.vue +9 -6
  184. package/edit/workload/storage/vsphereVolume.vue +11 -7
  185. package/initialize/app-extended.js +7 -1
  186. package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
  187. package/mixins/create-edit-view/impl.js +10 -0
  188. package/models/provisioning.cattle.io.cluster.js +19 -18
  189. package/models/workload.js +2 -2
  190. package/package.json +1 -1
  191. package/pages/account/index.vue +93 -58
  192. package/pages/auth/login.vue +24 -27
  193. package/pages/auth/setup.vue +36 -17
  194. package/pages/c/_cluster/auth/roles/index.vue +27 -3
  195. package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
  196. package/pages/c/_cluster/explorer/index.vue +2 -1
  197. package/pages/c/_cluster/explorer/tools/index.vue +6 -6
  198. package/pages/home.vue +55 -13
  199. package/plugins/dashboard-store/actions.js +1 -1
  200. package/public/index.html +1 -1
  201. package/rancher-components/Banner/Banner.vue +14 -2
  202. package/rancher-components/Form/Radio/RadioGroup.vue +9 -1
  203. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
  204. package/scripts/build-pkg.sh +18 -23
  205. package/scripts/publish-shell.sh +1 -1
  206. package/store/i18n.js +1 -0
  207. package/store/type-map.js +0 -2
  208. package/types/shell/index.d.ts +8 -0
  209. package/utils/error.js +23 -3
  210. package/utils/errorTranslate.json +397 -8
  211. package/utils/errorTranslateNew.json +39 -0
  212. package/utils/roleFiltering.js +33 -0
  213. package/utils/title.ts +1 -1
@@ -1,54 +1,18 @@
1
1
  <script>
2
- import { Banner } from '@components/Banner';
3
2
  import { get } from '@shell/utils/object';;
4
- import {
5
- AS, _DETAIL, _CONFIG, _YAML, MODE, _CREATE, _EDIT, _VIEW, _UNFLAG, _GRAPH
6
- } from '@shell/config/query-params';
7
- import { ExtensionPoint, PanelLocation } from '@shell/core/types';
8
3
  import { useRuntimeFlag } from '@shell/composables/useRuntimeFlag';
9
4
  import { useStore } from 'vuex';
10
5
 
11
- // i18n-uses resourceDetail.header.*
12
-
13
- /**
14
- * Resource Detail Masthead component.
15
- *
16
- * ToDo: this component seem to be picking up a lot of logic from special cases, could be simplified down to parameters and then customized per use-case via wrapper component
17
- */
18
6
  export default {
19
7
 
20
- name: 'MastheadResourceDetail',
8
+ name: 'MastheadBreadcrumb',
21
9
 
22
10
  components: {
23
- // BadgeState,
24
- Banner,
25
11
  },
26
12
  props: {
27
- value: {
28
- type: Object,
29
- default: () => {
30
- return {};
31
- }
32
- },
33
-
34
- mode: {
35
- type: String,
36
- default: 'view'
37
- },
38
-
39
- realMode: {
40
- type: String,
41
- default: 'view'
42
- },
43
-
44
- as: {
13
+ resourceTypeLabel: {
45
14
  type: String,
46
- default: _YAML,
47
- },
48
-
49
- storeOverride: {
50
- type: String,
51
- default: null,
15
+ default: ''
52
16
  },
53
17
 
54
18
  resource: {
@@ -56,15 +20,10 @@ export default {
56
20
  default: null,
57
21
  },
58
22
 
59
- resourceSubtype: {
60
- type: String,
61
- default: null,
62
- },
63
-
64
- parentRouteOverride: {
23
+ realMode: {
65
24
  type: String,
66
- default: null,
67
- },
25
+ default: 'view',
26
+ }
68
27
 
69
28
  },
70
29
 
@@ -77,97 +36,21 @@ export default {
77
36
 
78
37
  data() {
79
38
  return {
80
- DETAIL_VIEW: _DETAIL,
81
- extensionType: ExtensionPoint.PANEL,
82
- extensionLocation: PanelLocation.DETAILS_MASTHEAD,
83
- Svg: require('~shell/assets/images/API.svg')
84
39
  };
85
40
  },
86
41
 
87
42
  computed: {
88
- dev() {
89
- return this.$store.getters['prefs/dev'];
90
- },
91
-
92
- schema() {
93
- const inStore = this.storeOverride || this.$store.getters['currentStore'](this.resource);
94
-
95
- return this.$store.getters[`${ inStore }/schemaFor`]( this.resource );
96
- },
97
-
98
- isProjectHelmChart() {
99
- return this.schema?.id === HELM.PROJECTHELMCHART;
100
- },
101
-
102
- shouldHifenize() {
103
- return (this.mode === 'view' || this.mode === 'edit') && this.resourceSubtype?.length && this.value?.nameDisplay?.length;
104
- },
105
-
106
- parent() {
107
- const displayName = this.value?.parentNameOverride || this.$store.getters['type-map/labelFor'](this.schema);
108
- const product = this.$store.getters['currentProduct'].name;
109
-
110
- const defaultLocation = {
111
- name: 'c-cluster-product-resource',
112
- params: {
113
- resource: this.resource,
114
- product,
115
- }
116
- };
117
-
118
- const location = this.value?.parentLocationOverride || defaultLocation;
119
-
120
- if (this.parentRouteOverride) {
121
- location.name = this.parentRouteOverride;
122
- }
123
-
124
- const typeOptions = this.$store.getters[`type-map/optionsFor`]( this.resource );
125
-
126
- // 转换为中文
127
- const displayName_zh_hans = {
128
- 'GlobalRole': '全局角色',
129
- 'RoleTemplate': '集群角色',
130
- }
131
- if (displayName_zh_hans[displayName]) {
132
- displayName = displayName_zh_hans[displayName]
133
- }
134
-
135
- if (displayName == '集群角色' && (this.$route.query?.roleContext == 'NAMESPACE' || location.hash == '#NAMESPACE')) {
136
- displayName = '项目或资源组角色'
137
- }
138
-
139
- const out = {
140
- displayName, location, ...typeOptions
141
- };
142
-
143
- return out;
144
- },
145
-
146
-
147
- displayName() {
148
- let displayName = this.value.nameDisplay;
149
-
150
- if (this.isProjectHelmChart) {
151
- displayName = this.value.projectDisplayName;
152
- }
153
-
154
- return this.shouldHifenize ? ` - ${ displayName }` : displayName;
155
- },
156
43
 
157
44
  demoDisplay() {
158
45
 
159
46
  const resources = this.$route.params?.resource || ''
160
-
161
- const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], resources);
162
-
163
- if (productId === undefined) {
164
- return '';
165
- }
166
- const parts = productId.split('::');
47
+
48
+ let productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], resources);
49
+ const parts = productId?.split('::') || [];
167
50
  const newString = 'root';
168
51
 
169
52
  if (!parts?.includes(newString)) {
170
- parts.unshift(newString); // 将字符串添加到数组第一位
53
+ parts?.unshift(newString); // 将字符串添加到数组第一位
171
54
  }
172
55
 
173
56
  const partsEn = parts.map((item) => {
@@ -177,12 +60,6 @@ export default {
177
60
  return partsEn;
178
61
  },
179
62
 
180
- location() {
181
- const { parent } = this;
182
-
183
- return parent?.location;
184
- },
185
-
186
63
  },
187
64
 
188
65
  methods: {
@@ -206,7 +83,7 @@ export default {
206
83
  <span>/</span>
207
84
  </span>
208
85
  <span class="excram-last-name">
209
- {{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent.displayName }}
86
+ {{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + resourceTypeLabel }}
210
87
  </span>
211
88
  </div>
212
89
  </div>
@@ -215,71 +92,6 @@ export default {
215
92
 
216
93
  <style lang='scss' scoped>
217
94
 
218
- HEADER {
219
- margin: 0;
220
- }
221
-
222
- .primaryheader {
223
- display: flex;
224
- flex-direction: row;
225
- align-items: center;
226
- font-size:14px;
227
- height: 50px;
228
-
229
- h1 {
230
- margin: 0;
231
- }
232
- }
233
-
234
- .subheader{
235
- display: flex;
236
- flex-direction: row;
237
- color: var(--input-label);
238
- & > * {
239
- margin: 5px 20px 5px 0px;
240
- }
241
-
242
- .live-data {
243
- color: var(--body-text)
244
- }
245
- }
246
-
247
- .state-banner {
248
- margin: 3px 0 0 0;
249
- }
250
-
251
- .masthead-state {
252
- font-size: initial;
253
- display: inline-block;
254
- position: relative;
255
- /* top: -2px; */
256
- font-size: 12px;
257
- margin-left: 5px;
258
- }
259
-
260
- .masthead-istio {
261
- .icon {
262
- vertical-align: middle;
263
- color: var(--primary);
264
- }
265
- }
266
-
267
- .left-right-split {
268
- display: grid;
269
- align-items: center;
270
-
271
- .left-half {
272
- grid-column: 1;
273
- }
274
-
275
- .right-half {
276
- grid-column: 2;
277
- }
278
- }
279
-
280
- .resource-external {
281
- font-size: 18px;
282
- }
283
95
  .excram-list{
284
96
  font-size: 14px;
285
97
  margin-bottom: 20px;
@@ -287,10 +99,7 @@ export default {
287
99
  .excram-last-name{
288
100
  color: var(--link);
289
101
  }
290
- .valid{
291
- color: #d7d7d7;
292
- margin: 0px 10px;
293
- }
102
+
294
103
  .detailIcon-span{
295
104
  width: 24px;
296
105
  height: 24px;
@@ -306,11 +115,5 @@ export default {
306
115
  left: 4px;
307
116
  top: -2px;
308
117
  }
309
- .primary-title{
310
- display: flex;
311
- align-items: center;
312
- }
313
- .detailIcon-span-title{
314
- font-weight: bold;
315
- }
118
+
316
119
  </style>
@@ -263,174 +263,180 @@ export default {
263
263
  role="group"
264
264
  :aria-label="title || t('generic.ariaLabel.arrayList')"
265
265
  >
266
- <div
267
- v-if="title"
268
- class="clearfix"
269
- role="group"
270
- >
271
- <slot name="title">
272
- <h3>
273
- {{ title }}
274
- <span
275
- v-if="required"
276
- class="required"
277
- aria-hidden="true"
278
- >*</span>
279
- <i
280
- v-if="showProtip"
281
- v-clean-tooltip="{content: protip, triggers: ['hover', 'touch', 'focus'] }"
282
- class="icon icon-info"
283
- tabindex="0"
284
- />
285
- </h3>
286
- </slot>
287
- </div>
288
266
 
289
- <div>
290
- <div
291
- v-if="showAdd && !isView"
292
- class="footer mmt-6"
293
- >
294
- <slot
295
- v-if="showAdd"
296
- name="add"
297
- :add="add"
298
- >
299
- <button
300
- type="button"
301
- class="btn role-tertiary add"
302
- :class="[addClass]"
303
- :disabled="loading || disableAdd"
304
- :data-testid="`${componentTestid}-button`"
305
- :aria-label="_addLabel"
306
- role="button"
307
- @click="add()"
308
- >
309
- <i
310
- class="mr-5 icon"
311
- :class="loading ? ['icon-lg', 'icon-spinner','icon-spin']: [addIcon]"
312
- />
313
- {{ _addLabel }}
314
- </button>
315
- </slot>
316
- </div>
317
- <template v-if="rows.length">
267
+ <div class="row">
268
+ <div v-if="title" style="width: 100%;" class="col">
318
269
  <div
319
- v-if="showHeader"
320
- class="array-list-header-group"
270
+ class="clearfix"
321
271
  role="group"
322
272
  >
323
- <slot name="column-headers">
324
- <label class="value text-label mb-10">
325
- {{ valueLabel }}
326
- </label>
273
+ <slot name="title">
274
+ <h3>
275
+ {{ title }}
276
+ <span
277
+ v-if="required"
278
+ class="required"
279
+ aria-hidden="true"
280
+ >*</span>
281
+ <i
282
+ v-if="showProtip"
283
+ v-clean-tooltip="{content: protip, triggers: ['hover', 'touch', 'focus'] }"
284
+ class="icon icon-info"
285
+ tabindex="0"
286
+ />
287
+ </h3>
327
288
  </slot>
328
289
  </div>
329
- <div
330
- v-for="(row, idx) in rows"
331
- :key="idx"
332
- :data-testid="`${componentTestid}-box${ idx }`"
333
- class="box"
334
- :class="{'hide-remove-is-view': isView}"
335
- role="group"
336
- >
337
- <slot
338
- name="columns"
339
- :queueUpdate="queueUpdate"
340
- :i="idx"
341
- :rows="rows"
342
- :row="row"
343
- :mode="mode"
344
- :isView="isView"
345
- >
346
- <div class="value">
290
+ </div>
291
+ <div style="width: 100%;" class="col">
292
+ <div>
293
+ <template v-if="rows.length">
294
+ <div
295
+ v-if="showHeader"
296
+ class="array-list-header-group"
297
+ role="group"
298
+ >
299
+ <slot name="column-headers">
300
+ <label class="value text-label mb-10">
301
+ {{ valueLabel }}
302
+ </label>
303
+ </slot>
304
+ </div>
305
+ <div
306
+ v-for="(row, idx) in rows"
307
+ :key="idx"
308
+ :data-testid="`${componentTestid}-box${ idx }`"
309
+ class="box"
310
+ :class="{'hide-remove-is-view': isView}"
311
+ role="group"
312
+ >
347
313
  <slot
348
- name="value"
314
+ name="columns"
315
+ :queueUpdate="queueUpdate"
316
+ :i="idx"
317
+ :rows="rows"
349
318
  :row="row"
350
319
  :mode="mode"
351
320
  :isView="isView"
352
- :queue-update="queueUpdate"
353
321
  >
354
- <TextAreaAutoGrow
355
- v-if="valueMultiline"
356
- ref="value"
357
- v-model:value="row.value"
358
- :data-testid="`${componentTestid}-textarea-${idx}`"
359
- :placeholder="valuePlaceholder"
360
- :mode="mode"
361
- :disabled="disabled"
362
- :aria-label="a11yLabel ? `${a11yLabel} ${t('generic.ariaLabel.genericRow', {index: idx+1})}` : undefined"
363
- @paste="onPaste(idx, $event)"
364
- @update:value="queueUpdate"
365
- />
366
- <LabeledInput
367
- v-else-if="rules.length > 0"
368
- ref="value"
369
- v-model:value="row.value"
370
- :data-testid="`${componentTestid}-labeled-input-${idx}`"
371
- :placeholder="valuePlaceholder"
372
- :disabled="isView || disabled"
373
- :rules="rules"
374
- :compact="false"
375
- :aria-label="a11yLabel ? `${a11yLabel} ${t('generic.ariaLabel.genericRow', {index: idx+1})}` : undefined"
376
- @paste="onPaste(idx, $event)"
377
- @update:value="queueUpdate"
378
- />
379
- <input
380
- v-else
381
- ref="value"
382
- v-model="row.value"
383
- :data-testid="`${componentTestid}-input-${idx}`"
384
- :placeholder="valuePlaceholder"
385
- :disabled="isView || disabled"
386
- :aria-label="a11yLabel ? `${a11yLabel} ${t('generic.ariaLabel.genericRow', {index: idx+1})}` : undefined"
387
- @paste="onPaste(idx, $event)"
388
- >
322
+ <div class="value">
323
+ <slot
324
+ name="value"
325
+ :row="row"
326
+ :mode="mode"
327
+ :isView="isView"
328
+ :queue-update="queueUpdate"
329
+ >
330
+ <TextAreaAutoGrow
331
+ v-if="valueMultiline"
332
+ ref="value"
333
+ v-model:value="row.value"
334
+ :data-testid="`${componentTestid}-textarea-${idx}`"
335
+ :placeholder="valuePlaceholder"
336
+ :mode="mode"
337
+ :disabled="disabled"
338
+ :aria-label="a11yLabel ? `${a11yLabel} ${t('generic.ariaLabel.genericRow', {index: idx+1})}` : undefined"
339
+ @paste="onPaste(idx, $event)"
340
+ @update:value="queueUpdate"
341
+ />
342
+ <LabeledInput
343
+ v-else-if="rules.length > 0"
344
+ ref="value"
345
+ v-model:value="row.value"
346
+ :data-testid="`${componentTestid}-labeled-input-${idx}`"
347
+ :placeholder="valuePlaceholder"
348
+ :disabled="isView || disabled"
349
+ :rules="rules"
350
+ :compact="false"
351
+ :aria-label="a11yLabel ? `${a11yLabel} ${t('generic.ariaLabel.genericRow', {index: idx+1})}` : undefined"
352
+ @paste="onPaste(idx, $event)"
353
+ @update:value="queueUpdate"
354
+ />
355
+ <input
356
+ v-else
357
+ ref="value"
358
+ v-model="row.value"
359
+ :data-testid="`${componentTestid}-input-${idx}`"
360
+ :placeholder="valuePlaceholder"
361
+ :disabled="isView || disabled"
362
+ :aria-label="a11yLabel ? `${a11yLabel} ${t('generic.ariaLabel.genericRow', {index: idx+1})}` : undefined"
363
+ @paste="onPaste(idx, $event)"
364
+ >
365
+ </slot>
366
+ </div>
389
367
  </slot>
368
+ <div
369
+ v-if="showRemove && !isView"
370
+ class="remove"
371
+ >
372
+ <slot
373
+ name="remove-button"
374
+ :remove="() => remove(row, idx)"
375
+ :i="idx"
376
+ :row="row"
377
+ >
378
+ <button
379
+ type="button"
380
+ :disabled="isView"
381
+ class="btn role-link"
382
+ :data-testid="`${componentTestid}-remove-item-${idx}`"
383
+ :aria-label="t('generic.ariaLabel.remove', {index: idx+1})"
384
+ role="button"
385
+ @click="remove(row, idx)"
386
+ >
387
+ {{ _removeLabel }}
388
+ </button>
389
+ </slot>
390
+ </div>
391
+ <slot
392
+ name="value-sub-row"
393
+ :row="row"
394
+ :mode="mode"
395
+ :isView="isView"
396
+ />
390
397
  </div>
391
- </slot>
398
+ </template>
399
+ <div v-else>
400
+ <slot name="empty">
401
+ <div
402
+ v-if="mode==='view'"
403
+ class="text-muted"
404
+ >
405
+ &mdash;
406
+ </div>
407
+ </slot>
408
+ </div>
392
409
  <div
393
- v-if="showRemove && !isView"
394
- class="remove"
410
+ v-if="showAdd && !isView"
411
+ class="footer"
395
412
  >
396
413
  <slot
397
- name="remove-button"
398
- :remove="() => remove(row, idx)"
399
- :i="idx"
400
- :row="row"
414
+ v-if="showAdd"
415
+ name="add"
416
+ :add="add"
401
417
  >
402
418
  <button
403
419
  type="button"
404
- :disabled="isView"
405
- class="btn role-link"
406
- :data-testid="`${componentTestid}-remove-item-${idx}`"
407
- :aria-label="t('generic.ariaLabel.remove', {index: idx+1})"
420
+ class="btn role-tertiary add"
421
+ :class="[addClass]"
422
+ :disabled="loading || disableAdd"
423
+ :data-testid="`${componentTestid}-button`"
424
+ :aria-label="_addLabel"
408
425
  role="button"
409
- @click="remove(row, idx)"
426
+ @click="add()"
410
427
  >
411
- {{ _removeLabel }}
428
+ <i
429
+ class="mr-5 icon"
430
+ :class="loading ? ['icon-lg', 'icon-spinner','icon-spin']: [addIcon]"
431
+ />
432
+ {{ _addLabel }}
412
433
  </button>
413
434
  </slot>
414
435
  </div>
415
- <slot
416
- name="value-sub-row"
417
- :row="row"
418
- :mode="mode"
419
- :isView="isView"
420
- />
421
436
  </div>
422
- </template>
423
- <div v-else>
424
- <slot name="empty">
425
- <div
426
- v-if="mode==='view'"
427
- class="text-muted"
428
- >
429
- &mdash;
430
- </div>
431
- </slot>
432
437
  </div>
433
438
  </div>
439
+
434
440
  </div>
435
441
  </template>
436
442
 
@@ -444,13 +450,15 @@ export default {
444
450
  }
445
451
 
446
452
  .box {
447
- display: grid;
448
- grid-template-columns: auto $array-list-remove-margin;
449
- align-items: center;
450
- margin-bottom: 10px;
453
+ // display: grid;
454
+ // grid-template-columns: auto $array-list-remove-margin;
455
+ // align-items: center;
456
+ // margin-bottom: 10px;
457
+ display: flex;
451
458
  .value {
452
- flex: 1;
459
+ // flex: 1;
453
460
  INPUT {
461
+ width: $input-width;
454
462
  height: $input-height;
455
463
  border: solid var(--border-width) var(--input-border);
456
464
  padding: 4px 11px;
@@ -462,9 +470,15 @@ export default {
462
470
  }
463
471
  .remove {
464
472
  text-align: right;
473
+ display: flex;
474
+ align-items: center;
475
+
476
+ button{
477
+ min-width: auto;
478
+ }
465
479
  }
466
480
  .footer {
467
- margin-bottom: 24px;
481
+ margin-bottom: 20px;
468
482
  .protip {
469
483
  float: right;
470
484
  padding: 5px 0;
@@ -481,4 +495,7 @@ export default {
481
495
  margin-bottom: 10px;
482
496
  }
483
497
 
498
+ H3{
499
+ width: 160px;
500
+ }
484
501
  </style>
@@ -120,15 +120,16 @@ export default {
120
120
 
121
121
  <style lang="scss">
122
122
  .array-list-grouped {
123
- & > .box {
123
+ .box {
124
+ border: 0px solid var(--tabbed-border) !important;
124
125
  position: relative;
125
126
  display: block;
126
127
 
127
128
  & > .remove {
128
129
  position: absolute;
129
130
 
130
- top: 10px;
131
- right: 10px;
131
+ top: 0px !important;
132
+ right: 0px !important;
132
133
  & > .close{
133
134
  width: 32px;
134
135
  min-width: 32px !important;
@@ -140,6 +141,7 @@ export default {
140
141
  }
141
142
 
142
143
  & > .info-box {
144
+ border: 1px solid var(--tabbed-border) !important;
143
145
  margin-bottom: 0;
144
146
  padding-right: 25px;
145
147
  }