@nanoporetech-digital/components 4.1.0 → 4.3.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.
Files changed (106) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/{local-my-account-a3362993.js → local-my-account-d79ed0a2.js} +1 -1
  4. package/dist/cjs/{local-my-account-a3362993.js.map → local-my-account-d79ed0a2.js.map} +1 -1
  5. package/dist/cjs/nano-checkbox.cjs.entry.js +1 -1
  6. package/dist/cjs/nano-checkbox.cjs.entry.js.map +1 -1
  7. package/dist/cjs/nano-components.cjs.js +1 -1
  8. package/dist/cjs/nano-demo.cjs.entry.js +48 -47
  9. package/dist/cjs/nano-demo.cjs.entry.js.map +1 -1
  10. package/dist/cjs/nano-details.cjs.entry.js.map +1 -1
  11. package/dist/cjs/nano-global-nav.cjs.entry.js +20 -7
  12. package/dist/cjs/nano-global-nav.cjs.entry.js.map +1 -1
  13. package/dist/cjs/nano-overflow-nav.cjs.entry.js +4 -3
  14. package/dist/cjs/nano-overflow-nav.cjs.entry.js.map +1 -1
  15. package/dist/cjs/{nano-table-c5b6630a.js → nano-table-71a8a462.js} +2 -2
  16. package/dist/cjs/nano-table-71a8a462.js.map +1 -0
  17. package/dist/cjs/nano-table.cjs.entry.js +1 -1
  18. package/dist/cjs/{table.worker-0876611d.js → table.worker-2d617318.js} +2 -2
  19. package/dist/cjs/table.worker-2d617318.js.map +1 -0
  20. package/dist/collection/components/checkbox/checkbox.css +18 -12
  21. package/dist/collection/components/demo/demo.js +48 -47
  22. package/dist/collection/components/demo/demo.js.map +1 -1
  23. package/dist/collection/components/details/details.js +1 -0
  24. package/dist/collection/components/details/details.js.map +1 -1
  25. package/dist/collection/components/global-nav/assets/local-my-account.json +341 -0
  26. package/dist/collection/components/global-nav/global-nav.js +51 -6
  27. package/dist/collection/components/global-nav/global-nav.js.map +1 -1
  28. package/dist/collection/components/global-nav/style/global-nav.css +2 -1
  29. package/dist/collection/components/overflow-nav/overflow-nav.css +9 -9
  30. package/dist/collection/components/overflow-nav/overflow-nav.js +4 -3
  31. package/dist/collection/components/overflow-nav/overflow-nav.js.map +1 -1
  32. package/dist/collection/components/table/table-interface.js.map +1 -1
  33. package/dist/collection/components/table/table.js +8 -4
  34. package/dist/collection/components/table/table.js.map +1 -1
  35. package/dist/components/nano-checkbox.js +1 -1
  36. package/dist/components/nano-checkbox.js.map +1 -1
  37. package/dist/components/nano-demo.js +48 -47
  38. package/dist/components/nano-demo.js.map +1 -1
  39. package/dist/components/nano-details.js.map +1 -1
  40. package/dist/components/nano-global-nav.js +21 -7
  41. package/dist/components/nano-global-nav.js.map +1 -1
  42. package/dist/components/nano-overflow-nav.js +4 -3
  43. package/dist/components/nano-overflow-nav.js.map +1 -1
  44. package/dist/components/table.js.map +1 -1
  45. package/dist/esm/loader.js +1 -1
  46. package/dist/esm/{local-my-account-964c8ad7.js → local-my-account-6662da72.js} +1 -1
  47. package/dist/esm/{local-my-account-964c8ad7.js.map → local-my-account-6662da72.js.map} +1 -1
  48. package/dist/esm/nano-checkbox.entry.js +1 -1
  49. package/dist/esm/nano-checkbox.entry.js.map +1 -1
  50. package/dist/esm/nano-components.js +1 -1
  51. package/dist/esm/nano-demo.entry.js +48 -47
  52. package/dist/esm/nano-demo.entry.js.map +1 -1
  53. package/dist/esm/nano-details.entry.js.map +1 -1
  54. package/dist/esm/nano-global-nav.entry.js +20 -7
  55. package/dist/esm/nano-global-nav.entry.js.map +1 -1
  56. package/dist/esm/nano-overflow-nav.entry.js +4 -3
  57. package/dist/esm/nano-overflow-nav.entry.js.map +1 -1
  58. package/dist/esm/{nano-table-ff985e63.js → nano-table-d4b1d315.js} +2 -2
  59. package/dist/esm/nano-table-d4b1d315.js.map +1 -0
  60. package/dist/esm/nano-table.entry.js +1 -1
  61. package/dist/esm/{table.worker-906bc297.js → table.worker-ebfd9cd4.js} +2 -2
  62. package/dist/esm/table.worker-ebfd9cd4.js.map +1 -0
  63. package/dist/nano-assets/hash.txt +1 -1
  64. package/dist/nano-assets/local-my-account.json +341 -0
  65. package/dist/nano-components/assets/local-my-account.json +341 -0
  66. package/dist/nano-components/assets/ont-logo.svg +89 -0
  67. package/dist/nano-components/assets/ont-wheel-light.svg +31 -0
  68. package/dist/nano-components/nano-components.esm.js +1 -1
  69. package/dist/nano-components/nano-components.esm.js.map +1 -1
  70. package/dist/nano-components/p-0038620d.js +5 -0
  71. package/dist/nano-components/{p-c53b232e.js → p-2155fc2c.js} +1 -1
  72. package/dist/nano-components/p-55d71567.entry.js +5 -0
  73. package/dist/nano-components/{p-d0e15e46.entry.js.map → p-55d71567.entry.js.map} +1 -1
  74. package/dist/nano-components/p-62052277.entry.js +5 -0
  75. package/dist/nano-components/p-62052277.entry.js.map +1 -0
  76. package/dist/nano-components/p-76a650b1.entry.js.map +1 -1
  77. package/dist/nano-components/{p-f93bd976.entry.js → p-b38cabe2.entry.js} +2 -2
  78. package/dist/nano-components/p-b38cabe2.entry.js.map +1 -0
  79. package/dist/nano-components/{p-c38a246f.entry.js → p-c32fbbf0.entry.js} +2 -2
  80. package/dist/nano-components/p-dc8fd62d.entry.js +5 -0
  81. package/dist/nano-components/p-dc8fd62d.entry.js.map +1 -0
  82. package/dist/nano-components/{p-13dd65c9.js → p-f5b6ccdb.js} +2 -2
  83. package/dist/nano-components/{p-13dd65c9.js.map → p-f5b6ccdb.js.map} +1 -1
  84. package/dist/types/components/demo/demo.d.ts +1 -0
  85. package/dist/types/components/details/details.d.ts +1 -0
  86. package/dist/types/components/global-nav/global-nav.d.ts +12 -0
  87. package/dist/types/components/table/table-interface.d.ts +5 -2
  88. package/dist/types/components/table/table.d.ts +1 -1
  89. package/dist/types/components.d.ts +7 -2
  90. package/docs-json.json +102 -27
  91. package/hydrate/index.js +82 -58
  92. package/package.json +2 -2
  93. package/dist/cjs/nano-table-c5b6630a.js.map +0 -1
  94. package/dist/cjs/table.worker-0876611d.js.map +0 -1
  95. package/dist/esm/nano-table-ff985e63.js.map +0 -1
  96. package/dist/esm/table.worker-906bc297.js.map +0 -1
  97. package/dist/nano-components/p-4b136a65.js +0 -5
  98. package/dist/nano-components/p-583d8d70.entry.js +0 -5
  99. package/dist/nano-components/p-583d8d70.entry.js.map +0 -1
  100. package/dist/nano-components/p-d0e15e46.entry.js +0 -5
  101. package/dist/nano-components/p-f2d89239.entry.js +0 -5
  102. package/dist/nano-components/p-f2d89239.entry.js.map +0 -1
  103. package/dist/nano-components/p-f93bd976.entry.js.map +0 -1
  104. /package/dist/nano-components/{p-4b136a65.js.map → p-0038620d.js.map} +0 -0
  105. /package/dist/nano-components/{p-c38a246f.entry.js.map → p-2155fc2c.js.map} +0 -0
  106. /package/dist/nano-components/{p-c53b232e.js.map → p-c32fbbf0.entry.js.map} +0 -0
@@ -2,5 +2,6 @@ import { ComponentInterface } from '../../stencil-public-runtime';
2
2
  export declare class Demo implements ComponentInterface {
3
3
  private order;
4
4
  private lineItemTotal;
5
+ private columns;
5
6
  render(): any;
6
7
  }
@@ -8,6 +8,7 @@ import type { Color } from '../../interface';
8
8
  * @slot icon-start - used for icons at the start of the handle
9
9
  * @slot label - can be used when you wish to insert complex label markup
10
10
  * @slot icon-end - used for icons at the end of the handle
11
+ *
11
12
  * @part button - the main details ui control
12
13
  * @part label - the text wrapper of the ui control
13
14
  * @part icon--start - the icon wrapper at the start of the ui control
@@ -15,6 +15,13 @@ import type { SearchIndex, AloliaSearchResultDetail, MyAccountUser, MyAccountDat
15
15
  * @slot promotion - a free area for any promotional content, displayed within the overflow menu panel
16
16
  * @slot logo - when show-logo="false" you can utilise the logo slot
17
17
  * @slot - if using search functionality, place a `<nano-search-results />` element in the default slot
18
+ *
19
+ * @part burger - the overflow / burger menu
20
+ * @part burger-actions-bar - the top bar of the overflow / burger menu
21
+ * @part burger-content - the main content area of the overflow / burger menu
22
+ * @part main-bar - the main nav menu bar
23
+ * @part logo-link - the link wrapping the logo
24
+ * @part search-bar - the search bar that appears under the main nav menu bar
18
25
  */
19
26
  export declare class GlobalNav implements ComponentInterface {
20
27
  private io;
@@ -177,6 +184,11 @@ export declare class GlobalNav implements ComponentInterface {
177
184
  * Submit the search form (a search value must be present)
178
185
  */
179
186
  submitSearch(): Promise<void>;
187
+ /**
188
+ * Manually open or close the overflow (burger) menu
189
+ * @param openClose - optionally force open (true) or close (false)
190
+ */
191
+ toggleOverflowMenu(openClose?: boolean): Promise<void>;
180
192
  getMyAccData(): Promise<void>;
181
193
  currentSelectedIndex(): SearchIndex;
182
194
  changeInternalSearchVal(): void;
@@ -191,7 +191,7 @@ export declare namespace TableTypes {
191
191
  * Row renderer property. Called during the rendering of a tables head and foot
192
192
  * controlling their visual state.
193
193
  */
194
- interface HeadFootRenderer {
194
+ interface HeadFootRenderer<T = RowData> {
195
195
  /** Function to decide whether the row is vertically pinned. Defaults to `start` for the header and `end` the footer */
196
196
  pinned: Position;
197
197
  /**
@@ -200,7 +200,7 @@ export declare namespace TableTypes {
200
200
  * If used, and you want to see the rendered row, you *must* nest it within your
201
201
  * jsx function e.g. `(h, props) => { return [props.renderedRow, <tr><td>Custom thing</td></tr>]}`
202
202
  **/
203
- template?: RowTemplateFunc<VNode | VNode[], null>;
203
+ template?: RowTemplateFunc<VNode | VNode[], T>;
204
204
  /** A function which can be used to apply any html attribute/s onto a table row `tr` */
205
205
  rowProperties?: () => RowProps | void | undefined;
206
206
  }
@@ -211,6 +211,9 @@ export declare namespace TableTypes {
211
211
  class NanoTable<T = RowGeneric> {
212
212
  rows: T[];
213
213
  columns: ColumnConfig<T>[];
214
+ rowRender: RowRenderer<T>;
215
+ headRender: HeadFootRenderer<T>;
216
+ footRender: HeadFootRenderer<T>;
214
217
  }
215
218
  type Falsy = false | 0 | '' | null | undefined;
216
219
  }
@@ -40,7 +40,7 @@ export declare class Table implements ComponentInterface {
40
40
  rows: TableTypes.NanoTable['rows'] | Promise<TableTypes.NanoTable['rows']>;
41
41
  handleRowsChange(): void;
42
42
  /** The column config used to present the rows of data */
43
- columns: TableTypes.NanoTable['columns'];
43
+ columns: TableTypes.NanoTable<any>['columns'];
44
44
  handleColsChange(): Promise<void>;
45
45
  /** Used for custom thead row rendering */
46
46
  headRender: TableTypes.HeadFootRenderer;
@@ -1078,6 +1078,11 @@ export namespace Components {
1078
1078
  * Submit the search form (a search value must be present)
1079
1079
  */
1080
1080
  "submitSearch": () => Promise<void>;
1081
+ /**
1082
+ * Manually open or close the overflow (burger) menu
1083
+ * @param openClose - optionally force open (true) or close (false)
1084
+ */
1085
+ "toggleOverflowMenu": (openClose?: boolean) => Promise<void>;
1081
1086
  }
1082
1087
  /**
1083
1088
  * Nanopore digital global navigation user profile.
@@ -2264,7 +2269,7 @@ export namespace Components {
2264
2269
  /**
2265
2270
  * The column config used to present the rows of data
2266
2271
  */
2267
- "columns": TableTypes.NanoTable['columns'];
2272
+ "columns": TableTypes.NanoTable<any>['columns'];
2268
2273
  /**
2269
2274
  * A custom filtering function. Should return a promise. If the promise resolves as `true` the column UI will be updated. If the promise resolves as falsey, the sort will be performed by the component. A good use-case would be performing the filter on a server / via fetch. Then on success, updating the table's data via the `rows` property
2270
2275
  */
@@ -5494,7 +5499,7 @@ declare namespace LocalJSX {
5494
5499
  /**
5495
5500
  * The column config used to present the rows of data
5496
5501
  */
5497
- "columns"?: TableTypes.NanoTable['columns'];
5502
+ "columns"?: TableTypes.NanoTable<any>['columns'];
5498
5503
  /**
5499
5504
  * A custom filtering function. Should return a promise. If the promise resolves as `true` the column UI will be updated. If the promise resolves as falsey, the sort will be performed by the component. A good use-case would be performing the filter on a server / via fetch. Then on success, updating the table's data via the `rows` property
5500
5505
  */
package/docs-json.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2023-03-06T12:14:11",
2
+ "timestamp": "2023-03-08T17:53:37",
3
3
  "compiler": {
4
4
  "name": "@stencil/core",
5
5
  "version": "2.23.0",
@@ -2045,10 +2045,20 @@
2045
2045
  "annotation": "prop",
2046
2046
  "docs": "Initial Bg color of radio / checkbox controls. Changes for [checked] and [disabled] states. Defaults to #fff;"
2047
2047
  },
2048
+ {
2049
+ "name": "--check-border-color",
2050
+ "annotation": "prop",
2051
+ "docs": "initial border color. Defaults to #b5aea7;"
2052
+ },
2053
+ {
2054
+ "name": "--check-border-size",
2055
+ "annotation": "prop",
2056
+ "docs": "initial border size. Default to 1px;"
2057
+ },
2048
2058
  {
2049
2059
  "name": "--check-border-style",
2050
2060
  "annotation": "prop",
2051
- "docs": "Initial border style. Defaults to 1px solid #b5aea7;"
2061
+ "docs": "Initial border style. Defaults to var(--check-border-size) solid var(--check-border-color);"
2052
2062
  },
2053
2063
  {
2054
2064
  "name": "--check-checked-bg-color",
@@ -6413,6 +6423,30 @@
6413
6423
  {
6414
6424
  "name": "slot",
6415
6425
  "text": "- if using search functionality, place a `<nano-search-results />` element in the default slot"
6426
+ },
6427
+ {
6428
+ "name": "part",
6429
+ "text": "burger - the overflow / burger menu"
6430
+ },
6431
+ {
6432
+ "name": "part",
6433
+ "text": "burger-actions-bar - the top bar of the overflow / burger menu"
6434
+ },
6435
+ {
6436
+ "name": "part",
6437
+ "text": "burger-content - the main content area of the overflow / burger menu"
6438
+ },
6439
+ {
6440
+ "name": "part",
6441
+ "text": "main-bar - the main nav menu bar"
6442
+ },
6443
+ {
6444
+ "name": "part",
6445
+ "text": "logo-link - the link wrapping the logo"
6446
+ },
6447
+ {
6448
+ "name": "part",
6449
+ "text": "search-bar - the search bar that appears under the main nav menu bar"
6416
6450
  }
6417
6451
  ],
6418
6452
  "usage": {},
@@ -6806,6 +6840,22 @@
6806
6840
  "parameters": [],
6807
6841
  "docs": "Submit the search form (a search value must be present)",
6808
6842
  "docsTags": []
6843
+ },
6844
+ {
6845
+ "name": "toggleOverflowMenu",
6846
+ "returns": {
6847
+ "type": "Promise<void>",
6848
+ "docs": ""
6849
+ },
6850
+ "signature": "toggleOverflowMenu(openClose?: boolean) => Promise<void>",
6851
+ "parameters": [],
6852
+ "docs": "Manually open or close the overflow (burger) menu",
6853
+ "docsTags": [
6854
+ {
6855
+ "name": "param",
6856
+ "text": "openClose - optionally force open (true) or close (false)"
6857
+ }
6858
+ ]
6809
6859
  }
6810
6860
  ],
6811
6861
  "events": [
@@ -7008,7 +7058,32 @@
7008
7058
  "docs": "nano-nav-item's to display with site links that come from MyAccount"
7009
7059
  }
7010
7060
  ],
7011
- "parts": [],
7061
+ "parts": [
7062
+ {
7063
+ "name": "burger",
7064
+ "docs": "the overflow / burger menu"
7065
+ },
7066
+ {
7067
+ "name": "burger-actions-bar",
7068
+ "docs": "the top bar of the overflow / burger menu"
7069
+ },
7070
+ {
7071
+ "name": "burger-content",
7072
+ "docs": "the main content area of the overflow / burger menu"
7073
+ },
7074
+ {
7075
+ "name": "logo-link",
7076
+ "docs": "the link wrapping the logo"
7077
+ },
7078
+ {
7079
+ "name": "main-bar",
7080
+ "docs": "the main nav menu bar"
7081
+ },
7082
+ {
7083
+ "name": "search-bar",
7084
+ "docs": "the search bar that appears under the main nav menu bar"
7085
+ }
7086
+ ],
7012
7087
  "dependents": [],
7013
7088
  "dependencies": [
7014
7089
  "nano-select",
@@ -10959,49 +11034,49 @@
10959
11034
  "listeners": [],
10960
11035
  "styles": [
10961
11036
  {
10962
- "name": "--fade-size. The size of the fade areas (when items do not fit). Defaults to 1.75rem;",
11037
+ "name": "--fade-size",
10963
11038
  "annotation": "prop",
10964
- "docs": ""
11039
+ "docs": "The size of the fade areas (when items do not fit). Defaults to 1.75rem;"
10965
11040
  },
10966
11041
  {
10967
- "name": "--fade-transparency. Defaults to 0;",
11042
+ "name": "--fade-transparency",
10968
11043
  "annotation": "prop",
10969
- "docs": ""
11044
+ "docs": "Defaults to 0;"
10970
11045
  },
10971
11046
  {
10972
- "name": "--indicator-color. Defaults to #90c6e7;",
11047
+ "name": "--indicator-color",
10973
11048
  "annotation": "prop",
10974
- "docs": ""
11049
+ "docs": "Defaults to #90c6e7;"
10975
11050
  },
10976
11051
  {
10977
- "name": "--indicator-size. Defaults to 0;",
11052
+ "name": "--indicator-size",
10978
11053
  "annotation": "prop",
10979
- "docs": ""
11054
+ "docs": "Defaults to 0;"
10980
11055
  },
10981
11056
  {
10982
- "name": "--indicator-track-color. Defaults to #e4e6e8;",
11057
+ "name": "--indicator-track-color",
10983
11058
  "annotation": "prop",
10984
- "docs": ""
11059
+ "docs": "Defaults to #e4e6e8;"
10985
11060
  },
10986
11061
  {
10987
- "name": "--indicator-track-size. Defaults to var(--indicator-size);",
11062
+ "name": "--indicator-track-size",
10988
11063
  "annotation": "prop",
10989
- "docs": ""
11064
+ "docs": "Defaults to var(--indicator-size);"
10990
11065
  },
10991
11066
  {
10992
- "name": "--indicator-transition. Defaults to var(--nano-transition-fast, 0.3s)",
11067
+ "name": "--indicator-transition",
10993
11068
  "annotation": "prop",
10994
- "docs": ""
11069
+ "docs": "Defaults to var(--nano-transition-fast, 0.3s)"
10995
11070
  },
10996
11071
  {
10997
- "name": "--padding. Padding that matches the fade size will stop items shifting if fade areas are added (i.e when items do not fit). Defaults to var(--fade-size);",
11072
+ "name": "--padding",
10998
11073
  "annotation": "prop",
10999
- "docs": ""
11074
+ "docs": "Padding that matches the fade size will stop items shifting if fade areas are added (i.e when items do not fit). Defaults to var(--fade-size);"
11000
11075
  },
11001
11076
  {
11002
- "name": "--scroll-btn-color. Defaults to 'currentColor';",
11077
+ "name": "--scroll-btn-color",
11003
11078
  "annotation": "prop",
11004
- "docs": ""
11079
+ "docs": "Defaults to 'currentColor';"
11005
11080
  }
11006
11081
  ],
11007
11082
  "slots": [
@@ -15125,7 +15200,7 @@
15125
15200
  },
15126
15201
  {
15127
15202
  "name": "columns",
15128
- "type": "ColumnConfig<RowGeneric>[]",
15203
+ "type": "ColumnConfig<any>[]",
15129
15204
  "mutable": true,
15130
15205
  "reflectToAttr": false,
15131
15206
  "docs": "The column config used to present the rows of data",
@@ -15133,7 +15208,7 @@
15133
15208
  "default": "[]",
15134
15209
  "values": [
15135
15210
  {
15136
- "type": "ColumnConfig<RowGeneric>[]"
15211
+ "type": "ColumnConfig<any>[]"
15137
15212
  }
15138
15213
  ],
15139
15214
  "optional": false,
@@ -15221,7 +15296,7 @@
15221
15296
  },
15222
15297
  {
15223
15298
  "name": "footRender",
15224
- "type": "HeadFootRenderer",
15299
+ "type": "HeadFootRenderer<RowData<RowGeneric>>",
15225
15300
  "mutable": false,
15226
15301
  "reflectToAttr": false,
15227
15302
  "docs": "Used for custom tfoot row rendering",
@@ -15229,7 +15304,7 @@
15229
15304
  "default": "{ pinned: 'bottom' }",
15230
15305
  "values": [
15231
15306
  {
15232
- "type": "HeadFootRenderer"
15307
+ "type": "HeadFootRenderer<RowData<RowGeneric>>"
15233
15308
  }
15234
15309
  ],
15235
15310
  "optional": false,
@@ -15239,7 +15314,7 @@
15239
15314
  },
15240
15315
  {
15241
15316
  "name": "headRender",
15242
- "type": "HeadFootRenderer",
15317
+ "type": "HeadFootRenderer<RowData<RowGeneric>>",
15243
15318
  "mutable": false,
15244
15319
  "reflectToAttr": false,
15245
15320
  "docs": "Used for custom thead row rendering",
@@ -15247,7 +15322,7 @@
15247
15322
  "default": "{ pinned: 'top' }",
15248
15323
  "values": [
15249
15324
  {
15250
- "type": "HeadFootRenderer"
15325
+ "type": "HeadFootRenderer<RowData<RowGeneric>>"
15251
15326
  }
15252
15327
  ],
15253
15328
  "optional": false,