@wirabyte/ui 3.0.0-beta.0 → 3.0.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 (257) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +6 -6
  3. package/fesm2022/wirabyte-ui-accordion.mjs +4 -4
  4. package/fesm2022/wirabyte-ui-accordion.mjs.map +1 -1
  5. package/fesm2022/wirabyte-ui-alert.mjs +2 -2
  6. package/fesm2022/wirabyte-ui-alert.mjs.map +1 -1
  7. package/fesm2022/wirabyte-ui-avatar.mjs +13 -6
  8. package/fesm2022/wirabyte-ui-avatar.mjs.map +1 -1
  9. package/fesm2022/wirabyte-ui-breadcrumb.mjs +4 -2
  10. package/fesm2022/wirabyte-ui-breadcrumb.mjs.map +1 -1
  11. package/fesm2022/wirabyte-ui-button.mjs +3 -3
  12. package/fesm2022/wirabyte-ui-button.mjs.map +1 -1
  13. package/fesm2022/wirabyte-ui-card.mjs +8 -8
  14. package/fesm2022/wirabyte-ui-card.mjs.map +1 -1
  15. package/fesm2022/wirabyte-ui-chat.mjs +391 -0
  16. package/fesm2022/wirabyte-ui-chat.mjs.map +1 -0
  17. package/fesm2022/wirabyte-ui-config.mjs +42 -2
  18. package/fesm2022/wirabyte-ui-config.mjs.map +1 -1
  19. package/fesm2022/wirabyte-ui-core.mjs +155 -2
  20. package/fesm2022/wirabyte-ui-core.mjs.map +1 -1
  21. package/fesm2022/wirabyte-ui-datepicker.mjs +2 -2
  22. package/fesm2022/wirabyte-ui-datepicker.mjs.map +1 -1
  23. package/fesm2022/wirabyte-ui-descriptions.mjs +133 -0
  24. package/fesm2022/wirabyte-ui-descriptions.mjs.map +1 -0
  25. package/fesm2022/wirabyte-ui-dialog.mjs +2 -2
  26. package/fesm2022/wirabyte-ui-dialog.mjs.map +1 -1
  27. package/fesm2022/wirabyte-ui-drawer.mjs +2 -2
  28. package/fesm2022/wirabyte-ui-drawer.mjs.map +1 -1
  29. package/fesm2022/wirabyte-ui-emptystate.mjs +2 -2
  30. package/fesm2022/wirabyte-ui-emptystate.mjs.map +1 -1
  31. package/fesm2022/wirabyte-ui-errorpage.mjs +2 -2
  32. package/fesm2022/wirabyte-ui-errorpage.mjs.map +1 -1
  33. package/fesm2022/wirabyte-ui-fieldset.mjs +4 -4
  34. package/fesm2022/wirabyte-ui-fieldset.mjs.map +1 -1
  35. package/fesm2022/wirabyte-ui-metergroup.mjs +19 -5
  36. package/fesm2022/wirabyte-ui-metergroup.mjs.map +1 -1
  37. package/fesm2022/wirabyte-ui-navbar.mjs +2 -2
  38. package/fesm2022/wirabyte-ui-navbar.mjs.map +1 -1
  39. package/fesm2022/wirabyte-ui-panel.mjs +6 -6
  40. package/fesm2022/wirabyte-ui-panel.mjs.map +1 -1
  41. package/fesm2022/wirabyte-ui-popover.mjs +2 -2
  42. package/fesm2022/wirabyte-ui-popover.mjs.map +1 -1
  43. package/fesm2022/wirabyte-ui-result.mjs +2 -2
  44. package/fesm2022/wirabyte-ui-result.mjs.map +1 -1
  45. package/fesm2022/wirabyte-ui-scheduler.mjs +504 -0
  46. package/fesm2022/wirabyte-ui-scheduler.mjs.map +1 -0
  47. package/fesm2022/wirabyte-ui-selectbutton.mjs +25 -4
  48. package/fesm2022/wirabyte-ui-selectbutton.mjs.map +1 -1
  49. package/fesm2022/wirabyte-ui-signaturepad.mjs +310 -0
  50. package/fesm2022/wirabyte-ui-signaturepad.mjs.map +1 -0
  51. package/fesm2022/wirabyte-ui-stat.mjs +149 -0
  52. package/fesm2022/wirabyte-ui-stat.mjs.map +1 -0
  53. package/fesm2022/wirabyte-ui-table.mjs +3 -3
  54. package/fesm2022/wirabyte-ui-table.mjs.map +1 -1
  55. package/fesm2022/wirabyte-ui-tabs.mjs +3 -3
  56. package/fesm2022/wirabyte-ui-tabs.mjs.map +1 -1
  57. package/fesm2022/wirabyte-ui-tag.mjs +2 -2
  58. package/fesm2022/wirabyte-ui-tag.mjs.map +1 -1
  59. package/fesm2022/wirabyte-ui-textarea.mjs +18 -0
  60. package/fesm2022/wirabyte-ui-textarea.mjs.map +1 -1
  61. package/fesm2022/wirabyte-ui-thai.mjs +1 -1
  62. package/fesm2022/wirabyte-ui-thai.mjs.map +1 -1
  63. package/fesm2022/wirabyte-ui-toolbar.mjs +6 -6
  64. package/fesm2022/wirabyte-ui-toolbar.mjs.map +1 -1
  65. package/package.json +21 -1
  66. package/schematics/core/catalog.cjs +22 -1
  67. package/schematics/core/families.cjs +42 -0
  68. package/schematics/core/overrides.cjs +25 -0
  69. package/schematics/core/thai/locale.cjs +66 -0
  70. package/schematics/ng-add/index.cjs +3 -1
  71. package/theme/_data.scss +239 -7
  72. package/theme/_index.scss +29 -0
  73. package/themes/glass/amber.css +36 -7
  74. package/themes/glass/blue.css +36 -7
  75. package/themes/glass/cyan.css +36 -7
  76. package/themes/glass/emerald.css +36 -7
  77. package/themes/glass/fuchsia.css +36 -7
  78. package/themes/glass/green.css +36 -7
  79. package/themes/glass/indigo.css +36 -7
  80. package/themes/glass/lime.css +36 -7
  81. package/themes/glass/orange.css +36 -7
  82. package/themes/glass/pink.css +36 -7
  83. package/themes/glass/purple.css +36 -7
  84. package/themes/glass/red.css +36 -7
  85. package/themes/glass/rose.css +36 -7
  86. package/themes/glass/sky.css +36 -7
  87. package/themes/glass/teal.css +36 -7
  88. package/themes/glass/theme.css +36 -7
  89. package/themes/glass/violet.css +36 -7
  90. package/themes/glass/wira.css +36 -7
  91. package/themes/glass/yellow.css +36 -7
  92. package/themes/lanna/amber.css +36 -7
  93. package/themes/lanna/blue.css +36 -7
  94. package/themes/lanna/cyan.css +36 -7
  95. package/themes/lanna/emerald.css +36 -7
  96. package/themes/lanna/fuchsia.css +36 -7
  97. package/themes/lanna/green.css +36 -7
  98. package/themes/lanna/indigo.css +36 -7
  99. package/themes/lanna/lime.css +36 -7
  100. package/themes/lanna/orange.css +36 -7
  101. package/themes/lanna/pink.css +36 -7
  102. package/themes/lanna/purple.css +36 -7
  103. package/themes/lanna/red.css +36 -7
  104. package/themes/lanna/rose.css +36 -7
  105. package/themes/lanna/sky.css +36 -7
  106. package/themes/lanna/teal.css +36 -7
  107. package/themes/lanna/theme.css +36 -7
  108. package/themes/lanna/violet.css +36 -7
  109. package/themes/lanna/wira.css +36 -7
  110. package/themes/lanna/yellow.css +36 -7
  111. package/themes/mali/amber.css +30 -1
  112. package/themes/mali/blue.css +30 -1
  113. package/themes/mali/cyan.css +30 -1
  114. package/themes/mali/emerald.css +30 -1
  115. package/themes/mali/fuchsia.css +30 -1
  116. package/themes/mali/green.css +30 -1
  117. package/themes/mali/indigo.css +30 -1
  118. package/themes/mali/lime.css +30 -1
  119. package/themes/mali/orange.css +30 -1
  120. package/themes/mali/pink.css +30 -1
  121. package/themes/mali/purple.css +30 -1
  122. package/themes/mali/red.css +30 -1
  123. package/themes/mali/rose.css +30 -1
  124. package/themes/mali/sky.css +30 -1
  125. package/themes/mali/teal.css +30 -1
  126. package/themes/mali/theme.css +30 -1
  127. package/themes/mali/violet.css +30 -1
  128. package/themes/mali/wira.css +30 -1
  129. package/themes/mali/yellow.css +30 -1
  130. package/themes/material/amber.css +30 -1
  131. package/themes/material/blue.css +30 -1
  132. package/themes/material/cyan.css +30 -1
  133. package/themes/material/emerald.css +30 -1
  134. package/themes/material/fuchsia.css +30 -1
  135. package/themes/material/green.css +30 -1
  136. package/themes/material/indigo.css +30 -1
  137. package/themes/material/lime.css +30 -1
  138. package/themes/material/orange.css +30 -1
  139. package/themes/material/pink.css +30 -1
  140. package/themes/material/purple.css +30 -1
  141. package/themes/material/red.css +30 -1
  142. package/themes/material/rose.css +30 -1
  143. package/themes/material/sky.css +30 -1
  144. package/themes/material/teal.css +30 -1
  145. package/themes/material/theme.css +30 -1
  146. package/themes/material/violet.css +30 -1
  147. package/themes/material/wira.css +30 -1
  148. package/themes/material/yellow.css +30 -1
  149. package/themes/nakhon/amber.css +36 -7
  150. package/themes/nakhon/blue.css +36 -7
  151. package/themes/nakhon/cyan.css +36 -7
  152. package/themes/nakhon/emerald.css +36 -7
  153. package/themes/nakhon/fuchsia.css +36 -7
  154. package/themes/nakhon/green.css +36 -7
  155. package/themes/nakhon/indigo.css +36 -7
  156. package/themes/nakhon/lime.css +36 -7
  157. package/themes/nakhon/orange.css +36 -7
  158. package/themes/nakhon/pink.css +36 -7
  159. package/themes/nakhon/purple.css +36 -7
  160. package/themes/nakhon/red.css +36 -7
  161. package/themes/nakhon/rose.css +36 -7
  162. package/themes/nakhon/sky.css +36 -7
  163. package/themes/nakhon/teal.css +36 -7
  164. package/themes/nakhon/theme.css +36 -7
  165. package/themes/nakhon/violet.css +36 -7
  166. package/themes/nakhon/wira.css +36 -7
  167. package/themes/nakhon/yellow.css +36 -7
  168. package/themes/phet/amber.css +30 -1
  169. package/themes/phet/blue.css +30 -1
  170. package/themes/phet/cyan.css +30 -1
  171. package/themes/phet/emerald.css +30 -1
  172. package/themes/phet/fuchsia.css +30 -1
  173. package/themes/phet/green.css +30 -1
  174. package/themes/phet/indigo.css +30 -1
  175. package/themes/phet/lime.css +30 -1
  176. package/themes/phet/orange.css +30 -1
  177. package/themes/phet/pink.css +30 -1
  178. package/themes/phet/purple.css +30 -1
  179. package/themes/phet/red.css +30 -1
  180. package/themes/phet/rose.css +30 -1
  181. package/themes/phet/sky.css +30 -1
  182. package/themes/phet/teal.css +30 -1
  183. package/themes/phet/theme.css +30 -1
  184. package/themes/phet/violet.css +30 -1
  185. package/themes/phet/wira.css +30 -1
  186. package/themes/phet/yellow.css +30 -1
  187. package/themes/siam/amber.css +36 -7
  188. package/themes/siam/blue.css +36 -7
  189. package/themes/siam/cyan.css +36 -7
  190. package/themes/siam/emerald.css +36 -7
  191. package/themes/siam/fuchsia.css +36 -7
  192. package/themes/siam/green.css +36 -7
  193. package/themes/siam/indigo.css +36 -7
  194. package/themes/siam/lime.css +36 -7
  195. package/themes/siam/orange.css +36 -7
  196. package/themes/siam/pink.css +36 -7
  197. package/themes/siam/purple.css +36 -7
  198. package/themes/siam/red.css +36 -7
  199. package/themes/siam/rose.css +36 -7
  200. package/themes/siam/sky.css +36 -7
  201. package/themes/siam/teal.css +36 -7
  202. package/themes/siam/theme.css +36 -7
  203. package/themes/siam/violet.css +36 -7
  204. package/themes/siam/wira.css +36 -7
  205. package/themes/siam/yellow.css +36 -7
  206. package/themes/sila/amber.css +30 -1
  207. package/themes/sila/blue.css +30 -1
  208. package/themes/sila/cyan.css +30 -1
  209. package/themes/sila/emerald.css +30 -1
  210. package/themes/sila/fuchsia.css +30 -1
  211. package/themes/sila/green.css +30 -1
  212. package/themes/sila/indigo.css +30 -1
  213. package/themes/sila/lime.css +30 -1
  214. package/themes/sila/orange.css +30 -1
  215. package/themes/sila/pink.css +30 -1
  216. package/themes/sila/purple.css +30 -1
  217. package/themes/sila/red.css +30 -1
  218. package/themes/sila/rose.css +30 -1
  219. package/themes/sila/sky.css +30 -1
  220. package/themes/sila/teal.css +30 -1
  221. package/themes/sila/theme.css +30 -1
  222. package/themes/sila/violet.css +30 -1
  223. package/themes/sila/wira.css +30 -1
  224. package/themes/sila/yellow.css +30 -1
  225. package/themes/wira/amber.css +45 -16
  226. package/themes/wira/blue.css +45 -16
  227. package/themes/wira/cyan.css +45 -16
  228. package/themes/wira/emerald.css +45 -16
  229. package/themes/wira/fuchsia.css +45 -16
  230. package/themes/wira/green.css +45 -16
  231. package/themes/wira/indigo.css +45 -16
  232. package/themes/wira/lime.css +45 -16
  233. package/themes/wira/orange.css +45 -16
  234. package/themes/wira/pink.css +45 -16
  235. package/themes/wira/purple.css +45 -16
  236. package/themes/wira/red.css +45 -16
  237. package/themes/wira/rose.css +45 -16
  238. package/themes/wira/sky.css +45 -16
  239. package/themes/wira/teal.css +45 -16
  240. package/themes/wira/theme.css +45 -16
  241. package/themes/wira/violet.css +45 -16
  242. package/themes/wira/wira.css +45 -16
  243. package/themes/wira/yellow.css +45 -16
  244. package/types/wirabyte-ui-avatar.d.ts +8 -3
  245. package/types/wirabyte-ui-breadcrumb.d.ts +3 -1
  246. package/types/wirabyte-ui-button.d.ts +1 -1
  247. package/types/wirabyte-ui-chat.d.ts +192 -0
  248. package/types/wirabyte-ui-config.d.ts +17 -0
  249. package/types/wirabyte-ui-core.d.ts +62 -3
  250. package/types/wirabyte-ui-datepicker.d.ts +1 -1
  251. package/types/wirabyte-ui-descriptions.d.ts +67 -0
  252. package/types/wirabyte-ui-metergroup.d.ts +17 -2
  253. package/types/wirabyte-ui-scheduler.d.ts +199 -0
  254. package/types/wirabyte-ui-selectbutton.d.ts +12 -1
  255. package/types/wirabyte-ui-signaturepad.d.ts +108 -0
  256. package/types/wirabyte-ui-stat.d.ts +72 -0
  257. package/types/wirabyte-ui-textarea.d.ts +2 -0
@@ -0,0 +1,199 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy, EventEmitter, QueryList, TemplateRef } from '@angular/core';
3
+ import { WuTemplate } from '@wirabyte/ui/config';
4
+
5
+ type WuSchedulerView = 'day' | 'week' | 'month';
6
+ interface WuSchedulerEvent {
7
+ id?: string | number;
8
+ title: string;
9
+ start: Date | string | number;
10
+ /** Default: an hour after `start` (all-day events: the same day). */
11
+ end?: Date | string | number | null;
12
+ allDay?: boolean;
13
+ /** Any CSS colour for the bar and tint. Default: the theme's primary colour. */
14
+ color?: string;
15
+ /** A line under the title in the day and week views. */
16
+ description?: string;
17
+ /** `false` keeps this one in place when the scheduler is `editable`. */
18
+ editable?: boolean;
19
+ /** Anything else the app needs back in the events it gets. */
20
+ data?: unknown;
21
+ }
22
+ interface WuSchedulerEventClickEvent {
23
+ originalEvent: Event;
24
+ event: WuSchedulerEvent;
25
+ }
26
+ /** `(onDateClick)`: an empty day (month view, `allDay`) or a time slot (day and week views) was clicked. */
27
+ interface WuSchedulerDateClickEvent {
28
+ originalEvent: Event;
29
+ date: Date;
30
+ allDay: boolean;
31
+ }
32
+ /** `(onEventChange)`: an event was dragged to a new time. The app saves it and passes new `events`. */
33
+ interface WuSchedulerEventChangeEvent {
34
+ event: WuSchedulerEvent;
35
+ start: Date;
36
+ end: Date;
37
+ }
38
+ /** An event placed on the grid (time views: its column lane; month view: just the day). */
39
+ interface ɵWuPlacedEvent {
40
+ key: string;
41
+ event: WuSchedulerEvent;
42
+ start: Date;
43
+ end: Date;
44
+ /** Day and week views: top and height in % of the visible hours; left and width in % of the day column. */
45
+ top: number;
46
+ height: number;
47
+ left: number;
48
+ width: number;
49
+ time: string;
50
+ }
51
+
52
+ /** One day column of the day / week views, or one cell of the month grid. */
53
+ interface DayCell {
54
+ key: string;
55
+ date: Date;
56
+ today: boolean;
57
+ outside: boolean;
58
+ allDay: ɵWuPlacedEvent[];
59
+ timed: ɵWuPlacedEvent[];
60
+ }
61
+ /**
62
+ * Appointments on a calendar: `<wu-scheduler [events]="appointments" [(view)]="view" [(date)]="day" [editable]="true"
63
+ * (onEventChange)="move($event)" (onDateClick)="create($event)">`. A month grid, a week or a day of hours
64
+ * (`startHour`–`endHour`), all-day events in their own row, overlapping events side by side, a line at the current
65
+ * time. Years follow the app's calendar (พ.ศ. in Thai). With `editable`, events are dragged to another day or time
66
+ * (snapped to `slotMinutes`); the scheduler emits the new times and the app updates `events`.
67
+ */
68
+ declare class WuScheduler implements OnDestroy {
69
+ set events(v: WuSchedulerEvent[] | null | undefined);
70
+ get events(): WuSchedulerEvent[];
71
+ set view(v: WuSchedulerView | null | undefined);
72
+ get view(): WuSchedulerView;
73
+ /** The day the view shows (week and month views: the period around it). Default: today. */
74
+ set date(v: Date | string | number | null | undefined);
75
+ get date(): Date;
76
+ /** The view buttons offered. Default all three. */
77
+ views: WuSchedulerView[] | null | undefined;
78
+ /** First and last hour of the day and week views. Default 7–20. */
79
+ set startHour(v: unknown);
80
+ get startHour(): number;
81
+ set endHour(v: unknown);
82
+ get endHour(): number;
83
+ /** Rows of the time grid, and where a dragged event snaps to. Default 30 minutes. */
84
+ set slotMinutes(v: unknown);
85
+ get slotMinutes(): number;
86
+ /** First day of the week, 0 = Sunday. Default: the locale's. */
87
+ firstDayOfWeek?: number | null;
88
+ /** Events can be dragged to another day or time. */
89
+ set editable(v: unknown);
90
+ get editable(): boolean;
91
+ /** Events a month cell lists before "+N more". Default 3. */
92
+ set maxEventsPerDay(v: unknown);
93
+ get maxEventsPerDay(): number;
94
+ /** Height of the day and week views' hour grid area. Default: the theme's hour height × the hours shown. */
95
+ height?: string | number | null;
96
+ styleClass?: string | null;
97
+ style?: Record<string, any> | string | null;
98
+ readonly viewChange: EventEmitter<WuSchedulerView>;
99
+ readonly dateChange: EventEmitter<Date>;
100
+ readonly onEventClick: EventEmitter<WuSchedulerEventClickEvent>;
101
+ readonly onDateClick: EventEmitter<WuSchedulerDateClickEvent>;
102
+ readonly onEventChange: EventEmitter<WuSchedulerEventChangeEvent>;
103
+ protected templates?: QueryList<WuTemplate>;
104
+ protected eventRef?: unknown;
105
+ private _events;
106
+ private _view;
107
+ private _date;
108
+ private _startHour;
109
+ private _endHour;
110
+ private _slot;
111
+ private _editable;
112
+ private _max;
113
+ private cache;
114
+ private dragged;
115
+ private now;
116
+ private readonly timer;
117
+ private readonly cdr;
118
+ private readonly config;
119
+ private readonly i18n;
120
+ private readonly translated;
121
+ constructor();
122
+ ngOnDestroy(): void;
123
+ get t(): {
124
+ today: string;
125
+ previous: string;
126
+ next: string;
127
+ day: string;
128
+ week: string;
129
+ month: string;
130
+ allDay: string;
131
+ more: string;
132
+ noEvents: string;
133
+ } | undefined;
134
+ get eventTemplate(): TemplateRef<unknown> | null;
135
+ get rootClass(): string;
136
+ get rootStyle(): Record<string, any>;
137
+ get viewButtons(): WuSchedulerView[];
138
+ viewLabel(v: WuSchedulerView): string;
139
+ get hours(): number[];
140
+ get weekdayNames(): string[];
141
+ get days(): DayCell[];
142
+ /** Month view: the days in rows of seven. */
143
+ get weeks(): DayCell[][];
144
+ get title(): string;
145
+ dayHeader(cell: DayCell): string;
146
+ hourLabel(h: number): string;
147
+ /** The current-time line: % down the visible hours, or `null` outside them. */
148
+ nowTop(cell: DayCell): number | null;
149
+ visible(cell: DayCell): ɵWuPlacedEvent[];
150
+ hidden(cell: DayCell): number;
151
+ moreText(n: number): string;
152
+ eventStyle(p: ɵWuPlacedEvent): Record<string, string>;
153
+ placedStyle(p: ɵWuPlacedEvent): Record<string, string>;
154
+ canDrag(p: ɵWuPlacedEvent): boolean;
155
+ trackCell(_: number, c: DayCell): string;
156
+ trackEvent(_: number, p: ɵWuPlacedEvent): string;
157
+ setView(v: WuSchedulerView): void;
158
+ move(step: -1 | 1): void;
159
+ goToday(): void;
160
+ /** Month view: a day's "+N more" opens that day. */
161
+ openDay(date: Date): void;
162
+ eventClick(event: Event, p: ɵWuPlacedEvent): void;
163
+ /** A click on an empty month cell. */
164
+ cellClick(event: Event, cell: DayCell): void;
165
+ /** A click on the hour grid: the slot under the pointer. */
166
+ slotClick(event: MouseEvent, cell: DayCell): void;
167
+ allDayClick(event: Event, cell: DayCell): void;
168
+ dragStart(event: DragEvent, p: ɵWuPlacedEvent): void;
169
+ dragOver(event: DragEvent): void;
170
+ dragEnd(): void;
171
+ /** Dropped on a month cell or an all-day row: same time of day, another date. */
172
+ dropOnDay(event: DragEvent, cell: DayCell): void;
173
+ /** Dropped on the hour grid: the slot under the pointer, same length. */
174
+ dropOnTime(event: DragEvent, cell: DayCell): void;
175
+ private get weekStart();
176
+ private go;
177
+ private tick;
178
+ /** The slot under the pointer on a day column, snapped to `slotMinutes`. */
179
+ private timeAt;
180
+ private range;
181
+ private build;
182
+ private year;
183
+ private monthName;
184
+ private monthShort;
185
+ private dayName;
186
+ private weekdayShort;
187
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuScheduler, never>;
188
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuScheduler, "wu-scheduler", never, { "events": { "alias": "events"; "required": false; }; "view": { "alias": "view"; "required": false; }; "date": { "alias": "date"; "required": false; }; "views": { "alias": "views"; "required": false; }; "startHour": { "alias": "startHour"; "required": false; }; "endHour": { "alias": "endHour"; "required": false; }; "slotMinutes": { "alias": "slotMinutes"; "required": false; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "maxEventsPerDay": { "alias": "maxEventsPerDay"; "required": false; }; "height": { "alias": "height"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, { "viewChange": "viewChange"; "dateChange": "dateChange"; "onEventClick": "onEventClick"; "onDateClick": "onDateClick"; "onEventChange": "onEventChange"; }, ["eventRef", "templates"], never, true, never>;
189
+ }
190
+
191
+ /** For NgModule apps. Standalone apps can import `WuScheduler` directly. */
192
+ declare class WuSchedulerModule {
193
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuSchedulerModule, never>;
194
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WuSchedulerModule, never, [typeof WuScheduler], [typeof WuScheduler]>;
195
+ static ɵinj: i0.ɵɵInjectorDeclaration<WuSchedulerModule>;
196
+ }
197
+
198
+ export { WuScheduler, WuSchedulerModule };
199
+ export type { WuSchedulerDateClickEvent, WuSchedulerEvent, WuSchedulerEventChangeEvent, WuSchedulerEventClickEvent, WuSchedulerView, ɵWuPlacedEvent };
@@ -38,6 +38,15 @@ declare class WuSelectButton implements ControlValueAccessor {
38
38
  readonly invalid: _angular_core.InputSignalWithTransform<boolean, unknown>;
39
39
  /** `small` or `large` (also `sm` / `lg`). */
40
40
  readonly size: _angular_core.InputSignal<WuSize | undefined>;
41
+ /**
42
+ * `'chips'`: each option its own pill with space around it, for filters with many options (and a count in the item
43
+ * template): rows wrap cleanly instead of breaking a joined bar. Default: the joined bar.
44
+ */
45
+ readonly variant: _angular_core.InputSignal<"default" | "chips" | "cards" | null | undefined>;
46
+ /** `variant="cards"`: the option field with the card's icon class. Default `'icon'`. */
47
+ readonly optionIcon: _angular_core.InputSignal<string>;
48
+ /** `variant="cards"`: the option field with the line under the title. Default `'description'`. */
49
+ readonly optionDescription: _angular_core.InputSignal<string>;
41
50
  readonly sizeKey: _angular_core.Signal<"sm" | "lg" | null>;
42
51
  readonly ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
43
52
  readonly onChange: _angular_core.OutputEmitterRef<WuSelectButtonChangeEvent>;
@@ -56,6 +65,8 @@ declare class WuSelectButton implements ControlValueAccessor {
56
65
  readonly classes: _angular_core.Signal<string>;
57
66
  readonly baseClasses: _angular_core.Signal<string>;
58
67
  constructor();
68
+ iconOf(option: unknown): string;
69
+ descriptionOf(option: unknown): string;
59
70
  labelOf(option: unknown): string;
60
71
  isOptionDisabled(option: unknown): boolean;
61
72
  isSelected(option: unknown): boolean;
@@ -66,7 +77,7 @@ declare class WuSelectButton implements ControlValueAccessor {
66
77
  registerOnTouched(fn: () => void): void;
67
78
  setDisabledState(disabled: boolean): void;
68
79
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WuSelectButton, never>;
69
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<WuSelectButton, "wu-selectbutton, wu-selectButton, wu-select-button", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "unselectable": { "alias": "unselectable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; }, { "onChange": "onChange"; "onOptionClick": "onOptionClick"; }, ["slotTemplates", "itemRef"], never, true, never>;
80
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<WuSelectButton, "wu-selectbutton, wu-selectButton, wu-select-button", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "optionValue": { "alias": "optionValue"; "required": false; "isSignal": true; }; "optionDisabled": { "alias": "optionDisabled"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "allowEmpty": { "alias": "allowEmpty"; "required": false; "isSignal": true; }; "unselectable": { "alias": "unselectable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "optionIcon": { "alias": "optionIcon"; "required": false; "isSignal": true; }; "optionDescription": { "alias": "optionDescription"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; }, { "onChange": "onChange"; "onOptionClick": "onOptionClick"; }, ["slotTemplates", "itemRef"], never, true, never>;
70
81
  }
71
82
 
72
83
  /** For NgModule apps. Standalone apps can import `WuSelectButton` directly. */
@@ -0,0 +1,108 @@
1
+ import * as i0 from '@angular/core';
2
+ import { AfterViewInit, OnDestroy, EventEmitter } from '@angular/core';
3
+ import { ControlValueAccessor } from '@angular/forms';
4
+
5
+ /**
6
+ * A box to sign in, for forms: `<wu-signature-pad [(ngModel)]="signature">`. Draw with a mouse, a pen (pressure makes
7
+ * the line thicker) or a finger. The value is a PNG data URL of the drawing (`null` while empty), so it can be shown in
8
+ * an `<img>` or sent as it is; a data URL written into the control is drawn back. Clear and undo buttons sit in the
9
+ * corner, a line shows where to sign, and the drawing survives the box being resized.
10
+ */
11
+ declare class WuSignaturePad implements AfterViewInit, ControlValueAccessor, OnDestroy {
12
+ /** Height of the box in px. Default: the theme's (`--wu-signature-height`, 12rem). */
13
+ height?: number | string | null;
14
+ /** Ink colour. Default: the theme's text colour. */
15
+ penColor?: string | null;
16
+ /** Line width in px at normal pressure. Default 2.5. */
17
+ set penWidth(v: unknown);
18
+ get penWidth(): number;
19
+ /** A background painted into the exported PNG, e.g. `'#ffffff'` for documents. Default: transparent. */
20
+ exportBackground?: string | null;
21
+ /** The text inside the empty box. Default: the locale's "Sign in the box". */
22
+ placeholder?: string | null;
23
+ /** `false` hides the line to sign on. */
24
+ set showGuide(v: unknown);
25
+ get showGuide(): boolean;
26
+ /** `false` hides the clear and undo buttons (call `clear()` / `undo()` yourself). */
27
+ set showButtons(v: unknown);
28
+ get showButtons(): boolean;
29
+ set disabled(v: unknown);
30
+ get disabled(): boolean;
31
+ set invalid(v: unknown);
32
+ get invalid(): boolean;
33
+ ariaLabel?: string | null;
34
+ styleClass?: string | null;
35
+ style?: Record<string, any> | string | null;
36
+ /** A stroke began. */
37
+ readonly onBegin: EventEmitter<PointerEvent>;
38
+ /** A stroke ended; the value has been updated. */
39
+ readonly onEnd: EventEmitter<string | null>;
40
+ readonly onClear: EventEmitter<void>;
41
+ private canvasRef;
42
+ /** True while nothing is drawn. */
43
+ empty: boolean;
44
+ private strokes;
45
+ private current;
46
+ /** A drawing that came in as a value; strokes are drawn over it. */
47
+ private base;
48
+ private _penWidth;
49
+ private _guide;
50
+ private _buttons;
51
+ private _disabled;
52
+ private _invalid;
53
+ private formDisabled;
54
+ private width;
55
+ private observer?;
56
+ private onChange;
57
+ private onTouched;
58
+ private readonly cdr;
59
+ private readonly zone;
60
+ private readonly config;
61
+ private readonly i18n;
62
+ constructor();
63
+ ngAfterViewInit(): void;
64
+ ngOnDestroy(): void;
65
+ get t(): {
66
+ label: string;
67
+ hint: string;
68
+ clear: string;
69
+ undo: string;
70
+ } | undefined;
71
+ get rootClass(): string;
72
+ get rootStyle(): Record<string, any>;
73
+ get hint(): string;
74
+ /** Removes the whole drawing. */
75
+ clear(): void;
76
+ /** Removes the last stroke. */
77
+ undo(): void;
78
+ /** The drawing as a data URL (`'image/png'` by default), or `null` while empty. */
79
+ toDataURL(type?: string, quality?: number): string | null;
80
+ down(event: PointerEvent): void;
81
+ move(event: PointerEvent): void;
82
+ up(): void;
83
+ private point;
84
+ /** Sizes the bitmap to the box at the screen's pixel density, then draws everything again. */
85
+ private fit;
86
+ private redraw;
87
+ /** A smooth line through the points (quadratic curves through the midpoints), thicker where the pen pressed harder. */
88
+ private drawStroke;
89
+ /** Updates the form value; `(onEnd)` only when a stroke finished, not on undo or clear. */
90
+ private commit;
91
+ private get canvas();
92
+ private get ctx();
93
+ writeValue(value: unknown): void;
94
+ registerOnChange(fn: (value: string | null) => void): void;
95
+ registerOnTouched(fn: () => void): void;
96
+ setDisabledState(disabled: boolean): void;
97
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuSignaturePad, never>;
98
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuSignaturePad, "wu-signature-pad, wu-signaturePad, wu-signature", never, { "height": { "alias": "height"; "required": false; }; "penColor": { "alias": "penColor"; "required": false; }; "penWidth": { "alias": "penWidth"; "required": false; }; "exportBackground": { "alias": "exportBackground"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "showGuide": { "alias": "showGuide"; "required": false; }; "showButtons": { "alias": "showButtons"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, { "onBegin": "onBegin"; "onEnd": "onEnd"; "onClear": "onClear"; }, never, never, true, never>;
99
+ }
100
+
101
+ /** For NgModule apps. Standalone apps can import `WuSignaturePad` directly. */
102
+ declare class WuSignaturePadModule {
103
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuSignaturePadModule, never>;
104
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WuSignaturePadModule, never, [typeof WuSignaturePad], [typeof WuSignaturePad]>;
105
+ static ɵinj: i0.ɵɵInjectorDeclaration<WuSignaturePadModule>;
106
+ }
107
+
108
+ export { WuSignaturePad, WuSignaturePadModule };
@@ -0,0 +1,72 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnDestroy, EventEmitter } from '@angular/core';
3
+
4
+ type WuStatSeverity = 'primary' | 'secondary' | 'success' | 'info' | 'warn' | 'danger' | 'help' | 'contrast';
5
+ /**
6
+ * A number to watch: `<wu-stat label="Ticket ที่เปิดอยู่" [value]="12" icon="wi wi-ticket" severity="info" [trend]="8"
7
+ * trendLabel="จากเดือนก่อน">`. An icon in a soft tile of its colour, the label, the value in large figures, and under
8
+ * it the trend (▲ green when up is good, ▼ red; `trendGood="down"` for counts that should fall) and a hint. With
9
+ * `clickable` the whole card is a button that emits `(onClick)`. Anything inside the tag goes under the figures, such as
10
+ * a sparkline.
11
+ */
12
+ declare class WuStat implements OnDestroy {
13
+ label?: string | null;
14
+ /** The figure. Numbers are shown with thousands separators in the app's language; strings as they are. */
15
+ value?: number | string | null;
16
+ /** Text right after the value, smaller: `'฿'` before needs `prefix`, `'ครั้ง'` after goes here. */
17
+ unit?: string | null;
18
+ prefix?: string | null;
19
+ /** Icon class: `'wi wi-ticket'`. */
20
+ icon?: string | null;
21
+ /** Colour of the icon tile. Default `'primary'`. */
22
+ severity: WuStatSeverity | null | undefined;
23
+ /** A muted line under the value: `'จาก 40 รายการ'`. */
24
+ hint?: string | null;
25
+ /** Change since the last period. A number gets a sign and `trendSuffix`; a string is shown as it is. */
26
+ trend?: number | string | null;
27
+ trendSuffix: string | null | undefined;
28
+ /** Which direction is good news: `'up'` (default) or `'down'` (complaints, open tickets, costs). */
29
+ trendGood: 'up' | 'down' | null | undefined;
30
+ /** Words after the trend: `'จากเดือนก่อน'`. */
31
+ trendLabel?: string | null;
32
+ /** The whole card becomes a button that emits `(onClick)`. */
33
+ set clickable(v: unknown);
34
+ get clickable(): boolean;
35
+ /** Shows a placeholder shimmer instead of the figures while the number loads. */
36
+ set loading(v: unknown);
37
+ get loading(): boolean;
38
+ ariaLabel?: string | null;
39
+ styleClass?: string | null;
40
+ style?: Record<string, any> | string | null;
41
+ readonly onClick: EventEmitter<MouseEvent>;
42
+ private _clickable;
43
+ private _loading;
44
+ private readonly config;
45
+ private readonly i18n;
46
+ constructor();
47
+ ngOnDestroy(): void;
48
+ get rootClass(): string;
49
+ get rootStyle(): Record<string, any> | null;
50
+ get valueText(): string;
51
+ get hasTrend(): boolean;
52
+ /** `up`, `down` or `same`, from the sign of a numeric trend (a string trend reads its leading + or -). */
53
+ get direction(): 'up' | 'down' | 'same';
54
+ get trendClass(): string;
55
+ get trendText(): string;
56
+ /** What a screen reader says before the trend figure. */
57
+ get trendWords(): string;
58
+ click(event: MouseEvent): void;
59
+ private get numberLocale();
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuStat, never>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<WuStat, "wu-stat", never, { "label": { "alias": "label"; "required": false; }; "value": { "alias": "value"; "required": false; }; "unit": { "alias": "unit"; "required": false; }; "prefix": { "alias": "prefix"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "severity": { "alias": "severity"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "trend": { "alias": "trend"; "required": false; }; "trendSuffix": { "alias": "trendSuffix"; "required": false; }; "trendGood": { "alias": "trendGood"; "required": false; }; "trendLabel": { "alias": "trendLabel"; "required": false; }; "clickable": { "alias": "clickable"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "styleClass": { "alias": "styleClass"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, { "onClick": "onClick"; }, never, ["*"], true, never>;
62
+ }
63
+
64
+ /** For NgModule apps. Standalone apps can import `WuStat` directly. */
65
+ declare class WuStatModule {
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<WuStatModule, never>;
67
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WuStatModule, never, [typeof WuStat], [typeof WuStat]>;
68
+ static ɵinj: i0.ɵɵInjectorDeclaration<WuStatModule>;
69
+ }
70
+
71
+ export { WuStat, WuStatModule };
72
+ export type { WuStatSeverity };
@@ -17,6 +17,8 @@ declare class WuTextarea implements AfterViewInit, DoCheck, OnDestroy {
17
17
  private readonly el;
18
18
  private readonly ngControl;
19
19
  private sub?;
20
+ private observer?;
21
+ private width;
20
22
  constructor();
21
23
  ngAfterViewInit(): void;
22
24
  ngDoCheck(): void;