@vandenberghinc/volt 1.1.5 → 1.1.7
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/backend/dist/cjs/database.d.ts +41 -68
- package/backend/dist/cjs/database.js +127 -76
- package/backend/dist/cjs/endpoint.d.ts +23 -9
- package/backend/dist/cjs/endpoint.js +98 -21
- package/backend/dist/cjs/frontend.d.ts +0 -2
- package/backend/dist/cjs/frontend.js +9 -9
- package/backend/dist/cjs/image_endpoint.d.ts +3 -1
- package/backend/dist/cjs/image_endpoint.js +2 -1
- package/backend/dist/cjs/payments/paddle.js +10 -2
- package/backend/dist/cjs/plugins/css.d.ts +6 -5
- package/backend/dist/cjs/plugins/css.js +32 -7
- package/backend/dist/cjs/plugins/ts/compiler.d.ts +6 -1
- package/backend/dist/cjs/plugins/ts/compiler.js +26 -2
- package/backend/dist/cjs/plugins/ts/preprocessing.js +5 -3
- package/backend/dist/cjs/server.d.ts +7 -13
- package/backend/dist/cjs/server.js +184 -303
- package/backend/dist/cjs/status.d.ts +1 -0
- package/backend/dist/cjs/status.js +2 -1
- package/backend/dist/cjs/stream.d.ts +5 -3
- package/backend/dist/cjs/stream.js +13 -4
- package/backend/dist/cjs/users.d.ts +1 -1
- package/backend/dist/cjs/users.js +87 -72
- package/backend/dist/cjs/utils.d.ts +17 -9
- package/backend/dist/cjs/utils.js +22 -64
- package/backend/dist/cjs/view.d.ts +2 -2
- package/backend/dist/cjs/view.js +38 -40
- package/backend/dist/cjs/volt.d.ts +3 -2
- package/backend/dist/cjs/volt.js +2 -2
- package/backend/dist/css/volt.css +5 -0
- package/backend/dist/esm/database.d.ts +41 -68
- package/backend/dist/esm/database.js +127 -76
- package/backend/dist/esm/endpoint.d.ts +23 -9
- package/backend/dist/esm/endpoint.js +99 -22
- package/backend/dist/esm/frontend.d.ts +0 -2
- package/backend/dist/esm/frontend.js +9 -9
- package/backend/dist/esm/image_endpoint.d.ts +3 -1
- package/backend/dist/esm/image_endpoint.js +2 -1
- package/backend/dist/esm/payments/paddle.js +11 -3
- package/backend/dist/esm/plugins/css.d.ts +6 -5
- package/backend/dist/esm/plugins/css.js +32 -6
- package/backend/dist/esm/plugins/ts/compiler.d.ts +6 -1
- package/backend/dist/esm/plugins/ts/compiler.js +26 -2
- package/backend/dist/esm/plugins/ts/preprocessing.js +5 -3
- package/backend/dist/esm/server.d.ts +7 -13
- package/backend/dist/esm/server.js +182 -301
- package/backend/dist/esm/status.d.ts +1 -0
- package/backend/dist/esm/status.js +1 -0
- package/backend/dist/esm/stream.d.ts +5 -3
- package/backend/dist/esm/stream.js +13 -4
- package/backend/dist/esm/users.d.ts +1 -1
- package/backend/dist/esm/users.js +87 -72
- package/backend/dist/esm/utils.d.ts +17 -9
- package/backend/dist/esm/utils.js +21 -62
- package/backend/dist/esm/view.d.ts +2 -2
- package/backend/dist/esm/view.js +38 -40
- package/backend/dist/esm/volt.d.ts +3 -2
- package/backend/dist/esm/volt.js +2 -1
- package/backend/dist/esm-dev/blacklist.js +1 -1
- package/backend/dist/esm-dev/cli.js +2 -2
- package/backend/dist/esm-dev/database.d.ts +41 -68
- package/backend/dist/esm-dev/database.js +128 -77
- package/backend/dist/esm-dev/endpoint.d.ts +23 -9
- package/backend/dist/esm-dev/endpoint.js +100 -23
- package/backend/dist/esm-dev/file_watcher.js +1 -1
- package/backend/dist/esm-dev/frontend.d.ts +0 -2
- package/backend/dist/esm-dev/frontend.js +9 -9
- package/backend/dist/esm-dev/image_endpoint.d.ts +3 -1
- package/backend/dist/esm-dev/image_endpoint.js +2 -1
- package/backend/dist/esm-dev/logger.js +1 -1
- package/backend/dist/esm-dev/payments/paddle.js +12 -4
- package/backend/dist/esm-dev/plugins/css.d.ts +6 -5
- package/backend/dist/esm-dev/plugins/css.js +33 -7
- package/backend/dist/esm-dev/plugins/ts/compiler.d.ts +6 -1
- package/backend/dist/esm-dev/plugins/ts/compiler.js +27 -3
- package/backend/dist/esm-dev/plugins/ts/preprocessing.js +7 -5
- package/backend/dist/esm-dev/rate_limit.js +1 -1
- package/backend/dist/esm-dev/server.d.ts +7 -13
- package/backend/dist/esm-dev/server.js +184 -303
- package/backend/dist/esm-dev/status.d.ts +1 -0
- package/backend/dist/esm-dev/status.js +1 -0
- package/backend/dist/esm-dev/stream.d.ts +5 -3
- package/backend/dist/esm-dev/stream.js +13 -4
- package/backend/dist/esm-dev/users.d.ts +1 -1
- package/backend/dist/esm-dev/users.js +88 -73
- package/backend/dist/esm-dev/utils.d.ts +17 -9
- package/backend/dist/esm-dev/utils.js +22 -63
- package/backend/dist/esm-dev/view.d.ts +2 -2
- package/backend/dist/esm-dev/view.js +39 -41
- package/backend/dist/esm-dev/volt.d.ts +3 -2
- package/backend/dist/esm-dev/volt.js +2 -1
- package/backend/src/database.ts +163 -152
- package/backend/src/endpoint.ts +123 -31
- package/backend/src/frontend.ts +9 -8
- package/backend/src/image_endpoint.ts +4 -0
- package/backend/src/payments/paddle.ts +11 -3
- package/backend/src/plugins/css.ts +36 -8
- package/backend/src/plugins/ts/compiler.ts +37 -1
- package/backend/src/plugins/ts/preprocessing.ts +5 -3
- package/backend/src/server.ts +167 -306
- package/backend/src/status.ts +1 -0
- package/backend/src/stream.ts +28 -8
- package/backend/src/users.ts +87 -72
- package/backend/src/utils.ts +58 -25
- package/backend/src/view.ts +30 -28
- package/backend/src/{volt.js → volt.ts} +2 -1
- package/backend/tsconfig.cjs.json +3 -3
- package/backend/tsconfig.esm.json +3 -3
- package/frontend/dist/elements/base.d.ts +397 -415
- package/frontend/dist/elements/base.js +565 -328
- package/frontend/dist/elements/module.d.ts +26 -12
- package/frontend/dist/elements/module.js +69 -32
- package/frontend/dist/elements/register_element.d.ts +3 -0
- package/frontend/dist/elements/register_element.js +22 -0
- package/frontend/dist/modules/auth.d.ts +1 -0
- package/frontend/dist/modules/auth.js +6 -5
- package/frontend/dist/modules/color.d.ts +159 -0
- package/frontend/dist/modules/color.js +315 -0
- package/frontend/dist/modules/colors.d.ts +1 -26
- package/frontend/dist/modules/colors.js +417 -338
- package/frontend/dist/modules/cookies.d.ts +1 -0
- package/frontend/dist/modules/cookies.js +1 -0
- package/frontend/dist/modules/events.d.ts +1 -0
- package/frontend/dist/modules/events.js +1 -0
- package/frontend/dist/modules/google.d.ts +1 -0
- package/frontend/dist/modules/google.js +1 -0
- package/frontend/dist/modules/meta.d.ts +1 -0
- package/frontend/dist/modules/meta.js +1 -0
- package/frontend/dist/modules/mutex.d.ts +1 -2
- package/frontend/dist/modules/mutex.js +3 -4
- package/frontend/dist/modules/paddle.d.ts +1 -0
- package/frontend/dist/modules/paddle.js +14 -13
- package/frontend/dist/modules/scheme.d.ts +1 -0
- package/frontend/dist/modules/scheme.js +4 -2
- package/frontend/dist/modules/statics.d.ts +1 -0
- package/frontend/dist/modules/statics.js +1 -0
- package/frontend/dist/modules/support.d.ts +1 -0
- package/frontend/dist/modules/support.js +3 -2
- package/frontend/dist/modules/theme.d.ts +56 -0
- package/frontend/dist/{ui → modules}/theme.js +186 -75
- package/frontend/dist/modules/themes.d.ts +1 -1
- package/frontend/dist/modules/themes.js +1 -0
- package/frontend/dist/modules/user.d.ts +1 -0
- package/frontend/dist/modules/user.js +11 -10
- package/frontend/dist/modules/utils.d.ts +23 -2
- package/frontend/dist/modules/utils.js +93 -1
- package/frontend/dist/types/gradient.js +4 -0
- package/frontend/dist/ui/border_button.d.ts +0 -25
- package/frontend/dist/ui/border_button.js +50 -51
- package/frontend/dist/ui/button.d.ts +0 -21
- package/frontend/dist/ui/button.js +41 -46
- package/frontend/dist/ui/canvas.js +15 -15
- package/frontend/dist/ui/checkbox.d.ts +3 -17
- package/frontend/dist/ui/checkbox.js +36 -30
- package/frontend/dist/ui/code.d.ts +15 -82
- package/frontend/dist/ui/code.js +150 -125
- package/frontend/dist/ui/color.d.ts +0 -1
- package/frontend/dist/ui/color.js +1 -1
- package/frontend/dist/ui/context_menu.d.ts +4 -2
- package/frontend/dist/ui/context_menu.js +16 -17
- package/frontend/dist/ui/css.js +2 -0
- package/frontend/dist/ui/divider.d.ts +0 -7
- package/frontend/dist/ui/divider.js +21 -25
- package/frontend/dist/ui/dropdown.d.ts +13 -7
- package/frontend/dist/ui/dropdown.js +65 -30
- package/frontend/dist/ui/for_each.d.ts +0 -5
- package/frontend/dist/ui/for_each.js +17 -22
- package/frontend/dist/ui/form.d.ts +17 -12
- package/frontend/dist/ui/form.js +21 -18
- package/frontend/dist/ui/frame_modes.d.ts +9 -12
- package/frontend/dist/ui/frame_modes.js +8 -10
- package/frontend/dist/ui/google_map.d.ts +0 -11
- package/frontend/dist/ui/google_map.js +23 -28
- package/frontend/dist/ui/gradient.d.ts +0 -5
- package/frontend/dist/ui/gradient.js +17 -22
- package/frontend/dist/ui/image.d.ts +27 -58
- package/frontend/dist/ui/image.js +99 -93
- package/frontend/dist/ui/input.d.ts +20 -97
- package/frontend/dist/ui/input.js +192 -170
- package/frontend/dist/ui/link.d.ts +0 -18
- package/frontend/dist/ui/link.js +42 -48
- package/frontend/dist/ui/list.js +36 -37
- package/frontend/dist/ui/loader_button.d.ts +4 -19
- package/frontend/dist/ui/loader_button.js +35 -37
- package/frontend/dist/ui/loaders.d.ts +0 -8
- package/frontend/dist/ui/loaders.js +20 -25
- package/frontend/dist/ui/popup.d.ts +11 -8
- package/frontend/dist/ui/popup.js +183 -24
- package/frontend/dist/ui/pseudo.d.ts +3 -3
- package/frontend/dist/ui/pseudo.js +14 -17
- package/frontend/dist/ui/scroller.d.ts +10 -48
- package/frontend/dist/ui/scroller.js +306 -300
- package/frontend/dist/ui/slider.d.ts +9 -3
- package/frontend/dist/ui/slider.js +31 -17
- package/frontend/dist/ui/spacer.d.ts +0 -9
- package/frontend/dist/ui/spacer.js +21 -26
- package/frontend/dist/ui/span.js +13 -15
- package/frontend/dist/ui/stack.d.ts +14 -75
- package/frontend/dist/ui/stack.js +166 -169
- package/frontend/dist/ui/steps.d.ts +10 -23
- package/frontend/dist/ui/steps.js +47 -34
- package/frontend/dist/ui/style.d.ts +4 -3
- package/frontend/dist/ui/style.js +13 -18
- package/frontend/dist/ui/switch.d.ts +10 -4
- package/frontend/dist/ui/switch.js +24 -16
- package/frontend/dist/ui/table.d.ts +0 -23
- package/frontend/dist/ui/table.js +113 -119
- package/frontend/dist/ui/tabs.d.ts +3 -19
- package/frontend/dist/ui/tabs.js +35 -29
- package/frontend/dist/ui/text.d.ts +0 -8
- package/frontend/dist/ui/text.js +20 -25
- package/frontend/dist/ui/title.d.ts +0 -15
- package/frontend/dist/ui/title.js +39 -45
- package/frontend/dist/ui/ui.d.ts +0 -2
- package/frontend/dist/ui/ui.js +0 -2
- package/frontend/dist/ui/view.d.ts +3 -17
- package/frontend/dist/ui/view.js +27 -32
- package/frontend/dist/volt.d.ts +2 -1
- package/frontend/dist/volt.js +3 -1
- package/frontend/examples/dashboard/dashboard.ts +774 -0
- package/frontend/examples/theme/theme.ts +58 -0
- package/frontend/src/css/volt.css +5 -0
- package/frontend/src/elements/base.ts +767 -545
- package/frontend/src/elements/module.ts +90 -29
- package/frontend/src/elements/register_element.ts +24 -0
- package/frontend/src/modules/auth.ts +7 -6
- package/frontend/src/modules/color.ts +348 -0
- package/frontend/src/modules/colors.ts +468 -449
- package/frontend/src/modules/cookies.ts +1 -0
- package/frontend/src/modules/events.ts +1 -0
- package/frontend/src/modules/google.ts +1 -0
- package/frontend/src/modules/meta.ts +2 -1
- package/frontend/src/modules/mutex.ts +2 -4
- package/frontend/src/modules/paddle.ts +21 -20
- package/frontend/src/modules/scheme.ts +4 -3
- package/frontend/src/modules/statics.ts +2 -1
- package/frontend/src/modules/support.ts +3 -2
- package/frontend/src/modules/theme.ts +413 -0
- package/frontend/src/modules/themes.ts +2 -1
- package/frontend/src/modules/user.ts +12 -11
- package/frontend/src/modules/utils.ts +125 -2
- package/frontend/src/ui/border_button.ts +41 -37
- package/frontend/src/ui/button.ts +33 -32
- package/frontend/src/ui/canvas.ts +5 -2
- package/frontend/src/ui/checkbox.ts +21 -22
- package/frontend/src/ui/code.ts +92 -86
- package/frontend/src/ui/context_menu.ts +7 -5
- package/frontend/src/ui/css.ts +1 -1
- package/frontend/src/ui/divider.ts +15 -10
- package/frontend/src/ui/dropdown.ts +38 -21
- package/frontend/src/ui/for_each.ts +9 -8
- package/frontend/src/ui/form.ts +26 -21
- package/frontend/src/ui/frame_modes.ts +13 -17
- package/frontend/src/ui/google_map.ts +15 -13
- package/frontend/src/ui/gradient.ts +9 -8
- package/frontend/src/ui/image.ts +108 -86
- package/frontend/src/ui/input.ts +145 -144
- package/frontend/src/ui/link.ts +25 -23
- package/frontend/src/ui/list.ts +12 -6
- package/frontend/src/ui/loader_button.ts +26 -25
- package/frontend/src/ui/loaders.ts +12 -11
- package/frontend/src/ui/popup.ts +168 -14
- package/frontend/src/ui/pseudo.ts +5 -3
- package/frontend/src/ui/scroller.ts +303 -294
- package/frontend/src/ui/slider.ts +15 -10
- package/frontend/src/ui/spacer.ts +14 -11
- package/frontend/src/ui/span.ts +6 -2
- package/frontend/src/ui/stack.ts +196 -183
- package/frontend/src/ui/steps.ts +38 -22
- package/frontend/src/ui/style.ts +7 -4
- package/frontend/src/ui/switch.ts +16 -11
- package/frontend/src/ui/table.ts +42 -34
- package/frontend/src/ui/tabs.ts +20 -19
- package/frontend/src/ui/text.ts +12 -11
- package/frontend/src/ui/title.ts +22 -20
- package/frontend/src/ui/ui.ts +0 -2
- package/frontend/src/ui/view.ts +20 -19
- package/frontend/src/volt.ts +3 -1
- package/frontend/{compile.js → tools/compile.old.js} +2 -2
- package/frontend/tools/embed_scripts.js +69 -0
- package/frontend/tsconfig.json +26 -0
- package/package.json +8 -8
- package/frontend/dist/ui/theme.d.ts +0 -25
- package/frontend/exports.json +0 -1340
- package/frontend/src/modules/date.js +0 -535
- package/frontend/src/ui/color.ts +0 -117
- package/frontend/src/ui/theme.ts +0 -279
- /package/backend/src/{vinc.dev.js → vinc.dev.ts} +0 -0
|
@@ -36,10 +36,6 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
36
36
|
}
|
|
37
37
|
return useValue ? value : void 0;
|
|
38
38
|
};
|
|
39
|
-
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
40
|
-
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
41
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
42
|
-
};
|
|
43
39
|
// Imports.
|
|
44
40
|
import { Elements } from "../elements/module.js";
|
|
45
41
|
import { Utils } from "../modules/utils.js";
|
|
@@ -130,22 +126,58 @@ import { Text } from "./text";
|
|
|
130
126
|
@default: false
|
|
131
127
|
*/
|
|
132
128
|
let DropdownElement = (() => {
|
|
133
|
-
|
|
134
|
-
|
|
129
|
+
let _classDecorators = [Elements.create({
|
|
130
|
+
name: "DropdownElement",
|
|
131
|
+
})];
|
|
135
132
|
let _classDescriptor;
|
|
136
133
|
let _classExtraInitializers = [];
|
|
137
134
|
let _classThis;
|
|
138
135
|
let _classSuper = VStackElement;
|
|
139
|
-
var DropdownElement =
|
|
136
|
+
var DropdownElement = class extends _classSuper {
|
|
137
|
+
static { _classThis = this; }
|
|
138
|
+
static {
|
|
139
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
140
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
141
|
+
DropdownElement = _classThis = _classDescriptor.value;
|
|
142
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
143
|
+
}
|
|
144
|
+
// Static attributes.
|
|
145
|
+
static element_name = "DropdownElement";
|
|
146
|
+
// @ts-expect-error
|
|
147
|
+
target;
|
|
148
|
+
// @ts-expect-error
|
|
149
|
+
animate;
|
|
150
|
+
// @ts-expect-error
|
|
151
|
+
duration;
|
|
152
|
+
side;
|
|
153
|
+
use_target_min;
|
|
154
|
+
auto_remove;
|
|
155
|
+
_min_width;
|
|
156
|
+
_max_width;
|
|
157
|
+
_min_height;
|
|
158
|
+
_max_height;
|
|
159
|
+
below_target;
|
|
160
|
+
x_offset;
|
|
161
|
+
y_offset;
|
|
162
|
+
content_items;
|
|
163
|
+
on_expand_callback;
|
|
164
|
+
on_minimize_callback;
|
|
165
|
+
mouse_over_background;
|
|
166
|
+
mouse_out_opacity;
|
|
167
|
+
_content_padding;
|
|
168
|
+
_content_margin;
|
|
169
|
+
_frame_min_width = 0;
|
|
170
|
+
_frame_min_height = 0;
|
|
171
|
+
_frame_max_width = 0;
|
|
172
|
+
_frame_max_height = 0;
|
|
173
|
+
next_toggle_allowed;
|
|
174
|
+
expanded = false;
|
|
175
|
+
animation_timeout;
|
|
176
|
+
close_handler;
|
|
140
177
|
constructor({ target, animate = true, duration = 300, side = "left", auto_remove = false, min_width = undefined, max_width = undefined, min_height = undefined, max_height = undefined, use_target_min = false, below_target = false, x_offset = undefined, y_offset = undefined, content = undefined, }) {
|
|
141
178
|
// Base.
|
|
142
179
|
super();
|
|
143
|
-
this.
|
|
144
|
-
this._frame_min_height = 0;
|
|
145
|
-
this._frame_max_width = 0;
|
|
146
|
-
this._frame_max_height = 0;
|
|
147
|
-
this.expanded = false;
|
|
148
|
-
this._init_derived({
|
|
180
|
+
this._init({
|
|
149
181
|
derived: DropdownElement,
|
|
150
182
|
});
|
|
151
183
|
// Parameters.
|
|
@@ -204,8 +236,12 @@ let DropdownElement = (() => {
|
|
|
204
236
|
.color("white")
|
|
205
237
|
.font_size("inherit")
|
|
206
238
|
.wrap(false)
|
|
207
|
-
|
|
208
|
-
|
|
239
|
+
.margin(0)
|
|
240
|
+
.exec(e => {
|
|
241
|
+
if (item.ellipsis_overflow) {
|
|
242
|
+
e.ellipsis_overflow(item.ellipsis_overflow);
|
|
243
|
+
}
|
|
244
|
+
}))
|
|
209
245
|
.text_decoration("none")
|
|
210
246
|
.border("none")
|
|
211
247
|
.outline("none")
|
|
@@ -295,17 +331,21 @@ let DropdownElement = (() => {
|
|
|
295
331
|
clearTimeout(this.animation_timeout);
|
|
296
332
|
this.transition("");
|
|
297
333
|
this._get_frame();
|
|
334
|
+
this.hide();
|
|
298
335
|
this.max_width(this._frame_min_width);
|
|
299
336
|
this.max_height(this._frame_min_height);
|
|
300
337
|
this.opacity(0);
|
|
301
|
-
this.transition(this.animate ? `opacity ${this.duration * 0.8}ms ease-in, max-height ${this.duration}ms ease-in-out, max-width ${this.duration}ms ease-in-out` : "");
|
|
302
|
-
this.show()
|
|
338
|
+
this.transition(this.animate ? `opacity ${this.duration * 0.8}ms ease-in, max-height ${this.duration}ms ease-in-out, max-width ${this.duration}ms ease-in-out` : "").getBoundingClientRect();
|
|
339
|
+
this.show();
|
|
303
340
|
const rect = this.target.getBoundingClientRect();
|
|
304
|
-
this
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
341
|
+
this.position(rect.top + this.y_offset + (this.below_target ? rect.height : 0), this.side !== "left" ? (window.innerWidth - rect.right - this.x_offset) : undefined, undefined, this.side === "left" ? (rect.left + this.x_offset) : undefined);
|
|
342
|
+
this.getBoundingClientRect();
|
|
343
|
+
setTimeout(() => {
|
|
344
|
+
this
|
|
345
|
+
.opacity(1)
|
|
346
|
+
.max_width(this._frame_max_width)
|
|
347
|
+
.max_height(this._frame_max_height);
|
|
348
|
+
}, 25);
|
|
309
349
|
// Close handler.
|
|
310
350
|
if (this.close_handler == null) {
|
|
311
351
|
const _this_ = this;
|
|
@@ -430,15 +470,10 @@ let DropdownElement = (() => {
|
|
|
430
470
|
this.content_items.iterate((node) => { node.opacity(value); });
|
|
431
471
|
return this;
|
|
432
472
|
}
|
|
473
|
+
static {
|
|
474
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
475
|
+
}
|
|
433
476
|
};
|
|
434
|
-
__setFunctionName(_classThis, "DropdownElement");
|
|
435
|
-
(() => {
|
|
436
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
437
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
438
|
-
DropdownElement = _classThis = _classDescriptor.value;
|
|
439
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
440
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
441
|
-
})();
|
|
442
477
|
return DropdownElement = _classThis;
|
|
443
478
|
})();
|
|
444
479
|
export { DropdownElement };
|
|
@@ -7,11 +7,6 @@ type ObjectCallback1 = ((value: any, key: string, index: number) => any);
|
|
|
7
7
|
type ObjectCallback2 = ((value: any, key: string) => any);
|
|
8
8
|
type ObjectCallback3 = ((value: any) => any);
|
|
9
9
|
export declare class ForEachElement extends VElementTagMap.section {
|
|
10
|
-
static default_style: {
|
|
11
|
-
border: string;
|
|
12
|
-
outline: string;
|
|
13
|
-
background: string;
|
|
14
|
-
};
|
|
15
10
|
constructor(items: Array<any>, func: ArrayCallback);
|
|
16
11
|
constructor(items: Array<any>, func: ArrayCallback1);
|
|
17
12
|
constructor(items: Array<any>, func: ArrayCallback2);
|
|
@@ -36,21 +36,31 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
36
36
|
}
|
|
37
37
|
return useValue ? value : void 0;
|
|
38
38
|
};
|
|
39
|
-
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
40
|
-
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
41
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
42
|
-
};
|
|
43
39
|
// Imports.
|
|
44
40
|
import { Elements, VElementTagMap } from "../elements/module.js";
|
|
45
41
|
// ForEach.
|
|
46
42
|
let ForEachElement = (() => {
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
let _classDecorators = [Elements.create({
|
|
44
|
+
name: "ForEachElement",
|
|
45
|
+
default_style: {
|
|
46
|
+
"border": "none",
|
|
47
|
+
"outline": "none",
|
|
48
|
+
"background": "transparent",
|
|
49
|
+
},
|
|
50
|
+
})];
|
|
49
51
|
let _classDescriptor;
|
|
50
52
|
let _classExtraInitializers = [];
|
|
51
53
|
let _classThis;
|
|
52
54
|
let _classSuper = VElementTagMap.section;
|
|
53
|
-
var ForEachElement =
|
|
55
|
+
var ForEachElement = class extends _classSuper {
|
|
56
|
+
static { _classThis = this; }
|
|
57
|
+
static {
|
|
58
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
59
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
60
|
+
ForEachElement = _classThis = _classDescriptor.value;
|
|
61
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
62
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
63
|
+
}
|
|
54
64
|
constructor(items, func) {
|
|
55
65
|
// Initialize base class.
|
|
56
66
|
super({
|
|
@@ -75,21 +85,6 @@ let ForEachElement = (() => {
|
|
|
75
85
|
}
|
|
76
86
|
}
|
|
77
87
|
};
|
|
78
|
-
__setFunctionName(_classThis, "ForEachElement");
|
|
79
|
-
(() => {
|
|
80
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
81
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
82
|
-
ForEachElement = _classThis = _classDescriptor.value;
|
|
83
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
84
|
-
})();
|
|
85
|
-
_classThis.default_style = {
|
|
86
|
-
"border": "none",
|
|
87
|
-
"outline": "none",
|
|
88
|
-
"background": "transparent",
|
|
89
|
-
};
|
|
90
|
-
(() => {
|
|
91
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
92
|
-
})();
|
|
93
88
|
return ForEachElement = _classThis;
|
|
94
89
|
})();
|
|
95
90
|
export { ForEachElement };
|
|
@@ -1,25 +1,30 @@
|
|
|
1
|
-
import { VElement } from "../elements/module.js";
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { VElementBaseSignature, VElement, AppendType } from "../elements/module.js";
|
|
2
|
+
import { CheckBoxElement } from "./checkbox.js";
|
|
3
|
+
import { ExtendedInputElement, ExtendedSelectElement } from "./input.js";
|
|
4
|
+
export type OnSubmit<This> = (element: This, data: Record<string, any>) => any;
|
|
5
|
+
export type OnSubmitError<This> = (element: This, error: Error) => any;
|
|
6
|
+
declare const FormElement_base: VElementBaseSignature;
|
|
7
|
+
export declare class FormElement extends FormElement_base {
|
|
4
8
|
_button?: VElement;
|
|
5
|
-
fields: Record<string,
|
|
6
|
-
_on_submit?:
|
|
7
|
-
_on_submit_error?:
|
|
9
|
+
fields: Record<string, ExtendedInputElement | ExtendedSelectElement | CheckBoxElement>;
|
|
10
|
+
_on_submit?: OnSubmit<this>;
|
|
11
|
+
_on_submit_error?: OnSubmitError<this>;
|
|
8
12
|
_on_append_callback: (child: any) => void;
|
|
9
|
-
constructor(...children:
|
|
13
|
+
constructor(...children: AppendType[]);
|
|
10
14
|
data(): Record<string, any>;
|
|
11
15
|
submit(): Promise<this>;
|
|
12
16
|
button<T = undefined | HTMLElement | VElement>(): T;
|
|
13
17
|
button(element_or_id: VElement | string): this;
|
|
14
|
-
on_submit(): undefined |
|
|
15
|
-
on_submit(callback:
|
|
16
|
-
on_submit_error(): undefined |
|
|
17
|
-
on_submit_error(callback:
|
|
18
|
+
on_submit(): undefined | OnSubmit<this>;
|
|
19
|
+
on_submit(callback: OnSubmit<this>): this;
|
|
20
|
+
on_submit_error(): undefined | OnSubmitError<this>;
|
|
21
|
+
on_submit_error(callback: OnSubmitError<this>): this;
|
|
18
22
|
}
|
|
19
|
-
export declare const Form: <Extensions extends object = {}>(...args:
|
|
23
|
+
export declare const Form: <Extensions extends object = {}>(...args: AppendType[]) => FormElement & Extensions;
|
|
20
24
|
export declare const NullForm: <Extensions extends object = {}>() => FormElement & Extensions;
|
|
21
25
|
declare module './any_element.d.ts' {
|
|
22
26
|
interface AnyElementMap {
|
|
23
27
|
FormElement: FormElement;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
30
|
+
export {};
|
package/frontend/dist/ui/form.js
CHANGED
|
@@ -36,27 +36,38 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
36
36
|
}
|
|
37
37
|
return useValue ? value : void 0;
|
|
38
38
|
};
|
|
39
|
-
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
40
|
-
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
41
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
42
|
-
};
|
|
43
39
|
// Imports.
|
|
44
40
|
import { Elements, isVElement } from "../elements/module.js";
|
|
45
41
|
import { VStackElement } from "./stack";
|
|
46
42
|
// Extended input.
|
|
47
43
|
let FormElement = (() => {
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
let _classDecorators = [Elements.create({
|
|
45
|
+
name: "FormElement",
|
|
46
|
+
})];
|
|
50
47
|
let _classDescriptor;
|
|
51
48
|
let _classExtraInitializers = [];
|
|
52
49
|
let _classThis;
|
|
53
50
|
let _classSuper = VStackElement;
|
|
54
|
-
var FormElement =
|
|
51
|
+
var FormElement = class extends _classSuper {
|
|
52
|
+
static { _classThis = this; }
|
|
53
|
+
static {
|
|
54
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
55
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
56
|
+
FormElement = _classThis = _classDescriptor.value;
|
|
57
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
58
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
59
|
+
}
|
|
60
|
+
// Attributes.
|
|
61
|
+
_button;
|
|
62
|
+
fields;
|
|
63
|
+
_on_submit;
|
|
64
|
+
_on_submit_error;
|
|
65
|
+
_on_append_callback;
|
|
55
66
|
// Constructor.
|
|
56
67
|
constructor(...children) {
|
|
57
68
|
// Initialize super.
|
|
58
69
|
super();
|
|
59
|
-
this.
|
|
70
|
+
this._init({
|
|
60
71
|
derived: FormElement,
|
|
61
72
|
});
|
|
62
73
|
// Attributes.
|
|
@@ -66,7 +77,7 @@ let FormElement = (() => {
|
|
|
66
77
|
const _this = this;
|
|
67
78
|
this._on_append_callback = (child) => {
|
|
68
79
|
// Initialize field.
|
|
69
|
-
if (child.
|
|
80
|
+
if (child.element_name === "ExtendedInputElement" || child.element_name === "ExtendedSelectElement" || child.element_name === "CheckBoxElement") {
|
|
70
81
|
const id = child.id();
|
|
71
82
|
if (id != null && id !== "") {
|
|
72
83
|
_this.fields[id] = child;
|
|
@@ -79,7 +90,7 @@ let FormElement = (() => {
|
|
|
79
90
|
}
|
|
80
91
|
}
|
|
81
92
|
// Initialize button.
|
|
82
|
-
else if ( /*_this._button === undefined &&*/(child.
|
|
93
|
+
else if ( /*_this._button === undefined &&*/(child.element_name === "ButtonElement" || child.element_name === "LoaderButtonElement") && child.on_click() == null) { // && child.attr("submit_button") != "false"
|
|
83
94
|
if (_this._button !== undefined) {
|
|
84
95
|
_this._button.on_click(() => { });
|
|
85
96
|
}
|
|
@@ -212,14 +223,6 @@ let FormElement = (() => {
|
|
|
212
223
|
return this;
|
|
213
224
|
}
|
|
214
225
|
};
|
|
215
|
-
__setFunctionName(_classThis, "FormElement");
|
|
216
|
-
(() => {
|
|
217
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
218
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
219
|
-
FormElement = _classThis = _classDescriptor.value;
|
|
220
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
221
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
222
|
-
})();
|
|
223
226
|
return FormElement = _classThis;
|
|
224
227
|
})();
|
|
225
228
|
export { FormElement };
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { VElement } from "../elements/module.js";
|
|
2
|
+
export declare class FrameNodes extends Array<VElement> {
|
|
3
|
+
constructor(...children: VElement[]);
|
|
3
4
|
}
|
|
4
|
-
|
|
5
|
-
export declare
|
|
6
|
-
|
|
7
|
-
export declare class FrameModesType {
|
|
8
|
-
modes: Record<string, FrameNodesType>;
|
|
5
|
+
type OnSet = (mode: string, nodes: FrameNodes) => any;
|
|
6
|
+
export declare class FrameModes {
|
|
7
|
+
modes: Record<string, FrameNodes>;
|
|
9
8
|
active?: string;
|
|
10
9
|
_on_set?: OnSet;
|
|
11
10
|
constructor(...modes: string[]);
|
|
12
|
-
get(mode: string):
|
|
11
|
+
get(mode: string): FrameNodes;
|
|
13
12
|
set(mode: string): this;
|
|
14
13
|
switch(mode: string): this;
|
|
15
14
|
on_set(): undefined | OnSet;
|
|
@@ -17,12 +16,10 @@ export declare class FrameModesType {
|
|
|
17
16
|
on_switch(): undefined | OnSet;
|
|
18
17
|
on_switch(callback: OnSet): this;
|
|
19
18
|
}
|
|
20
|
-
export declare const FrameModes: <Extensions extends object = {}>(...args: string[]) => FrameModesType & Extensions;
|
|
21
|
-
export declare const NullFrameModes: <Extensions extends object = {}>() => FrameModesType & Extensions;
|
|
22
19
|
declare global {
|
|
23
20
|
interface VElementExtensions {
|
|
24
|
-
frame_mode(frame_mode:
|
|
25
|
-
frame_mode(frame_modes:
|
|
21
|
+
frame_mode(frame_mode: FrameNodes): this;
|
|
22
|
+
frame_mode(frame_modes: FrameModes, mode_name: string): this;
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
25
|
export {};
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
// Imports.
|
|
6
6
|
import { Elements } from "../elements/module.js";
|
|
7
7
|
// Nodes type.
|
|
8
|
-
export class
|
|
8
|
+
export class FrameNodes extends Array {
|
|
9
9
|
constructor(...children) {
|
|
10
10
|
super(...children);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
export const FrameNodes = Elements.wrapper(FrameNodesType);
|
|
14
|
-
export const NullFrameNodes = Elements.create_null(FrameNodesType);
|
|
15
13
|
// Frame mode used to switch easily between frames.
|
|
16
14
|
/* @docs:
|
|
17
15
|
@title: Frame Modes
|
|
@@ -22,16 +20,18 @@ export const NullFrameNodes = Elements.create_null(FrameNodesType);
|
|
|
22
20
|
|
|
23
21
|
Afterwards the mode can be set using `MyMode.set("my_mode")`.
|
|
24
22
|
*/
|
|
25
|
-
export class
|
|
23
|
+
export class FrameModes {
|
|
24
|
+
// Attributes.
|
|
25
|
+
modes = {};
|
|
26
|
+
active;
|
|
27
|
+
_on_set;
|
|
26
28
|
// Provide mode names as args: `sign_in, sign_up`.
|
|
27
29
|
constructor(...modes) {
|
|
28
|
-
// Attributes.
|
|
29
|
-
this.modes = {};
|
|
30
30
|
for (const mode of modes) {
|
|
31
31
|
if (this.active == null) {
|
|
32
32
|
this.active = mode;
|
|
33
33
|
}
|
|
34
|
-
this.modes[mode] = FrameNodes();
|
|
34
|
+
this.modes[mode] = new FrameNodes();
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
// Get.
|
|
@@ -78,8 +78,6 @@ export class FrameModesType {
|
|
|
78
78
|
return this;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
export const FrameModes = Elements.wrapper(FrameModesType);
|
|
82
|
-
export const NullFrameModes = Elements.create_null(FrameModesType);
|
|
83
81
|
Elements.extend({
|
|
84
82
|
/**
|
|
85
83
|
* @docs:
|
|
@@ -95,7 +93,7 @@ Elements.extend({
|
|
|
95
93
|
if (args.length === 1) {
|
|
96
94
|
args[0].push(this);
|
|
97
95
|
}
|
|
98
|
-
else if (args.length === 2 && args[0] instanceof
|
|
96
|
+
else if (args.length === 2 && args[0] instanceof FrameModes) {
|
|
99
97
|
const frames_mode = args[0];
|
|
100
98
|
const mode_name = args[1];
|
|
101
99
|
if (mode_name !== frames_mode.active) {
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { VElementTagMap } from "../elements/module.js";
|
|
2
2
|
export declare class GoogleMapElement extends VElementTagMap.iframe {
|
|
3
|
-
static default_style: {
|
|
4
|
-
border: string;
|
|
5
|
-
};
|
|
6
|
-
static default_attributes: {
|
|
7
|
-
width: string;
|
|
8
|
-
height: string;
|
|
9
|
-
frameborder: string;
|
|
10
|
-
style: string;
|
|
11
|
-
referrerpolicy: string;
|
|
12
|
-
allowfullscreen: string;
|
|
13
|
-
};
|
|
14
3
|
constructor({ location, mode, api_key, }: {
|
|
15
4
|
location: string;
|
|
16
5
|
mode: string;
|
|
@@ -36,23 +36,39 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
36
36
|
}
|
|
37
37
|
return useValue ? value : void 0;
|
|
38
38
|
};
|
|
39
|
-
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
40
|
-
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
41
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
42
|
-
};
|
|
43
39
|
// Imports.
|
|
44
40
|
import { Elements, VElementTagMap } from "../elements/module.js";
|
|
45
41
|
import { Utils } from "../modules/utils.js";
|
|
46
42
|
import { Google } from "../modules/google";
|
|
47
43
|
// GoogleMap.
|
|
48
44
|
let GoogleMapElement = (() => {
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
let _classDecorators = [Elements.create({
|
|
46
|
+
name: "GoogleMapElement",
|
|
47
|
+
default_style: {
|
|
48
|
+
"border": "0",
|
|
49
|
+
},
|
|
50
|
+
default_attributes: {
|
|
51
|
+
"width": "100%",
|
|
52
|
+
"height": "100%",
|
|
53
|
+
"frameborder": "0",
|
|
54
|
+
"style": "border:0",
|
|
55
|
+
"referrerpolicy": "no-referrer-when-downgrade",
|
|
56
|
+
"allowfullscreen": "true",
|
|
57
|
+
},
|
|
58
|
+
})];
|
|
51
59
|
let _classDescriptor;
|
|
52
60
|
let _classExtraInitializers = [];
|
|
53
61
|
let _classThis;
|
|
54
62
|
let _classSuper = VElementTagMap.iframe;
|
|
55
|
-
var GoogleMapElement =
|
|
63
|
+
var GoogleMapElement = class extends _classSuper {
|
|
64
|
+
static { _classThis = this; }
|
|
65
|
+
static {
|
|
66
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
67
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
68
|
+
GoogleMapElement = _classThis = _classDescriptor.value;
|
|
69
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
70
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
71
|
+
}
|
|
56
72
|
// Constructor.
|
|
57
73
|
constructor({ location, mode = "place", api_key, }) {
|
|
58
74
|
// Initialize base class.
|
|
@@ -83,27 +99,6 @@ let GoogleMapElement = (() => {
|
|
|
83
99
|
return this;
|
|
84
100
|
}
|
|
85
101
|
};
|
|
86
|
-
__setFunctionName(_classThis, "GoogleMapElement");
|
|
87
|
-
(() => {
|
|
88
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
89
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
90
|
-
GoogleMapElement = _classThis = _classDescriptor.value;
|
|
91
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
92
|
-
})();
|
|
93
|
-
_classThis.default_style = {
|
|
94
|
-
"border": "0",
|
|
95
|
-
};
|
|
96
|
-
_classThis.default_attributes = {
|
|
97
|
-
"width": "100%",
|
|
98
|
-
"height": "100%",
|
|
99
|
-
"frameborder": "0",
|
|
100
|
-
"style": "border:0",
|
|
101
|
-
"referrerpolicy": "no-referrer-when-downgrade",
|
|
102
|
-
"allowfullscreen": "true",
|
|
103
|
-
};
|
|
104
|
-
(() => {
|
|
105
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
106
|
-
})();
|
|
107
102
|
return GoogleMapElement = _classThis;
|
|
108
103
|
})();
|
|
109
104
|
export { GoogleMapElement };
|
|
@@ -4,11 +4,6 @@ export { GradientType };
|
|
|
4
4
|
export declare const Gradient: <Extensions extends object = {}>(type: string, ...colors: string[]) => GradientType & Extensions;
|
|
5
5
|
export declare const NullGradient: <Extensions extends object = {}>() => GradientType & Extensions;
|
|
6
6
|
export declare class GradientBorderElement extends VElementTagMap.div {
|
|
7
|
-
static default_style: {
|
|
8
|
-
"--child-border-width": string;
|
|
9
|
-
"--child-border-radius": string;
|
|
10
|
-
"--child-border-color": string;
|
|
11
|
-
};
|
|
12
7
|
constructor();
|
|
13
8
|
border_color(): string;
|
|
14
9
|
border_color(val: string): this;
|
|
@@ -36,10 +36,6 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
|
|
|
36
36
|
}
|
|
37
37
|
return useValue ? value : void 0;
|
|
38
38
|
};
|
|
39
|
-
var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
|
|
40
|
-
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
41
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
42
|
-
};
|
|
43
39
|
// Imports.
|
|
44
40
|
import { Elements, VElementTagMap } from "../elements/module.js";
|
|
45
41
|
import { GradientType } from "../types/gradient.js";
|
|
@@ -48,13 +44,27 @@ export const Gradient = Elements.wrapper(GradientType);
|
|
|
48
44
|
export const NullGradient = Elements.create_null(GradientType);
|
|
49
45
|
// Gradient border.
|
|
50
46
|
let GradientBorderElement = (() => {
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
let _classDecorators = [Elements.create({
|
|
48
|
+
name: "GradientBorderElement",
|
|
49
|
+
default_style: {
|
|
50
|
+
"--child-border-width": "1px",
|
|
51
|
+
"--child-border-radius": "10px",
|
|
52
|
+
"--child-border-color": "black",
|
|
53
|
+
},
|
|
54
|
+
})];
|
|
53
55
|
let _classDescriptor;
|
|
54
56
|
let _classExtraInitializers = [];
|
|
55
57
|
let _classThis;
|
|
56
58
|
let _classSuper = VElementTagMap.div;
|
|
57
|
-
var GradientBorderElement =
|
|
59
|
+
var GradientBorderElement = class extends _classSuper {
|
|
60
|
+
static { _classThis = this; }
|
|
61
|
+
static {
|
|
62
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
63
|
+
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
64
|
+
GradientBorderElement = _classThis = _classDescriptor.value;
|
|
65
|
+
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
66
|
+
__runInitializers(_classThis, _classExtraInitializers);
|
|
67
|
+
}
|
|
58
68
|
// Constructor.
|
|
59
69
|
constructor() {
|
|
60
70
|
// Initialize base classes.
|
|
@@ -93,21 +103,6 @@ let GradientBorderElement = (() => {
|
|
|
93
103
|
return this;
|
|
94
104
|
}
|
|
95
105
|
};
|
|
96
|
-
__setFunctionName(_classThis, "GradientBorderElement");
|
|
97
|
-
(() => {
|
|
98
|
-
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
99
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
100
|
-
GradientBorderElement = _classThis = _classDescriptor.value;
|
|
101
|
-
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
102
|
-
})();
|
|
103
|
-
_classThis.default_style = {
|
|
104
|
-
"--child-border-width": "1px",
|
|
105
|
-
"--child-border-radius": "10px",
|
|
106
|
-
"--child-border-color": "black",
|
|
107
|
-
};
|
|
108
|
-
(() => {
|
|
109
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
110
|
-
})();
|
|
111
106
|
return GradientBorderElement = _classThis;
|
|
112
107
|
})();
|
|
113
108
|
export { GradientBorderElement };
|