@eturnity/eturnity_reusable_components 1.1.75 → 1.1.76

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": "@eturnity/eturnity_reusable_components",
3
- "version": "1.1.75",
3
+ "version": "1.1.76",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -1,14 +1,11 @@
1
1
  <template>
2
2
  <dropdown-row
3
- :colspan="isNested ? colSpan + 1 : colSpan"
3
+ :colspan="colSpan"
4
4
  :isOpen="isOpen"
5
5
  @click="toggleOpen"
6
6
  :disabled="disabled"
7
7
  >
8
- <component-container
9
- :colSpan="isNested ? colSpan : colSpan - 1"
10
- class="table-dropdown"
11
- >
8
+ <component-container :colSpan="colSpan - 1" class="table-dropdown">
12
9
  <component-item
13
10
  v-for="(item, index) in tableItems"
14
11
  :key="index"
@@ -18,58 +15,65 @@
18
15
  'table-dropdown-item': item.type !== 'input',
19
16
  }"
20
17
  >
21
- <nested-icon v-if="isNested" />
22
- <template-button
23
- @click.stop="onTemplateClick(item.row)"
24
- v-if="
25
- item.type &&
26
- item.type === 'template' &&
27
- (item.value === '' || item.value === '-')
28
- "
29
- :key="idx"
30
- >{{ $gettext("Use template...") }}</template-button
31
- >
32
- <template-link
33
- v-else-if="item.type && item.type === 'template' && item.value !== ''"
34
- @click.stop="onSelectedTemplateClick(item.row)"
35
- >
36
- <img
37
- :src="require('../../assets/icons/file_icon.png')"
38
- alt="icon"
39
- width="12"
40
- height="16"
41
- />
42
- <div>{{ item.value }}</div>
43
- </template-link>
44
- <no-template v-if="item.type && item.type === 'no-template'">
45
- {{ $gettext("No main component template") }}
46
- </no-template>
47
- <input-container
48
- v-if="item.type === 'input'"
49
- @click.native.stop="onInputClick()"
50
- >
51
- <text-container v-if="customInputDisabled" class="input-placeholder">
18
+ <nested-container>
19
+ <nested-icon v-if="isNested" />
20
+ <template-button
21
+ @click.stop="onTemplateClick(item.row)"
22
+ v-if="
23
+ item.type &&
24
+ item.type === 'template' &&
25
+ (item.value === '' || item.value === '-')
26
+ "
27
+ :key="idx"
28
+ >{{ $gettext("Use template...") }}</template-button
29
+ >
30
+ <template-link
31
+ v-else-if="
32
+ item.type && item.type === 'template' && item.value !== ''
33
+ "
34
+ @click.stop="onSelectedTemplateClick(item.row)"
35
+ >
36
+ <img
37
+ :src="require('../../assets/icons/file_icon.png')"
38
+ alt="icon"
39
+ width="12"
40
+ height="16"
41
+ />
42
+ <div>{{ item.value }}</div>
43
+ </template-link>
44
+ <no-template v-if="item.type && item.type === 'no-template'">
45
+ {{ $gettext("No main component template") }}
46
+ </no-template>
47
+ <input-container
48
+ v-if="item.type === 'input'"
49
+ @click.native.stop="onInputClick()"
50
+ >
51
+ <text-container
52
+ v-if="customInputDisabled"
53
+ class="input-placeholder"
54
+ >
55
+ <span> {{ item.value }}</span>
56
+ </text-container>
57
+ <input-text
58
+ v-else
59
+ class="inputField"
60
+ :value="item.value"
61
+ :noBorder="true"
62
+ :minWidth="item.value.length + 'ch'"
63
+ :disabled="customInputDisabled"
64
+ @input-change="onCustomInputChange($event)"
65
+ />
66
+ </input-container>
67
+ <text-container
68
+ v-else-if="
69
+ item.type !== 'input' &&
70
+ item.type !== 'no-template' &&
71
+ item.type !== 'template'
72
+ "
73
+ >
52
74
  <span> {{ item.value }}</span>
53
75
  </text-container>
54
- <input-text
55
- v-else
56
- class="inputField"
57
- :value="item.value"
58
- :noBorder="true"
59
- :minWidth="item.value.length + 'ch'"
60
- :disabled="customInputDisabled"
61
- @input-change="onCustomInputChange($event)"
62
- />
63
- </input-container>
64
- <text-container
65
- v-else-if="
66
- item.type !== 'input' &&
67
- item.type !== 'no-template' &&
68
- item.type !== 'template'
69
- "
70
- >
71
- <span> {{ item.value }}</span>
72
- </text-container>
76
+ </nested-container>
73
77
  </component-item>
74
78
  <arrow-container class="arrow-container">
75
79
  <arrow-wrapper :showArchived="showArchived">
@@ -199,11 +203,7 @@ const DropdownRow = styled("div", rowAttrs)`
199
203
 
200
204
  const ItemAttrs = { isNested: Boolean }
201
205
  const ComponentItem = styled("td", ItemAttrs)`
202
- display: grid;
203
- align-items: center;
204
- grid-template-columns: ${(props) => (props.isNested ? "auto 1fr" : "1fr")};
205
- grid-gap: 5px;
206
- padding-left: ${(props) => (props.isNested ? "14px" : "0")};
206
+ padding-left: ${(props) => (props.isNested ? "14px !important" : "0")};
207
207
  overflow: hidden;
208
208
  text-overflow: ellipsis;
209
209
  padding-right: 0 !important;
@@ -406,6 +406,14 @@ const NestedIcon = styled.div`
406
406
  width: 6px;
407
407
  `
408
408
 
409
+ const NestedAttrs = { isNested: Boolean }
410
+ const NestedContainer = styled("div", NestedAttrs)`
411
+ display: grid;
412
+ grid-gap: 5px;
413
+ grid-template-columns: auto 1fr;
414
+ align-items: center;
415
+ `
416
+
409
417
  export default {
410
418
  name: "table-dropdown",
411
419
  components: {
@@ -433,6 +441,7 @@ export default {
433
441
  ArrowContainer,
434
442
  TextContainer,
435
443
  NestedIcon,
444
+ NestedContainer,
436
445
  },
437
446
  props: {
438
447
  colSpan: {