@tarragon-ui/js 0.1.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.
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ajax-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ajax-form.d.ts","sourceRoot":"","sources":["../../src/components/ajax-form.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ajax-html.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ajax-html.d.ts","sourceRoot":"","sources":["../../src/components/ajax-html.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=dropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../src/components/dropdown.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=exclusive-checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exclusive-checkbox.d.ts","sourceRoot":"","sources":["../../src/components/exclusive-checkbox.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=select-all.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select-all.d.ts","sourceRoot":"","sources":["../../src/components/select-all.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=until-selected.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"until-selected.d.ts","sourceRoot":"","sources":["../../src/components/until-selected.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validate-form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validate-form.d.ts","sourceRoot":"","sources":["../../src/components/validate-form.ts"],"names":[],"mappings":""}
@@ -0,0 +1,95 @@
1
+ export type Result<Error, Value> = [Error, undefined] | [undefined, Value];
2
+ export declare const libNamePrefix = "tui-";
3
+ export declare const dataAttributePrefix = "data-tui-";
4
+ export declare const focusableElementsSelector = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
5
+ export declare const SECOND = 1000;
6
+ export declare enum NativeEvent {
7
+ Click = "click",
8
+ DoubleClick = "dblclick",
9
+ MouseUp = "mouseup",
10
+ MouseDown = "mousedown",
11
+ ContextMenu = "contextmenu",
12
+ MouseWheel = "mousewheel",
13
+ DOMMouseScroll = "DOMMouseScroll",
14
+ MouseOver = "mouseover",
15
+ MouseOut = "mouseout",
16
+ MouseMove = "mousemove",
17
+ SelectStart = "selectstart",
18
+ SelectEnd = "selectend",
19
+ KeyDown = "keydown",
20
+ KeyPress = "keypress",
21
+ KeyUp = "keyup",
22
+ OrientationChange = "orientationchange",
23
+ TouchStart = "touchstart",
24
+ TouchMove = "touchmove",
25
+ TouchEnd = "touchend",
26
+ TouchCancel = "touchcancel",
27
+ PointerDown = "pointerdown",
28
+ PointerMove = "pointermove",
29
+ PointerUp = "pointerup",
30
+ PointerLeave = "pointerleave",
31
+ PointerCancel = "pointercancel",
32
+ GestureStart = "gesturestart",
33
+ GestureChange = "gesturechange",
34
+ GestureEnd = "gestureend",
35
+ Focus = "focus",
36
+ Blur = "blur",
37
+ Change = "change",
38
+ Reset = "reset",
39
+ Select = "select",
40
+ Submit = "submit",
41
+ FocusIn = "focusin",
42
+ FocusOut = "focusout",
43
+ Load = "load",
44
+ Unload = "unload",
45
+ BeforeUnload = "beforeunload",
46
+ Resize = "resize",
47
+ Move = "move",
48
+ DOMContentLoaded = "DOMContentLoaded",
49
+ ReadyStateChange = "readystatechange",
50
+ Error = "error",
51
+ Abort = "abort",
52
+ Scroll = "scroll",
53
+ Input = "input",
54
+ Toggle = "toggle",
55
+ Close = "close"
56
+ }
57
+ export declare const Component: {
58
+ readonly AjaxForm: {
59
+ readonly Name: "tui-ajax-form";
60
+ readonly Event: {
61
+ readonly Form: "form";
62
+ };
63
+ };
64
+ readonly AjaxHtml: {
65
+ readonly Name: "tui-ajax-html";
66
+ };
67
+ readonly ExclusiveCheckbox: {
68
+ readonly Name: "tui-exclusive-checkbox";
69
+ readonly Event: {
70
+ readonly Toggle: "toggle";
71
+ };
72
+ };
73
+ readonly Dropdown: {
74
+ readonly Name: "tui-dropdown";
75
+ };
76
+ readonly SelectAll: {
77
+ readonly Name: "tui-select-all";
78
+ readonly Event: {
79
+ readonly Toggle: "toggle";
80
+ };
81
+ };
82
+ readonly UntilSelected: {
83
+ readonly Name: "tui-until-selected";
84
+ readonly Event: {
85
+ readonly Toggle: "toggle";
86
+ };
87
+ };
88
+ readonly ValidateForm: {
89
+ readonly Name: "tui-validate-form";
90
+ readonly Event: {
91
+ readonly Validate: "validate";
92
+ };
93
+ };
94
+ };
95
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,CAAC,KAAK,EAAE,KAAK,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAA;AAE1E,eAAO,MAAM,aAAa,SAAS,CAAA;AACnC,eAAO,MAAM,mBAAmB,cAA0B,CAAA;AAE1D,eAAO,MAAM,yBAAyB,gJACsG,CAAA;AAE5I,eAAO,MAAM,MAAM,OAAO,CAAA;AAE1B,oBAAY,WAAW;IACtB,KAAK,UAAU;IACf,WAAW,aAAa;IACxB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,UAAU,eAAe;IACzB,cAAc,mBAAmB;IACjC,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,iBAAiB,sBAAsB;IACvC,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,YAAY,iBAAiB;IAC7B,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,gBAAgB,qBAAqB;IACrC,gBAAgB,qBAAqB;IACrC,KAAK,UAAU;IACf,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CACf;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmBZ,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare function emitEvent(componentName: string, eventId: string, element: Element, cancelable?: boolean): boolean;
2
+ //# sourceMappingURL=emitEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"emitEvent.d.ts","sourceRoot":"","sources":["../src/emitEvent.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CACxB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,OAAO,EAChB,UAAU,UAAQ,WAOlB"}
@@ -0,0 +1,42 @@
1
+ import { Result } from './constants';
2
+ type Method = 'GET' | 'PUT' | 'POST' | 'PATCH' | 'DELETE';
3
+ type Headers = Record<string, string>;
4
+ type FetchParameters = {
5
+ queryParameters?: URLSearchParams;
6
+ headers?: Headers;
7
+ data?: BodyInit;
8
+ };
9
+ type FetchError = {
10
+ message: string;
11
+ error?: Error;
12
+ status?: number;
13
+ };
14
+ export type FetchSuccess = {
15
+ type: 'json';
16
+ message?: string | null;
17
+ redirectUrl?: string | null;
18
+ queryKey?: string;
19
+ } | {
20
+ type: 'html';
21
+ document: Document;
22
+ };
23
+ type FetchResult = Promise<Result<FetchError, FetchSuccess>>;
24
+ export declare class FetchClient {
25
+ private static instance;
26
+ private baseUrl;
27
+ private baseHeaders;
28
+ constructor(baseUrl: string, headers?: Headers);
29
+ static getInstance(baseUrl: string, headers?: Headers): FetchClient;
30
+ isMethod(value: string): value is Method;
31
+ private buildQueryString;
32
+ private buildHeaders;
33
+ send(url: string, method: Method, parameters: FetchParameters): FetchResult;
34
+ get(url: string, parameters?: FetchParameters): FetchResult;
35
+ put(url: string, parameters?: FetchParameters): FetchResult;
36
+ post(url: string, parameters?: FetchParameters): FetchResult;
37
+ patch(url: string, parameters?: FetchParameters): FetchResult;
38
+ delete(url: string, parameters?: FetchParameters): FetchResult;
39
+ }
40
+ export declare const fetchClient: FetchClient;
41
+ export {};
42
+ //# sourceMappingURL=fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../src/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,KAAK,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEzD,KAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAErC,KAAK,eAAe,GAAG;IACtB,eAAe,CAAC,EAAE,eAAe,CAAA;IACjC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,QAAQ,CAAA;CACf,CAAA;AAED,KAAK,UAAU,GAAG;IAAE,OAAO,EAAE,MAAM,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