@zeyos/zx 3.0.0 → 4.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 (88) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/DESIGN-SYSTEM.md +28 -68
  3. package/README.md +16 -37
  4. package/dist/types/components/app-sidebar/app-sidebar.d.ts +106 -32
  5. package/dist/types/components/card/card.d.ts +128 -0
  6. package/dist/types/components/chart/chart.d.ts +1 -0
  7. package/dist/types/components/launcher/launcher.d.ts +65 -6
  8. package/dist/types/components/select/select.d.ts +51 -0
  9. package/dist/types/components/table/table.d.ts +4 -3
  10. package/dist/types/core/dom.d.ts +8 -0
  11. package/dist/types/index.d.ts +2 -1
  12. package/dist/types/{components/app-rail → internal}/app-rail.d.ts +34 -19
  13. package/dist/types/zeyos/icons.d.ts +5 -0
  14. package/dist/types/zeyos/index.d.ts +2 -1
  15. package/dist/types/zeyos/launcher.d.ts +147 -0
  16. package/dist/types/zeyos/select.d.ts +39 -0
  17. package/dist/zx-zeyos.esm.js +1324 -46
  18. package/dist/zx-zeyos.esm.min.js +1 -1
  19. package/dist/zx.css +400 -12
  20. package/dist/zx.esm.js +1059 -189
  21. package/dist/zx.esm.min.js +3 -3
  22. package/dist/zx.global.js +1059 -189
  23. package/dist/zx.global.min.js +3 -3
  24. package/dist/zx.min.css +1 -1
  25. package/docs/api.json +258 -145
  26. package/docs/llms.md +93 -112
  27. package/docs/llms.txt +16 -15
  28. package/package.json +8 -17
  29. package/src/components/app-sidebar/app-sidebar.css +12 -0
  30. package/src/components/app-sidebar/app-sidebar.js +310 -110
  31. package/src/components/card/card.css +149 -0
  32. package/src/components/card/card.js +285 -0
  33. package/src/components/chart/chart.js +8 -3
  34. package/src/components/grid/grid.js +10 -3
  35. package/src/components/launcher/launcher.css +113 -3
  36. package/src/components/launcher/launcher.js +234 -26
  37. package/src/components/select/field-adapter.js +9 -4
  38. package/src/components/select/select.css +144 -10
  39. package/src/components/select/select.js +259 -27
  40. package/src/components/table/table.js +8 -7
  41. package/src/core/dom.js +20 -0
  42. package/src/index.js +2 -1
  43. package/src/{components/app-rail → internal}/app-rail.js +80 -30
  44. package/src/zeyos/icons.js +8 -3
  45. package/src/zeyos/index.js +7 -1
  46. package/src/zeyos/launcher.js +338 -0
  47. package/src/zeyos/modules.js +1 -0
  48. package/src/zeyos/select.js +115 -1
  49. package/styles/tokens/global.css +1 -1
  50. package/styles/tokens/modules.css +1 -0
  51. package/styles/zx.css +1 -0
  52. package/MIGRATION.md +0 -749
  53. package/dist/types/compat/base.d.ts +0 -156
  54. package/dist/types/compat/globals.d.ts +0 -20
  55. package/dist/types/compat/index.d.ts +0 -128
  56. package/dist/types/compat/map/basic.d.ts +0 -175
  57. package/dist/types/compat/map/data.d.ts +0 -103
  58. package/dist/types/compat/map/date-time.d.ts +0 -80
  59. package/dist/types/compat/map/factory.d.ts +0 -9
  60. package/dist/types/compat/map/form.d.ts +0 -98
  61. package/dist/types/compat/map/helpers.d.ts +0 -12
  62. package/dist/types/compat/map/http.d.ts +0 -36
  63. package/dist/types/compat/map/layout.d.ts +0 -106
  64. package/dist/types/compat/map/options.d.ts +0 -80
  65. package/dist/types/compat/map/select.d.ts +0 -95
  66. package/dist/types/compat/map/stubs.d.ts +0 -32
  67. package/dist/types/compat/map/utilities.d.ts +0 -37
  68. package/dist/types/compat-entry.d.ts +0 -5
  69. package/dist/zx-compat.esm.js +0 -17848
  70. package/dist/zx-compat.esm.min.js +0 -1
  71. package/dist/zx-compat.global.js +0 -29008
  72. package/dist/zx-compat.global.min.js +0 -3
  73. package/src/compat/base.js +0 -291
  74. package/src/compat/globals.js +0 -167
  75. package/src/compat/index.js +0 -84
  76. package/src/compat/map/basic.js +0 -464
  77. package/src/compat/map/data.js +0 -254
  78. package/src/compat/map/date-time.js +0 -177
  79. package/src/compat/map/factory.js +0 -45
  80. package/src/compat/map/form.js +0 -330
  81. package/src/compat/map/helpers.js +0 -46
  82. package/src/compat/map/http.js +0 -117
  83. package/src/compat/map/layout.js +0 -256
  84. package/src/compat/map/options.js +0 -267
  85. package/src/compat/map/select.js +0 -198
  86. package/src/compat/map/stubs.js +0 -26
  87. package/src/compat/map/utilities.js +0 -113
  88. package/src/compat-entry.js +0 -11
@@ -1,156 +0,0 @@
1
- export type LegacyArgumentMapper = (detail: Record<string, any>, event: Event) => unknown[];
2
- export type LegacyEventMapping = {
3
- /**
4
- * Zx event name.
5
- */
6
- type: string;
7
- /**
8
- * Legacy positional argument adapter.
9
- */
10
- args?: LegacyArgumentMapper;
11
- /**
12
- * Optional event filter.
13
- */
14
- filter?: (detail: Record<string, any>, event: Event) => boolean;
15
- };
16
- export type LegacyEventMap = Record<string, string | LegacyEventMapping>;
17
- export type WrapperConfiguration = {
18
- events?: LegacyEventMap;
19
- ui?: Record<string, string | Element | (() => Element | null)>;
20
- setters?: Record<string, string | ((value: unknown) => void)>;
21
- };
22
- /** @typedef {(detail: Record<string, any>, event: Event) => unknown[]} LegacyArgumentMapper */
23
- /**
24
- * @typedef {Object} LegacyEventMapping
25
- * @property {string} type Zx event name.
26
- * @property {LegacyArgumentMapper} [args] Legacy positional argument adapter.
27
- * @property {(detail: Record<string, any>, event: Event) => boolean} [filter] Optional event filter.
28
- */
29
- /** @typedef {Record<string, string|LegacyEventMapping>} LegacyEventMap */
30
- /**
31
- * @typedef {Object} WrapperConfiguration
32
- * @property {LegacyEventMap} [events]
33
- * @property {Record<string, string|Element|(() => Element|null)>} [ui]
34
- * @property {Record<string, string|((value: unknown) => void)>} [setters]
35
- */
36
- /**
37
- * MooTools-flavoured façade shared by compatibility component wrappers.
38
- * @fires GxWrapper#legacy-event
39
- */
40
- export declare class GxWrapper {
41
- gx: any;
42
- options: {
43
- [x: string]: any;
44
- };
45
- _events: Map<any, any>;
46
- _mappedListeners: any[];
47
- _domAbort: AbortController;
48
- _zx: any;
49
- _ui: {};
50
- _display: {};
51
- _uiMap: {};
52
- _optionSetters: {};
53
- _destroyed: boolean;
54
- /** Fully qualified legacy class name shown in migration warnings. */
55
- static legacyName: string;
56
- /**
57
- * Initializes legacy options and callback-style `onEvent` options.
58
- * Subclasses call `_attach()` after constructing their Zx implementation.
59
- * @param {Record<string, any>} [options={}] Legacy options.
60
- * @param {Record<string, any>} [defaults={}] Legacy defaults.
61
- */
62
- constructor(options?: Record<string, any>, defaults?: Record<string, any>);
63
- /**
64
- * Subscribes a legacy callback.
65
- * @param {string} type Legacy event name, with or without an `on` prefix.
66
- * @param {Function} fn Callback receiving legacy positional arguments.
67
- * @returns {this}
68
- */
69
- addEvent(type: string, fn: Function): this;
70
- /**
71
- * Removes one callback, or all callbacks of a type when omitted.
72
- * @param {string} type Legacy event name.
73
- * @param {Function} [fn] Callback to remove.
74
- * @returns {this}
75
- */
76
- removeEvent(type: string, fn?: Function): this;
77
- /**
78
- * Fires a legacy event synchronously.
79
- * @param {string} type Legacy event name.
80
- * @param {unknown|unknown[]} [args=[]] Positional argument array or one argument.
81
- * @returns {this}
82
- * @fires GxWrapper#legacy-event
83
- */
84
- fireEvent(type: string, args?: unknown | unknown[]): this;
85
- /**
86
- * Applies multiple post-construction legacy options.
87
- * @param {Record<string, unknown>} options Option values.
88
- * @returns {this}
89
- */
90
- setOptions(options: Record<string, unknown>): this;
91
- /**
92
- * Applies one post-construction option through a declared setter.
93
- * Unsupported dynamic options are retained on `options` and warn once per class/key.
94
- * @param {string} option Legacy option name.
95
- * @param {unknown} value New value.
96
- * @returns {this}
97
- */
98
- setOption(option: string, value: unknown): this;
99
- /**
100
- * Returns the wrapped component root.
101
- * @returns {Element|null}
102
- */
103
- toElement(): Element | null;
104
- /**
105
- * Resolves a legacy `_ui` key, falling back to the component root.
106
- * @param {string} [key='root'] Legacy display key.
107
- * @returns {Element|null}
108
- */
109
- display(key?: string): Element | null;
110
- /**
111
- * Returns the supported legacy coordinate subset.
112
- * @returns {{width: number, height: number, top: number, left: number}}
113
- */
114
- getCoordinates(): {
115
- width: number;
116
- height: number;
117
- top: number;
118
- left: number;
119
- };
120
- /**
121
- * Updates one root style property.
122
- * @param {string} property CSS property.
123
- * @param {unknown} value CSS value.
124
- * @returns {this}
125
- */
126
- setStyle(property: string, value: unknown): this;
127
- /**
128
- * Updates supported root coordinates.
129
- * @param {Record<string, unknown>} coordinates Coordinate styles.
130
- * @returns {this}
131
- */
132
- setCoordinates(coordinates?: Record<string, unknown>): this;
133
- /**
134
- * Destroys the wrapped component and legacy event subscriptions.
135
- * @returns {void}
136
- */
137
- destroy(): void;
138
- /**
139
- * Attaches a constructed Zx component and its translation metadata.
140
- * @param {any} component Wrapped Zx component.
141
- * @param {WrapperConfiguration} [configuration={}] Event, display, and setter maps.
142
- * @returns {this}
143
- */
144
- _attach(component: any, configuration?: WrapperConfiguration): this;
145
- /**
146
- * Adds a DOM listener owned by this wrapper.
147
- * @param {EventTarget} target Event target.
148
- * @param {string} type Event type.
149
- * @param {EventListenerOrEventListenerObject} listener Listener.
150
- * @param {AddEventListenerOptions} [options={}] Listener options.
151
- * @returns {this}
152
- */
153
- _listen(target: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: AddEventListenerOptions): this;
154
- /** @param {Element|null} element @param {boolean} active @returns {void} */
155
- _mirrorAct(element: Element | null, active: boolean): void;
156
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * Installs the small WeakMap-backed MooTools Element storage surface.
3
- * Existing implementations are never overwritten.
4
- * @param {typeof globalThis} [host=globalThis] Realm whose Element prototype is extended.
5
- * @returns {void}
6
- */
7
- export declare function installElementStorage(host?: typeof globalThis): void;
8
- /**
9
- * Parses the legacy gx object-literal DOM dialect.
10
- * `html` is intentionally treated as trusted legacy markup via `h.raw()`.
11
- * @param {unknown} source Legacy tree value.
12
- * @returns {Node|false} Parsed node, or false for unsupported input.
13
- */
14
- export declare function parse(source: unknown): Node | false;
15
- /**
16
- * Explicitly installs legacy globals and prototype conveniences.
17
- * @param {typeof globalThis} [host=globalThis] Realm to modify.
18
- * @returns {typeof globalThis} The supplied realm.
19
- */
20
- export declare function installGlobals(host?: typeof globalThis): typeof globalThis;
@@ -1,128 +0,0 @@
1
- import { GxWrapper } from './base.js';
2
- import { installElementStorage, installGlobals, parse } from './globals.js';
3
- import { BootstrapMessage, BootstrapPopup, CheckButton, Dialog, Dropdown, MenuButton, Msgbox, Popup, PopupAlert, PopupConfirm, Toggle } from './map/basic.js';
4
- import { BootstrapChecklist, BootstrapTable, Checklist, DataFilter, Permission, SimpleTable, Table } from './map/data.js';
5
- import { BootstrapTimebox, CoreTimebox, Datebox, DatePicker, MonthPicker, Timebox, TimePicker } from './map/date-time.js';
6
- import { Field, Fieldset, FieldUpload, Form, MultiValueEditor, ValueList } from './map/form.js';
7
- import { Client, Request } from './map/http.js';
8
- import { BootstrapTabbox, Groupbox, MasterPanel, NavigationBar, Panel, Search, Tabbox } from './map/layout.js';
9
- import { BootstrapSelect, BootstrapSelectDyn, BootstrapSelectFilter, BootstrapSelectPrio, Select, SelectDyn, SelectDynREST, SelectFilter, SelectPrio } from './map/select.js';
10
- /** Window-independent legacy gx namespace. */
11
- export declare const gx: {
12
- core: {
13
- Settings: {
14
- new (): {};
15
- };
16
- };
17
- ui: {
18
- Container: {
19
- new (): {};
20
- };
21
- SimpleTable: typeof SimpleTable;
22
- Timebox: typeof CoreTimebox;
23
- Collapse: {
24
- new (): {};
25
- };
26
- Blend: {
27
- new (): {};
28
- };
29
- Hud: {
30
- new (): {};
31
- };
32
- Toggling: {
33
- new (): {};
34
- };
35
- HGroup: {
36
- new (): {};
37
- };
38
- Templates: {
39
- new (): {};
40
- };
41
- };
42
- util: Readonly<{
43
- initValue: typeof import("./map/utilities.js").initValue;
44
- initNum: typeof import("./map/utilities.js").initNum;
45
- formatTime: typeof import("./map/utilities.js").formatTime;
46
- getMinutes: typeof import("./map/utilities.js").getMinutes;
47
- formatNum: typeof import("./map/utilities.js").formatNum;
48
- getNumber: typeof import("./map/utilities.js").getNumber;
49
- printf: typeof import("./map/utilities.js").printf;
50
- parseResult: typeof import("./map/utilities.js").parseResult;
51
- Parse: typeof parse;
52
- isArray: (arg: any) => arg is any[];
53
- isObject: (value: any) => boolean;
54
- isFunction: (value: any) => boolean;
55
- isString: (value: any) => value is string;
56
- isNumber: (value: any) => boolean;
57
- isElement: (value: any) => boolean;
58
- isNode: (value: any) => boolean;
59
- Console: (source: any, message: any) => void;
60
- }>;
61
- zeyos: {
62
- Toggle: typeof Toggle;
63
- Msgbox: typeof Msgbox;
64
- Popup: typeof Popup;
65
- Dialog: typeof Dialog;
66
- Dropdown: typeof Dropdown;
67
- Select: typeof Select;
68
- SelectFilter: typeof SelectFilter;
69
- SelectDyn: typeof SelectDyn;
70
- SelectPrio: typeof SelectPrio;
71
- Checklist: typeof Checklist;
72
- Permission: typeof Permission;
73
- Table: typeof Table;
74
- Tabbox: typeof Tabbox;
75
- Panel: typeof Panel;
76
- MasterPanel: typeof MasterPanel;
77
- Groupbox: typeof Groupbox;
78
- Search: typeof Search;
79
- Datebox: typeof Datebox;
80
- DatePicker: typeof DatePicker;
81
- TimePicker: typeof TimePicker;
82
- MonthPicker: typeof MonthPicker;
83
- Timebox: typeof Timebox;
84
- Client: typeof Client;
85
- Request: typeof Request;
86
- Factory: Readonly<{
87
- Icon(name: string): SVGSVGElement;
88
- Button(text: string, type?: string, iconName?: string, options?: Record<string, any>): HTMLButtonElement;
89
- ButtonsGroup(buttons: HTMLButtonElement[]): HTMLDivElement;
90
- }>;
91
- };
92
- bootstrap: {
93
- Message: typeof BootstrapMessage;
94
- Popup: typeof BootstrapPopup;
95
- PopupAlert: typeof PopupAlert;
96
- PopupConfirm: typeof PopupConfirm;
97
- PopupConfirmCanceled: Readonly<{}>;
98
- MenuButton: typeof MenuButton;
99
- CheckButton: typeof CheckButton;
100
- Select: typeof BootstrapSelect;
101
- SelectFilter: typeof BootstrapSelectFilter;
102
- SelectDyn: typeof BootstrapSelectDyn;
103
- SelectDynREST: typeof SelectDynREST;
104
- SelectPrio: typeof BootstrapSelectPrio;
105
- Checklist: typeof BootstrapChecklist;
106
- Table: typeof BootstrapTable;
107
- Tabbox: typeof BootstrapTabbox;
108
- NavigationBar: typeof NavigationBar;
109
- Timebox: typeof BootstrapTimebox;
110
- Form: typeof Form;
111
- Fieldset: typeof Fieldset;
112
- Field: typeof Field;
113
- ValueList: typeof ValueList;
114
- MultiValueEditor: typeof MultiValueEditor;
115
- FieldUpload: typeof FieldUpload;
116
- DataFilter: typeof DataFilter;
117
- };
118
- compat: Readonly<{
119
- installGlobals: typeof installGlobals;
120
- installElementStorage: typeof installElementStorage;
121
- parse: typeof parse;
122
- GxWrapper: typeof GxWrapper;
123
- }>;
124
- };
125
- /** Assigns the compatibility namespace to a browser-like host without installing optional globals. @param {typeof globalThis} [host=globalThis] @returns {typeof gx} */
126
- export declare function install(host?: typeof globalThis): typeof gx;
127
- export { GxWrapper, installElementStorage, installGlobals, parse };
128
- export default gx;
@@ -1,175 +0,0 @@
1
- import { GxWrapper } from '../base.js';
2
- /** Legacy ZeyOS switch. */
3
- export declare class Toggle extends GxWrapper {
4
- static legacyName: string;
5
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
6
- constructor(display: Element | string | null, options?: Record<string, any>);
7
- /** @returns {boolean} */
8
- getState(): boolean;
9
- /** @returns {unknown} */
10
- getValue(): unknown;
11
- /** @returns {this} */
12
- toggle(): this;
13
- /** @param {boolean} [suppress=false] @returns {this} */
14
- setChecked(suppress?: boolean): this;
15
- /** @param {boolean} [suppress=false] @returns {this} */
16
- setUnchecked(suppress?: boolean): this;
17
- /** @returns {void} */
18
- _syncAct(): void;
19
- }
20
- /** Legacy ZeyOS floating message box. */
21
- export declare class Msgbox extends GxWrapper {
22
- _handle: any;
23
- _content: any;
24
- static legacyName: string;
25
- /** @param {Record<string, any>} [options={}] */
26
- constructor(options?: Record<string, any>);
27
- /** @param {unknown} content @returns {this} */
28
- setContent(content: unknown): this;
29
- /** @param {unknown} [message] @param {string} [className='info'] @returns {this} */
30
- show(message?: unknown, className?: string): this;
31
- /** @returns {this} */
32
- hide(): this;
33
- }
34
- /** Legacy bootstrap message/status service. */
35
- export declare class BootstrapMessage extends GxWrapper {
36
- _handles: Map<any, any>;
37
- _progress: import("../../components/message/message.js").ProgressHandle;
38
- _progressValue: number;
39
- static legacyName: string;
40
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
41
- constructor(display: Element | string | null, options?: Record<string, any>);
42
- /** @param {unknown} message @param {string} [iconClass='info'] @param {boolean} [closable=true] @param {boolean} [_blend=false] @param {boolean} [autoclose=true] @returns {Element} */
43
- addMessage(message: unknown, iconClass?: string, closable?: boolean, _blend?: boolean, autoclose?: boolean): Element;
44
- /** @param {Element} marker @returns {this} */
45
- closeMessage(marker: Element): this;
46
- /** @returns {this} */
47
- clear(): this;
48
- /** @param {number} progress @param {string} [message=''] @param {boolean} [_blend=false] @returns {this} */
49
- showStatus(progress: number, message?: string, _blend?: boolean): this;
50
- /** @param {number} progress @param {string} [message] @returns {this} */
51
- incProgress(progress: number, message?: string): this;
52
- /** @param {number} progress @param {string} [message] @param {unknown} [_tween] @returns {this} */
53
- setProgress(progress: number, message?: string, _tween?: unknown): this;
54
- /** @returns {this} */
55
- hideStatus(): this;
56
- }
57
- /** Shared Dialog-backed popup behavior. */
58
- declare class PopupBase extends GxWrapper {
59
- isOpen: boolean;
60
- _showArgument: unknown;
61
- /** @param {Record<string, any>} options */
62
- constructor(options?: Record<string, any>);
63
- /** @param {unknown} [argument] @returns {this} */
64
- show(argument?: unknown): this;
65
- /** @param {unknown} [argument] @returns {this} */
66
- hide(argument?: unknown): this;
67
- /** @param {unknown} content @returns {this} */
68
- setContent(content: unknown): this;
69
- /** @param {string} title @returns {this} */
70
- setTitle(title: string): this;
71
- /** @returns {Element} */
72
- getContent(): Element;
73
- /** @param {unknown} [_x] @param {unknown} [_y] @returns {this} */
74
- setPosition(_x?: unknown, _y?: unknown): this;
75
- }
76
- /** Legacy ZeyOS popup. */
77
- export declare class Popup extends PopupBase {
78
- static legacyName: string;
79
- }
80
- /** Legacy bootstrap popup. */
81
- export declare class BootstrapPopup extends PopupBase {
82
- static legacyName: string;
83
- }
84
- /** Sentinel returned when a legacy confirmation is canceled. */
85
- export declare const PopupConfirmCanceled: Readonly<{}>;
86
- /** @param {string} title @param {unknown} message @param {Record<string, any>|string} [options={}] @returns {Promise<void>} */
87
- export declare function PopupAlert(title: string, message: unknown, options?: Record<string, any> | string): Promise<void>;
88
- /** @param {string} title @param {unknown} message @param {Record<string, any>|string} [options={}] @returns {Promise<void|typeof PopupConfirmCanceled>} */
89
- export declare function PopupConfirm(title: string, message: unknown, options?: Record<string, any> | string): Promise<void | typeof PopupConfirmCanceled>;
90
- /** Legacy multi-frame ZeyOS dialog. */
91
- export declare class Dialog extends GxWrapper {
92
- _frames: {};
93
- _current: any;
94
- static legacyName: string;
95
- /** @param {Element|string|null} _display @param {Record<string, any>} [options={}] */
96
- constructor(_display: Element | string | null, options?: Record<string, any>);
97
- /** @param {string} title @returns {this} */
98
- setTitle(title: string): this;
99
- /** @param {string} key @param {Record<string, any>} options @param {boolean} [open] @returns {this} */
100
- addFrame(key: string, options: Record<string, any>, open?: boolean): this;
101
- /** @param {string} key @returns {Record<string, any>} */
102
- openFrame(key: string): Record<string, any>;
103
- /** @param {string} key @returns {Record<string, any>|null} */
104
- getFrame(key: string): Record<string, any> | null;
105
- /** @param {string} key @param {unknown} content @param {Function} onSubmit @param {boolean} [open] @returns {unknown} */
106
- addSubmitFrame(key: string, content: unknown, onSubmit: Function, open?: boolean): unknown;
107
- /** @param {string} key @param {Record<string, [unknown, unknown]>} form @param {Function} onSubmit @param {boolean} [open] @returns {Record<string, unknown>} */
108
- addFormFrame(key: string, form: Record<string, [unknown, unknown]>, onSubmit: Function, open?: boolean): Record<string, unknown>;
109
- /** @param {string} key @param {unknown} message @param {string} [link] @param {boolean} [open] @returns {this} */
110
- addSuccessFrame(key: string, message: unknown, link?: string, open?: boolean): this;
111
- /** @param {Record<string, any>} form @returns {Record<string, unknown>} */
112
- getFormValues(form: Record<string, any>): Record<string, unknown>;
113
- }
114
- /** Legacy object-backed dropdown. */
115
- export declare class Dropdown extends GxWrapper {
116
- _items: Record<string, any>[];
117
- _selected: any;
118
- static legacyName: string;
119
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
120
- constructor(display: Element | string | null, options?: Record<string, any>);
121
- /** @param {Record<string, unknown>} items @returns {this} */
122
- setItems(items: Record<string, unknown>): this;
123
- /** @param {unknown} value @param {string} [text] @returns {this} */
124
- selectItem(value: unknown, text?: string): this;
125
- /** @returns {this} */
126
- reset(): this;
127
- /** @returns {{value: unknown, label: string}|null} */
128
- getSelected(): {
129
- value: unknown;
130
- label: string;
131
- } | null;
132
- /** @returns {unknown} */
133
- getValue(): unknown;
134
- /** @returns {this} */
135
- show(): this;
136
- /** @returns {this} */
137
- close(): this;
138
- /** @returns {this} */
139
- toggle(): this;
140
- }
141
- /** Legacy bootstrap menu button. */
142
- export declare class MenuButton extends GxWrapper {
143
- _entries: any[];
144
- static legacyName: string;
145
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
146
- constructor(display: Element | string | null, options?: Record<string, any>);
147
- /** @param {string|false|null} label @param {string} [icon] @returns {Element|null} */
148
- add(label: string | false | null, icon?: string): Element | null;
149
- /** @returns {this} */
150
- divider(): this;
151
- /** @returns {this} */
152
- toggle(): this;
153
- /** @returns {this} */
154
- open(): this;
155
- /** @returns {this} */
156
- close(): this;
157
- /** @param {string} label @returns {this} */
158
- setLabel(label: string): this;
159
- /** @param {string} style @returns {this} */
160
- setStyle(style: string): this;
161
- }
162
- /** Legacy bootstrap two-state check button. */
163
- export declare class CheckButton extends GxWrapper {
164
- static legacyName: string;
165
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
166
- constructor(display: Element | string | null, options?: Record<string, any>);
167
- /** @returns {boolean} */ get(): boolean;
168
- /** @param {boolean} [suppress=false] @returns {false} */ toggle(suppress?: boolean): false;
169
- /** @param {boolean} [suppress=false] @returns {this} */ check(suppress?: boolean): this;
170
- /** @param {boolean} [suppress=false] @returns {this} */ uncheck(suppress?: boolean): this;
171
- /** @param {boolean} value @returns {this} */ set(value: boolean): this;
172
- /** @param {boolean} disabled @returns {this} */ setDisabled(disabled: boolean): this;
173
- /** @param {string|string[]} label @returns {this} */ setLabel(label: string | string[]): this;
174
- }
175
- export {};
@@ -1,103 +0,0 @@
1
- import { GxWrapper } from '../base.js';
2
- /** Shared Checklist wrapper. */
3
- declare class ChecklistBase extends GxWrapper {
4
- _http: any;
5
- static legacyName: string;
6
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
7
- constructor(display: Element | string | null, options?: Record<string, any>);
8
- /** @returns {unknown[]} */
9
- getValues(key: any): unknown[];
10
- /** @param {unknown[]} values @returns {unknown[]} */
11
- setValues(values: unknown[]): unknown[];
12
- /** @returns {this} */
13
- reset(): this;
14
- /** @param {string} query @returns {this} */
15
- search(query: string): this;
16
- /** @param {unknown[]} rows @returns {this} */
17
- setData(rows: unknown[]): this;
18
- /** @param {string} [url] @param {Record<string, unknown>} [data] @returns {Promise<this>} */
19
- load(url?: string, data?: Record<string, unknown>): Promise<this>;
20
- /** Bootstrap alias. @param {string} [url] @param {Record<string, unknown>} [data] @param {Function} [callback] @returns {Promise<this>} */
21
- loadFromURL(url?: string, data?: Record<string, unknown>, callback?: Function): Promise<this>;
22
- /** @param {string} url @param {Record<string, unknown>} data @returns {Promise<unknown[]>} */
23
- _load(url: string, data: Record<string, unknown>): Promise<unknown[]>;
24
- }
25
- /** Legacy ZeyOS checklist. */
26
- export declare class Checklist extends ChecklistBase {
27
- static legacyName: string;
28
- }
29
- /** Legacy bootstrap checklist. */
30
- export declare class BootstrapChecklist extends ChecklistBase {
31
- static legacyName: string;
32
- }
33
- /** Legacy permission selector, backed by the `Select.permission()` preset. */
34
- export declare class Permission extends GxWrapper {
35
- static legacyName: string;
36
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
37
- constructor(display: Element | string | null, options?: Record<string, any>);
38
- /** @returns {unknown} */ get(): unknown;
39
- /** @param {unknown} value @param {boolean} [silent=false] @returns {this} */
40
- set(value: unknown, silent?: boolean): this;
41
- }
42
- /** Shared full Table wrapper. */
43
- declare class TableBase extends GxWrapper {
44
- _cols: any[];
45
- _filter: Record<string, any>;
46
- static legacyName: string;
47
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
48
- constructor(display: Element | string | null, options?: Record<string, any>);
49
- /** @param {unknown[]} data @returns {this} */ setData(data: unknown[]): this;
50
- /** @param {unknown[]|unknown} data @returns {this} */ addData(data: unknown[] | unknown): this;
51
- /** @returns {this} */ empty(): this;
52
- /** @param {Record<string, any>|string} column @param {'asc'|'desc'} [mode] @param {boolean} [noEvent=false] @returns {this} */
53
- setSort(column: Record<string, any> | string, mode?: 'asc' | 'desc', noEvent?: boolean): this;
54
- /** @returns {Record<string, any>|false} */ getFilter(): Record<string, any> | false;
55
- /** @returns {unknown[]} */ getData(): unknown[];
56
- /** @param {unknown} height @returns {this} */ setHeight(height: unknown): this;
57
- /** @param {string} id @returns {Record<string, any>} */ _legacyColumn(id: string): Record<string, any>;
58
- }
59
- /** Legacy ZeyOS table. */
60
- export declare class Table extends TableBase {
61
- static legacyName: string;
62
- }
63
- /** Legacy bootstrap table. */
64
- export declare class BootstrapTable extends TableBase {
65
- static legacyName: string;
66
- }
67
- /** Legacy SimpleTable data facade. */
68
- export declare class SimpleTable extends GxWrapper {
69
- static legacyName: string;
70
- /** @param {Element|string|Record<string, any>|null} display @param {Record<string, any>} [options={}] */
71
- constructor(display: Element | string | Record<string, any> | null, options?: Record<string, any>);
72
- /** @param {unknown[]} data @returns {this} */ setData(data: unknown[]): this;
73
- /** @param {unknown[]} data @returns {this} */ addData(data: unknown[]): this;
74
- /** @param {unknown} row @param {number} [index] @returns {HTMLTableRowElement|null} */
75
- createRow(row: unknown, index?: number): HTMLTableRowElement | null;
76
- /** @param {unknown} row @param {number} [index] @returns {HTMLTableRowElement|null} */ addRow(row: unknown, index?: number): HTMLTableRowElement | null;
77
- /** @param {unknown} row @param {number} index @returns {HTMLTableRowElement|null} */
78
- updateRow(row: unknown, index: number): HTMLTableRowElement | null;
79
- /** @param {number} index @returns {this} */ removeRow(index: number): this;
80
- /** @returns {unknown[]} */ getRows(): unknown[];
81
- /** @returns {this} */ empty(): this;
82
- }
83
- /** Legacy bootstrap client-side filter bar. */
84
- export declare class DataFilter extends GxWrapper {
85
- origin: any[];
86
- filtered: any[];
87
- filter: any[];
88
- static legacyName: string;
89
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
90
- constructor(display: Element | string | null, options?: Record<string, any>);
91
- /** @param {string} identifier @param {string} label @param {string|string[]|Function} fields @param {unknown} [_width] @param {Function} [method] @returns {this} */
92
- addSelectFilter(identifier: string, label: string, fields: string | string[] | Function, _width?: unknown, method?: Function): this;
93
- /** @param {string} identifier @param {string|string[]|Function} fields @param {string} label @param {unknown} [_width] @param {Function} [method] @returns {this} */
94
- addFulltextFilter(identifier: string, fields: string | string[] | Function, label: string, _width?: unknown, method?: Function): this;
95
- /** @param {Element} element @returns {this} */ addCustomElement(element: Element): this;
96
- /** @param {unknown[]} data @returns {this} */ initData(data: unknown[]): this;
97
- /** @returns {unknown[]} */ doFilter(): unknown[];
98
- /** @returns {this} */ clearFilter(): this;
99
- /** @param {string} identifier @returns {Record<string, any>|null} */ getFilter(identifier: string): Record<string, any> | null;
100
- /** @param {unknown} filterValue @param {unknown} fieldValue @returns {boolean} */ fulltextFilter(filterValue: unknown, fieldValue: unknown): boolean;
101
- /** @param {unknown} filterValue @param {unknown} fieldValue @returns {boolean} */ selectFilter(filterValue: unknown, fieldValue: unknown): boolean;
102
- }
103
- export {};
@@ -1,80 +0,0 @@
1
- import { DatePicker as ZxDatePicker, MonthPicker as ZxMonthPicker, TimePicker as ZxTimePicker } from '../../index.js';
2
- import { GxWrapper } from '../base.js';
3
- /** Legacy segmented date box presented through the Zx formatted date input. */
4
- export declare class Datebox extends GxWrapper {
5
- static legacyName: string;
6
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
7
- constructor(display: Element | string | null, options?: Record<string, any>);
8
- /** @param {Date|number|string|null} timestamp @param {'milliseconds'|'seconds'} [unit] @returns {this} */
9
- set(timestamp: Date | number | string | null, unit?: 'milliseconds' | 'seconds'): this;
10
- /** @param {'milliseconds'|'seconds'|'date'} [unit] @returns {Date|number|null} */
11
- get(unit?: 'milliseconds' | 'seconds' | 'date'): Date | number | null;
12
- /** @returns {this} */ enable(): this;
13
- /** @returns {this} */ disable(): this;
14
- }
15
- /** Shared inline picker wrapper with legacy date formatting. */
16
- declare class PickerBase extends GxWrapper {
17
- _date: Date;
18
- static legacyName: string;
19
- /** @type {new (target: Element|string|null, options?: any) => any} */
20
- static Picker: new (target: Element | string | null, options?: any) => any;
21
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
22
- constructor(display: Element | string | null, options?: Record<string, any>);
23
- /** @param {Date|number|string|null} value @returns {this} */
24
- set(value: Date | number | string | null): this;
25
- /** @param {string} [format] @returns {Date|number|string|null} */
26
- get(format?: string): Date | number | string | null;
27
- /** @returns {number|null} */ getSeconds(): number | null;
28
- /** @param {boolean} readOnly @returns {this} */ setReadOnly(readOnly: boolean): this;
29
- /** @param {string} format @param {boolean} [enableTimePicker] @returns {this} */ setFormat(format: string, enableTimePicker?: boolean): this;
30
- /** @returns {Date|null} */
31
- _readDate(): Date | null;
32
- /** @param {{h?: number, m?: number, s?: number}|null} time @returns {Date} */
33
- _dateFromTime(time: {
34
- h?: number;
35
- m?: number;
36
- s?: number;
37
- } | null): Date;
38
- }
39
- /** Legacy date picker. */
40
- export declare class DatePicker extends PickerBase {
41
- static legacyName: string;
42
- static Picker: typeof ZxDatePicker;
43
- }
44
- /** Legacy month picker. */
45
- export declare class MonthPicker extends PickerBase {
46
- static legacyName: string;
47
- static Picker: typeof ZxMonthPicker;
48
- }
49
- /** Legacy time picker. */
50
- export declare class TimePicker extends PickerBase {
51
- static legacyName: string;
52
- static Picker: typeof ZxTimePicker;
53
- }
54
- /** Shared duration Timebox wrapper. */
55
- declare class TimeboxBase extends GxWrapper {
56
- static legacyName: string;
57
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
58
- constructor(display: Element | string | null, options?: Record<string, any>);
59
- /** @param {number} time @param {'seconds'|'minutes'|'hours'} [unit] @returns {this} */ set(time: number, unit?: 'seconds' | 'minutes' | 'hours'): this;
60
- /** @param {'seconds'|'minutes'|'hours'} [unit] @param {number} [precision=0] @returns {number} */
61
- get(unit?: 'seconds' | 'minutes' | 'hours', precision?: number): number;
62
- /** @returns {this} */ update(): this;
63
- /** @returns {this} */ enable(): this;
64
- /** @returns {this} */ disable(): this;
65
- /** @returns {boolean} */ disabled(): boolean;
66
- /** @param {boolean} positive @returns {this} */ setPrefix(positive: boolean): this;
67
- }
68
- /** Legacy core Timebox. */
69
- export declare class CoreTimebox extends TimeboxBase {
70
- static legacyName: string;
71
- }
72
- /** Legacy ZeyOS Timebox. */
73
- export declare class Timebox extends TimeboxBase {
74
- static legacyName: string;
75
- }
76
- /** Legacy bootstrap Timebox. */
77
- export declare class BootstrapTimebox extends TimeboxBase {
78
- static legacyName: string;
79
- }
80
- export {};
@@ -1,9 +0,0 @@
1
- /** Legacy ZeyOS DOM factory mapped to Zx button and icon primitives. */
2
- export declare const Factory: Readonly<{
3
- /** @param {string} name @returns {SVGSVGElement} */
4
- Icon(name: string): SVGSVGElement;
5
- /** @param {string} text @param {string} [type=''] @param {string} [iconName] @param {Record<string, any>} [options={}] @returns {HTMLButtonElement} */
6
- Button(text: string, type?: string, iconName?: string, options?: Record<string, any>): HTMLButtonElement;
7
- /** @param {HTMLButtonElement[]} buttons @returns {HTMLDivElement} */
8
- ButtonsGroup(buttons: HTMLButtonElement[]): HTMLDivElement;
9
- }>;