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
package/lib/ui/image.ui.jsx
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import { UID } from "../core/uid";
|
|
2
|
-
import "./styles/image.css";
|
|
3
|
-
import { normalizeWidget } from "./widget.builder";
|
|
4
|
-
import { Widget, WidgetTypes, connectWidgetCallback, getOnlyEventProps } from "./widget.ui";
|
|
5
|
-
import { decode } from "html-entities";
|
|
6
|
-
export class Image extends Widget {
|
|
7
|
-
constructor(id, src = "", parent = null) {
|
|
8
|
-
super(id, "div", parent);
|
|
9
|
-
Object.defineProperty(this, "imageContainer", {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true,
|
|
13
|
-
value: void 0
|
|
14
|
-
});
|
|
15
|
-
Object.defineProperty(this, "image", {
|
|
16
|
-
enumerable: true,
|
|
17
|
-
configurable: true,
|
|
18
|
-
writable: true,
|
|
19
|
-
value: void 0
|
|
20
|
-
});
|
|
21
|
-
this.imageContainer = new Widget(id + ".imageContainer", "div", this);
|
|
22
|
-
this.imageContainer.addClass("WUIImageContainer");
|
|
23
|
-
this.image = new Widget(id + ".image", "img", this.imageContainer);
|
|
24
|
-
this.image.setType(WidgetTypes.CUSTOM);
|
|
25
|
-
this.image.getBody().setAttribute("src", src);
|
|
26
|
-
}
|
|
27
|
-
render() {
|
|
28
|
-
super.render();
|
|
29
|
-
this.imageContainer.setX(0);
|
|
30
|
-
this.imageContainer.setY(0);
|
|
31
|
-
this.imageContainer.setWH(this.getW(), this.getH());
|
|
32
|
-
this.image.getBody().style.position = "relative";
|
|
33
|
-
const imageH = this.image.getH();
|
|
34
|
-
this.image.setX(0);
|
|
35
|
-
this.image.setY(this.getH() / 2 - imageH / 2);
|
|
36
|
-
}
|
|
37
|
-
fillWidth() {
|
|
38
|
-
this.image.addClass("WUIImageFillWidth");
|
|
39
|
-
}
|
|
40
|
-
fillHeight() {
|
|
41
|
-
this.image.addClass("WUIImageFillHeight");
|
|
42
|
-
}
|
|
43
|
-
setAlternateText(text) {
|
|
44
|
-
this.image.getBody().setAttribute("alt", text);
|
|
45
|
-
}
|
|
46
|
-
setImageUrl(url) {
|
|
47
|
-
this.image.getBody().setAttribute("src", url);
|
|
48
|
-
}
|
|
49
|
-
getImageUrl() {
|
|
50
|
-
return this.image.getBody().getAttribute("src");
|
|
51
|
-
}
|
|
52
|
-
getAlternateText() {
|
|
53
|
-
return this.image.getBody().getAttribute("alt");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
export const WImage = (props) => {
|
|
57
|
-
if (!props.id) {
|
|
58
|
-
props.id = "Image." + UID();
|
|
59
|
-
}
|
|
60
|
-
connectWidgetCallback(props.id, getOnlyEventProps(props));
|
|
61
|
-
return normalizeWidget(<div id={props.id} w-image w-src={props.src} w-alt={props.alt} w-fill-width={props.fillWidth} w-fill-height={props.fillHeight} w-width={props.width} w-height={props.height}></div>, props);
|
|
62
|
-
};
|
|
63
|
-
export function createImage(id, content, parent = null) {
|
|
64
|
-
const dataSrc = content.getAttribute("w-src");
|
|
65
|
-
const dataAlt = content.getAttribute("w-alt");
|
|
66
|
-
const dataFillWidth = content.getAttribute("w-fill-width");
|
|
67
|
-
const dataFillHeight = content.getAttribute("w-fill-height");
|
|
68
|
-
const dataWidth = content.getAttribute("w-width");
|
|
69
|
-
const dataHeight = content.getAttribute("w-height");
|
|
70
|
-
let newImage = new Image(id, decode(dataSrc), parent);
|
|
71
|
-
if (dataAlt) {
|
|
72
|
-
newImage.setAlternateText(dataAlt);
|
|
73
|
-
}
|
|
74
|
-
if (dataFillWidth) {
|
|
75
|
-
newImage.fillWidth();
|
|
76
|
-
}
|
|
77
|
-
if (dataFillHeight) {
|
|
78
|
-
newImage.fillHeight();
|
|
79
|
-
}
|
|
80
|
-
if (dataWidth) {
|
|
81
|
-
newImage.setInitialW(dataWidth);
|
|
82
|
-
}
|
|
83
|
-
if (dataHeight) {
|
|
84
|
-
newImage.setInitialH(dataHeight);
|
|
85
|
-
}
|
|
86
|
-
return newImage;
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=image.ui.jsx.map
|
package/lib/ui/image.ui.jsx.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image.ui.jsx","sourceRoot":"","sources":["../../src/ui/image.ui.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAe,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,OAAO,KAAM,SAAQ,MAAM;IAG7B,YAAY,EAAU,EAAE,MAAc,EAAE,EAAE,SAAwB,IAAI;QAClE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,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select } from "./select.ui";
|
|
4
|
-
import { Accordion } from "./accordion.ui";
|
|
5
|
-
import { Button } from "./button.ui";
|
|
6
|
-
import { ButtonColor } from "./buttonColor.ui";
|
|
7
|
-
import { ButtonMenu } from "./buttonmenu.ui";
|
|
8
|
-
import { ButtonStack } from "./buttonstack.ui";
|
|
9
|
-
import { IconButton } from "./IconButton.ui";
|
|
10
|
-
import { Checkbox } from "./checkbox.ui";
|
|
11
|
-
import { Container, Spacer, ContainerParams } from "./container.ui";
|
|
12
|
-
import { Dialog } from "./dialog";
|
|
13
|
-
import { HPanel } from "./hpanel.ui";
|
|
14
|
-
import { Icon } from "./Icon.ui";
|
|
15
|
-
import { Image } from "./image.ui";
|
|
16
|
-
import { Label } from "./label.ui";
|
|
17
|
-
import { Menu } from "./menu.ui";
|
|
18
|
-
import { ProgressBar } from "./progressbar.ui";
|
|
19
|
-
import { Switch } from "./switch.ui";
|
|
20
|
-
import { Tabs } from "./tabs.ui";
|
|
21
|
-
import { TextArea } from "./textarea.ui";
|
|
22
|
-
import { Toolbar } from "./toolbar.ui";
|
|
23
|
-
import { DataGrid } from "./datagrid.ui";
|
|
24
|
-
import { RadioButton } from "./radiobutton.ui";
|
|
25
|
-
import { ValueBar } from "./valuebar.ui";
|
|
26
|
-
import { VPanel } from "./vpanel.ui";
|
|
27
|
-
import { createWidget } from "./widget.builder";
|
|
28
|
-
import { IconButtonMenu } from "./iconButtonMenu.ui";
|
|
29
|
-
export type { ContainerParams };
|
|
30
|
-
export { Textbox, Accordion, Button, ButtonColor, ButtonMenu, ButtonStack, IconButton, IconButtonMenu, Checkbox, Container, Dialog, HPanel, Icon, Image, Label, Menu, ProgressBar, RadioButton, Select, Spacer, Switch, Tabs, TextArea, Toolbar, ValueBar, VPanel, DataGrid, Widget, WidgetAlignTypes, WidgetTypes, createWidget, };
|
package/lib/ui/index.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { WidgetAlignTypes, WidgetTypes, Widget } from "./widget.ui";
|
|
2
|
-
import { Textbox } from "./Textbox.ui";
|
|
3
|
-
import { Select } from "./select.ui";
|
|
4
|
-
import { Accordion } from "./accordion.ui";
|
|
5
|
-
import { Button } from "./button.ui";
|
|
6
|
-
import { ButtonColor } from "./buttonColor.ui";
|
|
7
|
-
import { ButtonMenu } from "./buttonmenu.ui";
|
|
8
|
-
import { ButtonStack } from "./buttonstack.ui";
|
|
9
|
-
import { IconButton } from "./IconButton.ui";
|
|
10
|
-
import { Checkbox } from "./checkbox.ui";
|
|
11
|
-
import { Container, Spacer } from "./container.ui";
|
|
12
|
-
import { Dialog } from "./dialog";
|
|
13
|
-
import { HPanel } from "./hpanel.ui";
|
|
14
|
-
import { Icon } from "./Icon.ui";
|
|
15
|
-
import { Image } from "./image.ui";
|
|
16
|
-
import { Label } from "./label.ui";
|
|
17
|
-
import { Menu } from "./menu.ui";
|
|
18
|
-
import { ProgressBar } from "./progressbar.ui";
|
|
19
|
-
import { Switch } from "./switch.ui";
|
|
20
|
-
import { Tabs } from "./tabs.ui";
|
|
21
|
-
import { TextArea } from "./textarea.ui";
|
|
22
|
-
import { Toolbar } from "./toolbar.ui";
|
|
23
|
-
import { DataGrid } from "./datagrid.ui";
|
|
24
|
-
import { RadioButton } from "./radiobutton.ui";
|
|
25
|
-
import { ValueBar } from "./valuebar.ui";
|
|
26
|
-
import { VPanel } from "./vpanel.ui";
|
|
27
|
-
import { createWidget } from "./widget.builder";
|
|
28
|
-
import { IconButtonMenu } from "./iconButtonMenu.ui";
|
|
29
|
-
export { Textbox, Accordion, Button, ButtonColor, ButtonMenu, ButtonStack, IconButton, IconButtonMenu, Checkbox, Container, Dialog, HPanel, Icon, Image, Label, Menu, ProgressBar, RadioButton, Select, Spacer, Switch, Tabs, TextArea, Toolbar, ValueBar, VPanel, DataGrid, Widget, WidgetAlignTypes, WidgetTypes, createWidget, };
|
|
30
|
-
//# sourceMappingURL=index.js.map
|
package/lib/ui/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
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,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,EACH,OAAO,EACP,SAAS,EACT,MAAM,EACN,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,cAAc,EACd,QAAQ,EACR,SAAS,EACT,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,IAAI,EACJ,WAAW,EACX,WAAW,EACX,MAAM,EACN,MAAM,EACN,MAAM,EACN,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,WAAW,EACX,YAAY,GACf,CAAC"}
|
package/lib/ui/label.ui.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import "./styles/label.css";
|
|
2
|
-
import { WidgetProps } from "./widget.builder";
|
|
3
|
-
import { Colors } from "./colors.ui";
|
|
4
|
-
import { Widget } from "./widget.ui";
|
|
5
|
-
export type LabelVariants = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span";
|
|
6
|
-
export declare class Label extends Widget {
|
|
7
|
-
variant: LabelVariants;
|
|
8
|
-
color: Colors;
|
|
9
|
-
text: string;
|
|
10
|
-
requiredWidth: number;
|
|
11
|
-
isHCentered: boolean;
|
|
12
|
-
isVCentered: boolean;
|
|
13
|
-
constructor(id: string, variant?: LabelVariants, parent?: Widget | null);
|
|
14
|
-
init(): void;
|
|
15
|
-
private updateRequiredWidth;
|
|
16
|
-
setHCentered(isHCentered?: boolean): void;
|
|
17
|
-
setVCentered(isVCentered?: boolean): void;
|
|
18
|
-
render(): void;
|
|
19
|
-
private centerV;
|
|
20
|
-
private centerH;
|
|
21
|
-
setText(text: string): void;
|
|
22
|
-
setVariant(variant?: LabelVariants): void;
|
|
23
|
-
setColor(color?: Colors): void;
|
|
24
|
-
getVariant(): LabelVariants;
|
|
25
|
-
getColor(): Colors;
|
|
26
|
-
getText(): string;
|
|
27
|
-
getRequiredWidth(): number;
|
|
28
|
-
}
|
|
29
|
-
export type wLabelProps = WidgetProps & {
|
|
30
|
-
variant?: string | null;
|
|
31
|
-
color?: Colors | null;
|
|
32
|
-
text?: string | null;
|
|
33
|
-
centerX?: boolean | null;
|
|
34
|
-
centerY?: boolean | null;
|
|
35
|
-
};
|
|
36
|
-
export declare const WLabel: (props: wLabelProps) => any;
|
|
37
|
-
export declare function createLabel(id: string, content: any, parent?: Widget | null): Label;
|
package/lib/ui/label.ui.jsx
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import "./styles/label.css";
|
|
2
|
-
import { normalizeWidget } from "./widget.builder";
|
|
3
|
-
import { Widget, connectWidgetCallback, getOnlyEventProps } from "./widget.ui";
|
|
4
|
-
import { UID } from "../core/uid";
|
|
5
|
-
export class Label extends Widget {
|
|
6
|
-
constructor(id, variant = "span", parent = null) {
|
|
7
|
-
super(id, variant, parent);
|
|
8
|
-
Object.defineProperty(this, "variant", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
configurable: true,
|
|
11
|
-
writable: true,
|
|
12
|
-
value: void 0
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(this, "color", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
configurable: true,
|
|
17
|
-
writable: true,
|
|
18
|
-
value: void 0
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(this, "text", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
configurable: true,
|
|
23
|
-
writable: true,
|
|
24
|
-
value: void 0
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(this, "requiredWidth", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true,
|
|
30
|
-
value: void 0
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(this, "isHCentered", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
writable: true,
|
|
36
|
-
value: void 0
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(this, "isVCentered", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
writable: true,
|
|
42
|
-
value: void 0
|
|
43
|
-
});
|
|
44
|
-
this.requiredWidth = -1;
|
|
45
|
-
this.isHCentered = false;
|
|
46
|
-
this.isVCentered = false;
|
|
47
|
-
this.variant = variant;
|
|
48
|
-
this.color = "primary";
|
|
49
|
-
this.text = "";
|
|
50
|
-
this.setColor(this.color);
|
|
51
|
-
//this.getBody().style.margin = "0px";
|
|
52
|
-
this.setVariant(this.variant);
|
|
53
|
-
this.init();
|
|
54
|
-
}
|
|
55
|
-
init() {
|
|
56
|
-
super.init();
|
|
57
|
-
}
|
|
58
|
-
updateRequiredWidth() {
|
|
59
|
-
const div = document.createElement("div");
|
|
60
|
-
div.id = this.id + ".requiredWidth";
|
|
61
|
-
div.innerHTML = this.text;
|
|
62
|
-
div.classList.add("WUILabel" + this.variant);
|
|
63
|
-
div.classList.add("WUILabel-" + this.color);
|
|
64
|
-
div.style.position = "absolute";
|
|
65
|
-
div.style.overflow = "hidden";
|
|
66
|
-
document.body.appendChild(div);
|
|
67
|
-
this.requiredWidth = div.clientWidth;
|
|
68
|
-
div.parentNode?.removeChild(div);
|
|
69
|
-
}
|
|
70
|
-
setHCentered(isHCentered = true) {
|
|
71
|
-
this.isHCentered = isHCentered;
|
|
72
|
-
}
|
|
73
|
-
setVCentered(isVCentered = true) {
|
|
74
|
-
this.isVCentered = isVCentered;
|
|
75
|
-
}
|
|
76
|
-
render() {
|
|
77
|
-
super.render();
|
|
78
|
-
if (this.isHCentered) {
|
|
79
|
-
this.centerH();
|
|
80
|
-
}
|
|
81
|
-
if (this.isVCentered) {
|
|
82
|
-
this.centerV();
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
centerV() {
|
|
86
|
-
this.getBody().style.lineHeight = this.getH() + "px";
|
|
87
|
-
}
|
|
88
|
-
centerH() {
|
|
89
|
-
this.getBody().style.textAlign = "center";
|
|
90
|
-
}
|
|
91
|
-
setText(text) {
|
|
92
|
-
this.text = text;
|
|
93
|
-
this.body.innerHTML = text;
|
|
94
|
-
this.updateRequiredWidth();
|
|
95
|
-
}
|
|
96
|
-
setVariant(variant = "span") {
|
|
97
|
-
if (this.variant !== variant) {
|
|
98
|
-
this.deleteClass("WUILabel" + this.variant);
|
|
99
|
-
}
|
|
100
|
-
this.variant = variant;
|
|
101
|
-
this.addClass("WUILabel-" + this.variant);
|
|
102
|
-
this.updateRequiredWidth();
|
|
103
|
-
}
|
|
104
|
-
setColor(color = "primary") {
|
|
105
|
-
if (this.color !== color) {
|
|
106
|
-
this.deleteClass("WUILabel-" + this.color);
|
|
107
|
-
}
|
|
108
|
-
this.color = color;
|
|
109
|
-
this.addClass("WUILabel-" + this.color);
|
|
110
|
-
this.updateRequiredWidth();
|
|
111
|
-
}
|
|
112
|
-
getVariant() {
|
|
113
|
-
return this.variant;
|
|
114
|
-
}
|
|
115
|
-
getColor() {
|
|
116
|
-
return this.color;
|
|
117
|
-
}
|
|
118
|
-
getText() {
|
|
119
|
-
return this.text;
|
|
120
|
-
}
|
|
121
|
-
getRequiredWidth() {
|
|
122
|
-
return this.requiredWidth;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
export const WLabel = (props) => {
|
|
126
|
-
if (!props.id) {
|
|
127
|
-
props.id = "Label." + UID();
|
|
128
|
-
}
|
|
129
|
-
connectWidgetCallback(props.id, getOnlyEventProps(props));
|
|
130
|
-
return normalizeWidget(<div id={props.id} w-label w-text={props.text} w-variant={props.variant} w-color={props.color} w-centerX={props.centerX} w-centerY={props.centerY}></div>, props);
|
|
131
|
-
};
|
|
132
|
-
export function createLabel(id, content, parent = null) {
|
|
133
|
-
const dataText = content.getAttribute("w-text");
|
|
134
|
-
const dataVariant = content.getAttribute("w-variant");
|
|
135
|
-
const dataColor = content.getAttribute("w-color");
|
|
136
|
-
let tag = dataVariant ? dataVariant : "span";
|
|
137
|
-
let newLabel = new Label(id, tag, parent);
|
|
138
|
-
if (dataText) {
|
|
139
|
-
newLabel.setText(dataText);
|
|
140
|
-
}
|
|
141
|
-
if (dataVariant) {
|
|
142
|
-
newLabel.setVariant(dataVariant);
|
|
143
|
-
}
|
|
144
|
-
if (dataColor) {
|
|
145
|
-
newLabel.setColor(dataColor);
|
|
146
|
-
}
|
|
147
|
-
if (content.getAttribute("w-centerX")) {
|
|
148
|
-
newLabel.setHCentered(true);
|
|
149
|
-
}
|
|
150
|
-
if (content.getAttribute("w-centerY")) {
|
|
151
|
-
newLabel.setVCentered(true);
|
|
152
|
-
}
|
|
153
|
-
return newLabel;
|
|
154
|
-
}
|
|
155
|
-
//# sourceMappingURL=label.ui.jsx.map
|
package/lib/ui/label.ui.jsx.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label.ui.jsx","sourceRoot":"","sources":["../../src/ui/label.ui.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAe,MAAM,kBAAkB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAIlC,MAAM,OAAO,KAAM,SAAQ,MAAM;IAU7B,YAAY,EAAU,EAAE,UAAyB,MAAM,EAAE,SAAwB,IAAI;QACjF,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAV/B;;;;;WAAuB;QACvB;;;;;WAAc;QACd;;;;;WAAa;QAEb;;;;;WAAsB;QAEtB;;;;;WA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G,OAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChD,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,CAAC;IACtD,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IAClD,IAAI,GAAG,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC;IAE7C,IAAI,QAAQ,GAAG,IAAI,KAAK,CAAC,EAAE,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAE1C,IAAI,QAAQ,EAAE,CAAC;QACX,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAED,IAAI,WAAW,EAAE,CAAC;QACd,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IACrC,CAAC;IAED,IAAI,SAAS,EAAE,CAAC;QACZ,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IACjC,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;QACpC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,IAAI,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;QACpC,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC"}
|
package/lib/ui/loading.ui.d.ts
DELETED
package/lib/ui/loading.ui.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import "./styles/loading.css";
|
|
2
|
-
import { Widget } from "./widget.ui";
|
|
3
|
-
export class Loading extends Widget {
|
|
4
|
-
constructor(id, parent = null) {
|
|
5
|
-
super(id, "div", parent);
|
|
6
|
-
this.addClass("WUILoading");
|
|
7
|
-
this.setVisible(false);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=loading.ui.js.map
|
package/lib/ui/loading.ui.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loading.ui.js","sourceRoot":"","sources":["../../src/ui/loading.ui.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,OAAO,OAAQ,SAAQ,MAAM;IAC/B,YAAY,EAAU,EAAE,SAAwB,IAAI;QAChD,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACzB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QAC5B,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;CACJ"}
|
package/lib/ui/menu.ui.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import "./styles/menu.css";
|
|
2
|
-
import { IWidget } from "../interfaces/widget.interface";
|
|
3
|
-
import { IconButton } from "./IconButton.ui";
|
|
4
|
-
import { Widget } from "./widget.ui";
|
|
5
|
-
export declare class Menu extends Widget {
|
|
6
|
-
background: Widget;
|
|
7
|
-
options: Map<string, IconButton>;
|
|
8
|
-
optionsWidth: Array<number>;
|
|
9
|
-
triggeredById: string | null;
|
|
10
|
-
triggeredBy: IWidget | null;
|
|
11
|
-
triggeredBySearchCode: any;
|
|
12
|
-
constructor(id: string, trigeredById: string | null, parent?: IWidget | null);
|
|
13
|
-
close(): void;
|
|
14
|
-
private getMaxWidth;
|
|
15
|
-
wakeUp(): void;
|
|
16
|
-
optionClicked(clickedOption: IWidget): void;
|
|
17
|
-
clearOptions(): void;
|
|
18
|
-
addOption(id: string, icon: string, label: string): void;
|
|
19
|
-
}
|
package/lib/ui/menu.ui.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import "./styles/menu.css";
|
|
2
|
-
import { IconButton } from "./IconButton.ui";
|
|
3
|
-
import { Widget, WidgetAlignTypes, WidgetTypes } from "./widget.ui";
|
|
4
|
-
const MENU_OPTION_HEIGHT = 40;
|
|
5
|
-
export class Menu extends Widget {
|
|
6
|
-
constructor(id, trigeredById, parent = null) {
|
|
7
|
-
super(id, "div", parent);
|
|
8
|
-
Object.defineProperty(this, "background", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
configurable: true,
|
|
11
|
-
writable: true,
|
|
12
|
-
value: void 0
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(this, "options", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
configurable: true,
|
|
17
|
-
writable: true,
|
|
18
|
-
value: void 0
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(this, "optionsWidth", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
configurable: true,
|
|
23
|
-
writable: true,
|
|
24
|
-
value: void 0
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(this, "triggeredById", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
configurable: true,
|
|
29
|
-
writable: true,
|
|
30
|
-
value: void 0
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(this, "triggeredBy", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
configurable: true,
|
|
35
|
-
writable: true,
|
|
36
|
-
value: void 0
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(this, "triggeredBySearchCode", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
configurable: true,
|
|
41
|
-
writable: true,
|
|
42
|
-
value: void 0
|
|
43
|
-
});
|
|
44
|
-
this.background = new Widget(this.id + ".background", "div", null);
|
|
45
|
-
this.background.setType(WidgetTypes.CUSTOM);
|
|
46
|
-
this.background.addClass("WUIMenuBackground");
|
|
47
|
-
this.background.setVisible(false);
|
|
48
|
-
this.triggeredById = trigeredById;
|
|
49
|
-
this.setType(WidgetTypes.CUSTOM);
|
|
50
|
-
this.setAlign(WidgetAlignTypes.VERTICAL);
|
|
51
|
-
this.setPadding(4);
|
|
52
|
-
this.triggeredBy = null;
|
|
53
|
-
this.options = new Map();
|
|
54
|
-
this.optionsWidth = new Array();
|
|
55
|
-
this.addClass("WUIMenu");
|
|
56
|
-
this.addClass("WUIMenuTransparent");
|
|
57
|
-
this.triggeredBySearchCode = setInterval(() => {
|
|
58
|
-
if (!this.triggeredById) {
|
|
59
|
-
clearInterval(this.triggeredBySearchCode);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
if (window.w.get(this.triggeredById)) {
|
|
63
|
-
this.triggeredBy = window.w.get(this.triggeredById);
|
|
64
|
-
this.triggeredBy.subscribe({
|
|
65
|
-
event: "click",
|
|
66
|
-
then: () => {
|
|
67
|
-
this.wakeUp();
|
|
68
|
-
},
|
|
69
|
-
});
|
|
70
|
-
clearInterval(this.triggeredBySearchCode);
|
|
71
|
-
}
|
|
72
|
-
}, 500);
|
|
73
|
-
this.background.subscribe({
|
|
74
|
-
event: "click",
|
|
75
|
-
then: () => {
|
|
76
|
-
this.close();
|
|
77
|
-
},
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
close() {
|
|
81
|
-
this.deleteClass("WUIMenuTransparent");
|
|
82
|
-
this.deleteClass("WUIMenuVisible");
|
|
83
|
-
this.addClass("WUIMenuHidden");
|
|
84
|
-
this.background.setVisible(false);
|
|
85
|
-
}
|
|
86
|
-
getMaxWidth() {
|
|
87
|
-
return Math.max(...this.optionsWidth) * 1.1;
|
|
88
|
-
}
|
|
89
|
-
wakeUp() {
|
|
90
|
-
const maxWidth = this.getMaxWidth();
|
|
91
|
-
let menuWidth = 0;
|
|
92
|
-
if (this.triggeredBy) {
|
|
93
|
-
const triggerWidth = this.triggeredBy.getBody().clientWidth;
|
|
94
|
-
if (triggerWidth > maxWidth) {
|
|
95
|
-
menuWidth = triggerWidth;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
menuWidth = maxWidth;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
menuWidth = maxWidth;
|
|
103
|
-
}
|
|
104
|
-
this.setW(menuWidth);
|
|
105
|
-
this.background.setVisible(true);
|
|
106
|
-
this.background.raisteTop();
|
|
107
|
-
this.raisteTop();
|
|
108
|
-
this.deleteClass("WUIMenuHidden");
|
|
109
|
-
this.addClass("WUIMenuVisible");
|
|
110
|
-
this.render();
|
|
111
|
-
if (this.triggeredBy) {
|
|
112
|
-
const position = this.triggeredBy.getPosition(false);
|
|
113
|
-
//const triggerW = this.triggeredBy.getBody().clientWidth;
|
|
114
|
-
const triggerH = this.triggeredBy.getBody().clientHeight;
|
|
115
|
-
const screenW = window.innerWidth;
|
|
116
|
-
const screenH = window.innerHeight;
|
|
117
|
-
const menuW = menuWidth;
|
|
118
|
-
const menuH = this.getBody().clientHeight;
|
|
119
|
-
let positionX = position.x;
|
|
120
|
-
let positionY = position.y;
|
|
121
|
-
let openRight = true;
|
|
122
|
-
let openBottom = true;
|
|
123
|
-
if (position.x + menuW > screenW) {
|
|
124
|
-
positionX = screenW - menuW;
|
|
125
|
-
openRight = false;
|
|
126
|
-
}
|
|
127
|
-
if (position.y + menuH + triggerH > screenH) {
|
|
128
|
-
positionY = screenH - menuH - triggerH;
|
|
129
|
-
openBottom = false;
|
|
130
|
-
}
|
|
131
|
-
if (openRight && openBottom) {
|
|
132
|
-
this.setX(positionX);
|
|
133
|
-
this.setY(positionY + triggerH);
|
|
134
|
-
}
|
|
135
|
-
else if (openRight && !openBottom) {
|
|
136
|
-
this.setX(positionX);
|
|
137
|
-
this.setY(positionY);
|
|
138
|
-
}
|
|
139
|
-
else if (!openRight && openBottom) {
|
|
140
|
-
/*abajo izq: Works!*/
|
|
141
|
-
this.setX(positionX);
|
|
142
|
-
this.setY(positionY + triggerH);
|
|
143
|
-
}
|
|
144
|
-
else if (!openRight && !openBottom) {
|
|
145
|
-
this.setX(positionX);
|
|
146
|
-
this.setY(positionY - triggerH);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
optionClicked(clickedOption) {
|
|
151
|
-
this.subscribers.forEach((callback) => {
|
|
152
|
-
if (callback.event == "option-clicked") {
|
|
153
|
-
callback.then(new Event("option-clicked"), clickedOption);
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
this.close();
|
|
157
|
-
}
|
|
158
|
-
clearOptions() {
|
|
159
|
-
this.optionsWidth = new Array();
|
|
160
|
-
this.options.clear();
|
|
161
|
-
this.removeAllChilds();
|
|
162
|
-
}
|
|
163
|
-
addOption(id, icon, label) {
|
|
164
|
-
const newOption = new IconButton(id, icon, null);
|
|
165
|
-
newOption.setType(WidgetTypes.FILL);
|
|
166
|
-
newOption.setAlign(WidgetAlignTypes.VERTICAL);
|
|
167
|
-
newOption.setText(label);
|
|
168
|
-
newOption.setFixedSize(MENU_OPTION_HEIGHT);
|
|
169
|
-
newOption.addClass("WUIMenuOptions"); //Esta linea estaba comentada. Con esto se soliciono el ancho del menu
|
|
170
|
-
//newOption.setH(MENU_OPTION_HEIGHT);
|
|
171
|
-
newOption.subscribe({
|
|
172
|
-
event: "click",
|
|
173
|
-
then: (_e, a) => {
|
|
174
|
-
const option = a;
|
|
175
|
-
this.optionClicked(option);
|
|
176
|
-
},
|
|
177
|
-
});
|
|
178
|
-
this.options.set(id, newOption);
|
|
179
|
-
const width = newOption.getBody().clientWidth;
|
|
180
|
-
this.optionsWidth.push(width);
|
|
181
|
-
const height = this.options.size * MENU_OPTION_HEIGHT;
|
|
182
|
-
this.addChild(newOption);
|
|
183
|
-
this.setH(height);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
//# sourceMappingURL=menu.ui.js.map
|
package/lib/ui/menu.ui.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"menu.ui.js","sourceRoot":"","sources":["../../src/ui/menu.ui.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,gBAAg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;QACzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CACJ"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import "./styles/progressbar.css";
|
|
2
|
-
import { WidgetProps } from "./widget.builder";
|
|
3
|
-
import { Widget } from "./widget.ui";
|
|
4
|
-
export declare class ProgressBar extends Widget {
|
|
5
|
-
private value;
|
|
6
|
-
private paddingBar;
|
|
7
|
-
private bar;
|
|
8
|
-
private lblValue;
|
|
9
|
-
constructor(id: string, parent?: Widget | null);
|
|
10
|
-
setPaddingBar(p: number): void;
|
|
11
|
-
hideLabel(): void;
|
|
12
|
-
displayLabel(): void;
|
|
13
|
-
render(): void;
|
|
14
|
-
setValue(value: number): void;
|
|
15
|
-
getValue(): number;
|
|
16
|
-
}
|
|
17
|
-
export type wProgressBarProps = WidgetProps & {
|
|
18
|
-
value: number;
|
|
19
|
-
paddingBar?: number | null;
|
|
20
|
-
hideLabel?: boolean | null;
|
|
21
|
-
};
|
|
22
|
-
export declare const WProgressBar: (props: wProgressBarProps) => any;
|
|
23
|
-
export declare function createProgressBar(id: string, content: any, parent?: Widget | null): ProgressBar;
|