@zeyos/zx 2.3.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 (150) hide show
  1. package/CHANGELOG.md +138 -0
  2. package/DESIGN-SYSTEM.md +96 -0
  3. package/README.md +29 -39
  4. package/dist/types/components/account-menu/account-menu.d.ts +144 -0
  5. package/dist/types/components/app-sidebar/app-sidebar.d.ts +243 -0
  6. package/dist/types/components/avatar/avatar.d.ts +100 -0
  7. package/dist/types/components/card/card.d.ts +128 -0
  8. package/dist/types/components/chart/chart.d.ts +322 -0
  9. package/dist/types/components/date-picker/month-picker.d.ts +6 -0
  10. package/dist/types/components/dialog/dialog.d.ts +9 -0
  11. package/dist/types/components/dock/dock.d.ts +495 -0
  12. package/dist/types/components/dropdown/dropdown.d.ts +2 -2
  13. package/dist/types/components/field/field.d.ts +14 -0
  14. package/dist/types/components/field-upload/field-upload.d.ts +37 -4
  15. package/dist/types/components/form/form.d.ts +25 -3
  16. package/dist/types/components/grid/grid.d.ts +172 -0
  17. package/dist/types/components/launcher/launcher.d.ts +359 -0
  18. package/dist/types/components/layout/layout.d.ts +4 -4
  19. package/dist/types/components/menu-button/menu-button.d.ts +10 -2
  20. package/dist/types/components/modal/modal.d.ts +25 -0
  21. package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +7 -1
  22. package/dist/types/components/questionnaire/items.d.ts +327 -0
  23. package/dist/types/components/questionnaire/questionnaire.d.ts +449 -0
  24. package/dist/types/components/select/select.d.ts +51 -0
  25. package/dist/types/components/sheet/sheet-stack.d.ts +167 -0
  26. package/dist/types/components/sheet/sheet.d.ts +294 -0
  27. package/dist/types/components/split-view/split-view.d.ts +2 -21
  28. package/dist/types/components/table/table.d.ts +223 -15
  29. package/dist/types/components/tooltip/tooltip.d.ts +2 -2
  30. package/dist/types/components/value-list/value-list.d.ts +24 -3
  31. package/dist/types/core/dom.d.ts +122 -0
  32. package/dist/types/core/drag-axis.d.ts +111 -0
  33. package/dist/types/core/position.d.ts +4 -2
  34. package/dist/types/index.d.ts +13 -2
  35. package/dist/types/internal/app-rail.d.ts +265 -0
  36. package/dist/types/zeyos/icons.d.ts +5 -0
  37. package/dist/types/zeyos/index.d.ts +2 -1
  38. package/dist/types/zeyos/launcher.d.ts +147 -0
  39. package/dist/types/zeyos/select.d.ts +39 -0
  40. package/dist/zx-zeyos.esm.js +1870 -133
  41. package/dist/zx-zeyos.esm.min.js +1 -1
  42. package/dist/zx.css +2006 -267
  43. package/dist/zx.esm.js +8987 -2757
  44. package/dist/zx.esm.min.js +3 -3
  45. package/dist/zx.global.js +8987 -2757
  46. package/dist/zx.global.min.js +3 -3
  47. package/dist/zx.min.css +1 -1
  48. package/docs/api.json +4396 -2344
  49. package/docs/llms.md +463 -86
  50. package/docs/llms.txt +32 -19
  51. package/package.json +10 -17
  52. package/src/components/account-menu/account-menu.css +70 -0
  53. package/src/components/account-menu/account-menu.js +208 -0
  54. package/src/components/app-rail/app-rail.css +107 -0
  55. package/src/components/app-sidebar/app-sidebar.css +80 -0
  56. package/src/components/app-sidebar/app-sidebar.js +588 -0
  57. package/src/components/avatar/avatar.css +61 -0
  58. package/src/components/avatar/avatar.js +222 -0
  59. package/src/components/button/button.css +0 -1
  60. package/src/components/card/card.css +149 -0
  61. package/src/components/card/card.js +285 -0
  62. package/src/components/chart/chart.css +61 -0
  63. package/src/components/chart/chart.js +523 -0
  64. package/src/components/date-picker/month-picker.js +9 -0
  65. package/src/components/dialog/dialog.js +11 -4
  66. package/src/components/dock/dock.css +228 -0
  67. package/src/components/dock/dock.js +977 -0
  68. package/src/components/dropdown/dropdown.js +1 -1
  69. package/src/components/field/field.js +2 -0
  70. package/src/components/field-upload/field-upload.js +9 -4
  71. package/src/components/form/form.js +6 -3
  72. package/src/components/grid/grid.css +6 -0
  73. package/src/components/grid/grid.js +220 -0
  74. package/src/components/launcher/launcher.css +210 -0
  75. package/src/components/launcher/launcher.js +765 -0
  76. package/src/components/layout/layout.js +2 -2
  77. package/src/components/menu-button/menu-button.js +27 -2
  78. package/src/components/modal/modal.css +5 -1
  79. package/src/components/modal/modal.js +37 -2
  80. package/src/components/multi-value-editor/multi-value-editor.js +2 -1
  81. package/src/components/questionnaire/items.js +370 -0
  82. package/src/components/questionnaire/questionnaire.css +387 -0
  83. package/src/components/questionnaire/questionnaire.js +1033 -0
  84. package/src/components/select/field-adapter.js +9 -4
  85. package/src/components/select/select.css +144 -11
  86. package/src/components/select/select.js +259 -27
  87. package/src/components/sheet/sheet-stack.js +304 -0
  88. package/src/components/sheet/sheet.css +351 -0
  89. package/src/components/sheet/sheet.js +551 -0
  90. package/src/components/split-view/split-view.js +76 -161
  91. package/src/components/table/table.css +43 -0
  92. package/src/components/table/table.js +531 -52
  93. package/src/components/tooltip/tooltip.js +5 -2
  94. package/src/components/value-list/value-list.js +6 -3
  95. package/src/core/dom.js +322 -0
  96. package/src/core/drag-axis.js +203 -0
  97. package/src/core/position.js +68 -22
  98. package/src/index.js +20 -2
  99. package/src/internal/app-rail.js +718 -0
  100. package/src/zeyos/icons.js +8 -3
  101. package/src/zeyos/index.js +7 -1
  102. package/src/zeyos/launcher.js +338 -0
  103. package/src/zeyos/modules.js +1 -0
  104. package/src/zeyos/select.js +115 -1
  105. package/styles/tokens/dark.css +2 -3
  106. package/styles/tokens/global.css +6 -6
  107. package/styles/tokens/modules.css +1 -0
  108. package/styles/tokens/semantic.css +5 -3
  109. package/styles/tokens/themes.css +1 -1
  110. package/styles/zx.css +11 -1
  111. package/MIGRATION.md +0 -598
  112. package/dist/types/compat/base.d.ts +0 -156
  113. package/dist/types/compat/globals.d.ts +0 -20
  114. package/dist/types/compat/index.d.ts +0 -128
  115. package/dist/types/compat/map/basic.d.ts +0 -175
  116. package/dist/types/compat/map/data.d.ts +0 -102
  117. package/dist/types/compat/map/date-time.d.ts +0 -80
  118. package/dist/types/compat/map/factory.d.ts +0 -9
  119. package/dist/types/compat/map/form.d.ts +0 -98
  120. package/dist/types/compat/map/helpers.d.ts +0 -12
  121. package/dist/types/compat/map/http.d.ts +0 -36
  122. package/dist/types/compat/map/layout.d.ts +0 -106
  123. package/dist/types/compat/map/options.d.ts +0 -80
  124. package/dist/types/compat/map/select.d.ts +0 -95
  125. package/dist/types/compat/map/stubs.d.ts +0 -32
  126. package/dist/types/compat/map/utilities.d.ts +0 -37
  127. package/dist/types/compat-entry.d.ts +0 -5
  128. package/dist/types/components/permission/permission.d.ts +0 -96
  129. package/dist/zx-compat.esm.js +0 -17484
  130. package/dist/zx-compat.esm.min.js +0 -1
  131. package/dist/zx-compat.global.js +0 -23635
  132. package/dist/zx-compat.global.min.js +0 -3
  133. package/src/compat/base.js +0 -291
  134. package/src/compat/globals.js +0 -165
  135. package/src/compat/index.js +0 -84
  136. package/src/compat/map/basic.js +0 -464
  137. package/src/compat/map/data.js +0 -232
  138. package/src/compat/map/date-time.js +0 -177
  139. package/src/compat/map/factory.js +0 -45
  140. package/src/compat/map/form.js +0 -330
  141. package/src/compat/map/helpers.js +0 -46
  142. package/src/compat/map/http.js +0 -117
  143. package/src/compat/map/layout.js +0 -256
  144. package/src/compat/map/options.js +0 -267
  145. package/src/compat/map/select.js +0 -198
  146. package/src/compat/map/stubs.js +0 -26
  147. package/src/compat/map/utilities.js +0 -113
  148. package/src/compat-entry.js +0 -11
  149. package/src/components/permission/permission.css +0 -47
  150. package/src/components/permission/permission.js +0 -201
@@ -1,98 +0,0 @@
1
- import { GxWrapper } from '../base.js';
2
- /** Legacy bootstrap form. */
3
- export declare class Form extends GxWrapper {
4
- _fieldsets: 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
- /** @param {Fieldset|Record<string, any>} fieldset @returns {Fieldset} */
9
- addFieldset(fieldset: Fieldset | Record<string, any>): Fieldset;
10
- /** @param {unknown} content @returns {this} */
11
- addActions(content: unknown): this;
12
- /** @param {string} id @returns {unknown} */ getValue(id: string): unknown;
13
- /** @returns {Record<string, unknown>} */ getValues(): Record<string, unknown>;
14
- /** @param {string} id @returns {Field|null} */ getField(id: string): Field | null;
15
- /** @returns {Fieldset[]} */ getFieldsets(): Fieldset[];
16
- /** @param {string} id @param {unknown} value @returns {this} */ setValue(id: string, value: unknown): this;
17
- /** @param {Record<string, unknown>} values @returns {this} */ setValues(values: Record<string, unknown>): this;
18
- /** @param {Record<string, unknown>} [highlights={}] @param {string} [type='error'] @returns {number} */ setHighlights(highlights?: Record<string, unknown>, type?: string): number;
19
- /** @param {Record<string, unknown>} [highlights={}] @param {string} [type='error'] @returns {number} */ setHintHighlights(highlights?: Record<string, unknown>, type?: string): number;
20
- /** @returns {this} */ reset(): this;
21
- }
22
- /** Legacy bootstrap fieldset. */
23
- export declare class Fieldset extends GxWrapper {
24
- _fields: {};
25
- static legacyName: string;
26
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
27
- constructor(display: Element | string | null, options?: Record<string, any>);
28
- /** @param {Record<string, any>} fields @returns {this} */ addFields(fields: Record<string, any>): this;
29
- /** @param {string} id @param {unknown} field @returns {Field|unknown} */
30
- addFieldItem(id: string, field: unknown): Field | unknown;
31
- /** @param {string} id @param {string|Function|Element} type @param {Record<string, any>} [options={}] @returns {Field} */
32
- addField(id: string, type: string | Function | Element, options?: Record<string, any>): Field;
33
- /** @returns {this} */ clear(): this;
34
- /** @param {string} id @returns {boolean} */ hasField(id: string): boolean;
35
- /** @param {string} id @returns {Field|null} */ getField(id: string): Field | null;
36
- /** @returns {Record<string, Field>} */ getFields(): Record<string, Field>;
37
- /** @param {string} id @returns {unknown} */ getValue(id: string): unknown;
38
- /** @returns {Record<string, unknown>} */ getValues(): Record<string, unknown>;
39
- /** @param {string} id @param {unknown} value @returns {this} */ setValue(id: string, value: unknown): this;
40
- /** @param {Record<string, unknown>} values @returns {this} */ setValues(values: Record<string, unknown>): this;
41
- /** @returns {this} */ reset(): this;
42
- /** @param {string} id @returns {this} */ focus(id: string): this;
43
- /** @param {Record<string, unknown>} [highlights={}] @param {string} [type='error'] @returns {number} */
44
- setHighlights(highlights?: Record<string, unknown>, type?: string): number;
45
- /** @param {Record<string, unknown>} [highlights={}] @param {string} [type='error'] @returns {number} */ setHintHighlights(highlights?: Record<string, unknown>, type?: string): number;
46
- }
47
- /** Legacy bootstrap single field. */
48
- export declare class Field extends GxWrapper {
49
- _type: any;
50
- static legacyName: string;
51
- /** @param {Record<string, any>} [options={}] */
52
- constructor(options?: Record<string, any>);
53
- /** @param {string} label @returns {this} */ setLabel(label: string): this;
54
- /** @param {string} help @returns {this} */ setHelp(help: string): this;
55
- /** @returns {unknown} */ getValue(): unknown;
56
- /** @param {unknown} value @returns {this} */ setValue(value: unknown): this;
57
- /** @param {boolean} disabled @returns {this} */ setDisabled(disabled: boolean): this;
58
- /** @param {unknown} label @param {string} [type='warning'] @returns {this} */
59
- setHighlight(label: unknown, type?: string): this;
60
- /** @param {unknown} label @param {string} [type='warning'] @returns {this} */ setHintHighlight(label: unknown, type?: string): this;
61
- /** @returns {this} */ reset(): this;
62
- /** @returns {this} */ focus(): this;
63
- }
64
- /** Legacy bootstrap chip list. */
65
- export declare class ValueList extends GxWrapper {
66
- static legacyName: string;
67
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
68
- constructor(display: Element | string | null, options?: Record<string, any>);
69
- /** @param {unknown} value @returns {boolean} */ addValue(value: unknown): boolean;
70
- /** @returns {unknown[]} */ getValues(): unknown[];
71
- /** @param {unknown[]} values @returns {this} */ setValues(values: unknown[]): this;
72
- /** @returns {this} */ enable(): this;
73
- /** @returns {this} */ disable(): this;
74
- /** @returns {this} */ focus(): this;
75
- }
76
- /** Legacy JSON-string multi-value editor. */
77
- export declare class MultiValueEditor extends GxWrapper {
78
- static legacyName: string;
79
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
80
- constructor(display: Element | string | null, options?: Record<string, any>);
81
- /** @returns {string} */ getValue(): string;
82
- /** @param {string|unknown[]} value @returns {this} */ setValue(value: string | unknown[]): this;
83
- }
84
- /** Legacy bootstrap upload field. */
85
- export declare class FieldUpload extends GxWrapper {
86
- _value: unknown;
87
- static legacyName: string;
88
- /** @param {Record<string, any>} [options={}] */
89
- constructor(options?: Record<string, any>);
90
- /** @param {unknown} source @returns {this} */ setValue(source: unknown): this;
91
- /** @returns {null} */ getValue(): null;
92
- /** @param {unknown} source @returns {this} */
93
- setImage(source: unknown): this;
94
- /** @param {boolean} disabled @returns {this} */ setDisabled(disabled: boolean): this;
95
- /** @returns {this} */ reset(): this;
96
- /** @param {unknown} response @returns {void} */
97
- _handleResponse(response: unknown): void;
98
- }
@@ -1,12 +0,0 @@
1
- /** @param {Element|string|null|undefined} target @returns {Element|null} */
2
- export declare function targetElement(target: Element | string | null | undefined): Element | null;
3
- /** @param {unknown} value @returns {unknown} */
4
- export declare function legacyContent(value: unknown): unknown;
5
- /** @param {unknown} value @returns {'info'|'success'|'warning'|'error'} */
6
- export declare function messageKind(value: unknown): 'info' | 'success' | 'warning' | 'error';
7
- /** @param {Function} fn @param {string} legacyName @param {string} replacement @returns {void} */
8
- export declare function warnFunctionOnce(fn: Function, legacyName: string, replacement: string): void;
9
- /** @param {Function} owner @param {string} method @param {string} replacement @returns {void} */
10
- export declare function warnMethodOnce(owner: Function, method: string, replacement: string): void;
11
- /** @param {unknown} value @returns {string} */
12
- export declare function textLabel(value: unknown): string;
@@ -1,36 +0,0 @@
1
- import { Http } from '../../index.js';
2
- import { GxWrapper } from '../base.js';
3
- /** Legacy generic HTTP client. */
4
- export declare class Client extends GxWrapper {
5
- _http: Http;
6
- static legacyName: string;
7
- /** @param {Record<string, any>} [options={}] */
8
- constructor(options?: Record<string, any>);
9
- /** @param {string} path @param {unknown} data @param {Function|Record<string, Function>} [callback] @param {string} [resulttype] @returns {Promise<unknown>} */
10
- post(path: string, data: unknown, callback?: Function | Record<string, Function>, resulttype?: string): Promise<unknown>;
11
- /** @param {string} path @param {unknown} data @param {Function|Record<string, Function>} [callback] @param {string} [resulttype] @returns {Promise<unknown>} */
12
- get(path: string, data: unknown, callback?: Function | Record<string, Function>, resulttype?: string): Promise<unknown>;
13
- /** @param {unknown} data @param {string} [method='GET'] @param {Function|Record<string, Function>} [callback] @param {string} [resulttype] @param {string} [path=''] @returns {Promise<unknown>} */
14
- request(data: unknown, method?: string, callback?: Function | Record<string, Function>, resulttype?: string, path?: string): Promise<unknown>;
15
- }
16
- /** Legacy ZeyOS REST request client. */
17
- export declare class Request extends GxWrapper {
18
- _files: File[];
19
- baseUrl: string;
20
- _http: Http;
21
- static legacyName: string;
22
- /** @param {Record<string, any>} [options={}] */
23
- constructor(options?: Record<string, any>);
24
- /** @param {string} service @param {string} [accesskey=''] @returns {this} */
25
- setService(service: string, accesskey?: string): this;
26
- /** @param {string} path @param {unknown} data @param {Function} [callback] @param {string} [method='GET'] @returns {Promise<unknown>} */
27
- send(path: string, data: unknown, callback?: Function, method?: string): Promise<unknown>;
28
- /** @param {string} path @param {unknown} data @param {Function} [callback] @returns {Promise<unknown>} */ post(path: string, data: unknown, callback?: Function): Promise<unknown>;
29
- /** @param {string} path @param {unknown} data @param {Function} [callback] @returns {Promise<unknown>} */ get(path: string, data: unknown, callback?: Function): Promise<unknown>;
30
- /** @param {string} path @param {unknown} data @param {Function} [callback] @returns {Promise<unknown>} */ put(path: string, data: unknown, callback?: Function): Promise<unknown>;
31
- /** @param {string} path @param {unknown} data @param {Function} [callback] @returns {Promise<unknown>} */ delete(path: string, data: unknown, callback?: Function): Promise<unknown>;
32
- /** @param {string} path @param {unknown} data @param {File[]|FileList|Element[]} files @param {Function} [callback] @returns {Promise<unknown>} */
33
- upload(path: string, data: unknown, files: File[] | FileList | Element[], callback?: Function): Promise<unknown>;
34
- /** @param {string} path @returns {Window|null} */ openLink(path: string): Window | null;
35
- /** @param {string} error @returns {void} */ showError(error: string): void;
36
- }
@@ -1,106 +0,0 @@
1
- import { GxWrapper } from '../base.js';
2
- /** Legacy ZeyOS collapsible groupbox. */
3
- export declare class Groupbox 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 {this} */
8
- toggle(): this;
9
- /** @returns {this} */
10
- open(): this;
11
- /** @returns {this} */
12
- close(): this;
13
- /** @returns {boolean} */
14
- isOpen(): boolean;
15
- /** @param {string} title @returns {this} */
16
- setTitle(title: string): this;
17
- /** @returns {void} */
18
- _syncAct(): void;
19
- }
20
- /** Legacy positional panel wrapper. */
21
- export declare class Panel extends GxWrapper {
22
- static legacyName: string;
23
- /** @param {Element|string|null} display @param {string} title @param {unknown} content @param {boolean} [open=true] */
24
- constructor(display: Element | string | null, title?: string, content?: unknown, open?: boolean);
25
- /** @returns {this} */
26
- toggle(): this;
27
- /** @returns {this} */
28
- open(): this;
29
- /** @returns {this} */
30
- close(): this;
31
- /** @returns {boolean} */
32
- isOpen(): boolean;
33
- /** @param {unknown} content @returns {this} */
34
- setContent(content: unknown): this;
35
- /** @param {string} title @returns {this} */
36
- setTitle(title: string): this;
37
- }
38
- /** Legacy positional master panel wrapper. */
39
- export declare class MasterPanel extends GxWrapper {
40
- static legacyName: string;
41
- /** @param {Element|string|null} display @param {string} title @param {unknown} content @param {unknown[]} [buttons=[]] */
42
- constructor(display: Element | string | null, title?: string, content?: unknown, buttons?: unknown[]);
43
- /** @param {unknown} content @returns {this} */
44
- setContent(content: unknown): this;
45
- /** @param {string} title @returns {this} */
46
- setTitle(title: string): this;
47
- }
48
- /** Shared legacy tabbox implementation; subclasses only change warning identity. */
49
- export declare class Tabbox extends GxWrapper {
50
- static legacyName: string;
51
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
52
- constructor(display: Element | string | null, options?: Record<string, any>);
53
- /** @param {Record<string, any>|string} frame @param {string} [title] @param {unknown} [content] @returns {this} */
54
- addTab(frame: Record<string, any> | string, title?: string, content?: unknown): this;
55
- /** @param {string} name @returns {this} */
56
- closeTab(name: string): this;
57
- /** @param {string|number} name @returns {this} */
58
- openTab(name: string | number): this;
59
- /** @param {string} name @param {string} title @returns {this} */
60
- setTabTitle(name: string, title: string): this;
61
- /** @param {string} name @param {unknown} content @param {string} [_style] @returns {this} */
62
- setHighlight(name: string, content: unknown, _style?: string): this;
63
- /** @returns {string|null} */
64
- getActive(): string | null;
65
- /** @returns {void} */
66
- _syncAct(): void;
67
- }
68
- /** Bootstrap-flavoured tabbox with the same behavior. */
69
- export declare class BootstrapTabbox extends Tabbox {
70
- static legacyName: string;
71
- }
72
- /** Legacy bootstrap navigation bar. */
73
- export declare class NavigationBar extends GxWrapper {
74
- _frames: any[];
75
- static legacyName: string;
76
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
77
- constructor(display: Element | string | null, options?: Record<string, any>);
78
- /** @param {Record<string, any>|string} frame @param {string} [title] @param {unknown} [content] @returns {this} */
79
- addTab(frame: Record<string, any> | string, title?: string, content?: unknown): this;
80
- /** @param {string} name @returns {this} */
81
- closeTab(name: string): this;
82
- /** @param {string} name @returns {this} */
83
- openTab(name: string): this;
84
- /** @param {string|Element} title @returns {this} */
85
- setTitle(title: string | Element): this;
86
- /** @param {string} name @param {string} title @returns {this} */
87
- setTabTitle(name: string, title: string): this;
88
- /** @param {unknown[]} buttons @returns {this} */
89
- setNavigationButtons(buttons: unknown[]): this;
90
- /** @param {string} name @param {unknown} content @param {string} [_style] @returns {this} */
91
- setHighlight(name: string, content: unknown, _style?: string): this;
92
- /** @returns {void} */
93
- _rebuild(): void;
94
- /** @returns {void} */
95
- _syncAct(): void;
96
- }
97
- /** Legacy standalone search control. */
98
- export declare class Search extends GxWrapper {
99
- static legacyName: string;
100
- /** @param {Record<string, any>} [options={}] */
101
- constructor(options?: Record<string, any>);
102
- /** @returns {string} */
103
- get(): string;
104
- /** @param {string} value @returns {this} */
105
- set(value: string): this;
106
- }
@@ -1,80 +0,0 @@
1
- /**
2
- * Pure option and event translations shared by the gx compatibility wrappers.
3
- * Keeping these helpers DOM-free makes the migration contract directly testable in Node.
4
- * @module gx-compat-options
5
- */
6
- /** @type {Readonly<Record<string, string>>} */
7
- export declare const SELECT_OPTION_MAP: Readonly<Record<string, string>>;
8
- /** @type {Readonly<Record<string, string>>} */
9
- export declare const CHECKLIST_OPTION_MAP: Readonly<Record<string, string>>;
10
- /** @type {Readonly<Record<string, string>>} */
11
- export declare const TABLE_OPTION_MAP: Readonly<Record<string, string>>;
12
- /** @type {Readonly<Record<string, string>>} */
13
- export declare const FORM_OPTION_MAP: Readonly<Record<string, string>>;
14
- /** @type {Readonly<Record<string, string>>} */
15
- export declare const FIELD_TYPE_MAP: Readonly<Record<string, string>>;
16
- /**
17
- * Renames known keys while retaining unrelated options.
18
- * @param {Record<string, any>|null|undefined} source Legacy options.
19
- * @param {Readonly<Record<string, string>>} mapping Rename table.
20
- * @returns {Record<string, any>} Translated copy.
21
- */
22
- export declare function renameOptions(source: Record<string, any> | null | undefined, mapping: Readonly<Record<string, string>>): Record<string, any>;
23
- /**
24
- * Converts legacy Select options to their Zx equivalents.
25
- * @param {Record<string, any>} [options={}] Legacy Select options.
26
- * @returns {Record<string, any>} Zx Select options.
27
- */
28
- export declare function translateSelectOptions(options?: Record<string, any>): Record<string, any>;
29
- /**
30
- * Converts legacy Checklist options to Zx Checklist options.
31
- * @param {Record<string, any>} [options={}] Legacy Checklist options.
32
- * @returns {Record<string, any>} Zx Checklist options.
33
- */
34
- export declare function translateChecklistOptions(options?: Record<string, any>): Record<string, any>;
35
- /**
36
- * Converts the legacy Datebox token array to the kernel format string.
37
- * Existing percent-token format strings pass through unchanged.
38
- * @param {unknown} format Legacy array or format string.
39
- * @returns {string} Kernel date format.
40
- */
41
- export declare function translateDateboxFormat(format: unknown): string;
42
- /**
43
- * Resolves the legacy one-based `show` option to a tab name.
44
- * @param {Array<{name?: unknown}>} frames Legacy frame list.
45
- * @param {unknown} show Name or one-based numeric index.
46
- * @returns {string|null} Resolved name.
47
- */
48
- export declare function resolveTabName(frames: Array<{
49
- name?: unknown;
50
- }>, show: unknown): string | null;
51
- /**
52
- * Converts legacy Tabbox options without normalizing DOM content.
53
- * @param {Record<string, any>} [options={}] Legacy Tabbox options.
54
- * @returns {{tabs: Array<Record<string, any>>, active: string|null, height: unknown}}
55
- */
56
- export declare function translateTabboxOptions(options?: Record<string, any>): {
57
- tabs: Array<Record<string, any>>;
58
- active: string | null;
59
- height: unknown;
60
- };
61
- /**
62
- * Converts a legacy table column list and its initial filter state.
63
- * A cell adapter can turn legacy cell objects into DOM nodes in browser wrappers.
64
- * @param {Record<string, any>} [options={}] Legacy Table options.
65
- * @param {(cell: unknown) => unknown} [adaptCell=defaultCellAdapter] Cell adapter.
66
- * @returns {Record<string, any>} Zx Table options.
67
- */
68
- export declare function translateTableOptions(options?: Record<string, any>, adaptCell?: (cell: unknown) => unknown): Record<string, any>;
69
- /**
70
- * Converts a legacy field descriptor to Zx Field options.
71
- * Component-specific `props` are completed by the browser wrapper.
72
- * @param {Record<string, any>} [options={}] Legacy field descriptor.
73
- * @returns {Record<string, any>} Zx Field options.
74
- */
75
- export declare function translateFieldOptions(options?: Record<string, any>): Record<string, any>;
76
- /**
77
- * Positional legacy event arguments for the mappings exercised by wrappers.
78
- * @type {Readonly<Record<string, (detail: Record<string, any>, wrapper: unknown, event?: Event) => unknown[]>>}
79
- */
80
- export declare const LEGACY_EVENT_ARGS: Readonly<Record<string, (detail: Record<string, any>, wrapper: unknown, event?: Event) => unknown[]>>;
@@ -1,95 +0,0 @@
1
- import { GxWrapper } from '../base.js';
2
- /** Shared Select facade; concrete subclasses choose filtering and warning identity. */
3
- declare class SelectBase extends GxWrapper {
4
- _http: any;
5
- data: any;
6
- static legacyName: string;
7
- /** @type {string|false} */
8
- static filterMode: string | false;
9
- /** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
10
- constructor(display: Element | string | null, options?: Record<string, any>);
11
- /** @param {unknown} selection @param {boolean} [noEvents=false] @returns {this} */
12
- set(selection: unknown, noEvents?: boolean): this;
13
- /** @param {unknown} id @param {boolean} [noEvents=false] @returns {this} */
14
- setId(id: unknown, noEvents?: boolean): this;
15
- /** @param {unknown} [item] @returns {unknown} */
16
- getId(item?: unknown): unknown;
17
- /** @returns {unknown} */
18
- getValue(): unknown;
19
- /** @returns {unknown} */
20
- getSelected(): unknown;
21
- /** @param {unknown[]} data @returns {this} */
22
- setData(data: unknown[]): this;
23
- /** @returns {Element[]} */
24
- getRows(): Element[];
25
- /** @param {boolean} [noEvents=false] @returns {this} */
26
- reset(noEvents?: boolean): this;
27
- /** @returns {this} */
28
- enable(): this;
29
- /** @returns {this} */
30
- disable(): this;
31
- /** @returns {this} */
32
- show(): this;
33
- /** @returns {this} */
34
- hide(): this;
35
- /** @returns {boolean} */
36
- isOpen(): boolean;
37
- /** @returns {this} */
38
- search(): this;
39
- /** @returns {this} */
40
- showLoader(): this;
41
- /** @returns {this} */
42
- hideLoader(): this;
43
- /** @param {string} query @returns {Promise<unknown[]>} */
44
- _load(query: string): Promise<unknown[]>;
45
- /** @param {string} query @returns {Promise<unknown>} */
46
- _loadUrl(query: string): Promise<unknown>;
47
- /** @param {string} query @returns {Promise<unknown>} */
48
- _loadRest(query: string): Promise<unknown>;
49
- }
50
- /** Legacy ZeyOS select. */
51
- export declare class Select extends SelectBase {
52
- static legacyName: string;
53
- }
54
- /** Legacy ZeyOS locally filterable select. */
55
- export declare class SelectFilter extends SelectBase {
56
- static legacyName: string;
57
- static filterMode: string;
58
- }
59
- /** Legacy ZeyOS HTTP-backed select. */
60
- export declare class SelectDyn extends SelectBase {
61
- static legacyName: string;
62
- static filterMode: string;
63
- }
64
- /** Legacy ZeyOS priority select. */
65
- export declare class SelectPrio extends SelectBase {
66
- static legacyName: string;
67
- static filterMode: string;
68
- }
69
- /** Legacy bootstrap select. */
70
- export declare class BootstrapSelect extends SelectBase {
71
- static legacyName: string;
72
- }
73
- /** Legacy bootstrap locally filterable select. */
74
- export declare class BootstrapSelectFilter extends SelectBase {
75
- static legacyName: string;
76
- static filterMode: string;
77
- }
78
- /** Legacy bootstrap HTTP-backed select. */
79
- export declare class BootstrapSelectDyn extends SelectBase {
80
- static legacyName: string;
81
- static filterMode: string;
82
- }
83
- /** Legacy bootstrap REST-backed select. */
84
- export declare class SelectDynREST extends SelectBase {
85
- static legacyName: string;
86
- static filterMode: string;
87
- /** Loads and selects a REST item by ID when it is not already cached. @param {unknown} id @returns {Promise<void>} */
88
- setEntityId(id: unknown): Promise<void>;
89
- }
90
- /** Legacy bootstrap priority select. */
91
- export declare class BootstrapSelectPrio extends SelectBase {
92
- static legacyName: string;
93
- static filterMode: string;
94
- }
95
- export {};
@@ -1,32 +0,0 @@
1
- /** Direct Settings subclassing is intentionally outside the compatibility contract. */
2
- export declare const Settings: {
3
- new (): {};
4
- };
5
- /** Direct Container subclassing is intentionally outside the compatibility contract. */
6
- export declare const Container: {
7
- new (): {};
8
- };
9
- /** Legacy collapse animation stub. */
10
- export declare const Collapse: {
11
- new (): {};
12
- };
13
- /** Legacy blend animation stub. */
14
- export declare const Blend: {
15
- new (): {};
16
- };
17
- /** Legacy HUD stub. */
18
- export declare const Hud: {
19
- new (): {};
20
- };
21
- /** Legacy toggling helper stub. */
22
- export declare const Toggling: {
23
- new (): {};
24
- };
25
- /** Legacy horizontal group stub. */
26
- export declare const HGroup: {
27
- new (): {};
28
- };
29
- /** Legacy templates stub. */
30
- export declare const Templates: {
31
- new (): {};
32
- };
@@ -1,37 +0,0 @@
1
- import { parse } from '../globals.js';
2
- /** Legacy utility namespace backed by dependency-free implementations. */
3
- export declare const util: Readonly<{
4
- initValue: typeof initValue;
5
- initNum: typeof initNum;
6
- formatTime: typeof formatTime;
7
- getMinutes: typeof getMinutes;
8
- formatNum: typeof formatNum;
9
- getNumber: typeof getNumber;
10
- printf: typeof printf;
11
- parseResult: typeof parseResult;
12
- Parse: typeof parse;
13
- isArray: (arg: any) => arg is any[];
14
- isObject: (value: any) => boolean;
15
- isFunction: (value: any) => boolean;
16
- isString: (value: any) => value is string;
17
- isNumber: (value: any) => boolean;
18
- isElement: (value: any) => boolean;
19
- isNode: (value: any) => boolean;
20
- Console: (source: any, message: any) => void;
21
- }>;
22
- /** @param {Record<string, unknown>} object @param {string} key @param {unknown} fallback @returns {unknown} */
23
- export declare function initValue(object: Record<string, unknown>, key: string, fallback: unknown): unknown;
24
- /** @param {unknown} value @returns {number} */
25
- export declare function initNum(value: unknown): number;
26
- /** @param {unknown} value @returns {string} */
27
- export declare function formatTime(value: unknown): string;
28
- /** @param {unknown} value @returns {number} */
29
- export declare function getMinutes(value: unknown): number;
30
- /** @param {unknown} value @param {string} [decimal='.'] @param {string} [thousands=','] @param {number} [decimals=2] @returns {string} */
31
- export declare function formatNum(value: unknown, decimal?: string, thousands?: string, decimals?: number): string;
32
- /** @param {unknown} value @param {string} [decimal=','] @returns {number} */
33
- export declare function getNumber(value: unknown, decimal?: string): number;
34
- /** @param {unknown} template @param {unknown|unknown[]} [values=[]] @returns {string} */
35
- export declare function printf(template: unknown, values?: unknown | unknown[]): string;
36
- /** @param {unknown} response @returns {unknown} */
37
- export declare function parseResult(response: unknown): unknown;
@@ -1,5 +0,0 @@
1
- /** Browser entry point for the gx compatibility bundle. */
2
- import * as zx from './index.js';
3
- import gx from './compat/index.js';
4
- export { gx, zx };
5
- export default gx;
@@ -1,96 +0,0 @@
1
- import { Component } from '../../core/component.js';
2
- import { Select } from '../select/select.js';
3
- export type PermissionGroup = Record<string, any> | string | number | boolean | symbol | bigint | null | undefined;
4
- export type PermissionOptions = {
5
- /**
6
- * Public, private, or group ID.
7
- */
8
- value?: boolean | string | number | symbol | bigint | null;
9
- /**
10
- * Available groups.
11
- */
12
- groups?: PermissionGroup[];
13
- /**
14
- * Group ID property or reader.
15
- */
16
- groupsValueKey?: string | ((item: PermissionGroup) => unknown);
17
- /**
18
- * Group label property or reader.
19
- */
20
- groupsLabelKey?: string | ((item: PermissionGroup) => string);
21
- /**
22
- * Localized messages.
23
- */
24
- msg?: Record<string, string> | Record<string, Record<string, string>>;
25
- /**
26
- * Change listener.
27
- */
28
- onchange?: (event: CustomEvent<PermissionChangeDetail>) => void;
29
- };
30
- export type PermissionChangeDetail = {
31
- value: unknown;
32
- };
33
- /** @typedef {Record<string, any>|string|number|boolean|symbol|bigint|null|undefined} PermissionGroup */
34
- /**
35
- * @typedef {Object} PermissionOptions
36
- * @property {boolean|string|number|symbol|bigint|null} [value=true] Public, private, or group ID.
37
- * @property {PermissionGroup[]} [groups=[]] Available groups.
38
- * @property {string|((item: PermissionGroup) => unknown)} [groupsValueKey='ID'] Group ID property or reader.
39
- * @property {string|((item: PermissionGroup) => string)} [groupsLabelKey='name'] Group label property or reader.
40
- * @property {Record<string, string>|Record<string, Record<string, string>>} [msg] Localized messages.
41
- * @property {(event: CustomEvent<PermissionChangeDetail>) => void} [onchange] Change listener.
42
- */
43
- /** @typedef {{value: unknown}} PermissionChangeDetail */
44
- /**
45
- * Record-permission choice for private, public, and group access.
46
- *
47
- * @deprecated Use `Select.permission(target, {groups})`, which carries the same tri-state value in
48
- * one control and accepts a loader function for installations whose group list is too long to ship
49
- * with the form. This class stays for `gx.zeyos.Permission` and will be removed in 3.0.
50
- * @fires Permission#change
51
- * @extends {Component<PermissionOptions>}
52
- */
53
- export declare class Permission extends Component<PermissionOptions> {
54
- _mode: string;
55
- _groupValue: any;
56
- _groupSelect: Select;
57
- _createdRoot: boolean;
58
- _originalChildren: any[] | ChildNode[];
59
- _root: HTMLElement;
60
- _originalState: string;
61
- static cssName: string;
62
- /** @type {PermissionOptions} */
63
- static defaults: PermissionOptions;
64
- /** @returns {HTMLElement} */
65
- render(): HTMLElement;
66
- /** Returns the normalized permission value. @returns {'private'|'public'|unknown} */
67
- get(): 'private' | 'public' | unknown;
68
- /**
69
- * Sets a public, private, or group permission.
70
- * @param {boolean|string|number|symbol|bigint|null} value Permission value.
71
- * @param {{silent?: boolean}} [options={}] Update behavior.
72
- * @returns {this}
73
- * @fires Permission#change
74
- */
75
- set(value: boolean | string | number | symbol | bigint | null, { silent }?: {
76
- silent?: boolean;
77
- }): this;
78
- /** Destroys the embedded Select and restores an enhanced target. @returns {void} */
79
- destroy(): void;
80
- /** @returns {void} */
81
- _selectGroupMode(): void;
82
- /** @returns {void} */
83
- _sync(): void;
84
- /**
85
- * @param {string} name
86
- * @param {'private'|'public'|'group'} value
87
- * @param {string} text
88
- * @returns {{label: HTMLLabelElement, input: HTMLInputElement}}
89
- */
90
- _choice(name: string, value: 'private' | 'public' | 'group', text: string): {
91
- label: HTMLLabelElement;
92
- input: HTMLInputElement;
93
- };
94
- /** @param {string} key @param {string} fallback @returns {string} */
95
- _message(key: string, fallback: string): string;
96
- }