cedro 0.1.12 → 0.1.13
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/lib/assets/_virtual/_commonjsHelpers.js +1 -0
- package/lib/assets/_virtual/index.js +1 -0
- package/lib/assets/_virtual/modulepreload-polyfill.js +1 -0
- package/lib/assets/_virtual/named-references.js +1 -0
- package/lib/assets/_virtual/numeric-unicode-map.js +1 -0
- package/lib/assets/_virtual/surrogate-pairs.js +1 -0
- package/lib/assets/core/application.builder.js +1 -0
- package/lib/assets/core/application.core.js +1 -0
- package/lib/assets/core/jsxsupport.js +1 -0
- package/lib/assets/core/screeen.core.js +1 -0
- package/lib/assets/core/seo.js +1 -0
- package/lib/assets/core/themes.core.js +1 -0
- package/lib/assets/core/uid.js +1 -0
- package/lib/assets/index.js +5 -0
- package/lib/assets/material-icons-outlined.woff +0 -0
- package/lib/assets/material-icons-outlined.woff2 +0 -0
- package/lib/assets/material-icons-round.woff +0 -0
- package/lib/assets/material-icons-round.woff2 +0 -0
- package/lib/assets/material-icons-sharp.woff +0 -0
- package/lib/assets/material-icons-sharp.woff2 +0 -0
- package/lib/assets/material-icons-two-tone.woff +0 -0
- package/lib/assets/material-icons-two-tone.woff2 +0 -0
- package/lib/assets/material-icons.woff +0 -0
- package/lib/assets/material-icons.woff2 +0 -0
- package/lib/assets/node_modules/@fontsource/roboto/100.css +1 -0
- package/lib/assets/node_modules/@fontsource/roboto/300.css +1 -0
- package/lib/assets/node_modules/@fontsource/roboto/400.css +1 -0
- package/lib/assets/node_modules/@fontsource/roboto/500.css +1 -0
- package/lib/assets/node_modules/@fontsource/roboto/700.css +1 -0
- package/lib/assets/node_modules/@fontsource/roboto/900.css +1 -0
- package/lib/assets/node_modules/html-entities/lib/index.js +1 -0
- package/lib/assets/node_modules/html-entities/lib/named-references.js +2 -0
- package/lib/assets/node_modules/html-entities/lib/numeric-unicode-map.js +1 -0
- package/lib/assets/node_modules/html-entities/lib/surrogate-pairs.js +1 -0
- package/lib/assets/node_modules/material-icons/iconfont/material-icons.css +1 -0
- package/lib/assets/node_modules/navigo/lib/es/Q.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/constants.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/index.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/lifecycles.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/callHandler.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/checkForAfterHook.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/checkForAlreadyHook.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/checkForBeforeHook.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/checkForDeprecationMethods.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/checkForForceOp.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/checkForLeaveHook.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/checkForNotFoundHandler.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/errorOut.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/flushCurrent.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/matchPathToRegisteredRoutes.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/processMatches.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/setLocationPath.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/updateBrowserURL.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/updateState.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/middlewares/waitingList.js +1 -0
- package/lib/assets/node_modules/navigo/lib/es/utils.js +1 -0
- package/lib/assets/roboto-cyrillic-100-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-100-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-300-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-300-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-400-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-400-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-500-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-500-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-700-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-700-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-900-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-900-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-ext-100-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-ext-100-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-ext-300-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-ext-300-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-ext-400-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-ext-400-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-ext-500-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-ext-500-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-ext-700-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-ext-700-normal.woff2 +0 -0
- package/lib/assets/roboto-cyrillic-ext-900-normal.woff +0 -0
- package/lib/assets/roboto-cyrillic-ext-900-normal.woff2 +0 -0
- package/lib/assets/roboto-greek-100-normal.woff +0 -0
- package/lib/assets/roboto-greek-100-normal.woff2 +0 -0
- package/lib/assets/roboto-greek-300-normal.woff +0 -0
- package/lib/assets/roboto-greek-300-normal.woff2 +0 -0
- package/lib/assets/roboto-greek-400-normal.woff +0 -0
- package/lib/assets/roboto-greek-400-normal.woff2 +0 -0
- package/lib/assets/roboto-greek-500-normal.woff +0 -0
- package/lib/assets/roboto-greek-500-normal.woff2 +0 -0
- package/lib/assets/roboto-greek-700-normal.woff +0 -0
- package/lib/assets/roboto-greek-700-normal.woff2 +0 -0
- package/lib/assets/roboto-greek-900-normal.woff +0 -0
- package/lib/assets/roboto-greek-900-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-100-normal.woff +0 -0
- package/lib/assets/roboto-latin-100-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-300-normal.woff +0 -0
- package/lib/assets/roboto-latin-300-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-400-normal.woff +0 -0
- package/lib/assets/roboto-latin-400-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-500-normal.woff +0 -0
- package/lib/assets/roboto-latin-500-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-700-normal.woff +0 -0
- package/lib/assets/roboto-latin-700-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-900-normal.woff +0 -0
- package/lib/assets/roboto-latin-900-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-ext-100-normal.woff +0 -0
- package/lib/assets/roboto-latin-ext-100-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-ext-300-normal.woff +0 -0
- package/lib/assets/roboto-latin-ext-300-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-ext-400-normal.woff +0 -0
- package/lib/assets/roboto-latin-ext-400-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-ext-500-normal.woff +0 -0
- package/lib/assets/roboto-latin-ext-500-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-ext-700-normal.woff +0 -0
- package/lib/assets/roboto-latin-ext-700-normal.woff2 +0 -0
- package/lib/assets/roboto-latin-ext-900-normal.woff +0 -0
- package/lib/assets/roboto-latin-ext-900-normal.woff2 +0 -0
- package/lib/assets/roboto-vietnamese-100-normal.woff +0 -0
- package/lib/assets/roboto-vietnamese-100-normal.woff2 +0 -0
- package/lib/assets/roboto-vietnamese-300-normal.woff +0 -0
- package/lib/assets/roboto-vietnamese-300-normal.woff2 +0 -0
- package/lib/assets/roboto-vietnamese-400-normal.woff +0 -0
- package/lib/assets/roboto-vietnamese-400-normal.woff2 +0 -0
- package/lib/assets/roboto-vietnamese-500-normal.woff +0 -0
- package/lib/assets/roboto-vietnamese-500-normal.woff2 +0 -0
- package/lib/assets/roboto-vietnamese-700-normal.woff +0 -0
- package/lib/assets/roboto-vietnamese-700-normal.woff2 +0 -0
- package/lib/assets/roboto-vietnamese-900-normal.woff +0 -0
- package/lib/assets/roboto-vietnamese-900-normal.woff2 +0 -0
- package/lib/assets/types/select.item.type.js +1 -0
- package/lib/assets/ui/Icon.ui.js +1 -0
- package/lib/assets/ui/IconButton.ui.js +1 -0
- package/lib/assets/ui/Textbox.ui.js +1 -0
- package/lib/assets/ui/accordion.ui.js +1 -0
- package/lib/assets/ui/button.ui.js +1 -0
- package/lib/assets/ui/buttonColor.ui.js +1 -0
- package/lib/assets/ui/buttonmenu.ui.js +1 -0
- package/lib/assets/ui/buttonstack.ui.js +1 -0
- package/lib/assets/ui/checkbox.ui.js +1 -0
- package/lib/assets/ui/container.ui.js +1 -0
- package/lib/assets/ui/datagrid.ui.js +1 -0
- package/lib/assets/ui/dialog.js +1 -0
- package/lib/assets/ui/draggable.ui.js +1 -0
- package/lib/assets/ui/hpanel.ui.js +1 -0
- package/lib/assets/ui/iconButtonMenu.ui.js +1 -0
- package/lib/assets/ui/image.ui.js +1 -0
- package/lib/assets/ui/label.ui.js +1 -0
- package/lib/assets/ui/loading.ui.js +1 -0
- package/lib/assets/ui/menu.ui.js +1 -0
- package/lib/assets/ui/progressbar.ui.js +1 -0
- package/lib/assets/ui/radiobutton.ui.js +1 -0
- package/lib/assets/ui/scroll.ui.js +1 -0
- package/lib/assets/ui/select.ui.js +1 -0
- package/lib/assets/ui/styles/accordion.css +1 -0
- package/lib/assets/ui/styles/button.css +1 -0
- package/lib/assets/ui/styles/buttoncolor.css +1 -0
- package/lib/assets/ui/styles/container.css +1 -0
- package/lib/assets/ui/styles/datagrid.css +1 -0
- package/lib/assets/ui/styles/dialog.css +1 -0
- package/lib/assets/ui/styles/draggable.css +1 -0
- package/lib/assets/ui/styles/hpanel.css +1 -0
- package/lib/assets/ui/styles/icon.css +1 -0
- package/lib/assets/ui/styles/image.css +1 -0
- package/lib/assets/ui/styles/label.css +1 -0
- package/lib/assets/ui/styles/loading.css +1 -0
- package/lib/assets/ui/styles/main.css +1 -0
- package/lib/assets/ui/styles/menu.css +1 -0
- package/lib/assets/ui/styles/progressbar.css +1 -0
- package/lib/assets/ui/styles/scroll.css +1 -0
- package/lib/assets/ui/styles/select.css +1 -0
- package/lib/assets/ui/styles/stackbutton.css +1 -0
- package/lib/assets/ui/styles/tabs.css +1 -0
- package/lib/assets/ui/styles/textarea.css +1 -0
- package/lib/assets/ui/styles/textbox.css +1 -0
- package/lib/assets/ui/styles/toolbar.css +1 -0
- package/lib/assets/ui/styles/valuebar.css +1 -0
- package/lib/assets/ui/styles/vpanel.css +1 -0
- package/lib/assets/ui/styles/vstackbutton.css +1 -0
- package/lib/assets/ui/switch.ui.js +1 -0
- package/lib/assets/ui/tabs.ui.js +1 -0
- package/lib/assets/ui/textarea.ui.js +1 -0
- package/lib/assets/ui/toggle.ui.js +1 -0
- package/lib/assets/ui/toolbar.ui.js +1 -0
- package/lib/assets/ui/valuebar.ui.js +1 -0
- package/lib/assets/ui/vpanel.ui.js +1 -0
- package/lib/assets/ui/widget.builder.js +1 -0
- package/lib/assets/ui/widget.collection.js +1 -0
- package/lib/assets/ui/widget.ui.js +1 -0
- package/lib/cedro-logo.png +0 -0
- package/lib/cedro-logo.svg +97 -0
- package/lib/fangio.jpg +0 -0
- package/lib/material-icons-list.json/357/200/272Zone.Identifier +3 -0
- package/package.json +10 -4
- package/rollup.config.js +31 -0
- package/tsconfig.json +3 -0
- package/tsconfig.publish.json +3 -0
- package/vite.publish.config.ts +41 -0
- package/lib/core/application.builder.d.ts +0 -2
- package/lib/core/application.builder.jsx +0 -103
- package/lib/core/application.builder.jsx.map +0 -1
- package/lib/core/application.core.d.ts +0 -96
- package/lib/core/application.core.jsx +0 -290
- package/lib/core/application.core.jsx.map +0 -1
- package/lib/core/index.d.ts +0 -3
- package/lib/core/index.js +0 -4
- package/lib/core/index.js.map +0 -1
- package/lib/core/jsxsupport.d.ts +0 -13
- package/lib/core/jsxsupport.js +0 -82
- package/lib/core/jsxsupport.js.map +0 -1
- package/lib/core/screeen.core.d.ts +0 -41
- package/lib/core/screeen.core.js +0 -76
- package/lib/core/screeen.core.js.map +0 -1
- package/lib/core/seo.d.ts +0 -33
- package/lib/core/seo.js +0 -66
- package/lib/core/seo.js.map +0 -1
- package/lib/core/themes.core.d.ts +0 -22
- package/lib/core/themes.core.js +0 -317
- package/lib/core/themes.core.js.map +0 -1
- package/lib/core/uid.d.ts +0 -1
- package/lib/core/uid.js +0 -4
- package/lib/core/uid.js.map +0 -1
- package/lib/index.d.ts +0 -5
- package/lib/index.js +0 -8
- package/lib/index.js.map +0 -1
- package/lib/interfaces/application.interface.d.ts +0 -39
- package/lib/interfaces/application.interface.js +0 -6
- package/lib/interfaces/application.interface.js.map +0 -1
- package/lib/interfaces/screen.interface.d.ts +0 -12
- package/lib/interfaces/screen.interface.js +0 -2
- package/lib/interfaces/screen.interface.js.map +0 -1
- package/lib/interfaces/themes.interface.d.ts +0 -15
- package/lib/interfaces/themes.interface.js +0 -2
- package/lib/interfaces/themes.interface.js.map +0 -1
- package/lib/interfaces/widget.interface.d.ts +0 -85
- package/lib/interfaces/widget.interface.js +0 -2
- package/lib/interfaces/widget.interface.js.map +0 -1
- package/lib/types/orientation.type.d.ts +0 -1
- package/lib/types/orientation.type.js +0 -2
- package/lib/types/orientation.type.js.map +0 -1
- package/lib/types/select.item.type.d.ts +0 -6
- package/lib/types/select.item.type.js +0 -26
- package/lib/types/select.item.type.js.map +0 -1
- package/lib/types/vector2d.type.d.ts +0 -4
- package/lib/types/vector2d.type.js +0 -2
- package/lib/types/vector2d.type.js.map +0 -1
- package/lib/ui/Icon.ui.d.ts +0 -31
- package/lib/ui/Icon.ui.jsx +0 -121
- package/lib/ui/Icon.ui.jsx.map +0 -1
- package/lib/ui/IconButton.ui.d.ts +0 -32
- package/lib/ui/IconButton.ui.jsx +0 -184
- package/lib/ui/IconButton.ui.jsx.map +0 -1
- package/lib/ui/Textbox.ui.d.ts +0 -32
- package/lib/ui/Textbox.ui.jsx +0 -152
- package/lib/ui/Textbox.ui.jsx.map +0 -1
- package/lib/ui/accordion.ui.d.ts +0 -27
- package/lib/ui/accordion.ui.jsx +0 -108
- package/lib/ui/accordion.ui.jsx.map +0 -1
- package/lib/ui/button.ui.d.ts +0 -44
- package/lib/ui/button.ui.jsx +0 -180
- package/lib/ui/button.ui.jsx.map +0 -1
- package/lib/ui/buttonColor.ui.d.ts +0 -14
- package/lib/ui/buttonColor.ui.jsx +0 -58
- package/lib/ui/buttonColor.ui.jsx.map +0 -1
- package/lib/ui/buttonmenu.ui.d.ts +0 -23
- package/lib/ui/buttonmenu.ui.jsx +0 -104
- package/lib/ui/buttonmenu.ui.jsx.map +0 -1
- package/lib/ui/buttonstack.ui.d.ts +0 -26
- package/lib/ui/buttonstack.ui.jsx +0 -138
- package/lib/ui/buttonstack.ui.jsx.map +0 -1
- package/lib/ui/checkbox.ui.d.ts +0 -12
- package/lib/ui/checkbox.ui.jsx +0 -29
- package/lib/ui/checkbox.ui.jsx.map +0 -1
- package/lib/ui/colors.ui.d.ts +0 -1
- package/lib/ui/colors.ui.js +0 -2
- package/lib/ui/colors.ui.js.map +0 -1
- package/lib/ui/container.ui.d.ts +0 -33
- package/lib/ui/container.ui.jsx +0 -96
- package/lib/ui/container.ui.jsx.map +0 -1
- package/lib/ui/datagrid.ui.d.ts +0 -119
- package/lib/ui/datagrid.ui.jsx +0 -445
- package/lib/ui/datagrid.ui.jsx.map +0 -1
- package/lib/ui/dialog.d.ts +0 -102
- package/lib/ui/dialog.jsx +0 -480
- package/lib/ui/dialog.jsx.map +0 -1
- package/lib/ui/draggable.ui.d.ts +0 -27
- package/lib/ui/draggable.ui.js +0 -183
- package/lib/ui/draggable.ui.js.map +0 -1
- package/lib/ui/hpanel.ui.d.ts +0 -26
- package/lib/ui/hpanel.ui.jsx +0 -183
- package/lib/ui/hpanel.ui.jsx.map +0 -1
- package/lib/ui/iconButtonMenu.ui.d.ts +0 -27
- package/lib/ui/iconButtonMenu.ui.jsx +0 -135
- package/lib/ui/iconButtonMenu.ui.jsx.map +0 -1
- package/lib/ui/image.ui.d.ts +0 -25
- package/lib/ui/image.ui.jsx +0 -88
- package/lib/ui/image.ui.jsx.map +0 -1
- package/lib/ui/index.d.ts +0 -30
- package/lib/ui/index.js +0 -30
- package/lib/ui/index.js.map +0 -1
- package/lib/ui/label.ui.d.ts +0 -37
- package/lib/ui/label.ui.jsx +0 -155
- package/lib/ui/label.ui.jsx.map +0 -1
- package/lib/ui/loading.ui.d.ts +0 -5
- package/lib/ui/loading.ui.js +0 -10
- package/lib/ui/loading.ui.js.map +0 -1
- package/lib/ui/menu.ui.d.ts +0 -19
- package/lib/ui/menu.ui.js +0 -186
- package/lib/ui/menu.ui.js.map +0 -1
- package/lib/ui/progressbar.ui.d.ts +0 -23
- package/lib/ui/progressbar.ui.jsx +0 -109
- package/lib/ui/progressbar.ui.jsx.map +0 -1
- package/lib/ui/radiobutton.ui.d.ts +0 -12
- package/lib/ui/radiobutton.ui.jsx +0 -29
- package/lib/ui/radiobutton.ui.jsx.map +0 -1
- package/lib/ui/scroll.ui.d.ts +0 -13
- package/lib/ui/scroll.ui.js +0 -163
- package/lib/ui/scroll.ui.js.map +0 -1
- package/lib/ui/select.ui.d.ts +0 -29
- package/lib/ui/select.ui.jsx +0 -129
- package/lib/ui/select.ui.jsx.map +0 -1
- package/lib/ui/switch.ui.d.ts +0 -12
- package/lib/ui/switch.ui.jsx +0 -29
- package/lib/ui/switch.ui.jsx.map +0 -1
- package/lib/ui/tabs.ui.d.ts +0 -40
- package/lib/ui/tabs.ui.jsx +0 -242
- package/lib/ui/tabs.ui.jsx.map +0 -1
- package/lib/ui/textarea.ui.d.ts +0 -13
- package/lib/ui/textarea.ui.jsx +0 -34
- package/lib/ui/textarea.ui.jsx.map +0 -1
- package/lib/ui/toggle.ui.d.ts +0 -11
- package/lib/ui/toggle.ui.jsx +0 -48
- package/lib/ui/toggle.ui.jsx.map +0 -1
- package/lib/ui/toolbar.ui.d.ts +0 -44
- package/lib/ui/toolbar.ui.jsx +0 -261
- package/lib/ui/toolbar.ui.jsx.map +0 -1
- package/lib/ui/valuebar.ui.d.ts +0 -23
- package/lib/ui/valuebar.ui.jsx +0 -144
- package/lib/ui/valuebar.ui.jsx.map +0 -1
- package/lib/ui/vpanel.ui.d.ts +0 -24
- package/lib/ui/vpanel.ui.jsx +0 -170
- package/lib/ui/vpanel.ui.jsx.map +0 -1
- package/lib/ui/widget.builder.d.ts +0 -25
- package/lib/ui/widget.builder.js +0 -216
- package/lib/ui/widget.builder.js.map +0 -1
- package/lib/ui/widget.collection.d.ts +0 -20
- package/lib/ui/widget.collection.js +0 -49
- package/lib/ui/widget.collection.js.map +0 -1
- package/lib/ui/widget.ui.d.ts +0 -337
- package/lib/ui/widget.ui.js +0 -964
- package/lib/ui/widget.ui.js.map +0 -1
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { IconButton } from "./IconButton.ui";
|
|
2
|
-
import { connectWidgetCallback, getOnlyEventProps, Widget, WidgetAlignTypes, WidgetTypes, } from "./widget.ui";
|
|
3
|
-
import { createWidget, normalizeWidget } from "./widget.builder";
|
|
4
|
-
import { UID } from "../core/uid";
|
|
5
|
-
export class ButtonStack extends Widget {
|
|
6
|
-
constructor(id, orientation = "horizontal", parent = null) {
|
|
7
|
-
super(id, "div", parent);
|
|
8
|
-
Object.defineProperty(this, "orientation", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
configurable: true,
|
|
11
|
-
writable: true,
|
|
12
|
-
value: void 0
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(this, "buttons", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
configurable: true,
|
|
17
|
-
writable: true,
|
|
18
|
-
value: void 0
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(this, "activeButton", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
configurable: true,
|
|
23
|
-
writable: true,
|
|
24
|
-
value: void 0
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(this, "centeredButtons", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true,
|
|
30
|
-
value: void 0
|
|
31
|
-
});
|
|
32
|
-
this.centeredButtons = false;
|
|
33
|
-
this.orientation = orientation;
|
|
34
|
-
if (this.orientation === "horizontal") {
|
|
35
|
-
this.setAlign(WidgetAlignTypes.HORIZONTAL);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.setAlign(WidgetAlignTypes.VERTICAL);
|
|
39
|
-
}
|
|
40
|
-
this.activeButton = null;
|
|
41
|
-
this.buttons = new Map();
|
|
42
|
-
}
|
|
43
|
-
setActive(buttonId) {
|
|
44
|
-
this.activeButton = buttonId;
|
|
45
|
-
this.configureStyles();
|
|
46
|
-
}
|
|
47
|
-
configureStyles() {
|
|
48
|
-
const buttonsList = Array.from(this.buttons.entries());
|
|
49
|
-
for (let i = 0; i < buttonsList.length; i++) {
|
|
50
|
-
const [_key, button] = buttonsList[i];
|
|
51
|
-
button.deleteAllClasses();
|
|
52
|
-
if (this.thereIsOnlyOneButton()) {
|
|
53
|
-
this.setButtonVariant(button, "outlined");
|
|
54
|
-
}
|
|
55
|
-
else if (this.thereAreTwoButtons()) {
|
|
56
|
-
if (i === 0) {
|
|
57
|
-
this.setButtonVariant(button, "stack-start");
|
|
58
|
-
}
|
|
59
|
-
else if (i === 1) {
|
|
60
|
-
this.setButtonVariant(button, "stack-end");
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
else if (this.thereAreMoreThanTwoButtons()) {
|
|
64
|
-
if (i === 0) {
|
|
65
|
-
this.setButtonVariant(button, "stack-start");
|
|
66
|
-
}
|
|
67
|
-
else if (i === buttonsList.length - 1) {
|
|
68
|
-
this.setButtonVariant(button, "stack-end");
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
this.setButtonVariant(button, "stack-middle");
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
setButtonVariant(button, variant) {
|
|
77
|
-
let fixedVariant = variant;
|
|
78
|
-
if (this.orientation === "vertical") {
|
|
79
|
-
fixedVariant = fixedVariant.replace("stack", "stack-vertical");
|
|
80
|
-
}
|
|
81
|
-
if (button.id === this.activeButton) {
|
|
82
|
-
button.setVariant((fixedVariant + "-active"));
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
button.setVariant(fixedVariant);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
addButton(button) {
|
|
89
|
-
this.buttons.set(button.id, button);
|
|
90
|
-
if (button instanceof IconButton && this.centeredButtons) {
|
|
91
|
-
button.setCenterX(true);
|
|
92
|
-
}
|
|
93
|
-
button.setType(WidgetTypes.FILL);
|
|
94
|
-
button.subscribe({ event: "click", then: () => this.setActive(button.id) });
|
|
95
|
-
this.addChild(button);
|
|
96
|
-
this.configureStyles();
|
|
97
|
-
}
|
|
98
|
-
thereIsOnlyOneButton() {
|
|
99
|
-
return this.buttons.size === 1;
|
|
100
|
-
}
|
|
101
|
-
thereAreTwoButtons() {
|
|
102
|
-
return this.buttons.size === 2;
|
|
103
|
-
}
|
|
104
|
-
thereAreMoreThanTwoButtons() {
|
|
105
|
-
return this.buttons.size > 2;
|
|
106
|
-
}
|
|
107
|
-
setCenteredButtons(centeredButtons) {
|
|
108
|
-
this.centeredButtons = centeredButtons;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
export const WButtonStack = (props) => {
|
|
112
|
-
if (!props.id) {
|
|
113
|
-
props.id = "ButtonStack." + UID();
|
|
114
|
-
}
|
|
115
|
-
connectWidgetCallback(props.id, getOnlyEventProps(props));
|
|
116
|
-
return normalizeWidget(<div id={props.id} w-button-stack w-centerX={props.centerX}>
|
|
117
|
-
{props.children}
|
|
118
|
-
</div>, props);
|
|
119
|
-
};
|
|
120
|
-
export function createButtonStack(id, content, parent = null) {
|
|
121
|
-
const dataOrientation = content.getAttribute("w-orientation")
|
|
122
|
-
? content.getAttribute("w-orientation")
|
|
123
|
-
: "vertical";
|
|
124
|
-
let newStack = new ButtonStack(id, dataOrientation, parent);
|
|
125
|
-
if (content.getAttribute("w-centerX")) {
|
|
126
|
-
newStack.setCenteredButtons(true);
|
|
127
|
-
}
|
|
128
|
-
content.childNodes.forEach((item, _index) => {
|
|
129
|
-
if (item.getAttribute("w-button") || item.getAttribute("w-icon-button")) {
|
|
130
|
-
const widget = createWidget(item);
|
|
131
|
-
if (widget !== null) {
|
|
132
|
-
newStack.addButton(widget);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
return newStack;
|
|
137
|
-
}
|
|
138
|
-
//# sourceMappingURL=buttonstack.ui.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buttonstack.ui.jsx","sourceRoot":"","sources":["../../src/ui/buttonstack.ui.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,OAAO,EACH,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,WAAW,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAe,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC,MAAM,OAAO,WAAY,SAAQ,MAAM;IAKnC,YACI,EAAU,EACV,cAAgC,YAAY,EAC5C,SAAwB,IAAI;QAE5B,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAT7B;;;;;WAA8B;QAC9B;;;;;WAA0C;QAC1C;;;;;WAA4B;QAC5B;;;;;WAAyB;QAQrB,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAE7B,IAAI,CAAC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AC,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC;QACvC,CAAC,CAAC,UAAU,CAAC;IAEjB,IAAI,QAAQ,GAAG,IAAI,WAAW,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;IAE5D,IAAI,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;QACpC,QAAQ,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAiB,EAAE,MAAc,EAAE,EAAE;QAC7D,IAAI,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC;YACtE,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAW,CAAC;YAE5C,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;gBAClB,QAAQ,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAC/B,CAAC;QACL,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,QAAQ,CAAC;AACpB,CAAC"}
|
package/lib/ui/checkbox.ui.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ToggleButton } from "./toggle.ui";
|
|
2
|
-
import { WidgetProps } from "./widget.builder";
|
|
3
|
-
import { Widget } from "./widget.ui";
|
|
4
|
-
export declare class Checkbox extends ToggleButton {
|
|
5
|
-
constructor(id: string, text?: string, parent?: Widget | null);
|
|
6
|
-
}
|
|
7
|
-
export type wCheckboxProps = WidgetProps & {
|
|
8
|
-
text: string;
|
|
9
|
-
checked?: boolean | null;
|
|
10
|
-
};
|
|
11
|
-
export declare const WCheckbox: (props: wCheckboxProps) => any;
|
|
12
|
-
export declare function createCheckbox(id: string, content: any, parent?: Widget | null): Checkbox;
|
package/lib/ui/checkbox.ui.jsx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { UID } from "../core/uid";
|
|
2
|
-
import { ToggleButton } from "./toggle.ui";
|
|
3
|
-
import { normalizeWidget } from "./widget.builder";
|
|
4
|
-
import { connectWidgetCallback, getOnlyEventProps } from "./widget.ui";
|
|
5
|
-
export class Checkbox extends ToggleButton {
|
|
6
|
-
constructor(id, text = "", parent = null) {
|
|
7
|
-
super(id, text, "check_box_outlined", "check_box_outline_blank", parent);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
export const WCheckbox = (props) => {
|
|
11
|
-
if (!props.id) {
|
|
12
|
-
props.id = "Checkbox." + UID();
|
|
13
|
-
}
|
|
14
|
-
connectWidgetCallback(props.id, getOnlyEventProps(props));
|
|
15
|
-
return normalizeWidget(<div id={props.id} w-checkbox w-text={props.text} w-checked={props.checked}/>, props);
|
|
16
|
-
};
|
|
17
|
-
export function createCheckbox(id, content, parent = null) {
|
|
18
|
-
const dataText = content.getAttribute("w-text");
|
|
19
|
-
const dataChecked = content.getAttribute("w-checked");
|
|
20
|
-
let newCheckbox = new Checkbox(id, dataText, parent);
|
|
21
|
-
if (dataChecked !== null) {
|
|
22
|
-
newCheckbox.setState(true);
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
newCheckbox.setState(false);
|
|
26
|
-
}
|
|
27
|
-
return newCheckbox;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=checkbox.ui.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.ui.jsx","sourceRoot":"","sources":["../../src/ui/checkbox.ui.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAe,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAU,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE/E,MAAM,OAAO,QAAS,SAAQ,YAAY;IACtC,YAAY,EAAU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ary" | "secondary" | "success" | "error" | "info" | "warning";
|
package/lib/ui/colors.ui.js
DELETED
package/lib/ui/colors.ui.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors.ui.js","sourceRoot":"","sources":["../../src/ui/colors.ui.ts"],"names":[],"mappings":""}
|
package/lib/ui/container.ui.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import "./styles/container.css";
|
|
2
|
-
import { OrientationTypes } from "../types/orientation.type";
|
|
3
|
-
import { Widget } from "./widget.ui";
|
|
4
|
-
import { WidgetProps } from "./widget.builder";
|
|
5
|
-
import { Scroll } from "./scroll.ui";
|
|
6
|
-
export type ContainerVariants = "plain" | "contained" | "outlined";
|
|
7
|
-
export type ContainerParams = {
|
|
8
|
-
orientation?: OrientationTypes;
|
|
9
|
-
parent?: Widget | null;
|
|
10
|
-
size?: number | null;
|
|
11
|
-
padding?: number | null;
|
|
12
|
-
variant?: ContainerVariants | null;
|
|
13
|
-
id?: string;
|
|
14
|
-
};
|
|
15
|
-
export declare class Container extends Widget {
|
|
16
|
-
variant: ContainerVariants;
|
|
17
|
-
verticalScrollbar: Scroll | null;
|
|
18
|
-
constructor(params: ContainerParams);
|
|
19
|
-
setVerticalScrollbar(): void;
|
|
20
|
-
setVariant(variant: ContainerVariants): void;
|
|
21
|
-
free(): void;
|
|
22
|
-
}
|
|
23
|
-
export declare function Spacer(): Container;
|
|
24
|
-
export type ContainerProps = WidgetProps & {
|
|
25
|
-
variant?: ContainerVariants | null;
|
|
26
|
-
scrollY?: boolean | null;
|
|
27
|
-
children?: any;
|
|
28
|
-
};
|
|
29
|
-
export declare const WContainer: (props: Omit<ContainerProps, "id"> & {
|
|
30
|
-
id?: string;
|
|
31
|
-
}) => any;
|
|
32
|
-
export declare const WSpacer: (props: Omit<ContainerProps, "id">) => any;
|
|
33
|
-
export declare function createContainer(content: any, parent?: Widget | null): Container;
|
package/lib/ui/container.ui.jsx
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import "./styles/container.css";
|
|
2
|
-
import { connectWidgetCallback, getOnlyEventProps, Widget, WidgetAlignTypes, WidgetTypes, } from "./widget.ui";
|
|
3
|
-
import { UID } from "../core/uid";
|
|
4
|
-
import { createWidget, normalizeWidget } from "./widget.builder";
|
|
5
|
-
import { Scroll } from "./scroll.ui";
|
|
6
|
-
export class Container extends Widget {
|
|
7
|
-
constructor(params) {
|
|
8
|
-
const { id = "", orientation = "horizontal", parent = null, size = null, padding = null, variant = null, } = params;
|
|
9
|
-
super(id.length > 0 ? id : UID(), "div", parent);
|
|
10
|
-
Object.defineProperty(this, "variant", {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true,
|
|
14
|
-
value: "plain"
|
|
15
|
-
});
|
|
16
|
-
Object.defineProperty(this, "verticalScrollbar", {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
configurable: true,
|
|
19
|
-
writable: true,
|
|
20
|
-
value: void 0
|
|
21
|
-
});
|
|
22
|
-
this.verticalScrollbar = null;
|
|
23
|
-
if (orientation === "horizontal") {
|
|
24
|
-
this.setAlign(WidgetAlignTypes.HORIZONTAL);
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
this.setAlign(WidgetAlignTypes.VERTICAL);
|
|
28
|
-
}
|
|
29
|
-
if (size !== null) {
|
|
30
|
-
this.setFixedSize(size);
|
|
31
|
-
}
|
|
32
|
-
if (padding !== null) {
|
|
33
|
-
this.setPadding(padding);
|
|
34
|
-
}
|
|
35
|
-
if (variant !== null) {
|
|
36
|
-
this.setVariant(variant);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
this.setVariant("plain");
|
|
40
|
-
}
|
|
41
|
-
this.setType(WidgetTypes.FILL);
|
|
42
|
-
}
|
|
43
|
-
setVerticalScrollbar() {
|
|
44
|
-
this.verticalScrollbar = new Scroll(this.id + ".VerticalScrollbar", this);
|
|
45
|
-
}
|
|
46
|
-
setVariant(variant) {
|
|
47
|
-
if (this.variant !== variant) {
|
|
48
|
-
this.deleteClass("WUIPanel-" + this.variant);
|
|
49
|
-
}
|
|
50
|
-
this.variant = variant;
|
|
51
|
-
this.addClass("WUIPanel-" + variant);
|
|
52
|
-
}
|
|
53
|
-
free() {
|
|
54
|
-
super.free();
|
|
55
|
-
if (this.verticalScrollbar)
|
|
56
|
-
this.verticalScrollbar.free();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
export function Spacer() {
|
|
60
|
-
return new Container({});
|
|
61
|
-
}
|
|
62
|
-
export const WContainer = (props) => {
|
|
63
|
-
if (!props.id) {
|
|
64
|
-
props.id = "Container." + UID();
|
|
65
|
-
}
|
|
66
|
-
connectWidgetCallback(props.id, getOnlyEventProps(props));
|
|
67
|
-
return normalizeWidget(<div id={props.id} w-container w-variant={props.variant} w-scroll-y={props.scrollY}>
|
|
68
|
-
{props.children}
|
|
69
|
-
</div>, props);
|
|
70
|
-
};
|
|
71
|
-
export const WSpacer = (props) => {
|
|
72
|
-
return normalizeWidget(<div w-container>{props.children}</div>, { id: UID(), ...props });
|
|
73
|
-
};
|
|
74
|
-
export function createContainer(content, parent = null) {
|
|
75
|
-
const dataOrientation = content.getAttribute("w-orientation");
|
|
76
|
-
const dataVariant = content.getAttribute("w-variant");
|
|
77
|
-
const dataScrollY = content.getAttribute("w-scroll-y");
|
|
78
|
-
const dataId = content.getAttribute("id") || UID();
|
|
79
|
-
let orientation = dataOrientation ? dataOrientation : "horizontal";
|
|
80
|
-
let variant = dataVariant ? dataVariant : "plain";
|
|
81
|
-
let newContainer = new Container({ id: dataId, orientation, parent, variant });
|
|
82
|
-
if (dataScrollY) {
|
|
83
|
-
newContainer.setVerticalScrollbar();
|
|
84
|
-
}
|
|
85
|
-
content.childNodes.forEach((item) => {
|
|
86
|
-
const widget = createWidget(item);
|
|
87
|
-
if (widget !== null) {
|
|
88
|
-
newContainer.addChild(widget);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
if (parent) {
|
|
92
|
-
parent.addChild(newContainer);
|
|
93
|
-
}
|
|
94
|
-
return newContainer;
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=container.ui.jsx.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"container.ui.jsx","sourceRoot":"","sources":["../../src/ui/container.ui.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAEhC,OAAO,EACH,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,WAAW,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAe,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAarC,MAAM,OAAO,SAAU,SAAQ,MAAM;IAGjC,YAAY,MAAuB;QAC/B,MAAM,EACF,EAAE,GAAG,EAAE,EACP,WAAW,GAAG,YAAY,EAC1B,MAAM,GAAG,IAAI,EACb,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,IAAI,EACd,OAAO,GAAG,IAAI,GACjB,GAAG,MAAM,CAAC;QAEX,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAZrD;;;;mBAA6B,OAAO;WAAC;QACrC;;;;;WAAiC;QAa7B,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;QAE9B,IAAI,WAAW,KAAK,YAAY,EAAE,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC7C,CAAC;QAED,IAAI,IAAI,KAAK,IA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,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAE/E,IAAI,WAAW,EAAE,CAAC;QACd,YAAY,CAAC,oBAAoB,EAAE,CAAC;IACxC,CAAC;IAED,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAiB,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;QAElC,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;YAClB,YAAY,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAClC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAI,MAAM,EAAE,CAAC;QACT,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,YAAY,CAAC;AACxB,CAAC"}
|
package/lib/ui/datagrid.ui.d.ts
DELETED
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import "./styles/datagrid.css";
|
|
2
|
-
import { Label } from "./label.ui";
|
|
3
|
-
import { Widget } from "./widget.ui";
|
|
4
|
-
import { Scroll } from "./scroll.ui";
|
|
5
|
-
import { WidgetEventProps, WidgetProps } from "./widget.builder";
|
|
6
|
-
type DataGridColumn = {
|
|
7
|
-
header: string;
|
|
8
|
-
width: number | null;
|
|
9
|
-
handler: (args: any) => void;
|
|
10
|
-
};
|
|
11
|
-
export declare class DataGrid extends Widget {
|
|
12
|
-
headerContainer: Widget;
|
|
13
|
-
dataContainer: Widget;
|
|
14
|
-
footerContainer: Widget;
|
|
15
|
-
data: Array<any>;
|
|
16
|
-
verticalScrollbar: Scroll;
|
|
17
|
-
horizontalScrollbar: Scroll;
|
|
18
|
-
rowHeight: number;
|
|
19
|
-
columns: Array<DataGridColumn>;
|
|
20
|
-
/**
|
|
21
|
-
* Initializes a new instance of the DataGrid class.
|
|
22
|
-
*
|
|
23
|
-
* @param {string} id - The unique identifier for the DataGrid instance.
|
|
24
|
-
* @param {Widget|null} parent - The parent widget of the DataGrid instance.
|
|
25
|
-
* @return {void}
|
|
26
|
-
*/
|
|
27
|
-
constructor(id: string, parent?: Widget | null);
|
|
28
|
-
hideFooter(): void;
|
|
29
|
-
showFooter(): void;
|
|
30
|
-
/**
|
|
31
|
-
* Calculates the free width available in the data grid.
|
|
32
|
-
*
|
|
33
|
-
* The free width is calculated by subtracting the total width of all columns from the width of the data container.
|
|
34
|
-
* If the calculated free width is less than the minimum allowed column width, it is set to the minimum allowed column width.
|
|
35
|
-
*
|
|
36
|
-
* @return {number} The free width available in the data grid.
|
|
37
|
-
*/
|
|
38
|
-
private getFreeWidth;
|
|
39
|
-
/**
|
|
40
|
-
* Calculates the total width of all columns in the data grid.
|
|
41
|
-
*
|
|
42
|
-
* @return {number} The total width of all columns.
|
|
43
|
-
*/
|
|
44
|
-
private getAllColumnsWidth;
|
|
45
|
-
init(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Creates the headers for the data grid based on the provided columns.
|
|
48
|
-
*
|
|
49
|
-
* If no columns are provided, the function will return immediately.
|
|
50
|
-
*
|
|
51
|
-
* @return {void}
|
|
52
|
-
*/
|
|
53
|
-
private createHeaders;
|
|
54
|
-
/**
|
|
55
|
-
* Renders the headers of the data grid based on the provided columns.
|
|
56
|
-
*
|
|
57
|
-
* If no columns are provided, the function will return immediately.
|
|
58
|
-
*
|
|
59
|
-
* The headers are rendered as custom labels with their positions and sizes
|
|
60
|
-
* calculated based on the column widths and the scroll position of the data container.
|
|
61
|
-
*
|
|
62
|
-
* @return {void}
|
|
63
|
-
*/
|
|
64
|
-
private renderHeaders;
|
|
65
|
-
/**
|
|
66
|
-
* Builds the rows of the data grid based on the provided data and columns.
|
|
67
|
-
*
|
|
68
|
-
* This function iterates over the data and creates a new row widget for each item.
|
|
69
|
-
* It then iterates over the columns and calls the column handler to render the cell content.
|
|
70
|
-
* The row and column widgets are positioned absolutely and added to the data container.
|
|
71
|
-
*
|
|
72
|
-
* @return {void}
|
|
73
|
-
*/
|
|
74
|
-
private buildRows;
|
|
75
|
-
/**
|
|
76
|
-
* Renders the rows of the data grid.
|
|
77
|
-
*
|
|
78
|
-
* This function iterates over the data and columns, positioning and sizing each row and column widget accordingly.
|
|
79
|
-
*
|
|
80
|
-
* @return {void}
|
|
81
|
-
*/
|
|
82
|
-
private renderRows;
|
|
83
|
-
/**
|
|
84
|
-
* Releases all resources held by this data grid.
|
|
85
|
-
*
|
|
86
|
-
* This function iterates over all rows in the data grid and calls the free method on each row widget.
|
|
87
|
-
* It then calls the free method on the superclass to release any additional resources.
|
|
88
|
-
*
|
|
89
|
-
* @return {void}
|
|
90
|
-
*/
|
|
91
|
-
free(): void;
|
|
92
|
-
/**
|
|
93
|
-
* Renders the data grid by calling the superclass's render method and then rendering the headers, rows, and scrollbars.
|
|
94
|
-
*
|
|
95
|
-
* @return {void}
|
|
96
|
-
*/
|
|
97
|
-
render(): void;
|
|
98
|
-
setRowHeight(rowHeight: number): void;
|
|
99
|
-
addColumn(header: string, width: number | null, handler: (args: any) => void): void;
|
|
100
|
-
getHeader(index: number): Label;
|
|
101
|
-
setData(data: Array<any>): void;
|
|
102
|
-
}
|
|
103
|
-
export type DataGridColumnType = "label" | "button" | "buttonmenu" | "iconbutton" | "textbox" | "select" | "checkbox" | "switch" | "image" | "icon" | "valuebar" | "progressbar";
|
|
104
|
-
export type WDataGridProps = Omit<WidgetProps, "orientation"> & {
|
|
105
|
-
data?: any;
|
|
106
|
-
rowHeight?: number | null;
|
|
107
|
-
children: any;
|
|
108
|
-
};
|
|
109
|
-
export type WDataGridColumnProps = WidgetEventProps & {
|
|
110
|
-
header?: string | null;
|
|
111
|
-
widgetType?: DataGridColumnType | null;
|
|
112
|
-
field?: string | null;
|
|
113
|
-
width?: number | null;
|
|
114
|
-
classNames?: string | null;
|
|
115
|
-
};
|
|
116
|
-
export declare const WDataGrid: (props: WDataGridProps) => any;
|
|
117
|
-
export declare const WDataGridColumn: (props: WDataGridColumnProps) => JSX.Element;
|
|
118
|
-
export declare function createDataGrid(id: string, content: any, parent?: Widget | null): DataGrid;
|
|
119
|
-
export {};
|