@bennerinformatics/ember-fw-table 2.0.14 → 2.0.17

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.
@@ -0,0 +1,9 @@
1
+ {{#if (eq value 2)}}
2
+ <span class="text-success" title="Has Permission"><i class="fas fa-check"></i></span>
3
+ {{/if}}
4
+ {{#if (eq value 1)}}
5
+ <span class="text-primary" title="Permission Determined By Access Control"><i class="fas fa-lock"></i></span>
6
+ {{/if}}
7
+ {{#if (eq value 0)}}
8
+ <span class="text-danger" title="Doesn't Have Permission"><i class="fas fa-times"></i></span>
9
+ {{/if}}
@@ -1,11 +1,12 @@
1
- {{fw-fullscreen-modal "confirm-choice"
2
- size="md"
3
- model=(hash
4
- confirmButtonText="Delete"
5
- confirmButtonStyle="danger"
6
- onconfirm=(action 'deleteModel')
7
- message=_message
8
- )
9
- close=close
10
- scrollTop=scrollTop
11
- }}
1
+ {{fw-fullscreen-modal "confirm-choice"
2
+ size="md"
3
+ model=(hash
4
+ confirmButtonText="Delete"
5
+ confirmButtonStyle="danger"
6
+ confirmButtonIcon="far fa-trash-alt"
7
+ onconfirm=(action 'deleteModel')
8
+ message=_message
9
+ )
10
+ close=close
11
+ scrollTop=scrollTop
12
+ }}
@@ -1,73 +1,74 @@
1
- {{!-- Search buttons, whole search component is in block --}}
2
- {{yield (hash
3
- search=(action 'search')
4
- export=(action 'export')
5
- ) false}}
6
-
7
- {{!-- Table contents, show loading spinner if in progress --}}
8
- <div class={{tableWrapperClass}}>
9
- {{#if searchingTable}}
10
- {{fw-loading-spinner}}
11
- {{else if pageEntries}}
12
- {{!-- Page numbers --}}
13
- {{#if showPages}}
14
- <div class="text-center" style="overflow:auto">
15
- {{page-numbers
16
- content=(hash)
17
- showFL=true
18
- currentPage=page
19
- numPagesToShow=maxPageButtons
20
- totalPages=totalPages
21
- action=(action 'setPage')
22
- }}
23
- </div>
24
- {{/if}}
25
- {{!-- If we are searching a page, show its loading spinner --}}
26
- {{#if pagesSearching}}
27
- {{fw-loading-spinner}}
28
- {{else}}
29
- {{!-- If given a column getter, use that for columns --}}
30
- {{#if tableColumns}}
31
- {{fw-table-sortable
32
- filteredEntries
33
- tableColumns
34
- title=fullTableTitle
35
- class='sticky-table'
36
- defaultSort=(array tableSortKey defaultSortKey)
37
- responsive=true
38
- empty=emptyText
39
- hideEmpty=hideEmpty
40
- canExport=(if showExport 'Export Page' false)
41
- deleteTable=(action deletePage)
42
- deleteOverrideTitle='Delete Page'
43
- onSort=(action 'sortColumn')
44
- tableActions=tableActions
45
- }}
46
- {{else}}
47
- {{!-- Let the user provide the table --}}
48
- {{yield (hash
49
- sort=(action 'sortColumn')
50
- ) (hash
51
- title=fullTableTitle
52
- suffix=tableSuffix
53
- entries=filteredEntries
54
- sortKey=tableSortKey
55
- )}}
56
- {{/if}}
57
-
58
- {{!-- Second page numbers --}}
59
- {{#if showPages}}
60
- <div class="text-center" style="overflow:auto">
61
- {{page-numbers
62
- content=(hash)
63
- showFL=true
64
- currentPage=page
65
- numPagesToShow=maxPageButtons
66
- totalPages=totalPages
67
- action=(action 'setPage')
68
- }}
69
- </div>
70
- {{/if}}
71
- {{/if}}
72
- {{/if}}
73
- </div>
1
+ {{!-- Search buttons, whole search component is in block --}}
2
+ {{yield (hash
3
+ search=(action 'search')
4
+ export=(action 'export')
5
+ ) false}}
6
+
7
+ {{!-- Table contents, show loading spinner if in progress --}}
8
+ <div class={{tableWrapperClass}}>
9
+ {{#if searchingTable}}
10
+ {{fw-loading-spinner}}
11
+ {{else if pageEntries}}
12
+ {{!-- Page numbers --}}
13
+ {{#if showPages}}
14
+ <div class="text-center" style="overflow:auto">
15
+ {{page-numbers
16
+ content=(hash)
17
+ showFL=true
18
+ currentPage=page
19
+ numPagesToShow=maxPageButtons
20
+ totalPages=totalPages
21
+ action=(action 'setPage')
22
+ }}
23
+ </div>
24
+ {{/if}}
25
+ {{!-- If we are searching a page, show its loading spinner --}}
26
+ {{#if pagesSearching}}
27
+ {{fw-loading-spinner}}
28
+ {{else}}
29
+ {{!-- If given a column getter, use that for columns --}}
30
+ {{#if tableColumns}}
31
+ {{fw-table-sortable
32
+ filteredEntries
33
+ tableColumns
34
+ title=fullTableTitle
35
+ class='sticky-table'
36
+ defaultSort=(array tableSortKey defaultSortKey)
37
+ responsive=true
38
+ empty=emptyText
39
+ hideEmpty=hideEmpty
40
+ canExport=(if showExport 'Export Page' false)
41
+ deleteTable=deletePage
42
+ deleteTablePermission=deletePagePermission
43
+ deleteOverrideTitle='Delete Page'
44
+ onSort=(action 'sortColumn')
45
+ tableActions=tableActions
46
+ }}
47
+ {{else}}
48
+ {{!-- Let the user provide the table --}}
49
+ {{yield (hash
50
+ sort=(action 'sortColumn')
51
+ ) (hash
52
+ title=fullTableTitle
53
+ suffix=tableSuffix
54
+ entries=filteredEntries
55
+ sortKey=tableSortKey
56
+ )}}
57
+ {{/if}}
58
+
59
+ {{!-- Second page numbers --}}
60
+ {{#if showPages}}
61
+ <div class="text-center" style="overflow:auto">
62
+ {{page-numbers
63
+ content=(hash)
64
+ showFL=true
65
+ currentPage=page
66
+ numPagesToShow=maxPageButtons
67
+ totalPages=totalPages
68
+ action=(action 'setPage')
69
+ }}
70
+ </div>
71
+ {{/if}}
72
+ {{/if}}
73
+ {{/if}}
74
+ </div>
@@ -1,23 +1,23 @@
1
- {{!-- If column has a hideLabel set to true, just spit back the value of whatever the user gave it --}}
2
- {{#if column.hideLabel}}
3
- {{#if column.cellComponent}}
4
- {{!-- Pass in all the normal component values, but add an extra boolean so they know it is a hidden row --}}
5
- {{component column.cellComponent tableActions=tableActions table=table column=column row=row value=value rawValue=rawValue isExpandedRow=true}}
6
- {{else}}
7
- {{value}}
8
- {{/if}}
9
- {{else}}
10
- {{!-- Only print the cell if the column label is defined--}}
11
- {{#if column.label}}
12
- <dt class="{{column.classNames}}" title="{{column.label}}">{{column.label}}:</dt>
13
- <dd class="{{column.cellClassNames}}">
14
- {{!-- If the cell has a custom component, use that --}}
15
- {{#if column.cellComponent}}
16
- {{!-- Pass in all the normal component values, but add an extra boolean so they know it is a hidden row --}}
17
- {{component column.cellComponent tableActions=tableActions table=table column=column row=row value=value rawValue=rawValue isExpandedRow=true}}
18
- {{else}}
19
- {{value}}
20
- {{/if}}
21
- </dd>
22
- {{/if}}
23
- {{/if}}
1
+ {{!-- If column has a hideLabel set to true, just spit back the value of whatever the user gave it --}}
2
+ {{#if column.hideLabel}}
3
+ {{#if column.cellComponent}}
4
+ {{!-- Pass in all the normal component values, but add an extra boolean so they know it is a hidden row --}}
5
+ {{component column.cellComponent tableActions=tableActions table=table column=column row=row value=value rawValue=rawValue isExpandedRow=true}}
6
+ {{else}}
7
+ {{value}}
8
+ {{/if}}
9
+ {{else}}
10
+ {{!-- Only print the cell if the column label is defined--}}
11
+ {{#if column.label}}
12
+ <dt class="{{column.classNames}}" title="{{column.label}}">{{column.label}}:</dt>
13
+ <dd class="{{column.cellClassNames}}">
14
+ {{!-- If the cell has a custom component, use that --}}
15
+ {{#if column.cellComponent}}
16
+ {{!-- Pass in all the normal component values, but add an extra boolean so they know it is a hidden row --}}
17
+ {{component column.cellComponent tableActions=tableActions table=table column=column row=row value=value rawValue=rawValue isExpandedRow=true}}
18
+ {{else}}
19
+ {{value}}
20
+ {{/if}}
21
+ </dd>
22
+ {{/if}}
23
+ {{/if}}
@@ -1,72 +1,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 canExport}}
8
- <button class="btn btn-xs btn-primary pull-right" {{action 'export'}}>
9
- <i class="far fa-file-excel"/>
10
- {{exportTitle}}
11
- </button>
12
- {{/if}}
13
- {{#if deleteTable}}
14
- <button class="btn btn-xs btn-danger pull-right" {{action deleteTable data}}>
15
- <i class="far fa-trash-alt"/>
16
- {{deleteTitle}}
17
- </button>
18
- {{/if}}
19
- {{/if}}
20
- <div class="clearfix"/>
21
- </header>
22
- {{/if}}
23
- <section class="panel-body table-body">
24
- {{#if (and table.isEmpty (not headerEmpty))}}
25
- {{empty}}
26
- {{else}}
27
- {{#light-table
28
- table
29
- height=fixedHeight
30
- tableClassNames=(concat "table table-striped table-bordered " tableClassNames)
31
- tableActions=tableActions
32
- responsive=responsive
33
- breakpoints=breakpoints
34
- as |t|
35
- }}
36
- {{t.head
37
- onColumnClick=(action 'sort')
38
- iconAscending='fas fa-sort-up'
39
- iconDescending='fas fa-sort-down'
40
- iconSortable='fas fa-sort'
41
- sortOnClick=false
42
- fixed=(if fixedHeight true false)
43
- }}
44
- {{#t.body
45
- canExpand=hasExpandedColumns
46
- onRowClick=(action 'expand')
47
- expandOnClick=false
48
- multiRowExpansion=false
49
- rowComponent=(component 'fw-expandable-row')
50
- canSelect=false
51
- as |body|
52
- }}
53
- {{#if table.hasExpandedColumns}}
54
- {{#body.expanded-row as |row|}}
55
- {{fw-table-expanded-rows tableActions=tableActions table=table row=row}}
56
- {{/body.expanded-row}}
57
- {{/if}}
58
-
59
- {{#if table.isEmpty}}
60
- {{#body.no-data}}
61
- {{empty}}
62
- {{/body.no-data}}
63
- {{/if}}
64
- {{/t.body}}
65
- {{/light-table}}
66
- {{/if}}
67
- </section>
68
- {{#if (and hasBlock showFooter)}}
69
- <footer class="panel-footer clearfix">
70
- {{yield (action 'export') false}}
71
- </footer>
72
- {{/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='far fa-trash-alt'
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="far 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='fas fa-sort-up'
43
+ iconDescending='fas fa-sort-down'
44
+ iconSortable='fas 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}}
@@ -0,0 +1 @@
1
+ export {default} from '@bennerinformatics/ember-fw-table/components/fw-cell-permission-icon';
package/package.json CHANGED
@@ -1,63 +1,63 @@
1
- {
2
- "name": "@bennerinformatics/ember-fw-table",
3
- "version": "2.0.14",
4
- "description": "Additional resources related to tables for the Ember FW App System.",
5
- "keywords": [
6
- "ember-addon",
7
- "fw"
8
- ],
9
- "license": "MIT",
10
- "author": "David Burnett <djburnett@olivet.edu>",
11
- "directories": {
12
- "doc": "doc",
13
- "test": "tests"
14
- },
15
- "repository": "",
16
- "scripts": {
17
- "build": "ember build",
18
- "start": "ember server",
19
- "test": "npm run lint && ember try:each",
20
- "lint": "ember test --launch phantomjs --filter=\"ESLint\""
21
- },
22
- "dependencies": {
23
- "ember-cli-babel": "~7.10.0",
24
- "ember-cli-htmlbars": "^3.1.0",
25
- "ember-light-table": "^1.13.2",
26
- "ember-papaparse": "^1.0.0",
27
- "ember-truth-helpers": "^2.1.0",
28
- "node-sass": "^4.12.0",
29
- "papaparse": "^5.0.2"
30
- },
31
- "devDependencies": {
32
- "@bennerinformatics/ember-fw": "^2.0.6",
33
- "broccoli-asset-rev": "^3.0.0",
34
- "ember-ajax": "^5.0.0",
35
- "ember-cli": "~3.10.0",
36
- "ember-cli-app-version": "^3.2.0",
37
- "ember-cli-dependency-checker": "^3.2.0",
38
- "ember-cli-eslint": "^5.1.0",
39
- "ember-cli-htmlbars-inline-precompile": "^2.1.0",
40
- "ember-cli-inject-live-reload": "^2.0.1",
41
- "ember-cli-qunit": "^4.4.0",
42
- "ember-cli-shims": "^1.2.0",
43
- "ember-cli-sri": "^2.1.0",
44
- "ember-cli-uglify": "^3.0.0",
45
- "ember-disable-prototype-extensions": "^1.1.3",
46
- "ember-export-application-global": "^2.0.0",
47
- "ember-load-initializers": "^2.0.0",
48
- "ember-resolver": "^5.2.1",
49
- "ember-responsive": "^3.0.5",
50
- "ember-sortable": "1.12.9",
51
- "ember-source": "~3.10.0",
52
- "eslint-plugin-ember": "^6.9.1",
53
- "eslint-plugin-ember-suave": "^1.0.0",
54
- "loader.js": "^4.7.0",
55
- "moment": "^2.24.0"
56
- },
57
- "engines": {
58
- "node": ">= 0.10.0"
59
- },
60
- "ember-addon": {
61
- "configPath": "tests/dummy/config"
62
- }
63
- }
1
+ {
2
+ "name": "@bennerinformatics/ember-fw-table",
3
+ "version": "2.0.17",
4
+ "description": "Additional resources related to tables for the Ember FW App System.",
5
+ "keywords": [
6
+ "ember-addon",
7
+ "fw"
8
+ ],
9
+ "license": "MIT",
10
+ "author": "David Burnett <djburnett@olivet.edu>",
11
+ "directories": {
12
+ "doc": "doc",
13
+ "test": "tests"
14
+ },
15
+ "repository": "",
16
+ "scripts": {
17
+ "build": "ember build",
18
+ "start": "ember server",
19
+ "test": "npm run lint && ember try:each",
20
+ "lint": "ember test --launch phantomjs --filter=\"ESLint\""
21
+ },
22
+ "dependencies": {
23
+ "ember-cli-babel": "~7.10.0",
24
+ "ember-cli-htmlbars": "^3.1.0",
25
+ "ember-light-table": "^1.13.2",
26
+ "ember-papaparse": "^1.0.0",
27
+ "ember-truth-helpers": "^2.1.0",
28
+ "node-sass": "^4.12.0",
29
+ "papaparse": "^5.0.2"
30
+ },
31
+ "devDependencies": {
32
+ "@bennerinformatics/ember-fw": "^2.0.12",
33
+ "broccoli-asset-rev": "^3.0.0",
34
+ "ember-ajax": "^5.0.0",
35
+ "ember-cli": "~3.10.0",
36
+ "ember-cli-app-version": "^3.2.0",
37
+ "ember-cli-dependency-checker": "^3.2.0",
38
+ "ember-cli-eslint": "^5.1.0",
39
+ "ember-cli-htmlbars-inline-precompile": "^2.1.0",
40
+ "ember-cli-inject-live-reload": "^2.0.1",
41
+ "ember-cli-qunit": "^4.4.0",
42
+ "ember-cli-shims": "^1.2.0",
43
+ "ember-cli-sri": "^2.1.0",
44
+ "ember-cli-uglify": "^3.0.0",
45
+ "ember-disable-prototype-extensions": "^1.1.3",
46
+ "ember-export-application-global": "^2.0.0",
47
+ "ember-load-initializers": "^2.0.0",
48
+ "ember-resolver": "^5.2.1",
49
+ "ember-responsive": "^3.0.5",
50
+ "ember-sortable": "1.12.9",
51
+ "ember-source": "~3.10.0",
52
+ "eslint-plugin-ember": "^6.9.1",
53
+ "eslint-plugin-ember-suave": "^1.0.0",
54
+ "loader.js": "^4.7.0",
55
+ "moment": "^2.24.0"
56
+ },
57
+ "engines": {
58
+ "node": ">= 0.10.0"
59
+ },
60
+ "ember-addon": {
61
+ "configPath": "tests/dummy/config"
62
+ }
63
+ }