@tradecanvas/chart 1.30.0 → 1.31.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.
- package/dist/{LayoutSession-BW-Ejkzp.cjs → LayoutSession-BnLe0VnO.cjs} +2 -2
- package/dist/{LayoutSession-BW-Ejkzp.cjs.map → LayoutSession-BnLe0VnO.cjs.map} +1 -1
- package/dist/{LayoutSession-BKyvBlmw.js → LayoutSession-DjqwQhHO.js} +2 -2
- package/dist/{LayoutSession-BKyvBlmw.js.map → LayoutSession-DjqwQhHO.js.map} +1 -1
- package/dist/{i18n-Oscn9slN.js → i18n-BPt_Qbx8.js} +7 -1
- package/dist/i18n-BPt_Qbx8.js.map +1 -0
- package/dist/i18n-DWtAiG7D.cjs +2 -0
- package/dist/i18n-DWtAiG7D.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/widget/ChartWidget.d.ts +2 -0
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/WidgetDropdown.d.ts.map +1 -1
- package/dist/widget/WidgetStyles.d.ts.map +1 -1
- package/dist/widget/calendarPopup.d.ts +58 -0
- package/dist/widget/calendarPopup.d.ts.map +1 -0
- package/dist/widget/formControls.d.ts +27 -0
- package/dist/widget/formControls.d.ts.map +1 -0
- package/dist/widget/index.cjs +588 -45
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.js +1362 -933
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/locales/ar.d.ts.map +1 -1
- package/dist/widget/locales/cs.d.ts.map +1 -1
- package/dist/widget/locales/da.d.ts.map +1 -1
- package/dist/widget/locales/de.d.ts.map +1 -1
- package/dist/widget/locales/el.d.ts.map +1 -1
- package/dist/widget/locales/en.d.ts +3 -0
- package/dist/widget/locales/en.d.ts.map +1 -1
- package/dist/widget/locales/es.d.ts.map +1 -1
- package/dist/widget/locales/et.d.ts.map +1 -1
- package/dist/widget/locales/fa.d.ts.map +1 -1
- package/dist/widget/locales/fr.d.ts.map +1 -1
- package/dist/widget/locales/he.d.ts.map +1 -1
- package/dist/widget/locales/hu.d.ts.map +1 -1
- package/dist/widget/locales/id.d.ts.map +1 -1
- package/dist/widget/locales/index.cjs +1 -1
- package/dist/widget/locales/index.cjs.map +1 -1
- package/dist/widget/locales/index.js +85 -1
- package/dist/widget/locales/index.js.map +1 -1
- package/dist/widget/locales/it.d.ts.map +1 -1
- package/dist/widget/locales/ja.d.ts.map +1 -1
- package/dist/widget/locales/ko.d.ts.map +1 -1
- package/dist/widget/locales/ms.d.ts.map +1 -1
- package/dist/widget/locales/nb.d.ts.map +1 -1
- package/dist/widget/locales/nl.d.ts.map +1 -1
- package/dist/widget/locales/pl.d.ts.map +1 -1
- package/dist/widget/locales/pt.d.ts.map +1 -1
- package/dist/widget/locales/ro.d.ts.map +1 -1
- package/dist/widget/locales/ru.d.ts.map +1 -1
- package/dist/widget/locales/sk.d.ts.map +1 -1
- package/dist/widget/locales/sv.d.ts.map +1 -1
- package/dist/widget/locales/th.d.ts.map +1 -1
- package/dist/widget/locales/tr.d.ts.map +1 -1
- package/dist/widget/locales/vi.d.ts.map +1 -1
- package/dist/widget/locales/zh.d.ts.map +1 -1
- package/dist/widget/locales/zhHant.d.ts.map +1 -1
- package/dist/widget/placeMenu.d.ts +7 -0
- package/dist/widget/placeMenu.d.ts.map +1 -0
- package/dist/widget/selectMenu.d.ts +38 -0
- package/dist/widget/selectMenu.d.ts.map +1 -0
- package/package.json +3 -3
- package/dist/i18n-DFtQmgpL.cjs +0 -2
- package/dist/i18n-DFtQmgpL.cjs.map +0 -1
- package/dist/i18n-Oscn9slN.js.map +0 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface CalendarLabels {
|
|
2
|
+
prevMonth: string;
|
|
3
|
+
nextMonth: string;
|
|
4
|
+
today: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CalendarDay {
|
|
7
|
+
year: number;
|
|
8
|
+
/** 0–11. */
|
|
9
|
+
month: number;
|
|
10
|
+
day: number;
|
|
11
|
+
}
|
|
12
|
+
/** The first day of the week where `locale` is spoken: 0 Sunday, 1 Monday. */
|
|
13
|
+
export declare function weekStart(locale: string): 0 | 1;
|
|
14
|
+
/** Six whole weeks around month `month` of `year`, from `firstDay` (0 Sunday, 1 Monday). */
|
|
15
|
+
export declare function monthGrid(year: number, month: number, firstDay: 0 | 1): CalendarDay[];
|
|
16
|
+
/**
|
|
17
|
+
* The calendar a date field opens, drawn by the widget: a month of days with
|
|
18
|
+
* arrows to turn it, today marked and a button to go there. The field stays
|
|
19
|
+
* the `<input type="date">` it was; a pick sets its value (YYYY-MM-DD) and
|
|
20
|
+
* fires `input` and `change`.
|
|
21
|
+
*/
|
|
22
|
+
export declare class CalendarPopup {
|
|
23
|
+
private readonly layer;
|
|
24
|
+
private readonly labels;
|
|
25
|
+
private readonly locale;
|
|
26
|
+
private input;
|
|
27
|
+
private panel;
|
|
28
|
+
private grid;
|
|
29
|
+
private titleEl;
|
|
30
|
+
/** The month shown and the day the keys are on. */
|
|
31
|
+
private view;
|
|
32
|
+
private focusDay;
|
|
33
|
+
private readonly onOutside;
|
|
34
|
+
private readonly onAway;
|
|
35
|
+
private readonly onScroll;
|
|
36
|
+
/** Closes the calendar when its field leaves the page (its dialog closed). */
|
|
37
|
+
private readonly watch;
|
|
38
|
+
constructor(layer: () => HTMLElement, labels: () => CalendarLabels, locale: () => string);
|
|
39
|
+
isOpenFor(input: HTMLInputElement): boolean;
|
|
40
|
+
/** Whether `node` is the open calendar's field or inside the calendar. */
|
|
41
|
+
owns(node: Node | null): boolean;
|
|
42
|
+
open(input: HTMLInputElement): void;
|
|
43
|
+
/** Closes the calendar; `refocus` puts focus back on the field. */
|
|
44
|
+
close(refocus: boolean): void;
|
|
45
|
+
/** Moves keyboard focus into the days (from the field: ArrowDown). */
|
|
46
|
+
focusGrid(): void;
|
|
47
|
+
destroy(): void;
|
|
48
|
+
private navButton;
|
|
49
|
+
private turn;
|
|
50
|
+
/** `day` moved inside the field's min and max, so the keys never rest on a greyed day. */
|
|
51
|
+
private clamp;
|
|
52
|
+
private allowed;
|
|
53
|
+
private render;
|
|
54
|
+
private onKey;
|
|
55
|
+
private moveFocus;
|
|
56
|
+
private pick;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=calendarPopup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendarPopup.d.ts","sourceRoot":"","sources":["../../src/widget/calendarPopup.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAQD,8EAA8E;AAC9E,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,GAAG,CAAC,CAY/C;AAED,4FAA4F;AAC5F,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,WAAW,EAAE,CASrF;AAsBD;;;;;GAKG;AACH,qBAAa,aAAa;IAwBtB,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAzBzB,OAAO,CAAC,KAAK,CAAiC;IAC9C,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,IAAI,CAA4B;IACxC,OAAO,CAAC,OAAO,CAA4B;IAC3C,mDAAmD;IACnD,OAAO,CAAC,IAAI,CAAyB;IACrC,OAAO,CAAC,QAAQ,CAA2B;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAIxB;IACF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2B;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAGvB;IACF,8EAA8E;IAC9E,OAAO,CAAC,QAAQ,CAAC,KAAK,CAEnB;gBAGgB,KAAK,EAAE,MAAM,WAAW,EACxB,MAAM,EAAE,MAAM,cAAc,EAC5B,MAAM,EAAE,MAAM,MAAM;IAGvC,SAAS,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO;IAI3C,0EAA0E;IAC1E,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,OAAO;IAIhC,IAAI,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI;IAiFnC,mEAAmE;IACnE,KAAK,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAa7B,sEAAsE;IACtE,SAAS,IAAI,IAAI;IAIjB,OAAO,IAAI,IAAI;IAIf,OAAO,CAAC,SAAS;IAYjB,OAAO,CAAC,IAAI;IAUZ,0FAA0F;IAC1F,OAAO,CAAC,KAAK;IASb,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,MAAM;IAqCd,OAAO,CAAC,KAAK;IAqBb,OAAO,CAAC,SAAS;IAUjB,OAAO,CAAC,IAAI;CAUb"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CalendarLabels } from './calendarPopup.js';
|
|
2
|
+
export interface FormControlOptions {
|
|
3
|
+
/** Where the lists and calendars open, over the page (the widget's overlay layer). */
|
|
4
|
+
layer: () => HTMLElement;
|
|
5
|
+
labels: () => CalendarLabels;
|
|
6
|
+
/** The language for month and day names. */
|
|
7
|
+
locale: () => string;
|
|
8
|
+
/**
|
|
9
|
+
* Whether to leave fields to the platform's own pickers. Default: on a
|
|
10
|
+
* touch screen, where the phone's wheel and calendar are the better ones.
|
|
11
|
+
*/
|
|
12
|
+
native?: () => boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Whether date fields open the widget's calendar. Default: where the
|
|
15
|
+
* browser's own calendar can be kept shut (Chromium, Safari); Firefox
|
|
16
|
+
* keeps its own.
|
|
17
|
+
*/
|
|
18
|
+
calendar?: () => boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Selects and date fields inside `roots` open the widget's own list and
|
|
22
|
+
* calendar instead of the browser's: one look in every theme and every
|
|
23
|
+
* browser. The fields themselves are untouched, so their values and events
|
|
24
|
+
* stay as they were. Returns the uninstall.
|
|
25
|
+
*/
|
|
26
|
+
export declare function installFormControls(roots: readonly HTMLElement[], options: FormControlOptions): () => void;
|
|
27
|
+
//# sourceMappingURL=formControls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formControls.d.ts","sourceRoot":"","sources":["../../src/widget/formControls.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAExE,MAAM,WAAW,kBAAkB;IACjC,sFAAsF;IACtF,KAAK,EAAE,MAAM,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,cAAc,CAAC;IAC7B,4CAA4C;IAC5C,MAAM,EAAE,MAAM,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC;CAC1B;AAmBD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,EAAE,OAAO,EAAE,kBAAkB,GAAG,MAAM,IAAI,CAgG1G"}
|