@bennerinformatics/ember-fw-table 2.0.19 → 2.0.20
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.
|
@@ -129,6 +129,15 @@ const TableSortable = Component.extend({
|
|
|
129
129
|
*/
|
|
130
130
|
responsive: false,
|
|
131
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Makes the headers able to be dragged to resize. You will still need to put `resizable: true` in each column you want to be able to resize.
|
|
134
|
+
* @public
|
|
135
|
+
* @property resizeOnDrag
|
|
136
|
+
* @type {Boolean}
|
|
137
|
+
* @default false
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
resizeOnDrag: false,
|
|
132
141
|
/**
|
|
133
142
|
* Allows exporting the current contents of the table using an export button. Note that this sets a default title of "Table", so setting a separate one is recommended
|
|
134
143
|
*
|
|
@@ -1,76 +1,77 @@
|
|
|
1
|
-
{{#if (or (and hasBlock showHeader) title canExport)}}
|
|
2
|
-
<header class="panel-heading">
|
|
3
|
-
{{#if (and hasBlock showHeader)}}
|
|
4
|
-
{{yield (action 'export') true}}
|
|
5
|
-
{{else}}
|
|
6
|
-
<strong class="panel-title">{{or title 'Table'}}</strong>
|
|
7
|
-
{{#if (and deleteTable deleteTablePermission)}}
|
|
8
|
-
{{fw-promise-button
|
|
9
|
-
class="btn btn-xs pull-right"
|
|
10
|
-
buttonIcon='fa-regular fa-trash-can'
|
|
11
|
-
buttonText=deleteTitle
|
|
12
|
-
buttonStyle='danger'
|
|
13
|
-
promise=(action deleteTable data)
|
|
14
|
-
type='submit'
|
|
15
|
-
}}
|
|
16
|
-
{{/if}}
|
|
17
|
-
{{#if canExport}}
|
|
18
|
-
<button class="btn btn-xs btn-primary pull-right" {{action 'export'}}>
|
|
19
|
-
<i class="fa-regular fa-file-excel"/>
|
|
20
|
-
{{exportTitle}}
|
|
21
|
-
</button>
|
|
22
|
-
{{/if}}
|
|
23
|
-
{{/if}}
|
|
24
|
-
<div class="clearfix"/>
|
|
25
|
-
</header>
|
|
26
|
-
{{/if}}
|
|
27
|
-
<section class="panel-body table-body">
|
|
28
|
-
{{#if (and table.isEmpty (not headerEmpty))}}
|
|
29
|
-
{{empty}}
|
|
30
|
-
{{else}}
|
|
31
|
-
{{#light-table
|
|
32
|
-
table
|
|
33
|
-
height=fixedHeight
|
|
34
|
-
tableClassNames=(concat "table table-striped table-bordered " tableClassNames)
|
|
35
|
-
tableActions=tableActions
|
|
36
|
-
responsive=responsive
|
|
37
|
-
breakpoints=breakpoints
|
|
38
|
-
as |t|
|
|
39
|
-
}}
|
|
40
|
-
{{t.head
|
|
41
|
-
onColumnClick=(action 'sort')
|
|
42
|
-
iconAscending='fa-solid fa-sort-up'
|
|
43
|
-
iconDescending='fa-solid fa-sort-down'
|
|
44
|
-
iconSortable='fa-solid fa-sort'
|
|
45
|
-
sortOnClick=false
|
|
46
|
-
fixed=(if fixedHeight true false)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
1
|
+
{{#if (or (and hasBlock showHeader) title canExport)}}
|
|
2
|
+
<header class="panel-heading">
|
|
3
|
+
{{#if (and hasBlock showHeader)}}
|
|
4
|
+
{{yield (action 'export') true}}
|
|
5
|
+
{{else}}
|
|
6
|
+
<strong class="panel-title">{{or title 'Table'}}</strong>
|
|
7
|
+
{{#if (and deleteTable deleteTablePermission)}}
|
|
8
|
+
{{fw-promise-button
|
|
9
|
+
class="btn btn-xs pull-right"
|
|
10
|
+
buttonIcon='fa-regular fa-trash-can'
|
|
11
|
+
buttonText=deleteTitle
|
|
12
|
+
buttonStyle='danger'
|
|
13
|
+
promise=(action deleteTable data)
|
|
14
|
+
type='submit'
|
|
15
|
+
}}
|
|
16
|
+
{{/if}}
|
|
17
|
+
{{#if canExport}}
|
|
18
|
+
<button class="btn btn-xs btn-primary pull-right" {{action 'export'}}>
|
|
19
|
+
<i class="fa-regular fa-file-excel"/>
|
|
20
|
+
{{exportTitle}}
|
|
21
|
+
</button>
|
|
22
|
+
{{/if}}
|
|
23
|
+
{{/if}}
|
|
24
|
+
<div class="clearfix"/>
|
|
25
|
+
</header>
|
|
26
|
+
{{/if}}
|
|
27
|
+
<section class="panel-body table-body">
|
|
28
|
+
{{#if (and table.isEmpty (not headerEmpty))}}
|
|
29
|
+
{{empty}}
|
|
30
|
+
{{else}}
|
|
31
|
+
{{#light-table
|
|
32
|
+
table
|
|
33
|
+
height=fixedHeight
|
|
34
|
+
tableClassNames=(concat "table table-striped table-bordered " tableClassNames)
|
|
35
|
+
tableActions=tableActions
|
|
36
|
+
responsive=responsive
|
|
37
|
+
breakpoints=breakpoints
|
|
38
|
+
as |t|
|
|
39
|
+
}}
|
|
40
|
+
{{t.head
|
|
41
|
+
onColumnClick=(action 'sort')
|
|
42
|
+
iconAscending='fa-solid fa-sort-up'
|
|
43
|
+
iconDescending='fa-solid fa-sort-down'
|
|
44
|
+
iconSortable='fa-solid fa-sort'
|
|
45
|
+
sortOnClick=false
|
|
46
|
+
fixed=(if fixedHeight true false)
|
|
47
|
+
resizeOnDrag=resizeOnDrag
|
|
48
|
+
}}
|
|
49
|
+
{{#t.body
|
|
50
|
+
canExpand=hasExpandedColumns
|
|
51
|
+
onRowClick=(action 'expand')
|
|
52
|
+
expandOnClick=false
|
|
53
|
+
multiRowExpansion=false
|
|
54
|
+
rowComponent=(component 'fw-expandable-row')
|
|
55
|
+
canSelect=false
|
|
56
|
+
as |body|
|
|
57
|
+
}}
|
|
58
|
+
{{#if table.hasExpandedColumns}}
|
|
59
|
+
{{#body.expanded-row as |row|}}
|
|
60
|
+
{{fw-table-expanded-rows tableActions=tableActions table=table row=row}}
|
|
61
|
+
{{/body.expanded-row}}
|
|
62
|
+
{{/if}}
|
|
63
|
+
|
|
64
|
+
{{#if table.isEmpty}}
|
|
65
|
+
{{#body.no-data}}
|
|
66
|
+
{{empty}}
|
|
67
|
+
{{/body.no-data}}
|
|
68
|
+
{{/if}}
|
|
69
|
+
{{/t.body}}
|
|
70
|
+
{{/light-table}}
|
|
71
|
+
{{/if}}
|
|
72
|
+
</section>
|
|
73
|
+
{{#if (and hasBlock showFooter)}}
|
|
74
|
+
<footer class="panel-footer clearfix">
|
|
75
|
+
{{yield (action 'export') false}}
|
|
76
|
+
</footer>
|
|
77
|
+
{{/if}}
|
package/index.js
CHANGED