@vandenberghinc/volt 1.2.5 → 1.2.6
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/frontend/assets/admin/admin.png +0 -0
- package/frontend/assets/admin/password.webp +0 -0
- package/frontend/assets/icons/arrow.v1.webp +0 -0
- package/frontend/assets/icons/copy.webp +0 -0
- package/frontend/assets/payments/arrow.long.webp +0 -0
- package/frontend/assets/payments/arrow.long2.webp +0 -0
- package/frontend/assets/payments/cancelled.webp +0 -0
- package/frontend/assets/payments/check.sign.webp +0 -0
- package/frontend/assets/payments/check.webp +0 -0
- package/frontend/assets/payments/close.webp +0 -0
- package/frontend/assets/payments/error.webp +0 -0
- package/frontend/assets/payments/exclamation.webp +0 -0
- package/frontend/assets/payments/minus.webp +0 -0
- package/frontend/assets/payments/party.webp +0 -0
- package/frontend/assets/payments/plus.webp +0 -0
- package/frontend/assets/payments/shopping_cart.webp +0 -0
- package/frontend/assets/payments/trash.webp +0 -0
- package/package.json +5 -1
- package/.libris/config.json +0 -82
- package/backend/dist/cjs/backend/src/blacklist.d.ts +0 -12
- package/backend/dist/cjs/backend/src/blacklist.js +0 -78
- package/backend/dist/cjs/backend/src/cli.d.ts +0 -2
- package/backend/dist/cjs/backend/src/cli.js +0 -198
- package/backend/dist/cjs/backend/src/database/collection.d.ts +0 -1765
- package/backend/dist/cjs/backend/src/database/collection.js +0 -3301
- package/backend/dist/cjs/backend/src/database/database.d.ts +0 -92
- package/backend/dist/cjs/backend/src/database/database.js +0 -170
- package/backend/dist/cjs/backend/src/database/document.d.ts +0 -1
- package/backend/dist/cjs/backend/src/database/document.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/filters.d.ts +0 -6
- package/backend/dist/cjs/backend/src/database/filters/filters.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.d.ts +0 -223
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.d.ts +0 -1
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.js +0 -443
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.d.ts +0 -1
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.d.ts +0 -50
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.d.ts +0 -76
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.d.ts +0 -75
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.d.ts +0 -219
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.d.ts +0 -165
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.js +0 -15
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.d.ts +0 -5
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.js +0 -355
- package/backend/dist/cjs/backend/src/database/flatten.d.ts +0 -78
- package/backend/dist/cjs/backend/src/database/flatten.js +0 -53
- package/backend/dist/cjs/backend/src/database/flatten_test.d.ts +0 -1
- package/backend/dist/cjs/backend/src/database/flatten_test.js +0 -175
- package/backend/dist/cjs/backend/src/database/quota/quoata_v2.d.ts +0 -533
- package/backend/dist/cjs/backend/src/database/quota/quoata_v2.js +0 -1046
- package/backend/dist/cjs/backend/src/database/quota/quota.d.ts +0 -551
- package/backend/dist/cjs/backend/src/database/quota/quota.js +0 -1108
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.d.ts +0 -534
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.js +0 -1087
- package/backend/dist/cjs/backend/src/database/quota/safe_int.d.ts +0 -412
- package/backend/dist/cjs/backend/src/database/quota/safe_int.js +0 -745
- package/backend/dist/cjs/backend/src/endpoint.d.ts +0 -346
- package/backend/dist/cjs/backend/src/endpoint.js +0 -468
- package/backend/dist/cjs/backend/src/errors/index.d.ts +0 -7
- package/backend/dist/cjs/backend/src/errors/index.js +0 -25
- package/backend/dist/cjs/backend/src/errors/internal_external.d.ts +0 -52
- package/backend/dist/cjs/backend/src/errors/internal_external.js +0 -95
- package/backend/dist/cjs/backend/src/errors/invalid_usage_error.d.ts +0 -41
- package/backend/dist/cjs/backend/src/errors/invalid_usage_error.js +0 -47
- package/backend/dist/cjs/backend/src/errors/system_error.d.ts +0 -261
- package/backend/dist/cjs/backend/src/errors/system_error.js +0 -436
- package/backend/dist/cjs/backend/src/events.d.ts +0 -97
- package/backend/dist/cjs/backend/src/events.js +0 -15
- package/backend/dist/cjs/backend/src/frontend.d.ts +0 -11
- package/backend/dist/cjs/backend/src/frontend.js +0 -37
- package/backend/dist/cjs/backend/src/image_endpoint.d.ts +0 -44
- package/backend/dist/cjs/backend/src/image_endpoint.js +0 -185
- package/backend/dist/cjs/backend/src/index.d.ts +0 -23
- package/backend/dist/cjs/backend/src/index.js +0 -70
- package/backend/dist/cjs/backend/src/logger.d.ts +0 -5
- package/backend/dist/cjs/backend/src/logger.js +0 -15
- package/backend/dist/cjs/backend/src/meta.d.ts +0 -112
- package/backend/dist/cjs/backend/src/meta.js +0 -181
- package/backend/dist/cjs/backend/src/payments/paddle.d.ts +0 -329
- package/backend/dist/cjs/backend/src/payments/paddle.js +0 -1996
- package/backend/dist/cjs/backend/src/payments/stripe/checkout.d.ts +0 -113
- package/backend/dist/cjs/backend/src/payments/stripe/checkout.js +0 -295
- package/backend/dist/cjs/backend/src/payments/stripe/customers.d.ts +0 -17
- package/backend/dist/cjs/backend/src/payments/stripe/customers.js +0 -164
- package/backend/dist/cjs/backend/src/payments/stripe/error.d.ts +0 -74
- package/backend/dist/cjs/backend/src/payments/stripe/error.js +0 -64
- package/backend/dist/cjs/backend/src/payments/stripe/events.d.ts +0 -155
- package/backend/dist/cjs/backend/src/payments/stripe/events.js +0 -15
- package/backend/dist/cjs/backend/src/payments/stripe/meters.d.ts +0 -105
- package/backend/dist/cjs/backend/src/payments/stripe/meters.js +0 -230
- package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.d.ts +0 -58
- package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.js +0 -109
- package/backend/dist/cjs/backend/src/payments/stripe/products.d.ts +0 -519
- package/backend/dist/cjs/backend/src/payments/stripe/products.js +0 -650
- package/backend/dist/cjs/backend/src/payments/stripe/stripe.d.ts +0 -215
- package/backend/dist/cjs/backend/src/payments/stripe/stripe.js +0 -468
- package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.d.ts +0 -172
- package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.js +0 -557
- package/backend/dist/cjs/backend/src/payments/stripe/utils.d.ts +0 -63
- package/backend/dist/cjs/backend/src/payments/stripe/utils.js +0 -118
- package/backend/dist/cjs/backend/src/payments/stripe/webhooks.d.ts +0 -105
- package/backend/dist/cjs/backend/src/payments/stripe/webhooks.js +0 -627
- package/backend/dist/cjs/backend/src/plugins/browser.d.ts +0 -1
- package/backend/dist/cjs/backend/src/plugins/browser.js +0 -15
- package/backend/dist/cjs/backend/src/plugins/communication.d.ts +0 -70
- package/backend/dist/cjs/backend/src/plugins/communication.js +0 -196
- package/backend/dist/cjs/backend/src/plugins/mail/mail.d.ts +0 -255
- package/backend/dist/cjs/backend/src/plugins/mail/mail.js +0 -381
- package/backend/dist/cjs/backend/src/plugins/mail/ui.d.ts +0 -297
- package/backend/dist/cjs/backend/src/plugins/mail/ui.js +0 -1370
- package/backend/dist/cjs/backend/src/plugins/pdf.d.ts +0 -1
- package/backend/dist/cjs/backend/src/plugins/pdf.js +0 -1456
- package/backend/dist/cjs/backend/src/plugins/thread_monitor.d.ts +0 -18
- package/backend/dist/cjs/backend/src/plugins/thread_monitor.js +0 -116
- package/backend/dist/cjs/backend/src/rate_limit.d.ts +0 -148
- package/backend/dist/cjs/backend/src/rate_limit.js +0 -543
- package/backend/dist/cjs/backend/src/route.d.ts +0 -39
- package/backend/dist/cjs/backend/src/route.js +0 -172
- package/backend/dist/cjs/backend/src/server.d.ts +0 -502
- package/backend/dist/cjs/backend/src/server.js +0 -1713
- package/backend/dist/cjs/backend/src/server.old.d.ts +0 -594
- package/backend/dist/cjs/backend/src/server.old.js +0 -2058
- package/backend/dist/cjs/backend/src/splash_screen.d.ts +0 -93
- package/backend/dist/cjs/backend/src/splash_screen.js +0 -119
- package/backend/dist/cjs/backend/src/status.d.ts +0 -89
- package/backend/dist/cjs/backend/src/status.js +0 -211
- package/backend/dist/cjs/backend/src/stream.d.ts +0 -494
- package/backend/dist/cjs/backend/src/stream.js +0 -1370
- package/backend/dist/cjs/backend/src/users.d.ts +0 -926
- package/backend/dist/cjs/backend/src/users.js +0 -2223
- package/backend/dist/cjs/backend/src/utils.d.ts +0 -22
- package/backend/dist/cjs/backend/src/utils.js +0 -626
- package/backend/dist/cjs/backend/src/view.d.ts +0 -115
- package/backend/dist/cjs/backend/src/view.js +0 -519
- package/backend/dist/cjs/backend/src/vinc.d.ts +0 -6
- package/backend/dist/cjs/backend/src/vinc.js +0 -40
- package/backend/dist/cjs/backend/src/volt.d.ts +0 -24
- package/backend/dist/cjs/backend/src/volt.js +0 -72
- package/backend/dist/cjs/frontend/src/modules/request.d.ts +0 -70
- package/backend/dist/cjs/frontend/src/modules/request.js +0 -99
- package/backend/dist/cjs/package.json +0 -1
- package/backend/dist/esm/backend/src/blacklist.d.ts +0 -12
- package/backend/dist/esm/backend/src/blacklist.js +0 -52
- package/backend/dist/esm/backend/src/cli.d.ts +0 -2
- package/backend/dist/esm/backend/src/cli.js +0 -211
- package/backend/dist/esm/backend/src/database/collection.d.ts +0 -1765
- package/backend/dist/esm/backend/src/database/collection.js +0 -3779
- package/backend/dist/esm/backend/src/database/database.d.ts +0 -92
- package/backend/dist/esm/backend/src/database/database.js +0 -214
- package/backend/dist/esm/backend/src/database/document.d.ts +0 -1
- package/backend/dist/esm/backend/src/database/document.js +0 -558
- package/backend/dist/esm/backend/src/database/filters/filters.d.ts +0 -6
- package/backend/dist/esm/backend/src/database/filters/filters.js +0 -1
- package/backend/dist/esm/backend/src/database/filters/strict_filter.d.ts +0 -223
- package/backend/dist/esm/backend/src/database/filters/strict_filter.js +0 -3
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.d.ts +0 -1
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.js +0 -505
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.d.ts +0 -1
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.js +0 -712
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.d.ts +0 -50
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.js +0 -5
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.d.ts +0 -76
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.js +0 -44
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.d.ts +0 -75
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.js +0 -5
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.d.ts +0 -219
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.js +0 -1
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.d.ts +0 -165
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.js +0 -5
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.d.ts +0 -5
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.js +0 -415
- package/backend/dist/esm/backend/src/database/flatten.d.ts +0 -78
- package/backend/dist/esm/backend/src/database/flatten.js +0 -22
- package/backend/dist/esm/backend/src/database/flatten_test.d.ts +0 -1
- package/backend/dist/esm/backend/src/database/flatten_test.js +0 -174
- package/backend/dist/esm/backend/src/database/quota/quoata_v2.d.ts +0 -533
- package/backend/dist/esm/backend/src/database/quota/quoata_v2.js +0 -1155
- package/backend/dist/esm/backend/src/database/quota/quota.d.ts +0 -551
- package/backend/dist/esm/backend/src/database/quota/quota.js +0 -1219
- package/backend/dist/esm/backend/src/database/quota/quota_v1.d.ts +0 -534
- package/backend/dist/esm/backend/src/database/quota/quota_v1.js +0 -1242
- package/backend/dist/esm/backend/src/database/quota/safe_int.d.ts +0 -412
- package/backend/dist/esm/backend/src/database/quota/safe_int.js +0 -810
- package/backend/dist/esm/backend/src/endpoint.d.ts +0 -346
- package/backend/dist/esm/backend/src/endpoint.js +0 -479
- package/backend/dist/esm/backend/src/errors/index.d.ts +0 -7
- package/backend/dist/esm/backend/src/errors/index.js +0 -7
- package/backend/dist/esm/backend/src/errors/internal_external.d.ts +0 -52
- package/backend/dist/esm/backend/src/errors/internal_external.js +0 -86
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.d.ts +0 -41
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.js +0 -33
- package/backend/dist/esm/backend/src/errors/system_error.d.ts +0 -261
- package/backend/dist/esm/backend/src/errors/system_error.js +0 -444
- package/backend/dist/esm/backend/src/events.d.ts +0 -97
- package/backend/dist/esm/backend/src/events.js +0 -5
- package/backend/dist/esm/backend/src/frontend.d.ts +0 -11
- package/backend/dist/esm/backend/src/frontend.js +0 -12
- package/backend/dist/esm/backend/src/image_endpoint.d.ts +0 -44
- package/backend/dist/esm/backend/src/image_endpoint.js +0 -196
- package/backend/dist/esm/backend/src/index.d.ts +0 -23
- package/backend/dist/esm/backend/src/index.js +0 -26
- package/backend/dist/esm/backend/src/logger.d.ts +0 -5
- package/backend/dist/esm/backend/src/logger.js +0 -8
- package/backend/dist/esm/backend/src/meta.d.ts +0 -112
- package/backend/dist/esm/backend/src/meta.js +0 -152
- package/backend/dist/esm/backend/src/payments/paddle.d.ts +0 -329
- package/backend/dist/esm/backend/src/payments/paddle.js +0 -2276
- package/backend/dist/esm/backend/src/payments/stripe/checkout.d.ts +0 -113
- package/backend/dist/esm/backend/src/payments/stripe/checkout.js +0 -356
- package/backend/dist/esm/backend/src/payments/stripe/customers.d.ts +0 -17
- package/backend/dist/esm/backend/src/payments/stripe/customers.js +0 -193
- package/backend/dist/esm/backend/src/payments/stripe/error.d.ts +0 -74
- package/backend/dist/esm/backend/src/payments/stripe/error.js +0 -51
- package/backend/dist/esm/backend/src/payments/stripe/events.d.ts +0 -155
- package/backend/dist/esm/backend/src/payments/stripe/events.js +0 -5
- package/backend/dist/esm/backend/src/payments/stripe/meters.d.ts +0 -105
- package/backend/dist/esm/backend/src/payments/stripe/meters.js +0 -318
- package/backend/dist/esm/backend/src/payments/stripe/payment_methods.d.ts +0 -58
- package/backend/dist/esm/backend/src/payments/stripe/payment_methods.js +0 -135
- package/backend/dist/esm/backend/src/payments/stripe/products.d.ts +0 -519
- package/backend/dist/esm/backend/src/payments/stripe/products.js +0 -896
- package/backend/dist/esm/backend/src/payments/stripe/stripe.d.ts +0 -215
- package/backend/dist/esm/backend/src/payments/stripe/stripe.js +0 -464
- package/backend/dist/esm/backend/src/payments/stripe/subscriptions.d.ts +0 -172
- package/backend/dist/esm/backend/src/payments/stripe/subscriptions.js +0 -754
- package/backend/dist/esm/backend/src/payments/stripe/utils.d.ts +0 -63
- package/backend/dist/esm/backend/src/payments/stripe/utils.js +0 -131
- package/backend/dist/esm/backend/src/payments/stripe/webhooks.d.ts +0 -105
- package/backend/dist/esm/backend/src/payments/stripe/webhooks.js +0 -752
- package/backend/dist/esm/backend/src/plugins/browser.d.ts +0 -1
- package/backend/dist/esm/backend/src/plugins/browser.js +0 -170
- package/backend/dist/esm/backend/src/plugins/communication.d.ts +0 -70
- package/backend/dist/esm/backend/src/plugins/communication.js +0 -169
- package/backend/dist/esm/backend/src/plugins/mail/mail.d.ts +0 -255
- package/backend/dist/esm/backend/src/plugins/mail/mail.js +0 -396
- package/backend/dist/esm/backend/src/plugins/mail/ui.d.ts +0 -297
- package/backend/dist/esm/backend/src/plugins/mail/ui.js +0 -1400
- package/backend/dist/esm/backend/src/plugins/pdf.d.ts +0 -1
- package/backend/dist/esm/backend/src/plugins/pdf.js +0 -1694
- package/backend/dist/esm/backend/src/plugins/thread_monitor.d.ts +0 -18
- package/backend/dist/esm/backend/src/plugins/thread_monitor.js +0 -120
- package/backend/dist/esm/backend/src/rate_limit.d.ts +0 -148
- package/backend/dist/esm/backend/src/rate_limit.js +0 -667
- package/backend/dist/esm/backend/src/route.d.ts +0 -39
- package/backend/dist/esm/backend/src/route.js +0 -222
- package/backend/dist/esm/backend/src/server.d.ts +0 -502
- package/backend/dist/esm/backend/src/server.js +0 -2034
- package/backend/dist/esm/backend/src/server.old.d.ts +0 -594
- package/backend/dist/esm/backend/src/server.old.js +0 -2630
- package/backend/dist/esm/backend/src/splash_screen.d.ts +0 -93
- package/backend/dist/esm/backend/src/splash_screen.js +0 -156
- package/backend/dist/esm/backend/src/status.d.ts +0 -89
- package/backend/dist/esm/backend/src/status.js +0 -213
- package/backend/dist/esm/backend/src/stream.d.ts +0 -494
- package/backend/dist/esm/backend/src/stream.js +0 -1611
- package/backend/dist/esm/backend/src/users.d.ts +0 -926
- package/backend/dist/esm/backend/src/users.js +0 -2423
- package/backend/dist/esm/backend/src/utils.d.ts +0 -22
- package/backend/dist/esm/backend/src/utils.js +0 -463
- package/backend/dist/esm/backend/src/view.d.ts +0 -115
- package/backend/dist/esm/backend/src/view.js +0 -584
- package/backend/dist/esm/backend/src/vinc.d.ts +0 -6
- package/backend/dist/esm/backend/src/vinc.js +0 -6
- package/backend/dist/esm/backend/src/volt.d.ts +0 -24
- package/backend/dist/esm/backend/src/volt.js +0 -27
- package/backend/dist/esm/frontend/src/modules/request.d.ts +0 -70
- package/backend/dist/esm/frontend/src/modules/request.js +0 -117
- package/backend/old/file_watcher.ts +0 -359
- package/backend/old/request.deprc.js +0 -626
- package/backend/old/response.deprc.js +0 -354
- package/frontend/dist/backend/src/database/collection.d.ts +0 -1765
- package/frontend/dist/backend/src/database/collection.js +0 -3779
- package/frontend/dist/backend/src/database/database.d.ts +0 -92
- package/frontend/dist/backend/src/database/database.js +0 -214
- package/frontend/dist/backend/src/database/filters/filters.d.ts +0 -6
- package/frontend/dist/backend/src/database/filters/filters.js +0 -1
- package/frontend/dist/backend/src/database/filters/strict_filter.d.ts +0 -223
- package/frontend/dist/backend/src/database/filters/strict_filter.js +0 -3
- package/frontend/dist/backend/src/database/filters/strict_update_filter.d.ts +0 -165
- package/frontend/dist/backend/src/database/filters/strict_update_filter.js +0 -5
- package/frontend/dist/backend/src/database/flatten.d.ts +0 -78
- package/frontend/dist/backend/src/database/flatten.js +0 -22
- package/frontend/dist/backend/src/endpoint.d.ts +0 -346
- package/frontend/dist/backend/src/endpoint.js +0 -479
- package/frontend/dist/backend/src/errors/index.d.ts +0 -7
- package/frontend/dist/backend/src/errors/index.js +0 -7
- package/frontend/dist/backend/src/errors/internal_external.d.ts +0 -52
- package/frontend/dist/backend/src/errors/internal_external.js +0 -86
- package/frontend/dist/backend/src/errors/invalid_usage_error.d.ts +0 -41
- package/frontend/dist/backend/src/errors/invalid_usage_error.js +0 -33
- package/frontend/dist/backend/src/errors/system_error.d.ts +0 -261
- package/frontend/dist/backend/src/errors/system_error.js +0 -444
- package/frontend/dist/backend/src/events.d.ts +0 -97
- package/frontend/dist/backend/src/events.js +0 -5
- package/frontend/dist/backend/src/frontend.d.ts +0 -11
- package/frontend/dist/backend/src/frontend.js +0 -12
- package/frontend/dist/backend/src/image_endpoint.d.ts +0 -44
- package/frontend/dist/backend/src/image_endpoint.js +0 -196
- package/frontend/dist/backend/src/meta.d.ts +0 -112
- package/frontend/dist/backend/src/meta.js +0 -152
- package/frontend/dist/backend/src/payments/paddle.d.ts +0 -329
- package/frontend/dist/backend/src/payments/paddle.js +0 -2276
- package/frontend/dist/backend/src/payments/stripe/checkout.d.ts +0 -113
- package/frontend/dist/backend/src/payments/stripe/checkout.js +0 -356
- package/frontend/dist/backend/src/payments/stripe/customers.d.ts +0 -17
- package/frontend/dist/backend/src/payments/stripe/customers.js +0 -193
- package/frontend/dist/backend/src/payments/stripe/error.d.ts +0 -74
- package/frontend/dist/backend/src/payments/stripe/error.js +0 -51
- package/frontend/dist/backend/src/payments/stripe/events.d.ts +0 -155
- package/frontend/dist/backend/src/payments/stripe/events.js +0 -5
- package/frontend/dist/backend/src/payments/stripe/meters.d.ts +0 -105
- package/frontend/dist/backend/src/payments/stripe/meters.js +0 -318
- package/frontend/dist/backend/src/payments/stripe/payment_methods.d.ts +0 -58
- package/frontend/dist/backend/src/payments/stripe/payment_methods.js +0 -135
- package/frontend/dist/backend/src/payments/stripe/products.d.ts +0 -519
- package/frontend/dist/backend/src/payments/stripe/products.js +0 -896
- package/frontend/dist/backend/src/payments/stripe/stripe.d.ts +0 -215
- package/frontend/dist/backend/src/payments/stripe/stripe.js +0 -464
- package/frontend/dist/backend/src/payments/stripe/subscriptions.d.ts +0 -172
- package/frontend/dist/backend/src/payments/stripe/subscriptions.js +0 -754
- package/frontend/dist/backend/src/payments/stripe/utils.d.ts +0 -63
- package/frontend/dist/backend/src/payments/stripe/utils.js +0 -131
- package/frontend/dist/backend/src/payments/stripe/webhooks.d.ts +0 -105
- package/frontend/dist/backend/src/payments/stripe/webhooks.js +0 -752
- package/frontend/dist/backend/src/plugins/mail/mail.d.ts +0 -255
- package/frontend/dist/backend/src/plugins/mail/mail.js +0 -396
- package/frontend/dist/backend/src/plugins/mail/ui.d.ts +0 -297
- package/frontend/dist/backend/src/plugins/mail/ui.js +0 -1400
- package/frontend/dist/backend/src/rate_limit.d.ts +0 -148
- package/frontend/dist/backend/src/rate_limit.js +0 -667
- package/frontend/dist/backend/src/route.d.ts +0 -39
- package/frontend/dist/backend/src/route.js +0 -222
- package/frontend/dist/backend/src/server.d.ts +0 -502
- package/frontend/dist/backend/src/server.js +0 -2034
- package/frontend/dist/backend/src/splash_screen.d.ts +0 -93
- package/frontend/dist/backend/src/splash_screen.js +0 -156
- package/frontend/dist/backend/src/status.d.ts +0 -89
- package/frontend/dist/backend/src/status.js +0 -213
- package/frontend/dist/backend/src/stream.d.ts +0 -494
- package/frontend/dist/backend/src/stream.js +0 -1611
- package/frontend/dist/backend/src/users.d.ts +0 -926
- package/frontend/dist/backend/src/users.js +0 -2423
- package/frontend/dist/backend/src/utils.d.ts +0 -22
- package/frontend/dist/backend/src/utils.js +0 -463
- package/frontend/dist/backend/src/view.d.ts +0 -115
- package/frontend/dist/backend/src/view.js +0 -584
- package/frontend/dist/frontend/src/elements/base.d.ts +0 -3743
- package/frontend/dist/frontend/src/elements/base.js +0 -12151
- package/frontend/dist/frontend/src/elements/module.d.ts +0 -95
- package/frontend/dist/frontend/src/elements/module.js +0 -216
- package/frontend/dist/frontend/src/elements/register_element.d.ts +0 -3
- package/frontend/dist/frontend/src/elements/register_element.js +0 -22
- package/frontend/dist/frontend/src/elements/resize_query_manager.d.ts +0 -0
- package/frontend/dist/frontend/src/elements/resize_query_manager.js +0 -150
- package/frontend/dist/frontend/src/elements/types.d.ts +0 -52
- package/frontend/dist/frontend/src/elements/types.js +0 -5
- package/frontend/dist/frontend/src/index.d.ts +0 -21
- package/frontend/dist/frontend/src/index.js +0 -29
- package/frontend/dist/frontend/src/modules/attachment.d.ts +0 -126
- package/frontend/dist/frontend/src/modules/attachment.js +0 -306
- package/frontend/dist/frontend/src/modules/auth.d.ts +0 -44
- package/frontend/dist/frontend/src/modules/auth.js +0 -80
- package/frontend/dist/frontend/src/modules/color.d.ts +0 -160
- package/frontend/dist/frontend/src/modules/color.js +0 -316
- package/frontend/dist/frontend/src/modules/compression.d.ts +0 -39
- package/frontend/dist/frontend/src/modules/compression.js +0 -102
- package/frontend/dist/frontend/src/modules/cookies.d.ts +0 -44
- package/frontend/dist/frontend/src/modules/cookies.js +0 -143
- package/frontend/dist/frontend/src/modules/events.d.ts +0 -31
- package/frontend/dist/frontend/src/modules/events.js +0 -79
- package/frontend/dist/frontend/src/modules/google.d.ts +0 -23
- package/frontend/dist/frontend/src/modules/google.js +0 -52
- package/frontend/dist/frontend/src/modules/meta.d.ts +0 -14
- package/frontend/dist/frontend/src/modules/meta.js +0 -48
- package/frontend/dist/frontend/src/modules/paddle.d.ts +0 -1207
- package/frontend/dist/frontend/src/modules/paddle.js +0 -2594
- package/frontend/dist/frontend/src/modules/request.d.ts +0 -70
- package/frontend/dist/frontend/src/modules/request.js +0 -117
- package/frontend/dist/frontend/src/modules/settings.d.ts +0 -3
- package/frontend/dist/frontend/src/modules/settings.js +0 -5
- package/frontend/dist/frontend/src/modules/statics.d.ts +0 -21
- package/frontend/dist/frontend/src/modules/statics.js +0 -43
- package/frontend/dist/frontend/src/modules/stripe/cart.d.ts +0 -112
- package/frontend/dist/frontend/src/modules/stripe/cart.js +0 -321
- package/frontend/dist/frontend/src/modules/stripe/checkout.d.ts +0 -7
- package/frontend/dist/frontend/src/modules/stripe/checkout.js +0 -37
- package/frontend/dist/frontend/src/modules/stripe/index.m.d.ts +0 -6
- package/frontend/dist/frontend/src/modules/stripe/index.m.js +0 -6
- package/frontend/dist/frontend/src/modules/stripe/payments.d.ts +0 -58
- package/frontend/dist/frontend/src/modules/stripe/payments.js +0 -92
- package/frontend/dist/frontend/src/modules/support.d.ts +0 -30
- package/frontend/dist/frontend/src/modules/support.js +0 -53
- package/frontend/dist/frontend/src/modules/theme.d.ts +0 -133
- package/frontend/dist/frontend/src/modules/theme.js +0 -406
- package/frontend/dist/frontend/src/modules/themes.d.ts +0 -12
- package/frontend/dist/frontend/src/modules/themes.js +0 -22
- package/frontend/dist/frontend/src/modules/user.d.ts +0 -164
- package/frontend/dist/frontend/src/modules/user.js +0 -270
- package/frontend/dist/frontend/src/modules/utils.d.ts +0 -176
- package/frontend/dist/frontend/src/modules/utils.js +0 -569
- package/frontend/dist/frontend/src/types/gradient.d.ts +0 -29
- package/frontend/dist/frontend/src/types/gradient.js +0 -79
- package/frontend/dist/frontend/src/ui/border_button.d.ts +0 -94
- package/frontend/dist/frontend/src/ui/border_button.js +0 -228
- package/frontend/dist/frontend/src/ui/button.d.ts +0 -241
- package/frontend/dist/frontend/src/ui/button.js +0 -682
- package/frontend/dist/frontend/src/ui/canvas.d.ts +0 -138
- package/frontend/dist/frontend/src/ui/canvas.js +0 -444
- package/frontend/dist/frontend/src/ui/checkbox.d.ts +0 -74
- package/frontend/dist/frontend/src/ui/checkbox.js +0 -321
- package/frontend/dist/frontend/src/ui/code.d.ts +0 -235
- package/frontend/dist/frontend/src/ui/code.js +0 -1007
- package/frontend/dist/frontend/src/ui/context_menu.d.ts +0 -36
- package/frontend/dist/frontend/src/ui/context_menu.js +0 -205
- package/frontend/dist/frontend/src/ui/css.d.ts +0 -16
- package/frontend/dist/frontend/src/ui/css.js +0 -48
- package/frontend/dist/frontend/src/ui/divider.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/divider.js +0 -78
- package/frontend/dist/frontend/src/ui/dropdown.d.ts +0 -176
- package/frontend/dist/frontend/src/ui/dropdown.js +0 -481
- package/frontend/dist/frontend/src/ui/for_each.d.ts +0 -37
- package/frontend/dist/frontend/src/ui/for_each.js +0 -92
- package/frontend/dist/frontend/src/ui/form.d.ts +0 -34
- package/frontend/dist/frontend/src/ui/form.js +0 -233
- package/frontend/dist/frontend/src/ui/frame_modes.d.ts +0 -37
- package/frontend/dist/frontend/src/ui/frame_modes.js +0 -108
- package/frontend/dist/frontend/src/ui/google_map.d.ts +0 -24
- package/frontend/dist/frontend/src/ui/google_map.js +0 -106
- package/frontend/dist/frontend/src/ui/gradient.d.ts +0 -25
- package/frontend/dist/frontend/src/ui/gradient.js +0 -131
- package/frontend/dist/frontend/src/ui/image.d.ts +0 -111
- package/frontend/dist/frontend/src/ui/image.js +0 -576
- package/frontend/dist/frontend/src/ui/input.d.ts +0 -392
- package/frontend/dist/frontend/src/ui/input.js +0 -1201
- package/frontend/dist/frontend/src/ui/link.d.ts +0 -25
- package/frontend/dist/frontend/src/ui/link.js +0 -140
- package/frontend/dist/frontend/src/ui/list.d.ts +0 -37
- package/frontend/dist/frontend/src/ui/list.js +0 -170
- package/frontend/dist/frontend/src/ui/loader_button.d.ts +0 -80
- package/frontend/dist/frontend/src/ui/loader_button.js +0 -193
- package/frontend/dist/frontend/src/ui/loaders.d.ts +0 -57
- package/frontend/dist/frontend/src/ui/loaders.js +0 -157
- package/frontend/dist/frontend/src/ui/popup.d.ts +0 -94
- package/frontend/dist/frontend/src/ui/popup.js +0 -510
- package/frontend/dist/frontend/src/ui/pseudo.d.ts +0 -44
- package/frontend/dist/frontend/src/ui/pseudo.js +0 -154
- package/frontend/dist/frontend/src/ui/scroller.d.ts +0 -105
- package/frontend/dist/frontend/src/ui/scroller.js +0 -1253
- package/frontend/dist/frontend/src/ui/slider.d.ts +0 -45
- package/frontend/dist/frontend/src/ui/slider.js +0 -217
- package/frontend/dist/frontend/src/ui/spacer.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/spacer.js +0 -78
- package/frontend/dist/frontend/src/ui/span.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/span.js +0 -73
- package/frontend/dist/frontend/src/ui/stack.d.ts +0 -66
- package/frontend/dist/frontend/src/ui/stack.js +0 -335
- package/frontend/dist/frontend/src/ui/steps.d.ts +0 -131
- package/frontend/dist/frontend/src/ui/steps.js +0 -308
- package/frontend/dist/frontend/src/ui/style.d.ts +0 -17
- package/frontend/dist/frontend/src/ui/style.js +0 -73
- package/frontend/dist/frontend/src/ui/switch.d.ts +0 -69
- package/frontend/dist/frontend/src/ui/switch.js +0 -357
- package/frontend/dist/frontend/src/ui/table.d.ts +0 -100
- package/frontend/dist/frontend/src/ui/table.js +0 -405
- package/frontend/dist/frontend/src/ui/tabs.d.ts +0 -111
- package/frontend/dist/frontend/src/ui/tabs.js +0 -424
- package/frontend/dist/frontend/src/ui/text.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/text.js +0 -83
- package/frontend/dist/frontend/src/ui/title.d.ts +0 -91
- package/frontend/dist/frontend/src/ui/title.js +0 -272
- package/frontend/dist/frontend/src/ui/ui.d.ts +0 -35
- package/frontend/dist/frontend/src/ui/ui.js +0 -38
- package/frontend/dist/frontend/src/ui/view.d.ts +0 -15
- package/frontend/dist/frontend/src/ui/view.js +0 -88
- package/frontend/dist/frontend/src/volt.d.ts +0 -20
- package/frontend/dist/frontend/src/volt.js +0 -27
- package/frontend/examples/theme/theme.ts +0 -58
- package/frontend/tools/bundle_d_ts.js +0 -71
- package/frontend/tools/convert_to_jsdoc_input.txt +0 -9452
- package/frontend/tools/convert_to_jsdoc_output.txt +0 -7626
- package/frontend/tools/convert_to_jsdoc_tmp.js +0 -345
- package/frontend/tools/scan_mixed_imports.js +0 -69
- /package/frontend/{dist/frontend/src/css → css}/adyen.css +0 -0
- /package/frontend/{dist/frontend/src/css → css}/volt.css +0 -0
|
@@ -1,1400 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Daan van den Bergh
|
|
3
|
-
* @copyright © 2022 - 2025 Daan van den Bergh. All rights reserved
|
|
4
|
-
*/
|
|
5
|
-
// The class.
|
|
6
|
-
export class Element {
|
|
7
|
-
// ---------------------------------------------------------
|
|
8
|
-
// Attributes.
|
|
9
|
-
// static element_tag: string = tag; // must remain static.
|
|
10
|
-
type;
|
|
11
|
-
element_type;
|
|
12
|
-
tag;
|
|
13
|
-
_style;
|
|
14
|
-
_attrs;
|
|
15
|
-
classes;
|
|
16
|
-
_inner_html;
|
|
17
|
-
children;
|
|
18
|
-
_lang;
|
|
19
|
-
_charset;
|
|
20
|
-
_viewport;
|
|
21
|
-
_title;
|
|
22
|
-
_links;
|
|
23
|
-
_disabled;
|
|
24
|
-
// ---------------------------------------------------------
|
|
25
|
-
// Constructor.
|
|
26
|
-
constructor({ type = "VElement", tag = "div", default_style = null, default_attributes = null, default_events = null, }) {
|
|
27
|
-
// Arguments.
|
|
28
|
-
this.type = type;
|
|
29
|
-
this.element_type = type;
|
|
30
|
-
this.tag = tag;
|
|
31
|
-
// Attributes.
|
|
32
|
-
this._style = {};
|
|
33
|
-
this._attrs = {};
|
|
34
|
-
this.classes = [];
|
|
35
|
-
this._inner_html = null;
|
|
36
|
-
this.children = [];
|
|
37
|
-
// Assign default style.
|
|
38
|
-
if (default_style != null) {
|
|
39
|
-
Object.keys(default_style).forEach((key) => {
|
|
40
|
-
this._style[key] = default_style[key];
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
// Assign default attributes.
|
|
44
|
-
if (default_attributes != null) {
|
|
45
|
-
Object.keys(default_attributes).forEach((key) => {
|
|
46
|
-
this._attrs[key] = default_attributes[key];
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
// Assign default events.
|
|
50
|
-
if (default_events != null) {
|
|
51
|
-
Object.keys(default_events).forEach((key) => {
|
|
52
|
-
this._attrs[key] = default_events[key];
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// ---------------------------------------------------------
|
|
57
|
-
// Utils.
|
|
58
|
-
// Pad a numeric with px.
|
|
59
|
-
pad_numeric(value, padding = "px") {
|
|
60
|
-
if (typeof value === "number") {
|
|
61
|
-
return value + padding;
|
|
62
|
-
}
|
|
63
|
-
return value;
|
|
64
|
-
}
|
|
65
|
-
// ---------------------------------------------------------
|
|
66
|
-
// Build functions.
|
|
67
|
-
// Build the html.
|
|
68
|
-
html() {
|
|
69
|
-
// Vars.
|
|
70
|
-
let html = "", tag;
|
|
71
|
-
// A default element.
|
|
72
|
-
if (this.tag !== "mail") {
|
|
73
|
-
tag = this.tag;
|
|
74
|
-
}
|
|
75
|
-
// The parent mail element.
|
|
76
|
-
else {
|
|
77
|
-
tag = "body";
|
|
78
|
-
// Build header.
|
|
79
|
-
html += "<!DOCTYPE html>";
|
|
80
|
-
html += `<html lang="${this._lang || "en"}" style="height: 100%;">`;
|
|
81
|
-
html += `<head>`;
|
|
82
|
-
html += `<meta charset="${this._charset || "UTF-8"}">`;
|
|
83
|
-
html += `<meta name="viewport" charset="${this._viewport || "width=device-width, initial-scale=1.0"}">`;
|
|
84
|
-
html += `<meta name="color-scheme" content="light">`;
|
|
85
|
-
html += `<meta name="supported-color-schemes" content="light">`;
|
|
86
|
-
html += `<title>${this._title || ""}"</title>`;
|
|
87
|
-
html += "<style type=\"text/css\">* {box-sizing:border-box;}</style>";
|
|
88
|
-
// Links.
|
|
89
|
-
if (this._links !== undefined) {
|
|
90
|
-
this._links.forEach((url) => {
|
|
91
|
-
if (typeof url === "string") {
|
|
92
|
-
html += `<link rel="stylesheet" href="${url}">`;
|
|
93
|
-
}
|
|
94
|
-
else if (typeof url === "object") {
|
|
95
|
-
if (url.rel == null) {
|
|
96
|
-
url.rel = "stylesheet";
|
|
97
|
-
}
|
|
98
|
-
html += "<link";
|
|
99
|
-
Object.keys(url).forEach((key) => {
|
|
100
|
-
html += ` ${key}="${url[key]}"`;
|
|
101
|
-
});
|
|
102
|
-
html += ">";
|
|
103
|
-
}
|
|
104
|
-
else {
|
|
105
|
-
throw Error("Invalid type for a css include, the valid value types are \"string\" and \"object\".");
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
// Close header.
|
|
110
|
-
html += `</head>`;
|
|
111
|
-
// Set presentation role.
|
|
112
|
-
if (this.children.length > 0 && this.children[0].tag === "table") {
|
|
113
|
-
this.children[0]._attrs.role = "presentation";
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
// Open.
|
|
117
|
-
html += "<";
|
|
118
|
-
html += tag;
|
|
119
|
-
html += " ";
|
|
120
|
-
// Classes.
|
|
121
|
-
if (this.classes.length > 0) {
|
|
122
|
-
html += "class=\"";
|
|
123
|
-
let i = 0;
|
|
124
|
-
this.classes.forEach((key) => {
|
|
125
|
-
html += key;
|
|
126
|
-
if (i < this.classes.length - 1) {
|
|
127
|
-
html += " ";
|
|
128
|
-
}
|
|
129
|
-
++i;
|
|
130
|
-
});
|
|
131
|
-
html += "\" ";
|
|
132
|
-
}
|
|
133
|
-
// Style.
|
|
134
|
-
if (Object.keys(this._style).length > 0) {
|
|
135
|
-
html += "style=\"";
|
|
136
|
-
Object.keys(this._style).forEach((key) => {
|
|
137
|
-
html += `${key}:${this._style[key].replaceAll('"', '\'')};`;
|
|
138
|
-
});
|
|
139
|
-
html += "\"";
|
|
140
|
-
}
|
|
141
|
-
// Attributes.
|
|
142
|
-
Object.keys(this._attrs).forEach((key) => {
|
|
143
|
-
html += ` ${key}="${this._attrs[key]}"`;
|
|
144
|
-
});
|
|
145
|
-
// End opening.
|
|
146
|
-
html += ">\n";
|
|
147
|
-
// Add inner html.
|
|
148
|
-
if (this._inner_html != null) {
|
|
149
|
-
html += this._inner_html;
|
|
150
|
-
}
|
|
151
|
-
// Add children.
|
|
152
|
-
this.children.forEach((child) => {
|
|
153
|
-
html += child.html();
|
|
154
|
-
});
|
|
155
|
-
// Close.
|
|
156
|
-
html += "</";
|
|
157
|
-
html += this.tag;
|
|
158
|
-
html += "";
|
|
159
|
-
html += ">\n";
|
|
160
|
-
// The parent mail element.
|
|
161
|
-
if (this.tag === "mail") {
|
|
162
|
-
html += "</html>";
|
|
163
|
-
}
|
|
164
|
-
// Response.
|
|
165
|
-
return html;
|
|
166
|
-
}
|
|
167
|
-
// Add links to the main MailElement.
|
|
168
|
-
links(links) {
|
|
169
|
-
if (this._links === undefined) {
|
|
170
|
-
this._links = [];
|
|
171
|
-
}
|
|
172
|
-
this._links = this._links.concat(links);
|
|
173
|
-
return this;
|
|
174
|
-
}
|
|
175
|
-
background_color(value) {
|
|
176
|
-
if (value == null)
|
|
177
|
-
return this._style["background-color"];
|
|
178
|
-
this._style["background-color"] = value;
|
|
179
|
-
return this;
|
|
180
|
-
}
|
|
181
|
-
display(value) {
|
|
182
|
-
if (value == null)
|
|
183
|
-
return this._style["display"];
|
|
184
|
-
this._style["display"] = value;
|
|
185
|
-
return this;
|
|
186
|
-
}
|
|
187
|
-
background_image(value) {
|
|
188
|
-
if (value == null)
|
|
189
|
-
return this._style["background-image"];
|
|
190
|
-
this._style["background-image"] = value;
|
|
191
|
-
return this;
|
|
192
|
-
}
|
|
193
|
-
background_repeat(value) {
|
|
194
|
-
if (value == null)
|
|
195
|
-
return this._style["background-repeat"];
|
|
196
|
-
this._style["background-repeat"] = value;
|
|
197
|
-
return this;
|
|
198
|
-
}
|
|
199
|
-
border_top(value) {
|
|
200
|
-
if (value == null)
|
|
201
|
-
return this._style["border-top"];
|
|
202
|
-
this._style["border-top"] = value;
|
|
203
|
-
return this;
|
|
204
|
-
}
|
|
205
|
-
border_bottom(value) {
|
|
206
|
-
if (value == null)
|
|
207
|
-
return this._style["border-bottom"];
|
|
208
|
-
this._style["border-bottom"] = value;
|
|
209
|
-
return this;
|
|
210
|
-
}
|
|
211
|
-
border_right(value) {
|
|
212
|
-
if (value == null)
|
|
213
|
-
return this._style["border-right"];
|
|
214
|
-
this._style["border-right"] = value;
|
|
215
|
-
return this;
|
|
216
|
-
}
|
|
217
|
-
border_left(value) {
|
|
218
|
-
if (value == null)
|
|
219
|
-
return this._style["border-left"];
|
|
220
|
-
this._style["border-left"] = value;
|
|
221
|
-
return this;
|
|
222
|
-
}
|
|
223
|
-
border_color(value) {
|
|
224
|
-
if (value == null)
|
|
225
|
-
return this._style["border-color"];
|
|
226
|
-
this._style["border-color"] = value;
|
|
227
|
-
return this;
|
|
228
|
-
}
|
|
229
|
-
border_style(value) {
|
|
230
|
-
if (value == null)
|
|
231
|
-
return this._style["border-style"];
|
|
232
|
-
this._style["border-style"] = value;
|
|
233
|
-
return this;
|
|
234
|
-
}
|
|
235
|
-
cursor(value) {
|
|
236
|
-
if (value == null)
|
|
237
|
-
return this._style["cursor"];
|
|
238
|
-
this._style["cursor"] = value;
|
|
239
|
-
return this;
|
|
240
|
-
}
|
|
241
|
-
justify_items(value) {
|
|
242
|
-
if (value == null)
|
|
243
|
-
return this._style["justify-items"];
|
|
244
|
-
this._style["justify-items"] = value;
|
|
245
|
-
return this;
|
|
246
|
-
}
|
|
247
|
-
letter_spacing(value) {
|
|
248
|
-
if (value == null)
|
|
249
|
-
return this._style["letter-spacing"];
|
|
250
|
-
this._style["letter-spacing"] = value;
|
|
251
|
-
return this;
|
|
252
|
-
}
|
|
253
|
-
line_height(value) {
|
|
254
|
-
if (value == null)
|
|
255
|
-
return this._style["line-height"];
|
|
256
|
-
this._style["line-height"] = value;
|
|
257
|
-
return this;
|
|
258
|
-
}
|
|
259
|
-
outline(value) {
|
|
260
|
-
if (value == null)
|
|
261
|
-
return this._style["outline"];
|
|
262
|
-
this._style["outline"] = value;
|
|
263
|
-
return this;
|
|
264
|
-
}
|
|
265
|
-
overflow(value) {
|
|
266
|
-
if (value == null)
|
|
267
|
-
return this._style["overflow"];
|
|
268
|
-
this._style["overflow"] = value;
|
|
269
|
-
return this;
|
|
270
|
-
}
|
|
271
|
-
overflow_x(value) {
|
|
272
|
-
if (value == null)
|
|
273
|
-
return this._style["overflow-x"];
|
|
274
|
-
this._style["overflow-x"] = value;
|
|
275
|
-
return this;
|
|
276
|
-
}
|
|
277
|
-
overflow_y(value) {
|
|
278
|
-
if (value == null)
|
|
279
|
-
return this._style["overflow-y"];
|
|
280
|
-
this._style["overflow-y"] = value;
|
|
281
|
-
return this;
|
|
282
|
-
}
|
|
283
|
-
text_align(value) {
|
|
284
|
-
if (value == null)
|
|
285
|
-
return this._style["text-align"];
|
|
286
|
-
this._style["text-align"] = value;
|
|
287
|
-
return this;
|
|
288
|
-
}
|
|
289
|
-
text_align_last(value) {
|
|
290
|
-
if (value == null)
|
|
291
|
-
return this._style["text-align-last"];
|
|
292
|
-
this._style["text-align-last"] = value;
|
|
293
|
-
return this;
|
|
294
|
-
}
|
|
295
|
-
text_decoration(value) {
|
|
296
|
-
if (value == null)
|
|
297
|
-
return this._style["text-decoration"];
|
|
298
|
-
this._style["text-decoration"] = value;
|
|
299
|
-
return this;
|
|
300
|
-
}
|
|
301
|
-
text_decoration_color(value) {
|
|
302
|
-
if (value == null)
|
|
303
|
-
return this._style["text-decoration-color"];
|
|
304
|
-
this._style["text-decoration-color"] = value;
|
|
305
|
-
return this;
|
|
306
|
-
}
|
|
307
|
-
text_wrap(value) {
|
|
308
|
-
if (value == null)
|
|
309
|
-
return this._style["text-wrap"];
|
|
310
|
-
this._style["text-wrap"] = value;
|
|
311
|
-
return this;
|
|
312
|
-
}
|
|
313
|
-
white_space(value) {
|
|
314
|
-
if (value == null)
|
|
315
|
-
return this._style["white-space"];
|
|
316
|
-
this._style["white-space"] = value;
|
|
317
|
-
return this;
|
|
318
|
-
}
|
|
319
|
-
overflow_wrap(value) {
|
|
320
|
-
if (value == null)
|
|
321
|
-
return this._style["overflow-wrap"];
|
|
322
|
-
this._style["overflow-wrap"] = value;
|
|
323
|
-
return this;
|
|
324
|
-
}
|
|
325
|
-
word_wrap(value) {
|
|
326
|
-
if (value == null)
|
|
327
|
-
return this._style["word-wrap"];
|
|
328
|
-
this._style["word-wrap"] = value;
|
|
329
|
-
return this;
|
|
330
|
-
}
|
|
331
|
-
box_shadow(value) {
|
|
332
|
-
if (value == null)
|
|
333
|
-
return this._style["box-shadow"];
|
|
334
|
-
this._style["box-shadow"] = value;
|
|
335
|
-
return this;
|
|
336
|
-
}
|
|
337
|
-
drop_shadow(value) {
|
|
338
|
-
if (value == null)
|
|
339
|
-
return this._style["drop-shadow"];
|
|
340
|
-
this._style["drop-shadow"] = value;
|
|
341
|
-
return this;
|
|
342
|
-
}
|
|
343
|
-
font_size(value) {
|
|
344
|
-
if (value == null)
|
|
345
|
-
return this._style["font-size"];
|
|
346
|
-
this._style["font-size"] = this.pad_numeric(value);
|
|
347
|
-
return this;
|
|
348
|
-
}
|
|
349
|
-
font(value) {
|
|
350
|
-
if (value == null)
|
|
351
|
-
return this._style["font"];
|
|
352
|
-
this._style["font"] = this.pad_numeric(value);
|
|
353
|
-
return this;
|
|
354
|
-
}
|
|
355
|
-
font_family(value) {
|
|
356
|
-
if (value == null)
|
|
357
|
-
return this._style["font-family"];
|
|
358
|
-
this._style["font-family"] = this.pad_numeric(value);
|
|
359
|
-
return this;
|
|
360
|
-
}
|
|
361
|
-
font_style(value) {
|
|
362
|
-
if (value == null)
|
|
363
|
-
return this._style["font-style"];
|
|
364
|
-
this._style["font-style"] = this.pad_numeric(value);
|
|
365
|
-
return this;
|
|
366
|
-
}
|
|
367
|
-
font_weight(value) {
|
|
368
|
-
if (value == null)
|
|
369
|
-
return this._style["font-weight"];
|
|
370
|
-
this._style["font-weight"] = this.pad_numeric(value);
|
|
371
|
-
return this;
|
|
372
|
-
}
|
|
373
|
-
width(value) {
|
|
374
|
-
if (value == null)
|
|
375
|
-
return this._style["width"];
|
|
376
|
-
this._style["width"] = this.pad_numeric(value);
|
|
377
|
-
return this;
|
|
378
|
-
}
|
|
379
|
-
min_width(value) {
|
|
380
|
-
if (value == null)
|
|
381
|
-
return this._style["min-width"];
|
|
382
|
-
this._style["min-width"] = this.pad_numeric(value);
|
|
383
|
-
return this;
|
|
384
|
-
}
|
|
385
|
-
max_width(value) {
|
|
386
|
-
if (value == null)
|
|
387
|
-
return this._style["max-width"];
|
|
388
|
-
this._style["max-width"] = this.pad_numeric(value);
|
|
389
|
-
return this;
|
|
390
|
-
}
|
|
391
|
-
height(value) {
|
|
392
|
-
if (value == null)
|
|
393
|
-
return this._style["height"];
|
|
394
|
-
this._style["height"] = this.pad_numeric(value);
|
|
395
|
-
return this;
|
|
396
|
-
}
|
|
397
|
-
min_height(value) {
|
|
398
|
-
if (value == null)
|
|
399
|
-
return this._style["min-height"];
|
|
400
|
-
this._style["min-height"] = this.pad_numeric(value);
|
|
401
|
-
return this;
|
|
402
|
-
}
|
|
403
|
-
max_height(value) {
|
|
404
|
-
if (value == null)
|
|
405
|
-
return this._style["max-height"];
|
|
406
|
-
this._style["max-height"] = this.pad_numeric(value);
|
|
407
|
-
return this;
|
|
408
|
-
}
|
|
409
|
-
margin_top(value) {
|
|
410
|
-
if (value == null)
|
|
411
|
-
return this._style["margin-top"];
|
|
412
|
-
this._style["margin-top"] = this.pad_numeric(value);
|
|
413
|
-
return this;
|
|
414
|
-
}
|
|
415
|
-
margin_bottom(value) {
|
|
416
|
-
if (value == null)
|
|
417
|
-
return this._style["margin-bottom"];
|
|
418
|
-
this._style["margin-bottom"] = this.pad_numeric(value);
|
|
419
|
-
return this;
|
|
420
|
-
}
|
|
421
|
-
margin_right(value) {
|
|
422
|
-
if (value == null)
|
|
423
|
-
return this._style["margin-right"];
|
|
424
|
-
this._style["margin-right"] = this.pad_numeric(value);
|
|
425
|
-
return this;
|
|
426
|
-
}
|
|
427
|
-
margin_left(value) {
|
|
428
|
-
if (value == null)
|
|
429
|
-
return this._style["margin-left"];
|
|
430
|
-
this._style["margin-left"] = this.pad_numeric(value);
|
|
431
|
-
return this;
|
|
432
|
-
}
|
|
433
|
-
padding_top(value) {
|
|
434
|
-
if (value == null)
|
|
435
|
-
return this._style["padding-top"];
|
|
436
|
-
this._style["padding-top"] = this.pad_numeric(value);
|
|
437
|
-
return this;
|
|
438
|
-
}
|
|
439
|
-
padding_bottom(value) {
|
|
440
|
-
if (value == null)
|
|
441
|
-
return this._style["padding-bottom"];
|
|
442
|
-
this._style["padding-bottom"] = this.pad_numeric(value);
|
|
443
|
-
return this;
|
|
444
|
-
}
|
|
445
|
-
padding_right(value) {
|
|
446
|
-
if (value == null)
|
|
447
|
-
return this._style["padding-right"];
|
|
448
|
-
this._style["padding-right"] = this.pad_numeric(value);
|
|
449
|
-
return this;
|
|
450
|
-
}
|
|
451
|
-
padding_left(value) {
|
|
452
|
-
if (value == null)
|
|
453
|
-
return this._style["padding-left"];
|
|
454
|
-
this._style["padding-left"] = this.pad_numeric(value);
|
|
455
|
-
return this;
|
|
456
|
-
}
|
|
457
|
-
border_width(value) {
|
|
458
|
-
if (value == null)
|
|
459
|
-
return this._style["border-width"];
|
|
460
|
-
this._style["border-width"] = this.pad_numeric(value);
|
|
461
|
-
return this;
|
|
462
|
-
}
|
|
463
|
-
align_items(value) {
|
|
464
|
-
if (value == null)
|
|
465
|
-
return this._style["align-items"];
|
|
466
|
-
this._style["align-items"] = value;
|
|
467
|
-
this._style["-ms-align-items"] = value;
|
|
468
|
-
this._style["-webkit-align-items"] = value;
|
|
469
|
-
this._style["-moz-align-items"] = value;
|
|
470
|
-
return this;
|
|
471
|
-
}
|
|
472
|
-
align_content(value) {
|
|
473
|
-
if (value == null)
|
|
474
|
-
return this._style["align-content"];
|
|
475
|
-
this._style["align-content"] = value;
|
|
476
|
-
this._style["-ms-align-content"] = value;
|
|
477
|
-
this._style["-webkit-align-content"] = value;
|
|
478
|
-
this._style["-moz-align-content"] = value;
|
|
479
|
-
return this;
|
|
480
|
-
}
|
|
481
|
-
background_size(value) {
|
|
482
|
-
if (value == null)
|
|
483
|
-
return this._style["background-size"];
|
|
484
|
-
this._style["background-size"] = value;
|
|
485
|
-
this._style["-ms-background-size"] = value;
|
|
486
|
-
this._style["-webkit-background-size"] = value;
|
|
487
|
-
this._style["-moz-background-size"] = value;
|
|
488
|
-
return this;
|
|
489
|
-
}
|
|
490
|
-
box_sizing(value) {
|
|
491
|
-
if (value == null)
|
|
492
|
-
return this._style["box-sizing"];
|
|
493
|
-
this._style["box-sizing"] = value;
|
|
494
|
-
this._style["-ms-box-sizing"] = value;
|
|
495
|
-
this._style["-webkit-box-sizing"] = value;
|
|
496
|
-
this._style["-moz-box-sizing"] = value;
|
|
497
|
-
return this;
|
|
498
|
-
}
|
|
499
|
-
flex(value) {
|
|
500
|
-
if (value == null)
|
|
501
|
-
return this._style["flex"];
|
|
502
|
-
this._style["flex"] = value;
|
|
503
|
-
this._style["-ms-flex"] = value;
|
|
504
|
-
this._style["-webkit-flex"] = value;
|
|
505
|
-
this._style["-moz-flex"] = value;
|
|
506
|
-
return this;
|
|
507
|
-
}
|
|
508
|
-
flex_grow(value) {
|
|
509
|
-
if (value == null)
|
|
510
|
-
return this._style["flex-grow"];
|
|
511
|
-
this._style["flex-grow"] = value;
|
|
512
|
-
this._style["-ms-flex-grow"] = value;
|
|
513
|
-
this._style["-webkit-flex-grow"] = value;
|
|
514
|
-
this._style["-moz-flex-grow"] = value;
|
|
515
|
-
return this;
|
|
516
|
-
}
|
|
517
|
-
flex_shrink(value) {
|
|
518
|
-
if (value == null)
|
|
519
|
-
return this._style["flex-shrink"];
|
|
520
|
-
this._style["flex-shrink"] = value;
|
|
521
|
-
this._style["-ms-flex-shrink"] = value;
|
|
522
|
-
this._style["-webkit-flex-shrink"] = value;
|
|
523
|
-
this._style["-moz-flex-shrink"] = value;
|
|
524
|
-
return this;
|
|
525
|
-
}
|
|
526
|
-
justify_content(value) {
|
|
527
|
-
if (value == null)
|
|
528
|
-
return this._style["justify-content"];
|
|
529
|
-
this._style["justify-content"] = value;
|
|
530
|
-
this._style["-ms-justify-content"] = value;
|
|
531
|
-
this._style["-webkit-justify-content"] = value;
|
|
532
|
-
this._style["-moz-justify-content"] = value;
|
|
533
|
-
return this;
|
|
534
|
-
}
|
|
535
|
-
mask(value) {
|
|
536
|
-
if (value == null)
|
|
537
|
-
return this._style["mask"];
|
|
538
|
-
this._style["mask"] = value;
|
|
539
|
-
this._style["-ms-mask"] = value;
|
|
540
|
-
this._style["-webkit-mask"] = value;
|
|
541
|
-
this._style["-moz-mask"] = value;
|
|
542
|
-
return this;
|
|
543
|
-
}
|
|
544
|
-
user_select(value) {
|
|
545
|
-
if (value == null)
|
|
546
|
-
return this._style["user-select"];
|
|
547
|
-
this._style["user-select"] = value;
|
|
548
|
-
this._style["-ms-user-select"] = value;
|
|
549
|
-
this._style["-webkit-user-select"] = value;
|
|
550
|
-
this._style["-moz-user-select"] = value;
|
|
551
|
-
return this;
|
|
552
|
-
}
|
|
553
|
-
// ---------------------------------------------------------
|
|
554
|
-
// Edit the element.
|
|
555
|
-
// Style the element.
|
|
556
|
-
styles(styles) {
|
|
557
|
-
Object.keys(styles).forEach((key) => {
|
|
558
|
-
this._style[key] = styles[key];
|
|
559
|
-
});
|
|
560
|
-
return this;
|
|
561
|
-
}
|
|
562
|
-
// Add attributes to the element.
|
|
563
|
-
attrs(attrs) {
|
|
564
|
-
Object.keys(attrs).forEach((key) => {
|
|
565
|
-
this._attrs[key] = attrs[key];
|
|
566
|
-
});
|
|
567
|
-
return this;
|
|
568
|
-
}
|
|
569
|
-
// Add events to the element.
|
|
570
|
-
events(events) {
|
|
571
|
-
Object.keys(events).forEach((key) => {
|
|
572
|
-
this._attrs[key] = events[key];
|
|
573
|
-
});
|
|
574
|
-
return this;
|
|
575
|
-
}
|
|
576
|
-
// Add class.
|
|
577
|
-
add_class(name) {
|
|
578
|
-
if (this.classes.includes(name) === false) {
|
|
579
|
-
this.classes.push(name);
|
|
580
|
-
}
|
|
581
|
-
return this;
|
|
582
|
-
}
|
|
583
|
-
// Remove class.
|
|
584
|
-
remove_class(name) {
|
|
585
|
-
this.classes = this.classes.filter((cls) => cls !== name);
|
|
586
|
-
return this;
|
|
587
|
-
}
|
|
588
|
-
// Append a child.
|
|
589
|
-
append(...children) {
|
|
590
|
-
children.forEach((child) => {
|
|
591
|
-
// Skip undefined.
|
|
592
|
-
if (child == null) {
|
|
593
|
-
return;
|
|
594
|
-
}
|
|
595
|
-
// Array.
|
|
596
|
-
else if (Array.isArray(child)) {
|
|
597
|
-
this.append(...child);
|
|
598
|
-
}
|
|
599
|
-
// Execute function.
|
|
600
|
-
else if (typeof child === "function") {
|
|
601
|
-
this.append(child(this));
|
|
602
|
-
}
|
|
603
|
-
// Default.
|
|
604
|
-
else {
|
|
605
|
-
this.children.push(child);
|
|
606
|
-
}
|
|
607
|
-
});
|
|
608
|
-
return this;
|
|
609
|
-
}
|
|
610
|
-
inner_html(value) {
|
|
611
|
-
if (value == null) {
|
|
612
|
-
return this._inner_html;
|
|
613
|
-
}
|
|
614
|
-
this._inner_html = value;
|
|
615
|
-
return this;
|
|
616
|
-
}
|
|
617
|
-
// ---------------------------------------------------------
|
|
618
|
-
// Styling.
|
|
619
|
-
// Center the data.
|
|
620
|
-
center() {
|
|
621
|
-
switch (this.tag) {
|
|
622
|
-
case "table":
|
|
623
|
-
case "tr":
|
|
624
|
-
case "td":
|
|
625
|
-
this._attrs["align"] = "center";
|
|
626
|
-
return this;
|
|
627
|
-
default:
|
|
628
|
-
this._style["text-align"] = "center";
|
|
629
|
-
return this;
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
padding(...values) {
|
|
633
|
-
if (values.length === 0) {
|
|
634
|
-
return this._style.padding;
|
|
635
|
-
}
|
|
636
|
-
else if (values.length === 1) {
|
|
637
|
-
this._style.padding = this.pad_numeric(values[0]);
|
|
638
|
-
}
|
|
639
|
-
else if (values.length === 2) {
|
|
640
|
-
if (values[0] != null) {
|
|
641
|
-
this._style["padding-top"] = this.pad_numeric(values[0]);
|
|
642
|
-
}
|
|
643
|
-
if (values[1] != null) {
|
|
644
|
-
this._style["padding-right"] = this.pad_numeric(values[1]);
|
|
645
|
-
}
|
|
646
|
-
if (values[0] != null) {
|
|
647
|
-
this._style["padding-bottom"] = this.pad_numeric(values[0]);
|
|
648
|
-
}
|
|
649
|
-
if (values[1] != null) {
|
|
650
|
-
this._style["padding-left"] = this.pad_numeric(values[1]);
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
else if (values.length === 4) {
|
|
654
|
-
this._style["padding-top"] = this.pad_numeric(values[0]);
|
|
655
|
-
if (values[1] != null) {
|
|
656
|
-
this._style["padding-right"] = this.pad_numeric(values[1]);
|
|
657
|
-
}
|
|
658
|
-
if (values[2] != null) {
|
|
659
|
-
this._style["padding-bottom"] = this.pad_numeric(values[2]);
|
|
660
|
-
}
|
|
661
|
-
if (values[3] != null) {
|
|
662
|
-
this._style["padding-left"] = this.pad_numeric(values[3]);
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
else {
|
|
666
|
-
console.error("Invalid number of arguments for function \"padding()\".");
|
|
667
|
-
}
|
|
668
|
-
return this;
|
|
669
|
-
}
|
|
670
|
-
margin(...values) {
|
|
671
|
-
if (values.length === 0) {
|
|
672
|
-
return this._style.margin;
|
|
673
|
-
}
|
|
674
|
-
else if (values.length === 1) {
|
|
675
|
-
this._style.margin = this.pad_numeric(values[0]);
|
|
676
|
-
}
|
|
677
|
-
else if (values.length === 2) {
|
|
678
|
-
this._style["margin-top"] = this.pad_numeric(values[0]);
|
|
679
|
-
if (values[1] != null) {
|
|
680
|
-
this._style["margin-left"] = this.pad_numeric(values[1]);
|
|
681
|
-
}
|
|
682
|
-
if (values[0] != null) {
|
|
683
|
-
this._style["margin-bottom"] = this.pad_numeric(values[0]);
|
|
684
|
-
}
|
|
685
|
-
if (values[1] != null) {
|
|
686
|
-
this._style["margin-left"] = this.pad_numeric(values[1]);
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
else if (values.length === 4) {
|
|
690
|
-
this._style["margin-top"] = this.pad_numeric(values[0]);
|
|
691
|
-
if (values[1] != null) {
|
|
692
|
-
this._style["margin-left"] = this.pad_numeric(values[1]);
|
|
693
|
-
}
|
|
694
|
-
if (values[2] != null) {
|
|
695
|
-
this._style["margin-bottom"] = this.pad_numeric(values[2]);
|
|
696
|
-
}
|
|
697
|
-
if (values[3] != null) {
|
|
698
|
-
this._style["margin-left"] = this.pad_numeric(values[3]);
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
else {
|
|
702
|
-
console.error("Invalid number of arguments for function \"margin()\".");
|
|
703
|
-
}
|
|
704
|
-
return this;
|
|
705
|
-
}
|
|
706
|
-
fixed_width(value) {
|
|
707
|
-
if (value == null) {
|
|
708
|
-
return this._style["min-width"];
|
|
709
|
-
}
|
|
710
|
-
value = this.pad_numeric(value);
|
|
711
|
-
this._style["width"] = value; // also required for for example image masks.
|
|
712
|
-
this._style["min-width"] = value;
|
|
713
|
-
this._style["max-width"] = value;
|
|
714
|
-
return this;
|
|
715
|
-
}
|
|
716
|
-
fixed_height(value) {
|
|
717
|
-
if (value == null) {
|
|
718
|
-
return this._style.height;
|
|
719
|
-
}
|
|
720
|
-
value = this.pad_numeric(value);
|
|
721
|
-
this._style["height"] = value; // also required for for example image masks.
|
|
722
|
-
this._style["min-height"] = value;
|
|
723
|
-
this._style["max-height"] = value;
|
|
724
|
-
return this;
|
|
725
|
-
}
|
|
726
|
-
// Frame.
|
|
727
|
-
frame(width, height) {
|
|
728
|
-
if (width != null) {
|
|
729
|
-
this.width(width);
|
|
730
|
-
}
|
|
731
|
-
if (height != null) {
|
|
732
|
-
this.height(height);
|
|
733
|
-
}
|
|
734
|
-
return this;
|
|
735
|
-
}
|
|
736
|
-
min_frame(width, height) {
|
|
737
|
-
if (width != null) {
|
|
738
|
-
this.min_width(width);
|
|
739
|
-
}
|
|
740
|
-
if (height != null) {
|
|
741
|
-
this.min_height(height);
|
|
742
|
-
}
|
|
743
|
-
return this;
|
|
744
|
-
}
|
|
745
|
-
max_frame(width, height) {
|
|
746
|
-
if (width != null) {
|
|
747
|
-
this.max_width(width);
|
|
748
|
-
}
|
|
749
|
-
if (height != null) {
|
|
750
|
-
this.max_height(height);
|
|
751
|
-
}
|
|
752
|
-
return this;
|
|
753
|
-
}
|
|
754
|
-
fixed_frame(width, height) {
|
|
755
|
-
if (width != null) {
|
|
756
|
-
width = this.pad_numeric(width);
|
|
757
|
-
this._style.width = width; // also required for for example image masks.
|
|
758
|
-
this._style["min-width"] = width;
|
|
759
|
-
this._style["max-width"] = width;
|
|
760
|
-
}
|
|
761
|
-
if (height != null) {
|
|
762
|
-
height = this.pad_numeric(height);
|
|
763
|
-
this._style.height = height; // also required for for example image masks.
|
|
764
|
-
this._style["min-height"] = height;
|
|
765
|
-
this._style["max-height"] = height;
|
|
766
|
-
}
|
|
767
|
-
return this;
|
|
768
|
-
}
|
|
769
|
-
color(value) {
|
|
770
|
-
if (value == null) {
|
|
771
|
-
return this._style.color;
|
|
772
|
-
}
|
|
773
|
-
if (value.startsWith("linear-gradient(") || value.startsWith("radial-gradient(")) {
|
|
774
|
-
this._style["background-image"] = value;
|
|
775
|
-
this._style["background-clip"] = "text";
|
|
776
|
-
this._style["-webkit-background-clip"] = "text";
|
|
777
|
-
this._style.color = "transparent";
|
|
778
|
-
}
|
|
779
|
-
else {
|
|
780
|
-
this._style.color = value;
|
|
781
|
-
}
|
|
782
|
-
return this;
|
|
783
|
-
}
|
|
784
|
-
border(...values) {
|
|
785
|
-
if (values.length === 0) {
|
|
786
|
-
return this._style.border;
|
|
787
|
-
}
|
|
788
|
-
else if (values.length === 1) {
|
|
789
|
-
this._style.border = values[0].toString();
|
|
790
|
-
}
|
|
791
|
-
else if (values.length === 2) {
|
|
792
|
-
this._style.border = `${this.pad_numeric(values[0])} solid ${values[1]}`;
|
|
793
|
-
}
|
|
794
|
-
else if (values.length === 3) {
|
|
795
|
-
this._style.border = `${this.pad_numeric(values[0])} ${values[1]} ${values[2]}`;
|
|
796
|
-
}
|
|
797
|
-
else {
|
|
798
|
-
console.error("Invalid number of arguments for function \"border()\".");
|
|
799
|
-
}
|
|
800
|
-
return this;
|
|
801
|
-
}
|
|
802
|
-
border_radius(value) {
|
|
803
|
-
if (value == null) {
|
|
804
|
-
return this._style["border-radius"];
|
|
805
|
-
}
|
|
806
|
-
const paddedValue = this.pad_numeric(value);
|
|
807
|
-
this._style["border-radius"] = paddedValue;
|
|
808
|
-
this._style["-ms-border-radius"] = paddedValue;
|
|
809
|
-
this._style["-webkit-border-radius"] = paddedValue;
|
|
810
|
-
this._style["-moz-border-radius"] = paddedValue;
|
|
811
|
-
return this;
|
|
812
|
-
}
|
|
813
|
-
background(value) {
|
|
814
|
-
if (value == null) {
|
|
815
|
-
return this._style.background;
|
|
816
|
-
}
|
|
817
|
-
if (typeof value === "string" && (value.startsWith("linear-gradient") || value.startsWith("radial-gradient"))) {
|
|
818
|
-
this._style.background = value;
|
|
819
|
-
this._style["background-image"] = value;
|
|
820
|
-
this._style["background-repeat"] = "no-repeat";
|
|
821
|
-
this._style["background-size"] = "cover";
|
|
822
|
-
}
|
|
823
|
-
else {
|
|
824
|
-
this._style.background = value;
|
|
825
|
-
}
|
|
826
|
-
return this;
|
|
827
|
-
}
|
|
828
|
-
ellipsis_overflow(to = true) {
|
|
829
|
-
if (to == null) {
|
|
830
|
-
return this._style["text-overflow"] === "ellipsis";
|
|
831
|
-
}
|
|
832
|
-
else if (to === true) {
|
|
833
|
-
this._style["text-overflow"] = "ellipsis";
|
|
834
|
-
this._style["white-space"] = "nowrap";
|
|
835
|
-
this._style.overflow = "hidden";
|
|
836
|
-
this._style["text-wrap"] = "wrap";
|
|
837
|
-
this._style["overflow-wrap"] = "break-word";
|
|
838
|
-
}
|
|
839
|
-
else if (to === false) {
|
|
840
|
-
this._style["text-overflow"] = "default";
|
|
841
|
-
this._style["white-space"] = "default";
|
|
842
|
-
this._style.overflow = "default";
|
|
843
|
-
this._style["text-wrap"] = "default";
|
|
844
|
-
this._style["overflow-wrap"] = "default";
|
|
845
|
-
}
|
|
846
|
-
return this;
|
|
847
|
-
}
|
|
848
|
-
on_click(callback) {
|
|
849
|
-
if (callback == null) {
|
|
850
|
-
return this._attrs.onclick;
|
|
851
|
-
}
|
|
852
|
-
this._style.cursor = "pointer";
|
|
853
|
-
const e = this;
|
|
854
|
-
this._attrs.onclick = (t) => {
|
|
855
|
-
if (this._disabled !== true) {
|
|
856
|
-
callback(e, t);
|
|
857
|
-
}
|
|
858
|
-
};
|
|
859
|
-
return this;
|
|
860
|
-
}
|
|
861
|
-
lang(value) {
|
|
862
|
-
if (value == null) {
|
|
863
|
-
return this._lang;
|
|
864
|
-
}
|
|
865
|
-
this._lang = value;
|
|
866
|
-
return this;
|
|
867
|
-
}
|
|
868
|
-
charset(value) {
|
|
869
|
-
if (value == null) {
|
|
870
|
-
return this._charset;
|
|
871
|
-
}
|
|
872
|
-
this._charset = value;
|
|
873
|
-
return this;
|
|
874
|
-
}
|
|
875
|
-
viewport(value) {
|
|
876
|
-
if (value == null) {
|
|
877
|
-
return this._viewport;
|
|
878
|
-
}
|
|
879
|
-
this._viewport = value;
|
|
880
|
-
return this;
|
|
881
|
-
}
|
|
882
|
-
title(value) {
|
|
883
|
-
if (value == null) {
|
|
884
|
-
return this._title;
|
|
885
|
-
}
|
|
886
|
-
this._title = value;
|
|
887
|
-
return this;
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
// Create a constructor wrapper.
|
|
891
|
-
function wrapper(constructor) {
|
|
892
|
-
return (...args) => new constructor(...args);
|
|
893
|
-
}
|
|
894
|
-
// Create a shared null element mainly for typescript types.
|
|
895
|
-
function create_null(target_class) {
|
|
896
|
-
let instance;
|
|
897
|
-
return () => {
|
|
898
|
-
if (instance === undefined) {
|
|
899
|
-
instance = new target_class();
|
|
900
|
-
}
|
|
901
|
-
return instance;
|
|
902
|
-
};
|
|
903
|
-
}
|
|
904
|
-
// ---------------------------------------------------------
|
|
905
|
-
// Title.
|
|
906
|
-
export class TitleElement extends Element {
|
|
907
|
-
// Constructor.
|
|
908
|
-
constructor(text) {
|
|
909
|
-
// Initialize base class.
|
|
910
|
-
super({
|
|
911
|
-
type: "Title",
|
|
912
|
-
tag: "h1",
|
|
913
|
-
default_style: {
|
|
914
|
-
"margin": "0px 0px 0px 0px",
|
|
915
|
-
"color": "inherit",
|
|
916
|
-
"white-space": "wrap",
|
|
917
|
-
"text-align": "inherit",
|
|
918
|
-
"font-size": "26px",
|
|
919
|
-
"line-height": "1.2em",
|
|
920
|
-
},
|
|
921
|
-
});
|
|
922
|
-
// Set text.
|
|
923
|
-
if (text) {
|
|
924
|
-
this._inner_html = text;
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
export const Title = wrapper(TitleElement);
|
|
929
|
-
export const NullTitle = create_null(TitleElement);
|
|
930
|
-
// ---------------------------------------------------------
|
|
931
|
-
// Subtitle.
|
|
932
|
-
export class SubtitleElement extends Element {
|
|
933
|
-
// Constructor.
|
|
934
|
-
constructor(text) {
|
|
935
|
-
// Initialize base class.
|
|
936
|
-
super({
|
|
937
|
-
type: "Subtitle",
|
|
938
|
-
tag: "h2",
|
|
939
|
-
default_style: {
|
|
940
|
-
"margin": "0px",
|
|
941
|
-
"color": "inherit",
|
|
942
|
-
"white-space": "wrap",
|
|
943
|
-
"text-align": "inherit",
|
|
944
|
-
"font-size": "22px",
|
|
945
|
-
"line-height": "1.2em",
|
|
946
|
-
},
|
|
947
|
-
});
|
|
948
|
-
// Set text.
|
|
949
|
-
if (text) {
|
|
950
|
-
this._inner_html = text;
|
|
951
|
-
}
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
export const Subtitle = wrapper(SubtitleElement);
|
|
955
|
-
export const NullSubtitle = create_null(SubtitleElement);
|
|
956
|
-
// ---------------------------------------------------------
|
|
957
|
-
// Text.
|
|
958
|
-
export class TextElement extends Element {
|
|
959
|
-
// Constructor.
|
|
960
|
-
constructor(text) {
|
|
961
|
-
// Initialize base class.
|
|
962
|
-
super({
|
|
963
|
-
type: "Text",
|
|
964
|
-
tag: "p",
|
|
965
|
-
default_style: {
|
|
966
|
-
"margin": "0px",
|
|
967
|
-
"padding": "0px",
|
|
968
|
-
"font-size": "18px",
|
|
969
|
-
"line-height": "1.4em",
|
|
970
|
-
"color": "inherit",
|
|
971
|
-
"text-align": "inherit",
|
|
972
|
-
"white-space": "wrap",
|
|
973
|
-
},
|
|
974
|
-
});
|
|
975
|
-
// Set text.
|
|
976
|
-
if (text) {
|
|
977
|
-
this._inner_html = text;
|
|
978
|
-
}
|
|
979
|
-
}
|
|
980
|
-
}
|
|
981
|
-
export const Text = wrapper(TextElement);
|
|
982
|
-
export const NullText = create_null(TextElement);
|
|
983
|
-
// ---------------------------------------------------------
|
|
984
|
-
// Image.
|
|
985
|
-
export class ImageElement extends Element {
|
|
986
|
-
// Constructor.
|
|
987
|
-
constructor(src) {
|
|
988
|
-
// Initialize base class.
|
|
989
|
-
super({
|
|
990
|
-
type: "Image",
|
|
991
|
-
tag: "img",
|
|
992
|
-
default_style: {
|
|
993
|
-
"margin": "0px",
|
|
994
|
-
"padding": "0px",
|
|
995
|
-
"object-fit": "cover",
|
|
996
|
-
},
|
|
997
|
-
});
|
|
998
|
-
// Set src.
|
|
999
|
-
if (src) {
|
|
1000
|
-
this._attrs.src = src;
|
|
1001
|
-
}
|
|
1002
|
-
}
|
|
1003
|
-
}
|
|
1004
|
-
export const Image = wrapper(ImageElement);
|
|
1005
|
-
export const NullImageElement = create_null(ImageElement);
|
|
1006
|
-
// ---------------------------------------------------------
|
|
1007
|
-
// ImageMask.
|
|
1008
|
-
export class ImageMaskElement extends Element {
|
|
1009
|
-
mask_child;
|
|
1010
|
-
_src;
|
|
1011
|
-
// Constructor.
|
|
1012
|
-
constructor(src) {
|
|
1013
|
-
// Initialize base class.
|
|
1014
|
-
super({
|
|
1015
|
-
type: "ImageMask",
|
|
1016
|
-
tag: "div",
|
|
1017
|
-
default_style: {
|
|
1018
|
-
"margin": "0px",
|
|
1019
|
-
"padding": "0px",
|
|
1020
|
-
"object-fit": "cover",
|
|
1021
|
-
"display": "inline-block",
|
|
1022
|
-
},
|
|
1023
|
-
});
|
|
1024
|
-
// Append child.
|
|
1025
|
-
this.mask_child = VStack()
|
|
1026
|
-
.width("100%")
|
|
1027
|
-
.height("100%")
|
|
1028
|
-
.background("black");
|
|
1029
|
-
if (src != null) {
|
|
1030
|
-
this.mask_child.mask(`url('${src}') no-repeat center/contain`);
|
|
1031
|
-
}
|
|
1032
|
-
this.append(this.mask_child);
|
|
1033
|
-
// Set src.
|
|
1034
|
-
if (src) {
|
|
1035
|
-
this.src(src);
|
|
1036
|
-
}
|
|
1037
|
-
}
|
|
1038
|
-
mask_color(value) {
|
|
1039
|
-
if (value == null) {
|
|
1040
|
-
return this.mask_child._style.background;
|
|
1041
|
-
}
|
|
1042
|
-
this.mask_child._style.background = value;
|
|
1043
|
-
return this;
|
|
1044
|
-
}
|
|
1045
|
-
src(value) {
|
|
1046
|
-
if (value == null) {
|
|
1047
|
-
return this._src;
|
|
1048
|
-
}
|
|
1049
|
-
this.mask_child.mask(`url('${value}') no-repeat center/contain`);
|
|
1050
|
-
this._src = value;
|
|
1051
|
-
return this;
|
|
1052
|
-
}
|
|
1053
|
-
mask(value) {
|
|
1054
|
-
if (value == null) {
|
|
1055
|
-
return this.mask_child.mask();
|
|
1056
|
-
}
|
|
1057
|
-
this.mask_child.mask(value);
|
|
1058
|
-
return this;
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
export const ImageMask = wrapper(ImageMaskElement);
|
|
1062
|
-
export const NullImageMaskElement = create_null(ImageMaskElement);
|
|
1063
|
-
// ---------------------------------------------------------
|
|
1064
|
-
// VStack.
|
|
1065
|
-
export class VStackElement extends Element {
|
|
1066
|
-
// Constructor.
|
|
1067
|
-
constructor(...children) {
|
|
1068
|
-
// Initialize base class.
|
|
1069
|
-
super({
|
|
1070
|
-
type: "VStack",
|
|
1071
|
-
tag: "div",
|
|
1072
|
-
});
|
|
1073
|
-
// Add children.
|
|
1074
|
-
this.append(...children);
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
export const VStack = wrapper(VStackElement);
|
|
1078
|
-
export const NullVStackElement = create_null(VStackElement);
|
|
1079
|
-
// ---------------------------------------------------------
|
|
1080
|
-
// Divider.
|
|
1081
|
-
export class DividerElement extends Element {
|
|
1082
|
-
// Constructor.
|
|
1083
|
-
constructor(text) {
|
|
1084
|
-
// Initialize base class.
|
|
1085
|
-
super({
|
|
1086
|
-
type: "Divider",
|
|
1087
|
-
tag: "div",
|
|
1088
|
-
default_style: {
|
|
1089
|
-
"margin": "0px",
|
|
1090
|
-
"padding": "0px",
|
|
1091
|
-
"width": "100%",
|
|
1092
|
-
"height": "1px",
|
|
1093
|
-
"min-height": "1px",
|
|
1094
|
-
// "background": "black",
|
|
1095
|
-
},
|
|
1096
|
-
});
|
|
1097
|
-
// Set text.
|
|
1098
|
-
if (text) {
|
|
1099
|
-
this._inner_html = text;
|
|
1100
|
-
}
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
export const Divider = wrapper(DividerElement);
|
|
1104
|
-
export const NullDividerElement = create_null(DividerElement);
|
|
1105
|
-
// ---------------------------------------------------------
|
|
1106
|
-
// Table data.
|
|
1107
|
-
export class TableDataElement extends Element {
|
|
1108
|
-
// Constructor.
|
|
1109
|
-
constructor(...children) {
|
|
1110
|
-
// Initialize base class.
|
|
1111
|
-
super({
|
|
1112
|
-
type: "TableData",
|
|
1113
|
-
tag: "td",
|
|
1114
|
-
default_style: {
|
|
1115
|
-
"width": "100%",
|
|
1116
|
-
},
|
|
1117
|
-
default_attributes: {}
|
|
1118
|
-
});
|
|
1119
|
-
// Add children.
|
|
1120
|
-
this.append(...children);
|
|
1121
|
-
}
|
|
1122
|
-
// Center the data.
|
|
1123
|
-
center() {
|
|
1124
|
-
this.attrs({ align: "center" });
|
|
1125
|
-
return this;
|
|
1126
|
-
}
|
|
1127
|
-
// Vertically center.
|
|
1128
|
-
center_vertical() {
|
|
1129
|
-
this._style["vertical-align"] = "middle";
|
|
1130
|
-
return this;
|
|
1131
|
-
}
|
|
1132
|
-
leading_vertical() {
|
|
1133
|
-
this._style["vertical-align"] = "top";
|
|
1134
|
-
return this;
|
|
1135
|
-
}
|
|
1136
|
-
trailing_vertical() {
|
|
1137
|
-
this._style["vertical-align"] = "bottom";
|
|
1138
|
-
return this;
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
export const TableData = wrapper(TableDataElement);
|
|
1142
|
-
export const NullTableDataElement = create_null(TableDataElement);
|
|
1143
|
-
// ---------------------------------------------------------
|
|
1144
|
-
// Table row.
|
|
1145
|
-
export class TableRowElement extends Element {
|
|
1146
|
-
current_cell;
|
|
1147
|
-
_wrap = false;
|
|
1148
|
-
// Constructor.
|
|
1149
|
-
constructor(...children) {
|
|
1150
|
-
// Initialize base class.
|
|
1151
|
-
super({
|
|
1152
|
-
type: "TableRow",
|
|
1153
|
-
tag: "tr",
|
|
1154
|
-
default_style: {
|
|
1155
|
-
"width": "100%",
|
|
1156
|
-
},
|
|
1157
|
-
default_attributes: {}
|
|
1158
|
-
});
|
|
1159
|
-
// Add children.
|
|
1160
|
-
this.append(...children);
|
|
1161
|
-
}
|
|
1162
|
-
// Append.
|
|
1163
|
-
append(...children) {
|
|
1164
|
-
for (let i = 0; i < children.length; i++) {
|
|
1165
|
-
const child = children[i];
|
|
1166
|
-
// Skip undefined.
|
|
1167
|
-
if (child == null) {
|
|
1168
|
-
continue;
|
|
1169
|
-
}
|
|
1170
|
-
// Array.
|
|
1171
|
-
else if (Array.isArray(child)) {
|
|
1172
|
-
this.append(...child);
|
|
1173
|
-
}
|
|
1174
|
-
// Execute function.
|
|
1175
|
-
else if (typeof child === "function") {
|
|
1176
|
-
this.append(child(this));
|
|
1177
|
-
}
|
|
1178
|
-
// Table data.
|
|
1179
|
-
else if (child instanceof TableDataElement) {
|
|
1180
|
-
this.current_cell = child;
|
|
1181
|
-
this.children.push(child);
|
|
1182
|
-
}
|
|
1183
|
-
// Default.
|
|
1184
|
-
else {
|
|
1185
|
-
if (this.current_cell == null) {
|
|
1186
|
-
this.current_cell = TableData();
|
|
1187
|
-
this.children.push(this.current_cell);
|
|
1188
|
-
if (this._attrs["align"] === "center") {
|
|
1189
|
-
this.current_cell.attrs({ align: "center" });
|
|
1190
|
-
}
|
|
1191
|
-
if (this._style["vertical-align"] === "middle") {
|
|
1192
|
-
this.current_cell._style["align"] = "middle";
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
if ((child._style.display == null || child._style.display === "") && this._wrap === true) {
|
|
1196
|
-
if (child.tag === "p" || child.tag === "h1" || child.tag === "h2") {
|
|
1197
|
-
child._style.display = "inline";
|
|
1198
|
-
}
|
|
1199
|
-
else {
|
|
1200
|
-
child._style.display = "inline-block";
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
this.current_cell.append(child);
|
|
1204
|
-
}
|
|
1205
|
-
}
|
|
1206
|
-
return this;
|
|
1207
|
-
}
|
|
1208
|
-
wrap(value) {
|
|
1209
|
-
if (value == null) {
|
|
1210
|
-
return this._wrap;
|
|
1211
|
-
}
|
|
1212
|
-
this._wrap = value;
|
|
1213
|
-
const set_display_inline = (child) => {
|
|
1214
|
-
if (child instanceof TableDataElement) {
|
|
1215
|
-
child.children.forEach(set_display_inline);
|
|
1216
|
-
}
|
|
1217
|
-
else {
|
|
1218
|
-
if ((child._style.display == null || child._style.display === "") && this._wrap === true) {
|
|
1219
|
-
if (child.tag === "p" || child.tag === "h1" || child.tag === "h2") {
|
|
1220
|
-
child._style.display = "inline";
|
|
1221
|
-
}
|
|
1222
|
-
else {
|
|
1223
|
-
child._style.display = "inline-block";
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
else if ((child._style.display === "inline" || child._style.display === "inline-block") && this._wrap === false) {
|
|
1227
|
-
child._style.display = "default";
|
|
1228
|
-
}
|
|
1229
|
-
}
|
|
1230
|
-
};
|
|
1231
|
-
this.children.forEach(set_display_inline);
|
|
1232
|
-
return this;
|
|
1233
|
-
}
|
|
1234
|
-
// Center.
|
|
1235
|
-
center() {
|
|
1236
|
-
this._attrs["align"] = "center";
|
|
1237
|
-
this.children.forEach((child) => {
|
|
1238
|
-
if (child instanceof TableDataElement) {
|
|
1239
|
-
child.attrs({ align: "center" });
|
|
1240
|
-
}
|
|
1241
|
-
});
|
|
1242
|
-
return this;
|
|
1243
|
-
}
|
|
1244
|
-
// Vertically center.
|
|
1245
|
-
center_vertical() {
|
|
1246
|
-
this._style["vertical-align"] = "middle";
|
|
1247
|
-
this.children.forEach((child) => {
|
|
1248
|
-
child._style["vertical-align"] = "middle";
|
|
1249
|
-
if (child instanceof TableDataElement) {
|
|
1250
|
-
child.children.forEach((nested) => {
|
|
1251
|
-
nested._style["vertical-align"] = "middle";
|
|
1252
|
-
});
|
|
1253
|
-
}
|
|
1254
|
-
});
|
|
1255
|
-
return this;
|
|
1256
|
-
}
|
|
1257
|
-
leading_vertical() {
|
|
1258
|
-
this._style["vertical-align"] = "top";
|
|
1259
|
-
this.children.forEach((child) => {
|
|
1260
|
-
child._style["vertical-align"] = "top";
|
|
1261
|
-
if (child instanceof TableDataElement) {
|
|
1262
|
-
child.children.forEach((nested) => {
|
|
1263
|
-
nested._style["vertical-align"] = "top";
|
|
1264
|
-
});
|
|
1265
|
-
}
|
|
1266
|
-
});
|
|
1267
|
-
return this;
|
|
1268
|
-
}
|
|
1269
|
-
trailing_vertical() {
|
|
1270
|
-
this._style["vertical-align"] = "bottom";
|
|
1271
|
-
this.children.forEach((child) => {
|
|
1272
|
-
child._style["vertical-align"] = "bottom";
|
|
1273
|
-
if (child instanceof TableDataElement) {
|
|
1274
|
-
child.children.forEach((nested) => {
|
|
1275
|
-
nested._style["vertical-align"] = "bottom";
|
|
1276
|
-
});
|
|
1277
|
-
}
|
|
1278
|
-
});
|
|
1279
|
-
return this;
|
|
1280
|
-
}
|
|
1281
|
-
}
|
|
1282
|
-
export const TableRow = wrapper(TableRowElement);
|
|
1283
|
-
export const NullTableRowElement = create_null(TableRowElement);
|
|
1284
|
-
// ---------------------------------------------------------
|
|
1285
|
-
// Table, automatically inserts table rows and optionally table data's when the appended object is not already a table data.
|
|
1286
|
-
export class TableElement extends Element {
|
|
1287
|
-
current_cell;
|
|
1288
|
-
current_row;
|
|
1289
|
-
// Constructor.
|
|
1290
|
-
constructor(...children) {
|
|
1291
|
-
// Initialize base class.
|
|
1292
|
-
super({
|
|
1293
|
-
type: "Stack",
|
|
1294
|
-
tag: "table",
|
|
1295
|
-
default_style: {
|
|
1296
|
-
"width": "100%",
|
|
1297
|
-
},
|
|
1298
|
-
default_attributes: {
|
|
1299
|
-
"cellspacing": "0",
|
|
1300
|
-
"cellpadding": "0",
|
|
1301
|
-
"border": "0",
|
|
1302
|
-
}
|
|
1303
|
-
});
|
|
1304
|
-
// Add children.
|
|
1305
|
-
this.current_row = TableRow();
|
|
1306
|
-
this.children.append(this.current_row);
|
|
1307
|
-
this.append(...children);
|
|
1308
|
-
}
|
|
1309
|
-
// Add a row.
|
|
1310
|
-
row(...children) {
|
|
1311
|
-
this.current_row = TableRow();
|
|
1312
|
-
this.children.push(this.current_row);
|
|
1313
|
-
this.current_cell = undefined;
|
|
1314
|
-
this.append(...children);
|
|
1315
|
-
return this;
|
|
1316
|
-
}
|
|
1317
|
-
// Append.
|
|
1318
|
-
append(...children) {
|
|
1319
|
-
for (let i = 0; i < children.length; i++) {
|
|
1320
|
-
const child = children[i];
|
|
1321
|
-
// Skip undefined.
|
|
1322
|
-
if (child == null) {
|
|
1323
|
-
continue;
|
|
1324
|
-
}
|
|
1325
|
-
// Array.
|
|
1326
|
-
else if (Array.isArray(child)) {
|
|
1327
|
-
this.append(...child);
|
|
1328
|
-
}
|
|
1329
|
-
// Execute function.
|
|
1330
|
-
else if (typeof child === "function") {
|
|
1331
|
-
this.append(child(this));
|
|
1332
|
-
}
|
|
1333
|
-
// Table row.
|
|
1334
|
-
else if (child instanceof TableRowElement) {
|
|
1335
|
-
this.current_row = child;
|
|
1336
|
-
this.children.push(child);
|
|
1337
|
-
}
|
|
1338
|
-
// Default.
|
|
1339
|
-
else {
|
|
1340
|
-
if (this.current_row == null) {
|
|
1341
|
-
this.current_row = TableRow();
|
|
1342
|
-
this.children.push(this.current_row);
|
|
1343
|
-
}
|
|
1344
|
-
this.current_row.append(child);
|
|
1345
|
-
}
|
|
1346
|
-
}
|
|
1347
|
-
return this;
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
export const Table = wrapper(TableElement);
|
|
1351
|
-
export const NullTableElement = create_null(TableElement);
|
|
1352
|
-
// ---------------------------------------------------------
|
|
1353
|
-
// CSS.
|
|
1354
|
-
export class CSSElement extends Element {
|
|
1355
|
-
// Constructor.
|
|
1356
|
-
constructor(style) {
|
|
1357
|
-
// Initialize base class.
|
|
1358
|
-
super({
|
|
1359
|
-
type: "CSS",
|
|
1360
|
-
tag: "style",
|
|
1361
|
-
});
|
|
1362
|
-
// Add inner html.
|
|
1363
|
-
if (style) {
|
|
1364
|
-
this._inner_html = style;
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
export const CSS = wrapper(CSSElement);
|
|
1369
|
-
export const NullCSSElement = create_null(CSSElement);
|
|
1370
|
-
// ---------------------------------------------------------
|
|
1371
|
-
// Mail.
|
|
1372
|
-
export class MailElement extends Element {
|
|
1373
|
-
_subject;
|
|
1374
|
-
// Constructor.
|
|
1375
|
-
constructor(...children) {
|
|
1376
|
-
// Initialize base class.
|
|
1377
|
-
super({
|
|
1378
|
-
type: "Mail",
|
|
1379
|
-
tag: "mail",
|
|
1380
|
-
default_style: {
|
|
1381
|
-
"width": "100% !important",
|
|
1382
|
-
"min-height": "100% !important",
|
|
1383
|
-
"box-sizing": "border-box",
|
|
1384
|
-
"padding": "0px", // this is required, sometimes it glitches and makes it scrolling without zero padding.
|
|
1385
|
-
"margin": "0px",
|
|
1386
|
-
},
|
|
1387
|
-
});
|
|
1388
|
-
// Add children.
|
|
1389
|
-
this.append(...children);
|
|
1390
|
-
}
|
|
1391
|
-
subject(subj) {
|
|
1392
|
-
if (subj == null) {
|
|
1393
|
-
return this._subject;
|
|
1394
|
-
}
|
|
1395
|
-
this._subject = subj;
|
|
1396
|
-
return this;
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1399
|
-
export const Mail = wrapper(MailElement);
|
|
1400
|
-
export const NullMailElement = create_null(MailElement);
|