@energinet/watt 0.0.1

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 (291) hide show
  1. package/LICENSE +201 -0
  2. package/badge/index.d.ts +17 -0
  3. package/badge/watt-badge.component.d.ts +15 -0
  4. package/breadcrumbs/index.d.ts +17 -0
  5. package/breadcrumbs/watt-breadcrumbs.component.d.ts +23 -0
  6. package/button/index.d.ts +17 -0
  7. package/button/watt-button.component.d.ts +20 -0
  8. package/card/index.d.ts +18 -0
  9. package/card/watt-card-title.component.d.ts +6 -0
  10. package/card/watt-card.component.d.ts +15 -0
  11. package/checkbox/index.d.ts +17 -0
  12. package/checkbox/watt-checkbox.component.d.ts +17 -0
  13. package/chip/index.d.ts +23 -0
  14. package/chip/watt-action-chip.component.d.ts +8 -0
  15. package/chip/watt-chip.component.d.ts +8 -0
  16. package/chip/watt-chip.directive.d.ts +16 -0
  17. package/chip/watt-date-chip.component.d.ts +29 -0
  18. package/chip/watt-date-range-chip.component.d.ts +50 -0
  19. package/chip/watt-filter-chip.component.d.ts +30 -0
  20. package/chip/watt-menu-chip.component.d.ts +30 -0
  21. package/clipboard/index.d.ts +18 -0
  22. package/clipboard/watt-clipboard-intl.service.d.ts +7 -0
  23. package/clipboard/watt-copy-to-clipboard.directive.d.ts +12 -0
  24. package/code/index.d.ts +18 -0
  25. package/code/watt-code.component.d.ts +32 -0
  26. package/code/watt-code.worker.token.d.ts +18 -0
  27. package/core/breakpoints/_breakpoints.import.scss +53 -0
  28. package/core/breakpoints/_include-media.scss +568 -0
  29. package/core/breakpoints/breakpoints-observer.d.ts +39 -0
  30. package/core/breakpoints/breakpoints.d.ts +29 -0
  31. package/core/breakpoints/index.d.ts +18 -0
  32. package/core/color/+storybook/storybook-colors-overview.component.scss +50 -0
  33. package/core/color/color-helper.service.d.ts +12 -0
  34. package/core/color/colors.d.ts +51 -0
  35. package/core/color/index.d.ts +18 -0
  36. package/core/date/dayjs.d.ts +22 -0
  37. package/core/date/index.d.ts +23 -0
  38. package/core/date/watt-danish-datetime.providers.d.ts +1 -0
  39. package/core/date/watt-date-adapter.d.ts +31 -0
  40. package/core/date/watt-date-range.d.ts +25 -0
  41. package/core/date/watt-date.pipe.d.ts +28 -0
  42. package/core/date/watt-format-date.d.ts +11 -0
  43. package/core/date/watt-locale.service.d.ts +13 -0
  44. package/core/styles/@energinet-datahub/watt/_index.scss +52 -0
  45. package/core/styles/@energinet-datahub/watt/_utils.scss +16 -0
  46. package/core/styles/@energinet-datahub/watt/theme/light-theme.scss +71 -0
  47. package/core/styles/@energinet-datahub/watt/theme/material-overwrites/datepicker.scss +69 -0
  48. package/core/styles/@energinet-datahub/watt/theme/material-overwrites/snack-bar.scss +26 -0
  49. package/core/styles/_box-sizing.scss +22 -0
  50. package/core/styles/_chips.scss +22 -0
  51. package/core/styles/_elevation.scss +18 -0
  52. package/core/styles/_hr.scss +20 -0
  53. package/core/styles/_table.scss +89 -0
  54. package/core/styles/_tokens.scss +134 -0
  55. package/core/styles/_tooltip.scss +64 -0
  56. package/core/styles/_variables.scss +106 -0
  57. package/core/styles/_vater.scss +69 -0
  58. package/core/styles/spacing/+storybook/storybook-spacing-overview.component.scss +25 -0
  59. package/core/styles/spacing/_baseline.scss +23 -0
  60. package/core/styles/spacing/_inline.scss +38 -0
  61. package/core/styles/spacing/_inset.scss +61 -0
  62. package/core/styles/spacing/_spacing.import.scss +113 -0
  63. package/core/styles/spacing/_stack.scss +38 -0
  64. package/core/styles/spacing/_variables.scss +14 -0
  65. package/core/styles/spacing/index.scss +18 -0
  66. package/core/styles/typography/+storybook/storybook-typography-overview.component.scss +78 -0
  67. package/core/styles/typography/_rem.scss +24 -0
  68. package/core/styles/typography/_typography.import.scss +195 -0
  69. package/core/styles/typography/index.scss +118 -0
  70. package/data/index.d.ts +20 -0
  71. package/data/watt-data-actions.component.d.ts +5 -0
  72. package/data/watt-data-filters.component.d.ts +5 -0
  73. package/data/watt-data-intl.service.d.ts +15 -0
  74. package/data/watt-data-table.component.d.ts +27 -0
  75. package/datetime-field/index.d.ts +17 -0
  76. package/datetime-field/watt-datetime-field.component.d.ts +39 -0
  77. package/description-list/index.d.ts +17 -0
  78. package/description-list/watt-description-list-item.component.d.ts +27 -0
  79. package/description-list/watt-description-list.component.d.ts +19 -0
  80. package/drawer/index.d.ts +21 -0
  81. package/drawer/watt-drawer-actions.component.d.ts +5 -0
  82. package/drawer/watt-drawer-content.component.d.ts +5 -0
  83. package/drawer/watt-drawer-heading.component.d.ts +5 -0
  84. package/drawer/watt-drawer-topbar.component.d.ts +5 -0
  85. package/drawer/watt-drawer.component.d.ts +61 -0
  86. package/dropdown/index.d.ts +19 -0
  87. package/dropdown/watt-dropdown-option.d.ts +22 -0
  88. package/dropdown/watt-dropdown-value.d.ts +17 -0
  89. package/dropdown/watt-dropdown.component.d.ts +195 -0
  90. package/empty-state/icons/explore.d.ts +5 -0
  91. package/empty-state/icons/no-results.d.ts +5 -0
  92. package/empty-state/icons/power.d.ts +5 -0
  93. package/empty-state/index.d.ts +20 -0
  94. package/empty-state/watt-empty-state.component.d.ts +16 -0
  95. package/expandable-card/index.d.ts +19 -0
  96. package/expandable-card/watt-expandable-card.component.d.ts +34 -0
  97. package/expansion/expansion.component.d.ts +18 -0
  98. package/expansion/index.d.ts +17 -0
  99. package/fesm2022/energinet-watt-badge.mjs +66 -0
  100. package/fesm2022/energinet-watt-badge.mjs.map +1 -0
  101. package/fesm2022/energinet-watt-breadcrumbs.mjs +116 -0
  102. package/fesm2022/energinet-watt-breadcrumbs.mjs.map +1 -0
  103. package/fesm2022/energinet-watt-button.mjs +120 -0
  104. package/fesm2022/energinet-watt-button.mjs.map +1 -0
  105. package/fesm2022/energinet-watt-card.mjs +117 -0
  106. package/fesm2022/energinet-watt-card.mjs.map +1 -0
  107. package/fesm2022/energinet-watt-checkbox.mjs +118 -0
  108. package/fesm2022/energinet-watt-checkbox.mjs.map +1 -0
  109. package/fesm2022/energinet-watt-chip.mjs +760 -0
  110. package/fesm2022/energinet-watt-chip.mjs.map +1 -0
  111. package/fesm2022/energinet-watt-clipboard.mjs +118 -0
  112. package/fesm2022/energinet-watt-clipboard.mjs.map +1 -0
  113. package/fesm2022/energinet-watt-code.mjs +119 -0
  114. package/fesm2022/energinet-watt-code.mjs.map +1 -0
  115. package/fesm2022/energinet-watt-core-breakpoints.mjs +100 -0
  116. package/fesm2022/energinet-watt-core-breakpoints.mjs.map +1 -0
  117. package/fesm2022/energinet-watt-core-color.mjs +127 -0
  118. package/fesm2022/energinet-watt-core-color.mjs.map +1 -0
  119. package/fesm2022/energinet-watt-core-date.mjs +260 -0
  120. package/fesm2022/energinet-watt-core-date.mjs.map +1 -0
  121. package/fesm2022/energinet-watt-data.mjs +286 -0
  122. package/fesm2022/energinet-watt-data.mjs.map +1 -0
  123. package/fesm2022/energinet-watt-datetime-field.mjs +233 -0
  124. package/fesm2022/energinet-watt-datetime-field.mjs.map +1 -0
  125. package/fesm2022/energinet-watt-description-list.mjs +130 -0
  126. package/fesm2022/energinet-watt-description-list.mjs.map +1 -0
  127. package/fesm2022/energinet-watt-drawer.mjs +271 -0
  128. package/fesm2022/energinet-watt-drawer.mjs.map +1 -0
  129. package/fesm2022/energinet-watt-dropdown.mjs +423 -0
  130. package/fesm2022/energinet-watt-dropdown.mjs.map +1 -0
  131. package/fesm2022/energinet-watt-empty-state.mjs +299 -0
  132. package/fesm2022/energinet-watt-empty-state.mjs.map +1 -0
  133. package/fesm2022/energinet-watt-expandable-card.mjs +151 -0
  134. package/fesm2022/energinet-watt-expandable-card.mjs.map +1 -0
  135. package/fesm2022/energinet-watt-expansion.mjs +78 -0
  136. package/fesm2022/energinet-watt-expansion.mjs.map +1 -0
  137. package/fesm2022/energinet-watt-field.mjs +249 -0
  138. package/fesm2022/energinet-watt-field.mjs.map +1 -0
  139. package/fesm2022/energinet-watt-icon-flags.mjs +376 -0
  140. package/fesm2022/energinet-watt-icon-flags.mjs.map +1 -0
  141. package/fesm2022/energinet-watt-icon.mjs +195 -0
  142. package/fesm2022/energinet-watt-icon.mjs.map +1 -0
  143. package/fesm2022/energinet-watt-modal.mjs +260 -0
  144. package/fesm2022/energinet-watt-modal.mjs.map +1 -0
  145. package/fesm2022/energinet-watt-paginator.mjs +164 -0
  146. package/fesm2022/energinet-watt-paginator.mjs.map +1 -0
  147. package/fesm2022/energinet-watt-phone-field.mjs +322 -0
  148. package/fesm2022/energinet-watt-phone-field.mjs.map +1 -0
  149. package/fesm2022/energinet-watt-picker-__shared.mjs +384 -0
  150. package/fesm2022/energinet-watt-picker-__shared.mjs.map +1 -0
  151. package/fesm2022/energinet-watt-picker-datepicker.mjs +430 -0
  152. package/fesm2022/energinet-watt-picker-datepicker.mjs.map +1 -0
  153. package/fesm2022/energinet-watt-picker-timepicker.mjs +394 -0
  154. package/fesm2022/energinet-watt-picker-timepicker.mjs.map +1 -0
  155. package/fesm2022/energinet-watt-progress-tracker.mjs +141 -0
  156. package/fesm2022/energinet-watt-progress-tracker.mjs.map +1 -0
  157. package/fesm2022/energinet-watt-query-params.mjs +95 -0
  158. package/fesm2022/energinet-watt-query-params.mjs.map +1 -0
  159. package/fesm2022/energinet-watt-radio.mjs +125 -0
  160. package/fesm2022/energinet-watt-radio.mjs.map +1 -0
  161. package/fesm2022/energinet-watt-search.mjs +126 -0
  162. package/fesm2022/energinet-watt-search.mjs.map +1 -0
  163. package/fesm2022/energinet-watt-shell.mjs +315 -0
  164. package/fesm2022/energinet-watt-shell.mjs.map +1 -0
  165. package/fesm2022/energinet-watt-slider.mjs +159 -0
  166. package/fesm2022/energinet-watt-slider.mjs.map +1 -0
  167. package/fesm2022/energinet-watt-spinner.mjs +72 -0
  168. package/fesm2022/energinet-watt-spinner.mjs.map +1 -0
  169. package/fesm2022/energinet-watt-stepper.mjs +185 -0
  170. package/fesm2022/energinet-watt-stepper.mjs.map +1 -0
  171. package/fesm2022/energinet-watt-table.mjs +423 -0
  172. package/fesm2022/energinet-watt-table.mjs.map +1 -0
  173. package/fesm2022/energinet-watt-tabs.mjs +254 -0
  174. package/fesm2022/energinet-watt-tabs.mjs.map +1 -0
  175. package/fesm2022/energinet-watt-text-field.mjs +316 -0
  176. package/fesm2022/energinet-watt-text-field.mjs.map +1 -0
  177. package/fesm2022/energinet-watt-textarea-field.mjs +136 -0
  178. package/fesm2022/energinet-watt-textarea-field.mjs.map +1 -0
  179. package/fesm2022/energinet-watt-toast.mjs +174 -0
  180. package/fesm2022/energinet-watt-toast.mjs.map +1 -0
  181. package/fesm2022/energinet-watt-tooltip.mjs +214 -0
  182. package/fesm2022/energinet-watt-tooltip.mjs.map +1 -0
  183. package/fesm2022/energinet-watt-utils-css.mjs +72 -0
  184. package/fesm2022/energinet-watt-utils-css.mjs.map +1 -0
  185. package/fesm2022/energinet-watt-utils-intersection-observer.mjs +83 -0
  186. package/fesm2022/energinet-watt-utils-intersection-observer.mjs.map +1 -0
  187. package/fesm2022/energinet-watt-utils-resize-observer.mjs +144 -0
  188. package/fesm2022/energinet-watt-utils-resize-observer.mjs.map +1 -0
  189. package/fesm2022/energinet-watt-validation-message.mjs +114 -0
  190. package/fesm2022/energinet-watt-validation-message.mjs.map +1 -0
  191. package/fesm2022/energinet-watt-validators.mjs +40 -0
  192. package/fesm2022/energinet-watt-validators.mjs.map +1 -0
  193. package/fesm2022/energinet-watt-vater.mjs +287 -0
  194. package/fesm2022/energinet-watt-vater.mjs.map +1 -0
  195. package/fesm2022/energinet-watt.mjs +47 -0
  196. package/fesm2022/energinet-watt.mjs.map +1 -0
  197. package/field/index.d.ts +20 -0
  198. package/field/watt-field-error.component.d.ts +5 -0
  199. package/field/watt-field-hint.component.d.ts +5 -0
  200. package/field/watt-field-intl.service.d.ts +8 -0
  201. package/field/watt-field.component.d.ts +42 -0
  202. package/icon/flags/index.d.ts +23 -0
  203. package/icon/flags/watt-flag-de.d.ts +5 -0
  204. package/icon/flags/watt-flag-dk.d.ts +5 -0
  205. package/icon/flags/watt-flag-fi.d.ts +5 -0
  206. package/icon/flags/watt-flag-no.d.ts +5 -0
  207. package/icon/flags/watt-flag-pl.d.ts +5 -0
  208. package/icon/flags/watt-flag-se.d.ts +5 -0
  209. package/icon/flags/watt-flag.d.ts +13 -0
  210. package/icon/icon.component.d.ts +20 -0
  211. package/icon/icons.d.ts +82 -0
  212. package/icon/index.d.ts +17 -0
  213. package/index.d.ts +33 -0
  214. package/modal/index.d.ts +18 -0
  215. package/modal/watt-modal.component.d.ts +86 -0
  216. package/modal/watt-modal.service.d.ts +62 -0
  217. package/package.json +237 -0
  218. package/paginator/index.d.ts +18 -0
  219. package/paginator/watt-paginator-intl.service.d.ts +14 -0
  220. package/paginator/watt-paginator.component.d.ts +53 -0
  221. package/phone-field/index.d.ts +18 -0
  222. package/phone-field/watt-phone-field-intl.service.d.ts +14 -0
  223. package/phone-field/watt-phone-field.component.d.ts +75 -0
  224. package/picker/__shared/index.d.ts +19 -0
  225. package/picker/__shared/placeholder-mask/watt-placeholder-mask.component.d.ts +34 -0
  226. package/picker/__shared/watt-picker-base.d.ts +201 -0
  227. package/picker/__shared/watt-picker-value.d.ts +18 -0
  228. package/picker/datepicker/index.d.ts +19 -0
  229. package/picker/datepicker/watt-datepicker-intl.service.d.ts +7 -0
  230. package/picker/datepicker/watt-datepicker.component.d.ts +149 -0
  231. package/picker/timepicker/index.d.ts +17 -0
  232. package/picker/timepicker/maskito-time-range-mask.d.ts +18 -0
  233. package/picker/timepicker/watt-timepicker.component.d.ts +132 -0
  234. package/progress-tracker/index.d.ts +20 -0
  235. package/progress-tracker/watt-progress-tracker-step.component.d.ts +10 -0
  236. package/progress-tracker/watt-progress-tracker.component.d.ts +5 -0
  237. package/query-params/index.d.ts +17 -0
  238. package/query-params/watt-query-params.directive.d.ts +27 -0
  239. package/radio/index.d.ts +17 -0
  240. package/radio/watt-radio.component.d.ts +24 -0
  241. package/search/index.d.ts +17 -0
  242. package/search/watt-search.component.d.ts +31 -0
  243. package/shell/index.d.ts +18 -0
  244. package/shell/nav-list/index.d.ts +18 -0
  245. package/shell/nav-list/watt-expand-on-active-link.directive.d.ts +26 -0
  246. package/shell/nav-list/watt-nav-list-item.component.d.ts +16 -0
  247. package/shell/nav-list/watt-nav-list.component.d.ts +12 -0
  248. package/shell/shell.component.d.ts +28 -0
  249. package/slider/index.d.ts +17 -0
  250. package/slider/watt-slider.component.d.ts +57 -0
  251. package/spinner/index.d.ts +17 -0
  252. package/spinner/watt-spinner.component.d.ts +15 -0
  253. package/stepper/index.d.ts +18 -0
  254. package/stepper/watt-stepper-step.component.d.ts +34 -0
  255. package/stepper/watt-stepper.component.d.ts +40 -0
  256. package/table/index.d.ts +18 -0
  257. package/table/watt-table-data-source.d.ts +37 -0
  258. package/table/watt-table.component.d.ts +239 -0
  259. package/tabs/index.d.ts +26 -0
  260. package/tabs/watt-link-tab.component.d.ts +7 -0
  261. package/tabs/watt-link-tabs.component.d.ts +7 -0
  262. package/tabs/watt-tab.component.d.ts +26 -0
  263. package/tabs/watt-tabs-action.component.d.ts +5 -0
  264. package/tabs/watt-tabs.component.d.ts +36 -0
  265. package/text-field/index.d.ts +17 -0
  266. package/text-field/watt-text-field.component.d.ts +77 -0
  267. package/textarea-field/index.d.ts +17 -0
  268. package/textarea-field/watt-textarea-field.component.d.ts +27 -0
  269. package/toast/index.d.ts +19 -0
  270. package/toast/watt-toast.component.d.ts +47 -0
  271. package/toast/watt-toast.service.d.ts +13 -0
  272. package/tooltip/index.d.ts +17 -0
  273. package/tooltip/watt-tooltip.component.d.ts +47 -0
  274. package/tooltip/watt-tooltip.directive.d.ts +31 -0
  275. package/utils/css/css-custom-properties.service.d.ts +10 -0
  276. package/utils/css/index.d.ts +17 -0
  277. package/utils/intersection-observer/index.d.ts +17 -0
  278. package/utils/intersection-observer/watt-intersection-observer.service.d.ts +21 -0
  279. package/utils/resize-observer/index.d.ts +18 -0
  280. package/utils/resize-observer/watt-resize-observer.directive.d.ts +35 -0
  281. package/utils/resize-observer/watt-resize-observer.service.d.ts +39 -0
  282. package/validation-message/index.d.ts +17 -0
  283. package/validation-message/watt-validation-message.component.d.ts +50 -0
  284. package/validators/index.d.ts +17 -0
  285. package/validators/watt-range.validators.d.ts +23 -0
  286. package/vater/index.d.ts +20 -0
  287. package/vater/types.d.ts +21 -0
  288. package/vater/vater-flex.component.d.ts +19 -0
  289. package/vater/vater-spacer.component.d.ts +5 -0
  290. package/vater/vater-stack.component.d.ts +14 -0
  291. package/vater/vater-utility.directive.d.ts +16 -0
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export { IWattTableDataSource, WattTableDataSource } from './watt-table-data-source';
18
+ export { type WattTableColumn, type WattTableColumnDef, WattTableComponent, WattTableCellDirective, WattTableToolbarDirective, WattTableToolbarSpacerComponent, WATT_TABLE, } from './watt-table.component';
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { DataSource } from '@angular/cdk/collections';
18
+ import { MatPaginator } from '@angular/material/paginator';
19
+ import { MatSort } from '@angular/material/sort';
20
+ import { MatTableDataSource } from '@angular/material/table';
21
+ export interface IWattTableDataSource<T> extends DataSource<T> {
22
+ data: T[];
23
+ filter: string;
24
+ filteredData: T[];
25
+ paginator: MatPaginator | null;
26
+ sort: MatSort | null;
27
+ totalCount: number;
28
+ }
29
+ /**
30
+ * @see https://material.angular.io/components/table/api#MatTableDataSource
31
+ */
32
+ export declare class WattTableDataSource<T> extends MatTableDataSource<T> implements IWattTableDataSource<T> {
33
+ constructor(initialData?: T[], config?: {
34
+ disableClientSideSort: boolean;
35
+ });
36
+ get totalCount(): number;
37
+ }
@@ -0,0 +1,239 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { SelectionModel } from '@angular/cdk/collections';
18
+ import { KeyValue } from '@angular/common';
19
+ import { AfterViewInit, ElementRef, EventEmitter, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
20
+ import type { QueryList } from '@angular/core';
21
+ import { MatSort, Sort, SortDirection } from '@angular/material/sort';
22
+ import { WattDatePipe } from '@energinet/watt/core/date';
23
+ import { IWattTableDataSource } from './watt-table-data-source';
24
+ import * as i0 from "@angular/core";
25
+ export interface WattTableColumn<T> {
26
+ /**
27
+ * The data that this column should be bound to, either as a property of `T`
28
+ * or derived from each row of `T` using an accessor function. Use `null`
29
+ * for columns that should not be associated with data, but note that this
30
+ * will disable sorting and automatic cell population.
31
+ */
32
+ accessor: keyof T | ((row: T) => unknown) | null;
33
+ /**
34
+ * Resolve the header text to a static display value. This will prevent
35
+ * the `resolveHeader` input function from being called for this column.
36
+ */
37
+ header?: string;
38
+ /**
39
+ * Callback for determining cell content when not using template. By default,
40
+ * cell content is found using the `accessor` (unless it is `null`).
41
+ */
42
+ cell?: (row: T) => string;
43
+ /**
44
+ * Enable or disable sorting for this column. Defaults to `true`
45
+ * unless `accessor` is `null`.
46
+ */
47
+ sort?: boolean;
48
+ /**
49
+ * Set the column size using grid sizing values. Defaults to `"auto"`.
50
+ *
51
+ * @remarks
52
+ * Accepts all of the CSS grid track size keywords (such as `min-content`,
53
+ * `max-content`, `minmax()`) as well as fractional (`fr`), percentage (`%`)
54
+ * and length (`px`, `em`, etc) units.
55
+ *
56
+ * @see https://drafts.csswg.org/css-grid/#track-sizes
57
+ */
58
+ size?: string;
59
+ /**
60
+ * Horizontally align the contents of the column. Defaults to `"left"`.
61
+ */
62
+ align?: 'left' | 'right' | 'center';
63
+ /**
64
+ * Helper icon will be shown in the header cell, with an click event.
65
+ */
66
+ helperAction?: () => void;
67
+ }
68
+ /**
69
+ * Record for defining columns with keys used as column identifiers.
70
+ */
71
+ export type WattTableColumnDef<T> = Record<string, WattTableColumn<T>>;
72
+ interface WattTableCellContext<T> {
73
+ $implicit: T;
74
+ }
75
+ interface WattTableToolbarContext<T> {
76
+ $implicit: T;
77
+ }
78
+ export declare class WattTableCellDirective<T> {
79
+ /** The WattTableColumn this template applies to. */
80
+ column: WattTableColumn<T>;
81
+ header?: string;
82
+ templateRef: TemplateRef<any>;
83
+ static ngTemplateContextGuard<T>(_directive: WattTableCellDirective<T>, context: unknown): context is WattTableCellContext<T>;
84
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattTableCellDirective<any>, never>;
85
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WattTableCellDirective<any>, "[wattTableCell]", never, { "column": { "alias": "wattTableCell"; "required": false; }; "header": { "alias": "wattTableCellHeader"; "required": false; }; }, {}, never, never, true, never>;
86
+ }
87
+ export declare class WattTableToolbarDirective<T> {
88
+ templateRef: TemplateRef<any>;
89
+ static ngTemplateContextGuard<T>(_directive: WattTableToolbarDirective<T>, context: unknown): context is WattTableToolbarContext<T[]>;
90
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattTableToolbarDirective<any>, never>;
91
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WattTableToolbarDirective<any>, "[wattTableToolbar]", never, {}, {}, never, never, true, never>;
92
+ }
93
+ /**
94
+ * Usage:
95
+ * `import { WATT_TABLE } from '@energinet-datahub/watt/table';`
96
+ */
97
+ export declare class WattTableComponent<T> implements OnChanges, AfterViewInit {
98
+ /**
99
+ * The table's source of data. Property should not be changed after
100
+ * initialization, instead update the data on the instance itself.
101
+ */
102
+ dataSource: IWattTableDataSource<T>;
103
+ /**
104
+ * Column definition record with keys representing the column identifiers
105
+ * and values being the column configuration. The order of the columns
106
+ * is determined by the property order, but can be overruled by the
107
+ * `displayedColumns` input.
108
+ */
109
+ columns: WattTableColumnDef<T>;
110
+ /**
111
+ * Used for hiding or reordering columns defined in the `columns` input.
112
+ */
113
+ displayedColumns?: string[];
114
+ /**
115
+ * Used for disabling the table. This will disable all user interaction
116
+ */
117
+ disabled: boolean;
118
+ /**
119
+ * Provide a description of the table for visually impaired users.
120
+ */
121
+ description: string;
122
+ /**
123
+ * If set to `true`, the table will show a loading indicator
124
+ * when there is no data.
125
+ */
126
+ loading: boolean;
127
+ /**
128
+ * Optional callback for determining header text for columns that
129
+ * do not have a static header text set in the column definition.
130
+ * Useful for providing translations of column headers.
131
+ */
132
+ resolveHeader?: (key: string) => string;
133
+ /**
134
+ * Identifier for column that should be sorted initially.
135
+ */
136
+ sortBy: string;
137
+ /**
138
+ * The sort direction of the initially sorted column.
139
+ */
140
+ sortDirection: SortDirection;
141
+ /**
142
+ * Whether to allow the user to clear the sort. Defaults to `true`.
143
+ */
144
+ sortClear: boolean;
145
+ /**
146
+ * Whether the table should include a checkbox column for row selection.
147
+ */
148
+ selectable: boolean;
149
+ /**
150
+ * Sets the initially selected rows. Only works when selectable is `true`.
151
+ */
152
+ initialSelection: import("@angular/core").InputSignal<T[]>;
153
+ /**
154
+ * Set to true to disable row hover highlight.
155
+ */
156
+ suppressRowHoverHighlight: boolean;
157
+ /**
158
+ * Highlights the currently active row.
159
+ */
160
+ activeRow?: T;
161
+ /**
162
+ * Custom comparator function to determine if two rows are equal.
163
+ *
164
+ * @remarks
165
+ * The default behavior for determining the active row is to compare
166
+ * the two row objects using strict equality check. This is sufficient
167
+ * as long as the instances remain the same, which may not be the case
168
+ * if row data is recreated or rebuilt from serialization.
169
+ */
170
+ activeRowComparator?: (currentRow: T, activeRow: T) => boolean;
171
+ /**
172
+ * If set to `true`, the column headers will not be shown. Default is `false`.
173
+ */
174
+ hideColumnHeaders: boolean;
175
+ /**
176
+ * Emits whenever the selection updates. Only works when selectable is `true`.
177
+ */
178
+ selectionChange: EventEmitter<T[]>;
179
+ /**
180
+ * Emits whenever a row is clicked.
181
+ */
182
+ rowClick: EventEmitter<T>;
183
+ /**
184
+ * Event emitted when the user changes the active sort or sort direction.
185
+ */
186
+ sortChange: EventEmitter<Sort>;
187
+ /** @ignore */
188
+ _cells: QueryList<WattTableCellDirective<T>>;
189
+ /** @ignore */
190
+ _toolbar?: WattTableToolbarDirective<T>;
191
+ /** @ignore */
192
+ _sort: MatSort;
193
+ /** @ignore */
194
+ _selectionModel: SelectionModel<T>;
195
+ /** @ignore */
196
+ _checkboxColumn: string;
197
+ /** @ignore */
198
+ _element: ElementRef<HTMLElement>;
199
+ /** @ignore */
200
+ _datePipe: WattDatePipe;
201
+ /** @ignore */
202
+ private formatCellData;
203
+ /** @ignore */
204
+ private getCellData;
205
+ constructor();
206
+ ngAfterViewInit(): void;
207
+ ngOnChanges(changes: SimpleChanges): void;
208
+ /**
209
+ * Clears the selection. Only works when selectable is `true`.
210
+ */
211
+ clearSelection(): void;
212
+ /** @ignore */
213
+ get _columnSelection(): boolean;
214
+ /** @ignore */
215
+ set _columnSelection(value: boolean);
216
+ get _filteredSelection(): T[];
217
+ /** @ignore */
218
+ _getColumns(): string[];
219
+ /** @ignore */
220
+ _getColumnTemplate(column: WattTableColumn<T>): TemplateRef<any> | undefined;
221
+ /** @ignore */
222
+ _getColumnHeader(column: KeyValue<string, WattTableColumn<T>>): string;
223
+ /** @ignore */
224
+ _getColumnHelperAction(column: KeyValue<string, WattTableColumn<T>>): (() => void) | undefined;
225
+ /** @ignore */
226
+ _getColumnCell(column: KeyValue<string, WattTableColumn<T>>, row: T): {} | null;
227
+ /** @ignore */
228
+ _isActiveRow(row: T): boolean;
229
+ /** @ignore */
230
+ _onRowClick(row: T): void;
231
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattTableComponent<any>, never>;
232
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattTableComponent<any>, "watt-table", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "description": { "alias": "description"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "resolveHeader": { "alias": "resolveHeader"; "required": false; }; "sortBy": { "alias": "sortBy"; "required": false; }; "sortDirection": { "alias": "sortDirection"; "required": false; }; "sortClear": { "alias": "sortClear"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "initialSelection": { "alias": "initialSelection"; "required": false; "isSignal": true; }; "suppressRowHoverHighlight": { "alias": "suppressRowHoverHighlight"; "required": false; }; "activeRow": { "alias": "activeRow"; "required": false; }; "activeRowComparator": { "alias": "activeRowComparator"; "required": false; }; "hideColumnHeaders": { "alias": "hideColumnHeaders"; "required": false; }; }, { "selectionChange": "selectionChange"; "rowClick": "rowClick"; "sortChange": "sortChange"; }, ["_toolbar", "_cells"], never, true, never>;
233
+ }
234
+ export declare class WattTableToolbarSpacerComponent {
235
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattTableToolbarSpacerComponent, never>;
236
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattTableToolbarSpacerComponent, "watt-table-toolbar-spacer", never, {}, {}, never, never, true, never>;
237
+ }
238
+ export declare const WATT_TABLE: (typeof WattTableToolbarSpacerComponent)[];
239
+ export {};
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { WattLinkTabComponent } from './watt-link-tab.component';
18
+ import { WattLinkTabsComponent } from './watt-link-tabs.component';
19
+ import { WattTabsActionComponent } from './watt-tabs-action.component';
20
+ export { WattTabComponent } from './watt-tab.component';
21
+ export { WattTabsActionComponent } from './watt-tabs-action.component';
22
+ export { WattTabsComponent } from './watt-tabs.component';
23
+ export { WattLinkTabComponent } from './watt-link-tab.component';
24
+ export { WattLinkTabsComponent } from './watt-link-tabs.component';
25
+ export declare const WATT_TABS: (typeof WattTabsActionComponent)[];
26
+ export declare const WATT_LINK_TABS: (typeof WattLinkTabComponent | typeof WattLinkTabsComponent)[];
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class WattLinkTabComponent {
3
+ label: import("@angular/core").InputSignal<string>;
4
+ link: import("@angular/core").InputSignal<string>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattLinkTabComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattLinkTabComponent, "watt-link-tab", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "link": { "alias": "link"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,7 @@
1
+ import { WattLinkTabComponent } from './watt-link-tab.component';
2
+ import * as i0 from "@angular/core";
3
+ export declare class WattLinkTabsComponent {
4
+ tabElements: import("@angular/core").Signal<readonly WattLinkTabComponent[]>;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattLinkTabsComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattLinkTabsComponent, "watt-link-tabs", never, {}, {}, ["tabElements"], never, true, never>;
7
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { TemplateRef } from '@angular/core';
18
+ import * as i0 from "@angular/core";
19
+ export declare class WattTabComponent {
20
+ templateRef: import("@angular/core").Signal<TemplateRef<unknown>>;
21
+ label: import("@angular/core").InputSignal<string>;
22
+ changed: import("@angular/core").OutputEmitterRef<void>;
23
+ emitChange(): void;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattTabComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattTabComponent, "watt-tab", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, ["*"], true, never>;
26
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class WattTabsActionComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattTabsActionComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattTabsActionComponent, "watt-tabs-action", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { AfterViewInit } from '@angular/core';
18
+ import { MatTabGroup } from '@angular/material/tabs';
19
+ import { WattTabComponent } from './watt-tab.component';
20
+ import { WattTabsActionComponent } from './watt-tabs-action.component';
21
+ import * as i0 from "@angular/core";
22
+ export declare class WattTabsComponent implements AfterViewInit {
23
+ private readonly cdr;
24
+ variant: import("@angular/core").InputSignal<string | undefined>;
25
+ get hostClass(): string;
26
+ tabElements: import("@angular/core").Signal<readonly WattTabComponent[]>;
27
+ activeTabIndex: number;
28
+ tabGroup: import("@angular/core").Signal<MatTabGroup>;
29
+ actionsTab: import("@angular/core").Signal<WattTabsActionComponent | undefined>;
30
+ ngAfterViewInit(): void;
31
+ emitSelectedTabChange(selectedIndex: number): void;
32
+ setSelectedIndex(index: number): void;
33
+ triggerChange(): void;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattTabsComponent, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattTabsComponent, "watt-tabs", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; }, {}, ["tabElements", "actionsTab"], ["*"], true, never>;
36
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export { WattTextFieldComponent } from './watt-text-field.component';
@@ -0,0 +1,77 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { ElementRef, AfterViewInit, EventEmitter } from '@angular/core';
18
+ import { ControlValueAccessor, FormControl } from '@angular/forms';
19
+ import { MatAutocomplete } from '@angular/material/autocomplete';
20
+ import { WattIcon } from '@energinet/watt/icon';
21
+ import * as i0 from "@angular/core";
22
+ export type WattInputTypes = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
23
+ export declare class WattTextFieldComponent implements ControlValueAccessor, AfterViewInit {
24
+ value: string;
25
+ type: WattInputTypes;
26
+ placeholder?: string;
27
+ label: string;
28
+ tooltip?: string;
29
+ prefix?: WattIcon;
30
+ maxLength: string | number | null;
31
+ formControl: FormControl;
32
+ autocompleteOptions: string[];
33
+ autocompleteMatcherFn: (value: string, option: string) => boolean;
34
+ /** @ignore */
35
+ autocompleteRef: MatAutocomplete;
36
+ /**
37
+ * Emits the value of the input field when it changes.
38
+ */
39
+ searchChanged: EventEmitter<string>;
40
+ /**
41
+ * Emits the value of the input field when an autocomplete option is selected.
42
+ */
43
+ autocompleteOptionSelected: EventEmitter<string>;
44
+ /**
45
+ * Emits the value of the input field when an autocomplete option is selected.
46
+ */
47
+ autocompleteOptionDeselected: EventEmitter<void>;
48
+ /** @ignore */
49
+ private element;
50
+ /** @ignore */
51
+ inputField: ElementRef<HTMLInputElement>;
52
+ model: string;
53
+ /** @ignore */
54
+ isDisabled: boolean;
55
+ /** @ignore */
56
+ onTouchedCallbacks: (() => void)[];
57
+ /** @ignore */
58
+ ngAfterViewInit(): void;
59
+ /** @ignore */
60
+ onChanged(event: Event): void;
61
+ /** @ignore */
62
+ onChange: (value: string) => void;
63
+ /** @ignore */
64
+ onTouched: () => void;
65
+ /** @ignore */
66
+ writeValue(value: string): void;
67
+ /** @ignore */
68
+ registerOnChange(fn: (value: string) => void): void;
69
+ /** @ignore */
70
+ registerOnTouched(fn: () => void): void;
71
+ /** @ignore */
72
+ setDisabledState(isDisabled: boolean): void;
73
+ /** @ignore */
74
+ setFocus(): void;
75
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattTextFieldComponent, never>;
76
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattTextFieldComponent, "watt-text-field", never, { "value": { "alias": "value"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "autocompleteOptions": { "alias": "autocompleteOptions"; "required": false; }; "autocompleteMatcherFn": { "alias": "autocompleteMatcherFn"; "required": false; }; }, { "searchChanged": "searchChanged"; "autocompleteOptionSelected": "autocompleteOptionSelected"; "autocompleteOptionDeselected": "autocompleteOptionDeselected"; }, never, ["*", ".descriptor", "watt-field-hint", "watt-field-error"], true, never>;
77
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export { WattTextAreaFieldComponent } from './watt-textarea-field.component';
@@ -0,0 +1,27 @@
1
+ import { ControlValueAccessor, FormControl } from '@angular/forms';
2
+ import * as i0 from "@angular/core";
3
+ export declare class WattTextAreaFieldComponent implements ControlValueAccessor {
4
+ formControl: FormControl;
5
+ value: string;
6
+ placeholder?: string;
7
+ required: boolean;
8
+ label: string;
9
+ /** @ignore */
10
+ model: string;
11
+ /** @ignore */
12
+ private element;
13
+ /** @ignore */
14
+ isDisabled: boolean;
15
+ /** @ignore */
16
+ onChange: (value: string) => void;
17
+ /** @ignore */
18
+ writeValue(value: string): void;
19
+ /** @ignore */
20
+ registerOnChange(fn: (value: string) => void): void;
21
+ /** @ignore */
22
+ registerOnTouched(fn: () => void): void;
23
+ /** @ignore */
24
+ setDisabledState(isDisabled: boolean): void;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattTextAreaFieldComponent, never>;
26
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattTextAreaFieldComponent, "watt-textarea-field", never, { "formControl": { "alias": "formControl"; "required": false; }; "value": { "alias": "value"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "label": { "alias": "label"; "required": false; }; }, {}, never, ["watt-field-hint", "watt-field-error"], true, never>;
27
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export { WattToastComponent, WattToastType } from './watt-toast.component';
18
+ export { WattToastService } from './watt-toast.service';
19
+ export type { WattToastRef } from './watt-toast.component';
@@ -0,0 +1,47 @@
1
+ import { MatSnackBarRef } from '@angular/material/snack-bar';
2
+ import * as i0 from "@angular/core";
3
+ export type WattToastType = 'success' | 'info' | 'warning' | 'danger' | 'loading';
4
+ export interface WattToastConfig {
5
+ duration?: number;
6
+ type?: WattToastType;
7
+ message: string;
8
+ action?: (wattToastRef: WattToastRef) => void;
9
+ actionLabel?: string;
10
+ }
11
+ export type WattToastRef = MatSnackBarRef<WattToastComponent>;
12
+ /**
13
+ * Usage:
14
+ * `import { WattToastService } from '@energinet-datahub/watt/toast';`
15
+ */
16
+ export declare class WattToastComponent {
17
+ private _config;
18
+ private cd;
19
+ private _matSnackBarRef;
20
+ private elementRef;
21
+ get class(): string;
22
+ /**
23
+ * @ignore
24
+ */
25
+ config: WattToastConfig;
26
+ /**
27
+ * @ignore
28
+ */
29
+ matSnackBarRef: WattToastRef;
30
+ /**
31
+ * @ignore
32
+ */
33
+ private dissmissToastSubscription?;
34
+ constructor();
35
+ /**
36
+ * @ignore
37
+ */
38
+ onClose(): void;
39
+ update(config: Partial<WattToastConfig>): void;
40
+ /**
41
+ * @ignore
42
+ * Ensure the toast won't get dismissed when the user hovers over it.
43
+ */
44
+ private initDuration;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattToastComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<WattToastComponent, "watt-toast", never, {}, {}, never, never, true, never>;
47
+ }
@@ -0,0 +1,13 @@
1
+ import { MatSnackBar, MatSnackBarRef } from '@angular/material/snack-bar';
2
+ import { WattToastComponent, WattToastConfig } from './watt-toast.component';
3
+ import * as i0 from "@angular/core";
4
+ export declare class WattToastService {
5
+ private _snackBar;
6
+ private ref?;
7
+ constructor(_snackBar: MatSnackBar);
8
+ open(config: WattToastConfig): MatSnackBarRef<WattToastComponent>;
9
+ update(config: Partial<WattToastConfig>): void;
10
+ dismiss(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<WattToastService, never>;
12
+ static ɵprov: i0.ɵɵInjectableDeclaration<WattToastService>;
13
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2020 Energinet DataHub A/S
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License2");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ export { WattTooltipDirective, wattTooltipPosition } from './watt-tooltip.directive';