@zeyos/zx 2.1.0 → 2.2.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/CHANGELOG.md +39 -0
- package/README.md +15 -0
- package/dist/types/compat/base.d.ts +156 -0
- package/dist/types/compat/globals.d.ts +20 -0
- package/dist/types/compat/index.d.ts +128 -0
- package/dist/types/compat/map/basic.d.ts +175 -0
- package/dist/types/compat/map/data.d.ts +102 -0
- package/dist/types/compat/map/date-time.d.ts +80 -0
- package/dist/types/compat/map/factory.d.ts +9 -0
- package/dist/types/compat/map/form.d.ts +98 -0
- package/dist/types/compat/map/helpers.d.ts +12 -0
- package/dist/types/compat/map/http.d.ts +36 -0
- package/dist/types/compat/map/layout.d.ts +106 -0
- package/dist/types/compat/map/options.d.ts +80 -0
- package/dist/types/compat/map/select.d.ts +95 -0
- package/dist/types/compat/map/stubs.d.ts +32 -0
- package/dist/types/compat/map/utilities.d.ts +37 -0
- package/dist/types/compat-entry.d.ts +5 -0
- package/dist/types/components/badge/badge.d.ts +46 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +200 -0
- package/dist/types/components/button/button.d.ts +42 -0
- package/dist/types/components/check-button/check-button.d.ts +98 -0
- package/dist/types/components/checklist/checklist.d.ts +143 -0
- package/dist/types/components/checklist/field-adapter.d.ts +5 -0
- package/dist/types/components/context-menu/context-menu.d.ts +130 -0
- package/dist/types/components/copy/copy-button.d.ts +48 -0
- package/dist/types/components/copy/copy-input.d.ts +91 -0
- package/dist/types/components/data-filter/data-filter.d.ts +250 -0
- package/dist/types/components/data-filter/filter-core.d.ts +52 -0
- package/dist/types/components/date-picker/date-picker.d.ts +137 -0
- package/dist/types/components/date-picker/date-range-picker.d.ts +350 -0
- package/dist/types/components/date-picker/field-adapter.d.ts +6 -0
- package/dist/types/components/date-picker/month-picker.d.ts +75 -0
- package/dist/types/components/date-picker/range-field-adapter.d.ts +7 -0
- package/dist/types/components/date-picker/time-picker.d.ts +127 -0
- package/dist/types/components/datebox/date-range-box.d.ts +218 -0
- package/dist/types/components/datebox/datebox.d.ts +160 -0
- package/dist/types/components/datebox/field-adapter.d.ts +5 -0
- package/dist/types/components/dialog/dialog.d.ts +284 -0
- package/dist/types/components/dropdown/dropdown.d.ts +118 -0
- package/dist/types/components/empty-state/empty-state.d.ts +38 -0
- package/dist/types/components/field/field.d.ts +231 -0
- package/dist/types/components/field-upload/field-adapter.d.ts +5 -0
- package/dist/types/components/field-upload/field-upload.d.ts +213 -0
- package/dist/types/components/fieldset/fieldset.d.ts +125 -0
- package/dist/types/components/finder/finder.d.ts +252 -0
- package/dist/types/components/form/form.d.ts +194 -0
- package/dist/types/components/groupbox/groupbox.d.ts +89 -0
- package/dist/types/components/layout/layout.d.ts +132 -0
- package/dist/types/components/loading/inline-loading.d.ts +86 -0
- package/dist/types/components/loading/progress-bar.d.ts +168 -0
- package/dist/types/components/loading/spinner.d.ts +34 -0
- package/dist/types/components/master-panel/master-panel.d.ts +112 -0
- package/dist/types/components/menu-button/menu-button.d.ts +142 -0
- package/dist/types/components/message/message.d.ts +212 -0
- package/dist/types/components/modal/modal.d.ts +105 -0
- package/dist/types/components/multi-value-editor/field-adapter.d.ts +5 -0
- package/dist/types/components/multi-value-editor/multi-value-editor.d.ts +66 -0
- package/dist/types/components/navigation-bar/navigation-bar.d.ts +229 -0
- package/dist/types/components/number-field/field-adapter.d.ts +5 -0
- package/dist/types/components/number-field/number-field.d.ts +292 -0
- package/dist/types/components/pagination/pagination.d.ts +267 -0
- package/dist/types/components/panel/panel.d.ts +194 -0
- package/dist/types/components/permission/permission.d.ts +93 -0
- package/dist/types/components/rating/field-adapter.d.ts +5 -0
- package/dist/types/components/rating/rating.d.ts +213 -0
- package/dist/types/components/search/search.d.ts +98 -0
- package/dist/types/components/select/field-adapter.d.ts +5 -0
- package/dist/types/components/select/filter.d.ts +11 -0
- package/dist/types/components/select/select.d.ts +235 -0
- package/dist/types/components/skeleton/skeleton.d.ts +97 -0
- package/dist/types/components/slider/field-adapter.d.ts +5 -0
- package/dist/types/components/slider/slider.d.ts +216 -0
- package/dist/types/components/split-view/split-view.d.ts +335 -0
- package/dist/types/components/stepper/stepper.d.ts +314 -0
- package/dist/types/components/stepper/steps.d.ts +131 -0
- package/dist/types/components/tabbox/tabbox.d.ts +230 -0
- package/dist/types/components/table/sort.d.ts +49 -0
- package/dist/types/components/table/table.d.ts +872 -0
- package/dist/types/components/tag-picker/field-adapter.d.ts +5 -0
- package/dist/types/components/tag-picker/tag-picker.d.ts +375 -0
- package/dist/types/components/timebox/field-adapter.d.ts +5 -0
- package/dist/types/components/timebox/timebox.d.ts +121 -0
- package/dist/types/components/toggle/field-adapter.d.ts +5 -0
- package/dist/types/components/toggle/toggle.d.ts +94 -0
- package/dist/types/components/toolbar/toolbar.d.ts +230 -0
- package/dist/types/components/tooltip/tooltip.d.ts +183 -0
- package/dist/types/components/tree/hierarchy.d.ts +113 -0
- package/dist/types/components/tree/tree.d.ts +383 -0
- package/dist/types/components/truncate/truncate.d.ts +61 -0
- package/dist/types/components/value-list/field-adapter.d.ts +5 -0
- package/dist/types/components/value-list/value-list.d.ts +143 -0
- package/dist/types/core/breakpoint.d.ts +68 -0
- package/dist/types/core/component.d.ts +115 -0
- package/dist/types/core/date.d.ts +50 -0
- package/dist/types/core/dom.d.ts +86 -0
- package/dist/types/core/export.d.ts +70 -0
- package/dist/types/core/fontawesome.d.ts +107 -0
- package/dist/types/core/format.d.ts +107 -0
- package/dist/types/core/http.d.ts +122 -0
- package/dist/types/core/i18n.d.ts +35 -0
- package/dist/types/core/icons.d.ts +137 -0
- package/dist/types/core/keyboard.d.ts +72 -0
- package/dist/types/core/position.d.ts +45 -0
- package/dist/types/core/storage.d.ts +46 -0
- package/dist/types/core/util.d.ts +117 -0
- package/dist/types/elements/define.d.ts +73 -0
- package/dist/types/elements/reflect.d.ts +27 -0
- package/dist/types/index.d.ts +79 -0
- package/dist/types/zeyos/connect.d.ts +65 -0
- package/dist/types/zeyos/form.d.ts +140 -0
- package/dist/types/zeyos/icons.d.ts +104 -0
- package/dist/types/zeyos/index.d.ts +12 -0
- package/dist/types/zeyos/modules.d.ts +110 -0
- package/dist/types/zeyos/query.d.ts +157 -0
- package/dist/types/zeyos/schema.d.ts +79 -0
- package/dist/types/zeyos/select.d.ts +167 -0
- package/dist/types/zeyos/table.d.ts +205 -0
- package/dist/zx-compat.esm.js +362 -33
- package/dist/zx-compat.esm.min.js +1 -1
- package/dist/zx-compat.global.js +359 -67
- package/dist/zx-compat.global.min.js +3 -3
- package/dist/zx-zeyos.esm.js +342 -43
- package/dist/zx-zeyos.esm.min.js +1 -1
- package/dist/zx.css +68 -6
- package/dist/zx.esm.js +346 -67
- package/dist/zx.esm.min.js +3 -3
- package/dist/zx.global.js +346 -67
- package/dist/zx.global.min.js +3 -3
- package/dist/zx.min.css +1 -1
- package/docs/api.json +48 -2
- package/docs/llms.md +28 -0
- package/package.json +37 -9
- package/src/compat/base.js +291 -0
- package/src/compat/globals.js +165 -0
- package/src/compat/index.js +84 -0
- package/src/compat/map/basic.js +464 -0
- package/src/compat/map/data.js +232 -0
- package/src/compat/map/date-time.js +177 -0
- package/src/compat/map/factory.js +45 -0
- package/src/compat/map/form.js +330 -0
- package/src/compat/map/helpers.js +46 -0
- package/src/compat/map/http.js +117 -0
- package/src/compat/map/layout.js +256 -0
- package/src/compat/map/options.js +267 -0
- package/src/compat/map/select.js +198 -0
- package/src/compat/map/stubs.js +26 -0
- package/src/compat/map/utilities.js +113 -0
- package/src/compat-entry.js +11 -0
- package/src/components/badge/badge.css +147 -0
- package/src/components/badge/badge.js +92 -0
- package/src/components/breadcrumb/breadcrumb.css +105 -0
- package/src/components/breadcrumb/breadcrumb.js +331 -0
- package/src/components/button/button.css +104 -0
- package/src/components/button/button.js +76 -0
- package/src/components/check-button/check-button.css +66 -0
- package/src/components/check-button/check-button.js +167 -0
- package/src/components/checklist/checklist.css +65 -0
- package/src/components/checklist/checklist.js +282 -0
- package/src/components/checklist/field-adapter.js +46 -0
- package/src/components/context-menu/context-menu.css +54 -0
- package/src/components/context-menu/context-menu.js +334 -0
- package/src/components/copy/copy-button.css +27 -0
- package/src/components/copy/copy-button.js +78 -0
- package/src/components/copy/copy-input.css +59 -0
- package/src/components/copy/copy-input.js +123 -0
- package/src/components/data-filter/data-filter.css +53 -0
- package/src/components/data-filter/data-filter.js +400 -0
- package/src/components/data-filter/filter-core.js +128 -0
- package/src/components/date-picker/date-picker.css +181 -0
- package/src/components/date-picker/date-picker.js +500 -0
- package/src/components/date-picker/date-range-picker.css +264 -0
- package/src/components/date-picker/date-range-picker.js +990 -0
- package/src/components/date-picker/field-adapter.js +36 -0
- package/src/components/date-picker/month-picker.js +223 -0
- package/src/components/date-picker/range-field-adapter.js +31 -0
- package/src/components/date-picker/time-picker.css +191 -0
- package/src/components/date-picker/time-picker.js +406 -0
- package/src/components/datebox/date-range-box.css +128 -0
- package/src/components/datebox/date-range-box.js +492 -0
- package/src/components/datebox/datebox.css +108 -0
- package/src/components/datebox/datebox.js +358 -0
- package/src/components/datebox/field-adapter.js +34 -0
- package/src/components/dialog/dialog.css +74 -0
- package/src/components/dialog/dialog.js +450 -0
- package/src/components/dropdown/dropdown.css +24 -0
- package/src/components/dropdown/dropdown.js +288 -0
- package/src/components/empty-state/empty-state.css +80 -0
- package/src/components/empty-state/empty-state.js +92 -0
- package/src/components/field/field.css +127 -0
- package/src/components/field/field.js +605 -0
- package/src/components/field-upload/field-adapter.js +21 -0
- package/src/components/field-upload/field-upload.css +108 -0
- package/src/components/field-upload/field-upload.js +475 -0
- package/src/components/fieldset/fieldset.css +37 -0
- package/src/components/fieldset/fieldset.js +307 -0
- package/src/components/finder/finder.css +98 -0
- package/src/components/finder/finder.js +509 -0
- package/src/components/form/form.css +32 -0
- package/src/components/form/form.js +302 -0
- package/src/components/groupbox/groupbox.css +51 -0
- package/src/components/groupbox/groupbox.js +199 -0
- package/src/components/layout/layout.css +117 -0
- package/src/components/layout/layout.js +136 -0
- package/src/components/loading/inline-loading.css +34 -0
- package/src/components/loading/inline-loading.js +140 -0
- package/src/components/loading/progress-bar.css +115 -0
- package/src/components/loading/progress-bar.js +259 -0
- package/src/components/loading/spinner.css +58 -0
- package/src/components/loading/spinner.js +57 -0
- package/src/components/master-panel/master-panel.css +51 -0
- package/src/components/master-panel/master-panel.js +203 -0
- package/src/components/menu-button/menu-button.css +49 -0
- package/src/components/menu-button/menu-button.js +294 -0
- package/src/components/message/message.css +122 -0
- package/src/components/message/message.js +499 -0
- package/src/components/modal/modal.css +47 -0
- package/src/components/modal/modal.js +203 -0
- package/src/components/multi-value-editor/field-adapter.js +44 -0
- package/src/components/multi-value-editor/multi-value-editor.css +56 -0
- package/src/components/multi-value-editor/multi-value-editor.js +170 -0
- package/src/components/navigation-bar/navigation-bar.css +130 -0
- package/src/components/navigation-bar/navigation-bar.js +450 -0
- package/src/components/number-field/field-adapter.js +40 -0
- package/src/components/number-field/number-field.css +77 -0
- package/src/components/number-field/number-field.js +545 -0
- package/src/components/pagination/pagination.css +95 -0
- package/src/components/pagination/pagination.js +481 -0
- package/src/components/panel/panel.css +123 -0
- package/src/components/panel/panel.js +336 -0
- package/src/components/permission/permission.css +47 -0
- package/src/components/permission/permission.js +198 -0
- package/src/components/rating/field-adapter.js +34 -0
- package/src/components/rating/rating.css +97 -0
- package/src/components/rating/rating.js +395 -0
- package/src/components/search/search.css +70 -0
- package/src/components/search/search.js +193 -0
- package/src/components/select/field-adapter.js +24 -0
- package/src/components/select/filter.js +39 -0
- package/src/components/select/select.css +180 -0
- package/src/components/select/select.js +663 -0
- package/src/components/skeleton/skeleton.css +76 -0
- package/src/components/skeleton/skeleton.js +139 -0
- package/src/components/slider/field-adapter.js +36 -0
- package/src/components/slider/slider.css +181 -0
- package/src/components/slider/slider.js +399 -0
- package/src/components/split-view/split-view.css +139 -0
- package/src/components/split-view/split-view.js +806 -0
- package/src/components/stepper/stepper.css +234 -0
- package/src/components/stepper/stepper.js +459 -0
- package/src/components/stepper/steps.js +131 -0
- package/src/components/tabbox/tabbox.css +281 -0
- package/src/components/tabbox/tabbox.js +484 -0
- package/src/components/table/sort.js +85 -0
- package/src/components/table/table.css +364 -0
- package/src/components/table/table.js +1693 -0
- package/src/components/tag-picker/field-adapter.js +35 -0
- package/src/components/tag-picker/tag-picker.css +169 -0
- package/src/components/tag-picker/tag-picker.js +837 -0
- package/src/components/timebox/field-adapter.js +24 -0
- package/src/components/timebox/timebox.css +51 -0
- package/src/components/timebox/timebox.js +276 -0
- package/src/components/toggle/field-adapter.js +24 -0
- package/src/components/toggle/toggle.css +66 -0
- package/src/components/toggle/toggle.js +150 -0
- package/src/components/toolbar/toolbar.css +81 -0
- package/src/components/toolbar/toolbar.js +511 -0
- package/src/components/tooltip/tooltip.css +36 -0
- package/src/components/tooltip/tooltip.js +420 -0
- package/src/components/tree/hierarchy.js +151 -0
- package/src/components/tree/tree.css +99 -0
- package/src/components/tree/tree.js +784 -0
- package/src/components/truncate/truncate.css +20 -0
- package/src/components/truncate/truncate.js +92 -0
- package/src/components/value-list/field-adapter.js +24 -0
- package/src/components/value-list/value-list.css +108 -0
- package/src/components/value-list/value-list.js +336 -0
- package/src/core/breakpoint.js +150 -0
- package/src/core/component.js +292 -0
- package/src/core/date.js +216 -0
- package/src/core/dom.js +260 -0
- package/src/core/export.js +204 -0
- package/src/core/fontawesome.js +177 -0
- package/src/core/format.js +283 -0
- package/src/core/http.js +246 -0
- package/src/core/i18n.js +83 -0
- package/src/core/icons.js +283 -0
- package/src/core/keyboard.js +240 -0
- package/src/core/position.js +177 -0
- package/src/core/storage.js +175 -0
- package/src/core/util.js +336 -0
- package/src/elements/define.js +715 -0
- package/src/elements/reflect.js +79 -0
- package/src/index.js +131 -0
- package/src/zeyos/connect.js +142 -0
- package/src/zeyos/form.js +254 -0
- package/src/zeyos/icons.js +92 -0
- package/src/zeyos/index.js +21 -0
- package/src/zeyos/modules.js +269 -0
- package/src/zeyos/query.js +199 -0
- package/src/zeyos/schema.js +474 -0
- package/src/zeyos/select.js +175 -0
- package/src/zeyos/table.js +272 -0
- package/styles/base.css +124 -0
- package/styles/icons.css +34 -0
- package/styles/tokens/dark.css +84 -0
- package/styles/tokens/density.css +9 -0
- package/styles/tokens/global.css +80 -0
- package/styles/tokens/modules.css +109 -0
- package/styles/tokens/semantic.css +49 -0
- package/styles/zx.css +61 -0
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,45 @@ and friends remain the complete record.
|
|
|
8
8
|
|
|
9
9
|
## Unreleased
|
|
10
10
|
|
|
11
|
+
## 2.2.0 — 2026-08-21
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **TypeScript definitions**, generated from the JSDoc and shipped in the package. `exports` now
|
|
15
|
+
carries a `types` condition for every entry point, so `@zeyos/zx`, `/zeyos`, and `/compat` all
|
|
16
|
+
resolve. `Component` became generic over its options type and every component binds its own
|
|
17
|
+
typedef, which is what makes `new Slider(null, { value: 20 })` check against `SliderOptions`
|
|
18
|
+
rather than accept any object at all.
|
|
19
|
+
- **Table growing** — `growing: <number>` renders a first batch of rows and offers a control for
|
|
20
|
+
the next, for the result sets an ERP query returns happily and nobody scrolls through.
|
|
21
|
+
- **Responsive tables** — `Table` gained `responsive` and a per-column `popin`. Below the given
|
|
22
|
+
width each row stacks into a card of label/value pairs, measured on the table's own container
|
|
23
|
+
rather than the viewport, so it triggers inside a narrow split pane on a wide screen.
|
|
24
|
+
- **`Table.emptyText` accepts a Node or a factory**, so an empty table can carry an icon, an
|
|
25
|
+
explanation, and the action that resolves it instead of one line of grey text.
|
|
26
|
+
- **Per-component imports** — `src/` and `styles/` now ship, and `@zeyos/zx/src/components/…` is a
|
|
27
|
+
supported subpath carrying its own type declarations. An application using two components bundles
|
|
28
|
+
26 kB minified that way against 157 kB through the package entry point. Nothing changes for
|
|
29
|
+
existing imports.
|
|
30
|
+
- **Component styling hooks** — a short, published set of custom properties for restyling one
|
|
31
|
+
component without reaching into its selectors: `--zx-table-header-bg`, `--zx-table-row-hover-bg`,
|
|
32
|
+
`--zx-table-row-selected-bg`, `--zx-table-border-color`, `--zx-button-radius`,
|
|
33
|
+
`--zx-panel-header-bg`. Each falls back to the semantic token it replaces.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- `onBreakpoint()` treated an element that had not been laid out yet — width 0 — as the `xs` band,
|
|
38
|
+
so the first real width silently never notified if it landed in the same band. It also answered
|
|
39
|
+
resize notifications inside the observer callback, which the browser reports as a
|
|
40
|
+
"ResizeObserver loop" whenever the handler changes layout, and rejected nothing when handed a
|
|
41
|
+
target it could not measure.
|
|
42
|
+
- The type declarations describe the kernel accurately now: every module in `src/core/` is type
|
|
43
|
+
checked on each build, which corrected a set of JSDoc inaccuracies that had been flowing into the
|
|
44
|
+
published `.d.ts` — among them `Component.cssName`, and the `response` the HTTP helpers attach to
|
|
45
|
+
the errors they throw, which TypeScript had been told did not exist.
|
|
46
|
+
- Two static-field type conflicts in the compatibility layer (`SelectBase.filterMode`,
|
|
47
|
+
`PickerBase.Picker`) that made the emitted declarations fail to compile for consumers who do not
|
|
48
|
+
set `skipLibCheck`.
|
|
49
|
+
|
|
11
50
|
## 2.1.0 — 2026-08-19
|
|
12
51
|
|
|
13
52
|
### Added
|
package/README.md
CHANGED
|
@@ -38,6 +38,21 @@ For an application built from classic scripts, the IIFE bundle exposes the same
|
|
|
38
38
|
</script>
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
Import one component instead of the library when a bundler is doing the work:
|
|
42
|
+
|
|
43
|
+
```js
|
|
44
|
+
import { Slider } from '@zeyos/zx/src/components/slider/slider.js';
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
An application using two components bundles 26 kB minified this way against 157 kB through the
|
|
48
|
+
package entry point. Load the one stylesheet either way — it is 13 kB gzipped whole, and splitting
|
|
49
|
+
it per component costs more than it saves.
|
|
50
|
+
|
|
51
|
+
TypeScript definitions ship with the package. They are generated from the JSDoc that documents
|
|
52
|
+
every option, method, and event, so `new Slider(null, { … })` is checked against `SliderOptions`
|
|
53
|
+
and an unknown option or a wrong literal is an error in the editor. There is no TypeScript in the
|
|
54
|
+
library itself and no compile step for consumers who do not want one.
|
|
55
|
+
|
|
41
56
|
Components accept an existing element or selector as their first argument. Passing `null` makes
|
|
42
57
|
the component create and own its root. Call `destroy()` when a component is no longer needed; an
|
|
43
58
|
owned root is removed, while an enhanced target is restored.
|
|
@@ -0,0 +1,156 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -0,0 +1,128 @@
|
|
|
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;
|
|
@@ -0,0 +1,175 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,102 @@
|
|
|
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. */
|
|
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} */ set(value: unknown, silent?: boolean): this;
|
|
40
|
+
}
|
|
41
|
+
/** Shared full Table wrapper. */
|
|
42
|
+
declare class TableBase extends GxWrapper {
|
|
43
|
+
_cols: any[];
|
|
44
|
+
_filter: Record<string, any>;
|
|
45
|
+
static legacyName: string;
|
|
46
|
+
/** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
|
|
47
|
+
constructor(display: Element | string | null, options?: Record<string, any>);
|
|
48
|
+
/** @param {unknown[]} data @returns {this} */ setData(data: unknown[]): this;
|
|
49
|
+
/** @param {unknown[]|unknown} data @returns {this} */ addData(data: unknown[] | unknown): this;
|
|
50
|
+
/** @returns {this} */ empty(): this;
|
|
51
|
+
/** @param {Record<string, any>|string} column @param {'asc'|'desc'} [mode] @param {boolean} [noEvent=false] @returns {this} */
|
|
52
|
+
setSort(column: Record<string, any> | string, mode?: 'asc' | 'desc', noEvent?: boolean): this;
|
|
53
|
+
/** @returns {Record<string, any>|false} */ getFilter(): Record<string, any> | false;
|
|
54
|
+
/** @returns {unknown[]} */ getData(): unknown[];
|
|
55
|
+
/** @param {unknown} height @returns {this} */ setHeight(height: unknown): this;
|
|
56
|
+
/** @param {string} id @returns {Record<string, any>} */ _legacyColumn(id: string): Record<string, any>;
|
|
57
|
+
}
|
|
58
|
+
/** Legacy ZeyOS table. */
|
|
59
|
+
export declare class Table extends TableBase {
|
|
60
|
+
static legacyName: string;
|
|
61
|
+
}
|
|
62
|
+
/** Legacy bootstrap table. */
|
|
63
|
+
export declare class BootstrapTable extends TableBase {
|
|
64
|
+
static legacyName: string;
|
|
65
|
+
}
|
|
66
|
+
/** Legacy SimpleTable data facade. */
|
|
67
|
+
export declare class SimpleTable extends GxWrapper {
|
|
68
|
+
static legacyName: string;
|
|
69
|
+
/** @param {Element|string|Record<string, any>|null} display @param {Record<string, any>} [options={}] */
|
|
70
|
+
constructor(display: Element | string | Record<string, any> | null, options?: Record<string, any>);
|
|
71
|
+
/** @param {unknown[]} data @returns {this} */ setData(data: unknown[]): this;
|
|
72
|
+
/** @param {unknown[]} data @returns {this} */ addData(data: unknown[]): this;
|
|
73
|
+
/** @param {unknown} row @param {number} [index] @returns {HTMLTableRowElement|null} */
|
|
74
|
+
createRow(row: unknown, index?: number): HTMLTableRowElement | null;
|
|
75
|
+
/** @param {unknown} row @param {number} [index] @returns {HTMLTableRowElement|null} */ addRow(row: unknown, index?: number): HTMLTableRowElement | null;
|
|
76
|
+
/** @param {unknown} row @param {number} index @returns {HTMLTableRowElement|null} */
|
|
77
|
+
updateRow(row: unknown, index: number): HTMLTableRowElement | null;
|
|
78
|
+
/** @param {number} index @returns {this} */ removeRow(index: number): this;
|
|
79
|
+
/** @returns {unknown[]} */ getRows(): unknown[];
|
|
80
|
+
/** @returns {this} */ empty(): this;
|
|
81
|
+
}
|
|
82
|
+
/** Legacy bootstrap client-side filter bar. */
|
|
83
|
+
export declare class DataFilter extends GxWrapper {
|
|
84
|
+
origin: any[];
|
|
85
|
+
filtered: any[];
|
|
86
|
+
filter: any[];
|
|
87
|
+
static legacyName: string;
|
|
88
|
+
/** @param {Element|string|null} display @param {Record<string, any>} [options={}] */
|
|
89
|
+
constructor(display: Element | string | null, options?: Record<string, any>);
|
|
90
|
+
/** @param {string} identifier @param {string} label @param {string|string[]|Function} fields @param {unknown} [_width] @param {Function} [method] @returns {this} */
|
|
91
|
+
addSelectFilter(identifier: string, label: string, fields: string | string[] | Function, _width?: unknown, method?: Function): this;
|
|
92
|
+
/** @param {string} identifier @param {string|string[]|Function} fields @param {string} label @param {unknown} [_width] @param {Function} [method] @returns {this} */
|
|
93
|
+
addFulltextFilter(identifier: string, fields: string | string[] | Function, label: string, _width?: unknown, method?: Function): this;
|
|
94
|
+
/** @param {Element} element @returns {this} */ addCustomElement(element: Element): this;
|
|
95
|
+
/** @param {unknown[]} data @returns {this} */ initData(data: unknown[]): this;
|
|
96
|
+
/** @returns {unknown[]} */ doFilter(): unknown[];
|
|
97
|
+
/** @returns {this} */ clearFilter(): this;
|
|
98
|
+
/** @param {string} identifier @returns {Record<string, any>|null} */ getFilter(identifier: string): Record<string, any> | null;
|
|
99
|
+
/** @param {unknown} filterValue @param {unknown} fieldValue @returns {boolean} */ fulltextFilter(filterValue: unknown, fieldValue: unknown): boolean;
|
|
100
|
+
/** @param {unknown} filterValue @param {unknown} fieldValue @returns {boolean} */ selectFilter(filterValue: unknown, fieldValue: unknown): boolean;
|
|
101
|
+
}
|
|
102
|
+
export {};
|