@wirabyte/ui 2.0.0 → 2.1.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.
- package/CHANGELOG.md +17 -0
- package/config/options.d.ts +7 -0
- package/config/wu-config.service.d.ts +10 -0
- package/datepicker/datepicker.component.d.ts +2 -1
- package/esm2022/asidemenu/asidemenu.component.mjs +3 -3
- package/esm2022/chat/chat.component.mjs +2 -2
- package/esm2022/config/options.mjs +1 -1
- package/esm2022/config/wu-config.service.mjs +14 -1
- package/esm2022/datepicker/datepicker.component.mjs +4 -3
- package/esm2022/scheduler/scheduler.component.mjs +8 -7
- package/esm2022/sitefooter/sitefooter.component.mjs +2 -2
- package/esm2022/table/table.component.mjs +3 -3
- package/esm2022/textarea/textarea.directive.mjs +19 -5
- package/esm2022/thai/thai.pipes.mjs +2 -2
- package/fesm2022/wirabyte-ui-asidemenu.mjs +2 -2
- package/fesm2022/wirabyte-ui-asidemenu.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-chat.mjs +1 -1
- package/fesm2022/wirabyte-ui-chat.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-config.mjs +13 -0
- package/fesm2022/wirabyte-ui-config.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-datepicker.mjs +4 -3
- package/fesm2022/wirabyte-ui-datepicker.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-scheduler.mjs +7 -6
- package/fesm2022/wirabyte-ui-scheduler.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-sitefooter.mjs +1 -1
- package/fesm2022/wirabyte-ui-sitefooter.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-table.mjs +2 -2
- package/fesm2022/wirabyte-ui-table.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-textarea.mjs +18 -4
- package/fesm2022/wirabyte-ui-textarea.mjs.map +1 -1
- package/fesm2022/wirabyte-ui-thai.mjs +1 -1
- package/fesm2022/wirabyte-ui-thai.mjs.map +1 -1
- package/package.json +29 -29
- package/scheduler/scheduler.component.d.ts +1 -1
- package/textarea/textarea.directive.d.ts +1 -0
- package/themes/mali/amber.css +1 -1
- package/themes/mali/blue.css +1 -1
- package/themes/mali/cyan.css +1 -1
- package/themes/mali/emerald.css +1 -1
- package/themes/mali/fuchsia.css +1 -1
- package/themes/mali/green.css +1 -1
- package/themes/mali/indigo.css +1 -1
- package/themes/mali/lime.css +1 -1
- package/themes/mali/orange.css +1 -1
- package/themes/mali/pink.css +1 -1
- package/themes/mali/purple.css +1 -1
- package/themes/mali/red.css +1 -1
- package/themes/mali/rose.css +1 -1
- package/themes/mali/sky.css +1 -1
- package/themes/mali/teal.css +1 -1
- package/themes/mali/theme.css +1 -1
- package/themes/mali/violet.css +1 -1
- package/themes/mali/wira.css +1 -1
- package/themes/mali/yellow.css +1 -1
- package/themes/material/amber.css +1 -1
- package/themes/material/blue.css +1 -1
- package/themes/material/cyan.css +1 -1
- package/themes/material/emerald.css +1 -1
- package/themes/material/fuchsia.css +1 -1
- package/themes/material/green.css +1 -1
- package/themes/material/indigo.css +1 -1
- package/themes/material/lime.css +1 -1
- package/themes/material/orange.css +1 -1
- package/themes/material/pink.css +1 -1
- package/themes/material/purple.css +1 -1
- package/themes/material/red.css +1 -1
- package/themes/material/rose.css +1 -1
- package/themes/material/sky.css +1 -1
- package/themes/material/teal.css +1 -1
- package/themes/material/theme.css +1 -1
- package/themes/material/violet.css +1 -1
- package/themes/material/wira.css +1 -1
- package/themes/material/yellow.css +1 -1
- package/themes/phet/amber.css +1 -1
- package/themes/phet/blue.css +1 -1
- package/themes/phet/cyan.css +1 -1
- package/themes/phet/emerald.css +1 -1
- package/themes/phet/fuchsia.css +1 -1
- package/themes/phet/green.css +1 -1
- package/themes/phet/indigo.css +1 -1
- package/themes/phet/lime.css +1 -1
- package/themes/phet/orange.css +1 -1
- package/themes/phet/pink.css +1 -1
- package/themes/phet/purple.css +1 -1
- package/themes/phet/red.css +1 -1
- package/themes/phet/rose.css +1 -1
- package/themes/phet/sky.css +1 -1
- package/themes/phet/teal.css +1 -1
- package/themes/phet/theme.css +1 -1
- package/themes/phet/violet.css +1 -1
- package/themes/phet/wira.css +1 -1
- package/themes/phet/yellow.css +1 -1
- package/themes/sila/amber.css +1 -1
- package/themes/sila/blue.css +1 -1
- package/themes/sila/cyan.css +1 -1
- package/themes/sila/emerald.css +1 -1
- package/themes/sila/fuchsia.css +1 -1
- package/themes/sila/green.css +1 -1
- package/themes/sila/indigo.css +1 -1
- package/themes/sila/lime.css +1 -1
- package/themes/sila/orange.css +1 -1
- package/themes/sila/pink.css +1 -1
- package/themes/sila/purple.css +1 -1
- package/themes/sila/red.css +1 -1
- package/themes/sila/rose.css +1 -1
- package/themes/sila/sky.css +1 -1
- package/themes/sila/teal.css +1 -1
- package/themes/sila/theme.css +1 -1
- package/themes/sila/violet.css +1 -1
- package/themes/sila/wira.css +1 -1
- package/themes/sila/yellow.css +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
รุ่นของ `@wirabyte/ui` แยก major ตามช่วง Angular: `1.x` = 15–17, `2.x` = 18–20, `3.x` = 21 ขึ้นไป ทุก major ออกจาก source ชุดเดียวกัน หัวข้อด้านล่างจึงใช้กับทุก major ยกเว้นที่ระบุไว้ ส่วน `@wirabyte/icons` ออกพร้อมกันแต่ใช้เลขของตัวเอง
|
|
4
4
|
|
|
5
|
+
## 1.1.1 · 2.1.1 · 3.1.1
|
|
6
|
+
|
|
7
|
+
**แก้บั๊ก**
|
|
8
|
+
|
|
9
|
+
- Table แบบ `scrollable`: เลื่อนเมาส์บนตารางแล้วหน้าเลื่อนตามได้ เดิมเมื่อชี้อยู่บนตาราง หน้าจะไม่เลื่อนลงเลย แม้ตารางไม่ได้กำหนดความสูงและไม่มีอะไรให้เลื่อนในตัว เพราะ wrapper กันการเลื่อนส่งต่อทั้งแนวตั้งและแนวนอน ตอนนี้กันเฉพาะแนวนอน (ไม่ให้ปัดตารางแล้วเบราว์เซอร์ย้อนหน้า) ตารางที่กำหนด `scrollHeight` เลื่อนในตัวจนสุดแล้วหน้าเลื่อนต่อ (WUI-025)
|
|
10
|
+
|
|
11
|
+
## 1.1.0 · 2.1.0 · 3.1.0
|
|
12
|
+
|
|
13
|
+
**ของใหม่**
|
|
14
|
+
|
|
15
|
+
- นาฬิกากลางของแอป: `provideWiraUI({ now: () => serverTime.now() })` ให้ทุก component ใช้เวลานี้เป็น "ตอนนี้" แทนนาฬิกาเครื่องผู้ใช้ ได้แก่ วันนี้และเดือนแรกที่แสดงใน DatePicker, วันนี้และเส้นเวลาปัจจุบันใน Scheduler, pipe `wuTimeAgo`, ป้ายวันในแชท และปีใน SiteFooter เปลี่ยนภายหลังได้ที่ `WuConfig.clock` และอ่านด้วย `WuConfig.now()` ส่วนตัวจับเวลา (หน่วงการค้นหา อายุของ toast) ยังใช้นาฬิกาเครื่อง (WUI-024)
|
|
16
|
+
|
|
17
|
+
**แก้บั๊ก**
|
|
18
|
+
|
|
19
|
+
- Textarea ที่ใช้ `autoResize` ไม่ทำให้เบราว์เซอร์แจ้ง error "ResizeObserver loop completed with undelivered notifications" แล้ว เดิมเกิดเมื่อเปิด dialog หรือ panel ที่ช่องมีข้อความอยู่ก่อน และแอปที่ส่ง error ของหน้าเว็บเข้า `ErrorHandler` จะเห็นเป็น `ERROR` ใน console (WUI-022) ตอนนี้ช่องยังขยายตามข้อความตั้งแต่เฟรมแรกที่แสดงเหมือนเดิม
|
|
20
|
+
- Aside Menu บนมือถือ: ปุ่มปิดอยู่มุมบนด้านท้ายแถวเดียวกับโลโก้ และส่วน start กว้างเต็มหัวเมนู เดิมเมื่อ start สูง (โลโก้ นาฬิกา การ์ดผู้ใช้) ปุ่มไปอยู่กึ่งกลางความสูงและกินความกว้างทุกแถว ควรเว้นท้ายแถวแรกของ start ไว้ให้ปุ่ม (WUI-023)
|
|
21
|
+
|
|
5
22
|
## 1.0.0 · 2.0.0 · 3.0.0 · @wirabyte/icons 1.0.0
|
|
6
23
|
|
|
7
24
|
รุ่นจริงรุ่นแรก ติดตั้งได้ด้วย `ng add @wirabyte/ui` (Angular 21 ขึ้นไป), `@wirabyte/ui@2` (18–20) หรือ `@wirabyte/ui@1` (15–17) โดยไม่ต้องระบุ tag แล้ว รวมทุกข้อที่พบจากการใช้จริงกับแอปแรก (รหัส WUI-001 ถึง WUI-021)
|
package/config/options.d.ts
CHANGED
|
@@ -44,6 +44,13 @@ export interface WiraUIOptions {
|
|
|
44
44
|
scale?: WuScale;
|
|
45
45
|
/** Waits before searching for the whole app: `{ autoComplete: 300, filter: 300 }`. Default 0 (no wait). */
|
|
46
46
|
delays?: WuDelays;
|
|
47
|
+
/**
|
|
48
|
+
* The clock every component treats as "now": today in the datepicker and the scheduler, the scheduler's current-time
|
|
49
|
+
* line, `wuTimeAgo`, the chat's day labels, the year in the site footer. Default: the device clock. Give the
|
|
50
|
+
* server's time when the device clock cannot be trusted: `now: () => serverTime.now()`. Change it later through
|
|
51
|
+
* `WuConfig.clock`. Timers (debounces, toast life) keep measuring with the device clock.
|
|
52
|
+
*/
|
|
53
|
+
now?: () => Date;
|
|
47
54
|
/**
|
|
48
55
|
* Where the theme's fonts come from. `'google'` (the default) adds the Google Fonts stylesheet for the body and
|
|
49
56
|
* heading fonts the theme ends up with (Kanit, Sarabun, Anuphan …) unless the page already links it, so a theme set
|
|
@@ -10,6 +10,16 @@ export declare class WuConfig {
|
|
|
10
10
|
translation: WuLocale;
|
|
11
11
|
/** Waits before searching, in ms (`provideWiraUI({ delays })`); 0 = no wait. */
|
|
12
12
|
delays: Required<WuDelays>;
|
|
13
|
+
/**
|
|
14
|
+
* Where "now" comes from (`provideWiraUI({ now })`; default: the device clock). Assign another function at run
|
|
15
|
+
* time, say once the server time is known: components read it each time they need the time.
|
|
16
|
+
*/
|
|
17
|
+
clock: () => Date;
|
|
18
|
+
/**
|
|
19
|
+
* Now, by `clock`: what the datepicker, scheduler, chat, footer and `wuTimeAgo` call "now" and "today". A clock
|
|
20
|
+
* that returns no valid date falls back to the device clock. Always a new Date, so callers may change it.
|
|
21
|
+
*/
|
|
22
|
+
now(): Date;
|
|
13
23
|
/** Emits after `setTranslation()` so components can refresh their labels. */
|
|
14
24
|
readonly translationChange: Subject<WuLocale>;
|
|
15
25
|
setTranslation(partial: Partial<WuLocale>): void;
|
|
@@ -121,6 +121,8 @@ export declare class WuDatePicker implements ControlValueAccessor, OnChanges, On
|
|
|
121
121
|
private readonly rootRef;
|
|
122
122
|
private readonly inputRef;
|
|
123
123
|
private readonly panelRef;
|
|
124
|
+
private readonly config;
|
|
125
|
+
/** Today and the first month shown come from the app's clock (`provideWiraUI({ now })`), not the device's. */
|
|
124
126
|
readonly state: DatePickerState;
|
|
125
127
|
open: boolean;
|
|
126
128
|
focused: boolean;
|
|
@@ -149,7 +151,6 @@ export declare class WuDatePicker implements ControlValueAccessor, OnChanges, On
|
|
|
149
151
|
private popup;
|
|
150
152
|
private repeat;
|
|
151
153
|
private readonly autoId;
|
|
152
|
-
private readonly config;
|
|
153
154
|
private readonly cdr;
|
|
154
155
|
private readonly host;
|
|
155
156
|
private readonly doc;
|