@bennerinformatics/ember-fw-table 2.0.19 → 2.0.21
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/classes/Row.js +74 -74
- package/addon/classes/Table.js +147 -147
- package/addon/components/fw-cell-action.js +15 -15
- package/addon/components/fw-cell-boolean.js +12 -12
- package/addon/components/fw-cell-nullable.js +12 -12
- package/addon/components/fw-cell-permission-icon.js +12 -12
- package/addon/components/fw-column-title.js +13 -13
- package/addon/components/fw-delete-modal.js +61 -61
- package/addon/components/fw-pagination-wrapper.js +681 -681
- package/addon/components/fw-row-toggle-index.js +14 -14
- package/addon/components/fw-table-expanded-row.js +24 -24
- package/addon/components/fw-table-resort.js +3 -3
- package/addon/components/fw-table-sortable.js +398 -389
- package/addon/documentation.js +98 -98
- package/addon/templates/components/fw-delete-modal.hbs +2 -7
- package/addon/templates/components/fw-pagination-wrapper.hbs +45 -74
- package/addon/templates/components/fw-table-expanded-row.hbs +23 -23
- package/addon/templates/components/fw-table-expanded-rows.hbs +1 -1
- package/addon/templates/components/fw-table-resort.hbs +4 -4
- package/addon/templates/components/fw-table-sortable.hbs +9 -31
- package/addon/utils/base-cells.js +40 -40
- package/addon/utils/export.js +76 -76
- package/addon/utils/formats.js +46 -46
- package/addon/utils/table.js +35 -35
- package/app/breakpoints.js +1 -1
- package/app/components/fw-cell-permission-icon.js +1 -1
- package/app/initializers/responsive.js +1 -1
- package/bitbucket-helpers-override.js +240 -240
- package/codemods.log +16 -0
- package/index.js +9 -10
- package/package.json +67 -67
- package/yuidoc.json +21 -21
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import Component from '@ember/component';
|
|
2
|
-
import {computed} from '@ember/object';
|
|
3
|
-
import layout from '../templates/components/fw-delete-modal';
|
|
4
|
-
import RSVP from 'rsvp';
|
|
5
|
-
/**
|
|
6
|
-
* NEEDS WORK.
|
|
7
|
-
* @class FW-Delete-Modal
|
|
8
|
-
*/
|
|
9
|
-
export default Component.extend({
|
|
10
|
-
layout,
|
|
11
|
-
/**
|
|
12
|
-
* Action called to close the modal
|
|
13
|
-
* @type {Action}
|
|
14
|
-
*/
|
|
15
|
-
close: null,
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Model which will be deleted
|
|
19
|
-
* @type {DS.Model}
|
|
20
|
-
*/
|
|
21
|
-
model: null,
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Message displayed in the confirmation. If unset use the default
|
|
25
|
-
* @type {String}
|
|
26
|
-
*/
|
|
27
|
-
message: null,
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Model type being deleted, used to create the message
|
|
31
|
-
* @type {String}
|
|
32
|
-
*/
|
|
33
|
-
type: null,
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Determines whether opening this modal caused the web browser to scroll to the top
|
|
37
|
-
* @type {Boolean}
|
|
38
|
-
*/
|
|
39
|
-
scrollTop: false,
|
|
40
|
-
|
|
41
|
-
_message: computed('message', 'type', function() {
|
|
42
|
-
// if we have a message, use that
|
|
43
|
-
let message = this.get('message');
|
|
44
|
-
if (message) {
|
|
45
|
-
return message;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// if no message, determine the type and use the default
|
|
49
|
-
let type = this.get('type') || 'model';
|
|
50
|
-
return `Are you sure you want to delete this ${type}? It cannot be undone.`;
|
|
51
|
-
}),
|
|
52
|
-
|
|
53
|
-
actions: {
|
|
54
|
-
// deletes the contained model
|
|
55
|
-
deleteModel() {
|
|
56
|
-
if (this.get('model')) {
|
|
57
|
-
return RSVP.resolve(this.get('model').destroyRecord());
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
});
|
|
1
|
+
import Component from '@ember/component';
|
|
2
|
+
import {computed} from '@ember/object';
|
|
3
|
+
import layout from '../templates/components/fw-delete-modal';
|
|
4
|
+
import RSVP from 'rsvp';
|
|
5
|
+
/**
|
|
6
|
+
* NEEDS WORK.
|
|
7
|
+
* @class FW-Delete-Modal
|
|
8
|
+
*/
|
|
9
|
+
export default Component.extend({
|
|
10
|
+
layout,
|
|
11
|
+
/**
|
|
12
|
+
* Action called to close the modal
|
|
13
|
+
* @type {Action}
|
|
14
|
+
*/
|
|
15
|
+
close: null,
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Model which will be deleted
|
|
19
|
+
* @type {DS.Model}
|
|
20
|
+
*/
|
|
21
|
+
model: null,
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Message displayed in the confirmation. If unset use the default
|
|
25
|
+
* @type {String}
|
|
26
|
+
*/
|
|
27
|
+
message: null,
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Model type being deleted, used to create the message
|
|
31
|
+
* @type {String}
|
|
32
|
+
*/
|
|
33
|
+
type: null,
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Determines whether opening this modal caused the web browser to scroll to the top
|
|
37
|
+
* @type {Boolean}
|
|
38
|
+
*/
|
|
39
|
+
scrollTop: false,
|
|
40
|
+
|
|
41
|
+
_message: computed('message', 'type', function() {
|
|
42
|
+
// if we have a message, use that
|
|
43
|
+
let message = this.get('message');
|
|
44
|
+
if (message) {
|
|
45
|
+
return message;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// if no message, determine the type and use the default
|
|
49
|
+
let type = this.get('type') || 'model';
|
|
50
|
+
return `Are you sure you want to delete this ${type}? It cannot be undone.`;
|
|
51
|
+
}),
|
|
52
|
+
|
|
53
|
+
actions: {
|
|
54
|
+
// deletes the contained model
|
|
55
|
+
deleteModel() {
|
|
56
|
+
if (this.get('model')) {
|
|
57
|
+
return RSVP.resolve(this.get('model').destroyRecord());
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|