@bennerinformatics/ember-fw-table 2.1.4 → 2.1.6
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/addon/components/fw-table-resort.js +18 -4
- package/addon/components/fw-table-sortable.js +23 -0
- package/addon/templates/components/fw-table-resort.hbs +3 -0
- package/addon/templates/components/fw-table-sortable.hbs +10 -1
- package/docs/api.js +61 -0
- package/docs/assets/css/custom.css +82 -0
- package/docs/assets/css/external-small.png +0 -0
- package/docs/assets/css/logo.png +0 -0
- package/docs/assets/css/main.css +793 -0
- package/docs/assets/css/theme.css +547 -0
- package/docs/assets/favicon.ico +0 -0
- package/docs/assets/icons/android-icon-144x144.png +0 -0
- package/docs/assets/icons/android-icon-192x192.png +0 -0
- package/docs/assets/icons/android-icon-36x36.png +0 -0
- package/docs/assets/icons/android-icon-48x48.png +0 -0
- package/docs/assets/icons/android-icon-72x72.png +0 -0
- package/docs/assets/icons/android-icon-96x96.png +0 -0
- package/docs/assets/icons/apple-icon-114x114.png +0 -0
- package/docs/assets/icons/apple-icon-120x120.png +0 -0
- package/docs/assets/icons/apple-icon-144x144.png +0 -0
- package/docs/assets/icons/apple-icon-152x152.png +0 -0
- package/docs/assets/icons/apple-icon-180x180.png +0 -0
- package/docs/assets/icons/apple-icon-57x57.png +0 -0
- package/docs/assets/icons/apple-icon-60x60.png +0 -0
- package/docs/assets/icons/apple-icon-72x72.png +0 -0
- package/docs/assets/icons/apple-icon-76x76.png +0 -0
- package/docs/assets/icons/apple-icon-precomposed.png +0 -0
- package/docs/assets/icons/apple-icon.png +0 -0
- package/docs/assets/icons/browserconfig.xml +2 -0
- package/docs/assets/icons/favicon-16x16.png +0 -0
- package/docs/assets/icons/favicon-32x32.png +0 -0
- package/docs/assets/icons/favicon-96x96.png +0 -0
- package/docs/assets/icons/favicon.ico +0 -0
- package/docs/assets/icons/manifest.json +41 -0
- package/docs/assets/icons/ms-icon-144x144.png +0 -0
- package/docs/assets/icons/ms-icon-150x150.png +0 -0
- package/docs/assets/icons/ms-icon-310x310.png +0 -0
- package/docs/assets/icons/ms-icon-70x70.png +0 -0
- package/docs/assets/img/ember-logo.png +0 -0
- package/docs/assets/img/fw-logo.png +0 -0
- package/docs/assets/img/spinner.gif +0 -0
- package/docs/assets/index.html +10 -0
- package/docs/assets/js/api-filter.js +56 -0
- package/docs/assets/js/api-list.js +255 -0
- package/docs/assets/js/api-search.js +98 -0
- package/docs/assets/js/apidocs.js +376 -0
- package/docs/assets/js/yui-prettify.js +17 -0
- package/docs/assets/js/yuidoc-bootstrap.js +274 -0
- package/docs/assets/vendor/bootstrap/css/bootstrap.css +6760 -0
- package/docs/assets/vendor/bootstrap/css/bootstrap.min.css +6 -0
- package/docs/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot +0 -0
- package/docs/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.svg +288 -0
- package/docs/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/docs/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff +0 -0
- package/docs/assets/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/docs/assets/vendor/bootstrap/img/glyphicons-halflings-white.png +0 -0
- package/docs/assets/vendor/bootstrap/img/glyphicons-halflings.png +0 -0
- package/docs/assets/vendor/bootstrap/js/bootstrap.js +2363 -0
- package/docs/assets/vendor/bootstrap/js/bootstrap.min.js +7 -0
- package/docs/assets/vendor/font-awesome/css/font-awesome.css +2199 -0
- package/docs/assets/vendor/font-awesome/css/font-awesome.min.css +4 -0
- package/docs/assets/vendor/font-awesome/fonts/FontAwesome.otf +0 -0
- package/docs/assets/vendor/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/docs/assets/vendor/font-awesome/fonts/fontawesome-webfont.svg +685 -0
- package/docs/assets/vendor/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/docs/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/docs/assets/vendor/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/docs/assets/vendor/github-slugger/slugger.js +59 -0
- package/docs/assets/vendor/jquery/jquery.min.js +6 -0
- package/docs/assets/vendor/jquery-ui/jquery-ui.min.js +6 -0
- package/docs/assets/vendor/prettify/CHANGES.html +130 -0
- package/docs/assets/vendor/prettify/COPYING +202 -0
- package/docs/assets/vendor/prettify/README.html +203 -0
- package/docs/assets/vendor/prettify/prettify-min.css +1 -0
- package/docs/assets/vendor/prettify/prettify-min.js +1 -0
- package/docs/classes/BaseCells.html +484 -0
- package/docs/classes/Export.html +457 -0
- package/docs/classes/Format.html +577 -0
- package/docs/classes/FwCellAction.html +312 -0
- package/docs/classes/FwCellBoolean.html +311 -0
- package/docs/classes/FwCellNullable.html +312 -0
- package/docs/classes/FwCellPermissionIcon.html +321 -0
- package/docs/classes/FwColumnSortable.html +358 -0
- package/docs/classes/FwColumnTitle.html +314 -0
- package/docs/classes/FwDeleteModal.html +485 -0
- package/docs/classes/FwExpandableRow.html +307 -0
- package/docs/classes/FwPaginationWrapper.html +2129 -0
- package/docs/classes/FwRowToggle.html +355 -0
- package/docs/classes/FwRowToggleIndex.html +312 -0
- package/docs/classes/FwTableExpandedRow.html +307 -0
- package/docs/classes/FwTableResort.html +827 -0
- package/docs/classes/FwTableSortable.html +1293 -0
- package/docs/classes/Row.html +352 -0
- package/docs/classes/Table.html +672 -0
- package/docs/classes/TableUtil.html +410 -0
- package/docs/classes/index.html +10 -0
- package/docs/data.json +2324 -0
- package/docs/elements/index.html +10 -0
- package/docs/files/addon_classes_Row.js.html +318 -0
- package/docs/files/addon_classes_Table.js.html +390 -0
- package/docs/files/addon_components_fw-cell-action.js.html +257 -0
- package/docs/files/addon_components_fw-cell-boolean.js.html +251 -0
- package/docs/files/addon_components_fw-cell-nullable.js.html +253 -0
- package/docs/files/addon_components_fw-cell-permission-icon.js.html +266 -0
- package/docs/files/addon_components_fw-column-sortable.js.html +281 -0
- package/docs/files/addon_components_fw-column-title.js.html +259 -0
- package/docs/files/addon_components_fw-delete-modal.js.html +318 -0
- package/docs/files/addon_components_fw-expandable-row.js.html +248 -0
- package/docs/files/addon_components_fw-pagination-wrapper.js.html +838 -0
- package/docs/files/addon_components_fw-row-toggle-index.js.html +252 -0
- package/docs/files/addon_components_fw-row-toggle.js.html +270 -0
- package/docs/files/addon_components_fw-table-expanded-row.js.html +261 -0
- package/docs/files/addon_components_fw-table-expanded-rows.js.html +263 -0
- package/docs/files/addon_components_fw-table-resort.js.html +457 -0
- package/docs/files/addon_components_fw-table-sortable.js.html +663 -0
- package/docs/files/addon_documentation.js.html +301 -0
- package/docs/files/addon_initializers_responsive.js.html +253 -0
- package/docs/files/addon_utils_base-cells.js.html +313 -0
- package/docs/files/addon_utils_export.js.html +316 -0
- package/docs/files/addon_utils_formats.js.html +335 -0
- package/docs/files/addon_utils_table.js.html +274 -0
- package/docs/files/index.html +10 -0
- package/docs/index.html +252 -0
- package/docs/modules/CellComponents.html +313 -0
- package/docs/modules/ColumnComponents.html +284 -0
- package/docs/modules/Components.html +285 -0
- package/docs/modules/Introduction.html +261 -0
- package/docs/modules/Utils.html +285 -0
- package/docs/modules/index.html +10 -0
- package/package.json +64 -64
- package/.yalc/ember-sortable/.huskyrc +0 -5
- package/.yalc/ember-sortable/CHANGELOG.md +0 -755
- package/.yalc/ember-sortable/CODE_OF_CONDUCT.md +0 -6
- package/.yalc/ember-sortable/LICENSE.md +0 -9
- package/.yalc/ember-sortable/MIGRATION_GUIDE_MODIFIERS.md +0 -95
- package/.yalc/ember-sortable/MIGRATION_GUIDE_V2.md +0 -120
- package/.yalc/ember-sortable/Makefile +0 -24
- package/.yalc/ember-sortable/README.md +0 -423
- package/.yalc/ember-sortable/RELEASE.md +0 -60
- package/.yalc/ember-sortable/V2_MIGRATION_RFC.md +0 -1100
- package/.yalc/ember-sortable/addon/modifiers/sortable-group.js +0 -754
- package/.yalc/ember-sortable/addon/modifiers/sortable-handle.js +0 -29
- package/.yalc/ember-sortable/addon/modifiers/sortable-item.js +0 -869
- package/.yalc/ember-sortable/addon/services/ember-sortable.js +0 -92
- package/.yalc/ember-sortable/addon/system/scroll-container.js +0 -53
- package/.yalc/ember-sortable/addon/system/scroll-parent.js +0 -33
- package/.yalc/ember-sortable/addon/utils/constant.js +0 -9
- package/.yalc/ember-sortable/addon/utils/coordinate.js +0 -34
- package/.yalc/ember-sortable/addon/utils/css-calculation.js +0 -20
- package/.yalc/ember-sortable/addon/utils/defaults.js +0 -26
- package/.yalc/ember-sortable/addon/utils/keyboard.js +0 -32
- package/.yalc/ember-sortable/addon-test-support/helpers/drag.js +0 -111
- package/.yalc/ember-sortable/addon-test-support/helpers/index.js +0 -4
- package/.yalc/ember-sortable/addon-test-support/helpers/reorder.js +0 -41
- package/.yalc/ember-sortable/addon-test-support/utils/keyboard.js +0 -32
- package/.yalc/ember-sortable/addon-test-support/utils/offset.js +0 -14
- package/.yalc/ember-sortable/app/modifiers/sortable-group.js +0 -1
- package/.yalc/ember-sortable/app/modifiers/sortable-handle.js +0 -1
- package/.yalc/ember-sortable/app/modifiers/sortable-item.js +0 -1
- package/.yalc/ember-sortable/app/services/ember-sortable-internal-state.js +0 -1
- package/.yalc/ember-sortable/config/environment.js +0 -5
- package/.yalc/ember-sortable/demo.gif +0 -0
- package/.yalc/ember-sortable/index.js +0 -5
- package/.yalc/ember-sortable/package.json +0 -65
- package/.yalc/ember-sortable/yalc.sig +0 -1
- package/yalc.lock +0 -10
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>addon\components\fw-table-sortable.js - Ember-FW-Table</title>
|
|
6
|
+
<meta name="description" content="A set of components surrounding the functionality of the fw-table-sortable, which is a simplified table, with ember-light-table as its internals.">
|
|
7
|
+
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
|
|
8
|
+
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
|
|
9
|
+
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
|
|
10
|
+
<link rel="stylesheet" href="../assets/css/custom.css">
|
|
11
|
+
<link rel="stylesheet" href="../assets/vendor/bootstrap/css/bootstrap.css">
|
|
12
|
+
<link rel="stylesheet" href="../assets/vendor/font-awesome/css/font-awesome.min.css">
|
|
13
|
+
<link rel="stylesheet" href="../assets/css/theme.css">
|
|
14
|
+
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700' rel='stylesheet' type='text/css'>
|
|
15
|
+
<!-- favicon information -->
|
|
16
|
+
<link rel="apple-touch-icon" sizes="57x57" href="/assets/icons/apple-icon-57x57.png">
|
|
17
|
+
<link rel="apple-touch-icon" sizes="60x60" href="/assets/icons/apple-icon-60x60.png">
|
|
18
|
+
<link rel="apple-touch-icon" sizes="72x72" href="/assets/icons/apple-icon-72x72.png">
|
|
19
|
+
<link rel="apple-touch-icon" sizes="76x76" href="/assets/icons/apple-icon-76x76.png">
|
|
20
|
+
<link rel="apple-touch-icon" sizes="114x114" href="/assets/icons/apple-icon-114x114.png">
|
|
21
|
+
<link rel="apple-touch-icon" sizes="120x120" href="/assets/icons/apple-icon-120x120.png">
|
|
22
|
+
<link rel="apple-touch-icon" sizes="144x144" href="/assets/icons/apple-icon-144x144.png">
|
|
23
|
+
<link rel="apple-touch-icon" sizes="152x152" href="/assets/icons/apple-icon-152x152.png">
|
|
24
|
+
<link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-icon-180x180.png">
|
|
25
|
+
<link rel="icon" type="image/png" sizes="192x192" href="/assets/icons/android-icon-192x192.png">
|
|
26
|
+
<link rel="icon" type="image/png" sizes="32x32" href="/assets/icons/favicon-32x32.png">
|
|
27
|
+
<link rel="icon" type="image/png" sizes="96x96" href="/assets/icons/favicon-96x96.png">
|
|
28
|
+
<link rel="icon" type="image/png" sizes="16x16" href="/assets/icons/favicon-16x16.png">
|
|
29
|
+
<link rel="manifest" href="/assets/icons/manifest.json">
|
|
30
|
+
<meta name="msapplication-TileImage" content="/assets/icons/ms-icon-144x144.png">
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
<style>
|
|
34
|
+
body a {
|
|
35
|
+
color: #7E3DB7;
|
|
36
|
+
}
|
|
37
|
+
body a:hover {
|
|
38
|
+
color: #7E3DB7;
|
|
39
|
+
opacity: 0.5;
|
|
40
|
+
}
|
|
41
|
+
.navbar.navbar-default .navbar-nav> li> a:focus, .navbar.navbar-default .navbar-nav> li> a:hover {
|
|
42
|
+
color: #7E3DB7;
|
|
43
|
+
}
|
|
44
|
+
.navbar.navbar-default .navbar-nav> .active> a, .navbar.navbar-default .navbar-nav> .active> a:focus, .navbar.navbar-default .navbar-nav> .active> a:hover {
|
|
45
|
+
color: #7E3DB7;
|
|
46
|
+
}
|
|
47
|
+
#docs-main .page-header {
|
|
48
|
+
color: #7E3DB7;
|
|
49
|
+
}
|
|
50
|
+
#docs-main .page-section .nav-tabs {
|
|
51
|
+
border-bottom: 1px solid #7E3DB7;
|
|
52
|
+
}
|
|
53
|
+
#docs-main .page-section .nav-tabs> li.active a {
|
|
54
|
+
background: #7E3DB7;
|
|
55
|
+
border: 1px solid #7E3DB7;
|
|
56
|
+
}
|
|
57
|
+
#sidebar li.panel .panel-body ol> li.active, #sidebar li.panel .panel-body ol> li:hover {
|
|
58
|
+
background: #efefef;
|
|
59
|
+
}
|
|
60
|
+
</style>
|
|
61
|
+
</head>
|
|
62
|
+
<body>
|
|
63
|
+
<nav class="navbar navbar-default">
|
|
64
|
+
<div class="container-fluid">
|
|
65
|
+
<div class="navbar-header">
|
|
66
|
+
<a href="../" class="navbar-brand">
|
|
67
|
+
<img src="..\assets\img\fw-logo.png" alt="enterprise logo">
|
|
68
|
+
<span>Ember-FW-Table (API)</span>
|
|
69
|
+
</a>
|
|
70
|
+
</div>
|
|
71
|
+
|
|
72
|
+
<div class="collapse navbar-collapse" id="nav">
|
|
73
|
+
<ul class="nav navbar-nav navbar-right">
|
|
74
|
+
<li><a href="https://linformatics.bitbucket.io/docs/">Docs</a></li>
|
|
75
|
+
<li><a href="https://linformatics.bitbucket.io/downloads/">Downloads</a></li>
|
|
76
|
+
<li><a href="https://linformatics.bitbucket.io/api/">API</a></li>
|
|
77
|
+
<li><a href="https://bitbucket.org/linformatics/ember-fw-table" class="fa fa-github github"></a></li>
|
|
78
|
+
</ul>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</nav>
|
|
82
|
+
<div id="main-wrapper" class="row">
|
|
83
|
+
<div id="content-wrapper">
|
|
84
|
+
<ol class="panel-group" id="sidebar" role="tablist" aria-multiselectable="true">
|
|
85
|
+
<li class="panel panel-default">
|
|
86
|
+
<div class="panel-heading" role="tab" id="sidebar-search-heading">
|
|
87
|
+
<h4 class="panel-title">
|
|
88
|
+
<a role="button" data-toggle="collapse" href="#sidebar-search" aria-expanded="true" aria-controls="collapseOne">
|
|
89
|
+
Search
|
|
90
|
+
</a>
|
|
91
|
+
</h4>
|
|
92
|
+
</div>
|
|
93
|
+
<div id="sidebar-search" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="sidebar-search-heading">
|
|
94
|
+
<div class="panel-body">
|
|
95
|
+
<div id="api-tabview-filter">
|
|
96
|
+
<input type="search" id="api-filter" placeholder="Search...">
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</li>
|
|
101
|
+
<li class="panel panel-default">
|
|
102
|
+
<div class="panel-heading" role="tab" id="sidebar-version-heading">
|
|
103
|
+
<h4 class="panel-title">
|
|
104
|
+
<a role="button" href="https://bitbucket.org/linformatics/ember-fw-table/commits/04d3b2ce" target="_blank">
|
|
105
|
+
Tag: 2.1.4.04d3b2ce
|
|
106
|
+
</a>
|
|
107
|
+
</h4>
|
|
108
|
+
</div>
|
|
109
|
+
</li>
|
|
110
|
+
<li class="panel panel-default">
|
|
111
|
+
<div class="panel-heading" role="tab" id="sidebar-modules-heading">
|
|
112
|
+
<h4 class="panel-title">
|
|
113
|
+
<a role="button" data-toggle="collapse" href="#sidebar-modules" aria-expanded="true" aria-controls="collapseOne">
|
|
114
|
+
Modules
|
|
115
|
+
</a>
|
|
116
|
+
</h4>
|
|
117
|
+
</div>
|
|
118
|
+
<div id="sidebar-modules" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="sidebar-modules-heading">
|
|
119
|
+
<div class="panel-body">
|
|
120
|
+
<ol>
|
|
121
|
+
<li>
|
|
122
|
+
<a href="../modules/CellComponents.html">CellComponents</a>
|
|
123
|
+
</li>
|
|
124
|
+
<li>
|
|
125
|
+
<a href="../modules/ColumnComponents.html">ColumnComponents</a>
|
|
126
|
+
</li>
|
|
127
|
+
<li>
|
|
128
|
+
<a href="../modules/Components.html">Components</a>
|
|
129
|
+
</li>
|
|
130
|
+
<li>
|
|
131
|
+
<a href="../modules/Introduction.html">Introduction</a>
|
|
132
|
+
</li>
|
|
133
|
+
<li>
|
|
134
|
+
<a href="../modules/Utils.html">Utils</a>
|
|
135
|
+
</li>
|
|
136
|
+
</ol>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</li>
|
|
140
|
+
|
|
141
|
+
<li class="panel panel-default">
|
|
142
|
+
<div class="panel-heading" role="tab" id="sidebar-classes-heading">
|
|
143
|
+
<h4 class="panel-title">
|
|
144
|
+
<a role="button" data-toggle="collapse" href="#sidebar-classes" aria-expanded="true" aria-controls="collapseOne">
|
|
145
|
+
Classes
|
|
146
|
+
</a>
|
|
147
|
+
</h4>
|
|
148
|
+
</div>
|
|
149
|
+
<div id="sidebar-classes" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="sidebar-classes-heading">
|
|
150
|
+
<div class="panel-body">
|
|
151
|
+
<ol>
|
|
152
|
+
<li>
|
|
153
|
+
<a href="../classes/BaseCells.html">BaseCells</a>
|
|
154
|
+
</li>
|
|
155
|
+
<li>
|
|
156
|
+
<a href="../classes/Export.html">Export</a>
|
|
157
|
+
</li>
|
|
158
|
+
<li>
|
|
159
|
+
<a href="../classes/Format.html">Format</a>
|
|
160
|
+
</li>
|
|
161
|
+
<li>
|
|
162
|
+
<a href="../classes/FwCellAction.html">FwCellAction</a>
|
|
163
|
+
</li>
|
|
164
|
+
<li>
|
|
165
|
+
<a href="../classes/FwCellBoolean.html">FwCellBoolean</a>
|
|
166
|
+
</li>
|
|
167
|
+
<li>
|
|
168
|
+
<a href="../classes/FwCellNullable.html">FwCellNullable</a>
|
|
169
|
+
</li>
|
|
170
|
+
<li>
|
|
171
|
+
<a href="../classes/FwCellPermissionIcon.html">FwCellPermissionIcon</a>
|
|
172
|
+
</li>
|
|
173
|
+
<li>
|
|
174
|
+
<a href="../classes/FwColumnSortable.html">FwColumnSortable</a>
|
|
175
|
+
</li>
|
|
176
|
+
<li>
|
|
177
|
+
<a href="../classes/FwColumnTitle.html">FwColumnTitle</a>
|
|
178
|
+
</li>
|
|
179
|
+
<li>
|
|
180
|
+
<a href="../classes/FwDeleteModal.html">FwDeleteModal</a>
|
|
181
|
+
</li>
|
|
182
|
+
<li>
|
|
183
|
+
<a href="../classes/FwPaginationWrapper.html">FwPaginationWrapper</a>
|
|
184
|
+
</li>
|
|
185
|
+
<li>
|
|
186
|
+
<a href="../classes/FwRowToggle.html">FwRowToggle</a>
|
|
187
|
+
</li>
|
|
188
|
+
<li>
|
|
189
|
+
<a href="../classes/FwRowToggleIndex.html">FwRowToggleIndex</a>
|
|
190
|
+
</li>
|
|
191
|
+
<li>
|
|
192
|
+
<a href="../classes/FwTableResort.html">FwTableResort</a>
|
|
193
|
+
</li>
|
|
194
|
+
<li>
|
|
195
|
+
<a href="../classes/FwTableSortable.html">FwTableSortable</a>
|
|
196
|
+
</li>
|
|
197
|
+
<li>
|
|
198
|
+
<a href="../classes/Row.html">Row</a>
|
|
199
|
+
</li>
|
|
200
|
+
<li>
|
|
201
|
+
<a href="../classes/Table.html">Table</a>
|
|
202
|
+
</li>
|
|
203
|
+
<li>
|
|
204
|
+
<a href="../classes/TableUtil.html">TableUtil</a>
|
|
205
|
+
</li>
|
|
206
|
+
</ol>
|
|
207
|
+
</div>
|
|
208
|
+
</div>
|
|
209
|
+
</li>
|
|
210
|
+
</ol>
|
|
211
|
+
<div class="content-container">
|
|
212
|
+
<div class="apidocs">
|
|
213
|
+
<div id="docs-main">
|
|
214
|
+
<div class="content">
|
|
215
|
+
<div class="page-header">
|
|
216
|
+
<h1><i class="fa fa-file-code-o" aria-hidden="true"></i> File</h1>
|
|
217
|
+
</div>
|
|
218
|
+
|
|
219
|
+
<div class="file">
|
|
220
|
+
<pre class="prettyprint linenums">
|
|
221
|
+
import {isArray} from '@ember/array';
|
|
222
|
+
import Component from '@ember/component';
|
|
223
|
+
import {computed, observer} from '@ember/object';
|
|
224
|
+
import {sort} from '@ember/object/computed';
|
|
225
|
+
import {isEmpty, isNone} from '@ember/utils';
|
|
226
|
+
import newTable from '../classes/Table';
|
|
227
|
+
import exportTable from '../utils/export';
|
|
228
|
+
import layout from '../templates/components/fw-table-sortable';
|
|
229
|
+
import RSVP from 'rsvp';
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* This table contains logic to show a table as a panel in an app. This table features sorting rows can be expanded
|
|
233
|
+
* to show hidden data
|
|
234
|
+
* ```handlebars
|
|
235
|
+
* <FwTableSortable @data={{model}} @columns={{columns}} @title='Table' />
|
|
236
|
+
* ```
|
|
237
|
+
*
|
|
238
|
+
* If used in a block format instead, it is possible to fully define the title area, replacing the title parameter. The export action is passed as a yield parameter to redefine the export button
|
|
239
|
+
* ```handlebars
|
|
240
|
+
* <FwTableSortable @data={{model}} @columns={{columns}} as |export|>
|
|
241
|
+
* <strong class='panel-title'>Table</strong>
|
|
242
|
+
* </FwTableSortable>
|
|
243
|
+
* ```
|
|
244
|
+
*
|
|
245
|
+
* In addition to the usual properties in columns, fw-table-sortable supports adding an additional `sortKey` property
|
|
246
|
+
* If defined, clicking that column will sort by that property instead of valuePath
|
|
247
|
+
*
|
|
248
|
+
* It also supports a showExpanded property, which is set to a value which will cause this row to show in the expanded view if hidden.
|
|
249
|
+
* Alternatively, setting this to `true` or `false` will force the state regardless of a property.
|
|
250
|
+
* By default will show if the property from `valuePath` is not null
|
|
251
|
+
*
|
|
252
|
+
* @class FwTableSortable
|
|
253
|
+
* @module Components
|
|
254
|
+
* @extends EmberLightTable
|
|
255
|
+
* @public
|
|
256
|
+
*/
|
|
257
|
+
const TableSortable = Component.extend({
|
|
258
|
+
layout,
|
|
259
|
+
classNames: ['panel', 'panel-default'],
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* Table rows
|
|
263
|
+
*
|
|
264
|
+
* @public
|
|
265
|
+
* @property data
|
|
266
|
+
* @type {Array}
|
|
267
|
+
*/
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Table columns. See ember-light-table docs for more information
|
|
271
|
+
*
|
|
272
|
+
* @public
|
|
273
|
+
* @property columns
|
|
274
|
+
* @type {Array}
|
|
275
|
+
*/
|
|
276
|
+
columns: null,
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Additional class names for the table
|
|
280
|
+
*
|
|
281
|
+
* @public
|
|
282
|
+
* @property tableClassNames
|
|
283
|
+
* @type {Hash}
|
|
284
|
+
*/
|
|
285
|
+
tableClassNames: '',
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Hash of maximum columns based on responsive size
|
|
289
|
+
*
|
|
290
|
+
* @public
|
|
291
|
+
* @property breakpoints
|
|
292
|
+
* @type {Hash}
|
|
293
|
+
*/
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Hash of actions to pass into the table for use in components
|
|
297
|
+
*
|
|
298
|
+
* @public
|
|
299
|
+
* @property tableActions
|
|
300
|
+
* @type {Hash}
|
|
301
|
+
*/
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Title to display in the panel above the table
|
|
305
|
+
*
|
|
306
|
+
* @public
|
|
307
|
+
* @property title
|
|
308
|
+
* @type {String}
|
|
309
|
+
*/
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Text to display when the table is empty
|
|
313
|
+
*
|
|
314
|
+
* @public
|
|
315
|
+
* @property empty
|
|
316
|
+
* @type {String}
|
|
317
|
+
*/
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Action called when sorting the table
|
|
321
|
+
*
|
|
322
|
+
* @public
|
|
323
|
+
* @property onSort
|
|
324
|
+
* @type {Action}
|
|
325
|
+
*/
|
|
326
|
+
onSort: () => RSVP.resolve(),
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Set to false to make the table not show the header if empty
|
|
330
|
+
*
|
|
331
|
+
* @public
|
|
332
|
+
* @property headerEmpty
|
|
333
|
+
* @type {Boolean}
|
|
334
|
+
* @default true
|
|
335
|
+
*/
|
|
336
|
+
headerEmpty: true,
|
|
337
|
+
/**
|
|
338
|
+
* Sets the table to a fixed height, and adds a scroll bar to see the hidden rows
|
|
339
|
+
*
|
|
340
|
+
* @public
|
|
341
|
+
* @property fixedHeight
|
|
342
|
+
* @type {String}
|
|
343
|
+
*/
|
|
344
|
+
fixedHeight: null,
|
|
345
|
+
/**
|
|
346
|
+
* Makes the table responsive to the screen width. The table is slightly more efficient if false when responsive is not used
|
|
347
|
+
*
|
|
348
|
+
* @public
|
|
349
|
+
* @property responsive
|
|
350
|
+
* @type {Boolean}
|
|
351
|
+
* @default false
|
|
352
|
+
*/
|
|
353
|
+
responsive: false,
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* 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.
|
|
357
|
+
* @public
|
|
358
|
+
* @property resizeOnDrag
|
|
359
|
+
* @type {Boolean}
|
|
360
|
+
* @default false
|
|
361
|
+
*/
|
|
362
|
+
|
|
363
|
+
resizeOnDrag: false,
|
|
364
|
+
/**
|
|
365
|
+
* 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
|
|
366
|
+
*
|
|
367
|
+
* When enabled, columns have some additional values defined:
|
|
368
|
+
* * `canExport`: if true (default), the column will be included in the export. Set to false to skip exporting the column.
|
|
369
|
+
* * `exportOnly`: if true, the column will not show in the table, but will still be exported.
|
|
370
|
+
*
|
|
371
|
+
* Additionally, the value `export` is set to true in `format`'s context.
|
|
372
|
+
*
|
|
373
|
+
* If this is set to a string, the string is used as the name of the export button.
|
|
374
|
+
* @public
|
|
375
|
+
* @property canExport
|
|
376
|
+
* @type {Boolean | String}
|
|
377
|
+
* @default false
|
|
378
|
+
*/
|
|
379
|
+
canExport: false,
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* If true, uses the table block data for the header
|
|
383
|
+
*
|
|
384
|
+
* @public
|
|
385
|
+
* @property showHeader
|
|
386
|
+
* @type {Boolean}
|
|
387
|
+
* @default true
|
|
388
|
+
*/
|
|
389
|
+
showHeader: true,
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* If true, uses the table block data for the footer
|
|
393
|
+
*
|
|
394
|
+
* @public
|
|
395
|
+
* @property showFooter
|
|
396
|
+
* @type {Boolean}
|
|
397
|
+
* @default true
|
|
398
|
+
*/
|
|
399
|
+
showFooter: false,
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Default sort order for the table. Can be a string for a single property, or an array to fallback
|
|
403
|
+
*
|
|
404
|
+
* @public
|
|
405
|
+
* @property defaultSort
|
|
406
|
+
* @type {String|Array}
|
|
407
|
+
*/
|
|
408
|
+
defaultSort: null,
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* Private copy of defaultSort, made an array if its not
|
|
412
|
+
*
|
|
413
|
+
* @private
|
|
414
|
+
* @property _defaultSort
|
|
415
|
+
* @type {Array}
|
|
416
|
+
*/
|
|
417
|
+
_defaultSort: computed('defaultSort', function() {
|
|
418
|
+
let defaultSort = this.defaultSort;
|
|
419
|
+
if (isNone(defaultSort)) {
|
|
420
|
+
return [];
|
|
421
|
+
}
|
|
422
|
+
if (!isArray(defaultSort)) {
|
|
423
|
+
return [defaultSort];
|
|
424
|
+
}
|
|
425
|
+
return defaultSort;
|
|
426
|
+
}),
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* Sort column set by clicking a column to sort
|
|
430
|
+
*
|
|
431
|
+
* @private
|
|
432
|
+
* @property sortColumn
|
|
433
|
+
* @type {String}
|
|
434
|
+
*/
|
|
435
|
+
sortColumn: null,
|
|
436
|
+
|
|
437
|
+
/**
|
|
438
|
+
* Internal sort order. Calculated from sortColumn and _defaultSort
|
|
439
|
+
*
|
|
440
|
+
* @private
|
|
441
|
+
* @property sortOrder
|
|
442
|
+
* @type {Array}
|
|
443
|
+
*/
|
|
444
|
+
sortOrder: computed('_defaultSort.[]', 'sortColumn', function() {
|
|
445
|
+
let sortColumn = this.sortColumn;
|
|
446
|
+
if (sortColumn) {
|
|
447
|
+
// this addresses a bug where sorting by the default sort column would break
|
|
448
|
+
// in that case just sort by the selected column and ignore the default sort
|
|
449
|
+
if (this._defaultSort.any((sort) => {
|
|
450
|
+
return sort === sortColumn || sort === `${sortColumn}:desc` || `${sort}:desc` === sortColumn;
|
|
451
|
+
})) {
|
|
452
|
+
return [sortColumn];
|
|
453
|
+
}
|
|
454
|
+
// otherwise add the sort column to the front of the default sort array so the default sort is done after
|
|
455
|
+
let sortOrder = this._defaultSort.slice();
|
|
456
|
+
sortOrder.unshift(sortColumn);
|
|
457
|
+
|
|
458
|
+
return sortOrder;
|
|
459
|
+
}
|
|
460
|
+
return this._defaultSort;
|
|
461
|
+
}),
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Passed in table data after sorting.
|
|
465
|
+
*
|
|
466
|
+
* @private
|
|
467
|
+
* @property sortedData
|
|
468
|
+
* @type {Array}
|
|
469
|
+
*/
|
|
470
|
+
sortedData: sort('data', 'sortOrder'),
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Internal table instance, in general changes to the table should be done to columns or data so they update properly
|
|
474
|
+
*
|
|
475
|
+
* @protected
|
|
476
|
+
* @property table
|
|
477
|
+
* @type {Table}
|
|
478
|
+
*/
|
|
479
|
+
table: null,
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* Computed table title based on whether a boolean true is passed or a title
|
|
483
|
+
*
|
|
484
|
+
* @private
|
|
485
|
+
* @property exportTitle
|
|
486
|
+
* @type {String}
|
|
487
|
+
*/
|
|
488
|
+
exportTitle: computed('canExport', function() {
|
|
489
|
+
let canExport = this.canExport;
|
|
490
|
+
if (canExport === true) {
|
|
491
|
+
return 'Export';
|
|
492
|
+
}
|
|
493
|
+
return canExport || '';
|
|
494
|
+
}),
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Called to delete the full page of entries. Pass in the action to be called by the button.
|
|
498
|
+
*
|
|
499
|
+
* @property deleteTable
|
|
500
|
+
* @type {Action}
|
|
501
|
+
* @default undefined
|
|
502
|
+
*/
|
|
503
|
+
deleteTable: undefined,
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Determines title for delete function. This will only be used if deleteTable action is passed in.
|
|
507
|
+
*
|
|
508
|
+
* @property deleteOverrideTitle
|
|
509
|
+
* @type {String}
|
|
510
|
+
*/
|
|
511
|
+
deleteOverrideTitle: null,
|
|
512
|
+
|
|
513
|
+
deleteTitle: computed('deleteTable', 'deleteOverrideTitle', function() {
|
|
514
|
+
if (!this.deleteTable) {
|
|
515
|
+
return null;
|
|
516
|
+
} else {
|
|
517
|
+
return this.deleteOverrideTitle ? this.deleteOverrideTitle : 'Delete All';
|
|
518
|
+
}
|
|
519
|
+
}),
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Determines if the current user has permission to delete the table (usually has-role helper will be used to determine this)
|
|
523
|
+
* example: `@deleteTablePermission={{has-role 'admin'}}`. This will only be used if `deleteTable` action is passed in.
|
|
524
|
+
* @property deleteTablePermissions
|
|
525
|
+
* @type {Boolean}
|
|
526
|
+
* @default true
|
|
527
|
+
*/
|
|
528
|
+
deleteTablePermission: true,
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Callback to update the table rows whenever the data is changed, generally from sorting
|
|
532
|
+
*
|
|
533
|
+
* @private
|
|
534
|
+
* @method updateTableRows
|
|
535
|
+
*/
|
|
536
|
+
// eslint-disable-next-line ember/no-observers
|
|
537
|
+
updateTableRows: observer('sortedData', function() {
|
|
538
|
+
if (this.table) {
|
|
539
|
+
this.table.setRows(this.sortedData);
|
|
540
|
+
}
|
|
541
|
+
}),
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Callback to update the table columns whenever they change. Unlikely, but still a case worth covering
|
|
545
|
+
*
|
|
546
|
+
* @private
|
|
547
|
+
* @method updateTableColumns
|
|
548
|
+
*/
|
|
549
|
+
// eslint-disable-next-line ember/no-observers
|
|
550
|
+
updateTableColumns: observer('columns', function() {
|
|
551
|
+
if (this.table) {
|
|
552
|
+
this.table.setColumns(this.columns);
|
|
553
|
+
}
|
|
554
|
+
}),
|
|
555
|
+
|
|
556
|
+
/**
|
|
557
|
+
* Initializes the component and loads the modal path.
|
|
558
|
+
*
|
|
559
|
+
* @private
|
|
560
|
+
* @method didReceiveAttrs
|
|
561
|
+
*/
|
|
562
|
+
didReceiveAttrs() {
|
|
563
|
+
this._super(...arguments);
|
|
564
|
+
// first, determine our sorting
|
|
565
|
+
let defaultSort = this._defaultSort;
|
|
566
|
+
let columns = this.columns || [];
|
|
567
|
+
if (!isEmpty(defaultSort)) {
|
|
568
|
+
// make a map of key to ascending
|
|
569
|
+
let [mainKey] = defaultSort;
|
|
570
|
+
let ascending = true;
|
|
571
|
+
if (mainKey.endsWith(':desc')) {
|
|
572
|
+
ascending = false;
|
|
573
|
+
mainKey = mainKey.substring(0, mainKey.length - 5);
|
|
574
|
+
}
|
|
575
|
+
columns = columns.map((column) => {
|
|
576
|
+
let key = column.sortKey || column.valuePath;
|
|
577
|
+
return key === mainKey ? Object.assign({}, column, {sorted: true, ascending}) : column;
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
this.set('table', newTable(columns, this.sortedData));
|
|
581
|
+
|
|
582
|
+
if (this.noPanel) {
|
|
583
|
+
this.set('classNames', null);
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
|
|
587
|
+
actions: {
|
|
588
|
+
/**
|
|
589
|
+
* Called when clicking aa column header to sort the current row
|
|
590
|
+
* @param {Column} column Column clicked
|
|
591
|
+
*/
|
|
592
|
+
sort(column) {
|
|
593
|
+
if (!column.sortable) {
|
|
594
|
+
return;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
// modify the sort state, this is ported from the default code to properly set ascending to true on sort
|
|
598
|
+
if (column.sorted) {
|
|
599
|
+
column.toggleProperty('ascending');
|
|
600
|
+
} else {
|
|
601
|
+
this.get('table.sortedColumns').setEach('sorted', false);
|
|
602
|
+
column.set('sorted', true);
|
|
603
|
+
column.set('ascending', true);
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
// determine how we are sorting
|
|
607
|
+
let sortKey = column.sortKey || column.valuePath;
|
|
608
|
+
|
|
609
|
+
// if the column is now descending, sort descending
|
|
610
|
+
if (!column.ascending) {
|
|
611
|
+
sortKey = `${sortKey}:desc`;
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
// call the sort logic
|
|
615
|
+
this.onSort(column, sortKey).then(() => {
|
|
616
|
+
this.set('sortColumn', sortKey);
|
|
617
|
+
});
|
|
618
|
+
},
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Called when clicking a row to expand it and show more information
|
|
622
|
+
* @param {Row} row Row clicked
|
|
623
|
+
*/
|
|
624
|
+
expand(row) {
|
|
625
|
+
let expand = row.get('canExpand') ? !row.get('expanded') : false;
|
|
626
|
+
if (expand) {
|
|
627
|
+
this.get('table.expandedRows').setEach('expanded', false);
|
|
628
|
+
}
|
|
629
|
+
row.set('expanded', expand);
|
|
630
|
+
},
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* Called by the export button to export the current table data to CSV
|
|
634
|
+
*/
|
|
635
|
+
export() {
|
|
636
|
+
exportTable(this.table, this.title);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
|
|
641
|
+
TableSortable.reopenClass({
|
|
642
|
+
positionalParams: ['data', 'columns']
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
export default TableSortable;
|
|
646
|
+
|
|
647
|
+
</pre>
|
|
648
|
+
</div>
|
|
649
|
+
</div>
|
|
650
|
+
</div>
|
|
651
|
+
</div>
|
|
652
|
+
</div>
|
|
653
|
+
</div>
|
|
654
|
+
</div>
|
|
655
|
+
<script src="../assets/vendor/prettify/prettify-min.js"></script>
|
|
656
|
+
<script>prettyPrint();</script>
|
|
657
|
+
<script src="../assets/vendor/jquery/jquery.min.js"></script>
|
|
658
|
+
<script src="../assets/vendor/jquery-ui/jquery-ui.min.js"></script>
|
|
659
|
+
<script src="../assets/vendor/bootstrap/js/bootstrap.js"></script>
|
|
660
|
+
<script src="../assets/vendor/github-slugger/slugger.js"></script>
|
|
661
|
+
<script src="../assets/js/yuidoc-bootstrap.js"></script>
|
|
662
|
+
</body>
|
|
663
|
+
</html>
|