ember-headless-table 1.0.0 → 1.1.0

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.
@@ -14,4 +14,12 @@ declare const isResizing: (column: Column) => boolean;
14
14
  * Does the column have room to shrink?
15
15
  */
16
16
  declare const canShrink: (column: Column) => boolean | 0;
17
- export { isResizing, canShrink };
17
+ /**
18
+ * Does the column have a resize handle?
19
+ * The return value of this function can be determined by
20
+ * - if resizing is enabled for the column
21
+ * - if resizing is enabled for the whole table
22
+ * - or if we're asking about the first column (resize handles may only be "between" columns)
23
+ */
24
+ declare const hasResizeHandle: (column: Column) => boolean;
25
+ export { isResizing, canShrink, hasResizeHandle };
@@ -17,6 +17,15 @@ const isResizing = column => meta.forColumn(column, ColumnResizing).isResizing;
17
17
  */
18
18
 
19
19
  const canShrink = column => meta.forColumn(column, ColumnResizing).canShrink;
20
+ /**
21
+ * Does the column have a resize handle?
22
+ * The return value of this function can be determined by
23
+ * - if resizing is enabled for the column
24
+ * - if resizing is enabled for the whole table
25
+ * - or if we're asking about the first column (resize handles may only be "between" columns)
26
+ */
27
+
28
+ const hasResizeHandle = column => meta.forColumn(column, ColumnResizing).hasResizeHandle;
20
29
 
21
- export { canShrink, isResizing };
30
+ export { canShrink, hasResizeHandle, isResizing };
22
31
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../../src/plugins/column-resizing/helpers.ts"],"sourcesContent":["import { meta } from '../-private/base';\nimport { ColumnResizing } from './plugin';\n\nimport type { Column } from '[public-types]';\n\n/**\n * The column actively being resized by the user.\n *\n * Note that during resizing, multiple columns are resized at once,\n * dependending on the boundaries of the resize events.\n *\n * The other columns being resized as a consequence of \"this\" column will not\n * be marked as isResizing, because this is a user-scoped question:\n * \"Is the user directly resizing this column?\"\n */\nexport const isResizing = (column: Column) => meta.forColumn(column, ColumnResizing).isResizing;\n\n/**\n * Does the column have room to shrink?\n */\nexport const canShrink = (column: Column) => meta.forColumn(column, ColumnResizing).canShrink;\n"],"names":["isResizing","column","meta","forColumn","ColumnResizing","canShrink"],"mappings":";;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACaA,MAAAA,UAAU,GAAIC,MAAD,IAAoBC,IAAI,CAACC,SAAL,CAAeF,MAAf,EAAuBG,cAAvB,EAAuCJ,WAA9E;AAEP;AACA;AACA;;AACaK,MAAAA,SAAS,GAAIJ,MAAD,IAAoBC,IAAI,CAACC,SAAL,CAAeF,MAAf,EAAuBG,cAAvB,EAAuCC;;;;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../../src/plugins/column-resizing/helpers.ts"],"sourcesContent":["import { meta } from '../-private/base';\nimport { ColumnResizing } from './plugin';\n\nimport type { Column } from '[public-types]';\n\n/**\n * The column actively being resized by the user.\n *\n * Note that during resizing, multiple columns are resized at once,\n * dependending on the boundaries of the resize events.\n *\n * The other columns being resized as a consequence of \"this\" column will not\n * be marked as isResizing, because this is a user-scoped question:\n * \"Is the user directly resizing this column?\"\n */\nexport const isResizing = (column: Column) => meta.forColumn(column, ColumnResizing).isResizing;\n\n/**\n * Does the column have room to shrink?\n */\nexport const canShrink = (column: Column) => meta.forColumn(column, ColumnResizing).canShrink;\n\n/**\n * Does the column have a resize handle?\n * The return value of this function can be determined by\n * - if resizing is enabled for the column\n * - if resizing is enabled for the whole table\n * - or if we're asking about the first column (resize handles may only be \"between\" columns)\n */\nexport const hasResizeHandle = (column: Column) =>\n meta.forColumn(column, ColumnResizing).hasResizeHandle;\n"],"names":["isResizing","column","meta","forColumn","ColumnResizing","canShrink","hasResizeHandle"],"mappings":";;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACaA,MAAAA,UAAU,GAAIC,MAAD,IAAoBC,IAAI,CAACC,SAAL,CAAeF,MAAf,EAAuBG,cAAvB,EAAuCJ,WAA9E;AAEP;AACA;AACA;;AACaK,MAAAA,SAAS,GAAIJ,MAAD,IAAoBC,IAAI,CAACC,SAAL,CAAeF,MAAf,EAAuBG,cAAvB,EAAuCC,UAA7E;AAEP;AACA;AACA;AACA;AACA;AACA;AACA;;AACaC,MAAAA,eAAe,GAAIL,MAAD,IAC7BC,IAAI,CAACC,SAAL,CAAeF,MAAf,EAAuBG,cAAvB,EAAuCE;;;;"}
@@ -1,4 +1,4 @@
1
1
  export { resizeHandle } from './handle.js';
2
- export { canShrink, isResizing } from './helpers.js';
2
+ export { canShrink, hasResizeHandle, isResizing } from './helpers.js';
3
3
  export { ColumnResizing, ColumnResizing as Plugin } from './plugin.js';
4
4
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-headless-table",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "An implementation of table behaviors for driving any table or table-like UI -- all without a UI (headless)",
5
5
  "keywords": [
6
6
  "ember-addon",