@bennerinformatics/ember-fw-table 2.1.1 → 2.1.3

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.
@@ -1,4 +1,4 @@
1
- <FwFullscreenModal @modal="confirm-choice" @size="xs" @model={{hash
1
+ <FwFullscreenModal @modal="confirm-choice" @size="sm" @model={{hash
2
2
  confirmButtonText="Delete"
3
3
  confirmButtonStyle="danger"
4
4
  confirmButtonIcon="fa-regular fa-trash-can"
@@ -36,7 +36,7 @@
36
36
 
37
37
  {{!-- Second page numbers --}}
38
38
  {{#if (and showPages showPagesBottom)}}
39
- <div class="text-center" style="overflow:auto">
39
+ <div class="text-center">
40
40
  <PageNumbers @content={{hash }} @showFL={{true}} @currentPage={{page}} @numPagesToShow={{maxPageButtons}} @totalPages={{totalPages}} @action={{action "setPage"}} />
41
41
  </div>
42
42
  {{/if}}
@@ -60,7 +60,7 @@ export function formatNullable(nullText = 'None') {
60
60
  }
61
61
 
62
62
  /**
63
- * Generates a function which formats a moment based on the specified format. Designed to be used in the following way with a column displaying a date (after importing `formatMoment` in the way described above):
63
+ * Generates a function which formats a date based on the specified format. Designed to be used in the following way with a column displaying a date (after importing `formatMoment` in the way described above):
64
64
  * ```js
65
65
  * column: [
66
66
  * //will display date as 1970-01-01
@@ -80,14 +80,18 @@ export function formatNullable(nullText = 'None') {
80
80
  * @method formatMoment
81
81
  * @param {String} format moment format. For a list of valid strings, see [Moment docs](https://momentjs.com/docs/#/displaying/format/)
82
82
  * @param {String} exportFormat moment format used on exporting
83
- * @return {Function} Function to pass into a column which formats by a moment
83
+ * @return {Function} Function to pass into a column which formats a date
84
84
  */
85
85
  export function formatMoment(format, exportFormat = null) {
86
86
  return function(date) {
87
- if (moment.isMoment(date)) {
88
- // if we are exporting and have an export format, use that
89
- let useFormat = exportFormat && this['export'] ? exportFormat : format;
90
- return date.format(useFormat);
87
+ if (!date) {
88
+ return null;
91
89
  }
90
+ if (!moment.isMoment(date)) {
91
+ date = moment(date);
92
+ }
93
+ // if we are exporting and have an export format, use that
94
+ let useFormat = exportFormat && this.export ? exportFormat : format;
95
+ return date.format(useFormat);
92
96
  };
93
97
  }
package/codemods.log ADDED
@@ -0,0 +1,16 @@
1
+ 2024-07-08T21:10:22.429Z [warn] WARNING: {{fw-fullscreen-modal}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-delete-modal.hbs
2
+ 2024-07-08T21:10:22.475Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-pagination-wrapper.hbs
3
+ 2024-07-08T21:10:22.478Z [warn] WARNING: {{fw-table-sortable}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-pagination-wrapper.hbs
4
+ 2024-07-08T21:10:22.478Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-pagination-wrapper.hbs
5
+ 2024-07-08T21:10:22.600Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-resort.hbs
6
+ 2024-07-08T21:10:22.633Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-sortable.hbs
7
+ 2024-07-08T21:10:22.633Z [warn] WARNING: {{or}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-sortable.hbs
8
+ 2024-07-08T21:10:22.634Z [warn] WARNING: {{light-table}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-sortable.hbs
9
+ 2024-07-08T21:10:22.637Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-sortable.hbs
10
+ 2024-07-09T14:00:38.763Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-pagination-wrapper.hbs
11
+ 2024-07-09T14:00:38.767Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-pagination-wrapper.hbs
12
+ 2024-07-09T14:00:38.954Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-resort.hbs
13
+ 2024-07-09T14:00:38.988Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-sortable.hbs
14
+ 2024-07-09T14:00:38.988Z [warn] WARNING: {{or}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-sortable.hbs
15
+ 2024-07-09T14:00:38.988Z [warn] WARNING: {{light-table}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-sortable.hbs
16
+ 2024-07-09T14:00:38.989Z [warn] WARNING: {{yield}} was not converted as it has positional parameters which can't be automatically converted. Source: addon/templates/components/fw-table-sortable.hbs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bennerinformatics/ember-fw-table",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "Additional resources related to tables for the Ember FW App System.",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -22,14 +22,14 @@
22
22
  "dependencies": {
23
23
  "ember-cli-babel": "7.13.2",
24
24
  "ember-cli-htmlbars": "^3.1.0",
25
- "ember-light-table": "2.0.0-beta.5",
25
+ "ember-light-table": "3.0.0-beta.1",
26
26
  "ember-papaparse": "^1.0.0",
27
27
  "ember-truth-helpers": "^2.1.0",
28
28
  "sass": "1.32.13",
29
29
  "papaparse": "^5.0.2"
30
30
  },
31
31
  "devDependencies": {
32
- "@bennerinformatics/ember-fw": "^2.0.29",
32
+ "@bennerinformatics/ember-fw": "^2.0.32",
33
33
  "broccoli-asset-rev": "^3.0.0",
34
34
  "ember-ajax": "^5.0.0",
35
35
  "ember-cli": "~3.10.0",