@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
|
@@ -0,0 +1,1481 @@
|
|
|
1
|
+
/* ************************************************************************
|
|
2
|
+
|
|
3
|
+
qooxdoo - the new era of web development
|
|
4
|
+
|
|
5
|
+
http://qooxdoo.org
|
|
6
|
+
|
|
7
|
+
Copyright:
|
|
8
|
+
2023-24 Zenesis Limited (https://www.zenesis.com)
|
|
9
|
+
|
|
10
|
+
License:
|
|
11
|
+
MIT: https://opensource.org/licenses/MIT
|
|
12
|
+
See the LICENSE file in the project's top-level directory for details.
|
|
13
|
+
|
|
14
|
+
Authors:
|
|
15
|
+
* John Spackman (github.com/johnspackman)
|
|
16
|
+
|
|
17
|
+
************************************************************************ */
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Property implementation for actual properties
|
|
21
|
+
*
|
|
22
|
+
* TODO:
|
|
23
|
+
*
|
|
24
|
+
* `validate` implementation
|
|
25
|
+
* `delegate` implementation
|
|
26
|
+
* `inheritable` implementation (pass onto `obj._getChildren`; check for special `inherit` value)
|
|
27
|
+
* Array check
|
|
28
|
+
* FunctionCheck
|
|
29
|
+
*
|
|
30
|
+
* how does init of property values work? `init` per class and `initFunction` per instance?
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
qx.Bootstrap.define("qx.core.property.Property", {
|
|
34
|
+
implement: qx.core.property.IProperty,
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @param {string} propertyName
|
|
39
|
+
* @param {Function} clazz
|
|
40
|
+
*/
|
|
41
|
+
construct(propertyName, clazz) {
|
|
42
|
+
this.__propertyName = propertyName;
|
|
43
|
+
this.__clazz = clazz;
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
environment: {
|
|
47
|
+
/**
|
|
48
|
+
* @deprecated Changing this setting is deprecated.
|
|
49
|
+
* If set to true, then getting a property that is inheritable but has nothing to inherit from
|
|
50
|
+
* will return null, instead of throwing an error.
|
|
51
|
+
*/
|
|
52
|
+
"qx.core.property.Property.inheritableDefaultIsNull": false,
|
|
53
|
+
/**
|
|
54
|
+
* If set to true, then properties with init values will have their apply method called during construction.
|
|
55
|
+
* Default is false to maintain backward compatibility with v7 behavior.
|
|
56
|
+
*/
|
|
57
|
+
"qx.core.property.Property.applyDuringConstruct": false,
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Only relevant when applyDuringConstruct is true.
|
|
61
|
+
* This contains regexes matching classnames which are excluded from the auto apply behaviour.
|
|
62
|
+
* They refer to concrete classes only, not the superclasses.
|
|
63
|
+
*
|
|
64
|
+
* Currently (2025-12-03), only "qx." classes are excluded because enabling applyDuringConstruct
|
|
65
|
+
* would create problems which are difficult to fix.
|
|
66
|
+
*
|
|
67
|
+
* @type {Array<RegExp | string>}
|
|
68
|
+
*/
|
|
69
|
+
"qx.core.property.Property.excludeAutoApply": [/^qx\./],
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* If set to true, this enables the deprecated `deferredInit` setting in property definitions,
|
|
73
|
+
* before initFunctions were introduced.
|
|
74
|
+
*/
|
|
75
|
+
"qx.core.property.Property.allowDeferredInit": true
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
members: {
|
|
79
|
+
/**
|
|
80
|
+
* @type {Boolean} whether this property is inheritable or not
|
|
81
|
+
*/
|
|
82
|
+
__inheritable: null,
|
|
83
|
+
/** @type {String} the name of the property */
|
|
84
|
+
__propertyName: null,
|
|
85
|
+
|
|
86
|
+
/** @type {qx.Class} the class that defined the property */
|
|
87
|
+
__clazz: null,
|
|
88
|
+
|
|
89
|
+
/** @type {Boolean} whether this is a pseudo property or not */
|
|
90
|
+
__pseudoProperty: false,
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @type {qx.Class} the class that original defined this property, before it was cloned and
|
|
94
|
+
* refined for the current `__clazz`
|
|
95
|
+
*/
|
|
96
|
+
__superClass: null,
|
|
97
|
+
|
|
98
|
+
/** @type {Object} the original definition */
|
|
99
|
+
__definition: null,
|
|
100
|
+
|
|
101
|
+
/** @type {qx.core.property.IPropertyStorage} the storage implementation */
|
|
102
|
+
__storage: null,
|
|
103
|
+
|
|
104
|
+
/** @type {Boolean} whether the property can be set */
|
|
105
|
+
__readOnly: false,
|
|
106
|
+
|
|
107
|
+
/** @type {Function|String?} the method called to validate incoming values, or the name of the function to call */
|
|
108
|
+
__validate: null,
|
|
109
|
+
|
|
110
|
+
/** @type {Function|String?} the apply method or name of the method */
|
|
111
|
+
__apply: null,
|
|
112
|
+
|
|
113
|
+
/** @type {Function?} the transform method or name of the transform method */
|
|
114
|
+
__transform: null,
|
|
115
|
+
|
|
116
|
+
/** @type {String} the name of the change event */
|
|
117
|
+
__eventName: null,
|
|
118
|
+
|
|
119
|
+
/** @type {*} the init value */
|
|
120
|
+
__initValue: undefined,
|
|
121
|
+
|
|
122
|
+
/** @type {*} the init function used to get the init value */
|
|
123
|
+
__initFunction: undefined,
|
|
124
|
+
|
|
125
|
+
/** @type {qx.core.check.Check} the check object for verifying property value compatibility */
|
|
126
|
+
__check: null,
|
|
127
|
+
|
|
128
|
+
/** @type {Function?} the function to test for equality */
|
|
129
|
+
__isEqual: null,
|
|
130
|
+
|
|
131
|
+
/** @type {qx.Annotation[]?null} any annotations */
|
|
132
|
+
__annotations: null,
|
|
133
|
+
|
|
134
|
+
/** @type {Boolean} whether the property needs to be dereferenced */
|
|
135
|
+
__needsDereference: false,
|
|
136
|
+
|
|
137
|
+
isRefineAllowed(def) {},
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* The class where this property is defined
|
|
141
|
+
* @returns {Function}
|
|
142
|
+
*/
|
|
143
|
+
getClass() {
|
|
144
|
+
return this.__clazz;
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Configures a pseudo property
|
|
149
|
+
*/
|
|
150
|
+
configurePseudoProperty() {
|
|
151
|
+
this.__definition = null;
|
|
152
|
+
this.__pseudoProperty = true;
|
|
153
|
+
let upname = qx.Bootstrap.firstUp(this.__propertyName);
|
|
154
|
+
this.__eventName = qx.Class.hasMixin(this.__clazz, qx.core.MEvent) ? "change" + upname : null;
|
|
155
|
+
this.__readOnly = this.__clazz.prototype["set" + upname] === undefined;
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @Override
|
|
160
|
+
*/
|
|
161
|
+
configure(def) {
|
|
162
|
+
let upname = qx.Bootstrap.firstUp(this.__propertyName);
|
|
163
|
+
let methodNames = {};
|
|
164
|
+
for (let tmp = this.__clazz; tmp; tmp = tmp.superclass) {
|
|
165
|
+
for (let methodName in tmp.prototype) {
|
|
166
|
+
if (typeof tmp.prototype[methodName] == "function") {
|
|
167
|
+
methodNames[methodName] = tmp.prototype[methodName];
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Auto detect the property definition from a type name
|
|
173
|
+
if (typeof def == "string") {
|
|
174
|
+
def = {
|
|
175
|
+
check: def
|
|
176
|
+
};
|
|
177
|
+
let applyName = "apply" + upname;
|
|
178
|
+
if (typeof methodNames[applyName] == "function") {
|
|
179
|
+
def.apply = applyName;
|
|
180
|
+
} else {
|
|
181
|
+
applyName = "_" + applyName;
|
|
182
|
+
if (typeof methodNames[applyName] == "function") {
|
|
183
|
+
def.apply = applyName;
|
|
184
|
+
} else {
|
|
185
|
+
applyName = "_" + applyName;
|
|
186
|
+
if (typeof methodNames[applyName] == "function") {
|
|
187
|
+
def.apply = applyName;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
if (typeof methodNames["transform" + upname] == "function") {
|
|
192
|
+
def.transform = "transform" + upname;
|
|
193
|
+
} else if (typeof methodNames["_transform" + upname] == "function") {
|
|
194
|
+
def.transform = "_transform" + upname;
|
|
195
|
+
} else if (typeof methodNames["__transform" + upname] == "function") {
|
|
196
|
+
def.transform = "__transform" + upname;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
this.__definition = def;
|
|
200
|
+
|
|
201
|
+
// Figure out the storage implementation
|
|
202
|
+
if (def.storage) {
|
|
203
|
+
if (qx.Class.hasInterface(def.storage.constructor, qx.core.property.IPropertyStorage)) {
|
|
204
|
+
this.__storage = def.storage;
|
|
205
|
+
} else {
|
|
206
|
+
this.__storage = new def.storage();
|
|
207
|
+
}
|
|
208
|
+
} else {
|
|
209
|
+
if (def.immutable == "replace") {
|
|
210
|
+
if (def.check == "Array") {
|
|
211
|
+
this.__storage = qx.core.property.PropertyStorageFactory.getStorage(qx.core.property.ImmutableArrayStorage);
|
|
212
|
+
} else if (def.check == "Object") {
|
|
213
|
+
this.__storage = qx.core.property.PropertyStorageFactory.getStorage(qx.core.property.ImmutableObjectStorage);
|
|
214
|
+
} else if (def.check == "qx.data.Array") {
|
|
215
|
+
this.__storage = qx.core.property.PropertyStorageFactory.getStorage(qx.core.property.ImmutableDataArrayStorage);
|
|
216
|
+
} else {
|
|
217
|
+
throw new Error(
|
|
218
|
+
`${this}: ` + "only `check : 'Array'` and `check : 'Object'` " + "properties may have `immutable : 'replace'`."
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
} else {
|
|
222
|
+
if (typeof def.get == "function" || typeof def.getAsync == "function") {
|
|
223
|
+
this.__storage = new qx.core.property.ExplicitPropertyStorage(this, this.__clazz);
|
|
224
|
+
} else {
|
|
225
|
+
this.__storage = qx.core.property.PropertyStorageFactory.getStorage(qx.core.property.SimplePropertyStorage);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const getFunction = (value, description) => {
|
|
231
|
+
if (!value) {
|
|
232
|
+
return null;
|
|
233
|
+
}
|
|
234
|
+
if (typeof value == "function") {
|
|
235
|
+
return value;
|
|
236
|
+
}
|
|
237
|
+
if (typeof value == "string") {
|
|
238
|
+
if (value.match(/^[a-z0-9_]+$/i)) {
|
|
239
|
+
return value;
|
|
240
|
+
}
|
|
241
|
+
return new Function(def.apply);
|
|
242
|
+
}
|
|
243
|
+
throw new Error(`${this}: ${description} method ` + value + " is invalid");
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
this.__apply = getFunction(def.apply, "Apply") || this.__apply;
|
|
247
|
+
this.__transform = getFunction(def.transform, "Transform") || this.__transform;
|
|
248
|
+
this.__validate = getFunction(def.validate, "Validate") || this.__validate;
|
|
249
|
+
this.__readOnly =
|
|
250
|
+
def.immutable === "readonly" || (this.__storage.classname === "qx.core.property.ExplicitPropertyStorage" && !def.set);
|
|
251
|
+
|
|
252
|
+
if (def.event !== undefined) {
|
|
253
|
+
this.__eventName = def.event;
|
|
254
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
255
|
+
if (!qx.Class.hasMixin(this.__clazz, qx.core.MEvent)) {
|
|
256
|
+
this.warn(
|
|
257
|
+
`Property ${this} has event "${this.__eventName}" but the class ${this.__clazz.classname} does not implement qx.core.MEvent, so event will not be fired.`
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
} else {
|
|
262
|
+
this.__eventName = qx.Class.hasMixin(this.__clazz, qx.core.MEvent) ? "change" + qx.Bootstrap.firstUp(this.__propertyName) : null;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if (def.isEqual) {
|
|
266
|
+
if (def.isEqual instanceof Function) {
|
|
267
|
+
this.__isEqual = def.isEqual;
|
|
268
|
+
} else if (typeof def.isEqual == "string") {
|
|
269
|
+
if (methodNames[def.isEqual]) {
|
|
270
|
+
this.__isEqual = methodNames[def.isEqual];
|
|
271
|
+
} else {
|
|
272
|
+
this.__isEqual = new Function("a", "b", "return " + def.isEqual);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
if (def.init !== undefined) {
|
|
278
|
+
this.__initValue = def.init;
|
|
279
|
+
}
|
|
280
|
+
if (def.initFunction) {
|
|
281
|
+
this.__initFunction = def.initFunction;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
285
|
+
if (def.deferredInit) {
|
|
286
|
+
if (qx.core.Environment.get("qx.core.property.Property.allowDeferredInit")) {
|
|
287
|
+
// this.warn(`${this}: deferredInit is deprecated, use initFunction instead`);
|
|
288
|
+
} else {
|
|
289
|
+
throw new Error(`${this}: deferredInit is not allowed, set qx.core.property.Property.allowDeferredInit to true to allow it`);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
if ((def.init !== undefined || def.initFunction) && def.deferredInit) {
|
|
295
|
+
this.error(`${this}: init/initFunction and deferredInit are mutually exclusive, ignoring deferredInit`);
|
|
296
|
+
delete def.deferredInit;
|
|
297
|
+
}
|
|
298
|
+
this.__needsDereference = def.dereference;
|
|
299
|
+
|
|
300
|
+
let newCheck = null;
|
|
301
|
+
|
|
302
|
+
if (typeof def.check == "function") {
|
|
303
|
+
newCheck = new qx.core.check.SimpleCheck(def.check, !!def.nullable, false);
|
|
304
|
+
} else if (def.check) {
|
|
305
|
+
newCheck = qx.core.check.CheckFactory.getInstance().getCheck(def.check || "any", !!def.nullable);
|
|
306
|
+
if (newCheck && def.nullable && !newCheck.isNullable()) {
|
|
307
|
+
newCheck = qx.core.check.CheckFactory.getInstance().getCheck((def.check || "any") + "?");
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (!newCheck && def.check instanceof String) {
|
|
311
|
+
if (qx.core.Environment.get("qx.Class.futureCheckJsDoc")) {
|
|
312
|
+
// Next try to parse the check string as JSDoc
|
|
313
|
+
let bJSDocParsed = false;
|
|
314
|
+
try {
|
|
315
|
+
newCheck = new qx.core.check.JsDocCheck(def.check, !!def.nullable);
|
|
316
|
+
} catch (e) {
|
|
317
|
+
// Couldn't parse JSDoc so the check string is not a JSDoc one. Fall through to next
|
|
318
|
+
// possible use of the check string.
|
|
319
|
+
//
|
|
320
|
+
// FALL THROUGH
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (!newCheck) {
|
|
325
|
+
let fn = null;
|
|
326
|
+
try {
|
|
327
|
+
fn = new Function("value", `return (${def.check});`);
|
|
328
|
+
} catch (ex) {
|
|
329
|
+
throw new Error(`${this}: ` + "Error creating check function: " + `${def.check}: ` + ex);
|
|
330
|
+
}
|
|
331
|
+
newCheck = new qx.core.check.SimpleCheck(fn, !!def.nullable, false);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (newCheck) {
|
|
337
|
+
if (this.__check && !this.__check.isCompatible(newCheck)) {
|
|
338
|
+
throw new Error(
|
|
339
|
+
`Property ${this} has invalid check because the definition in the superclass ${this.__superClass} is not compatible`
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
this.__check = newCheck;
|
|
343
|
+
}
|
|
344
|
+
if (this.__check instanceof qx.core.check.SimpleCheck) {
|
|
345
|
+
this.__needsDereference = def.dereference || this.__check.needsDereference();
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
if (def["@"] && def["@"].length > 0) {
|
|
349
|
+
this.__annotations = [...def["@"]];
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if (this.__inheritable == null) {
|
|
353
|
+
this.__inheritable = !!def?.inheritable;
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* @Override
|
|
359
|
+
*/
|
|
360
|
+
clone(clazz) {
|
|
361
|
+
let clone = new qx.core.property.Property(this.__propertyName);
|
|
362
|
+
clone.__inheritable = this.__inheritable;
|
|
363
|
+
clone.__propertyName = this.__propertyName;
|
|
364
|
+
clone.__clazz = clazz;
|
|
365
|
+
clone.__superClass = this.__clazz;
|
|
366
|
+
clone.__definition = this.__definition;
|
|
367
|
+
clone.__storage = this.__storage;
|
|
368
|
+
clone.__readOnly = this.__readOnly;
|
|
369
|
+
clone.__validate = this.__validate;
|
|
370
|
+
clone.__apply = this.__apply;
|
|
371
|
+
clone.__transform = this.__transform;
|
|
372
|
+
clone.__eventName = this.__eventName;
|
|
373
|
+
clone.__initValue = this.__initValue;
|
|
374
|
+
clone.__initFunction = this.__initFunction;
|
|
375
|
+
clone.__check = this.__check;
|
|
376
|
+
clone.__isEqual = this.__isEqual;
|
|
377
|
+
clone.__annotations = this.__annotations ? qx.lang.Array.clone(this.__annotations) : null;
|
|
378
|
+
clone.__needsDereference = this.__needsDereference;
|
|
379
|
+
return clone;
|
|
380
|
+
},
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Called to define the property on a class prototype
|
|
384
|
+
*
|
|
385
|
+
* @param {qx.Class} clazz the class having the property defined
|
|
386
|
+
* @param {Boolean?} patch whether patching an existing class
|
|
387
|
+
*/
|
|
388
|
+
defineProperty(clazz, patch) {
|
|
389
|
+
let propertyName = this.__propertyName;
|
|
390
|
+
let scopePrefix = "";
|
|
391
|
+
if (propertyName.startsWith("__")) {
|
|
392
|
+
scopePrefix = "__";
|
|
393
|
+
propertyName = propertyName.substring(2);
|
|
394
|
+
} else if (propertyName.startsWith("_")) {
|
|
395
|
+
scopePrefix = "_";
|
|
396
|
+
propertyName = propertyName.substring(1);
|
|
397
|
+
}
|
|
398
|
+
let upname = qx.Bootstrap.firstUp(propertyName);
|
|
399
|
+
let self = this;
|
|
400
|
+
|
|
401
|
+
let proto = clazz.prototype;
|
|
402
|
+
|
|
403
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
404
|
+
if (clazz.prototype.$$superProperties[propertyName] && propertyName.charAt(0) === "_" && propertyName.charAt(1) === "_") {
|
|
405
|
+
throw new Error(`Overwriting private member "${propertyName}" ` + `of Class "${clazz.classname}" ` + "is not allowed");
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
if (
|
|
409
|
+
patch !== true &&
|
|
410
|
+
(proto.hasOwnProperty(propertyName) ||
|
|
411
|
+
qx.Class.objectProperties.has(propertyName) ||
|
|
412
|
+
(propertyName in proto && !(propertyName in clazz.prototype.$$superProperties)))
|
|
413
|
+
) {
|
|
414
|
+
throw new Error(
|
|
415
|
+
`Overwriting member or property "${propertyName}" ` +
|
|
416
|
+
`of Class "${clazz.classname}" ` +
|
|
417
|
+
"is not allowed. " +
|
|
418
|
+
"(Members and properties are in the same namespace.)"
|
|
419
|
+
);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
const addMethod = (name, func) => {
|
|
424
|
+
clazz.prototype[scopePrefix + name] = func;
|
|
425
|
+
qx.Bootstrap.setDisplayName(func, clazz.classname, "prototype." + name);
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
// Does this property have an initFunction?
|
|
429
|
+
if (this.__initFunction !== undefined) {
|
|
430
|
+
clazz.prototype.$$initFunctions.push(propertyName);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
let initValue = this.__initValue;
|
|
434
|
+
if (initValue !== undefined) {
|
|
435
|
+
clazz.prototype["$$init_" + propertyName] = initValue;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
addMethod("init" + upname, function (...args) {
|
|
439
|
+
self.init(this, ...args);
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
// theme-specified
|
|
443
|
+
if (this.__definition?.themeable) {
|
|
444
|
+
addMethod("getThemed" + upname, function () {
|
|
445
|
+
return self.getThemed(this);
|
|
446
|
+
});
|
|
447
|
+
|
|
448
|
+
addMethod("setThemed" + upname, function (value) {
|
|
449
|
+
self.setThemed(this, value);
|
|
450
|
+
return value;
|
|
451
|
+
});
|
|
452
|
+
|
|
453
|
+
addMethod("resetThemed" + upname, function () {
|
|
454
|
+
self.resetThemed(this);
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// inheritable
|
|
459
|
+
if (this.__definition?.inheritable) {
|
|
460
|
+
patch && delete clazz.prototype[`$$inherit_${propertyName}`];
|
|
461
|
+
Object.defineProperty(clazz.prototype, `$$inherit_${propertyName}`, {
|
|
462
|
+
value: undefined,
|
|
463
|
+
writable: false,
|
|
464
|
+
configurable: false
|
|
465
|
+
});
|
|
466
|
+
|
|
467
|
+
addMethod("refresh" + upname, function () {
|
|
468
|
+
return self.refresh(this);
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
// Native property value
|
|
473
|
+
let propertyConfig = {
|
|
474
|
+
get: function () {
|
|
475
|
+
// When iterating a prototype, `this` will not be an instance of the class
|
|
476
|
+
// (ie `this` will be the prototype)
|
|
477
|
+
if (this instanceof this.constructor) {
|
|
478
|
+
return self.get(this);
|
|
479
|
+
}
|
|
480
|
+
return this["$$init_" + propertyName];
|
|
481
|
+
},
|
|
482
|
+
configurable: qx.Class.$$options.propsAccessible || false,
|
|
483
|
+
enumerable: qx.Class.$$options.propsAccessible || false
|
|
484
|
+
};
|
|
485
|
+
propertyConfig.set = function (value) {
|
|
486
|
+
self.set(this, value);
|
|
487
|
+
};
|
|
488
|
+
Object.defineProperty(clazz.prototype, propertyName, propertyConfig);
|
|
489
|
+
|
|
490
|
+
if (!this.__pseudoProperty) {
|
|
491
|
+
addMethod("get" + upname, function (cb) {
|
|
492
|
+
if (cb) {
|
|
493
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
494
|
+
if (typeof cb !== "function") {
|
|
495
|
+
throw new Error(`${self}: If an argument is passed into getter, it must be a callback.`);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
return self.getAsync(this).then(cb);
|
|
499
|
+
} else {
|
|
500
|
+
return self.get(this);
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
addMethod("get" + upname + "Async", async function () {
|
|
504
|
+
return await self.getAsync(this);
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
if (this.__definition?.check === "Boolean") {
|
|
509
|
+
addMethod("is" + upname, function () {
|
|
510
|
+
return self.get(this);
|
|
511
|
+
});
|
|
512
|
+
addMethod("is" + upname + "Async", async function () {
|
|
513
|
+
return await self.getAsync(this);
|
|
514
|
+
});
|
|
515
|
+
addMethod("toggle" + upname, function () {
|
|
516
|
+
return self.set(this, !self.get(this));
|
|
517
|
+
});
|
|
518
|
+
addMethod("toggle" + upname + "Async", async function () {
|
|
519
|
+
return await self.setAsync(this, !(await self.getAsync(this)));
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
if (!this.__pseudoProperty) {
|
|
524
|
+
addMethod("set" + upname, function (value) {
|
|
525
|
+
self.set(this, value);
|
|
526
|
+
return value;
|
|
527
|
+
});
|
|
528
|
+
addMethod("set" + upname + "Async", async function (value) {
|
|
529
|
+
await self.setAsync(this, value);
|
|
530
|
+
return value;
|
|
531
|
+
});
|
|
532
|
+
addMethod("reset" + upname, function () {
|
|
533
|
+
self.reset(this);
|
|
534
|
+
});
|
|
535
|
+
addMethod("reset" + upname + "Async", function () {
|
|
536
|
+
return self.resetAsync(this);
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Returns an object for tracking state of the property, per object instance (ie not per class)
|
|
543
|
+
*
|
|
544
|
+
* @param {qx.core.Object} thisObj
|
|
545
|
+
* @returns {Object}
|
|
546
|
+
*/
|
|
547
|
+
getPropertyState(thisObj) {
|
|
548
|
+
thisObj.$$propertyState ??= {};
|
|
549
|
+
return (thisObj.$$propertyState[this.__propertyName] ??= {});
|
|
550
|
+
},
|
|
551
|
+
|
|
552
|
+
/**
|
|
553
|
+
* Initialises a property value
|
|
554
|
+
*
|
|
555
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
556
|
+
*/
|
|
557
|
+
init(thisObj, value) {
|
|
558
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
559
|
+
if (this.__pseudoProperty) {
|
|
560
|
+
throw new Error(`${this}: Cannot call init on pseudo property.`);
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
let state = this.getPropertyState(thisObj);
|
|
564
|
+
if (state.initMethodCalled) {
|
|
565
|
+
this.warn(`${this}: init() called more than once, ignoring`);
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
state.initMethodCalled = true;
|
|
569
|
+
|
|
570
|
+
if (value !== undefined && this.__definition?.init !== undefined) {
|
|
571
|
+
this.warn(
|
|
572
|
+
`${this}: init() called with a value, ignoring - use deferredInit and do not specify an init value in the property definition`
|
|
573
|
+
);
|
|
574
|
+
value = undefined;
|
|
575
|
+
}
|
|
576
|
+
if (value === undefined) {
|
|
577
|
+
value = this.getInitValue(thisObj);
|
|
578
|
+
}
|
|
579
|
+
if (value === undefined) {
|
|
580
|
+
throw new Error(`${this}: init() called without a value`);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
if (!this.isReadOnly()) {
|
|
584
|
+
this.__storage.set(thisObj, this, value);
|
|
585
|
+
}
|
|
586
|
+
this.__setMutating(thisObj, true);
|
|
587
|
+
thisObj["$$init_" + this.__propertyName] = value;
|
|
588
|
+
|
|
589
|
+
try {
|
|
590
|
+
if (this.__apply) {
|
|
591
|
+
this.__callFunction(thisObj, this.__apply, value, undefined, this.__propertyName);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
if (this.__eventName && qx.event.Registration.hasListener(thisObj, this.__eventName)) {
|
|
595
|
+
thisObj.fireDataEvent(this.__eventName, value, undefined);
|
|
596
|
+
}
|
|
597
|
+
this.__applyValueToInheritedChildren(thisObj);
|
|
598
|
+
} finally {
|
|
599
|
+
this.__setMutating(thisObj, false);
|
|
600
|
+
}
|
|
601
|
+
},
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
*
|
|
605
|
+
* @returns {Boolean} whether the property has an init value provided in the definition (either a constant init value or an init function)
|
|
606
|
+
*/
|
|
607
|
+
hasInitValue() {
|
|
608
|
+
return this.__clazz.prototype["$$init_" + this.__propertyName] !== undefined || this.__initFunction !== undefined;
|
|
609
|
+
},
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Calculates the init value used by `init()` and `reset()`
|
|
613
|
+
*
|
|
614
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
615
|
+
* @returns {*}
|
|
616
|
+
*/
|
|
617
|
+
getInitValue(thisObj) {
|
|
618
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
619
|
+
if (this.__pseudoProperty) {
|
|
620
|
+
throw new Error(`${this}: Cannot call getInitValue on pseudo property.`);
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
let value = thisObj["$$init_" + this.__propertyName];
|
|
624
|
+
if (value !== undefined) {
|
|
625
|
+
return value;
|
|
626
|
+
}
|
|
627
|
+
if (this.__initFunction !== undefined) {
|
|
628
|
+
value = this.__initFunction.call(thisObj, value, this);
|
|
629
|
+
thisObj["$$init_" + this.__propertyName] = value;
|
|
630
|
+
}
|
|
631
|
+
return value;
|
|
632
|
+
},
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* Gets a property value; will raise an error if the property is not initialized
|
|
636
|
+
*
|
|
637
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
638
|
+
* @return {*}
|
|
639
|
+
*/
|
|
640
|
+
get(thisObj) {
|
|
641
|
+
if (this.__pseudoProperty) {
|
|
642
|
+
return this.__callFunction(thisObj, "get" + qx.Bootstrap.firstUp(this.__propertyName));
|
|
643
|
+
}
|
|
644
|
+
return this.__getImpl(thisObj, false);
|
|
645
|
+
},
|
|
646
|
+
|
|
647
|
+
/**
|
|
648
|
+
* Gets a property value; if not initialized and the property is async, it will
|
|
649
|
+
* wait for the underlying storage to resolve but will throw an error if the underlying
|
|
650
|
+
* storage cannot provide a value which is not `undefined`
|
|
651
|
+
*
|
|
652
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
653
|
+
* @return {*}
|
|
654
|
+
*/
|
|
655
|
+
async getAsync(thisObj) {
|
|
656
|
+
if (this.__pseudoProperty) {
|
|
657
|
+
return this.__callFunction(thisObj, "get" + qx.Bootstrap.firstUp(this.__propertyName) + "Async");
|
|
658
|
+
}
|
|
659
|
+
return this.__getAsyncImpl(thisObj, false);
|
|
660
|
+
},
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Gets a property value; if not initialized, it will return undefined
|
|
664
|
+
* @param {qx.core.Object} thisObj
|
|
665
|
+
* @param {boolean?} async
|
|
666
|
+
* @returns {*}
|
|
667
|
+
*/
|
|
668
|
+
getSafe(thisObj, async = false) {
|
|
669
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
670
|
+
if (this.__pseudoProperty) {
|
|
671
|
+
throw new Error(`${this}: Pseudo properties do not support getSafe`);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
if (async) {
|
|
675
|
+
return this.__getAsyncImpl(thisObj, true);
|
|
676
|
+
}
|
|
677
|
+
return this.__getImpl(thisObj, true);
|
|
678
|
+
},
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Gets the themed value, if there is one
|
|
682
|
+
*
|
|
683
|
+
* @param {qx.core.Object} thisObj
|
|
684
|
+
* @returns {*}
|
|
685
|
+
*/
|
|
686
|
+
getThemed(thisObj) {
|
|
687
|
+
if (this.isThemeable()) {
|
|
688
|
+
let state = this.getPropertyState(thisObj);
|
|
689
|
+
return state.themeValue ?? null;
|
|
690
|
+
}
|
|
691
|
+
return null;
|
|
692
|
+
},
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
*
|
|
696
|
+
* @returns {Function?} If this property is refined, the superclass which this overrides.
|
|
697
|
+
* Null otherwise.
|
|
698
|
+
*/
|
|
699
|
+
getSuperClass() {
|
|
700
|
+
return this.__superClass;
|
|
701
|
+
},
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Sets a property value.
|
|
705
|
+
*
|
|
706
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
707
|
+
* @param {*} value the value to set
|
|
708
|
+
*/
|
|
709
|
+
set(thisObj, value) {
|
|
710
|
+
if (this.__pseudoProperty) {
|
|
711
|
+
this.__callFunction(thisObj, "set" + qx.Bootstrap.firstUp(this.__propertyName), value);
|
|
712
|
+
} else {
|
|
713
|
+
this.__setImpl(thisObj, value, "user", "set");
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Sets a property value asynchronously
|
|
719
|
+
*
|
|
720
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
721
|
+
* @param {*} value the value to set
|
|
722
|
+
* @return {qx.Promise<Void>}
|
|
723
|
+
*/
|
|
724
|
+
async setAsync(thisObj, value) {
|
|
725
|
+
if (this.__pseudoProperty) {
|
|
726
|
+
this.__callFunction(thisObj, "set" + qx.Bootstrap.firstUp(this.__propertyName) + "Async", value);
|
|
727
|
+
} else {
|
|
728
|
+
return this.__setAsyncImpl(thisObj, value, "user", "set");
|
|
729
|
+
}
|
|
730
|
+
},
|
|
731
|
+
|
|
732
|
+
/**
|
|
733
|
+
* Sets the theme value for the property; this will trigger an apply & change event if the
|
|
734
|
+
* final value of the property changes
|
|
735
|
+
*
|
|
736
|
+
* @param {*} thisObj
|
|
737
|
+
* @param {*} value
|
|
738
|
+
*/
|
|
739
|
+
setThemed(thisObj, value) {
|
|
740
|
+
this.__setImpl(thisObj, value, "themed", "set");
|
|
741
|
+
},
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Resets a property value
|
|
745
|
+
*
|
|
746
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
747
|
+
*/
|
|
748
|
+
reset(thisObj) {
|
|
749
|
+
if (this.__pseudoProperty) {
|
|
750
|
+
this.__callFunction(thisObj, "reset" + qx.Bootstrap.firstUp(this.__propertyName));
|
|
751
|
+
} else {
|
|
752
|
+
let value = this.getInitValue(thisObj);
|
|
753
|
+
this.__setImpl(thisObj, value, "user", "reset");
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
|
|
757
|
+
/**
|
|
758
|
+
* Resets a property value asynchronously
|
|
759
|
+
* @param {qx.core.Object} thisObj
|
|
760
|
+
* @returns
|
|
761
|
+
*/
|
|
762
|
+
resetAsync(thisObj) {
|
|
763
|
+
if (this.__pseudoProperty) {
|
|
764
|
+
return this.__callFunction(thisObj, "reset" + qx.Bootstrap.firstUp(this.__propertyName) + "Async");
|
|
765
|
+
} else {
|
|
766
|
+
let value = this.getInitValue(thisObj);
|
|
767
|
+
return this.__setAsyncImpl(thisObj, value, "user", "reset");
|
|
768
|
+
}
|
|
769
|
+
},
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* Resets the theme value for the property; this will trigger an apply & change event if the
|
|
773
|
+
* final value of the property changes
|
|
774
|
+
*
|
|
775
|
+
* @param {qx.core.Object} thisObj
|
|
776
|
+
*/
|
|
777
|
+
resetThemed(thisObj) {
|
|
778
|
+
this.__setImpl(thisObj, undefined, "themed", "reset");
|
|
779
|
+
},
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Detects whether the object is using a theme value or has been overridden by a user value
|
|
783
|
+
*
|
|
784
|
+
* @param {qx.core.Object} thisObj
|
|
785
|
+
* @returns {Boolean}
|
|
786
|
+
*/
|
|
787
|
+
isThemedValue(thisObj) {
|
|
788
|
+
if (this.isThemeable()) {
|
|
789
|
+
let value = this.__storage.get(thisObj, this);
|
|
790
|
+
if (value === undefined) {
|
|
791
|
+
let state = this.getPropertyState(thisObj);
|
|
792
|
+
value = state.themeValue;
|
|
793
|
+
return value !== undefined;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
return false;
|
|
797
|
+
},
|
|
798
|
+
|
|
799
|
+
deleteThemeValue(thisObj) {
|
|
800
|
+
let state = this.getPropertyState(thisObj);
|
|
801
|
+
delete state.themeValue;
|
|
802
|
+
},
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Detects whether the object is using a user value, or has one from the theme or init
|
|
806
|
+
*
|
|
807
|
+
* @param {qx.core.Object} thisObj
|
|
808
|
+
* @returns {Boolean}
|
|
809
|
+
*/
|
|
810
|
+
isUserValue(thisObj) {
|
|
811
|
+
let value = this.__storage.get(thisObj, this);
|
|
812
|
+
if (value !== undefined) {
|
|
813
|
+
return true;
|
|
814
|
+
}
|
|
815
|
+
return false;
|
|
816
|
+
},
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
*
|
|
820
|
+
* @returns {boolean} whether the property is read-only
|
|
821
|
+
*/
|
|
822
|
+
isReadOnly() {
|
|
823
|
+
return this.__readOnly;
|
|
824
|
+
},
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Sets the actual value of the property, synchronously.
|
|
828
|
+
*
|
|
829
|
+
* @param {qx.core.Object} thisObj
|
|
830
|
+
* @param {*} value
|
|
831
|
+
* @param {"user" | "themed"} scope
|
|
832
|
+
* @param {"set" | "reset" | "init"} method
|
|
833
|
+
*/
|
|
834
|
+
__setImpl(thisObj, value, scope, method) {
|
|
835
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
836
|
+
if (this.__readOnly) {
|
|
837
|
+
if (value !== undefined) {
|
|
838
|
+
throw new Error("Property " + this + " is read-only");
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
let state = this.getPropertyState(thisObj);
|
|
844
|
+
|
|
845
|
+
if (this.__validate) {
|
|
846
|
+
this.__callFunction(thisObj, this.__validate, value, this);
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
let oldValue = this.__getImpl(thisObj, true);
|
|
850
|
+
|
|
851
|
+
if (this.__transform) {
|
|
852
|
+
value = this.__callFunction(thisObj, this.__transform, value, oldValue, this.__propertyName);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
if (method == "reset") {
|
|
856
|
+
if (scope == "user") {
|
|
857
|
+
this.__storage.reset(thisObj, this, value);
|
|
858
|
+
} else if (scope == "themed") {
|
|
859
|
+
if (value === undefined) {
|
|
860
|
+
delete state.themeValue;
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
value = this.__getImpl(thisObj, true);
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
if (this.isInheritable()) {
|
|
867
|
+
if (value === "inherit") {
|
|
868
|
+
value = state.inheritedValue;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
let check = this.getCheck();
|
|
873
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
874
|
+
if (!check || check instanceof qx.core.check.Any) {
|
|
875
|
+
if (qx.lang.Type.isPromise(value)) {
|
|
876
|
+
this.warn(
|
|
877
|
+
"Property " +
|
|
878
|
+
this +
|
|
879
|
+
" is being set to a promise, bt its check is not a Promise. The property will be set to the promise itself."
|
|
880
|
+
);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
if (method !== "reset" && check) {
|
|
886
|
+
if (!(value === null && oldValue === null) && !check.matches(value, thisObj)) {
|
|
887
|
+
let coerced = check.coerce(value, thisObj);
|
|
888
|
+
if (qx.lang.Type.isPromise(value) || coerced === null || !check.matches(coerced, thisObj)) {
|
|
889
|
+
throw new Error("Invalid value for property " + this + ": " + value);
|
|
890
|
+
}
|
|
891
|
+
value = coerced;
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
let isEqual = this.isEqual(thisObj, value, oldValue);
|
|
896
|
+
if (!isEqual && this.isMutating(thisObj)) {
|
|
897
|
+
this.warn("Property " + this + " is currently mutating");
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
let shouldApply;
|
|
901
|
+
if (method == "init" || method == "set") {
|
|
902
|
+
shouldApply = !isEqual || (value !== undefined && !state.initMethodCalled);
|
|
903
|
+
state.initMethodCalled = true;
|
|
904
|
+
} else if (method == "reset") {
|
|
905
|
+
shouldApply = !isEqual;
|
|
906
|
+
} else {
|
|
907
|
+
throw new Error(`Should not call here! Invalid method=${method}`);
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
if (!shouldApply) {
|
|
911
|
+
return;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
this.__setMutating(thisObj, true);
|
|
915
|
+
|
|
916
|
+
if (scope == "user") {
|
|
917
|
+
// Always set the value to the storage if it is a user value; this is because themable properties
|
|
918
|
+
// might be equal now, but if the theme value changes, the user's override needs to remain.
|
|
919
|
+
if (method == "set" || method == "init") {
|
|
920
|
+
this.__storage.set(thisObj, this, value);
|
|
921
|
+
}
|
|
922
|
+
} else if (scope == "themed") {
|
|
923
|
+
if (method != "reset") {
|
|
924
|
+
if (value !== undefined) {
|
|
925
|
+
state.themeValue = value;
|
|
926
|
+
value = this.get(thisObj);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
} else if (qx.core.Environment.get("qx.debug")) {
|
|
930
|
+
throw new Error(`Invalid scope=${scope} in ${this.classname}.__setImpl`);
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
if (value === undefined) {
|
|
934
|
+
value = null;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
if (this.__apply) {
|
|
938
|
+
let out = this.__callFunction(thisObj, this.__apply, value, oldValue, this.__propertyName);
|
|
939
|
+
|
|
940
|
+
if (qx.lang.Type.isPromise(out)) {
|
|
941
|
+
this.warn(
|
|
942
|
+
"Apply function for property " +
|
|
943
|
+
this +
|
|
944
|
+
" returned a Promise, but the property was set synchronously. The promise will be ignored."
|
|
945
|
+
);
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
if (this.__eventName && qx.event.Registration.hasListener(thisObj, this.__eventName)) {
|
|
950
|
+
thisObj.fireDataEvent(this.__eventName, value, oldValue);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
if (this.isInheritable()) {
|
|
954
|
+
this.__applyValueToInheritedChildren(thisObj);
|
|
955
|
+
}
|
|
956
|
+
this.__setMutating(thisObj, false);
|
|
957
|
+
},
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Sets the actual value of the property, asynchronously.
|
|
961
|
+
*
|
|
962
|
+
* @param {qx.core.Object} thisObj
|
|
963
|
+
* @param {*} value
|
|
964
|
+
* @param {"user" | "themed"} scope
|
|
965
|
+
* @param {"set" | "reset" | "init"} method
|
|
966
|
+
*/
|
|
967
|
+
async __setAsyncImpl(thisObj, value, scope, method) {
|
|
968
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
969
|
+
if (this.__readOnly) {
|
|
970
|
+
if (value !== undefined) {
|
|
971
|
+
throw new Error("Property " + this + " is read-only");
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
let state = this.getPropertyState(thisObj);
|
|
977
|
+
|
|
978
|
+
if (this.__validate) {
|
|
979
|
+
this.__callFunction(thisObj, this.__validate, value, this);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
let oldValue = await this.__getAsyncImpl(thisObj, true);
|
|
983
|
+
|
|
984
|
+
if (this.__transform) {
|
|
985
|
+
value = this.__callFunction(thisObj, this.__transform, value, oldValue, this.__propertyName);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
if (method == "reset") {
|
|
989
|
+
this.__storage.reset(thisObj, this, value);
|
|
990
|
+
value = await this.__getAsyncImpl(thisObj, true);
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
let check = this.getCheck();
|
|
994
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
995
|
+
if (!check || check instanceof qx.core.check.Any) {
|
|
996
|
+
if (qx.lang.Type.isPromise(value)) {
|
|
997
|
+
this.warn(
|
|
998
|
+
"Property " +
|
|
999
|
+
this +
|
|
1000
|
+
" is being set to a promise, bt its check is not a Promise. The property will be set to the promise itself."
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
if (method !== "reset" && check) {
|
|
1007
|
+
if (!(value === null && oldValue === null) && !check.matches(value, thisObj)) {
|
|
1008
|
+
let coerced = check.coerce(value, thisObj);
|
|
1009
|
+
if (qx.lang.Type.isPromise(value) || coerced === null || !check.matches(coerced, thisObj)) {
|
|
1010
|
+
throw new Error("Invalid value for property " + this + ": " + value);
|
|
1011
|
+
}
|
|
1012
|
+
value = coerced;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
let isEqual = this.isEqual(thisObj, value, oldValue);
|
|
1017
|
+
if (!isEqual && this.isMutating(thisObj)) {
|
|
1018
|
+
this.warn("Property " + this + " is currently mutating");
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
let shouldApply;
|
|
1022
|
+
if (method == "init" || method == "set") {
|
|
1023
|
+
shouldApply = !isEqual || (value !== undefined && !state.initMethodCalled);
|
|
1024
|
+
state.initMethodCalled = true;
|
|
1025
|
+
} else if (method == "reset") {
|
|
1026
|
+
shouldApply = !isEqual;
|
|
1027
|
+
} else {
|
|
1028
|
+
throw new Error(`Should not call here! Invalid method=${method}`);
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
if (!shouldApply) {
|
|
1032
|
+
return;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
let resolve;
|
|
1036
|
+
let promise = new Promise(r => (resolve = r));
|
|
1037
|
+
this.__setMutating(thisObj, promise);
|
|
1038
|
+
|
|
1039
|
+
if (scope == "user") {
|
|
1040
|
+
// Always set the value to the storage if it is a user value; this is because themable properties
|
|
1041
|
+
// might be equal now, but if the theme value changes, the user's override needs to remain.
|
|
1042
|
+
if (method == "set" || method == "init") {
|
|
1043
|
+
this.__storage.set(thisObj, this, value);
|
|
1044
|
+
}
|
|
1045
|
+
} else if (qx.core.Environment.get("qx.debug")) {
|
|
1046
|
+
throw new Error(`Invalid scope=${scope} in ${this.classname}.__setAsyncImpl`);
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
if (value === undefined) {
|
|
1050
|
+
value = null;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
if (this.__apply) {
|
|
1054
|
+
await this.__callFunction(thisObj, this.__apply, value, oldValue, this.__propertyName);
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
if (this.__eventName && qx.event.Registration.hasListener(thisObj, this.__eventName)) {
|
|
1058
|
+
await thisObj.fireDataEventAsync(this.__eventName, value, oldValue);
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
this.__setMutating(thisObj, false);
|
|
1062
|
+
resolve();
|
|
1063
|
+
},
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* Attempts to get the value of the property synchronously
|
|
1067
|
+
* @param {qx.core.Object} thisObj
|
|
1068
|
+
* @param {boolean} safe Whether to throw exceptions if the property is not initialized
|
|
1069
|
+
* @returns {*}
|
|
1070
|
+
*/
|
|
1071
|
+
__getImpl(thisObj, safe) {
|
|
1072
|
+
const getRaw = () => {
|
|
1073
|
+
let value = this.__storage.get(thisObj, this);
|
|
1074
|
+
|
|
1075
|
+
if (value !== undefined) {
|
|
1076
|
+
return value;
|
|
1077
|
+
} else if (this.isAsync()) {
|
|
1078
|
+
return undefined;
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
let state = this.getPropertyState(thisObj);
|
|
1082
|
+
|
|
1083
|
+
value = state.themeValue;
|
|
1084
|
+
if (value !== undefined) {
|
|
1085
|
+
return value;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
value = state.inheritedValue;
|
|
1089
|
+
if (value !== undefined) {
|
|
1090
|
+
return value;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
return this.getInitValue(thisObj);
|
|
1094
|
+
};
|
|
1095
|
+
|
|
1096
|
+
let value = getRaw();
|
|
1097
|
+
|
|
1098
|
+
if (this.isInheritable()) {
|
|
1099
|
+
if (value === "inherit") {
|
|
1100
|
+
let state = this.getPropertyState(thisObj);
|
|
1101
|
+
value = state.inheritedValue;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
if (value !== undefined) {
|
|
1106
|
+
return value;
|
|
1107
|
+
} else if (this.isAsync()) {
|
|
1108
|
+
if (!safe) {
|
|
1109
|
+
throw new Error("Property " + this + " has not been initialized - try using getAsync() instead");
|
|
1110
|
+
} else {
|
|
1111
|
+
return undefined;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
if (typeof this.__definition?.check == "Boolean") {
|
|
1116
|
+
return false;
|
|
1117
|
+
} else if (this.__definition?.nullable || this.__check?.isNullable()) {
|
|
1118
|
+
return null;
|
|
1119
|
+
} else if (qx.core.Environment.get("qx.core.property.Property.inheritableDefaultIsNull") && this.isInheritable()) {
|
|
1120
|
+
return null;
|
|
1121
|
+
} else if (safe) {
|
|
1122
|
+
return undefined;
|
|
1123
|
+
} else {
|
|
1124
|
+
throw new Error("Property " + this + " has not been initialized");
|
|
1125
|
+
}
|
|
1126
|
+
},
|
|
1127
|
+
|
|
1128
|
+
/**
|
|
1129
|
+
* Attempts to get the value of the property asynchronously
|
|
1130
|
+
* @param {qx.core.Object} thisObj
|
|
1131
|
+
* @param {boolean} safe Whether to throw exceptions if the property is not initialized
|
|
1132
|
+
* @returns {Promise<*>}
|
|
1133
|
+
*/
|
|
1134
|
+
async __getAsyncImpl(thisObj, safe) {
|
|
1135
|
+
const getRaw = async () => {
|
|
1136
|
+
let value = this.__storage.get(thisObj, this);
|
|
1137
|
+
|
|
1138
|
+
if (value !== undefined) {
|
|
1139
|
+
return value;
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
value = await this.__storage.getAsync(thisObj, this);
|
|
1143
|
+
if (value !== undefined) {
|
|
1144
|
+
return value;
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
return this.getInitValue(thisObj);
|
|
1148
|
+
};
|
|
1149
|
+
|
|
1150
|
+
let value = await getRaw();
|
|
1151
|
+
|
|
1152
|
+
if (value !== undefined) {
|
|
1153
|
+
return value;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
if (typeof this.__definition?.check == "Boolean") {
|
|
1157
|
+
return false;
|
|
1158
|
+
} else if (this.__definition?.nullable || this.__check?.isNullable()) {
|
|
1159
|
+
return null;
|
|
1160
|
+
} else if (safe) {
|
|
1161
|
+
return undefined;
|
|
1162
|
+
} else {
|
|
1163
|
+
throw new Error("Property " + this + " has not been initialized");
|
|
1164
|
+
}
|
|
1165
|
+
},
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Copies the value of this property to all children of the object
|
|
1169
|
+
*
|
|
1170
|
+
* @param {qx.core.Object} thisObj
|
|
1171
|
+
*/
|
|
1172
|
+
__applyValueToInheritedChildren(thisObj) {
|
|
1173
|
+
if (typeof thisObj._getChildren == "function") {
|
|
1174
|
+
for (let child of thisObj._getChildren()) {
|
|
1175
|
+
let property = child.constructor.prototype.$$allProperties[this.__propertyName];
|
|
1176
|
+
if (property && property.isInheritable()) {
|
|
1177
|
+
property.refresh(child);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
},
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* Refreshes the property, copying the value from it's layout parent if it has one
|
|
1185
|
+
*
|
|
1186
|
+
* @param {*} thisObj
|
|
1187
|
+
* @returns
|
|
1188
|
+
*/
|
|
1189
|
+
refresh(thisObj) {
|
|
1190
|
+
if (!this.isInheritable()) {
|
|
1191
|
+
throw new Error(`${this} is not inheritable`);
|
|
1192
|
+
}
|
|
1193
|
+
let oldValue = this.__getImpl(thisObj, true);
|
|
1194
|
+
|
|
1195
|
+
const computeInherited = () => {
|
|
1196
|
+
let layoutParent = typeof thisObj.getLayoutParent == "function" ? thisObj.getLayoutParent() : undefined;
|
|
1197
|
+
if (!layoutParent) {
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
let layoutParentProperty = layoutParent.constructor.prototype.$$allProperties[this.__propertyName];
|
|
1202
|
+
if (!layoutParentProperty) {
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
let value = layoutParentProperty.__getImpl(layoutParent, true);
|
|
1207
|
+
|
|
1208
|
+
return value;
|
|
1209
|
+
};
|
|
1210
|
+
|
|
1211
|
+
let inherited = computeInherited();
|
|
1212
|
+
|
|
1213
|
+
let state = this.getPropertyState(thisObj);
|
|
1214
|
+
|
|
1215
|
+
// If we found a value to inherit...
|
|
1216
|
+
if (inherited !== undefined) {
|
|
1217
|
+
state.inheritedValue = inherited;
|
|
1218
|
+
} else {
|
|
1219
|
+
delete state.inheritedValue;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
let value = this.__getImpl(thisObj, true);
|
|
1223
|
+
//
|
|
1224
|
+
let shouldApply = value !== oldValue || (value !== undefined && !state.initMethodCalled);
|
|
1225
|
+
state.initMethodCalled = true;
|
|
1226
|
+
|
|
1227
|
+
if (shouldApply) {
|
|
1228
|
+
if (!this.isEqual(thisObj, value, oldValue)) {
|
|
1229
|
+
this.__setMutating(thisObj, true);
|
|
1230
|
+
try {
|
|
1231
|
+
if (this.__apply) {
|
|
1232
|
+
this.__callFunction(thisObj, this.__apply, value, oldValue, this.__propertyName);
|
|
1233
|
+
}
|
|
1234
|
+
if (this.__eventName && qx.event.Registration.hasListener(thisObj, this.__eventName)) {
|
|
1235
|
+
thisObj.fireDataEvent(this.__eventName, value, oldValue);
|
|
1236
|
+
}
|
|
1237
|
+
this.__applyValueToInheritedChildren(thisObj);
|
|
1238
|
+
} finally {
|
|
1239
|
+
this.__setMutating(thisObj, false);
|
|
1240
|
+
}
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
},
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* Detects if the property is currently mutating
|
|
1247
|
+
*
|
|
1248
|
+
* @param {qx.core.Object} thisObj
|
|
1249
|
+
* @returns {Boolean}
|
|
1250
|
+
*/
|
|
1251
|
+
isMutating(thisObj) {
|
|
1252
|
+
let state = this.getPropertyState(thisObj);
|
|
1253
|
+
return state.mutatingCount !== undefined && state.mutatingCount > 0;
|
|
1254
|
+
},
|
|
1255
|
+
|
|
1256
|
+
/**
|
|
1257
|
+
* Called internally to set the mutating state for a property
|
|
1258
|
+
*
|
|
1259
|
+
* @param {qx.core.Object} thisObj
|
|
1260
|
+
* @param {Boolean} mutating
|
|
1261
|
+
*/
|
|
1262
|
+
__setMutating(thisObj, mutating) {
|
|
1263
|
+
let state = this.getPropertyState(thisObj);
|
|
1264
|
+
if (mutating) {
|
|
1265
|
+
if (state.mutatingCount === undefined) {
|
|
1266
|
+
state.mutatingCount = 1;
|
|
1267
|
+
} else {
|
|
1268
|
+
state.mutatingCount++;
|
|
1269
|
+
}
|
|
1270
|
+
} else {
|
|
1271
|
+
if (state.mutatingCount === undefined) {
|
|
1272
|
+
throw new Error(`Property ${this} of ${thisObj} is not mutating`);
|
|
1273
|
+
}
|
|
1274
|
+
state.mutatingCount--;
|
|
1275
|
+
if (state.mutatingCount == 0) {
|
|
1276
|
+
delete state.promiseMutating;
|
|
1277
|
+
delete state.mutatingCount;
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Resolves when the property has finished mutating
|
|
1284
|
+
*
|
|
1285
|
+
* @param {qx.core.Object} thisObj
|
|
1286
|
+
* @returns {Promise<>}
|
|
1287
|
+
*/
|
|
1288
|
+
async resolveMutating(thisObj) {
|
|
1289
|
+
if (thisObj.$$propertyMutating === undefined || !thisObj.$$propertyMutating[this.__propertyName]) {
|
|
1290
|
+
return qx.Promise.resolve();
|
|
1291
|
+
}
|
|
1292
|
+
let promise = thisObj.$$propertyMutating[this.__propertyName];
|
|
1293
|
+
if (typeof promise == "boolean") {
|
|
1294
|
+
promise = new qx.Promise();
|
|
1295
|
+
thisObj.$$propertyMutating[this.__propertyName] = promise;
|
|
1296
|
+
}
|
|
1297
|
+
await promise;
|
|
1298
|
+
},
|
|
1299
|
+
|
|
1300
|
+
/**
|
|
1301
|
+
* Returns the `qx.core.check.Check` instance that can be used to verify property value compatibility
|
|
1302
|
+
*
|
|
1303
|
+
* @return {qx.core.check.Check}
|
|
1304
|
+
*/
|
|
1305
|
+
getCheck(value) {
|
|
1306
|
+
return this.__check;
|
|
1307
|
+
},
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* Called to dereference, after the destructor, if the property has `dereference : true`.
|
|
1311
|
+
*
|
|
1312
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
1313
|
+
*/
|
|
1314
|
+
dereference(thisObj) {
|
|
1315
|
+
this.__storage.dereference(thisObj, this);
|
|
1316
|
+
// Get rid of our internal storage of the various possible
|
|
1317
|
+
// values for this property
|
|
1318
|
+
let propertyName = this.__propertyName;
|
|
1319
|
+
delete thisObj[`$$user_${propertyName}`];
|
|
1320
|
+
delete thisObj[`$$theme_${propertyName}`];
|
|
1321
|
+
delete thisObj[`$$inherit_${propertyName}`];
|
|
1322
|
+
},
|
|
1323
|
+
|
|
1324
|
+
/**
|
|
1325
|
+
* Helper method to call a function, which can either be a string being the function name or an actual function.
|
|
1326
|
+
* This is used so that inherited classes can override methods, ie because the method
|
|
1327
|
+
* is located on demand. This is used to call `apply` and `transform` methods.
|
|
1328
|
+
*
|
|
1329
|
+
* @param {*} thisObj
|
|
1330
|
+
* @param {Function|String?} fn
|
|
1331
|
+
* @param {...any} args
|
|
1332
|
+
* @returns
|
|
1333
|
+
*/
|
|
1334
|
+
__callFunction(thisObj, fn, ...args) {
|
|
1335
|
+
if (typeof fn == "string") {
|
|
1336
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
1337
|
+
if (typeof thisObj[fn] !== "function") {
|
|
1338
|
+
throw new Error(`${this}: Cannot find a method ${fn} on object ${thisObj}!`);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
return thisObj[fn].call(thisObj, ...args);
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
return fn.call(thisObj, ...args);
|
|
1345
|
+
},
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* Tests whether the property needs to be dereferenced
|
|
1349
|
+
*
|
|
1350
|
+
* @returns {Boolean}
|
|
1351
|
+
*/
|
|
1352
|
+
needsDereference() {
|
|
1353
|
+
return this.__needsDereference;
|
|
1354
|
+
},
|
|
1355
|
+
|
|
1356
|
+
/**
|
|
1357
|
+
* Compares two property values for equality, used to determine whether to apply
|
|
1358
|
+
* and fire change events
|
|
1359
|
+
*
|
|
1360
|
+
* @param {*} value
|
|
1361
|
+
* @param {*} oldValue
|
|
1362
|
+
*/
|
|
1363
|
+
isEqual(thisObj, value, oldValue) {
|
|
1364
|
+
if (this.__isEqual) {
|
|
1365
|
+
return this.__isEqual.call(thisObj, value, oldValue, this);
|
|
1366
|
+
}
|
|
1367
|
+
if (value === oldValue) {
|
|
1368
|
+
if (value === 0) {
|
|
1369
|
+
return Object.is(value, oldValue);
|
|
1370
|
+
}
|
|
1371
|
+
return true;
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
return false;
|
|
1375
|
+
},
|
|
1376
|
+
|
|
1377
|
+
/**
|
|
1378
|
+
* Promise that resolves when the property is ready, or when it has finished mutating
|
|
1379
|
+
*
|
|
1380
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
1381
|
+
*/
|
|
1382
|
+
promiseReady(thisObj) {},
|
|
1383
|
+
|
|
1384
|
+
/**
|
|
1385
|
+
* Whether the property is initialized
|
|
1386
|
+
*
|
|
1387
|
+
* @param {qx.core.Object} thisObj the object on which the property is defined
|
|
1388
|
+
* @return {Boolean}
|
|
1389
|
+
*/
|
|
1390
|
+
isInitialized(thisObj) {
|
|
1391
|
+
let value = this.__getImpl(thisObj, true);
|
|
1392
|
+
return value !== undefined;
|
|
1393
|
+
},
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Whether the property supports async
|
|
1397
|
+
*
|
|
1398
|
+
* @return {Boolean}
|
|
1399
|
+
*/
|
|
1400
|
+
isAsync() {
|
|
1401
|
+
return !!this.__definition?.async;
|
|
1402
|
+
},
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* Whether the property is themable
|
|
1406
|
+
*
|
|
1407
|
+
* @return {Boolean}
|
|
1408
|
+
*/
|
|
1409
|
+
isThemeable() {
|
|
1410
|
+
return !!this.__definition?.themeable;
|
|
1411
|
+
},
|
|
1412
|
+
|
|
1413
|
+
/**
|
|
1414
|
+
* Whether the property is inheritable
|
|
1415
|
+
*
|
|
1416
|
+
* @return {Boolean}
|
|
1417
|
+
*/
|
|
1418
|
+
isInheritable() {
|
|
1419
|
+
return this.__inheritable;
|
|
1420
|
+
},
|
|
1421
|
+
|
|
1422
|
+
isPseudoProperty() {
|
|
1423
|
+
return this.__pseudoProperty;
|
|
1424
|
+
},
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Returns an array of annotations for the property, or null if there are none
|
|
1428
|
+
*
|
|
1429
|
+
* @return {qx.Annotation[]?null}
|
|
1430
|
+
*/
|
|
1431
|
+
getAnnotations() {
|
|
1432
|
+
return this.__annotations;
|
|
1433
|
+
},
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* Returns the property name
|
|
1437
|
+
*
|
|
1438
|
+
* @returns {String}
|
|
1439
|
+
*/
|
|
1440
|
+
getPropertyName() {
|
|
1441
|
+
return this.__propertyName;
|
|
1442
|
+
},
|
|
1443
|
+
|
|
1444
|
+
/**
|
|
1445
|
+
* Returns the event name
|
|
1446
|
+
*
|
|
1447
|
+
* @returns {String?}
|
|
1448
|
+
*/
|
|
1449
|
+
getEventName() {
|
|
1450
|
+
return this.__eventName;
|
|
1451
|
+
},
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Returns the raw definition
|
|
1455
|
+
*
|
|
1456
|
+
* @return {*}
|
|
1457
|
+
*/
|
|
1458
|
+
getDefinition() {
|
|
1459
|
+
return this.__definition;
|
|
1460
|
+
},
|
|
1461
|
+
|
|
1462
|
+
/**
|
|
1463
|
+
* Outputs a warning; the logging system is probably not loaded and working yet, so we
|
|
1464
|
+
* have to implement our own
|
|
1465
|
+
*
|
|
1466
|
+
* @param {...any} args
|
|
1467
|
+
*/
|
|
1468
|
+
warn(...args) {
|
|
1469
|
+
if (qx.core.Environment.get("qx.debug")) {
|
|
1470
|
+
console.warn(...args);
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
|
|
1474
|
+
/**
|
|
1475
|
+
* @Override
|
|
1476
|
+
*/
|
|
1477
|
+
toString() {
|
|
1478
|
+
return this.__clazz.classname + "." + this.__propertyName;
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
});
|