@nativescript/core 8.9.0-napi-es5.0 → 8.9.0-napi.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/abortcontroller/abortsignal.js +16 -23
- package/abortcontroller/abortsignal.js.map +1 -1
- package/abortcontroller/index.js +14 -20
- package/abortcontroller/index.js.map +1 -1
- package/accessibility/accessibility-common.js +8 -8
- package/accessibility/accessibility-common.js.map +1 -1
- package/accessibility/accessibility-css-helper.js +27 -27
- package/accessibility/accessibility-css-helper.js.map +1 -1
- package/accessibility/accessibility-properties.js +22 -23
- package/accessibility/accessibility-properties.js.map +1 -1
- package/accessibility/accessibility-service-common.js +12 -22
- package/accessibility/accessibility-service-common.js.map +1 -1
- package/accessibility/accessibility-service.android.js +27 -39
- package/accessibility/accessibility-service.android.js.map +1 -1
- package/accessibility/accessibility-service.ios.js +14 -17
- package/accessibility/accessibility-service.ios.js.map +1 -1
- package/accessibility/font-scale-common.js +2 -2
- package/accessibility/font-scale-common.js.map +1 -1
- package/accessibility/font-scale.android.js +7 -8
- package/accessibility/font-scale.android.js.map +1 -1
- package/accessibility/font-scale.ios.js +9 -10
- package/accessibility/font-scale.ios.js.map +1 -1
- package/accessibility/index.android.js +77 -83
- package/accessibility/index.android.js.map +1 -1
- package/accessibility/index.ios.js +34 -36
- package/accessibility/index.ios.js.map +1 -1
- package/animation-frame/animation-native.ios.js +1 -1
- package/animation-frame/animation-native.ios.js.map +1 -1
- package/animation-frame/index.js +16 -16
- package/animation-frame/index.js.map +1 -1
- package/application/application-common.js +196 -214
- package/application/application-common.js.map +1 -1
- package/application/application-shims.js +39 -39
- package/application/application-shims.js.map +1 -1
- package/application/application.android.js +110 -149
- package/application/application.android.js.map +1 -1
- package/application/application.ios.js +162 -197
- package/application/application.ios.js.map +1 -1
- package/application-settings/index.android.js +11 -11
- package/application-settings/index.android.js.map +1 -1
- package/application-settings/index.ios.js +1 -1
- package/application-settings/index.ios.js.map +1 -1
- package/bundle-entry-points.js +1 -1
- package/bundle-entry-points.js.map +1 -1
- package/color/color-common.js +157 -200
- package/color/color-common.js.map +1 -1
- package/color/index.android.js +4 -14
- package/color/index.android.js.map +1 -1
- package/color/index.ios.js +14 -24
- package/color/index.ios.js.map +1 -1
- package/color/known-colors.js +144 -144
- package/color/known-colors.js.map +1 -1
- package/connectivity/index.android.js +23 -23
- package/connectivity/index.android.js.map +1 -1
- package/connectivity/index.ios.js +25 -25
- package/connectivity/index.ios.js.map +1 -1
- package/console/index.js +20 -24
- package/console/index.js.map +1 -1
- package/core-types/index.js +38 -38
- package/core-types/index.js.map +1 -1
- package/css/CSS3Parser.js +104 -106
- package/css/CSS3Parser.js.map +1 -1
- package/css/CSSNativeScript.js +29 -34
- package/css/CSSNativeScript.js.map +1 -1
- package/css/css-tree-parser.js.map +1 -1
- package/css/parser.js +158 -178
- package/css/parser.js.map +1 -1
- package/css/system-classes.js +9 -9
- package/css/system-classes.js.map +1 -1
- package/css-mediaquery/index.js +27 -29
- package/css-mediaquery/index.js.map +1 -1
- package/data/observable/index.js +115 -124
- package/data/observable/index.js.map +1 -1
- package/data/observable-array/index.js +119 -176
- package/data/observable-array/index.js.map +1 -1
- package/data/virtual-array/index.js +61 -74
- package/data/virtual-array/index.js.map +1 -1
- package/debugger/InspectorBackendCommands.js +137 -161
- package/debugger/InspectorBackendCommands.js.map +1 -1
- package/debugger/devtools-elements.common.js +20 -20
- package/debugger/devtools-elements.common.js.map +1 -1
- package/debugger/devtools-elements.js +2 -2
- package/debugger/devtools-elements.js.map +1 -1
- package/debugger/dom-node.js +61 -73
- package/debugger/dom-node.js.map +1 -1
- package/debugger/index.js +19 -19
- package/debugger/index.js.map +1 -1
- package/debugger/webinspector-css.js +25 -30
- package/debugger/webinspector-css.js.map +1 -1
- package/debugger/webinspector-dom.js +38 -43
- package/debugger/webinspector-dom.js.map +1 -1
- package/debugger/webinspector-network.android.js +103 -132
- package/debugger/webinspector-network.android.js.map +1 -1
- package/debugger/webinspector-network.ios.js +100 -128
- package/debugger/webinspector-network.ios.js.map +1 -1
- package/file-system/file-system-access.android.js +414 -421
- package/file-system/file-system-access.android.js.map +1 -1
- package/file-system/file-system-access.ios.js +203 -213
- package/file-system/file-system-access.ios.js.map +1 -1
- package/file-system/index.js +294 -372
- package/file-system/index.js.map +1 -1
- package/fps-meter/fps-native.android.js +15 -18
- package/fps-meter/fps-native.android.js.map +1 -1
- package/fps-meter/fps-native.ios.js +9 -11
- package/fps-meter/fps-native.ios.js.map +1 -1
- package/fps-meter/index.js +11 -11
- package/fps-meter/index.js.map +1 -1
- package/globals/index.js +88 -112
- package/globals/index.js.map +1 -1
- package/http/http-request/http-request-common.js +5 -5
- package/http/http-request/http-request-common.js.map +1 -1
- package/http/http-request/index.android.js +53 -54
- package/http/http-request/index.android.js.map +1 -1
- package/http/http-request/index.ios.js +56 -58
- package/http/http-request/index.ios.js.map +1 -1
- package/http/index.js +19 -19
- package/http/index.js.map +1 -1
- package/image-asset/image-asset-common.js +25 -37
- package/image-asset/image-asset-common.js.map +1 -1
- package/image-asset/index.android.js +17 -25
- package/image-asset/index.android.js.map +1 -1
- package/image-asset/index.ios.js +25 -35
- package/image-asset/index.ios.js.map +1 -1
- package/image-source/image-source-common.js +2 -2
- package/image-source/image-source-common.js.map +1 -1
- package/image-source/index.android.js +152 -178
- package/image-source/index.android.js.map +1 -1
- package/image-source/index.ios.js +177 -203
- package/image-source/index.ios.js.map +1 -1
- package/index.js +4 -8
- package/index.js.map +1 -1
- package/matrix/index.js +17 -27
- package/matrix/index.js.map +1 -1
- package/media-query-list/index.js +61 -87
- package/media-query-list/index.js.map +1 -1
- package/module-name-resolver/index.js +21 -24
- package/module-name-resolver/index.js.map +1 -1
- package/module-name-resolver/non-bundle-workflow-compat.js +24 -24
- package/module-name-resolver/non-bundle-workflow-compat.js.map +1 -1
- package/module-name-resolver/qualifier-matcher/index.js +46 -46
- package/module-name-resolver/qualifier-matcher/index.js.map +1 -1
- package/package.json +1 -1
- package/platform/common.js +5 -5
- package/platform/common.js.map +1 -1
- package/platform/device/index.android.js +68 -107
- package/platform/device/index.android.js.map +1 -1
- package/platform/device/index.ios.js +62 -101
- package/platform/device/index.ios.js.map +1 -1
- package/platform/screen/index.android.js +32 -63
- package/platform/screen/index.android.js.map +1 -1
- package/platform/screen/index.ios.js +29 -60
- package/platform/screen/index.ios.js.map +1 -1
- package/profiling/index.js +40 -47
- package/profiling/index.js.map +1 -1
- package/text/text-common.js +36 -49
- package/text/text-common.js.map +1 -1
- package/timer/index.android.js +20 -30
- package/timer/index.android.js.map +1 -1
- package/timer/index.ios.js +12 -22
- package/timer/index.ios.js.map +1 -1
- package/trace/index.js +26 -36
- package/trace/index.js.map +1 -1
- package/ui/action-bar/action-bar-common.js +193 -252
- package/ui/action-bar/action-bar-common.js.map +1 -1
- package/ui/action-bar/index.android.js +170 -212
- package/ui/action-bar/index.android.js.map +1 -1
- package/ui/action-bar/index.ios.js +208 -251
- package/ui/action-bar/index.ios.js.map +1 -1
- package/ui/activity-indicator/activity-indicator-common.js +6 -11
- package/ui/activity-indicator/activity-indicator-common.js.map +1 -1
- package/ui/activity-indicator/index.android.js +20 -26
- package/ui/activity-indicator/index.android.js.map +1 -1
- package/ui/activity-indicator/index.ios.js +23 -31
- package/ui/activity-indicator/index.ios.js.map +1 -1
- package/ui/animation/animation-common.js +43 -50
- package/ui/animation/animation-common.js.map +1 -1
- package/ui/animation/animation-interfaces.js +3 -5
- package/ui/animation/animation-interfaces.js.map +1 -1
- package/ui/animation/index.android.js +90 -94
- package/ui/animation/index.android.js.map +1 -1
- package/ui/animation/index.ios.js +225 -191
- package/ui/animation/index.ios.js.map +1 -1
- package/ui/animation/keyframe-animation.js +67 -89
- package/ui/animation/keyframe-animation.js.map +1 -1
- package/ui/builder/binding-builder.js +31 -31
- package/ui/builder/binding-builder.js.map +1 -1
- package/ui/builder/component-builder/index.js +37 -37
- package/ui/builder/component-builder/index.js.map +1 -1
- package/ui/builder/index.js +54 -59
- package/ui/builder/index.js.map +1 -1
- package/ui/builder/xml2ui.js +128 -158
- package/ui/builder/xml2ui.js.map +1 -1
- package/ui/button/button-common.js +18 -25
- package/ui/button/button-common.js.map +1 -1
- package/ui/button/index.android.js +69 -80
- package/ui/button/index.android.js.map +1 -1
- package/ui/button/index.ios.js +103 -114
- package/ui/button/index.ios.js.map +1 -1
- package/ui/content-view/index.js +60 -78
- package/ui/content-view/index.js.map +1 -1
- package/ui/core/bindable/bindable-expressions.js +93 -101
- package/ui/core/bindable/bindable-expressions.js.map +1 -1
- package/ui/core/bindable/bindable-resources.js +1 -1
- package/ui/core/bindable/index.js +136 -141
- package/ui/core/bindable/index.js.map +1 -1
- package/ui/core/control-state-change/index.android.js +5 -7
- package/ui/core/control-state-change/index.android.js.map +1 -1
- package/ui/core/control-state-change/index.ios.js +9 -13
- package/ui/core/control-state-change/index.ios.js.map +1 -1
- package/ui/core/properties/index.js +440 -489
- package/ui/core/properties/index.js.map +1 -1
- package/ui/core/view/index.android.js +348 -384
- package/ui/core/view/index.android.js.map +1 -1
- package/ui/core/view/index.ios.js +364 -400
- package/ui/core/view/index.ios.js.map +1 -1
- package/ui/core/view/view-common.js +655 -944
- package/ui/core/view/view-common.js.map +1 -1
- package/ui/core/view/view-helper/index.android.js +15 -19
- package/ui/core/view/view-helper/index.android.js.map +1 -1
- package/ui/core/view/view-helper/index.ios.js +81 -85
- package/ui/core/view/view-helper/index.ios.js.map +1 -1
- package/ui/core/view/view-helper/view-helper-common.js +44 -49
- package/ui/core/view/view-helper/view-helper-common.js.map +1 -1
- package/ui/core/view-base/index.js +371 -426
- package/ui/core/view-base/index.js.map +1 -1
- package/ui/core/weak-event-listener/index.js +25 -26
- package/ui/core/weak-event-listener/index.js.map +1 -1
- package/ui/date-picker/date-picker-common.js +30 -35
- package/ui/date-picker/date-picker-common.js.map +1 -1
- package/ui/date-picker/index.android.js +43 -51
- package/ui/date-picker/index.android.js.map +1 -1
- package/ui/date-picker/index.ios.js +51 -61
- package/ui/date-picker/index.ios.js.map +1 -1
- package/ui/dialogs/dialogs-common.js +18 -18
- package/ui/dialogs/dialogs-common.js.map +1 -1
- package/ui/dialogs/index.android.js +86 -98
- package/ui/dialogs/index.android.js.map +1 -1
- package/ui/dialogs/index.ios.js +67 -80
- package/ui/dialogs/index.ios.js.map +1 -1
- package/ui/editable-text-base/editable-text-base-common.js +29 -35
- package/ui/editable-text-base/editable-text-base-common.js.map +1 -1
- package/ui/editable-text-base/index.android.js +106 -112
- package/ui/editable-text-base/index.android.js.map +1 -1
- package/ui/editable-text-base/index.ios.js +47 -53
- package/ui/editable-text-base/index.ios.js.map +1 -1
- package/ui/embedding/index.android.js +2 -3
- package/ui/embedding/index.android.js.map +1 -1
- package/ui/frame/activity.android.js +44 -44
- package/ui/frame/activity.android.js.map +1 -1
- package/ui/frame/callbacks/activity-callbacks.js +118 -123
- package/ui/frame/callbacks/activity-callbacks.js.map +1 -1
- package/ui/frame/callbacks/fragment-callbacks.js +139 -141
- package/ui/frame/callbacks/fragment-callbacks.js.map +1 -1
- package/ui/frame/fragment.android.js +21 -21
- package/ui/frame/fragment.android.js.map +1 -1
- package/ui/frame/fragment.ios.js +1 -1
- package/ui/frame/fragment.transitions.android.js +105 -114
- package/ui/frame/fragment.transitions.android.js.map +1 -1
- package/ui/frame/frame-common.d.ts +1 -1
- package/ui/frame/frame-common.js +249 -285
- package/ui/frame/frame-common.js.map +1 -1
- package/ui/frame/frame-helpers.js +1 -1
- package/ui/frame/frame-helpers.js.map +1 -1
- package/ui/frame/frame-stack.js +4 -4
- package/ui/frame/frame-stack.js.map +1 -1
- package/ui/frame/index.android.js +239 -291
- package/ui/frame/index.android.js.map +1 -1
- package/ui/frame/index.ios.js +133 -167
- package/ui/frame/index.ios.js.map +1 -1
- package/ui/gestures/gestures-common.js +15 -29
- package/ui/gestures/gestures-common.js.map +1 -1
- package/ui/gestures/index.android.js +108 -124
- package/ui/gestures/index.android.js.map +1 -1
- package/ui/gestures/index.ios.js +108 -121
- package/ui/gestures/index.ios.js.map +1 -1
- package/ui/gestures/touch-manager.js +42 -48
- package/ui/gestures/touch-manager.js.map +1 -1
- package/ui/html-view/html-view-common.js +9 -14
- package/ui/html-view/html-view-common.js.map +1 -1
- package/ui/html-view/index.android.js +37 -43
- package/ui/html-view/index.android.js.map +1 -1
- package/ui/html-view/index.ios.js +62 -73
- package/ui/html-view/index.ios.js.map +1 -1
- package/ui/image/image-common.js +47 -57
- package/ui/image/image-common.js.map +1 -1
- package/ui/image/index.android.js +54 -59
- package/ui/image/index.android.js.map +1 -1
- package/ui/image/index.ios.js +65 -72
- package/ui/image/index.ios.js.map +1 -1
- package/ui/image/symbol-effects-common.js +2 -6
- package/ui/image/symbol-effects-common.js.map +1 -1
- package/ui/image/symbol-effects.android.js +4 -10
- package/ui/image/symbol-effects.android.js.map +1 -1
- package/ui/image/symbol-effects.ios.js +7 -11
- package/ui/image/symbol-effects.ios.js.map +1 -1
- package/ui/image-cache/image-cache-common.js +57 -61
- package/ui/image-cache/image-cache-common.js.map +1 -1
- package/ui/image-cache/index.android.js +23 -27
- package/ui/image-cache/index.android.js.map +1 -1
- package/ui/image-cache/index.ios.js +24 -29
- package/ui/image-cache/index.ios.js.map +1 -1
- package/ui/label/index.android.js +29 -38
- package/ui/label/index.android.js.map +1 -1
- package/ui/label/index.ios.js +89 -102
- package/ui/label/index.ios.js.map +1 -1
- package/ui/layouts/absolute-layout/absolute-layout-common.js +25 -30
- package/ui/layouts/absolute-layout/absolute-layout-common.js.map +1 -1
- package/ui/layouts/absolute-layout/index.android.js +6 -12
- package/ui/layouts/absolute-layout/index.android.js.map +1 -1
- package/ui/layouts/absolute-layout/index.ios.js +32 -40
- package/ui/layouts/absolute-layout/index.ios.js.map +1 -1
- package/ui/layouts/dock-layout/dock-layout-common.js +16 -21
- package/ui/layouts/dock-layout/dock-layout-common.js.map +1 -1
- package/ui/layouts/dock-layout/index.android.js +11 -17
- package/ui/layouts/dock-layout/index.android.js.map +1 -1
- package/ui/layouts/dock-layout/index.ios.js +45 -53
- package/ui/layouts/dock-layout/index.ios.js.map +1 -1
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js +90 -115
- package/ui/layouts/flexbox-layout/flexbox-layout-common.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.android.js +92 -97
- package/ui/layouts/flexbox-layout/index.android.js.map +1 -1
- package/ui/layouts/flexbox-layout/index.ios.js +366 -427
- package/ui/layouts/flexbox-layout/index.ios.js.map +1 -1
- package/ui/layouts/grid-layout/grid-layout-common.js +159 -211
- package/ui/layouts/grid-layout/grid-layout-common.js.map +1 -1
- package/ui/layouts/grid-layout/index.android.js +49 -55
- package/ui/layouts/grid-layout/index.android.js.map +1 -1
- package/ui/layouts/grid-layout/index.ios.js +340 -348
- package/ui/layouts/grid-layout/index.ios.js.map +1 -1
- package/ui/layouts/layout-base-common.js +78 -106
- package/ui/layouts/layout-base-common.js.map +1 -1
- package/ui/layouts/layout-base.android.js +25 -31
- package/ui/layouts/layout-base.android.js.map +1 -1
- package/ui/layouts/layout-base.ios.js +21 -27
- package/ui/layouts/layout-base.ios.js.map +1 -1
- package/ui/layouts/root-layout/index.android.js +47 -46
- package/ui/layouts/root-layout/index.android.js.map +1 -1
- package/ui/layouts/root-layout/index.ios.js +54 -53
- package/ui/layouts/root-layout/index.ios.js.map +1 -1
- package/ui/layouts/root-layout/root-layout-common.js +186 -190
- package/ui/layouts/root-layout/root-layout-common.js.map +1 -1
- package/ui/layouts/stack-layout/index.android.js +6 -12
- package/ui/layouts/stack-layout/index.android.js.map +1 -1
- package/ui/layouts/stack-layout/index.ios.js +62 -69
- package/ui/layouts/stack-layout/index.ios.js.map +1 -1
- package/ui/layouts/stack-layout/stack-layout-common.js +7 -12
- package/ui/layouts/stack-layout/stack-layout-common.js.map +1 -1
- package/ui/layouts/wrap-layout/index.android.js +10 -16
- package/ui/layouts/wrap-layout/index.android.js.map +1 -1
- package/ui/layouts/wrap-layout/index.ios.js +70 -76
- package/ui/layouts/wrap-layout/index.ios.js.map +1 -1
- package/ui/layouts/wrap-layout/wrap-layout-common.js +13 -18
- package/ui/layouts/wrap-layout/wrap-layout-common.js.map +1 -1
- package/ui/list-picker/index.android.js +42 -48
- package/ui/list-picker/index.android.js.map +1 -1
- package/ui/list-picker/index.ios.js +26 -36
- package/ui/list-picker/index.ios.js.map +1 -1
- package/ui/list-picker/list-picker-common.js +27 -32
- package/ui/list-picker/list-picker-common.js.map +1 -1
- package/ui/list-view/index.android.js +98 -110
- package/ui/list-view/index.android.js.map +1 -1
- package/ui/list-view/index.ios.js +121 -137
- package/ui/list-view/index.ios.js.map +1 -1
- package/ui/list-view/list-view-common.js +100 -116
- package/ui/list-view/list-view-common.js.map +1 -1
- package/ui/page/index.android.js +57 -65
- package/ui/page/index.android.js.map +1 -1
- package/ui/page/index.ios.js +98 -107
- package/ui/page/index.ios.js.map +1 -1
- package/ui/page/page-common.js +113 -145
- package/ui/page/page-common.js.map +1 -1
- package/ui/placeholder/index.android.js +10 -16
- package/ui/placeholder/index.android.js.map +1 -1
- package/ui/placeholder/index.js +6 -12
- package/ui/placeholder/index.js.map +1 -1
- package/ui/progress/index.android.js +28 -34
- package/ui/progress/index.android.js.map +1 -1
- package/ui/progress/index.ios.js +29 -39
- package/ui/progress/index.ios.js.map +1 -1
- package/ui/progress/progress-common.js +11 -16
- package/ui/progress/progress-common.js.map +1 -1
- package/ui/proxy-view-container/index.js +90 -111
- package/ui/proxy-view-container/index.js.map +1 -1
- package/ui/repeater/index.js +100 -112
- package/ui/repeater/index.js.map +1 -1
- package/ui/scroll-view/index.android.d.ts +1 -1
- package/ui/scroll-view/index.android.js +75 -95
- package/ui/scroll-view/index.android.js.map +1 -1
- package/ui/scroll-view/index.ios.js +72 -92
- package/ui/scroll-view/index.ios.js.map +1 -1
- package/ui/scroll-view/scroll-view-common.js +45 -65
- package/ui/scroll-view/scroll-view-common.js.map +1 -1
- package/ui/search-bar/index.android.js +88 -94
- package/ui/search-bar/index.android.js.map +1 -1
- package/ui/search-bar/index.ios.js +74 -88
- package/ui/search-bar/index.ios.js.map +1 -1
- package/ui/search-bar/search-bar-common.js +13 -18
- package/ui/search-bar/search-bar-common.js.map +1 -1
- package/ui/segmented-bar/index.android.js +98 -112
- package/ui/segmented-bar/index.android.js.map +1 -1
- package/ui/segmented-bar/index.ios.js +63 -80
- package/ui/segmented-bar/index.ios.js.map +1 -1
- package/ui/segmented-bar/segmented-bar-common.js +61 -81
- package/ui/segmented-bar/segmented-bar-common.js.map +1 -1
- package/ui/slider/index.android.js +43 -49
- package/ui/slider/index.android.js.map +1 -1
- package/ui/slider/index.ios.js +49 -59
- package/ui/slider/index.ios.js.map +1 -1
- package/ui/slider/slider-common.js +28 -35
- package/ui/slider/slider-common.js.map +1 -1
- package/ui/styling/background-common.js +98 -100
- package/ui/styling/background-common.js.map +1 -1
- package/ui/styling/background.android.js +35 -38
- package/ui/styling/background.android.js.map +1 -1
- package/ui/styling/background.ios.js +252 -258
- package/ui/styling/background.ios.js.map +1 -1
- package/ui/styling/box-shadow.js +2 -6
- package/ui/styling/box-shadow.js.map +1 -1
- package/ui/styling/converters.js +7 -7
- package/ui/styling/converters.js.map +1 -1
- package/ui/styling/css-animation-parser.js +56 -69
- package/ui/styling/css-animation-parser.js.map +1 -1
- package/ui/styling/css-selector.js +425 -522
- package/ui/styling/css-selector.js.map +1 -1
- package/ui/styling/css-shadow.js +2 -2
- package/ui/styling/css-shadow.js.map +1 -1
- package/ui/styling/css-stroke.js +3 -3
- package/ui/styling/css-stroke.js.map +1 -1
- package/ui/styling/css-utils.js +22 -22
- package/ui/styling/css-utils.js.map +1 -1
- package/ui/styling/font-common.js +44 -59
- package/ui/styling/font-common.js.map +1 -1
- package/ui/styling/font.android.js +34 -42
- package/ui/styling/font.android.js.map +1 -1
- package/ui/styling/font.ios.js +49 -54
- package/ui/styling/font.ios.js.map +1 -1
- package/ui/styling/linear-gradient.js +13 -17
- package/ui/styling/linear-gradient.js.map +1 -1
- package/ui/styling/style/index.js +36 -47
- package/ui/styling/style/index.js.map +1 -1
- package/ui/styling/style-properties.js +291 -306
- package/ui/styling/style-properties.js.map +1 -1
- package/ui/styling/style-scope.js +377 -416
- package/ui/styling/style-scope.js.map +1 -1
- package/ui/switch/index.android.js +41 -47
- package/ui/switch/index.android.js.map +1 -1
- package/ui/switch/index.ios.js +57 -66
- package/ui/switch/index.ios.js.map +1 -1
- package/ui/switch/switch-common.js +11 -16
- package/ui/switch/switch-common.js.map +1 -1
- package/ui/tab-view/index.android.js +187 -206
- package/ui/tab-view/index.android.js.map +1 -1
- package/ui/tab-view/index.ios.js +161 -177
- package/ui/tab-view/index.ios.js.map +1 -1
- package/ui/tab-view/tab-view-common.js +143 -197
- package/ui/tab-view/tab-view-common.js.map +1 -1
- package/ui/text-base/formatted-string.js +105 -158
- package/ui/text-base/formatted-string.js.map +1 -1
- package/ui/text-base/index.android.js +130 -136
- package/ui/text-base/index.android.js.map +1 -1
- package/ui/text-base/index.ios.js +112 -120
- package/ui/text-base/index.ios.js.map +1 -1
- package/ui/text-base/span.js +102 -158
- package/ui/text-base/span.js.map +1 -1
- package/ui/text-base/text-base-common.js +181 -268
- package/ui/text-base/text-base-common.js.map +1 -1
- package/ui/text-field/index.android.js +18 -24
- package/ui/text-field/index.android.js.map +1 -1
- package/ui/text-field/index.ios.js +70 -80
- package/ui/text-field/index.ios.js.map +1 -1
- package/ui/text-field/text-field-common.js +8 -13
- package/ui/text-field/text-field-common.js.map +1 -1
- package/ui/text-view/index.android.js +13 -19
- package/ui/text-view/index.android.js.map +1 -1
- package/ui/text-view/index.ios.js +116 -124
- package/ui/text-view/index.ios.js.map +1 -1
- package/ui/text-view/text-view-common.js +3 -9
- package/ui/text-view/text-view-common.js.map +1 -1
- package/ui/time-picker/index.android.js +18 -24
- package/ui/time-picker/index.android.js.map +1 -1
- package/ui/time-picker/index.ios.js +61 -69
- package/ui/time-picker/index.ios.js.map +1 -1
- package/ui/time-picker/time-picker-common.js +37 -42
- package/ui/time-picker/time-picker-common.js.map +1 -1
- package/ui/transition/fade-transition.android.js +8 -14
- package/ui/transition/fade-transition.android.js.map +1 -1
- package/ui/transition/fade-transition.ios.js +4 -10
- package/ui/transition/fade-transition.ios.js.map +1 -1
- package/ui/transition/flip-transition.android.js +14 -18
- package/ui/transition/flip-transition.android.js.map +1 -1
- package/ui/transition/index.android.js +24 -27
- package/ui/transition/index.android.js.map +1 -1
- package/ui/transition/index.ios.js +18 -22
- package/ui/transition/index.ios.js.map +1 -1
- package/ui/transition/modal-transition.android.js +4 -10
- package/ui/transition/modal-transition.android.js.map +1 -1
- package/ui/transition/modal-transition.ios.js +18 -25
- package/ui/transition/modal-transition.ios.js.map +1 -1
- package/ui/transition/page-transition.android.js +57 -71
- package/ui/transition/page-transition.android.js.map +1 -1
- package/ui/transition/page-transition.ios.js +19 -27
- package/ui/transition/page-transition.ios.js.map +1 -1
- package/ui/transition/shared-transition-helper.android.js +8 -12
- package/ui/transition/shared-transition-helper.android.js.map +1 -1
- package/ui/transition/shared-transition-helper.ios.js +442 -539
- package/ui/transition/shared-transition-helper.ios.js.map +1 -1
- package/ui/transition/shared-transition.js +77 -76
- package/ui/transition/shared-transition.js.map +1 -1
- package/ui/transition/slide-transition.android.js +17 -22
- package/ui/transition/slide-transition.android.js.map +1 -1
- package/ui/transition/slide-transition.ios.js +7 -11
- package/ui/transition/slide-transition.ios.js.map +1 -1
- package/ui/utils.ios.js +13 -13
- package/ui/utils.ios.js.map +1 -1
- package/ui/web-view/index.android.js +50 -64
- package/ui/web-view/index.android.js.map +1 -1
- package/ui/web-view/index.ios.js +50 -73
- package/ui/web-view/index.ios.js.map +1 -1
- package/ui/web-view/web-view-common.js +29 -43
- package/ui/web-view/web-view-common.js.map +1 -1
- package/utils/android/index.js +26 -27
- package/utils/android/index.js.map +1 -1
- package/utils/common.js +49 -65
- package/utils/common.js.map +1 -1
- package/utils/constants.android.js +1 -1
- package/utils/constants.android.js.map +1 -1
- package/utils/constants.ios.js +1 -1
- package/utils/constants.ios.js.map +1 -1
- package/utils/debug.js +32 -54
- package/utils/debug.js.map +1 -1
- package/utils/index.android.js +40 -36
- package/utils/index.android.js.map +1 -1
- package/utils/index.ios.js +9 -9
- package/utils/index.ios.js.map +1 -1
- package/utils/ios/index.js +45 -42
- package/utils/ios/index.js.map +1 -1
- package/utils/layout-helper/index.android.js +4 -4
- package/utils/layout-helper/index.android.js.map +1 -1
- package/utils/layout-helper/index.ios.js +2 -2
- package/utils/layout-helper/index.ios.js.map +1 -1
- package/utils/layout-helper/layout-helper-common.js +13 -13
- package/utils/layout-helper/layout-helper-common.js.map +1 -1
- package/utils/lazy.js +2 -2
- package/utils/lazy.js.map +1 -1
- package/utils/macrotask-scheduler.js +6 -6
- package/utils/macrotask-scheduler.js.map +1 -1
- package/utils/mainthread-helper.android.js +4 -4
- package/utils/mainthread-helper.android.js.map +1 -1
- package/utils/mainthread-helper.ios.js +1 -1
- package/utils/mainthread-helper.ios.js.map +1 -1
- package/utils/module-merge.js +1 -1
- package/utils/module-merge.js.map +1 -1
- package/utils/native-helper.android.js +19 -19
- package/utils/native-helper.android.js.map +1 -1
- package/utils/native-helper.ios.js +16 -23
- package/utils/native-helper.ios.js.map +1 -1
- package/utils/number-utils.js +3 -3
- package/utils/number-utils.js.map +1 -1
- package/utils/platform-check.js +6 -6
- package/utils/platform-check.js.map +1 -1
- package/utils/types.js +33 -43
- package/utils/types.js.map +1 -1
- package/wgc/crypto/SubtleCrypto.js +132 -167
- package/wgc/crypto/SubtleCrypto.js.map +1 -1
- package/wgc/crypto/index.d.ts +1 -1
- package/wgc/crypto/index.js +10 -18
- package/wgc/crypto/index.js.map +1 -1
- package/xhr/index.js +226 -308
- package/xhr/index.js.map +1 -1
- package/xml/index.js +78 -118
- package/xml/index.js.map +1 -1
|
@@ -5,19 +5,18 @@ import { profile } from '../../../profiling';
|
|
|
5
5
|
/**
|
|
6
6
|
* Value specifying that Property should be set to its initial value.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
export const unsetValue = new Object();
|
|
9
|
+
const cssPropertyNames = [];
|
|
10
|
+
const symbolPropertyMap = {};
|
|
11
|
+
const cssSymbolPropertyMap = {};
|
|
12
|
+
const inheritableProperties = new Array();
|
|
13
|
+
const inheritableCssProperties = new Array();
|
|
14
14
|
function print(map) {
|
|
15
|
-
|
|
16
|
-
for (
|
|
17
|
-
|
|
18
|
-
var prop = map[symbol];
|
|
15
|
+
const symbols = Object.getOwnPropertySymbols(map);
|
|
16
|
+
for (const symbol of symbols) {
|
|
17
|
+
const prop = map[symbol];
|
|
19
18
|
if (!prop.registered) {
|
|
20
|
-
console.log(
|
|
19
|
+
console.log(`Property ${prop.name} not Registered!!!!!`);
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
}
|
|
@@ -48,33 +47,33 @@ export function _evaluateCssVariableExpression(view, cssName, value) {
|
|
|
48
47
|
// Value is not using css-variable(s)
|
|
49
48
|
return value;
|
|
50
49
|
}
|
|
51
|
-
|
|
50
|
+
let output = value.trim();
|
|
52
51
|
// Evaluate every (and nested) css-variables in the value.
|
|
53
|
-
|
|
52
|
+
let lastValue;
|
|
54
53
|
while (lastValue !== output) {
|
|
55
54
|
lastValue = output;
|
|
56
|
-
|
|
55
|
+
const idx = output.lastIndexOf('var(');
|
|
57
56
|
if (idx === -1) {
|
|
58
57
|
continue;
|
|
59
58
|
}
|
|
60
|
-
|
|
59
|
+
const endIdx = output.indexOf(')', idx);
|
|
61
60
|
if (endIdx === -1) {
|
|
62
61
|
continue;
|
|
63
62
|
}
|
|
64
|
-
|
|
63
|
+
const matched = output
|
|
65
64
|
.substring(idx + 4, endIdx)
|
|
66
65
|
.split(',')
|
|
67
|
-
.map(
|
|
68
|
-
.filter(
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
.map((v) => v.trim())
|
|
67
|
+
.filter((v) => !!v);
|
|
68
|
+
const cssVariableName = matched.shift();
|
|
69
|
+
let cssVariableValue = view.style.getCssVariable(cssVariableName);
|
|
71
70
|
if (cssVariableValue === null && matched.length) {
|
|
72
71
|
cssVariableValue = _evaluateCssVariableExpression(view, cssName, matched.join(', ')).split(',')[0];
|
|
73
72
|
}
|
|
74
73
|
if (!cssVariableValue) {
|
|
75
74
|
cssVariableValue = 'unset';
|
|
76
75
|
}
|
|
77
|
-
output =
|
|
76
|
+
output = `${output.substring(0, idx)}${cssVariableValue}${output.substring(endIdx + 1)}`;
|
|
78
77
|
}
|
|
79
78
|
return output;
|
|
80
79
|
}
|
|
@@ -91,31 +90,31 @@ export function _evaluateCssCalcExpression(value) {
|
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
function getPropertiesFromMap(map) {
|
|
94
|
-
|
|
95
|
-
Object.getOwnPropertySymbols(map).forEach(
|
|
93
|
+
const props = [];
|
|
94
|
+
Object.getOwnPropertySymbols(map).forEach((symbol) => props.push(map[symbol]));
|
|
96
95
|
return props;
|
|
97
96
|
}
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
export class Property {
|
|
98
|
+
constructor(options) {
|
|
100
99
|
this.enumerable = true;
|
|
101
100
|
this.configurable = true;
|
|
102
|
-
|
|
101
|
+
const propertyName = options.name;
|
|
103
102
|
this.name = propertyName;
|
|
104
|
-
|
|
103
|
+
const key = Symbol(propertyName + ':propertyKey');
|
|
105
104
|
this.key = key;
|
|
106
|
-
|
|
105
|
+
const getDefault = Symbol(propertyName + ':getDefault');
|
|
107
106
|
this.getDefault = getDefault;
|
|
108
|
-
|
|
107
|
+
const setNative = Symbol(propertyName + ':setNative');
|
|
109
108
|
this.setNative = setNative;
|
|
110
|
-
|
|
109
|
+
const defaultValueKey = Symbol(propertyName + ':nativeDefaultValue');
|
|
111
110
|
this.defaultValueKey = defaultValueKey;
|
|
112
|
-
|
|
111
|
+
const defaultValue = options.defaultValue;
|
|
113
112
|
this.defaultValue = defaultValue;
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
113
|
+
const eventName = propertyName + 'Change';
|
|
114
|
+
let equalityComparer = options.equalityComparer;
|
|
115
|
+
let affectsLayout = options.affectsLayout;
|
|
116
|
+
let valueChanged = options.valueChanged;
|
|
117
|
+
let valueConverter = options.valueConverter;
|
|
119
118
|
this.overrideHandlers = function (options) {
|
|
120
119
|
if (typeof options.equalityComparer !== 'undefined') {
|
|
121
120
|
equalityComparer = options.equalityComparer;
|
|
@@ -130,11 +129,11 @@ var Property = /** @class */ (function () {
|
|
|
130
129
|
valueConverter = options.valueConverter;
|
|
131
130
|
}
|
|
132
131
|
};
|
|
133
|
-
|
|
132
|
+
const property = this;
|
|
134
133
|
this.set = function (boxedValue) {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
const reset = boxedValue === unsetValue;
|
|
135
|
+
let value;
|
|
136
|
+
let wrapped;
|
|
138
137
|
if (reset) {
|
|
139
138
|
value = defaultValue;
|
|
140
139
|
}
|
|
@@ -145,8 +144,8 @@ var Property = /** @class */ (function () {
|
|
|
145
144
|
value = valueConverter(value);
|
|
146
145
|
}
|
|
147
146
|
}
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
const oldValue = (key in this ? this[key] : defaultValue);
|
|
148
|
+
const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
|
|
150
149
|
if (wrapped || changed) {
|
|
151
150
|
if (affectsLayout) {
|
|
152
151
|
this.requestLayout();
|
|
@@ -195,10 +194,10 @@ var Property = /** @class */ (function () {
|
|
|
195
194
|
if (this.hasListeners(eventName)) {
|
|
196
195
|
this.notify({
|
|
197
196
|
object: this,
|
|
198
|
-
eventName
|
|
199
|
-
propertyName
|
|
200
|
-
value
|
|
201
|
-
oldValue
|
|
197
|
+
eventName,
|
|
198
|
+
propertyName,
|
|
199
|
+
value,
|
|
200
|
+
oldValue,
|
|
202
201
|
});
|
|
203
202
|
}
|
|
204
203
|
if (this.domNode) {
|
|
@@ -215,8 +214,8 @@ var Property = /** @class */ (function () {
|
|
|
215
214
|
return (key in this ? this[key] : defaultValue);
|
|
216
215
|
};
|
|
217
216
|
this.nativeValueChange = function (owner, value) {
|
|
218
|
-
|
|
219
|
-
|
|
217
|
+
const oldValue = (key in owner ? owner[key] : defaultValue);
|
|
218
|
+
const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
|
|
220
219
|
if (changed) {
|
|
221
220
|
owner[key] = value;
|
|
222
221
|
if (valueChanged) {
|
|
@@ -228,10 +227,10 @@ var Property = /** @class */ (function () {
|
|
|
228
227
|
if (owner.hasListeners(eventName)) {
|
|
229
228
|
owner.notify({
|
|
230
229
|
object: owner,
|
|
231
|
-
eventName
|
|
232
|
-
propertyName
|
|
233
|
-
value
|
|
234
|
-
oldValue
|
|
230
|
+
eventName,
|
|
231
|
+
propertyName,
|
|
232
|
+
value,
|
|
233
|
+
oldValue,
|
|
235
234
|
});
|
|
236
235
|
}
|
|
237
236
|
if (affectsLayout) {
|
|
@@ -244,39 +243,36 @@ var Property = /** @class */ (function () {
|
|
|
244
243
|
};
|
|
245
244
|
symbolPropertyMap[key] = this;
|
|
246
245
|
}
|
|
247
|
-
|
|
246
|
+
register(cls) {
|
|
248
247
|
if (this.registered) {
|
|
249
|
-
throw new Error(
|
|
248
|
+
throw new Error(`Property ${this.name} already registered.`);
|
|
250
249
|
}
|
|
251
250
|
this.registered = true;
|
|
252
251
|
Object.defineProperty(cls.prototype, this.name, this);
|
|
253
|
-
}
|
|
254
|
-
|
|
252
|
+
}
|
|
253
|
+
isSet(instance) {
|
|
255
254
|
return this.key in instance;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
}());
|
|
259
|
-
export { Property };
|
|
255
|
+
}
|
|
256
|
+
}
|
|
260
257
|
Property.prototype.isStyleProperty = false;
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
_this.overrideHandlers = function (options) {
|
|
258
|
+
export class CoercibleProperty extends Property {
|
|
259
|
+
constructor(options) {
|
|
260
|
+
super(options);
|
|
261
|
+
const propertyName = options.name;
|
|
262
|
+
const key = this.key;
|
|
263
|
+
const getDefault = this.getDefault;
|
|
264
|
+
const setNative = this.setNative;
|
|
265
|
+
const defaultValueKey = this.defaultValueKey;
|
|
266
|
+
const defaultValue = this.defaultValue;
|
|
267
|
+
const coerceKey = Symbol(propertyName + ':coerceKey');
|
|
268
|
+
const eventName = propertyName + 'Change';
|
|
269
|
+
let affectsLayout = options.affectsLayout;
|
|
270
|
+
let equalityComparer = options.equalityComparer;
|
|
271
|
+
let valueChanged = options.valueChanged;
|
|
272
|
+
let valueConverter = options.valueConverter;
|
|
273
|
+
let coerceCallback = options.coerceValue;
|
|
274
|
+
const property = this;
|
|
275
|
+
this.overrideHandlers = function (options) {
|
|
280
276
|
if (typeof options.equalityComparer !== 'undefined') {
|
|
281
277
|
equalityComparer = options.equalityComparer;
|
|
282
278
|
}
|
|
@@ -293,15 +289,15 @@ var CoercibleProperty = /** @class */ (function (_super) {
|
|
|
293
289
|
coerceCallback = options.coerceValue;
|
|
294
290
|
}
|
|
295
291
|
};
|
|
296
|
-
|
|
297
|
-
|
|
292
|
+
this.coerce = function (target) {
|
|
293
|
+
const originalValue = (coerceKey in target ? target[coerceKey] : defaultValue);
|
|
298
294
|
// need that to make coercing but also fire change events
|
|
299
295
|
target[propertyName] = originalValue;
|
|
300
296
|
};
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
297
|
+
this.set = function (boxedValue) {
|
|
298
|
+
const reset = boxedValue === unsetValue;
|
|
299
|
+
let value;
|
|
300
|
+
let wrapped;
|
|
305
301
|
if (reset) {
|
|
306
302
|
value = defaultValue;
|
|
307
303
|
delete this[coerceKey];
|
|
@@ -315,8 +311,8 @@ var CoercibleProperty = /** @class */ (function (_super) {
|
|
|
315
311
|
this[coerceKey] = value;
|
|
316
312
|
value = coerceCallback(this, value);
|
|
317
313
|
}
|
|
318
|
-
|
|
319
|
-
|
|
314
|
+
const oldValue = key in this ? this[key] : defaultValue;
|
|
315
|
+
const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
|
|
320
316
|
if (wrapped || changed) {
|
|
321
317
|
if (reset) {
|
|
322
318
|
delete this[key];
|
|
@@ -362,10 +358,10 @@ var CoercibleProperty = /** @class */ (function (_super) {
|
|
|
362
358
|
if (this.hasListeners(eventName)) {
|
|
363
359
|
this.notify({
|
|
364
360
|
object: this,
|
|
365
|
-
eventName
|
|
366
|
-
propertyName
|
|
367
|
-
value
|
|
368
|
-
oldValue
|
|
361
|
+
eventName,
|
|
362
|
+
propertyName,
|
|
363
|
+
value,
|
|
364
|
+
oldValue,
|
|
369
365
|
});
|
|
370
366
|
}
|
|
371
367
|
if (affectsLayout) {
|
|
@@ -381,101 +377,92 @@ var CoercibleProperty = /** @class */ (function (_super) {
|
|
|
381
377
|
}
|
|
382
378
|
}
|
|
383
379
|
};
|
|
384
|
-
return _this;
|
|
385
380
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
if (
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
// If we have parent and it has non-default value we use as our inherited value.
|
|
408
|
-
if (parent_1 && parent_1[sourceKey] !== 0 /* ValueSource.Default */) {
|
|
409
|
-
unboxedValue = parent_1[name];
|
|
410
|
-
newValueSource = 1 /* ValueSource.Inherited */;
|
|
411
|
-
}
|
|
412
|
-
else {
|
|
413
|
-
unboxedValue = defaultValue;
|
|
414
|
-
newValueSource = 0 /* ValueSource.Default */;
|
|
415
|
-
}
|
|
381
|
+
}
|
|
382
|
+
export class InheritedProperty extends Property {
|
|
383
|
+
constructor(options) {
|
|
384
|
+
super(options);
|
|
385
|
+
const name = options.name;
|
|
386
|
+
const key = this.key;
|
|
387
|
+
const defaultValue = options.defaultValue;
|
|
388
|
+
const sourceKey = Symbol(name + ':valueSourceKey');
|
|
389
|
+
this.sourceKey = sourceKey;
|
|
390
|
+
const setBase = this.set;
|
|
391
|
+
const setFunc = (valueSource) => function (value) {
|
|
392
|
+
const that = this;
|
|
393
|
+
let unboxedValue;
|
|
394
|
+
let newValueSource;
|
|
395
|
+
if (value === unsetValue) {
|
|
396
|
+
// If unsetValue - we want to reset the property.
|
|
397
|
+
const parent = that.parent;
|
|
398
|
+
// If we have parent and it has non-default value we use as our inherited value.
|
|
399
|
+
if (parent && parent[sourceKey] !== 0 /* ValueSource.Default */) {
|
|
400
|
+
unboxedValue = parent[name];
|
|
401
|
+
newValueSource = 1 /* ValueSource.Inherited */;
|
|
416
402
|
}
|
|
417
403
|
else {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
newValueSource = valueSource;
|
|
404
|
+
unboxedValue = defaultValue;
|
|
405
|
+
newValueSource = 0 /* ValueSource.Default */;
|
|
421
406
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
// else we are set through property set.
|
|
410
|
+
unboxedValue = value;
|
|
411
|
+
newValueSource = valueSource;
|
|
412
|
+
}
|
|
413
|
+
// take currentValue before calling base - base may change it.
|
|
414
|
+
const currentValue = that[key];
|
|
415
|
+
setBase.call(that, unboxedValue);
|
|
416
|
+
const newValue = that[key];
|
|
417
|
+
that[sourceKey] = newValueSource;
|
|
418
|
+
if (currentValue !== newValue) {
|
|
419
|
+
const reset = newValueSource === 0 /* ValueSource.Default */;
|
|
420
|
+
that.eachChild((child) => {
|
|
421
|
+
const childValueSource = child[sourceKey] || 0 /* ValueSource.Default */;
|
|
422
|
+
if (reset) {
|
|
423
|
+
if (childValueSource === 1 /* ValueSource.Inherited */) {
|
|
424
|
+
setFunc.call(child, unsetValue);
|
|
435
425
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
426
|
+
}
|
|
427
|
+
else {
|
|
428
|
+
if (childValueSource <= 1 /* ValueSource.Inherited */) {
|
|
429
|
+
setInheritedValue.call(child, newValue);
|
|
440
430
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
}
|
|
444
|
-
}
|
|
431
|
+
}
|
|
432
|
+
return true;
|
|
433
|
+
});
|
|
434
|
+
}
|
|
445
435
|
};
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
inheritableProperties.push(
|
|
450
|
-
return _this;
|
|
436
|
+
const setInheritedValue = setFunc(1 /* ValueSource.Inherited */);
|
|
437
|
+
this.setInheritedValue = setInheritedValue;
|
|
438
|
+
this.set = setFunc(3 /* ValueSource.Local */);
|
|
439
|
+
inheritableProperties.push(this);
|
|
451
440
|
}
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
function CssProperty(options) {
|
|
457
|
-
var propertyName = options.name;
|
|
441
|
+
}
|
|
442
|
+
export class CssProperty {
|
|
443
|
+
constructor(options) {
|
|
444
|
+
const propertyName = options.name;
|
|
458
445
|
this.name = propertyName;
|
|
459
446
|
cssPropertyNames.push(options.cssName);
|
|
460
|
-
this.cssName =
|
|
447
|
+
this.cssName = `css:${options.cssName}`;
|
|
461
448
|
this.cssLocalName = options.cssName;
|
|
462
|
-
|
|
449
|
+
const key = Symbol(propertyName + ':propertyKey');
|
|
463
450
|
this.key = key;
|
|
464
|
-
|
|
451
|
+
const sourceKey = Symbol(propertyName + ':valueSourceKey');
|
|
465
452
|
this.sourceKey = sourceKey;
|
|
466
|
-
|
|
453
|
+
const getDefault = Symbol(propertyName + ':getDefault');
|
|
467
454
|
this.getDefault = getDefault;
|
|
468
|
-
|
|
455
|
+
const setNative = Symbol(propertyName + ':setNative');
|
|
469
456
|
this.setNative = setNative;
|
|
470
|
-
|
|
457
|
+
const defaultValueKey = Symbol(propertyName + ':nativeDefaultValue');
|
|
471
458
|
this.defaultValueKey = defaultValueKey;
|
|
472
|
-
|
|
459
|
+
const defaultValue = options.defaultValue;
|
|
473
460
|
this.defaultValue = defaultValue;
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
461
|
+
const eventName = propertyName + 'Change';
|
|
462
|
+
let affectsLayout = options.affectsLayout;
|
|
463
|
+
let equalityComparer = options.equalityComparer;
|
|
464
|
+
let valueChanged = options.valueChanged;
|
|
465
|
+
let valueConverter = options.valueConverter;
|
|
479
466
|
this.overrideHandlers = function (options) {
|
|
480
467
|
if (typeof options.equalityComparer !== 'undefined') {
|
|
481
468
|
equalityComparer = options.equalityComparer;
|
|
@@ -490,15 +477,15 @@ var CssProperty = /** @class */ (function () {
|
|
|
490
477
|
valueConverter = options.valueConverter;
|
|
491
478
|
}
|
|
492
479
|
};
|
|
493
|
-
|
|
480
|
+
const property = this;
|
|
494
481
|
function setLocalValue(newValue) {
|
|
495
|
-
|
|
482
|
+
const view = this.viewRef.get();
|
|
496
483
|
if (!view) {
|
|
497
|
-
Trace.write(
|
|
484
|
+
Trace.write(`${newValue} not set to view because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
498
485
|
return;
|
|
499
486
|
}
|
|
500
|
-
|
|
501
|
-
|
|
487
|
+
const reset = newValue === unsetValue || newValue === '';
|
|
488
|
+
let value;
|
|
502
489
|
if (reset) {
|
|
503
490
|
value = defaultValue;
|
|
504
491
|
delete this[sourceKey];
|
|
@@ -507,8 +494,8 @@ var CssProperty = /** @class */ (function () {
|
|
|
507
494
|
this[sourceKey] = 3 /* ValueSource.Local */;
|
|
508
495
|
value = valueConverter && typeof newValue === 'string' ? valueConverter(newValue) : newValue;
|
|
509
496
|
}
|
|
510
|
-
|
|
511
|
-
|
|
497
|
+
const oldValue = (key in this ? this[key] : defaultValue);
|
|
498
|
+
const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
|
|
512
499
|
if (changed) {
|
|
513
500
|
if (reset) {
|
|
514
501
|
delete this[key];
|
|
@@ -554,10 +541,10 @@ var CssProperty = /** @class */ (function () {
|
|
|
554
541
|
if (this.hasListeners(eventName)) {
|
|
555
542
|
this.notify({
|
|
556
543
|
object: this,
|
|
557
|
-
eventName
|
|
558
|
-
propertyName
|
|
559
|
-
value
|
|
560
|
-
oldValue
|
|
544
|
+
eventName,
|
|
545
|
+
propertyName,
|
|
546
|
+
value,
|
|
547
|
+
oldValue,
|
|
561
548
|
});
|
|
562
549
|
}
|
|
563
550
|
if (affectsLayout) {
|
|
@@ -566,18 +553,18 @@ var CssProperty = /** @class */ (function () {
|
|
|
566
553
|
}
|
|
567
554
|
}
|
|
568
555
|
function setCssValue(newValue) {
|
|
569
|
-
|
|
556
|
+
const view = this.viewRef.get();
|
|
570
557
|
if (!view) {
|
|
571
|
-
Trace.write(
|
|
558
|
+
Trace.write(`${newValue} not set to view because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
572
559
|
return;
|
|
573
560
|
}
|
|
574
|
-
|
|
561
|
+
const currentValueSource = this[sourceKey] || 0 /* ValueSource.Default */;
|
|
575
562
|
// We have localValueSource - NOOP.
|
|
576
563
|
if (currentValueSource === 3 /* ValueSource.Local */) {
|
|
577
564
|
return;
|
|
578
565
|
}
|
|
579
|
-
|
|
580
|
-
|
|
566
|
+
const reset = newValue === unsetValue || newValue === '';
|
|
567
|
+
let value;
|
|
581
568
|
if (reset) {
|
|
582
569
|
value = defaultValue;
|
|
583
570
|
delete this[sourceKey];
|
|
@@ -586,8 +573,8 @@ var CssProperty = /** @class */ (function () {
|
|
|
586
573
|
value = valueConverter && typeof newValue === 'string' ? valueConverter(newValue) : newValue;
|
|
587
574
|
this[sourceKey] = 2 /* ValueSource.Css */;
|
|
588
575
|
}
|
|
589
|
-
|
|
590
|
-
|
|
576
|
+
const oldValue = (key in this ? this[key] : defaultValue);
|
|
577
|
+
const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
|
|
591
578
|
if (changed) {
|
|
592
579
|
if (reset) {
|
|
593
580
|
delete this[key];
|
|
@@ -633,10 +620,10 @@ var CssProperty = /** @class */ (function () {
|
|
|
633
620
|
if (this.hasListeners(eventName)) {
|
|
634
621
|
this.notify({
|
|
635
622
|
object: this,
|
|
636
|
-
eventName
|
|
637
|
-
propertyName
|
|
638
|
-
value
|
|
639
|
-
oldValue
|
|
623
|
+
eventName,
|
|
624
|
+
propertyName,
|
|
625
|
+
value,
|
|
626
|
+
oldValue,
|
|
640
627
|
});
|
|
641
628
|
}
|
|
642
629
|
if (affectsLayout) {
|
|
@@ -661,9 +648,9 @@ var CssProperty = /** @class */ (function () {
|
|
|
661
648
|
};
|
|
662
649
|
cssSymbolPropertyMap[key] = this;
|
|
663
650
|
}
|
|
664
|
-
|
|
651
|
+
register(cls) {
|
|
665
652
|
if (this.registered) {
|
|
666
|
-
throw new Error(
|
|
653
|
+
throw new Error(`Property ${this.name} already registered.`);
|
|
667
654
|
}
|
|
668
655
|
this.registered = true;
|
|
669
656
|
Object.defineProperty(cls.prototype, this.name, this.localValueDescriptor);
|
|
@@ -671,17 +658,15 @@ var CssProperty = /** @class */ (function () {
|
|
|
671
658
|
if (this.cssLocalName !== this.cssName) {
|
|
672
659
|
Object.defineProperty(cls.prototype, this.cssLocalName, this.localValueDescriptor);
|
|
673
660
|
}
|
|
674
|
-
}
|
|
675
|
-
|
|
661
|
+
}
|
|
662
|
+
isSet(instance) {
|
|
676
663
|
return this.key in instance;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
}());
|
|
680
|
-
export { CssProperty };
|
|
664
|
+
}
|
|
665
|
+
}
|
|
681
666
|
CssProperty.prototype.isStyleProperty = true;
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
667
|
+
export class CssAnimationProperty {
|
|
668
|
+
constructor(options) {
|
|
669
|
+
const propertyName = options.name;
|
|
685
670
|
this.name = propertyName;
|
|
686
671
|
cssPropertyNames.push(options.cssName);
|
|
687
672
|
CssAnimationProperty.properties[propertyName] = this;
|
|
@@ -689,32 +674,32 @@ var CssAnimationProperty = /** @class */ (function () {
|
|
|
689
674
|
CssAnimationProperty.properties[options.cssName] = this;
|
|
690
675
|
}
|
|
691
676
|
this._valueConverter = options.valueConverter;
|
|
692
|
-
|
|
677
|
+
const cssLocalName = options.cssName || propertyName;
|
|
693
678
|
this.cssLocalName = cssLocalName;
|
|
694
|
-
|
|
679
|
+
const cssName = 'css:' + cssLocalName;
|
|
695
680
|
this.cssName = cssName;
|
|
696
|
-
|
|
681
|
+
const keyframeName = 'keyframe:' + propertyName;
|
|
697
682
|
this.keyframe = keyframeName;
|
|
698
|
-
|
|
699
|
-
|
|
683
|
+
const defaultName = 'default:' + propertyName;
|
|
684
|
+
const defaultValueKey = Symbol(defaultName);
|
|
700
685
|
this.defaultValueKey = defaultValueKey;
|
|
701
686
|
this.defaultValue = options.defaultValue;
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
687
|
+
const cssValue = Symbol(cssName);
|
|
688
|
+
const styleValue = Symbol(`local:${propertyName}`);
|
|
689
|
+
const keyframeValue = Symbol(keyframeName);
|
|
690
|
+
const computedValue = Symbol('computed-value:' + propertyName);
|
|
706
691
|
this.key = computedValue;
|
|
707
|
-
|
|
692
|
+
const computedSource = Symbol('computed-source:' + propertyName);
|
|
708
693
|
this.source = computedSource;
|
|
709
694
|
this.getDefault = Symbol(propertyName + ':getDefault');
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
695
|
+
const getDefault = this.getDefault;
|
|
696
|
+
const setNative = (this.setNative = Symbol(propertyName + ':setNative'));
|
|
697
|
+
const eventName = propertyName + 'Change';
|
|
698
|
+
const property = this;
|
|
714
699
|
function descriptor(symbol, propertySource, enumerable, configurable, getsComputed) {
|
|
715
700
|
return {
|
|
716
|
-
enumerable
|
|
717
|
-
configurable
|
|
701
|
+
enumerable,
|
|
702
|
+
configurable,
|
|
718
703
|
get: getsComputed
|
|
719
704
|
? function () {
|
|
720
705
|
return this[computedValue];
|
|
@@ -722,16 +707,16 @@ var CssAnimationProperty = /** @class */ (function () {
|
|
|
722
707
|
: function () {
|
|
723
708
|
return this[symbol];
|
|
724
709
|
},
|
|
725
|
-
set
|
|
726
|
-
|
|
710
|
+
set(boxedValue) {
|
|
711
|
+
const view = this.viewRef.get();
|
|
727
712
|
if (!view) {
|
|
728
|
-
Trace.write(
|
|
713
|
+
Trace.write(`${boxedValue} not set to view because ".viewRef" is cleared`, Trace.categories.Animation, Trace.messageType.warn);
|
|
729
714
|
return;
|
|
730
715
|
}
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
716
|
+
const oldValue = this[computedValue];
|
|
717
|
+
const oldSource = this[computedSource];
|
|
718
|
+
const wasSet = oldSource !== 0 /* ValueSource.Default */;
|
|
719
|
+
const reset = boxedValue === unsetValue || boxedValue === '';
|
|
735
720
|
if (reset) {
|
|
736
721
|
this[symbol] = unsetValue;
|
|
737
722
|
if (this[computedSource] === propertySource) {
|
|
@@ -760,10 +745,10 @@ var CssAnimationProperty = /** @class */ (function () {
|
|
|
760
745
|
this[computedValue] = boxedValue;
|
|
761
746
|
}
|
|
762
747
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
748
|
+
const value = this[computedValue];
|
|
749
|
+
const source = this[computedSource];
|
|
750
|
+
const isSet = source !== 0 /* ValueSource.Default */;
|
|
751
|
+
const computedValueChanged = oldValue !== value && (!options.equalityComparer || !options.equalityComparer(oldValue, value));
|
|
767
752
|
if (computedValueChanged && options.valueChanged) {
|
|
768
753
|
options.valueChanged(this, oldValue, value);
|
|
769
754
|
}
|
|
@@ -793,22 +778,22 @@ var CssAnimationProperty = /** @class */ (function () {
|
|
|
793
778
|
if (computedValueChanged && this.hasListeners(eventName)) {
|
|
794
779
|
this.notify({
|
|
795
780
|
object: this,
|
|
796
|
-
eventName
|
|
797
|
-
propertyName
|
|
798
|
-
value
|
|
799
|
-
oldValue
|
|
781
|
+
eventName,
|
|
782
|
+
propertyName,
|
|
783
|
+
value,
|
|
784
|
+
oldValue,
|
|
800
785
|
});
|
|
801
786
|
}
|
|
802
787
|
},
|
|
803
788
|
};
|
|
804
789
|
}
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
790
|
+
const defaultPropertyDescriptor = descriptor(defaultValueKey, 0 /* ValueSource.Default */, false, false, false);
|
|
791
|
+
const cssPropertyDescriptor = descriptor(cssValue, 2 /* ValueSource.Css */, false, false, false);
|
|
792
|
+
const stylePropertyDescriptor = descriptor(styleValue, 3 /* ValueSource.Local */, true, true, true);
|
|
793
|
+
const keyframePropertyDescriptor = descriptor(keyframeValue, 4 /* ValueSource.Keyframe */, false, false, false);
|
|
809
794
|
symbolPropertyMap[computedValue] = this;
|
|
810
795
|
cssSymbolPropertyMap[computedValue] = this;
|
|
811
|
-
this.register =
|
|
796
|
+
this.register = (cls) => {
|
|
812
797
|
cls.prototype[computedValue] = options.defaultValue;
|
|
813
798
|
cls.prototype[computedSource] = 0 /* ValueSource.Default */;
|
|
814
799
|
cls.prototype[cssValue] = unsetValue;
|
|
@@ -823,50 +808,47 @@ var CssAnimationProperty = /** @class */ (function () {
|
|
|
823
808
|
Object.defineProperty(cls.prototype, keyframeName, keyframePropertyDescriptor);
|
|
824
809
|
};
|
|
825
810
|
}
|
|
826
|
-
|
|
827
|
-
|
|
811
|
+
_initDefaultNativeValue(target) {
|
|
812
|
+
const view = target.viewRef.get();
|
|
828
813
|
if (!view) {
|
|
829
|
-
Trace.write(
|
|
814
|
+
Trace.write(`_initDefaultNativeValue not executed to view because ".viewRef" is cleared`, Trace.categories.Animation, Trace.messageType.warn);
|
|
830
815
|
return;
|
|
831
816
|
}
|
|
832
|
-
|
|
817
|
+
const defaultValueKey = this.defaultValueKey;
|
|
833
818
|
if (!(defaultValueKey in target)) {
|
|
834
|
-
|
|
819
|
+
const getDefault = this.getDefault;
|
|
835
820
|
target[defaultValueKey] = view[getDefault] ? view[getDefault]() : this.defaultValue;
|
|
836
821
|
}
|
|
837
|
-
}
|
|
838
|
-
|
|
822
|
+
}
|
|
823
|
+
static _getByCssName(name) {
|
|
839
824
|
return this.properties[name];
|
|
840
|
-
}
|
|
841
|
-
|
|
825
|
+
}
|
|
826
|
+
static _getPropertyNames() {
|
|
842
827
|
return Object.keys(CssAnimationProperty.properties);
|
|
843
|
-
}
|
|
844
|
-
|
|
828
|
+
}
|
|
829
|
+
isSet(instance) {
|
|
845
830
|
return instance[this.source] !== 0 /* ValueSource.Default */;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
}());
|
|
850
|
-
export { CssAnimationProperty };
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
CssAnimationProperty.properties = {};
|
|
851
834
|
CssAnimationProperty.prototype.isStyleProperty = true;
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
_this.overrideHandlers = function (options) {
|
|
835
|
+
export class InheritedCssProperty extends CssProperty {
|
|
836
|
+
constructor(options) {
|
|
837
|
+
super(options);
|
|
838
|
+
const propertyName = options.name;
|
|
839
|
+
const key = this.key;
|
|
840
|
+
const sourceKey = this.sourceKey;
|
|
841
|
+
const getDefault = this.getDefault;
|
|
842
|
+
const setNative = this.setNative;
|
|
843
|
+
const defaultValueKey = this.defaultValueKey;
|
|
844
|
+
const eventName = propertyName + 'Change';
|
|
845
|
+
let defaultValue = options.defaultValue;
|
|
846
|
+
let affectsLayout = options.affectsLayout;
|
|
847
|
+
let equalityComparer = options.equalityComparer;
|
|
848
|
+
let valueChanged = options.valueChanged;
|
|
849
|
+
let valueConverter = options.valueConverter;
|
|
850
|
+
const property = this;
|
|
851
|
+
this.overrideHandlers = function (options) {
|
|
870
852
|
if (typeof options.equalityComparer !== 'undefined') {
|
|
871
853
|
equalityComparer = options.equalityComparer;
|
|
872
854
|
}
|
|
@@ -880,159 +862,150 @@ var InheritedCssProperty = /** @class */ (function (_super) {
|
|
|
880
862
|
valueConverter = options.valueConverter;
|
|
881
863
|
}
|
|
882
864
|
};
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
865
|
+
const setFunc = (valueSource) => function (boxedValue) {
|
|
866
|
+
const view = this.viewRef.get();
|
|
867
|
+
if (!view) {
|
|
868
|
+
Trace.write(`${boxedValue} not set to view's property because ".viewRef" is cleared`, Trace.categories.Style, Trace.messageType.warn);
|
|
869
|
+
return;
|
|
870
|
+
}
|
|
871
|
+
const reset = boxedValue === unsetValue || boxedValue === '';
|
|
872
|
+
const currentValueSource = this[sourceKey] || 0 /* ValueSource.Default */;
|
|
873
|
+
if (reset) {
|
|
874
|
+
// If we want to reset cssValue and we have localValue - return;
|
|
875
|
+
if (valueSource === 2 /* ValueSource.Css */ && currentValueSource === 3 /* ValueSource.Local */) {
|
|
888
876
|
return;
|
|
889
877
|
}
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
if (
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
878
|
+
}
|
|
879
|
+
else {
|
|
880
|
+
if (currentValueSource > valueSource) {
|
|
881
|
+
return;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
const oldValue = key in this ? this[key] : defaultValue;
|
|
885
|
+
let value;
|
|
886
|
+
let unsetNativeValue = false;
|
|
887
|
+
if (reset) {
|
|
888
|
+
// If unsetValue - we want to reset this property.
|
|
889
|
+
const parent = view.parent;
|
|
890
|
+
const style = parent ? parent.style : null;
|
|
891
|
+
// If we have parent and it has non-default value we use as our inherited value.
|
|
892
|
+
if (style && style[sourceKey] > 0 /* ValueSource.Default */) {
|
|
893
|
+
value = style[propertyName];
|
|
894
|
+
this[sourceKey] = 1 /* ValueSource.Inherited */;
|
|
895
|
+
this[key] = value;
|
|
897
896
|
}
|
|
898
897
|
else {
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
898
|
+
value = defaultValue;
|
|
899
|
+
delete this[sourceKey];
|
|
900
|
+
delete this[key];
|
|
901
|
+
unsetNativeValue = true;
|
|
902
902
|
}
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
if (
|
|
907
|
-
|
|
908
|
-
var parent_2 = view.parent;
|
|
909
|
-
var style = parent_2 ? parent_2.style : null;
|
|
910
|
-
// If we have parent and it has non-default value we use as our inherited value.
|
|
911
|
-
if (style && style[sourceKey] > 0 /* ValueSource.Default */) {
|
|
912
|
-
value = style[propertyName];
|
|
913
|
-
this[sourceKey] = 1 /* ValueSource.Inherited */;
|
|
914
|
-
this[key] = value;
|
|
915
|
-
}
|
|
916
|
-
else {
|
|
917
|
-
value = defaultValue;
|
|
918
|
-
delete this[sourceKey];
|
|
919
|
-
delete this[key];
|
|
920
|
-
unsetNativeValue = true;
|
|
921
|
-
}
|
|
903
|
+
}
|
|
904
|
+
else {
|
|
905
|
+
this[sourceKey] = valueSource;
|
|
906
|
+
if (valueConverter && typeof boxedValue === 'string') {
|
|
907
|
+
value = valueConverter(boxedValue);
|
|
922
908
|
}
|
|
923
909
|
else {
|
|
924
|
-
|
|
925
|
-
if (valueConverter && typeof boxedValue === 'string') {
|
|
926
|
-
value = valueConverter(boxedValue);
|
|
927
|
-
}
|
|
928
|
-
else {
|
|
929
|
-
value = boxedValue;
|
|
930
|
-
}
|
|
931
|
-
this[key] = value;
|
|
910
|
+
value = boxedValue;
|
|
932
911
|
}
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
912
|
+
this[key] = value;
|
|
913
|
+
}
|
|
914
|
+
const changed = equalityComparer ? !equalityComparer(oldValue, value) : oldValue !== value;
|
|
915
|
+
if (changed) {
|
|
916
|
+
if (valueChanged) {
|
|
917
|
+
valueChanged(this, oldValue, value);
|
|
918
|
+
}
|
|
919
|
+
if (view[setNative]) {
|
|
920
|
+
if (view._suspendNativeUpdatesCount) {
|
|
921
|
+
if (view._suspendedUpdates) {
|
|
922
|
+
view._suspendedUpdates[propertyName] = property;
|
|
943
923
|
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
else {
|
|
951
|
-
view[setNative](defaultValue);
|
|
952
|
-
}
|
|
924
|
+
}
|
|
925
|
+
else {
|
|
926
|
+
if (unsetNativeValue) {
|
|
927
|
+
if (defaultValueKey in this) {
|
|
928
|
+
view[setNative](this[defaultValueKey]);
|
|
929
|
+
delete this[defaultValueKey];
|
|
953
930
|
}
|
|
954
931
|
else {
|
|
955
|
-
|
|
956
|
-
this[defaultValueKey] = view[getDefault] ? view[getDefault]() : defaultValue;
|
|
957
|
-
}
|
|
958
|
-
view[setNative](value);
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
if (this.hasListeners(eventName)) {
|
|
963
|
-
this.notify({
|
|
964
|
-
object: this,
|
|
965
|
-
eventName: eventName,
|
|
966
|
-
propertyName: propertyName,
|
|
967
|
-
value: value,
|
|
968
|
-
oldValue: oldValue,
|
|
969
|
-
});
|
|
970
|
-
}
|
|
971
|
-
if (affectsLayout) {
|
|
972
|
-
view.requestLayout();
|
|
973
|
-
}
|
|
974
|
-
view.eachChild(function (child) {
|
|
975
|
-
var childStyle = child.style;
|
|
976
|
-
var childValueSource = childStyle[sourceKey] || 0 /* ValueSource.Default */;
|
|
977
|
-
if (reset) {
|
|
978
|
-
if (childValueSource === 1 /* ValueSource.Inherited */) {
|
|
979
|
-
setDefaultFunc.call(childStyle, unsetValue);
|
|
932
|
+
view[setNative](defaultValue);
|
|
980
933
|
}
|
|
981
934
|
}
|
|
982
935
|
else {
|
|
983
|
-
if (
|
|
984
|
-
|
|
936
|
+
if (!(defaultValueKey in this)) {
|
|
937
|
+
this[defaultValueKey] = view[getDefault] ? view[getDefault]() : defaultValue;
|
|
985
938
|
}
|
|
939
|
+
view[setNative](value);
|
|
986
940
|
}
|
|
987
|
-
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
if (this.hasListeners(eventName)) {
|
|
944
|
+
this.notify({
|
|
945
|
+
object: this,
|
|
946
|
+
eventName,
|
|
947
|
+
propertyName,
|
|
948
|
+
value,
|
|
949
|
+
oldValue,
|
|
988
950
|
});
|
|
989
951
|
}
|
|
990
|
-
|
|
952
|
+
if (affectsLayout) {
|
|
953
|
+
view.requestLayout();
|
|
954
|
+
}
|
|
955
|
+
view.eachChild((child) => {
|
|
956
|
+
const childStyle = child.style;
|
|
957
|
+
const childValueSource = childStyle[sourceKey] || 0 /* ValueSource.Default */;
|
|
958
|
+
if (reset) {
|
|
959
|
+
if (childValueSource === 1 /* ValueSource.Inherited */) {
|
|
960
|
+
setDefaultFunc.call(childStyle, unsetValue);
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
else {
|
|
964
|
+
if (childValueSource <= 1 /* ValueSource.Inherited */) {
|
|
965
|
+
setInheritedFunc.call(childStyle, value);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
return true;
|
|
969
|
+
});
|
|
970
|
+
}
|
|
991
971
|
};
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
inheritableCssProperties.push(
|
|
998
|
-
return _this;
|
|
972
|
+
const setDefaultFunc = setFunc(0 /* ValueSource.Default */);
|
|
973
|
+
const setInheritedFunc = setFunc(1 /* ValueSource.Inherited */);
|
|
974
|
+
this.setInheritedValue = setInheritedFunc;
|
|
975
|
+
this.cssValueDescriptor.set = setFunc(2 /* ValueSource.Css */);
|
|
976
|
+
this.localValueDescriptor.set = setFunc(3 /* ValueSource.Local */);
|
|
977
|
+
inheritableCssProperties.push(this);
|
|
999
978
|
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
var ShorthandProperty = /** @class */ (function () {
|
|
1004
|
-
function ShorthandProperty(options) {
|
|
979
|
+
}
|
|
980
|
+
export class ShorthandProperty {
|
|
981
|
+
constructor(options) {
|
|
1005
982
|
this.name = options.name;
|
|
1006
|
-
|
|
983
|
+
const key = Symbol(this.name + ':propertyKey');
|
|
1007
984
|
this.key = key;
|
|
1008
|
-
this.cssName =
|
|
1009
|
-
this.cssLocalName =
|
|
1010
|
-
|
|
985
|
+
this.cssName = `css:${options.cssName}`;
|
|
986
|
+
this.cssLocalName = `${options.cssName}`;
|
|
987
|
+
const converter = options.converter;
|
|
1011
988
|
function setLocalValue(value) {
|
|
1012
|
-
|
|
1013
|
-
var view = this.viewRef.get();
|
|
989
|
+
const view = this.viewRef.get();
|
|
1014
990
|
if (!view) {
|
|
1015
|
-
Trace.write(
|
|
991
|
+
Trace.write(`setLocalValue not executed to view because ".viewRef" is cleared`, Trace.categories.Animation, Trace.messageType.warn);
|
|
1016
992
|
return;
|
|
1017
993
|
}
|
|
1018
|
-
view._batchUpdate(
|
|
1019
|
-
for (
|
|
1020
|
-
|
|
1021
|
-
_this[p.name] = v;
|
|
994
|
+
view._batchUpdate(() => {
|
|
995
|
+
for (const [p, v] of converter(value)) {
|
|
996
|
+
this[p.name] = v;
|
|
1022
997
|
}
|
|
1023
998
|
});
|
|
1024
999
|
}
|
|
1025
1000
|
function setCssValue(value) {
|
|
1026
|
-
|
|
1027
|
-
var view = this.viewRef.get();
|
|
1001
|
+
const view = this.viewRef.get();
|
|
1028
1002
|
if (!view) {
|
|
1029
|
-
Trace.write(
|
|
1003
|
+
Trace.write(`setCssValue not executed to view because ".viewRef" is cleared`, Trace.categories.Animation, Trace.messageType.warn);
|
|
1030
1004
|
return;
|
|
1031
1005
|
}
|
|
1032
|
-
view._batchUpdate(
|
|
1033
|
-
for (
|
|
1034
|
-
|
|
1035
|
-
_this[p.cssName] = v;
|
|
1006
|
+
view._batchUpdate(() => {
|
|
1007
|
+
for (const [p, v] of converter(value)) {
|
|
1008
|
+
this[p.cssName] = v;
|
|
1036
1009
|
}
|
|
1037
1010
|
});
|
|
1038
1011
|
}
|
|
@@ -1051,19 +1024,17 @@ var ShorthandProperty = /** @class */ (function () {
|
|
|
1051
1024
|
this.propertyBagDescriptor = {
|
|
1052
1025
|
enumerable: false,
|
|
1053
1026
|
configurable: true,
|
|
1054
|
-
set
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
var property = _a[0], value = _a[1];
|
|
1058
|
-
_this[property.cssLocalName] = value;
|
|
1027
|
+
set(value) {
|
|
1028
|
+
converter(value).forEach(([property, value]) => {
|
|
1029
|
+
this[property.cssLocalName] = value;
|
|
1059
1030
|
});
|
|
1060
1031
|
},
|
|
1061
1032
|
};
|
|
1062
1033
|
cssSymbolPropertyMap[key] = this;
|
|
1063
1034
|
}
|
|
1064
|
-
|
|
1035
|
+
register(cls) {
|
|
1065
1036
|
if (this.registered) {
|
|
1066
|
-
throw new Error(
|
|
1037
|
+
throw new Error(`Property ${this.name} already registered.`);
|
|
1067
1038
|
}
|
|
1068
1039
|
this.registered = true;
|
|
1069
1040
|
Object.defineProperty(cls.prototype, this.name, this.localValueDescriptor);
|
|
@@ -1072,16 +1043,13 @@ var ShorthandProperty = /** @class */ (function () {
|
|
|
1072
1043
|
Object.defineProperty(cls.prototype, this.cssLocalName, this.localValueDescriptor);
|
|
1073
1044
|
}
|
|
1074
1045
|
Object.defineProperty(cls.prototype.PropertyBag, this.cssLocalName, this.propertyBagDescriptor);
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
}());
|
|
1078
|
-
export { ShorthandProperty };
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1079
1048
|
function inheritablePropertyValuesOn(view) {
|
|
1080
|
-
|
|
1081
|
-
for (
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
var valueSource = view[sourceKey] || 0 /* ValueSource.Default */;
|
|
1049
|
+
const array = new Array();
|
|
1050
|
+
for (const prop of inheritableProperties) {
|
|
1051
|
+
const sourceKey = prop.sourceKey;
|
|
1052
|
+
const valueSource = view[sourceKey] || 0 /* ValueSource.Default */;
|
|
1085
1053
|
if (valueSource !== 0 /* ValueSource.Default */) {
|
|
1086
1054
|
// use prop.name as it will return value or default value.
|
|
1087
1055
|
// prop.key will return undefined if property is set the same value as default one.
|
|
@@ -1091,11 +1059,10 @@ function inheritablePropertyValuesOn(view) {
|
|
|
1091
1059
|
return array;
|
|
1092
1060
|
}
|
|
1093
1061
|
function inheritableCssPropertyValuesOn(style) {
|
|
1094
|
-
|
|
1095
|
-
for (
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
var valueSource = style[sourceKey] || 0 /* ValueSource.Default */;
|
|
1062
|
+
const array = new Array();
|
|
1063
|
+
for (const prop of inheritableCssProperties) {
|
|
1064
|
+
const sourceKey = prop.sourceKey;
|
|
1065
|
+
const valueSource = style[sourceKey] || 0 /* ValueSource.Default */;
|
|
1099
1066
|
if (valueSource !== 0 /* ValueSource.Default */) {
|
|
1100
1067
|
// use prop.name as it will return value or default value.
|
|
1101
1068
|
// prop.key will return undefined if property is set the same value as default one.
|
|
@@ -1104,7 +1071,7 @@ function inheritableCssPropertyValuesOn(style) {
|
|
|
1104
1071
|
}
|
|
1105
1072
|
return array;
|
|
1106
1073
|
}
|
|
1107
|
-
export
|
|
1074
|
+
export const initNativeView = profile('"properties".initNativeView', function initNativeView(view) {
|
|
1108
1075
|
if (view._suspendedUpdates) {
|
|
1109
1076
|
applyPendingNativeSetters(view);
|
|
1110
1077
|
}
|
|
@@ -1116,15 +1083,15 @@ export var initNativeView = profile('"properties".initNativeView', function init
|
|
|
1116
1083
|
});
|
|
1117
1084
|
export function applyPendingNativeSetters(view) {
|
|
1118
1085
|
// TODO: Check what happens if a view was suspended and its value was reset, or set back to default!
|
|
1119
|
-
|
|
1120
|
-
for (
|
|
1121
|
-
|
|
1122
|
-
|
|
1086
|
+
const suspendedUpdates = view._suspendedUpdates;
|
|
1087
|
+
for (const propertyName in suspendedUpdates) {
|
|
1088
|
+
const property = suspendedUpdates[propertyName];
|
|
1089
|
+
const setNative = property.setNative;
|
|
1123
1090
|
if (view[setNative]) {
|
|
1124
|
-
|
|
1125
|
-
|
|
1091
|
+
const { getDefault, isStyleProperty, defaultValueKey, defaultValue } = property;
|
|
1092
|
+
let value;
|
|
1126
1093
|
if (isStyleProperty) {
|
|
1127
|
-
|
|
1094
|
+
const style = view.style;
|
|
1128
1095
|
if (property.isSet(view.style)) {
|
|
1129
1096
|
if (!(defaultValueKey in style)) {
|
|
1130
1097
|
style[defaultValueKey] = view[getDefault] ? view[getDefault]() : defaultValue;
|
|
@@ -1152,47 +1119,44 @@ export function applyPendingNativeSetters(view) {
|
|
|
1152
1119
|
}
|
|
1153
1120
|
}
|
|
1154
1121
|
export function applyAllNativeSetters(view) {
|
|
1155
|
-
|
|
1156
|
-
for (
|
|
1157
|
-
|
|
1158
|
-
var property = symbolPropertyMap[symbol];
|
|
1122
|
+
let symbols = Object.getOwnPropertySymbols(view);
|
|
1123
|
+
for (const symbol of symbols) {
|
|
1124
|
+
const property = symbolPropertyMap[symbol];
|
|
1159
1125
|
if (!property) {
|
|
1160
1126
|
continue;
|
|
1161
1127
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1128
|
+
const setNative = property.setNative;
|
|
1129
|
+
const getDefault = property.getDefault;
|
|
1164
1130
|
if (setNative in view) {
|
|
1165
|
-
|
|
1131
|
+
const defaultValueKey = property.defaultValueKey;
|
|
1166
1132
|
if (!(defaultValueKey in view)) {
|
|
1167
1133
|
view[defaultValueKey] = view[getDefault] ? view[getDefault]() : property.defaultValue;
|
|
1168
1134
|
}
|
|
1169
|
-
|
|
1135
|
+
const value = view[symbol];
|
|
1170
1136
|
view[setNative](value);
|
|
1171
1137
|
}
|
|
1172
1138
|
}
|
|
1173
|
-
|
|
1139
|
+
const style = view.style;
|
|
1174
1140
|
symbols = Object.getOwnPropertySymbols(style);
|
|
1175
|
-
for (
|
|
1176
|
-
|
|
1177
|
-
var property = cssSymbolPropertyMap[symbol];
|
|
1141
|
+
for (const symbol of symbols) {
|
|
1142
|
+
const property = cssSymbolPropertyMap[symbol];
|
|
1178
1143
|
if (!property) {
|
|
1179
1144
|
continue;
|
|
1180
1145
|
}
|
|
1181
1146
|
if (view[property.setNative]) {
|
|
1182
|
-
|
|
1147
|
+
const defaultValueKey = property.defaultValueKey;
|
|
1183
1148
|
if (!(defaultValueKey in style)) {
|
|
1184
1149
|
style[defaultValueKey] = view[property.getDefault] ? view[property.getDefault]() : property.defaultValue;
|
|
1185
1150
|
}
|
|
1186
|
-
|
|
1151
|
+
const value = style[symbol];
|
|
1187
1152
|
view[property.setNative](value);
|
|
1188
1153
|
}
|
|
1189
1154
|
}
|
|
1190
1155
|
}
|
|
1191
1156
|
export function resetNativeView(view) {
|
|
1192
|
-
|
|
1193
|
-
for (
|
|
1194
|
-
|
|
1195
|
-
var property = symbolPropertyMap[symbol];
|
|
1157
|
+
let symbols = Object.getOwnPropertySymbols(view);
|
|
1158
|
+
for (const symbol of symbols) {
|
|
1159
|
+
const property = symbolPropertyMap[symbol];
|
|
1196
1160
|
if (!property) {
|
|
1197
1161
|
continue;
|
|
1198
1162
|
}
|
|
@@ -1206,11 +1170,10 @@ export function resetNativeView(view) {
|
|
|
1206
1170
|
}
|
|
1207
1171
|
}
|
|
1208
1172
|
}
|
|
1209
|
-
|
|
1173
|
+
const style = view.style;
|
|
1210
1174
|
symbols = Object.getOwnPropertySymbols(style);
|
|
1211
|
-
for (
|
|
1212
|
-
|
|
1213
|
-
var property = cssSymbolPropertyMap[symbol];
|
|
1175
|
+
for (const symbol of symbols) {
|
|
1176
|
+
const property = cssSymbolPropertyMap[symbol];
|
|
1214
1177
|
if (!property) {
|
|
1215
1178
|
continue;
|
|
1216
1179
|
}
|
|
@@ -1226,27 +1189,24 @@ export function resetNativeView(view) {
|
|
|
1226
1189
|
}
|
|
1227
1190
|
}
|
|
1228
1191
|
export function clearInheritedProperties(view) {
|
|
1229
|
-
for (
|
|
1230
|
-
|
|
1231
|
-
var sourceKey = prop.sourceKey;
|
|
1192
|
+
for (const prop of inheritableProperties) {
|
|
1193
|
+
const sourceKey = prop.sourceKey;
|
|
1232
1194
|
if (view[sourceKey] === 1 /* ValueSource.Inherited */) {
|
|
1233
1195
|
prop.set.call(view, unsetValue);
|
|
1234
1196
|
}
|
|
1235
1197
|
}
|
|
1236
|
-
|
|
1237
|
-
for (
|
|
1238
|
-
|
|
1239
|
-
var sourceKey = prop.sourceKey;
|
|
1198
|
+
const style = view.style;
|
|
1199
|
+
for (const prop of inheritableCssProperties) {
|
|
1200
|
+
const sourceKey = prop.sourceKey;
|
|
1240
1201
|
if (style[sourceKey] === 1 /* ValueSource.Inherited */) {
|
|
1241
1202
|
prop.setInheritedValue.call(style, unsetValue);
|
|
1242
1203
|
}
|
|
1243
1204
|
}
|
|
1244
1205
|
}
|
|
1245
1206
|
export function resetCSSProperties(style) {
|
|
1246
|
-
|
|
1247
|
-
for (
|
|
1248
|
-
|
|
1249
|
-
var cssProperty = void 0;
|
|
1207
|
+
const symbols = Object.getOwnPropertySymbols(style);
|
|
1208
|
+
for (const symbol of symbols) {
|
|
1209
|
+
let cssProperty;
|
|
1250
1210
|
if ((cssProperty = cssSymbolPropertyMap[symbol])) {
|
|
1251
1211
|
style[cssProperty.cssName] = unsetValue;
|
|
1252
1212
|
if (cssProperty instanceof CssAnimationProperty) {
|
|
@@ -1256,47 +1216,40 @@ export function resetCSSProperties(style) {
|
|
|
1256
1216
|
}
|
|
1257
1217
|
}
|
|
1258
1218
|
export function propagateInheritableProperties(view, child) {
|
|
1259
|
-
|
|
1260
|
-
for (
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
var currentValueSource = child[sourceKey] || 0 /* ValueSource.Default */;
|
|
1219
|
+
const inheritablePropertyValues = inheritablePropertyValuesOn(view);
|
|
1220
|
+
for (const pair of inheritablePropertyValues) {
|
|
1221
|
+
const prop = pair.property;
|
|
1222
|
+
const sourceKey = prop.sourceKey;
|
|
1223
|
+
const currentValueSource = child[sourceKey] || 0 /* ValueSource.Default */;
|
|
1265
1224
|
if (currentValueSource <= 1 /* ValueSource.Inherited */) {
|
|
1266
1225
|
prop.setInheritedValue.call(child, pair.value);
|
|
1267
1226
|
}
|
|
1268
1227
|
}
|
|
1269
1228
|
}
|
|
1270
1229
|
export function propagateInheritableCssProperties(parentStyle, childStyle) {
|
|
1271
|
-
|
|
1272
|
-
for (
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
var currentValueSource = childStyle[sourceKey] || 0 /* ValueSource.Default */;
|
|
1230
|
+
const inheritableCssPropertyValues = inheritableCssPropertyValuesOn(parentStyle);
|
|
1231
|
+
for (const pair of inheritableCssPropertyValues) {
|
|
1232
|
+
const prop = pair.property;
|
|
1233
|
+
const sourceKey = prop.sourceKey;
|
|
1234
|
+
const currentValueSource = childStyle[sourceKey] || 0 /* ValueSource.Default */;
|
|
1277
1235
|
if (currentValueSource <= 1 /* ValueSource.Inherited */) {
|
|
1278
1236
|
prop.setInheritedValue.call(childStyle, pair.value, 1 /* ValueSource.Inherited */);
|
|
1279
1237
|
}
|
|
1280
1238
|
}
|
|
1281
1239
|
}
|
|
1282
|
-
export function makeValidator() {
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
values[_i] = arguments[_i];
|
|
1286
|
-
}
|
|
1287
|
-
var set = new Set(values);
|
|
1288
|
-
return function (value) { return set.has(value); };
|
|
1240
|
+
export function makeValidator(...values) {
|
|
1241
|
+
const set = new Set(values);
|
|
1242
|
+
return (value) => set.has(value);
|
|
1289
1243
|
}
|
|
1290
|
-
export function makeParser(isValid, allowNumbers) {
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
var lower = value && value.toLowerCase();
|
|
1244
|
+
export function makeParser(isValid, allowNumbers = false) {
|
|
1245
|
+
return (value) => {
|
|
1246
|
+
const lower = value && value.toLowerCase();
|
|
1294
1247
|
if (isValid(lower)) {
|
|
1295
1248
|
return lower;
|
|
1296
1249
|
}
|
|
1297
1250
|
else {
|
|
1298
1251
|
if (allowNumbers) {
|
|
1299
|
-
|
|
1252
|
+
const convNumber = +value;
|
|
1300
1253
|
if (!isNaN(convNumber)) {
|
|
1301
1254
|
return value;
|
|
1302
1255
|
}
|
|
@@ -1306,27 +1259,25 @@ export function makeParser(isValid, allowNumbers) {
|
|
|
1306
1259
|
};
|
|
1307
1260
|
}
|
|
1308
1261
|
export function getSetProperties(view) {
|
|
1309
|
-
|
|
1310
|
-
Object.getOwnPropertyNames(view).forEach(
|
|
1262
|
+
const result = [];
|
|
1263
|
+
Object.getOwnPropertyNames(view).forEach((prop) => {
|
|
1311
1264
|
result.push([prop, view[prop]]);
|
|
1312
1265
|
});
|
|
1313
|
-
|
|
1314
|
-
for (
|
|
1315
|
-
|
|
1316
|
-
var property = symbolPropertyMap[symbol];
|
|
1266
|
+
const symbols = Object.getOwnPropertySymbols(view);
|
|
1267
|
+
for (const symbol of symbols) {
|
|
1268
|
+
const property = symbolPropertyMap[symbol];
|
|
1317
1269
|
if (!property) {
|
|
1318
1270
|
continue;
|
|
1319
1271
|
}
|
|
1320
|
-
|
|
1272
|
+
const value = view[property.key];
|
|
1321
1273
|
result.push([property.name, value]);
|
|
1322
1274
|
}
|
|
1323
1275
|
return result;
|
|
1324
1276
|
}
|
|
1325
1277
|
export function getComputedCssValues(view) {
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
for (
|
|
1329
|
-
var prop = cssPropertyNames_1[_i];
|
|
1278
|
+
const result = [];
|
|
1279
|
+
const style = view.style;
|
|
1280
|
+
for (const prop of cssPropertyNames) {
|
|
1330
1281
|
result.push([prop, style[prop]]);
|
|
1331
1282
|
}
|
|
1332
1283
|
// Add these to enable box model in chrome-devtools styles tab
|