aloha-vue 1.2.201 → 1.2.203

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 (27) hide show
  1. package/docs/src/views/PageTable/PageTableSimple/PageTableSimple.js +6 -0
  2. package/docs/src/views/PageTable/PageTableSimple/PageTableSimple.pug +6 -0
  3. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleColumnsGroupedExample/PageTableSimpleColumnsGroupedExample.js +107 -0
  4. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleColumnsGroupedExample/PageTableSimpleColumnsGroupedExample.pug +16 -0
  5. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleColumnsGroupedExample/PageTableSimpleColumnsGroupedExample.vue +2 -0
  6. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleColumnsGroupedExample/compositionAPI/HtmlAPI.js +13 -0
  7. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleColumnsGroupedExample/compositionAPI/JsAPI.js +94 -0
  8. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleExample/PageTableSimpleExample.js +0 -56
  9. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleExample/PageTableSimpleExample.pug +0 -7
  10. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleIsSimpleTableExample/PageTableSimpleIsSimpleTableExample.js +80 -0
  11. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleIsSimpleTableExample/PageTableSimpleIsSimpleTableExample.pug +15 -0
  12. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleIsSimpleTableExample/PageTableSimpleIsSimpleTableExample.vue +2 -0
  13. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleIsSimpleTableExample/compositionAPI/HtmlAPI.js +13 -0
  14. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleIsSimpleTableExample/compositionAPI/JsAPI.js +67 -0
  15. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleMobileSlotsExample/PageTableSimpleMobileSlotsExample.js +80 -0
  16. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleMobileSlotsExample/PageTableSimpleMobileSlotsExample.pug +29 -0
  17. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleMobileSlotsExample/PageTableSimpleMobileSlotsExample.vue +2 -0
  18. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleMobileSlotsExample/compositionAPI/HtmlAPI.js +13 -0
  19. package/docs/src/views/PageTable/PageTableSimple/PageTableSimpleMobileSlotsExample/compositionAPI/JsAPI.js +67 -0
  20. package/package.json +1 -1
  21. package/src/ATable/ATable.js +6 -1
  22. package/src/ATable/ATableGroupedHeader/ATableGroupedHeader.js +4 -0
  23. package/src/ATable/ATableTd/compositionAPI/LinkAPI.js +6 -0
  24. package/src/ATable/ATableTr/ATableTr.js +21 -3
  25. package/src/ATable/compositionAPI/RowActionsAPI.js +6 -0
  26. package/src/ATable/compositionAPI/SimpleTableAPI.js +6 -2
  27. package/src/styles/components/ATable.scss +27 -10
@@ -1,5 +1,8 @@
1
1
  import AlohaPage from "../../../global/components/AlohaPage/AlohaPage.vue";
2
+ import PageTableSimpleColumnsGroupedExample from "./PageTableSimpleColumnsGroupedExample/PageTableSimpleColumnsGroupedExample.vue";
2
3
  import PageTableSimpleExample from "./PageTableSimpleExample/PageTableSimpleExample.vue";
4
+ import PageTableSimpleIsSimpleTableExample from "./PageTableSimpleIsSimpleTableExample/PageTableSimpleIsSimpleTableExample.vue";
5
+ import PageTableSimpleMobileSlotsExample from "./PageTableSimpleMobileSlotsExample/PageTableSimpleMobileSlotsExample.vue";
3
6
 
4
7
  import PageTitleAPI from "./compositionAPI/PageTitleAPI";
5
8
 
@@ -7,7 +10,10 @@ export default {
7
10
  name: "PageTableSimple",
8
11
  components: {
9
12
  AlohaPage,
13
+ PageTableSimpleColumnsGroupedExample,
10
14
  PageTableSimpleExample,
15
+ PageTableSimpleIsSimpleTableExample,
16
+ PageTableSimpleMobileSlotsExample,
11
17
  },
12
18
  setup() {
13
19
  const {
@@ -6,3 +6,9 @@ aloha-page(
6
6
  )
7
7
  page-table-simple-example
8
8
 
9
+ page-table-simple-is-simple-table-example
10
+
11
+ page-table-simple-columns-grouped-example
12
+
13
+ page-table-simple-mobile-slots-example
14
+
@@ -0,0 +1,107 @@
1
+ import {
2
+ ref,
3
+ } from "vue";
4
+
5
+ import AlohaExample from "../../../../global/components/AlohaExample/AlohaExample.vue";
6
+ import ATable from "../../../../../../src/ATable/ATable";
7
+
8
+ import HtmlAPI from "./compositionAPI/HtmlAPI";
9
+ import JsAPI from "./compositionAPI/JsAPI";
10
+
11
+ import {
12
+ times,
13
+ } from "lodash-es";
14
+
15
+ export default {
16
+ name: "PageTableSimpleColumnsGroupedExample",
17
+ components: {
18
+ AlohaExample,
19
+ ATable,
20
+ },
21
+ setup() {
22
+ const {
23
+ codeHtml,
24
+ } = HtmlAPI();
25
+
26
+ const {
27
+ codeJs,
28
+ } = JsAPI();
29
+
30
+ const columnsGrouped = [
31
+ {
32
+ id: "column5",
33
+ keyLabel: "aloha",
34
+ label: "_A_TABLE_COLUMN_7_",
35
+ },
36
+ {
37
+ id: "column1",
38
+ keyLabel: "id",
39
+ label: "_A_TABLE_COLUMN_1_",
40
+ group: ["Group 1", "Group 1.3"],
41
+ width: 500,
42
+ },
43
+ {
44
+ id: "column6",
45
+ keyLabel: "id",
46
+ label: "_A_TABLE_COLUMN_2_",
47
+ group: ["Group 1", "Group 1.1", "Group 1.1.1"],
48
+ },
49
+ {
50
+ id: "column7",
51
+ keyLabel: "id",
52
+ label: "_A_TABLE_COLUMN_3_",
53
+ group: ["Group 1.1", "Group 1.1.2", "Group 1"],
54
+ },
55
+ {
56
+ id: "column2",
57
+ keyLabel: "aloha",
58
+ label: "_A_TABLE_COLUMN_4_",
59
+ group: ["Group 1", "Group 1.2"],
60
+ },
61
+ {
62
+ id: "column9",
63
+ keyLabel: "aloha",
64
+ label: "_A_TABLE_COLUMN_7_",
65
+ },
66
+ {
67
+ id: "column3",
68
+ keyLabel: "aloha",
69
+ label: "_A_TABLE_COLUMN_5_",
70
+ group: ["Group 2", "Group 2.1"],
71
+ },
72
+ {
73
+ id: "column4",
74
+ keyLabel: "aloha",
75
+ label: "_A_TABLE_COLUMN_6_",
76
+ group: ["_A_TABLE_COLUMN_6_", "Group 2.2"],
77
+ },
78
+ {
79
+ id: "column6",
80
+ keyLabel: "aloha",
81
+ label: "_A_TABLE_COLUMN_8_",
82
+ },
83
+ ];
84
+
85
+ const data = ref([]);
86
+
87
+ const setData = () => {
88
+ const DATA = [];
89
+ times(20, item => {
90
+ DATA.push({
91
+ id: item,
92
+ aloha: `aloha ${ item }`,
93
+ });
94
+ });
95
+ data.value = DATA;
96
+ };
97
+
98
+ setData();
99
+
100
+ return {
101
+ codeHtml,
102
+ codeJs,
103
+ columnsGrouped,
104
+ data,
105
+ };
106
+ },
107
+ };
@@ -0,0 +1,16 @@
1
+ aloha-example(
2
+ :code-html="codeHtml"
3
+ :code-js="codeJs"
4
+ header="_A_TABLE_GROUP_SIMPLE_COLUMNS_GROUPED_HEADER_"
5
+ description="_A_TABLE_GROUP_SIMPLE_COLUMNS_GROUPED_DESCRIPTION_"
6
+ :props="['is-simple-table', 'has-mobile']"
7
+ )
8
+ div
9
+ a-table(
10
+ :columns="columnsGrouped"
11
+ :data="data"
12
+ label="_A_TABLE_GROUP_SIMPLE_COLUMNS_GROUPED_LABEL_"
13
+ key-id="id"
14
+ :is-simple-table="true"
15
+ :has-mobile="false"
16
+ )
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageTableSimpleColumnsGroupedExample.pug"></template>
2
+ <script src="./PageTableSimpleColumnsGroupedExample.js"></script>
@@ -0,0 +1,13 @@
1
+ export default function HtmlAPI() {
2
+ const codeHtml = `<a-table
3
+ :columns="columns"
4
+ :data="data"
5
+ label="_A_TABLE_GROUP_SIMPLE_LABEL_"
6
+ key-id="id"
7
+ >
8
+ </a-table>`;
9
+
10
+ return {
11
+ codeHtml,
12
+ };
13
+ }
@@ -0,0 +1,94 @@
1
+ export default function JsAPI() {
2
+ const codeJs = `import {
3
+ ref,
4
+ } from "vue";
5
+
6
+ import ATable from "aloha-vue/src/ATable/ATable";
7
+
8
+ export default {
9
+ name: "PageTableSimpleExample",
10
+ components: {
11
+ ATable,
12
+ },
13
+ setup() {
14
+ const columnsGrouped = [
15
+ {
16
+ id: "column5",
17
+ keyLabel: "aloha",
18
+ label: "_A_TABLE_COLUMN_7_",
19
+ },
20
+ {
21
+ id: "column1",
22
+ keyLabel: "id",
23
+ label: "_A_TABLE_COLUMN_1_",
24
+ group: ["Group 1", "Group 1.3"],
25
+ width: 500,
26
+ },
27
+ {
28
+ id: "column6",
29
+ keyLabel: "id",
30
+ label: "_A_TABLE_COLUMN_2_",
31
+ group: ["Group 1", "Group 1.1", "Group 1.1.1"],
32
+ },
33
+ {
34
+ id: "column7",
35
+ keyLabel: "id",
36
+ label: "_A_TABLE_COLUMN_3_",
37
+ group: ["Group 1.1", "Group 1.1.2", "Group 1"],
38
+ },
39
+ {
40
+ id: "column2",
41
+ keyLabel: "aloha",
42
+ label: "_A_TABLE_COLUMN_4_",
43
+ group: ["Group 1", "Group 1.2"],
44
+ },
45
+ {
46
+ id: "column9",
47
+ keyLabel: "aloha",
48
+ label: "_A_TABLE_COLUMN_7_",
49
+ },
50
+ {
51
+ id: "column3",
52
+ keyLabel: "aloha",
53
+ label: "_A_TABLE_COLUMN_5_",
54
+ group: ["Group 2", "Group 2.1"],
55
+ },
56
+ {
57
+ id: "column4",
58
+ keyLabel: "aloha",
59
+ label: "_A_TABLE_COLUMN_6_",
60
+ group: ["_A_TABLE_COLUMN_6_", "Group 2.2"],
61
+ },
62
+ {
63
+ id: "column6",
64
+ keyLabel: "aloha",
65
+ label: "_A_TABLE_COLUMN_8_",
66
+ },
67
+ ];
68
+
69
+ const data = ref([]);
70
+
71
+ const setData = () => {
72
+ const DATA = [];
73
+ times(20, item => {
74
+ DATA.push({
75
+ id: item,
76
+ aloha: \`aloha \${ item }\`,
77
+ });
78
+ });
79
+ data.value = DATA;
80
+ };
81
+
82
+ setData();
83
+
84
+ return {
85
+ columnsGrouped,
86
+ data,
87
+ };
88
+ },
89
+ };`;
90
+
91
+ return {
92
+ codeJs,
93
+ };
94
+ }
@@ -55,61 +55,6 @@ export default {
55
55
  },
56
56
  ];
57
57
 
58
- const columnsGrouped = [
59
- {
60
- id: "column5",
61
- keyLabel: "aloha",
62
- label: "_A_TABLE_COLUMN_7_",
63
- },
64
- {
65
- id: "column1",
66
- keyLabel: "id",
67
- label: "_A_TABLE_COLUMN_1_",
68
- group: ["Group 1", "Group 1.3"],
69
- width: 500,
70
- },
71
- {
72
- id: "column6",
73
- keyLabel: "id",
74
- label: "_A_TABLE_COLUMN_2_",
75
- group: ["Group 1", "Group 1.1", "Group 1.1.1"],
76
- },
77
- {
78
- id: "column7",
79
- keyLabel: "id",
80
- label: "_A_TABLE_COLUMN_3_",
81
- group: ["Group 1.1", "Group 1.1.2", "Group 1"],
82
- },
83
- {
84
- id: "column2",
85
- keyLabel: "aloha",
86
- label: "_A_TABLE_COLUMN_4_",
87
- group: ["Group 1", "Group 1.2"],
88
- },
89
- {
90
- id: "column9",
91
- keyLabel: "aloha",
92
- label: "_A_TABLE_COLUMN_7_",
93
- },
94
- {
95
- id: "column3",
96
- keyLabel: "aloha",
97
- label: "_A_TABLE_COLUMN_5_",
98
- group: ["Group 2", "Group 2.1"],
99
- },
100
- {
101
- id: "column4",
102
- keyLabel: "aloha",
103
- label: "_A_TABLE_COLUMN_6_",
104
- group: ["_A_TABLE_COLUMN_6_", "Group 2.2"],
105
- },
106
- {
107
- id: "column6",
108
- keyLabel: "aloha",
109
- label: "_A_TABLE_COLUMN_8_",
110
- },
111
- ];
112
-
113
58
  const data = ref([]);
114
59
 
115
60
  const setData = () => {
@@ -129,7 +74,6 @@ export default {
129
74
  codeHtml,
130
75
  codeJs,
131
76
  columns,
132
- columnsGrouped,
133
77
  data,
134
78
  };
135
79
  },
@@ -11,10 +11,3 @@ aloha-example(
11
11
  label="_A_TABLE_GROUP_SIMPLE_LABEL_"
12
12
  key-id="id"
13
13
  )
14
- a-table(
15
- :columns="columnsGrouped"
16
- :data="data"
17
- label="_A_TABLE_GROUP_SIMPLE_LABEL_"
18
- key-id="id"
19
- :is-simple-table="true"
20
- )
@@ -0,0 +1,80 @@
1
+ import {
2
+ ref,
3
+ } from "vue";
4
+
5
+ import AlohaExample from "../../../../global/components/AlohaExample/AlohaExample.vue";
6
+ import ATable from "../../../../../../src/ATable/ATable";
7
+
8
+ import HtmlAPI from "./compositionAPI/HtmlAPI";
9
+ import JsAPI from "./compositionAPI/JsAPI";
10
+
11
+ import {
12
+ times,
13
+ } from "lodash-es";
14
+
15
+ export default {
16
+ name: "PageTableSimpleIsSimpleTableExample",
17
+ components: {
18
+ AlohaExample,
19
+ ATable,
20
+ },
21
+ setup() {
22
+ const {
23
+ codeHtml,
24
+ } = HtmlAPI();
25
+
26
+ const {
27
+ codeJs,
28
+ } = JsAPI();
29
+
30
+ const columns = [
31
+ {
32
+ id: "column1",
33
+ keyLabel: "id",
34
+ label: "_A_TABLE_COLUMN_1_",
35
+ },
36
+ {
37
+ id: "column2",
38
+ keyLabel: "aloha",
39
+ label: "_A_TABLE_COLUMN_2_",
40
+ },
41
+ {
42
+ id: "column3",
43
+ keyLabel: "aloha",
44
+ label: "_A_TABLE_COLUMN_3_",
45
+ },
46
+ {
47
+ id: "column4",
48
+ keyLabel: "aloha",
49
+ label: "_A_TABLE_COLUMN_4_",
50
+ },
51
+ {
52
+ id: "column5",
53
+ keyLabel: "aloha",
54
+ label: "_A_TABLE_COLUMN_5_",
55
+ },
56
+ ];
57
+
58
+ const data = ref([]);
59
+
60
+ const setData = () => {
61
+ const DATA = [];
62
+ times(20, item => {
63
+ DATA.push({
64
+ id: item,
65
+ aloha: `aloha ${ item }`,
66
+ });
67
+ });
68
+ data.value = DATA;
69
+ };
70
+
71
+ setData();
72
+
73
+ return {
74
+ codeHtml,
75
+ codeJs,
76
+ columns,
77
+ data,
78
+ };
79
+ },
80
+ };
@@ -0,0 +1,15 @@
1
+ aloha-example(
2
+ :code-html="codeHtml"
3
+ :code-js="codeJs"
4
+ header="_A_TABLE_GROUP_SIMPLE_IS_SIMPLE_TABLE_HEADER_"
5
+ description="_A_TABLE_GROUP_SIMPLE_IS_SIMPLE_TABLE_DESCRIPTION_"
6
+ props="is-simple-table"
7
+ )
8
+ div
9
+ a-table(
10
+ :columns="columns"
11
+ :data="data"
12
+ :is-simple-table="true"
13
+ key-id="id"
14
+ label="_A_TABLE_GROUP_SIMPLE_IS_SIMPLE_TABLE_LABEL_"
15
+ )
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageTableSimpleIsSimpleTableExample.pug"></template>
2
+ <script src="./PageTableSimpleIsSimpleTableExample.js"></script>
@@ -0,0 +1,13 @@
1
+ export default function HtmlAPI() {
2
+ const codeHtml = `<a-table
3
+ :columns="columns"
4
+ :data="data"
5
+ label="_A_TABLE_GROUP_SIMPLE_LABEL_"
6
+ key-id="id"
7
+ >
8
+ </a-table>`;
9
+
10
+ return {
11
+ codeHtml,
12
+ };
13
+ }
@@ -0,0 +1,67 @@
1
+ export default function JsAPI() {
2
+ const codeJs = `import {
3
+ ref,
4
+ } from "vue";
5
+
6
+ import ATable from "aloha-vue/src/ATable/ATable";
7
+
8
+ export default {
9
+ name: "PageTableSimpleExample",
10
+ components: {
11
+ ATable,
12
+ },
13
+ setup() {
14
+ const columns = [
15
+ {
16
+ id: "column1",
17
+ keyLabel: "id",
18
+ label: "_A_TABLE_COLUMN_1_",
19
+ },
20
+ {
21
+ id: "column2",
22
+ keyLabel: "aloha",
23
+ label: "_A_TABLE_COLUMN_2_",
24
+ },
25
+ {
26
+ id: "column3",
27
+ keyLabel: "aloha",
28
+ label: "_A_TABLE_COLUMN_3_",
29
+ },
30
+ {
31
+ id: "column4",
32
+ keyLabel: "aloha",
33
+ label: "_A_TABLE_COLUMN_4_",
34
+ },
35
+ {
36
+ id: "column5",
37
+ keyLabel: "aloha",
38
+ label: "_A_TABLE_COLUMN_5_",
39
+ },
40
+ ];
41
+
42
+ const data = ref([]);
43
+
44
+ const setData = () => {
45
+ const DATA = [];
46
+ times(20, item => {
47
+ DATA.push({
48
+ id: item,
49
+ aloha: \`aloha \${ item }\`,
50
+ });
51
+ });
52
+ data.value = DATA;
53
+ };
54
+
55
+ setData();
56
+
57
+ return {
58
+ columns,
59
+ data,
60
+ };
61
+ },
62
+ };`;
63
+
64
+ return {
65
+ codeJs,
66
+ };
67
+ }
@@ -0,0 +1,80 @@
1
+ import {
2
+ ref,
3
+ } from "vue";
4
+
5
+ import AlohaExample from "../../../../global/components/AlohaExample/AlohaExample.vue";
6
+ import ATable from "../../../../../../src/ATable/ATable";
7
+
8
+ import HtmlAPI from "./compositionAPI/HtmlAPI";
9
+ import JsAPI from "./compositionAPI/JsAPI";
10
+
11
+ import {
12
+ times,
13
+ } from "lodash-es";
14
+
15
+ export default {
16
+ name: "PageTableSimpleMobileSlotsExample",
17
+ components: {
18
+ AlohaExample,
19
+ ATable,
20
+ },
21
+ setup() {
22
+ const {
23
+ codeHtml,
24
+ } = HtmlAPI();
25
+
26
+ const {
27
+ codeJs,
28
+ } = JsAPI();
29
+
30
+ const columns = [
31
+ {
32
+ id: "column1",
33
+ keyLabel: "id",
34
+ label: "_A_TABLE_COLUMN_1_",
35
+ },
36
+ {
37
+ id: "column2",
38
+ keyLabel: "aloha",
39
+ label: "_A_TABLE_COLUMN_2_",
40
+ },
41
+ {
42
+ id: "column3",
43
+ keyLabel: "aloha",
44
+ label: "_A_TABLE_COLUMN_3_",
45
+ },
46
+ {
47
+ id: "column4",
48
+ keyLabel: "aloha",
49
+ label: "_A_TABLE_COLUMN_4_",
50
+ },
51
+ {
52
+ id: "column5",
53
+ keyLabel: "aloha",
54
+ label: "_A_TABLE_COLUMN_5_",
55
+ },
56
+ ];
57
+
58
+ const data = ref([]);
59
+
60
+ const setData = () => {
61
+ const DATA = [];
62
+ times(20, item => {
63
+ DATA.push({
64
+ id: item,
65
+ aloha: `aloha ${ item }`,
66
+ });
67
+ });
68
+ data.value = DATA;
69
+ };
70
+
71
+ setData();
72
+
73
+ return {
74
+ codeHtml,
75
+ codeJs,
76
+ columns,
77
+ data,
78
+ };
79
+ },
80
+ };
@@ -0,0 +1,29 @@
1
+ aloha-example(
2
+ :code-html="codeHtml"
3
+ :code-js="codeJs"
4
+ header="_A_TABLE_GROUP_SIMPLE_MOBILE_SLOTS_HEADER_"
5
+ description="_A_TABLE_GROUP_SIMPLE_MOBILE_SLOTS_DESCRIPTION_"
6
+ props="is-simple-table"
7
+ :slots="['rowMobilePrepend', 'rowMobileAppend']"
8
+ )
9
+ div
10
+ a-table(
11
+ :columns="columns"
12
+ :data="data"
13
+ :is-simple-table="true"
14
+ key-id="id"
15
+ label="_A_TABLE_GROUP_SIMPLE_MOBILE_SLOTS_LABEL_"
16
+ )
17
+ template(
18
+ v-slot:rowMobilePrepend="{ row, rowIndex, isFooter }"
19
+ )
20
+ span(
21
+ style="width: 100px;"
22
+ ) Aloha
23
+
24
+ template(
25
+ v-slot:rowMobileAppend="{ row, rowIndex, isFooter }"
26
+ )
27
+ span(
28
+ style="width: 100px;"
29
+ ) Aloha
@@ -0,0 +1,2 @@
1
+ <template lang="pug" src="./PageTableSimpleMobileSlotsExample.pug"></template>
2
+ <script src="./PageTableSimpleMobileSlotsExample.js"></script>
@@ -0,0 +1,13 @@
1
+ export default function HtmlAPI() {
2
+ const codeHtml = `<a-table
3
+ :columns="columns"
4
+ :data="data"
5
+ label="_A_TABLE_GROUP_SIMPLE_LABEL_"
6
+ key-id="id"
7
+ >
8
+ </a-table>`;
9
+
10
+ return {
11
+ codeHtml,
12
+ };
13
+ }
@@ -0,0 +1,67 @@
1
+ export default function JsAPI() {
2
+ const codeJs = `import {
3
+ ref,
4
+ } from "vue";
5
+
6
+ import ATable from "aloha-vue/src/ATable/ATable";
7
+
8
+ export default {
9
+ name: "PageTableSimpleExample",
10
+ components: {
11
+ ATable,
12
+ },
13
+ setup() {
14
+ const columns = [
15
+ {
16
+ id: "column1",
17
+ keyLabel: "id",
18
+ label: "_A_TABLE_COLUMN_1_",
19
+ },
20
+ {
21
+ id: "column2",
22
+ keyLabel: "aloha",
23
+ label: "_A_TABLE_COLUMN_2_",
24
+ },
25
+ {
26
+ id: "column3",
27
+ keyLabel: "aloha",
28
+ label: "_A_TABLE_COLUMN_3_",
29
+ },
30
+ {
31
+ id: "column4",
32
+ keyLabel: "aloha",
33
+ label: "_A_TABLE_COLUMN_4_",
34
+ },
35
+ {
36
+ id: "column5",
37
+ keyLabel: "aloha",
38
+ label: "_A_TABLE_COLUMN_5_",
39
+ },
40
+ ];
41
+
42
+ const data = ref([]);
43
+
44
+ const setData = () => {
45
+ const DATA = [];
46
+ times(20, item => {
47
+ DATA.push({
48
+ id: item,
49
+ aloha: \`aloha \${ item }\`,
50
+ });
51
+ });
52
+ data.value = DATA;
53
+ };
54
+
55
+ setData();
56
+
57
+ return {
58
+ columns,
59
+ data,
60
+ };
61
+ },
62
+ };`;
63
+
64
+ return {
65
+ codeJs,
66
+ };
67
+ }
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.201",
17
+ "version": "1.2.203",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -174,6 +174,11 @@ export default {
174
174
  required: false,
175
175
  default: undefined,
176
176
  },
177
+ hasMobile: {
178
+ type: Boolean,
179
+ required: false,
180
+ default: true,
181
+ },
177
182
  hasScrollClass: {
178
183
  type: Boolean,
179
184
  required: false,
@@ -840,7 +845,7 @@ export default {
840
845
  return h("div", {
841
846
  ref: "tableGrandparentRef",
842
847
  class: ["a_table__grandparent", {
843
- a_table_mobile: !this.isSimpleTable && this.isMobile,
848
+ a_table_mobile: this.isMobile,
844
849
  a_table__grandparent_without_scroll: !this.hasScrollClass,
845
850
  }],
846
851
  }, [
@@ -91,6 +91,10 @@ export default {
91
91
  };
92
92
  },
93
93
  render() {
94
+ if (this.isMobile) {
95
+ return null;
96
+ }
97
+
94
98
  return h("div", {
95
99
  ref: "root",
96
100
  role: "rowgroup",
@@ -28,6 +28,12 @@ export default function LinkAPI(props) {
28
28
  const TO = cloneDeep(column.value.to);
29
29
  const PARAMS = TO.params || {};
30
30
  const QUERY = TO.query || {};
31
+ if (column.value.to.nameDynamic && !column.value.to.name) {
32
+ const NAME = get(row.value, column.value.to.nameDynamic);
33
+ if (NAME) {
34
+ TO.name = NAME;
35
+ }
36
+ }
31
37
  if (column.value.to.paramsDynamic) {
32
38
  let hasParamsDynamicError = false;
33
39
  forEach(column.value.to.paramsDynamic, (value, key) => {
@@ -255,9 +255,27 @@ export default {
255
255
  }, this.$slots);
256
256
 
257
257
  const CHILDREN = this.isMobile ?
258
- h("dl", {
259
- class: "a_table_mobile__dl",
260
- }, tds) :
258
+ h("div", {
259
+ class: "a_table_mobile__dl__wrapper",
260
+ }, [
261
+ this.$slots.rowMobilePrepend ?
262
+ this.$slots.rowMobilePrepend({
263
+ row: this.row,
264
+ rowIndex: this.rowIndex,
265
+ isFooter: this.isFooter,
266
+ }) :
267
+ "",
268
+ h("dl", {
269
+ class: "a_table_mobile__dl",
270
+ }, tds),
271
+ this.$slots.rowMobileAppend ?
272
+ this.$slots.rowMobileAppend({
273
+ row: this.row,
274
+ rowIndex: this.rowIndex,
275
+ isFooter: this.isFooter,
276
+ }) :
277
+ "",
278
+ ]) :
261
279
  tds;
262
280
 
263
281
  return [
@@ -144,6 +144,12 @@ export default function RowActionsAPI(props) {
144
144
  const TO = cloneDeep(rowAction.to);
145
145
  const PARAMS = TO.params || {};
146
146
  const QUERY = TO.query || {};
147
+ if (rowAction.to.nameDynamic && !rowAction.to.name) {
148
+ const NAME = get(row.value, rowAction.to.nameDynamic);
149
+ if (NAME) {
150
+ TO.name = NAME;
151
+ }
152
+ }
147
153
  if (rowAction.to.paramsDynamic) {
148
154
  let hasParamsDynamicError = false;
149
155
  forEach(rowAction.to.paramsDynamic, (value, key) => {
@@ -6,6 +6,7 @@ import {
6
6
  import AMobileAPI from "../../compositionAPI/AMobileAPI";
7
7
 
8
8
  export default function SimpleTableAPI(props) {
9
+ const hasMobile = toRef(props, "hasMobile");
9
10
  const isActionColumnVisible = toRef(props, "isActionColumnVisible");
10
11
  const isActionIconVisible = toRef(props, "isActionColumnVisible");
11
12
  const isColumnsDnd = toRef(props, "isColumnsDnd");
@@ -37,8 +38,11 @@ export default function SimpleTableAPI(props) {
37
38
  });
38
39
 
39
40
  const isMobile = computed(() => {
40
- return !!(!isSimpleTable.value &&
41
- !isTree.value &&
41
+ if (!hasMobile.value) {
42
+ return false;
43
+ }
44
+
45
+ return !!(!isTree.value &&
42
46
  isMobileWidth.value);
43
47
  });
44
48
 
@@ -517,7 +517,14 @@
517
517
  }
518
518
  }
519
519
 
520
+ .a_table_mobile__dl__wrapper {
521
+ display: flex;
522
+ width: 100%;
523
+ align-items: center;
524
+ }
525
+
520
526
  .a_table_mobile__dl {
527
+ width: 100%;
521
528
  display: flex;
522
529
  flex-wrap: wrap;
523
530
  margin: 0;
@@ -620,6 +627,13 @@
620
627
  border-right: var(--a_table_th_border_vertical_width) solid var(--a_table_th_border_vertical_color);
621
628
  }
622
629
  }
630
+ .a_table_mobile {
631
+ .a_table_bordered {
632
+ .a_table__body__row {
633
+ border-left: var(--a_table_td_border_vertical_width) solid var(--a_table_td_border_vertical_color);
634
+ }
635
+ }
636
+ }
623
637
  .a_table_bordered,
624
638
  .a_table_inner_bordered {
625
639
  .a_table__td {
@@ -646,18 +660,21 @@
646
660
  border-bottom: var(--a_table_th_border_horizontal_width) solid var(--a_table_th_border_horizontal_color);
647
661
  }
648
662
  }
649
- .a_table_simple.a_table_bordered {
650
- .a_table__td:last-child {
651
- border-right: var(--a_table_td_border_vertical_width) solid var(--a_table_td_border_vertical_color);
652
- }
653
- .a_table__th:last-child {
654
- border-right: var(--a_table_td_border_vertical_width) solid var(--a_table_td_border_vertical_color);
655
- }
656
- .a_table__body__row,
657
- .a_table__head__row {
658
- border-right: none;
663
+ .a_table__grandparent:not(.a_table_mobile) {
664
+ .a_table_simple.a_table_bordered {
665
+ .a_table__td:last-child {
666
+ border-right: var(--a_table_td_border_vertical_width) solid var(--a_table_td_border_vertical_color);
667
+ }
668
+ .a_table__th:last-child {
669
+ border-right: var(--a_table_td_border_vertical_width) solid var(--a_table_td_border_vertical_color);
670
+ }
671
+ .a_table__body__row,
672
+ .a_table__head__row {
673
+ border-right: none;
674
+ }
659
675
  }
660
676
  }
677
+
661
678
  .a_table__grandparent_without_scroll {
662
679
  .a_table__parent {
663
680
  overflow-x: unset;