@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
- {{#t.body
49
- canExpand=hasExpandedColumns
50
- onRowClick=(action 'expand')
51
- expandOnClick=false
52
- multiRowExpansion=false
53
- rowComponent=(component 'fw-expandable-row')
54
- canSelect=false
55
- as |body|
56
- }}
57
- {{#if table.hasExpandedColumns}}
58
- {{#body.expanded-row as |row|}}
59
- {{fw-table-expanded-rows tableActions=tableActions table=table row=row}}
60
- {{/body.expanded-row}}
61
- {{/if}}
62
-
63
- {{#if table.isEmpty}}
64
- {{#body.no-data}}
65
- {{empty}}
66
- {{/body.no-data}}
67
- {{/if}}
68
- {{/t.body}}
69
- {{/light-table}}
70
- {{/if}}
71
- </section>
72
- {{#if (and hasBlock showFooter)}}
73
- <footer class="panel-footer clearfix">
74
- {{yield (action 'export') false}}
75
- </footer>
76
- {{/if}}
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
@@ -5,6 +5,5 @@ module.exports = {
5
5
  name: '@bennerinformatics/ember-fw-table',
6
6
  included() {
7
7
  this._super.included.apply(this, arguments);
8
- },
9
- isDeveloppingAddon: () => true
8
+ }
10
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bennerinformatics/ember-fw-table",
3
- "version": "2.0.19",
3
+ "version": "2.0.20",
4
4
  "description": "Additional resources related to tables for the Ember FW App System.",
5
5
  "keywords": [
6
6
  "ember-addon",