@qooxdoo/framework 7.9.2 → 8.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +191 -33
- package/Manifest.json +3 -3
- package/bin/tools/utils.js +50 -13
- package/lib/compiler/compile-info.json +300 -230
- package/lib/compiler/index.js +56748 -44036
- package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-node.tmpl.js +1 -0
- package/lib/resource/qx/tool/compiler/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +1 -0
- package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/cli/templates/template_vars.js +12 -9
- package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/Manifest-1-0-0.json +2 -2
- package/lib/resource/qx/tool/{schema → compiler/schema}/Manifest-2-0-0.json +2 -2
- package/lib/resource/qx/tool/{schema → compiler/schema}/compile-1-0-0.json +15 -3
- package/{source/resource/qx/tool → lib/resource/qx/tool/compiler}/schema/qooxdoo-1-0-0.json +1 -1
- package/lib/resource/qx/tool/website/build/404.html +22 -22
- package/lib/resource/qx/tool/website/build/about.html +23 -23
- package/lib/resource/qx/tool/website/build/assets/common.js +30 -18
- package/lib/resource/qx/tool/website/build/assets/custom.css +290 -0
- package/lib/resource/qx/tool/website/build/assets/qxWeb.js +28 -0
- package/lib/resource/qx/tool/website/build/diagnostics/dependson.html +30 -30
- package/lib/resource/qx/tool/website/build/diagnostics/dependson.js +49 -40
- package/lib/resource/qx/tool/website/build/diagnostics/requiredby.html +20 -23
- package/lib/resource/qx/tool/website/build/diagnostics/requiredby.js +38 -31
- package/lib/resource/qx/tool/website/build/index.html +24 -24
- package/lib/resource/qx/tool/website/build/scripts/serve.js +63 -65
- package/lib/resource/qx/tool/website/partials/footer.html +8 -13
- package/lib/resource/qx/tool/website/partials/head.html +9 -7
- package/lib/resource/qx/tool/website/partials/header.html +3 -3
- package/lib/resource/qx/tool/website/src/assets/common.js +32 -0
- package/lib/resource/qx/tool/website/src/assets/custom.css +290 -0
- package/lib/resource/qx/tool/website/src/assets/qxWeb.js +28 -0
- package/lib/resource/qx/tool/website/src/diagnostics/dependson.js +49 -40
- package/lib/resource/qx/tool/website/src/diagnostics/requiredby.js +38 -31
- package/lib/resource/qx/tool/website/src/index.html +2 -2
- package/lib/resource/qx/tool/website/src/scripts/serve.js +63 -65
- package/package.json +20 -19
- package/source/boot/index.html +2 -2
- package/source/class/qx/Bootstrap.js +931 -705
- package/source/class/qx/Class.js +1476 -1451
- package/source/class/qx/Interface.js +40 -107
- package/source/class/qx/Mixin.js +58 -116
- package/source/class/qx/Promise.js +1 -0
- package/source/class/qx/Theme.js +1 -1
- package/source/class/qx/application/Routing.js +2 -0
- package/source/class/qx/bom/Font.js +3 -0
- package/source/class/qx/bom/client/Locale.js +5 -0
- package/source/class/qx/bom/request/Jsonp.js +5 -13
- package/source/class/qx/bom/request/Script.js +11 -35
- package/source/class/qx/bom/request/SimpleXhr.js +13 -41
- package/source/class/qx/bom/request/Xhr.js +19 -80
- package/source/class/qx/bom/storage/Memory.js +2 -0
- package/source/class/qx/bom/storage/UserData.js +2 -0
- package/source/class/qx/bom/storage/Web.js +2 -0
- package/source/class/qx/bom/webfonts/Validator.js +13 -5
- package/source/class/qx/core/Assert.js +14 -0
- package/source/class/qx/core/BaseInit.js +19 -20
- package/source/class/qx/core/Environment.js +23 -20
- package/source/class/qx/core/MEvent.js +1 -1
- package/source/class/qx/core/MObjectId.js +8 -6
- package/source/class/qx/core/MProperty.js +172 -136
- package/source/class/qx/core/Object.js +88 -102
- package/source/class/qx/core/check/AbstractCheck.js +111 -0
- package/source/class/qx/core/check/Any.js +63 -0
- package/source/class/qx/core/check/CheckFactory.js +151 -0
- package/source/class/qx/core/check/DynamicTypeCheck.js +90 -0
- package/source/class/qx/core/check/ICheck.js +75 -0
- package/source/class/qx/core/check/IsOneOfCheck.js +63 -0
- package/source/class/qx/core/check/JsDocCheck.js +71 -0
- package/source/class/qx/core/check/SimpleCheck.js +42 -0
- package/source/class/qx/core/check/standard/ArrayCheck.js +49 -0
- package/source/class/qx/core/check/standard/BooleanCheck.js +47 -0
- package/source/class/qx/core/check/standard/ClassCheck.js +33 -0
- package/source/class/qx/core/check/standard/ColorCheck.js +33 -0
- package/source/class/qx/core/check/standard/DateCheck.js +49 -0
- package/source/class/qx/core/check/standard/DecoratorCheck.js +33 -0
- package/source/class/qx/core/check/standard/DocumentCheck.js +40 -0
- package/source/class/qx/core/check/standard/ElementCheck.js +40 -0
- package/source/class/qx/core/check/standard/ErrorCheck.js +46 -0
- package/source/class/qx/core/check/standard/EventCheck.js +40 -0
- package/source/class/qx/core/check/standard/FontCheck.js +33 -0
- package/source/class/qx/core/check/standard/FunctionCheck.js +49 -0
- package/source/class/qx/core/check/standard/IntegerCheck.js +54 -0
- package/source/class/qx/core/check/standard/InterfaceCheck.js +33 -0
- package/source/class/qx/core/check/standard/MapCheck.js +33 -0
- package/source/class/qx/core/check/standard/MixinCheck.js +33 -0
- package/source/class/qx/core/check/standard/NodeCheck.js +40 -0
- package/source/class/qx/core/check/standard/NumberCheck.js +48 -0
- package/source/class/qx/core/check/standard/ObjectCheck.js +33 -0
- package/source/class/qx/core/check/standard/PositiveIntegerCheck.js +45 -0
- package/source/class/qx/core/check/standard/PositiveNumberCheck.js +45 -0
- package/source/class/qx/core/check/standard/PromiseCheck.js +33 -0
- package/source/class/qx/core/check/standard/RegExpCheck.js +46 -0
- package/source/class/qx/core/check/standard/StringCheck.js +43 -0
- package/source/class/qx/core/check/standard/ThemeCheck.js +33 -0
- package/source/class/qx/core/check/standard/WindowCheck.js +40 -0
- package/source/class/qx/core/property/ExplicitPropertyStorage.js +87 -0
- package/source/class/qx/core/property/GroupProperty.js +262 -0
- package/source/class/qx/core/property/IProperty.js +46 -0
- package/source/class/qx/core/property/IPropertyStorage.js +83 -0
- package/source/class/qx/core/property/ImmutableArrayStorage.js +38 -0
- package/source/class/qx/core/property/ImmutableDataArrayStorage.js +38 -0
- package/source/class/qx/core/property/ImmutableObjectStorage.js +39 -0
- package/source/class/qx/core/property/Property.js +1481 -0
- package/source/class/qx/core/property/PropertyStorageFactory.js +22 -0
- package/source/class/qx/core/property/SimplePropertyStorage.js +105 -0
- package/source/class/qx/data/Array.js +102 -57
- package/source/class/qx/data/MBinding.js +4 -29
- package/source/class/qx/data/SingleValueBinding.js +596 -1495
- package/source/class/qx/data/binding/AbstractSegment.js +197 -0
- package/source/class/qx/data/binding/ArrayIndexSegment.js +148 -0
- package/source/class/qx/data/binding/IInputReceiver.js +14 -0
- package/source/class/qx/data/binding/PropNameSegment.js +150 -0
- package/source/class/qx/data/controller/CheckedList.js +1 -1
- package/source/class/qx/data/controller/Form.js +78 -8
- package/source/class/qx/data/controller/Tree.js +27 -117
- package/source/class/qx/data/marshal/Json.js +46 -149
- package/source/class/qx/data/store/Json.js +0 -2
- package/source/class/qx/dev/Debug.js +1 -1
- package/source/class/qx/dev/LeakDetector.js +144 -0
- package/source/class/qx/dev/unit/AsyncWrapper.js +1 -0
- package/source/class/qx/dev/unit/MMock.js +7 -2
- package/source/class/qx/dev/unit/Sinon.js +0 -4
- package/source/class/qx/dev/unit/TestClass.js +2 -2
- package/source/class/qx/dev/unit/TestFunction.js +1 -0
- package/source/class/qx/dev/unit/TestLoaderBasic.js +1 -0
- package/source/class/qx/dev/unit/TestRunner.js +106 -0
- package/source/class/qx/event/IEventDispatcher.js +8 -4
- package/source/class/qx/event/Manager.js +4 -0
- package/source/class/qx/event/Messaging.js +2 -0
- package/source/class/qx/event/Pool.js +7 -0
- package/source/class/qx/event/Registration.js +33 -55
- package/source/class/qx/event/Timer.js +2 -0
- package/source/class/qx/event/Utils.js +25 -8
- package/source/class/qx/event/dispatch/AbstractBubbling.js +98 -194
- package/source/class/qx/event/dispatch/Direct.js +18 -13
- package/source/class/qx/event/handler/Appear.js +20 -24
- package/source/class/qx/event/handler/Application.js +4 -0
- package/source/class/qx/event/handler/DragDrop.js +182 -385
- package/source/class/qx/event/handler/Element.js +3 -0
- package/source/class/qx/event/handler/Focus.js +36 -30
- package/source/class/qx/event/handler/Input.js +5 -0
- package/source/class/qx/event/handler/Keyboard.js +107 -165
- package/source/class/qx/event/handler/Pointer.js +39 -68
- package/source/class/qx/event/handler/PointerCore.js +7 -25
- package/source/class/qx/event/handler/Window.js +5 -0
- package/source/class/qx/event/type/Event.js +12 -0
- package/source/class/qx/event/type/KeySequence.js +3 -0
- package/source/class/qx/event/type/Native.js +3 -0
- package/source/class/qx/html/Element.js +26 -91
- package/source/class/qx/io/jsonrpc/Client.js +1 -1
- package/source/class/qx/io/jsonrpc/protocol/Error.js +2 -2
- package/source/class/qx/io/jsonrpc/protocol/Parser.js +1 -0
- package/source/class/qx/io/jsonrpc/protocol/Result.js +2 -2
- package/source/class/qx/io/request/Xhr.js +3 -8
- package/source/class/qx/lang/normalize/Array.js +23 -1
- package/source/class/qx/locale/Date.js +520 -113
- package/source/class/qx/locale/LocalizedString.js +3 -0
- package/source/class/qx/locale/Manager.js +14 -3
- package/source/class/qx/locale/Number.js +60 -7
- package/source/class/qx/log/Logger.js +1 -1
- package/source/class/qx/module/Animation.js +2 -0
- package/source/class/qx/module/Attribute.js +2 -0
- package/source/class/qx/module/Css.js +7 -24
- package/source/class/qx/module/Event.js +2 -0
- package/source/class/qx/module/Manipulating.js +2 -0
- package/source/class/qx/module/Traversing.js +2 -0
- package/source/class/qx/test/Bootstrap.js +68 -53
- package/source/class/qx/test/Class.js +310 -2
- package/source/class/qx/test/Mixin.js +192 -42
- package/source/class/qx/test/Promise.js +129 -331
- package/source/class/qx/test/Theme.js +11 -0
- package/source/class/qx/test/bom/Font.js +2 -5
- package/source/class/qx/test/bom/Template.js +1 -1
- package/source/class/qx/test/compiler/ClassFile.js +14 -0
- package/source/class/qx/test/core/Assert.js +12 -0
- package/source/class/qx/test/core/Environment.js +17 -3
- package/source/class/qx/test/core/InheritanceDummy.js +10 -1
- package/source/class/qx/test/core/Object.js +51 -24
- package/source/class/qx/test/core/ObjectId.js +10 -1
- package/source/class/qx/test/core/Property.js +1338 -121
- package/source/class/qx/test/core/PropertyHelper.js +12 -0
- package/source/class/qx/test/core/Target.js +1 -0
- package/source/class/qx/test/core/Validation.js +2 -0
- package/source/class/qx/test/data/DataArray.js +218 -639
- package/source/class/qx/test/data/DataArrayWithChangeBubble.js +45 -215
- package/source/class/qx/test/data/MultiBinding.js +42 -0
- package/source/class/qx/test/data/async/__init__.js +4 -0
- package/source/class/qx/test/data/controller/Form.js +523 -14
- package/source/class/qx/test/data/controller/List.js +94 -426
- package/source/class/qx/test/data/controller/ListReverse.js +5 -20
- package/source/class/qx/test/data/controller/ListWithObjects.js +49 -225
- package/source/class/qx/test/data/controller/Object.js +54 -222
- package/source/class/qx/test/data/controller/Tree.js +195 -934
- package/source/class/qx/test/data/marshal/Json.js +74 -312
- package/source/class/qx/test/data/singlevalue/Array.js +55 -279
- package/source/class/qx/test/data/singlevalue/Async.js +173 -0
- package/source/class/qx/test/data/singlevalue/Deep.js +148 -327
- package/source/class/qx/test/data/singlevalue/Resolve.js +8 -28
- package/source/class/qx/test/data/singlevalue/Simple.js +124 -359
- package/source/class/qx/test/data/store/Json.js +86 -254
- package/source/class/qx/test/data/store/Jsonp.js +9 -29
- package/source/class/qx/test/data/store/Offline.js +2 -8
- package/source/class/qx/test/data/store/Rest.js +3 -3
- package/source/class/qx/test/dev/unit/Requirements.js +26 -10
- package/source/class/qx/test/event/GlobalError.js +2 -2
- package/source/class/qx/test/html/Iframe.js +1 -1
- package/source/class/qx/test/io/graphql/Client.js +2 -0
- package/source/class/qx/test/io/jsonrpc/Protocol.js +4 -2
- package/source/class/qx/test/io/request/MRequest.js +2 -8
- package/source/class/qx/test/io/request/Xhr.js +27 -117
- package/source/class/qx/test/lang/Function.js +6 -25
- package/source/class/qx/test/lang/Type.js +31 -13
- package/source/class/qx/test/locale/Date.js +173 -2
- package/source/class/qx/test/locale/Locale.js +23 -28
- package/source/class/qx/test/locale/Number.js +71 -0
- package/source/class/qx/test/log/Logger.js +7 -1
- package/source/class/qx/test/log/fixture/ClassA.js +2 -5
- package/source/class/qx/test/mobile/basic/Atom.js +3 -3
- package/source/class/qx/test/mobile/container/Scroll.js +4 -4
- package/source/class/qx/test/mobile/form/CheckBox.js +6 -12
- package/source/class/qx/test/performance/Property.js +5 -4
- package/source/class/qx/test/performance/widget/WidgetWithDecorator.js +2 -0
- package/source/class/qx/test/theme/Simple.js +34 -0
- package/source/class/qx/test/{MAppearance.js → theme/SimpleAppearance.js} +5 -4
- package/source/class/qx/test/{MDecoration.js → theme/SimpleDecoration.js} +6 -4
- package/source/class/qx/test/theme/manager/Meta.js +7 -5
- package/source/class/qx/test/tool/__init__.js +3 -0
- package/source/class/qx/test/tool/cli/AbstractValue.js +274 -0
- package/source/class/qx/test/tool/cli/Argument.js +384 -0
- package/source/class/qx/test/tool/cli/Command.js +387 -0
- package/source/class/qx/test/tool/cli/Flag.js +413 -0
- package/source/class/qx/test/tool/cli/__init__.js +3 -0
- package/source/class/qx/test/ui/LayoutTestCase.js +1 -14
- package/source/class/qx/test/ui/basic/Label.js +106 -0
- package/source/class/qx/test/ui/core/Blocker.js +125 -3
- package/source/class/qx/test/ui/form/Form.js +106 -0
- package/source/class/qx/test/ui/form/FormManager.js +6 -5
- package/source/class/qx/test/ui/form/SplitButton.js +1 -1
- package/source/class/qx/test/ui/toolbar/OverflowHandling.js +13 -14
- package/source/class/qx/test/ui/toolbar/ToolBar.js +16 -16
- package/source/class/qx/test/ui/tree/TreeFolder.js +5 -7
- package/source/class/qx/test/ui/tree/virtual/AbstractTreeTest.js +2 -0
- package/source/class/qx/test/ui/tree/virtual/Tree.js +36 -0
- package/source/class/qx/test/util/DateFormat.js +1 -1
- package/source/class/qx/test/util/PropertyUtil.js +0 -36
- package/source/class/qx/theme/classic/Appearance.js +1 -1
- package/source/class/qx/theme/indigo/ColorDark.js +2 -0
- package/source/class/qx/theme/manager/Font.js +6 -1
- package/source/class/qx/theme/manager/Meta.js +2 -1
- package/source/class/qx/theme/simple/Appearance.js +31 -95
- package/source/class/qx/theme/simple/Decoration.js +0 -1
- package/source/class/qx/theme/tangible/Appearance.js +1 -1
- package/source/class/qx/tool/cli/AbstractCliApp.js +72 -0
- package/source/class/qx/tool/cli/AbstractValue.js +186 -0
- package/source/class/qx/tool/cli/Argument.js +155 -0
- package/source/class/qx/tool/cli/Command.js +518 -0
- package/source/class/qx/tool/cli/Flag.js +202 -0
- package/source/class/qx/tool/cli/Parser.js +39 -0
- package/source/class/qx/tool/cli/__init__.js +26 -1
- package/source/class/qx/tool/compiler/Analyser.js +41 -13
- package/source/class/qx/tool/compiler/ClassFile.js +37 -9
- package/source/class/qx/tool/compiler/Console.js +2 -0
- package/source/class/qx/tool/compiler/MetaExtraction.js +53 -33
- package/source/class/qx/tool/compiler/app/Library.js +1 -1
- package/source/class/qx/tool/compiler/app/WebFont.js +2 -0
- package/source/class/qx/tool/compiler/cli/Application.js +58 -0
- package/source/class/qx/tool/{cli/commands → compiler/cli}/Command.js +99 -45
- package/source/class/qx/tool/{cli → compiler/cli}/ConfigDb.js +7 -7
- package/source/class/qx/tool/compiler/cli/ConfigLoader.js +272 -0
- package/source/class/qx/tool/{cli → compiler/cli}/LibraryApplication.js +3 -3
- package/source/class/qx/tool/compiler/cli/RootCommand.js +63 -0
- package/source/class/qx/tool/{cli → compiler/cli}/Watch.js +49 -24
- package/source/class/qx/tool/compiler/cli/__init__.js +3 -0
- package/source/class/qx/tool/{cli → compiler/cli}/api/AbstractApi.js +2 -11
- package/source/class/qx/tool/{cli → compiler/cli}/api/CompilerApi.js +11 -10
- package/source/class/qx/tool/{cli → compiler/cli}/api/LibraryApi.js +13 -4
- package/source/class/qx/tool/{cli → compiler/cli}/api/Test.js +1 -1
- package/source/class/qx/tool/compiler/cli/commands/Add.js +49 -0
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Clean.js +12 -25
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Compile.js +524 -615
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Config.js +22 -20
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Create.js +77 -54
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Deploy.js +45 -60
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Es6ify.js +57 -41
- package/source/class/qx/tool/{cli → compiler/cli}/commands/ExportGlyphs.js +26 -7
- package/source/class/qx/tool/compiler/cli/commands/Lint.js +420 -0
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Migrate.js +40 -20
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Package.js +20 -32
- package/source/class/qx/tool/compiler/cli/commands/Pkg.js +36 -0
- package/source/class/qx/tool/compiler/cli/commands/Prettier.js +278 -0
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Run.js +43 -39
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Serve.js +63 -61
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Test.js +49 -52
- package/source/class/qx/tool/{cli → compiler/cli}/commands/Typescript.js +51 -30
- package/source/class/qx/tool/{cli → compiler/cli}/commands/add/Class.js +54 -31
- package/source/class/qx/tool/{cli → compiler/cli}/commands/add/Script.js +56 -32
- package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Delete.js +19 -13
- package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Get.js +19 -13
- package/source/class/qx/tool/{cli → compiler/cli}/commands/config/List.js +20 -20
- package/source/class/qx/tool/{cli → compiler/cli}/commands/config/Set.js +28 -20
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Install.js +140 -75
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/List.js +119 -80
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Publish.js +194 -178
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Remove.js +18 -21
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Update.js +90 -69
- package/source/class/qx/tool/{cli → compiler/cli}/commands/package/Upgrade.js +67 -54
- package/source/class/qx/tool/compiler/makers/AbstractAppMaker.js +2 -1
- package/source/class/qx/tool/compiler/resources/Manager.js +2 -0
- package/source/class/qx/tool/compiler/resources/ScssConverter.js +1 -1
- package/source/class/qx/tool/compiler/resources/ScssFile.js +1 -1
- package/source/class/qx/tool/compiler/targets/Target.js +5 -10
- package/source/class/qx/tool/compiler/targets/TypeScriptWriter.js +6 -2
- package/source/class/qx/tool/compiler/targets/meta/ApplicationMeta.js +2 -4
- package/source/class/qx/tool/compiler/targets/meta/BootJs.js +2 -0
- package/source/class/qx/tool/compiler/targets/meta/PackageJavascript.js +2 -0
- package/source/class/qx/tool/config/Abstract.js +5 -5
- package/source/class/qx/tool/config/Lockfile.js +1 -1
- package/source/class/qx/tool/migration/BaseMigration.js +9 -7
- package/source/class/qx/tool/migration/M6_0_0.js +3 -3
- package/source/class/qx/tool/migration/M8_0_0.js +958 -0
- package/source/class/qx/tool/utils/Debounce.js +0 -1
- package/source/class/qx/tool/utils/Http.js +109 -21
- package/source/class/qx/tool/utils/LogManager.js +7 -0
- package/source/class/qx/tool/utils/Promisify.js +12 -1
- package/source/class/qx/tool/utils/QooxdooVersions.js +193 -0
- package/source/class/qx/tool/utils/Utils.js +8 -5
- package/source/class/qx/tool/utils/Website.js +9 -222
- package/source/class/qx/tool/utils/Zip.js +47 -0
- package/source/class/qx/tool/utils/files/Utils.js +3 -11
- package/source/class/qx/tool/utils/json/Tokenizer.js +5 -0
- package/source/class/qx/ui/basic/Atom.js +8 -8
- package/source/class/qx/ui/core/Blocker.js +17 -4
- package/source/class/qx/ui/core/DragDropCursor.js +2 -1
- package/source/class/qx/ui/core/EventHandler.js +13 -21
- package/source/class/qx/ui/core/LayoutItem.js +8 -31
- package/source/class/qx/ui/core/MExecutable.js +7 -31
- package/source/class/qx/ui/core/MNativeOverflow.js +4 -2
- package/source/class/qx/ui/core/Widget.js +50 -165
- package/source/class/qx/ui/core/scroll/IScrollBar.js +9 -3
- package/source/class/qx/ui/core/scroll/ScrollBar.js +7 -1
- package/source/class/qx/ui/core/scroll/ScrollPane.js +12 -4
- package/source/class/qx/ui/embed/Html.js +6 -2
- package/source/class/qx/ui/form/AbstractField.js +4 -12
- package/source/class/qx/ui/form/Button.js +6 -4
- package/source/class/qx/ui/form/CheckedSelectBox.js +8 -8
- package/source/class/qx/ui/form/FileSelectorButton.js +1 -1
- package/source/class/qx/ui/form/Form.js +3 -0
- package/source/class/qx/ui/form/IListItem.js +3 -1
- package/source/class/qx/ui/form/IRadioItem.js +3 -1
- package/source/class/qx/ui/form/MForm.js +3 -1
- package/source/class/qx/ui/form/Slider.js +6 -2
- package/source/class/qx/ui/form/SplitButton.js +5 -5
- package/source/class/qx/ui/form/TextField.js +1 -2
- package/source/class/qx/ui/form/validation/Manager.js +6 -2
- package/source/class/qx/ui/menubar/Button.js +1 -1
- package/source/class/qx/ui/mobile/basic/Atom.js +5 -5
- package/source/class/qx/ui/mobile/dialog/Menu.js +9 -31
- package/source/class/qx/ui/mobile/dialog/Popup.js +13 -1
- package/source/class/qx/ui/table/pane/FocusIndicator.js +5 -2
- package/source/class/qx/ui/table/pane/Scroller.js +5 -20
- package/source/class/qx/ui/table/selection/Model.js +1 -0
- package/source/class/qx/ui/toolbar/Button.js +1 -1
- package/source/class/qx/ui/toolbar/CheckBox.js +1 -1
- package/source/class/qx/ui/toolbar/FileSelectorButton.js +1 -2
- package/source/class/qx/ui/toolbar/Part.js +2 -2
- package/source/class/qx/ui/toolbar/PartContainer.js +2 -2
- package/source/class/qx/ui/toolbar/ToolBar.js +24 -49
- package/source/class/qx/ui/tree/VirtualTree.js +6 -4
- package/source/class/qx/ui/tree/core/AbstractItem.js +10 -17
- package/source/class/qx/ui/tree/core/IVirtualTree.js +4 -2
- package/source/class/qx/ui/tree/provider/IVirtualTreeProvider.js +20 -10
- package/source/class/qx/ui/treevirtual/SimpleTreeDataModel.js +4 -1
- package/source/class/qx/ui/virtual/cell/Cell.js +20 -48
- package/source/class/qx/ui/virtual/cell/WidgetCell.js +2 -4
- package/source/class/qx/ui/virtual/core/Axis.js +4 -0
- package/source/class/qx/ui/virtual/core/ILayer.js +14 -10
- package/source/class/qx/ui/virtual/core/Scroller.js +4 -4
- package/source/class/qx/ui/virtual/layer/WidgetCell.js +4 -0
- package/source/class/qx/ui/virtual/selection/Abstract.js +3 -0
- package/source/class/qx/ui/virtual/selection/MModel.js +1 -1
- package/source/class/qx/ui/window/IDesktop.js +6 -2
- package/source/class/qx/ui/window/IWindowManager.js +10 -4
- package/source/class/qx/ui/window/MDesktop.js +2 -1
- package/source/class/qx/ui/window/Manager.js +1 -1
- package/source/class/qx/ui/window/Window.js +6 -4
- package/source/class/qx/util/OOUtil.js +8 -9
- package/source/class/qx/util/PropertyUtil.js +34 -154
- package/source/class/qx/util/ResponseParser.js +2 -0
- package/source/class/qx/util/Serializer.js +69 -114
- package/source/class/qx/util/format/DateFormat.js +3 -2
- package/source/global.d.ts +4 -0
- package/source/resource/qx/tool/bin/download-assets +0 -2
- package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-node.tmpl.js +1 -0
- package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/cli/templates/template_vars.js +12 -9
- package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/Manifest-1-0-0.json +2 -2
- package/source/resource/qx/tool/{schema → compiler/schema}/Manifest-2-0-0.json +2 -2
- package/source/resource/qx/tool/{schema → compiler/schema}/compile-1-0-0.json +15 -3
- package/{lib/resource/qx/tool → source/resource/qx/tool/compiler}/schema/qooxdoo-1-0-0.json +1 -1
- package/source/resource/qx/tool/website/build/404.html +22 -22
- package/source/resource/qx/tool/website/build/about.html +23 -23
- package/source/resource/qx/tool/website/build/assets/common.js +30 -18
- package/source/resource/qx/tool/website/build/assets/custom.css +290 -0
- package/source/resource/qx/tool/website/build/assets/qxWeb.js +28 -0
- package/source/resource/qx/tool/website/build/diagnostics/dependson.html +30 -30
- package/source/resource/qx/tool/website/build/diagnostics/dependson.js +49 -40
- package/source/resource/qx/tool/website/build/diagnostics/requiredby.html +20 -23
- package/source/resource/qx/tool/website/build/diagnostics/requiredby.js +38 -31
- package/source/resource/qx/tool/website/build/index.html +24 -24
- package/source/resource/qx/tool/website/build/scripts/serve.js +63 -65
- package/source/resource/qx/tool/website/partials/footer.html +8 -13
- package/source/resource/qx/tool/website/partials/head.html +9 -7
- package/source/resource/qx/tool/website/partials/header.html +3 -3
- package/source/resource/qx/tool/website/src/assets/common.js +32 -0
- package/source/resource/qx/tool/website/src/assets/custom.css +290 -0
- package/source/resource/qx/tool/website/src/assets/qxWeb.js +28 -0
- package/source/resource/qx/tool/website/src/diagnostics/dependson.js +49 -40
- package/source/resource/qx/tool/website/src/diagnostics/requiredby.js +38 -31
- package/source/resource/qx/tool/website/src/index.html +2 -2
- package/source/resource/qx/tool/website/src/scripts/serve.js +63 -65
- package/lib/resource/qx/tool/bin/build-devtools +0 -13
- package/lib/resource/qx/tool/bin/build-website +0 -15
- package/lib/resource/qx/tool/bin/download-assets +0 -23
- package/lib/resource/qx/tool/cli/templates/skeleton/mobile/source/theme/custom/css/custom.css.map +0 -1
- package/lib/resource/qx/tool/website/build/assets/bootstrap.css +0 -7
- package/lib/resource/qx/tool/website/build/assets/bootstrap.min.css +0 -7
- package/lib/resource/qx/tool/website/build/assets/bootstrap.min.css.map +0 -1
- package/lib/resource/qx/tool/website/build/assets/jquery.js +0 -5453
- package/lib/resource/qx/tool/website/build/qooxdoo.css +0 -21
- package/lib/resource/qx/tool/website/sass/qooxdoo.css +0 -3
- package/lib/resource/qx/tool/website/sass/qooxdoo.css.map +0 -1
- package/lib/resource/qx/tool/website/src/assets/bootstrap.css +0 -7
- package/lib/resource/qx/tool/website/src/assets/bootstrap.min.css +0 -7
- package/lib/resource/qx/tool/website/src/assets/bootstrap.min.css.map +0 -1
- package/lib/resource/qx/tool/website/src/assets/jquery.js +0 -5453
- package/source/class/qx/core/Property.js +0 -2100
- package/source/class/qx/tool/cli/Application.js +0 -47
- package/source/class/qx/tool/cli/Cli.js +0 -713
- package/source/class/qx/tool/cli/commands/Add.js +0 -46
- package/source/class/qx/tool/cli/commands/Lint.js +0 -255
- package/source/class/qx/tool/cli/commands/Pkg.js +0 -56
- package/source/class/qx/tool/cli/commands/package/Migrate.js +0 -37
- package/source/class/qx/tool/compiler/app/Cldr.js +0 -725
- package/source/resource/qx/tool/bin/build-devtools +0 -13
- package/source/resource/qx/tool/bin/build-website +0 -15
- package/source/resource/qx/tool/website/build/assets/bootstrap.css +0 -7
- package/source/resource/qx/tool/website/build/assets/bootstrap.min.css +0 -7
- package/source/resource/qx/tool/website/build/assets/bootstrap.min.css.map +0 -1
- package/source/resource/qx/tool/website/build/assets/jquery.js +0 -5453
- package/source/resource/qx/tool/website/build/qooxdoo.css +0 -21
- package/source/resource/qx/tool/website/sass/qooxdoo.scss +0 -31
- package/source/resource/qx/tool/website/src/assets/bootstrap.css +0 -7
- package/source/resource/qx/tool/website/src/assets/bootstrap.min.css +0 -7
- package/source/resource/qx/tool/website/src/assets/bootstrap.min.css.map +0 -1
- package/source/resource/qx/tool/website/src/assets/jquery.js +0 -5453
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/TypeScriptWriter-base_declaration.d.ts +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/default.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/header.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/interface.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/mixin.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/class/singleton.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-browser.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-rhino.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/Manifest.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/compile.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/readme.tmpl.md +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/index.tmpl.html +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/nojs.tmpl.html +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Appearance.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Color.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Decoration.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Font.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Theme.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/app.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/favicon.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/js_256x256.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/test.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/translation/readme.txt +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/Manifest.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/compile.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/readme.tmpl.md +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/index.tmpl.html +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/nojs.tmpl.html +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/app.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/css/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/favicon.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/js_256x256.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/css/custom.css +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/translation/readme.txt +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/Manifest.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/compile.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/readme.tmpl.md +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/Button.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/resource/custom/test.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Appearance.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Color.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Decoration.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Font.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Theme.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/resource/custom/test.png +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/translation/readme.txt +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/Manifest.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/compile.tmpl.json +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/readme.tmpl.txt +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/Application.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/__init__.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/resource/custom/.gitignore.tmpl +0 -0
- /package/lib/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/translation/readme.txt +0 -0
- /package/lib/resource/qx/tool/{loadsass.js → compiler/loadsass.js} +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/TypeScriptWriter-base_declaration.d.ts +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/default.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/header.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/interface.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/mixin.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/class/singleton.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-browser.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/loader/loader-rhino.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/Manifest.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/compile.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/readme.tmpl.md +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/index.tmpl.html +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/boot/nojs.tmpl.html +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/Application.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Appearance.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Color.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Decoration.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Font.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/class/custom/theme/Theme.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/app.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/favicon.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/js_256x256.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/resource/custom/test.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/desktop/source/translation/readme.txt +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/Manifest.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/compile.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/readme.tmpl.md +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/index.tmpl.html +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/boot/nojs.tmpl.html +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/Application.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Login.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/Overview.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/class/custom/page/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/app.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/css/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/favicon.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/resource/custom/js_256x256.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/scss/_styles.scss +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/theme/custom/scss/custom.scss +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/mobile/source/translation/readme.txt +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/Manifest.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/compile.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/readme.tmpl.md +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/Button.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/demo/Application.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/resource/custom/test.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Appearance.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Color.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Decoration.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Font.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/class/custom/theme/Theme.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/resource/custom/test.png +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/package/source/translation/readme.txt +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/Manifest.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/compile.tmpl.json +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/readme.tmpl.txt +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/Application.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/__init__.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/class/custom/test/DemoTest.tmpl.js +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/resource/custom/.gitignore.tmpl +0 -0
- /package/source/resource/qx/tool/{cli → compiler/cli}/templates/skeleton/server/source/translation/readme.txt +0 -0
- /package/source/resource/qx/tool/{loadsass.js → compiler/loadsass.js} +0 -0
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
Copyright:
|
|
8
8
|
2004-2008 1&1 Internet AG, Germany, http://www.1und1.de
|
|
9
|
+
2022 Derrell Lipman
|
|
9
10
|
|
|
10
11
|
License:
|
|
11
12
|
MIT: https://opensource.org/licenses/MIT
|
|
@@ -15,396 +16,198 @@
|
|
|
15
16
|
* Sebastian Werner (wpbasti)
|
|
16
17
|
* Andreas Ecker (ecker)
|
|
17
18
|
* Martin Wittemann (martinwittemann)
|
|
19
|
+
* Derrell Lipman (derrell)
|
|
18
20
|
|
|
19
21
|
************************************************************************ */
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
* @ignore(qx.data)
|
|
25
|
-
* @ignore(qx.data.IListData)
|
|
26
|
-
* @ignore(qx.util.OOUtil)
|
|
27
|
-
*/
|
|
28
|
-
if (!window.qx) {
|
|
29
|
-
window.qx = {};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* This wraps a function with a plain `function`; JavaScript does not allow methods which are defined
|
|
34
|
-
* using object method shorthand (eg `{ construct() { this.base(arguments); }}`) to be used as constructors,
|
|
35
|
-
* the constructor must be a plain old `function`.
|
|
36
|
-
*
|
|
37
|
-
* @param {Function} construct
|
|
38
|
-
* @returns {Function}
|
|
39
|
-
*/
|
|
40
|
-
function createPlainFunction(construct) {
|
|
41
|
-
return function () {
|
|
42
|
-
return construct.apply(this, [].slice.call(arguments));
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Bootstrap qx.Bootstrap to create myself later
|
|
48
|
-
* This is needed for the API browser etc. to let them detect me
|
|
49
|
-
*/
|
|
50
|
-
qx.Bootstrap = {
|
|
51
|
-
genericToString() {
|
|
52
|
-
return "[Class " + this.classname + "]";
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
createNamespace(name, object) {
|
|
56
|
-
var splits = name.split(".");
|
|
57
|
-
var part = splits[0];
|
|
58
|
-
var parent =
|
|
59
|
-
qx.$$namespaceRoot && qx.$$namespaceRoot[part]
|
|
60
|
-
? qx.$$namespaceRoot
|
|
61
|
-
: window;
|
|
62
|
-
|
|
63
|
-
for (var i = 0, len = splits.length - 1; i < len; i++, part = splits[i]) {
|
|
64
|
-
if (!parent[part]) {
|
|
65
|
-
parent = parent[part] = {};
|
|
66
|
-
} else {
|
|
67
|
-
parent = parent[part];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// store object
|
|
72
|
-
parent[part] = object;
|
|
73
|
-
|
|
74
|
-
// return last part name (e.g. classname)
|
|
75
|
-
return part;
|
|
76
|
-
},
|
|
77
|
-
|
|
78
|
-
setDisplayName(fcn, classname, name) {
|
|
79
|
-
fcn.displayName = classname + "." + name + "()";
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
setDisplayNames(functionMap, classname) {
|
|
83
|
-
for (var name in functionMap) {
|
|
84
|
-
var value = functionMap[name];
|
|
85
|
-
if (value instanceof Function) {
|
|
86
|
-
value.displayName = classname + "." + (value.name || name) + "()";
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
23
|
+
// Undeclared member variables we've already notified the user of
|
|
24
|
+
let undeclared = {};
|
|
90
25
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (!qx.Bootstrap.isFunction(args.callee.base)) {
|
|
94
|
-
throw new Error(
|
|
95
|
-
"Cannot call super class. Method is not derived: " +
|
|
96
|
-
args.callee.displayName
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
26
|
+
// For debugging, allow not hiding internal variables with `enumerable: false`
|
|
27
|
+
let allEnumerable = false;
|
|
100
28
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
} else {
|
|
104
|
-
return args.callee.base.apply(
|
|
105
|
-
this,
|
|
106
|
-
Array.prototype.slice.call(arguments, 1)
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
},
|
|
29
|
+
// To be imlemented in the future
|
|
30
|
+
let FUTURE = false;
|
|
110
31
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
};
|
|
32
|
+
// Bootstrap the Bootstrap static class
|
|
33
|
+
window.qx = Object.assign(window.qx || {}, {
|
|
34
|
+
$$namespaceRoot: window,
|
|
115
35
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
36
|
+
Bootstrap: {
|
|
37
|
+
/** Undeclared member variables we've already notified the user of */
|
|
38
|
+
$$undeclared: {},
|
|
119
39
|
|
|
120
|
-
|
|
121
|
-
|
|
40
|
+
/** @type {Map} Stores all defined classes */
|
|
41
|
+
$$registry: {},
|
|
122
42
|
|
|
123
|
-
|
|
43
|
+
_allowedStaticKeys: {
|
|
44
|
+
"@": "object",
|
|
45
|
+
type: "string", // String
|
|
46
|
+
include: "object", // Mixin[]
|
|
47
|
+
statics: "object", // Map
|
|
48
|
+
environment: "object", // Map
|
|
49
|
+
events: "object", // Map
|
|
50
|
+
defer: "function" // Function
|
|
51
|
+
},
|
|
124
52
|
|
|
125
|
-
|
|
126
|
-
|
|
53
|
+
_allowedNonStaticKeys: {
|
|
54
|
+
"@": "object",
|
|
55
|
+
"@construct": "object",
|
|
56
|
+
"@destruct": "object",
|
|
57
|
+
type: "string", // String
|
|
58
|
+
extend: "function", // Function
|
|
59
|
+
// extendNativeClass: "boolean", // Boolean -- Does not work yet
|
|
60
|
+
implement: "object", // Interface[]
|
|
61
|
+
include: "object", // Mixin[]
|
|
62
|
+
construct: "function", // Function
|
|
63
|
+
statics: "object", // Map
|
|
64
|
+
properties: "object", // Map
|
|
65
|
+
members: "object", // Map
|
|
66
|
+
objects: "object", // Map
|
|
67
|
+
environment: "object", // Map
|
|
68
|
+
events: "object", // Map
|
|
69
|
+
delegate: "object", // Map
|
|
70
|
+
defer: "function", // Function
|
|
71
|
+
destruct: "function" // Function
|
|
72
|
+
},
|
|
127
73
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
74
|
+
define(className, config) {
|
|
75
|
+
let clazz;
|
|
76
|
+
let proxy;
|
|
77
|
+
let handler;
|
|
78
|
+
let path;
|
|
79
|
+
let classnameComponents;
|
|
80
|
+
let implicitType = false;
|
|
81
|
+
|
|
82
|
+
// Ensure the desginated class has not already been defined
|
|
83
|
+
if (className && qx.Bootstrap.$$registry[className]) {
|
|
84
|
+
throw new Error(`${className} is already defined; cannot redefine a class`);
|
|
133
85
|
}
|
|
134
|
-
clazz = construct || new Function();
|
|
135
|
-
|
|
136
|
-
this.extendClass(clazz, clazz, config.extend, name, basename);
|
|
137
|
-
|
|
138
|
-
var statics = config.statics || {};
|
|
139
|
-
// use keys to include the shadowed in IE
|
|
140
|
-
for (
|
|
141
|
-
var i = 0, keys = qx.Bootstrap.keys(statics), l = keys.length;
|
|
142
|
-
i < l;
|
|
143
|
-
i++
|
|
144
|
-
) {
|
|
145
|
-
var key = keys[i];
|
|
146
|
-
clazz[key] = statics[key];
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
proto = clazz.prototype;
|
|
150
|
-
// Enable basecalls within constructor
|
|
151
|
-
proto.base = qx.Bootstrap.base;
|
|
152
|
-
proto.name = proto.classname = name;
|
|
153
|
-
|
|
154
|
-
var members = config.members || {};
|
|
155
|
-
var key, member;
|
|
156
|
-
|
|
157
|
-
// use keys to include the shadowed in IE
|
|
158
|
-
for (
|
|
159
|
-
var i = 0, keys = qx.Bootstrap.keys(members), l = keys.length;
|
|
160
|
-
i < l;
|
|
161
|
-
i++
|
|
162
|
-
) {
|
|
163
|
-
key = keys[i];
|
|
164
|
-
member = members[key];
|
|
165
|
-
|
|
166
|
-
// Enable basecalls for methods
|
|
167
|
-
// Hint: proto[key] is not yet overwritten here
|
|
168
|
-
if (member instanceof Function && proto[key]) {
|
|
169
|
-
member.base = proto[key];
|
|
170
|
-
}
|
|
171
86
|
|
|
172
|
-
|
|
87
|
+
// Process environment
|
|
88
|
+
let environment = config.environment || {};
|
|
89
|
+
for (let key in environment) {
|
|
90
|
+
qx["core"]["Environment"].add(key, environment[key]);
|
|
173
91
|
}
|
|
174
|
-
} else {
|
|
175
|
-
clazz = config.statics || {};
|
|
176
|
-
|
|
177
|
-
// Merge class into former class (needed for 'optimize: ["statics"]')
|
|
178
|
-
if (qx.Bootstrap.$$registry && qx.Bootstrap.$$registry[name]) {
|
|
179
|
-
var formerClass = qx.Bootstrap.$$registry[name];
|
|
180
|
-
|
|
181
|
-
// Add/overwrite properties and return early if necessary
|
|
182
|
-
if (this.keys(clazz).length !== 0) {
|
|
183
|
-
// Execute defer to prevent too early overrides
|
|
184
|
-
if (config.defer) {
|
|
185
|
-
config.defer(clazz, proto);
|
|
186
|
-
}
|
|
187
92
|
|
|
188
|
-
|
|
189
|
-
|
|
93
|
+
// Explicit null `extend` key means extend from Object. Otherwise,
|
|
94
|
+
// falsy `extend` means it's a static class.
|
|
95
|
+
if (config.extend === null || (!config.extend && config.type != "static")) {
|
|
96
|
+
config.extend = Object;
|
|
97
|
+
} else if (!config.extend) {
|
|
98
|
+
if (qx["core"]["Environment"].get("qx.debug")) {
|
|
99
|
+
if (config.type && config.type != "static") {
|
|
100
|
+
throw new Error(`${className}: ` + `No 'extend' key, but 'type' is not 'static' ` + `(found ${config.type})`);
|
|
190
101
|
}
|
|
191
|
-
return formerClass;
|
|
192
102
|
}
|
|
103
|
+
|
|
104
|
+
implicitType = true;
|
|
105
|
+
config.type = "static";
|
|
193
106
|
}
|
|
194
|
-
}
|
|
195
107
|
|
|
196
|
-
|
|
197
|
-
|
|
108
|
+
if (qx["core"]["Environment"].get("qx.debug")) {
|
|
109
|
+
Object.keys(config).forEach(key => {
|
|
110
|
+
let allowedKeys = config.type == "static" ? qx.Bootstrap._allowedStaticKeys : qx.Bootstrap._allowedNonStaticKeys;
|
|
198
111
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
112
|
+
// Ensure this key is allowed
|
|
113
|
+
if (!(key in allowedKeys)) {
|
|
114
|
+
if (config.type == "static") {
|
|
115
|
+
throw new Error(`${className}: ` + `disallowed key in static class configuration: ${key}`);
|
|
116
|
+
} else {
|
|
117
|
+
throw new Error(`${className}: ` + `unrecognized key in class configuration: ${key}`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
206
120
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
} catch (ex) {
|
|
213
|
-
// Nothing
|
|
121
|
+
// Ensure its value is of the correct type
|
|
122
|
+
if (typeof config[key] != allowedKeys[key]) {
|
|
123
|
+
throw new Error(`${className}: ` + `typeof value for key ${key} must be ${allowedKeys[key]}; ` + `found ${typeof config[key]}`);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
214
126
|
}
|
|
215
|
-
}
|
|
216
|
-
clazz.basename = basename;
|
|
217
|
-
clazz.$$events = config.events;
|
|
218
127
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
this.addPendingDefer(clazz, function () {
|
|
222
|
-
config.defer(clazz, proto);
|
|
223
|
-
});
|
|
224
|
-
}
|
|
128
|
+
// Create the new class
|
|
129
|
+
clazz = qx.Bootstrap._extend(className, config);
|
|
225
130
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
131
|
+
// Add singleton getInstance()
|
|
132
|
+
if (config.type === "singleton") {
|
|
133
|
+
clazz.getInstance = qx.Bootstrap.getInstance;
|
|
134
|
+
}
|
|
230
135
|
|
|
231
|
-
|
|
232
|
-
|
|
136
|
+
clazz.classname = className;
|
|
137
|
+
qx.Bootstrap.setDisplayName(clazz, className, "constructor");
|
|
233
138
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
* dependency
|
|
238
|
-
*
|
|
239
|
-
* @param object {Object?} the object to test
|
|
240
|
-
* @return {Boolean} true if object is an instance of qx.core.Object
|
|
241
|
-
*/
|
|
242
|
-
isQxCoreObject(object) {
|
|
243
|
-
if (object === object.constructor) {
|
|
244
|
-
return false;
|
|
245
|
-
}
|
|
246
|
-
var clz = object.constructor;
|
|
247
|
-
while (clz) {
|
|
248
|
-
if (clz.classname === "qx.core.Object") {
|
|
249
|
-
return true;
|
|
139
|
+
// Attach toString
|
|
140
|
+
if (!clazz.hasOwnProperty("toString")) {
|
|
141
|
+
clazz.toString = qx.Bootstrap.genericToString;
|
|
250
142
|
}
|
|
251
|
-
clz = clz.superclass;
|
|
252
|
-
}
|
|
253
|
-
return false;
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
143
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
*/
|
|
261
|
-
qx.Bootstrap.define("qx.Bootstrap", {
|
|
262
|
-
statics: {
|
|
263
|
-
/** Timestamp of qooxdoo based application startup */
|
|
264
|
-
LOADSTART: qx.$$start || new Date(),
|
|
144
|
+
// Add statics
|
|
145
|
+
for (let key in config.statics || {}) {
|
|
146
|
+
let staticFuncOrVar = config.statics[key];
|
|
265
147
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
// make sure to reflect all changes here to the environment class!
|
|
271
|
-
var debug = true;
|
|
272
|
-
if (qx.$$environment && qx.$$environment["qx.debug"] === false) {
|
|
273
|
-
debug = false;
|
|
274
|
-
}
|
|
275
|
-
return debug;
|
|
276
|
-
})(),
|
|
148
|
+
if (typeof staticFuncOrVar == "function") {
|
|
149
|
+
// Allow easily identifying this method
|
|
150
|
+
qx.Bootstrap.setDisplayName(staticFuncOrVar, className, key);
|
|
151
|
+
}
|
|
277
152
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
* @param key {String} The key to get the value from.
|
|
286
|
-
* @return {var} The value of the setting or <code>undefined</code>.
|
|
287
|
-
*/
|
|
288
|
-
getEnvironmentSetting(key) {
|
|
289
|
-
if (qx.$$environment) {
|
|
290
|
-
return qx.$$environment[key];
|
|
153
|
+
// Add this static as a class property
|
|
154
|
+
Object.defineProperty(clazz, key, {
|
|
155
|
+
value: staticFuncOrVar,
|
|
156
|
+
writable: true,
|
|
157
|
+
configurable: true,
|
|
158
|
+
enumerable: allEnumerable || true
|
|
159
|
+
});
|
|
291
160
|
}
|
|
292
|
-
},
|
|
293
161
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
* WARNING: This method only should be used if the
|
|
301
|
-
* {@link qx.core.Environment} class is not loaded!
|
|
302
|
-
*
|
|
303
|
-
* @param key {String} The key of the setting.
|
|
304
|
-
* @param value {var} The value for the setting.
|
|
305
|
-
*/
|
|
306
|
-
setEnvironmentSetting(key, value) {
|
|
307
|
-
if (!qx.$$environment) {
|
|
308
|
-
qx.$$environment = {};
|
|
309
|
-
}
|
|
310
|
-
if (qx.$$environment[key] === undefined) {
|
|
311
|
-
qx.$$environment[key] = value;
|
|
162
|
+
// Members are only allowed for non-static classes.
|
|
163
|
+
if (config.extend) {
|
|
164
|
+
// Add members
|
|
165
|
+
if (config.members) {
|
|
166
|
+
qx.Bootstrap.addMembers(clazz, config.members);
|
|
167
|
+
}
|
|
312
168
|
}
|
|
313
|
-
},
|
|
314
169
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
* @param object {Object} The object to attach to the namespace
|
|
322
|
-
* @return {String} last part of the namespace (which object is assigned to)
|
|
323
|
-
* @throws {Error} when the given object already exists.
|
|
324
|
-
*/
|
|
325
|
-
createNamespace: qx.Bootstrap.createNamespace,
|
|
170
|
+
//
|
|
171
|
+
// Store destruct onto class. We wrap their function (or an empty
|
|
172
|
+
// function) in code that also handles any properties that
|
|
173
|
+
// require `dereference : true`
|
|
174
|
+
//
|
|
175
|
+
let destruct = config.destruct || function () {};
|
|
326
176
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
* whatever object is given.
|
|
330
|
-
*
|
|
331
|
-
* @param root {Object} The root to use.
|
|
332
|
-
* @internal
|
|
333
|
-
*/
|
|
334
|
-
setRoot(root) {
|
|
335
|
-
qx.$$namespaceRoot = root;
|
|
336
|
-
},
|
|
177
|
+
clazz.$$destructor = destruct;
|
|
178
|
+
qx.Bootstrap.setDisplayName(destruct, className, "destruct");
|
|
337
179
|
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
* @param args {arguments} the arguments variable of the calling method
|
|
343
|
-
* @param varargs {var} variable number of arguments passed to the overwritten function
|
|
344
|
-
* @return {var} the return value of the method of the base class.
|
|
345
|
-
*/
|
|
346
|
-
base: qx.Bootstrap.base,
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Define a new class using the qooxdoo class system.
|
|
350
|
-
* Lightweight version of {@link qx.Class#define} with less features.
|
|
351
|
-
*
|
|
352
|
-
* @signature function(name, config)
|
|
353
|
-
* @param name {String?} Name of the class. If null, the class will not be
|
|
354
|
-
* attached to a namespace.
|
|
355
|
-
* @param config {Map ? null} Class definition structure. The configuration map has the following keys:
|
|
356
|
-
* <table>
|
|
357
|
-
* <tr><th>Name</th><th>Type</th><th>Description</th></tr>
|
|
358
|
-
* <tr><th>extend</th><td>Class</td><td>The super class the current class inherits from.</td></tr>
|
|
359
|
-
* <tr><th>construct</th><td>Function</td><td>The constructor of the class.</td></tr>
|
|
360
|
-
* <tr><th>statics</th><td>Map</td><td>Map of static values / functions of the class.</td></tr>
|
|
361
|
-
* <tr><th>members</th><td>Map</td><td>Map of instance members of the class.</td></tr>
|
|
362
|
-
* <tr><th>defer</th><td>Function</td><td>Function that is called at the end of
|
|
363
|
-
* processing the class declaration.</td></tr>
|
|
364
|
-
* </table>
|
|
365
|
-
* @return {Class} The defined class.
|
|
366
|
-
*/
|
|
367
|
-
define: qx.Bootstrap.define,
|
|
180
|
+
// If there's a specified classname...
|
|
181
|
+
if (className) {
|
|
182
|
+
// Create that namespace
|
|
183
|
+
qx.Bootstrap.createNamespace(className, clazz);
|
|
368
184
|
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
* dependency
|
|
373
|
-
*
|
|
374
|
-
* @param object {Object?} the object to test
|
|
375
|
-
* @return {Boolean} true if object is an instance of qx.core.Object
|
|
376
|
-
*/
|
|
377
|
-
isQxCoreObject: qx.Bootstrap.isQxCoreObject,
|
|
378
|
-
|
|
379
|
-
/**
|
|
380
|
-
* Sets the display name of the given function
|
|
381
|
-
*
|
|
382
|
-
* @signature function(fcn, classname, name)
|
|
383
|
-
* @param fcn {Function} the function to set the display name for
|
|
384
|
-
* @param classname {String} the name of the class the function is defined in
|
|
385
|
-
* @param name {String} the function name
|
|
386
|
-
*/
|
|
387
|
-
setDisplayName: qx.Bootstrap.setDisplayName,
|
|
185
|
+
// Store class reference in global class registry
|
|
186
|
+
qx.Bootstrap.$$registry[className] = clazz;
|
|
187
|
+
}
|
|
388
188
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
189
|
+
// Now that the class has been defined, arrange to call its
|
|
190
|
+
// (optional) defer function
|
|
191
|
+
if (config.defer) {
|
|
192
|
+
// Execute defer section
|
|
193
|
+
qx.Bootstrap.addPendingDefer(clazz, () => {
|
|
194
|
+
config.defer(clazz, clazz.prototype, {
|
|
195
|
+
add(name, config) {
|
|
196
|
+
qx.Bootstrap.addProperties(
|
|
197
|
+
clazz,
|
|
198
|
+
{
|
|
199
|
+
[name]: config
|
|
200
|
+
},
|
|
201
|
+
|
|
202
|
+
true
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
}
|
|
398
208
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
* a nice identifier for them.
|
|
402
|
-
*
|
|
403
|
-
* @internal
|
|
404
|
-
* @signature function()
|
|
405
|
-
* @return {String} The class identifier
|
|
406
|
-
*/
|
|
407
|
-
genericToString: qx.Bootstrap.genericToString,
|
|
209
|
+
return clazz;
|
|
210
|
+
},
|
|
408
211
|
|
|
409
212
|
/**
|
|
410
213
|
* Inherit a clazz from a super class.
|
|
@@ -416,11 +219,10 @@ qx.Bootstrap.define("qx.Bootstrap", {
|
|
|
416
219
|
*
|
|
417
220
|
* @param clazz {Function} The class's wrapped constructor
|
|
418
221
|
* @param construct {Function} The unwrapped constructor
|
|
419
|
-
* @param superClass {
|
|
420
|
-
* @param name {
|
|
421
|
-
* @param basename {Function} the base name
|
|
222
|
+
* @param superClass {qx.Class} The super class
|
|
223
|
+
* @param name {String} fully qualified class name
|
|
422
224
|
*/
|
|
423
|
-
extendClass(clazz, construct, superClass, name
|
|
225
|
+
extendClass(clazz, construct, superClass, name) {
|
|
424
226
|
var superproto = superClass ? superClass.prototype : null;
|
|
425
227
|
|
|
426
228
|
// Use helper function/class to save the unnecessary constructor call while
|
|
@@ -433,8 +235,9 @@ qx.Bootstrap.define("qx.Bootstrap", {
|
|
|
433
235
|
clazz.prototype = proto;
|
|
434
236
|
|
|
435
237
|
// Store names in prototype
|
|
436
|
-
proto.name
|
|
437
|
-
|
|
238
|
+
// proto.name was set in v7 and earlier, but is excluded here because it causes conflicts with common
|
|
239
|
+
// property names
|
|
240
|
+
/*proto.name =*/ proto.classname = name;
|
|
438
241
|
|
|
439
242
|
/*
|
|
440
243
|
- Store base constructor to constructor-
|
|
@@ -451,287 +254,210 @@ qx.Bootstrap.define("qx.Bootstrap", {
|
|
|
451
254
|
construct.self = clazz.constructor = proto.constructor = clazz;
|
|
452
255
|
},
|
|
453
256
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
if (required) {
|
|
486
|
-
for (var key in required) {
|
|
487
|
-
var info = required[key];
|
|
488
|
-
if (info.load && info.className) {
|
|
489
|
-
executeForClassName(info.className);
|
|
490
|
-
}
|
|
257
|
+
_extend(classname, config) {
|
|
258
|
+
const type = config.type || "class";
|
|
259
|
+
const superclass = config.extend || Object;
|
|
260
|
+
let initFunctions = [];
|
|
261
|
+
let subclass;
|
|
262
|
+
let initialConstruct = config.construct;
|
|
263
|
+
|
|
264
|
+
if (config.type != "static") {
|
|
265
|
+
// If the constructor function is defined as a "method" using
|
|
266
|
+
// shorthand syntax, e.g.,
|
|
267
|
+
// qx.Class.define("myApp.X",
|
|
268
|
+
// {
|
|
269
|
+
// construct(x) {}
|
|
270
|
+
// });
|
|
271
|
+
//
|
|
272
|
+
// rather than as an actual function, e.g.,
|
|
273
|
+
// qx.Class.define("myApp.X",
|
|
274
|
+
// {
|
|
275
|
+
// construct : function(x) {}
|
|
276
|
+
// });
|
|
277
|
+
//
|
|
278
|
+
// then it's not allowed by the spec to be a constructor. We
|
|
279
|
+
// must wrap it.
|
|
280
|
+
//
|
|
281
|
+
subclass = function (...args) {
|
|
282
|
+
let ret;
|
|
283
|
+
|
|
284
|
+
// add abstract and singleton checks
|
|
285
|
+
if (type === "abstract") {
|
|
286
|
+
if (subclass.classname === classname) {
|
|
287
|
+
throw new Error("The class '," + classname + "' is abstract! It is not possible to instantiate it.");
|
|
491
288
|
}
|
|
492
289
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
290
|
+
|
|
291
|
+
if (type === "singleton") {
|
|
292
|
+
if (!subclass.$$allowconstruct) {
|
|
293
|
+
throw new Error(
|
|
294
|
+
"The class '" +
|
|
295
|
+
classname +
|
|
296
|
+
"' is a singleton! It is not possible to instantiate it " +
|
|
297
|
+
"directly. Use the static getInstance() method instead."
|
|
298
|
+
);
|
|
299
|
+
}
|
|
498
300
|
}
|
|
499
|
-
}
|
|
500
|
-
};
|
|
501
301
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
var dbClassInfo = clazz.$$dbClassInfo;
|
|
511
|
-
if (dbClassInfo) {
|
|
512
|
-
executeForDbClassInfo(dbClassInfo);
|
|
513
|
-
}
|
|
514
|
-
execute(clazz);
|
|
515
|
-
};
|
|
516
|
-
|
|
517
|
-
var execute = function (clazz) {
|
|
518
|
-
var cb = clazz.$$pendingDefer;
|
|
519
|
-
if (cb) {
|
|
520
|
-
delete clazz.$$pendingDefer;
|
|
521
|
-
clazz.$$deferComplete = true;
|
|
522
|
-
cb.call(clazz);
|
|
523
|
-
}
|
|
524
|
-
};
|
|
525
|
-
|
|
526
|
-
var getByName = function (name) {
|
|
527
|
-
var clazz = qx.Bootstrap.getByName(name);
|
|
528
|
-
if (!clazz) {
|
|
529
|
-
var splits = name.split(".");
|
|
530
|
-
var part = splits[0];
|
|
531
|
-
var root =
|
|
532
|
-
qx.$$namespaceRoot && qx.$$namespaceRoot[part]
|
|
533
|
-
? qx.$$namespaceRoot
|
|
534
|
-
: window;
|
|
535
|
-
var tmp = root;
|
|
536
|
-
|
|
537
|
-
for (
|
|
538
|
-
var i = 0, len = splits.length - 1;
|
|
539
|
-
tmp && i < len;
|
|
540
|
-
i++, part = splits[i]
|
|
541
|
-
) {
|
|
542
|
-
tmp = tmp[part];
|
|
302
|
+
// Call the constructor; note that we catch the return value of the constructor - this is allowed only because
|
|
303
|
+
// of `qxWeb` and backwards compatibility, but it is nonsense to return a different instance than `this`
|
|
304
|
+
if (initialConstruct) {
|
|
305
|
+
ret = initialConstruct.apply(this, args);
|
|
306
|
+
} else if (superclass === Object) {
|
|
307
|
+
superclass.apply(this, args);
|
|
308
|
+
} else {
|
|
309
|
+
ret = superclass.apply(this, args);
|
|
543
310
|
}
|
|
544
|
-
if (
|
|
545
|
-
|
|
311
|
+
if (ret !== undefined && ret !== this) {
|
|
312
|
+
qx.log.Logger.error(
|
|
313
|
+
`The constructor of class '${classname}' returned a different instance than 'this'. This is highly suspect, not recommended, and should be removed.`
|
|
314
|
+
);
|
|
546
315
|
}
|
|
547
|
-
}
|
|
548
|
-
return clazz;
|
|
549
|
-
};
|
|
550
316
|
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
317
|
+
return ret !== undefined ? ret : this;
|
|
318
|
+
};
|
|
319
|
+
} else {
|
|
320
|
+
subclass = function () {
|
|
321
|
+
throw new Error(`${classname}: can not instantiate a static class`);
|
|
322
|
+
};
|
|
556
323
|
}
|
|
557
324
|
|
|
558
|
-
|
|
559
|
-
|
|
325
|
+
// Allow easily identifying this class
|
|
326
|
+
qx.Bootstrap.setDisplayName(subclass, classname);
|
|
560
327
|
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
*
|
|
564
|
-
* @param name {String} class name to resolve
|
|
565
|
-
* @return {Class} the class
|
|
566
|
-
*/
|
|
567
|
-
getByName(name) {
|
|
568
|
-
return qx.Bootstrap.$$registry[name];
|
|
569
|
-
},
|
|
328
|
+
// This is a class
|
|
329
|
+
subclass.$$type = "Class";
|
|
570
330
|
|
|
571
|
-
|
|
572
|
-
|
|
331
|
+
// If its class type was specified, save it
|
|
332
|
+
if (config.type) {
|
|
333
|
+
subclass.$$classtype = config.type;
|
|
334
|
+
}
|
|
573
335
|
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
*/
|
|
336
|
+
// Ensure there's something unique to compare constructors to.
|
|
337
|
+
if (!config.construct) {
|
|
338
|
+
config.construct = function () {};
|
|
339
|
+
}
|
|
579
340
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
341
|
+
// Keep track of the original constructor so we know when to
|
|
342
|
+
// construct mixins
|
|
343
|
+
subclass.$$originalConstructor = config.construct;
|
|
344
|
+
|
|
345
|
+
qx.Bootstrap.extendClass(subclass, config.construct, superclass, classname);
|
|
346
|
+
|
|
347
|
+
// Save any init functions that need to be called upon instantiation
|
|
348
|
+
Object.defineProperty(subclass, "$$initFunctions", {
|
|
349
|
+
value: initFunctions,
|
|
350
|
+
writable: false,
|
|
351
|
+
configurable: false,
|
|
352
|
+
enumerable: allEnumerable || false
|
|
353
|
+
});
|
|
354
|
+
|
|
355
|
+
return subclass;
|
|
589
356
|
},
|
|
590
357
|
|
|
591
358
|
/**
|
|
592
|
-
*
|
|
593
|
-
* target objects. Attention: The target map gets modified.
|
|
359
|
+
* Removes a class from qooxdoo defined by {@link #define}
|
|
594
360
|
*
|
|
595
|
-
* @param
|
|
596
|
-
*
|
|
597
|
-
* @param overwrite {Boolean ? true} If enabled existing keys will be overwritten
|
|
598
|
-
* @return {Object} Target with merged values from the source object
|
|
361
|
+
* @param name {String}
|
|
362
|
+
* Name of the class
|
|
599
363
|
*/
|
|
600
|
-
|
|
601
|
-
if
|
|
602
|
-
|
|
364
|
+
undefine(name) {
|
|
365
|
+
// Nothing to do if the class name isn't registered
|
|
366
|
+
if (!(name in qx.Bootstrap.$$registry)) {
|
|
367
|
+
return;
|
|
603
368
|
}
|
|
604
369
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
370
|
+
// Delete the class from the registry
|
|
371
|
+
delete qx.Bootstrap.$$registry[name];
|
|
372
|
+
|
|
373
|
+
// Delete the class reference from the namespaces and all
|
|
374
|
+
// empty namespaces
|
|
375
|
+
let ns = name.split(".");
|
|
376
|
+
|
|
377
|
+
// Build up an array containing all namespace objects including window
|
|
378
|
+
let objects = [window];
|
|
379
|
+
for (let i = 0; i < ns.length; i++) {
|
|
380
|
+
objects.push(objects[i][ns[i]]);
|
|
609
381
|
}
|
|
610
382
|
|
|
611
|
-
|
|
383
|
+
// go through all objects and check for the constructor or
|
|
384
|
+
// empty namespaces
|
|
385
|
+
for (let i = objects.length - 1; i >= 1; i--) {
|
|
386
|
+
var last = objects[i];
|
|
387
|
+
var parent = objects[i - 1];
|
|
388
|
+
if (
|
|
389
|
+
// The class being undefined, but parent classes in case it is a
|
|
390
|
+
// nested class that is being undefined
|
|
391
|
+
(i == objects.length - 1 && qx.Bootstrap.isFunction(last)) ||
|
|
392
|
+
qx.Bootstrap.objectGetLength(last) === 0
|
|
393
|
+
) {
|
|
394
|
+
delete parent[ns[i - 1]];
|
|
395
|
+
} else {
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
}
|
|
612
399
|
},
|
|
613
400
|
|
|
614
401
|
/**
|
|
615
|
-
*
|
|
616
|
-
* in the object.
|
|
402
|
+
* Attach members to a class
|
|
617
403
|
*
|
|
618
|
-
* @
|
|
619
|
-
*
|
|
620
|
-
*/
|
|
621
|
-
__shadowedKeys: [
|
|
622
|
-
"isPrototypeOf",
|
|
623
|
-
"hasOwnProperty",
|
|
624
|
-
"toLocaleString",
|
|
625
|
-
"toString",
|
|
626
|
-
"valueOf",
|
|
627
|
-
"propertyIsEnumerable",
|
|
628
|
-
"constructor"
|
|
629
|
-
],
|
|
630
|
-
|
|
631
|
-
/**
|
|
632
|
-
* Get the keys of a map as array as returned by a "for ... in" statement.
|
|
404
|
+
* @param clazz {Class}
|
|
405
|
+
* Class to add members to
|
|
633
406
|
*
|
|
634
|
-
* @
|
|
635
|
-
*
|
|
636
|
-
* @param map {Object} the map
|
|
637
|
-
* @return {Array} array of the keys of the map
|
|
407
|
+
* @param members {Map}
|
|
408
|
+
* The map of members to attach
|
|
638
409
|
*/
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
(
|
|
646
|
-
|
|
647
|
-
throw new TypeError("Object.keys requires an object as argument.");
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
var arr = [];
|
|
651
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
652
|
-
for (var key in map) {
|
|
653
|
-
if (hasOwnProperty.call(map, key)) {
|
|
654
|
-
arr.push(key);
|
|
410
|
+
addMembers(clazz, members) {
|
|
411
|
+
for (let key in members) {
|
|
412
|
+
let member = members[key];
|
|
413
|
+
let proto = clazz.prototype;
|
|
414
|
+
|
|
415
|
+
if (qx["core"]["Environment"].get("qx.debug")) {
|
|
416
|
+
if (proto[key] !== undefined && key.charAt(0) === "_" && key.charAt(1) === "_") {
|
|
417
|
+
throw new Error(`Overwriting private member "${key}" ` + `of Class "${clazz.classname}" ` + "is not allowed");
|
|
655
418
|
}
|
|
656
419
|
}
|
|
657
420
|
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
var shadowedKeys = qx.Bootstrap.__shadowedKeys;
|
|
662
|
-
for (var i = 0, a = shadowedKeys, l = a.length; i < l; i++) {
|
|
663
|
-
if (hasOwnProperty.call(map, a[i])) {
|
|
664
|
-
arr.push(a[i]);
|
|
665
|
-
}
|
|
666
|
-
}
|
|
421
|
+
if (typeof member == "function") {
|
|
422
|
+
// Allow easily identifying this method
|
|
423
|
+
qx.Bootstrap.setDisplayName(member, clazz.classname, key);
|
|
667
424
|
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
default(map) {
|
|
672
|
-
if (
|
|
673
|
-
map === null ||
|
|
674
|
-
(typeof map !== "object" && typeof map !== "function")
|
|
675
|
-
) {
|
|
676
|
-
throw new TypeError("Object.keys requires an object as argument.");
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
var arr = [];
|
|
680
|
-
|
|
681
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
682
|
-
for (var key in map) {
|
|
683
|
-
if (hasOwnProperty.call(map, key)) {
|
|
684
|
-
arr.push(key);
|
|
425
|
+
// Allow base calls
|
|
426
|
+
if (key in clazz.prototype) {
|
|
427
|
+
member.base = clazz.prototype[key];
|
|
685
428
|
}
|
|
686
429
|
}
|
|
687
430
|
|
|
688
|
-
|
|
431
|
+
// Create the storage for this member
|
|
432
|
+
Object.defineProperty(clazz.prototype, key, {
|
|
433
|
+
value: member,
|
|
434
|
+
writable: true,
|
|
435
|
+
configurable: true,
|
|
436
|
+
enumerable: allEnumerable || true
|
|
437
|
+
});
|
|
689
438
|
}
|
|
690
|
-
}
|
|
691
|
-
typeof Object.keys === "function"
|
|
692
|
-
? "ES5"
|
|
693
|
-
: (function () {
|
|
694
|
-
for (var key in { toString: 1 }) {
|
|
695
|
-
return key;
|
|
696
|
-
}
|
|
697
|
-
})() !== "toString"
|
|
698
|
-
? "BROKEN_IE"
|
|
699
|
-
: "default"
|
|
700
|
-
],
|
|
439
|
+
},
|
|
701
440
|
|
|
702
441
|
/**
|
|
703
|
-
*
|
|
442
|
+
* This method will be attached to all classes to return a nice
|
|
443
|
+
* identifier for them.
|
|
444
|
+
*
|
|
704
445
|
* @internal
|
|
705
|
-
* @
|
|
446
|
+
* @signature function()
|
|
447
|
+
* @return {String} The class identifier
|
|
706
448
|
*/
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
"[object Array]": "Array",
|
|
710
|
-
"[object Object]": "Object",
|
|
711
|
-
"[object RegExp]": "RegExp",
|
|
712
|
-
"[object Number]": "Number",
|
|
713
|
-
"[object Boolean]": "Boolean",
|
|
714
|
-
"[object Date]": "Date",
|
|
715
|
-
"[object Function]": "Function",
|
|
716
|
-
"[object AsyncFunction]": "Function",
|
|
717
|
-
"[object Error]": "Error",
|
|
718
|
-
"[object Blob]": "Blob",
|
|
719
|
-
"[object ArrayBuffer]": "ArrayBuffer",
|
|
720
|
-
"[object FormData]": "FormData"
|
|
449
|
+
genericToString() {
|
|
450
|
+
return this.classname;
|
|
721
451
|
},
|
|
722
452
|
|
|
723
|
-
/*
|
|
724
|
-
---------------------------------------------------------------------------
|
|
725
|
-
FUNCTION UTILITY FUNCTIONS
|
|
726
|
-
---------------------------------------------------------------------------
|
|
727
|
-
*/
|
|
728
|
-
|
|
729
453
|
/**
|
|
730
454
|
* Returns a function whose "this" is altered.
|
|
731
455
|
*
|
|
732
456
|
* *Syntax*
|
|
733
457
|
*
|
|
734
|
-
* <pre class='javascript'>
|
|
458
|
+
* <pre class='javascript'>
|
|
459
|
+
* qx.Bootstrap.bind(myFunction, [self, [varargs...]]);
|
|
460
|
+
* </pre>
|
|
735
461
|
*
|
|
736
462
|
* *Example*
|
|
737
463
|
*
|
|
@@ -747,63 +473,138 @@ qx.Bootstrap.define("qx.Bootstrap", {
|
|
|
747
473
|
* myBoundFunction(); // this will make the element myElement red.
|
|
748
474
|
* </pre>
|
|
749
475
|
*
|
|
750
|
-
* @param func {Function}
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
* @
|
|
476
|
+
* @param func {Function}
|
|
477
|
+
* Original function to wrap
|
|
478
|
+
*
|
|
479
|
+
* @param self {Object ? null}
|
|
480
|
+
* The object that the "this" of the function will refer to.
|
|
481
|
+
*
|
|
482
|
+
* @param varargs {arguments ? null}
|
|
483
|
+
* The variable number of arguments to pass to the function
|
|
484
|
+
*
|
|
485
|
+
* @return {Function}
|
|
486
|
+
* The bound function.
|
|
754
487
|
*/
|
|
755
488
|
bind(func, self, varargs) {
|
|
756
|
-
var fixedArgs = Array.prototype.slice.call(
|
|
757
|
-
|
|
758
|
-
2,
|
|
759
|
-
arguments.length
|
|
760
|
-
);
|
|
761
|
-
|
|
762
|
-
return function () {
|
|
763
|
-
var args = Array.prototype.slice.call(arguments, 0, arguments.length);
|
|
764
|
-
return func.apply(self, fixedArgs.concat(args));
|
|
765
|
-
};
|
|
489
|
+
var fixedArgs = Array.prototype.slice.call(arguments, 2);
|
|
490
|
+
return func.bind(self, ...fixedArgs);
|
|
766
491
|
},
|
|
767
492
|
|
|
768
|
-
/*
|
|
769
|
-
---------------------------------------------------------------------------
|
|
770
|
-
STRING UTILITY FUNCTIONS
|
|
771
|
-
---------------------------------------------------------------------------
|
|
772
|
-
*/
|
|
773
|
-
|
|
774
493
|
/**
|
|
775
|
-
*
|
|
494
|
+
* Helper method to handle singletons
|
|
776
495
|
*
|
|
777
|
-
* @
|
|
778
|
-
*
|
|
496
|
+
* @return {Object}
|
|
497
|
+
* The singleton instance
|
|
498
|
+
*
|
|
499
|
+
* @internal
|
|
779
500
|
*/
|
|
780
|
-
|
|
781
|
-
|
|
501
|
+
getInstance() {
|
|
502
|
+
if (this.$$instance === null) {
|
|
503
|
+
throw new Error(
|
|
504
|
+
"Singleton instance of " +
|
|
505
|
+
this +
|
|
506
|
+
" is requested, but not ready yet. This is most likely due" +
|
|
507
|
+
" to a recursive call in the constructor path."
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
if (!this.$$instance) {
|
|
512
|
+
// Allow calling the constructor
|
|
513
|
+
this.$$allowconstruct = true;
|
|
514
|
+
|
|
515
|
+
// null means "object is being created"; needed for another call
|
|
516
|
+
// of getInstance() during instantiation
|
|
517
|
+
this.$$instance = null;
|
|
518
|
+
|
|
519
|
+
// Obtain the singleton instance
|
|
520
|
+
this.$$instance = new this();
|
|
521
|
+
|
|
522
|
+
// Disallow, again, calling the constructor
|
|
523
|
+
delete this.$$allowconstruct;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
return this.$$instance;
|
|
527
|
+
},
|
|
528
|
+
|
|
529
|
+
createNamespace(name, object) {
|
|
530
|
+
var splits = name.split(".");
|
|
531
|
+
var part = splits[0];
|
|
532
|
+
var parent = qx.$$namespaceRoot && qx.$$namespaceRoot[part] ? qx.$$namespaceRoot : window;
|
|
533
|
+
|
|
534
|
+
for (var i = 0, len = splits.length - 1; i < len; i++, part = splits[i]) {
|
|
535
|
+
if (!parent[part]) {
|
|
536
|
+
parent = parent[part] = {};
|
|
537
|
+
} else {
|
|
538
|
+
parent = parent[part];
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
// store object
|
|
543
|
+
parent[part] = object;
|
|
544
|
+
|
|
545
|
+
// return last part name (e.g. classname)
|
|
546
|
+
return part;
|
|
782
547
|
},
|
|
783
548
|
|
|
784
549
|
/**
|
|
785
|
-
*
|
|
550
|
+
* Offers the ability to change the root for creating namespaces from
|
|
551
|
+
* window to whatever object is given.
|
|
786
552
|
*
|
|
787
|
-
* @param
|
|
788
|
-
*
|
|
553
|
+
* @param root {Object}
|
|
554
|
+
* The root to use.
|
|
555
|
+
*
|
|
556
|
+
* @internal
|
|
789
557
|
*/
|
|
790
|
-
|
|
791
|
-
|
|
558
|
+
setRoot(root) {
|
|
559
|
+
qx.$$namespaceRoot = root;
|
|
792
560
|
},
|
|
793
561
|
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
562
|
+
getDisplayName(f) {
|
|
563
|
+
return f.$$displayName || "<non-qooxdoo>";
|
|
564
|
+
},
|
|
565
|
+
|
|
566
|
+
setDisplayName(f, classname, name) {
|
|
567
|
+
if (name) {
|
|
568
|
+
f.$$displayName = f.displayName = `${classname}.${name}()`;
|
|
569
|
+
} else {
|
|
570
|
+
f.$$displayName = f.displayName = `${classname}()`;
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
|
|
574
|
+
setDisplayNames(functionMap, classname) {
|
|
575
|
+
for (let name in functionMap) {
|
|
576
|
+
let f = functionMap[name];
|
|
577
|
+
|
|
578
|
+
if (f instanceof Function) {
|
|
579
|
+
f.$$displayName = f.displayName = `${classname}.${f.name || name}()`;
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
|
|
584
|
+
base(args, varargs) {
|
|
585
|
+
if (qx.Bootstrap.DEBUG) {
|
|
586
|
+
if (typeof args.callee.base != "function") {
|
|
587
|
+
throw new Error("Cannot call super class. Method is not derived: " + qx.Bootstrap.getDisplayName(args.callee));
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
if (arguments.length === 1) {
|
|
592
|
+
return args.callee.base.call(this);
|
|
593
|
+
} else {
|
|
594
|
+
return args.callee.base.apply(this, Array.prototype.slice.call(arguments, 1));
|
|
595
|
+
}
|
|
596
|
+
},
|
|
799
597
|
|
|
800
598
|
/**
|
|
801
599
|
* Get the internal class of the value. See
|
|
802
600
|
* http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/
|
|
803
601
|
* for details.
|
|
804
602
|
*
|
|
805
|
-
* @param value {var}
|
|
806
|
-
*
|
|
603
|
+
* @param value {var}
|
|
604
|
+
* value to get the class for
|
|
605
|
+
*
|
|
606
|
+
* @return {String}
|
|
607
|
+
* The internal class of the value
|
|
807
608
|
*/
|
|
808
609
|
getClass(value) {
|
|
809
610
|
// The typeof null and undefined is "object" under IE8
|
|
@@ -812,24 +613,40 @@ qx.Bootstrap.define("qx.Bootstrap", {
|
|
|
812
613
|
} else if (value === null) {
|
|
813
614
|
return "Null";
|
|
814
615
|
}
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
616
|
+
|
|
617
|
+
let classString = Object.prototype.toString.call(value);
|
|
618
|
+
return qx.Bootstrap._classToTypeMap[classString] || classString.slice(8, -1);
|
|
619
|
+
},
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Find a class by its name
|
|
623
|
+
*
|
|
624
|
+
* @param name {String}
|
|
625
|
+
* class name to resolve
|
|
626
|
+
*
|
|
627
|
+
* @return {Class}
|
|
628
|
+
* The class
|
|
629
|
+
*/
|
|
630
|
+
getByName(name) {
|
|
631
|
+
return qx.Bootstrap.$$registry[name];
|
|
819
632
|
},
|
|
820
633
|
|
|
821
634
|
/**
|
|
822
635
|
* Whether the value is a string.
|
|
823
636
|
*
|
|
824
|
-
* @param value {var}
|
|
825
|
-
*
|
|
637
|
+
* @param value {var}
|
|
638
|
+
* Value to check.
|
|
639
|
+
*
|
|
640
|
+
* @return {Boolean}
|
|
641
|
+
* Whether the value is a string.
|
|
826
642
|
*/
|
|
827
643
|
isString(value) {
|
|
828
|
-
// Added "value !== null" because IE throws an exception
|
|
829
|
-
// by executing "value instanceof String" if
|
|
830
|
-
// doesn't exist. It seems that
|
|
831
|
-
//
|
|
832
|
-
// e.q. by
|
|
644
|
+
// Added "value !== null" because IE throws an exception
|
|
645
|
+
// "Object expected" by executing "value instanceof String" if
|
|
646
|
+
// value is a DOM element that doesn't exist. It seems that
|
|
647
|
+
// there is an internal difference between a JavaScript null
|
|
648
|
+
// and a null returned from calling DOM. e.q. by
|
|
649
|
+
// document.getElementById("ReturnedNull").
|
|
833
650
|
return (
|
|
834
651
|
value !== null &&
|
|
835
652
|
(typeof value === "string" ||
|
|
@@ -846,42 +663,30 @@ qx.Bootstrap.define("qx.Bootstrap", {
|
|
|
846
663
|
* @return {Boolean} Whether the value is an array.
|
|
847
664
|
*/
|
|
848
665
|
isArray(value) {
|
|
849
|
-
// Added "value !== null" because IE throws an exception
|
|
850
|
-
// by executing "value instanceof Array" if
|
|
851
|
-
// doesn't exist. It seems that
|
|
852
|
-
//
|
|
853
|
-
// e.q. by
|
|
666
|
+
// Added "value !== null" because IE throws an exception
|
|
667
|
+
// "Object expected" by executing "value instanceof Array" if
|
|
668
|
+
// value is a DOM element that doesn't exist. It seems that
|
|
669
|
+
// there is an internal difference between a JavaScript null
|
|
670
|
+
// and a null returned from calling DOM. e.q. by
|
|
671
|
+
// document.getElementById("ReturnedNull").
|
|
854
672
|
return (
|
|
855
673
|
value !== null &&
|
|
856
674
|
(value instanceof Array ||
|
|
857
|
-
(value &&
|
|
858
|
-
qx.data &&
|
|
859
|
-
qx.data.IListData &&
|
|
860
|
-
qx.util.OOUtil.hasInterface(
|
|
861
|
-
value.constructor,
|
|
862
|
-
qx.data.IListData
|
|
863
|
-
)) ||
|
|
675
|
+
(value && qx.data && qx.data.IListData && qx.util.OOUtil.hasInterface(value.constructor, qx.data.IListData)) ||
|
|
864
676
|
qx.Bootstrap.getClass(value) === "Array" ||
|
|
865
677
|
(!!value && !!value.$$isArray))
|
|
866
678
|
);
|
|
867
679
|
},
|
|
868
680
|
|
|
869
681
|
/**
|
|
870
|
-
* Whether the value is an
|
|
871
|
-
*
|
|
872
|
-
* If you need to determine whether something is a POJO and not created from a class, use isPojo instead
|
|
682
|
+
* Whether the value is an object. Note that built-in types like Window
|
|
683
|
+
* are not reported to be objects.
|
|
873
684
|
*
|
|
874
|
-
*
|
|
875
|
-
*
|
|
876
|
-
* @param {*} value value to check.
|
|
685
|
+
* @param value {var} Value to check.
|
|
877
686
|
* @return {Boolean} Whether the value is an object.
|
|
878
687
|
*/
|
|
879
688
|
isObject(value) {
|
|
880
|
-
return (
|
|
881
|
-
value !== undefined &&
|
|
882
|
-
value !== null &&
|
|
883
|
-
qx.Bootstrap.getClass(value) === "Object"
|
|
884
|
-
);
|
|
689
|
+
return value !== undefined && value !== null && qx.Bootstrap.getClass(value) === "Object";
|
|
885
690
|
},
|
|
886
691
|
|
|
887
692
|
/**
|
|
@@ -905,67 +710,488 @@ qx.Bootstrap.define("qx.Bootstrap", {
|
|
|
905
710
|
return name === "Function" || name === "AsyncFunction";
|
|
906
711
|
},
|
|
907
712
|
|
|
908
|
-
/*
|
|
909
|
-
---------------------------------------------------------------------------
|
|
910
|
-
LOGGING UTILITY FUNCTIONS
|
|
911
|
-
---------------------------------------------------------------------------
|
|
912
|
-
*/
|
|
913
|
-
|
|
914
|
-
$$logs: [],
|
|
915
|
-
|
|
916
713
|
/**
|
|
917
|
-
*
|
|
714
|
+
* Tests whether an object is an instance of qx.core.Object without
|
|
715
|
+
* using instanceof - this is only for certain low level instances
|
|
716
|
+
* which would otherwise cause a circular, load time dependency
|
|
918
717
|
*
|
|
919
|
-
* @param object {Object}
|
|
920
|
-
* @
|
|
921
|
-
* have any JavaScript data type. All data is serialized immediately and
|
|
922
|
-
* does not keep references to other objects.
|
|
718
|
+
* @param object {Object?} the object to test
|
|
719
|
+
* @return {Boolean} true if object is an instance of qx.core.Object
|
|
923
720
|
*/
|
|
924
|
-
|
|
925
|
-
|
|
721
|
+
isQxCoreObject(object) {
|
|
722
|
+
if (object === object.constructor) {
|
|
723
|
+
return false;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
let clz = object.constructor;
|
|
727
|
+
let qxCoreObject = ["qx", "core", "Object"].join(".");
|
|
728
|
+
while (clz) {
|
|
729
|
+
if (clz.classname === qxCoreObject) {
|
|
730
|
+
return true;
|
|
731
|
+
}
|
|
732
|
+
clz = clz.superclass;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
return false;
|
|
926
736
|
},
|
|
927
737
|
|
|
928
738
|
/**
|
|
929
|
-
*
|
|
739
|
+
* Convert the first character of the string to upper case.
|
|
930
740
|
*
|
|
931
|
-
* @param
|
|
932
|
-
* @
|
|
933
|
-
* have any JavaScript data type. All data is serialized immediately and
|
|
934
|
-
* does not keep references to other objects.
|
|
741
|
+
* @param str {String} the string
|
|
742
|
+
* @return {String} the string with an upper case first character
|
|
935
743
|
*/
|
|
936
|
-
|
|
937
|
-
|
|
744
|
+
firstUp(str) {
|
|
745
|
+
return str.charAt(0).toUpperCase() + str.substr(1);
|
|
938
746
|
},
|
|
939
747
|
|
|
940
748
|
/**
|
|
941
|
-
*
|
|
749
|
+
* Convert the first character of the string to lower case.
|
|
942
750
|
*
|
|
943
|
-
* @param
|
|
944
|
-
* @
|
|
945
|
-
* have any JavaScript data type. All data is serialized immediately and
|
|
946
|
-
* does not keep references to other objects.
|
|
751
|
+
* @param str {String} the string
|
|
752
|
+
* @return {String} the string with a lower case first character
|
|
947
753
|
*/
|
|
948
|
-
|
|
949
|
-
|
|
754
|
+
firstLow(str) {
|
|
755
|
+
return str.charAt(0).toLowerCase() + str.substr(1);
|
|
950
756
|
},
|
|
951
757
|
|
|
952
758
|
/**
|
|
953
|
-
*
|
|
954
|
-
*
|
|
955
|
-
* @
|
|
956
|
-
* @param message {var} Any number of arguments supported. An argument may
|
|
957
|
-
* have any JavaScript data type. All data is serialized immediately and
|
|
958
|
-
* does not keep references to other objects.
|
|
759
|
+
* Mapping from JavaScript string representation of objects to names
|
|
760
|
+
* @internal
|
|
761
|
+
* @type {Map}
|
|
959
762
|
*/
|
|
960
|
-
|
|
961
|
-
|
|
763
|
+
_classToTypeMap: {
|
|
764
|
+
"[object String]": "String",
|
|
765
|
+
"[object Array]": "Array",
|
|
766
|
+
"[object Object]": "Object",
|
|
767
|
+
"[object RegExp]": "RegExp",
|
|
768
|
+
"[object Number]": "Number",
|
|
769
|
+
"[object Boolean]": "Boolean",
|
|
770
|
+
"[object Date]": "Date",
|
|
771
|
+
"[object Function]": "Function",
|
|
772
|
+
"[object AsyncFunction]": "Function",
|
|
773
|
+
"[object Error]": "Error",
|
|
774
|
+
"[object Blob]": "Blob",
|
|
775
|
+
"[object ArrayBuffer]": "ArrayBuffer",
|
|
776
|
+
"[object FormData]": "FormData"
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
|
|
780
|
+
core: {
|
|
781
|
+
// Bootstrap Aspect class
|
|
782
|
+
Aspect: {
|
|
783
|
+
wrap(fullName, f, type) {
|
|
784
|
+
return f;
|
|
785
|
+
}
|
|
962
786
|
},
|
|
963
787
|
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
788
|
+
// Bootstrap Environment class
|
|
789
|
+
Environment: {
|
|
790
|
+
$$environment: {},
|
|
791
|
+
|
|
792
|
+
get(key) {
|
|
793
|
+
return qx["core"]["Environment"].$$environment[key];
|
|
794
|
+
},
|
|
795
|
+
|
|
796
|
+
add(key, value) {
|
|
797
|
+
qx["core"]["Environment"].$$environment[key] = value;
|
|
798
|
+
}
|
|
799
|
+
}
|
|
970
800
|
}
|
|
971
801
|
});
|
|
802
|
+
|
|
803
|
+
//
|
|
804
|
+
// Pull ourself up by our bootstraps!
|
|
805
|
+
//
|
|
806
|
+
qx.Bootstrap.define("qx.Bootstrap", {
|
|
807
|
+
type: "static",
|
|
808
|
+
statics: Object.assign(
|
|
809
|
+
{
|
|
810
|
+
/** Timestamp of qooxdoo based application startup */
|
|
811
|
+
LOADSTART: qx.$$start || new Date(),
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* Mapping for early use of the qx.debug environment setting.
|
|
815
|
+
*/
|
|
816
|
+
DEBUG: (function () {
|
|
817
|
+
// make sure to reflect all changes here to the environment class!
|
|
818
|
+
var debug = true;
|
|
819
|
+
if (qx.$$environment && qx.$$environment["qx.debug"] === false) {
|
|
820
|
+
debug = false;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
return debug;
|
|
824
|
+
})(),
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Minimal accessor API for the environment settings given from
|
|
828
|
+
* the generator.
|
|
829
|
+
*
|
|
830
|
+
* WARNING: This method only should be used if the {@link
|
|
831
|
+
* qx["core"]["Environment"]} class is not loaded!
|
|
832
|
+
*
|
|
833
|
+
* @param key {String}
|
|
834
|
+
* The key to get the value from.
|
|
835
|
+
*
|
|
836
|
+
* @return {var}
|
|
837
|
+
* The value of the setting or <code>undefined</code>.
|
|
838
|
+
*/
|
|
839
|
+
getEnvironmentSetting(key) {
|
|
840
|
+
if (qx.$$environment) {
|
|
841
|
+
return qx.$$environment[key];
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
return undefined;
|
|
845
|
+
},
|
|
846
|
+
|
|
847
|
+
/**
|
|
848
|
+
* Minimal mutator for the environment settings given from the
|
|
849
|
+
* generator. It checks for the existence of the environment settings
|
|
850
|
+
* and sets the key if its not given from the generator. If a setting
|
|
851
|
+
* is available from the generator, the setting will be ignored.
|
|
852
|
+
*
|
|
853
|
+
* WARNING: This method only should be used if the
|
|
854
|
+
* {@link qx.core.Environment} class is not loaded!
|
|
855
|
+
*
|
|
856
|
+
* @param key {String} The key of the setting.
|
|
857
|
+
* @param value {var} The value for the setting.
|
|
858
|
+
*/
|
|
859
|
+
setEnvironmentSetting(key, value) {
|
|
860
|
+
if (!qx.$$environment) {
|
|
861
|
+
qx.$$environment = {};
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
if (qx.$$environment[key] === undefined) {
|
|
865
|
+
qx.$$environment[key] = value;
|
|
866
|
+
}
|
|
867
|
+
},
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Private list of classes which have a defer method that
|
|
871
|
+
* needs to be executed
|
|
872
|
+
*/
|
|
873
|
+
__pendingDefers: [],
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Adds a callback for a class so that it's defer method can be
|
|
877
|
+
* called, either after all classes are loaded or when absolutely
|
|
878
|
+
* necessary because of load-time requirements of other classes.
|
|
879
|
+
*
|
|
880
|
+
* @param clazz {Class}
|
|
881
|
+
* Class to add a callback to
|
|
882
|
+
*
|
|
883
|
+
* @param cb {Function}
|
|
884
|
+
* Callback function
|
|
885
|
+
*/
|
|
886
|
+
addPendingDefer(clazz, cb) {
|
|
887
|
+
if (qx.$$loader && qx.$$loader.delayDefer) {
|
|
888
|
+
this.__pendingDefers.push(clazz);
|
|
889
|
+
clazz.$$pendingDefer = cb;
|
|
890
|
+
} else {
|
|
891
|
+
cb.call(clazz);
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
|
|
895
|
+
/**
|
|
896
|
+
* Executes the defer methods for classes which are required by the
|
|
897
|
+
* dependency information in dbClassInfo (which is a map in the format
|
|
898
|
+
* generated by qxcompiler). Defer methods are of course only executed
|
|
899
|
+
* once but they are always put off until absolutely necessary to
|
|
900
|
+
* avoid potential side effects and recursive and/or difficult to
|
|
901
|
+
* resolve dependencies.
|
|
902
|
+
*
|
|
903
|
+
* @param dbClassInfo {Object}
|
|
904
|
+
* qxcompiler map
|
|
905
|
+
*/
|
|
906
|
+
executePendingDefers(dbClassInfo) {
|
|
907
|
+
let execute;
|
|
908
|
+
let executeForDbClassInfo;
|
|
909
|
+
let executeForClassName;
|
|
910
|
+
let getByName;
|
|
911
|
+
|
|
912
|
+
execute = function (clazz) {
|
|
913
|
+
let cb = clazz.$$pendingDefer;
|
|
914
|
+
if (cb) {
|
|
915
|
+
delete clazz.$$pendingDefer;
|
|
916
|
+
clazz.$$deferComplete = true;
|
|
917
|
+
cb.call(clazz);
|
|
918
|
+
}
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
executeForDbClassInfo = function (dbClassInfo) {
|
|
922
|
+
if (dbClassInfo.environment) {
|
|
923
|
+
let required = dbClassInfo.environment.required;
|
|
924
|
+
if (required) {
|
|
925
|
+
for (let key in required) {
|
|
926
|
+
let info = required[key];
|
|
927
|
+
if (info.load && info.className) {
|
|
928
|
+
executeForClassName(info.className);
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
for (let key in dbClassInfo.dependsOn) {
|
|
935
|
+
let depInfo = dbClassInfo.dependsOn[key];
|
|
936
|
+
if (depInfo.require || depInfo.usage === "dynamic") {
|
|
937
|
+
executeForClassName(key);
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
};
|
|
941
|
+
|
|
942
|
+
executeForClassName = function (className) {
|
|
943
|
+
let clazz = getByName(className);
|
|
944
|
+
if (!clazz) {
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
if (clazz.$$deferComplete) {
|
|
949
|
+
return;
|
|
950
|
+
}
|
|
951
|
+
let dbClassInfo = clazz.$$dbClassInfo;
|
|
952
|
+
if (dbClassInfo) {
|
|
953
|
+
executeForDbClassInfo(dbClassInfo);
|
|
954
|
+
}
|
|
955
|
+
execute(clazz);
|
|
956
|
+
};
|
|
957
|
+
|
|
958
|
+
getByName = function (name) {
|
|
959
|
+
let clazz = qx.Bootstrap.getByName(name);
|
|
960
|
+
if (!clazz) {
|
|
961
|
+
let splits = name.split(".");
|
|
962
|
+
let part = splits[0];
|
|
963
|
+
let root = qx.$$namespaceRoot && qx.$$namespaceRoot[part] ? qx.$$namespaceRoot : window;
|
|
964
|
+
let tmp = root;
|
|
965
|
+
|
|
966
|
+
for (let i = 0, len = splits.length - 1; tmp && i < len; i++, part = splits[i]) {
|
|
967
|
+
tmp = tmp[part];
|
|
968
|
+
}
|
|
969
|
+
if (tmp != root) {
|
|
970
|
+
clazz = tmp;
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
return clazz;
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
if (!dbClassInfo) {
|
|
977
|
+
let pendingDefers = this.__pendingDefers;
|
|
978
|
+
this.__pendingDefers = [];
|
|
979
|
+
pendingDefers.forEach(execute);
|
|
980
|
+
return;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
executeForDbClassInfo(dbClassInfo);
|
|
984
|
+
},
|
|
985
|
+
|
|
986
|
+
/*
|
|
987
|
+
-----------------------------------------------------------------------
|
|
988
|
+
OBJECT UTILITY FUNCTIONS
|
|
989
|
+
-----------------------------------------------------------------------
|
|
990
|
+
*/
|
|
991
|
+
|
|
992
|
+
/**
|
|
993
|
+
* Get the number of own properties in the object.
|
|
994
|
+
*
|
|
995
|
+
* @param map {Object}
|
|
996
|
+
* the map
|
|
997
|
+
*
|
|
998
|
+
* @return {Integer}
|
|
999
|
+
* number of objects in the map
|
|
1000
|
+
*
|
|
1001
|
+
* @lint ignoreUnused(key)
|
|
1002
|
+
*/
|
|
1003
|
+
objectGetLength(map) {
|
|
1004
|
+
return qx.Bootstrap.keys(map).length;
|
|
1005
|
+
},
|
|
1006
|
+
|
|
1007
|
+
/**
|
|
1008
|
+
* Inserts all keys of the source object into the target
|
|
1009
|
+
* objects. Attention: The target map gets modified.
|
|
1010
|
+
*
|
|
1011
|
+
* @param target {Object}
|
|
1012
|
+
* target object
|
|
1013
|
+
*
|
|
1014
|
+
* @param source {Object}
|
|
1015
|
+
* object to be merged
|
|
1016
|
+
*
|
|
1017
|
+
* @param overwrite {Boolean ? true}
|
|
1018
|
+
* If enabled existing keys will be overwritten
|
|
1019
|
+
*
|
|
1020
|
+
* @return {Object}
|
|
1021
|
+
* Target with merged values from the source object
|
|
1022
|
+
*/
|
|
1023
|
+
objectMergeWith(target, source, overwrite) {
|
|
1024
|
+
if (overwrite === undefined) {
|
|
1025
|
+
overwrite = true;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
for (let key in source) {
|
|
1029
|
+
if (overwrite || target[key] === undefined) {
|
|
1030
|
+
target[key] = source[key];
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
return target;
|
|
1035
|
+
},
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* IE does not return "shadowed" keys even if they are defined directly
|
|
1039
|
+
* in the object.
|
|
1040
|
+
*
|
|
1041
|
+
* @internal
|
|
1042
|
+
* @type {String[]}
|
|
1043
|
+
*/
|
|
1044
|
+
_shadowedKeys: ["isPrototypeOf", "hasOwnProperty", "toLocaleString", "toString", "valueOf", "propertyIsEnumerable", "constructor"],
|
|
1045
|
+
|
|
1046
|
+
/**
|
|
1047
|
+
* Get the keys of a map as array as returned by a "for ... in"
|
|
1048
|
+
* statement.
|
|
1049
|
+
*
|
|
1050
|
+
* @signature function(map)
|
|
1051
|
+
*
|
|
1052
|
+
* @internal
|
|
1053
|
+
*
|
|
1054
|
+
* @param map {Object}
|
|
1055
|
+
* the map
|
|
1056
|
+
*
|
|
1057
|
+
* @return {Array}
|
|
1058
|
+
* array of the keys of the map
|
|
1059
|
+
*/
|
|
1060
|
+
keys: {
|
|
1061
|
+
ES5: Object.keys,
|
|
1062
|
+
|
|
1063
|
+
BROKEN_IE(map) {
|
|
1064
|
+
if (map === null || (typeof map !== "object" && typeof map !== "function")) {
|
|
1065
|
+
throw new TypeError("Object.keys requires an object as argument.");
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
let arr = [];
|
|
1069
|
+
let hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1070
|
+
for (let key in map) {
|
|
1071
|
+
if (hasOwnProperty.call(map, key)) {
|
|
1072
|
+
arr.push(key);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
// IE does not return "shadowed" keys even if they are
|
|
1077
|
+
// defined directly in the object. This is incompatible
|
|
1078
|
+
// with the ECMA standard!! This is why this checks are
|
|
1079
|
+
// needed.
|
|
1080
|
+
var shadowedKeys = qx.Bootstrap._shadowedKeys;
|
|
1081
|
+
for (let i = 0, a = shadowedKeys, l = a.length; i < l; i++) {
|
|
1082
|
+
if (hasOwnProperty.call(map, a[i])) {
|
|
1083
|
+
arr.push(a[i]);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
return arr;
|
|
1088
|
+
},
|
|
1089
|
+
|
|
1090
|
+
default(map) {
|
|
1091
|
+
if (map === null || (typeof map !== "object" && typeof map !== "function")) {
|
|
1092
|
+
throw new TypeError("Object.keys requires an object as argument.");
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
let arr = [];
|
|
1096
|
+
|
|
1097
|
+
let hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
1098
|
+
for (let key in map) {
|
|
1099
|
+
if (hasOwnProperty.call(map, key)) {
|
|
1100
|
+
arr.push(key);
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
return arr;
|
|
1105
|
+
}
|
|
1106
|
+
}[
|
|
1107
|
+
typeof Object.keys === "function"
|
|
1108
|
+
? "ES5"
|
|
1109
|
+
: (function () {
|
|
1110
|
+
for (let key in { toString: 1 }) {
|
|
1111
|
+
return key;
|
|
1112
|
+
}
|
|
1113
|
+
})() !== "toString"
|
|
1114
|
+
? "BROKEN_IE"
|
|
1115
|
+
: "default"
|
|
1116
|
+
],
|
|
1117
|
+
|
|
1118
|
+
/*
|
|
1119
|
+
-----------------------------------------------------------------------
|
|
1120
|
+
LOGGING UTILITY FUNCTIONS
|
|
1121
|
+
-----------------------------------------------------------------------
|
|
1122
|
+
*/
|
|
1123
|
+
|
|
1124
|
+
$$logs: [],
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* Sending a message at level "debug" to the logger.
|
|
1128
|
+
*
|
|
1129
|
+
* @param object {Object}
|
|
1130
|
+
* Contextual object (either instance or static class)
|
|
1131
|
+
*
|
|
1132
|
+
* @param message {var}
|
|
1133
|
+
* Any number of arguments supported. An argument may have any
|
|
1134
|
+
* JavaScript data type. All data is serialized immediately and does
|
|
1135
|
+
* not keep references to other objects.
|
|
1136
|
+
*/
|
|
1137
|
+
debug(object, message) {
|
|
1138
|
+
qx.Bootstrap.$$logs.push(["debug", arguments]);
|
|
1139
|
+
},
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* Sending a message at level "info" to the logger.
|
|
1143
|
+
*
|
|
1144
|
+
* @param object {Object}
|
|
1145
|
+
* Contextual object (either instance or static class)
|
|
1146
|
+
*
|
|
1147
|
+
* @param message {var}
|
|
1148
|
+
* Any number of arguments supported. An argument may have any
|
|
1149
|
+
* JavaScript data type. All data is serialized immediately and does
|
|
1150
|
+
* not keep references to other objects.
|
|
1151
|
+
*/
|
|
1152
|
+
info(object, message) {
|
|
1153
|
+
qx.Bootstrap.$$logs.push(["info", arguments]);
|
|
1154
|
+
},
|
|
1155
|
+
|
|
1156
|
+
/**
|
|
1157
|
+
* Sending a message at level "warn" to the logger.
|
|
1158
|
+
*
|
|
1159
|
+
* @param object {Object}
|
|
1160
|
+
* Contextual object (either instance or static class)
|
|
1161
|
+
*
|
|
1162
|
+
* @param message {var}
|
|
1163
|
+
* Any number of arguments supported. An argument may have any
|
|
1164
|
+
* JavaScript data type. All data is serialized immediately and does
|
|
1165
|
+
* not keep references to other objects.
|
|
1166
|
+
*/
|
|
1167
|
+
warn(object, message) {
|
|
1168
|
+
qx.Bootstrap.$$logs.push(["warn", arguments]);
|
|
1169
|
+
},
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Sending a message at level "error" to the logger.
|
|
1173
|
+
*
|
|
1174
|
+
* @param object {Object}
|
|
1175
|
+
* Contextual object (either instance or static class)
|
|
1176
|
+
*
|
|
1177
|
+
* @param message {var}
|
|
1178
|
+
* Any number of arguments supported. An argument may have any
|
|
1179
|
+
* JavaScript data type. All data is serialized immediately and does
|
|
1180
|
+
* not keep references to other objects.
|
|
1181
|
+
*/
|
|
1182
|
+
error(object, message) {
|
|
1183
|
+
qx.Bootstrap.$$logs.push(["error", arguments]);
|
|
1184
|
+
},
|
|
1185
|
+
|
|
1186
|
+
/**
|
|
1187
|
+
* Prints the current stack trace at level "info"
|
|
1188
|
+
*
|
|
1189
|
+
* @param object {Object}
|
|
1190
|
+
* Contextual object (either instance or static class)
|
|
1191
|
+
*/
|
|
1192
|
+
trace(object) {}
|
|
1193
|
+
},
|
|
1194
|
+
|
|
1195
|
+
qx.Bootstrap
|
|
1196
|
+
)
|
|
1197
|
+
});
|