@symbiote-native/angular 0.8.0 → 2.0.0
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/README.md +13 -10
- package/babel-register-composed.cjs +58 -18
- package/bin/symbiote-angular-dev.cjs +16 -4
- package/build/angular/anchor-host-registry.js +1 -15
- package/build/angular/anchor-host-registry.js.map +1 -1
- package/build/angular/change-detection-flush.d.ts +31 -0
- package/build/angular/change-detection-flush.js +110 -0
- package/build/angular/change-detection-flush.js.map +1 -0
- package/build/angular/components/activity-indicator-props.d.ts +2 -0
- package/build/angular/components/activity-indicator-props.js +2 -0
- package/build/angular/components/activity-indicator-props.js.map +1 -0
- package/build/angular/components/button-props.d.ts +2 -0
- package/build/angular/components/button-props.js +2 -0
- package/build/angular/components/button-props.js.map +1 -0
- package/build/angular/components/flat-list/index.d.ts +2 -1
- package/build/angular/components/flat-list/index.js +22 -10
- package/build/angular/components/flat-list/index.js.map +1 -1
- package/build/angular/components/image-background-props.d.ts +6 -0
- package/build/angular/components/image-background-props.js +2 -0
- package/build/angular/components/image-background-props.js.map +1 -0
- package/build/angular/components/{image/shared.d.ts → image-shared.d.ts} +4 -4
- package/build/angular/components/{image/shared.js → image-shared.js} +39 -28
- package/build/angular/components/image-shared.js.map +1 -0
- package/build/angular/components/input-accessory-view-props.d.ts +7 -0
- package/build/angular/components/input-accessory-view-props.js +9 -0
- package/build/angular/components/input-accessory-view-props.js.map +1 -0
- package/build/angular/components/keyboard-avoiding-view/index.d.ts +2 -1
- package/build/angular/components/keyboard-avoiding-view/index.js +28 -27
- package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -1
- package/build/angular/components/modal/index.d.ts +2 -0
- package/build/angular/components/modal/index.js +33 -20
- package/build/angular/components/modal/index.js.map +1 -1
- package/build/angular/components/pressable-props.d.ts +32 -0
- package/build/angular/components/pressable-props.js +11 -0
- package/build/angular/components/pressable-props.js.map +1 -0
- package/build/angular/components/refresh-control-props.d.ts +16 -0
- package/build/angular/components/refresh-control-props.js +14 -0
- package/build/angular/components/refresh-control-props.js.map +1 -0
- package/build/angular/components/safe-area-view-props.d.ts +7 -0
- package/build/angular/components/safe-area-view-props.js +11 -0
- package/build/angular/components/safe-area-view-props.js.map +1 -0
- package/build/angular/components/scroll-view-props.d.ts +76 -0
- package/build/angular/components/scroll-view-props.js +18 -0
- package/build/angular/components/scroll-view-props.js.map +1 -0
- package/build/angular/components/section-list/index.d.ts +3 -0
- package/build/angular/components/section-list/index.js +10 -1
- package/build/angular/components/section-list/index.js.map +1 -1
- package/build/angular/components/text-input-props.d.ts +45 -0
- package/build/angular/components/text-input-props.js +18 -0
- package/build/angular/components/text-input-props.js.map +1 -0
- package/build/angular/components/touchable-native-feedback/touchable-native-feedback-props.d.ts +6 -0
- package/build/angular/components/touchable-native-feedback/touchable-native-feedback-props.js +2 -0
- package/build/angular/components/touchable-native-feedback/touchable-native-feedback-props.js.map +1 -0
- package/build/angular/components/touchable-props.d.ts +14 -0
- package/build/angular/components/touchable-props.js +13 -0
- package/build/angular/components/touchable-props.js.map +1 -0
- package/build/angular/components/touchable-without-feedback/touchable-without-feedback-props.d.ts +3 -0
- package/build/angular/components/touchable-without-feedback/touchable-without-feedback-props.js +2 -0
- package/build/angular/components/touchable-without-feedback/touchable-without-feedback-props.js.map +1 -0
- package/build/angular/components/virtualized-list/index.d.ts +8 -1
- package/build/angular/components/virtualized-list/index.js +373 -278
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/index.d.ts +3 -0
- package/build/angular/components/virtualized-section-list/index.js +10 -1
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/components.d.ts +21 -27
- package/build/angular/components.js +13 -15
- package/build/angular/components.js.map +1 -1
- package/build/angular/create-portal/index.d.ts +11 -2
- package/build/angular/create-portal/index.js +37 -11
- package/build/angular/create-portal/index.js.map +1 -1
- package/build/angular/create-tunnel/index.js +1 -1
- package/build/angular/element-props.d.ts +53 -0
- package/build/angular/element-props.js +2 -0
- package/build/angular/element-props.js.map +1 -0
- package/build/angular/elements.d.ts +528 -0
- package/build/angular/elements.js +1444 -0
- package/build/angular/elements.js.map +1 -0
- package/build/angular/gate-demand.d.ts +37 -0
- package/build/angular/gate-demand.js +84 -0
- package/build/angular/gate-demand.js.map +1 -0
- package/build/angular/host-instance/index.js +1 -1
- package/build/angular/index.d.ts +5 -2
- package/build/angular/index.js +16 -1
- package/build/angular/index.js.map +1 -1
- package/build/angular/modules/animated/create-animated-component.d.ts +6 -6
- package/build/angular/modules/animated/create-animated-component.js +73 -81
- package/build/angular/modules/animated/create-animated-component.js.map +1 -1
- package/build/angular/modules/animated/index.js +1 -1
- package/build/angular/modules/animated/index.js.map +1 -1
- package/build/angular/modules/image/index.d.ts +3 -0
- package/build/angular/modules/image/index.js +16 -0
- package/build/angular/modules/image/index.js.map +1 -0
- package/build/angular/primitives/index.d.ts +28 -16
- package/build/angular/primitives/index.js +77 -31
- package/build/angular/primitives/index.js.map +1 -1
- package/build/angular/primitives/shared.d.ts +2 -3
- package/build/angular/primitives/shared.js +8 -53
- package/build/angular/primitives/shared.js.map +1 -1
- package/build/angular/register.d.ts +1 -0
- package/build/angular/register.js +16 -0
- package/build/angular/register.js.map +1 -0
- package/build/angular/render/index.js +4 -2
- package/build/angular/render/index.js.map +1 -1
- package/build/angular/renderer/index.js +207 -60
- package/build/angular/renderer/index.js.map +1 -1
- package/build/angular/renderer/value-change.d.ts +2 -0
- package/build/angular/renderer/value-change.js +9 -0
- package/build/angular/renderer/value-change.js.map +1 -0
- package/metro-config.cjs +23 -5
- package/metro-css-parser.cjs +2 -1
- package/package.json +17 -7
- package/src/anchor-host-registry.ts +1 -15
- package/src/change-detection-flush.ts +120 -0
- package/src/components/activity-indicator-props.ts +21 -0
- package/src/components/button-props.ts +26 -0
- package/src/components/flat-list/index.ts +12 -4
- package/src/components/image-background-props.ts +24 -0
- package/src/components/{image/shared.ts → image-shared.ts} +57 -26
- package/src/components/input-accessory-view-props.ts +21 -0
- package/src/components/keyboard-avoiding-view/index.ts +27 -16
- package/src/components/modal/index.ts +32 -11
- package/src/components/pressable-props.ts +73 -0
- package/src/components/refresh-control-props.ts +43 -0
- package/src/components/safe-area-view-props.ts +28 -0
- package/src/components/scroll-view-props.ts +109 -0
- package/src/components/section-list/index.ts +18 -0
- package/src/components/text-input-props.ts +72 -0
- package/src/components/touchable-native-feedback/touchable-native-feedback-props.ts +23 -0
- package/src/components/touchable-props.ts +30 -0
- package/src/components/touchable-without-feedback/touchable-without-feedback-props.ts +21 -0
- package/src/components/virtualized-list/index.ts +254 -153
- package/src/components/virtualized-section-list/index.ts +18 -0
- package/src/components.ts +86 -35
- package/src/create-portal/index.ts +39 -9
- package/src/create-tunnel/index.ts +1 -1
- package/src/diagnostics.ts +1 -1
- package/src/element-props.ts +90 -0
- package/src/elements.ts +919 -0
- package/src/gate-demand.ts +109 -0
- package/src/host-instance/index.ts +1 -1
- package/src/index.ts +54 -15
- package/src/modules/animated/create-animated-component.ts +73 -59
- package/src/modules/animated/index.ts +1 -1
- package/src/modules/image/index.ts +18 -0
- package/src/primitives/index.ts +47 -16
- package/src/primitives/shared.ts +11 -44
- package/src/register.ts +15 -0
- package/src/render/index.ts +4 -2
- package/src/renderer/index.ts +239 -80
- package/src/renderer/value-change.ts +8 -0
- package/build/angular/components/activity-indicator/index.android.d.ts +0 -13
- package/build/angular/components/activity-indicator/index.android.js +0 -29
- package/build/angular/components/activity-indicator/index.android.js.map +0 -1
- package/build/angular/components/activity-indicator/index.d.ts +0 -1
- package/build/angular/components/activity-indicator/index.ios.d.ts +0 -9
- package/build/angular/components/activity-indicator/index.ios.js +0 -26
- package/build/angular/components/activity-indicator/index.ios.js.map +0 -1
- package/build/angular/components/activity-indicator/index.js +0 -4
- package/build/angular/components/activity-indicator/index.js.map +0 -1
- package/build/angular/components/activity-indicator/shared.d.ts +0 -67
- package/build/angular/components/activity-indicator/shared.js +0 -260
- package/build/angular/components/activity-indicator/shared.js.map +0 -1
- package/build/angular/components/button.d.ts +0 -65
- package/build/angular/components/button.js +0 -351
- package/build/angular/components/button.js.map +0 -1
- package/build/angular/components/image/index.android.d.ts +0 -15
- package/build/angular/components/image/index.android.js +0 -91
- package/build/angular/components/image/index.android.js.map +0 -1
- package/build/angular/components/image/index.d.ts +0 -1
- package/build/angular/components/image/index.ios.d.ts +0 -15
- package/build/angular/components/image/index.ios.js +0 -91
- package/build/angular/components/image/index.ios.js.map +0 -1
- package/build/angular/components/image/index.js +0 -3
- package/build/angular/components/image/index.js.map +0 -1
- package/build/angular/components/image/shared.js.map +0 -1
- package/build/angular/components/image-background.d.ts +0 -82
- package/build/angular/components/image-background.js +0 -434
- package/build/angular/components/image-background.js.map +0 -1
- package/build/angular/components/input-accessory-view/index.d.ts +0 -65
- package/build/angular/components/input-accessory-view/index.js +0 -290
- package/build/angular/components/input-accessory-view/index.js.map +0 -1
- package/build/angular/components/pressable/index.d.ts +0 -129
- package/build/angular/components/pressable/index.js +0 -473
- package/build/angular/components/pressable/index.js.map +0 -1
- package/build/angular/components/refresh-control/index.d.ts +0 -90
- package/build/angular/components/refresh-control/index.js +0 -380
- package/build/angular/components/refresh-control/index.js.map +0 -1
- package/build/angular/components/safe-area-view/index.d.ts +0 -62
- package/build/angular/components/safe-area-view/index.js +0 -287
- package/build/angular/components/safe-area-view/index.js.map +0 -1
- package/build/angular/components/scroll-view/index.android.d.ts +0 -20
- package/build/angular/components/scroll-view/index.android.js +0 -262
- package/build/angular/components/scroll-view/index.android.js.map +0 -1
- package/build/angular/components/scroll-view/index.d.ts +0 -3
- package/build/angular/components/scroll-view/index.ios.d.ts +0 -8
- package/build/angular/components/scroll-view/index.ios.js +0 -92
- package/build/angular/components/scroll-view/index.ios.js.map +0 -1
- package/build/angular/components/scroll-view/index.js +0 -6
- package/build/angular/components/scroll-view/index.js.map +0 -1
- package/build/angular/components/scroll-view/projection.d.ts +0 -67
- package/build/angular/components/scroll-view/projection.js +0 -560
- package/build/angular/components/scroll-view/projection.js.map +0 -1
- package/build/angular/components/scroll-view/shared.d.ts +0 -239
- package/build/angular/components/scroll-view/shared.js +0 -832
- package/build/angular/components/scroll-view/shared.js.map +0 -1
- package/build/angular/components/scroll-view/sticky-header.d.ts +0 -40
- package/build/angular/components/scroll-view/sticky-header.js +0 -224
- package/build/angular/components/scroll-view/sticky-header.js.map +0 -1
- package/build/angular/components/switch/index.android.d.ts +0 -24
- package/build/angular/components/switch/index.android.js +0 -112
- package/build/angular/components/switch/index.android.js.map +0 -1
- package/build/angular/components/switch/index.d.ts +0 -1
- package/build/angular/components/switch/index.ios.d.ts +0 -23
- package/build/angular/components/switch/index.ios.js +0 -111
- package/build/angular/components/switch/index.ios.js.map +0 -1
- package/build/angular/components/switch/index.js +0 -4
- package/build/angular/components/switch/index.js.map +0 -1
- package/build/angular/components/switch/shared.d.ts +0 -49
- package/build/angular/components/switch/shared.js +0 -191
- package/build/angular/components/switch/shared.js.map +0 -1
- package/build/angular/components/text-input.d.ts +0 -161
- package/build/angular/components/text-input.js +0 -659
- package/build/angular/components/text-input.js.map +0 -1
- package/build/angular/components/touchable/index.d.ts +0 -276
- package/build/angular/components/touchable/index.js +0 -1422
- package/build/angular/components/touchable/index.js.map +0 -1
- package/build/angular/components/touchable-native-feedback/index.d.ts +0 -86
- package/build/angular/components/touchable-native-feedback/index.js +0 -407
- package/build/angular/components/touchable-native-feedback/index.js.map +0 -1
- package/src/components/activity-indicator/index.android.ts +0 -23
- package/src/components/activity-indicator/index.ios.ts +0 -21
- package/src/components/activity-indicator/index.ts +0 -4
- package/src/components/activity-indicator/shared.ts +0 -225
- package/src/components/button.ts +0 -220
- package/src/components/image/index.android.ts +0 -99
- package/src/components/image/index.ios.ts +0 -99
- package/src/components/image/index.ts +0 -3
- package/src/components/image-background.ts +0 -290
- package/src/components/input-accessory-view/index.ts +0 -240
- package/src/components/pressable/index.ts +0 -462
- package/src/components/refresh-control/index.ts +0 -340
- package/src/components/safe-area-view/index.ts +0 -231
- package/src/components/scroll-view/index.android.ts +0 -205
- package/src/components/scroll-view/index.ios.ts +0 -81
- package/src/components/scroll-view/index.ts +0 -7
- package/src/components/scroll-view/projection.ts +0 -713
- package/src/components/scroll-view/shared.ts +0 -1066
- package/src/components/scroll-view/sticky-header.ts +0 -267
- package/src/components/switch/index.android.ts +0 -113
- package/src/components/switch/index.ios.ts +0 -112
- package/src/components/switch/index.ts +0 -4
- package/src/components/switch/shared.ts +0 -284
- package/src/components/text-input.ts +0 -613
- package/src/components/touchable/index.ts +0 -913
- package/src/components/touchable-native-feedback/index.ts +0 -317
|
@@ -0,0 +1,1444 @@
|
|
|
1
|
+
// One `@Directive` per intrinsic tag, so an app can hand-write `<view>` / `<text>` /
|
|
2
|
+
// `<text-input>` in an ordinary Angular template and have ngtsc check it.
|
|
3
|
+
//
|
|
4
|
+
// WHY A DIRECTIVE AND NOT A SCHEMA. `CUSTOM_ELEMENTS_SCHEMA` admits an unknown element only when
|
|
5
|
+
// the name is a valid CUSTOM ELEMENT name, and the HTML spec requires a HYPHEN — so half our tag
|
|
6
|
+
// alphabet (`view`, `text`, `image`, `switch`, `modal`, `pressable`) is NG8001 under it.
|
|
7
|
+
// `NO_ERRORS_SCHEMA` compiles them at the cost of every element and property check in the app.
|
|
8
|
+
// A matching directive makes the element known with NO schema, and gives strictly MORE than either
|
|
9
|
+
// schema ever could: both schemas return `true` for every property on a tag they admit
|
|
10
|
+
// (`dom_element_schema_registry.ts:407`, "we don't know which properties a custom element will
|
|
11
|
+
// get"), while a declared input has a TYPE. Measured in `bare-intrinsic-tag-aot.test.ts`.
|
|
12
|
+
//
|
|
13
|
+
// WHY EVERY BOUND PROP MUST BE DECLARED HERE. Matching a directive turns every binding on the tag
|
|
14
|
+
// into an input lookup, so a prop this file does not declare is `Can't bind to 'x'` — the cost of
|
|
15
|
+
// the route, and the reason the surface below is exhaustive rather than convenient.
|
|
16
|
+
//
|
|
17
|
+
// WHY THE PROPS ARE FIELDS AND NOT A DERIVED NAME LIST. `@Directive({ inputs: [...SHARED] })`
|
|
18
|
+
// compiles fine against a shared const array (measured; `@Directive.inputs` is a mutable-array
|
|
19
|
+
// type, so a `readonly`/`as const` array must be spread), and it would have made this file
|
|
20
|
+
// nineteen one-liners. It also makes every such input UNTYPED: ngtsc reads an input's type from a
|
|
21
|
+
// real class-member declaration node, and a merged `interface X extends IProps {}` — which does
|
|
22
|
+
// put the property on the class's TYPE — leaves `<view [testID]="42">` compiling clean. Since the
|
|
23
|
+
// type check is the whole reason to prefer this route over `NO_ERRORS_SCHEMA`, the names are
|
|
24
|
+
// fields. What is derived is each field's TYPE, indexed off the shared prop interface, so a type
|
|
25
|
+
// that changes upstream cannot drift here.
|
|
26
|
+
//
|
|
27
|
+
// EVENTS ARE NOT DECLARED. `(press)` / `(layout)` on a tag a directive matches still compiles and
|
|
28
|
+
// still reaches `Renderer2.listen` -> the engine; an `@Output` would CONSUME the binding the same
|
|
29
|
+
// way an `@Input` consumes a prop. Measured both halves — see `elements.test.ts`. The cost is that
|
|
30
|
+
// `$event` types as the DOM `Event` there, since ngtsc falls back to the DOM schema for an event no
|
|
31
|
+
// directive claims; the typed spelling of the same handler is the flat-bag `@Input` beside it
|
|
32
|
+
// (`[onPressMove]="fn"`, where `fn` keeps its `ISymbioteEvent` parameter).
|
|
33
|
+
//
|
|
34
|
+
// `valueChange` is the ONE exception, and it is forced rather than chosen: see ValueChangeElement.
|
|
35
|
+
import { ChangeDetectorRef, Directive, ElementRef, EventEmitter, Input, Output, Renderer2, forwardRef, inject, } from '@angular/core';
|
|
36
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
37
|
+
import { VALUE_CHANGE_EVENT } from './renderer/value-change';
|
|
38
|
+
import { createCallbackWrapper, registerViewFlush, unregisterViewFlush, } from './change-detection-flush';
|
|
39
|
+
import * as i0 from "@angular/core";
|
|
40
|
+
/**
|
|
41
|
+
* The shared half of every element directive: the prop surface all tags accept, and the ONE
|
|
42
|
+
* generic forward that puts a claimed binding back on the engine node.
|
|
43
|
+
*
|
|
44
|
+
* The forward is the deciding fact of this whole route. A binding claimed by a directive input
|
|
45
|
+
* never reaches `Renderer2.setProperty` on its own — Angular writes it to the directive instance
|
|
46
|
+
* — so without this loop a bare tag commits nothing at all. It stays generic on purpose: per-prop
|
|
47
|
+
* forwarding code is a component wrapper by another name, which is what this migration removes.
|
|
48
|
+
* `renderer.setProperty` lands in the adapter's own renderer, which routes the value through the
|
|
49
|
+
* engine's `routeProp` and applies the `id` -> `nativeID` and `symbioteStyle` -> `style` aliases.
|
|
50
|
+
*/
|
|
51
|
+
export class SymbioteElement {
|
|
52
|
+
renderer = inject(Renderer2);
|
|
53
|
+
host = inject(ElementRef);
|
|
54
|
+
detector = inject(ChangeDetectorRef);
|
|
55
|
+
// An `onX` PROP is called by the engine, so Angular is never told it fired. Shared with the
|
|
56
|
+
// component path's `SymbioteHostPropsDirective`, which has the identical deficit — see
|
|
57
|
+
// `createCallbackWrapper`.
|
|
58
|
+
wrapCallback = createCallbackWrapper(this.detector, this.host.nativeElement);
|
|
59
|
+
testID;
|
|
60
|
+
nativeID;
|
|
61
|
+
id;
|
|
62
|
+
accessible;
|
|
63
|
+
accessibilityLabel;
|
|
64
|
+
accessibilityHint;
|
|
65
|
+
accessibilityRole;
|
|
66
|
+
accessibilityState;
|
|
67
|
+
accessibilityValue;
|
|
68
|
+
accessibilityActions;
|
|
69
|
+
accessibilityLabelledBy;
|
|
70
|
+
importantForAccessibility;
|
|
71
|
+
accessibilityLiveRegion;
|
|
72
|
+
screenReaderFocusable;
|
|
73
|
+
accessibilityViewIsModal;
|
|
74
|
+
accessibilityElementsHidden;
|
|
75
|
+
accessibilityIgnoresInvertColors;
|
|
76
|
+
accessibilityLanguage;
|
|
77
|
+
accessibilityRespondsToUserInteraction;
|
|
78
|
+
accessibilityShowsLargeContentViewer;
|
|
79
|
+
accessibilityLargeContentTitle;
|
|
80
|
+
onAccessibilityAction;
|
|
81
|
+
onAccessibilityTap;
|
|
82
|
+
onMagicTap;
|
|
83
|
+
onAccessibilityEscape;
|
|
84
|
+
// The web aliases. Native reads only `accessibility*`; the engine folds these on the way in.
|
|
85
|
+
role;
|
|
86
|
+
'aria-label';
|
|
87
|
+
'aria-labelledby';
|
|
88
|
+
'aria-live';
|
|
89
|
+
'aria-hidden';
|
|
90
|
+
'aria-busy';
|
|
91
|
+
'aria-checked';
|
|
92
|
+
'aria-disabled';
|
|
93
|
+
'aria-expanded';
|
|
94
|
+
'aria-selected';
|
|
95
|
+
'aria-modal';
|
|
96
|
+
'aria-valuemax';
|
|
97
|
+
'aria-valuemin';
|
|
98
|
+
'aria-valuenow';
|
|
99
|
+
'aria-valuetext';
|
|
100
|
+
// The responder gates return a boolean, which an Angular `(event)` binding cannot carry back to
|
|
101
|
+
// the caller — so the whole family is inputs, never outputs.
|
|
102
|
+
onStartShouldSetResponder;
|
|
103
|
+
onStartShouldSetResponderCapture;
|
|
104
|
+
onMoveShouldSetResponder;
|
|
105
|
+
onMoveShouldSetResponderCapture;
|
|
106
|
+
onResponderGrant;
|
|
107
|
+
onResponderReject;
|
|
108
|
+
onResponderStart;
|
|
109
|
+
onResponderMove;
|
|
110
|
+
onResponderEnd;
|
|
111
|
+
onResponderRelease;
|
|
112
|
+
onResponderTerminate;
|
|
113
|
+
onResponderTerminationRequest;
|
|
114
|
+
pointerEvents;
|
|
115
|
+
hitSlop;
|
|
116
|
+
focusable;
|
|
117
|
+
collapsable;
|
|
118
|
+
removeClippedSubviews;
|
|
119
|
+
renderToHardwareTextureAndroid;
|
|
120
|
+
shouldRasterizeIOS;
|
|
121
|
+
needsOffscreenAlphaCompositing;
|
|
122
|
+
symbioteStyle;
|
|
123
|
+
// Declared, and the reason is the one `element-props.ts` used to give for NOT declaring it —
|
|
124
|
+
// reversed by measurement. `[style]` on an element with no directive input reaches Angular's own
|
|
125
|
+
// CSS styling engine (`ɵɵstyleMap`), which cannot represent an RN StyleProp: an ARRAY decomposes
|
|
126
|
+
// into numeric-index keys and a FUNCTION — the press-state callback this ecosystem writes — dies
|
|
127
|
+
// in `toStylingKeyValueArray` as "ASSERTION ERROR: Unsupported styling type: function", taking
|
|
128
|
+
// the whole enclosing template update with it. Device-reported 2026-09-11: every `ActionButton`
|
|
129
|
+
// in examples/angular painted as an empty bordered box, because the throw aborted the update
|
|
130
|
+
// before its `<text>` child was ever reached.
|
|
131
|
+
//
|
|
132
|
+
// A declared input CLAIMS the binding at compile time, so it never reaches the styling engine —
|
|
133
|
+
// the same mechanism the primitive host COMPONENTS have always relied on
|
|
134
|
+
// (`primitives/shared.ts`), which is why `<Pressable [style]>` worked and its replacement tag did
|
|
135
|
+
// not. `[style.borderWidth.px]` is a different instruction (`ɵɵstyleProp`) and is untouched: it
|
|
136
|
+
// still reaches `Renderer2.setStyle`, which merges per key.
|
|
137
|
+
//
|
|
138
|
+
// The press-state callback rides the BASE type rather than `PressableElement` alone: a subclass
|
|
139
|
+
// cannot widen an inherited property, and only the pressables have a `pressed` to read — so on
|
|
140
|
+
// any other tag the engine resolves it at `pressed: false` and the looseness is in the type, not
|
|
141
|
+
// in what commits.
|
|
142
|
+
style;
|
|
143
|
+
// The flat-bag spelling of the events below. `(press)` and `[onPress]` are both supported and
|
|
144
|
+
// land in the same place; an app that already holds a handler bag binds the props.
|
|
145
|
+
onPress;
|
|
146
|
+
onPressIn;
|
|
147
|
+
onPressOut;
|
|
148
|
+
onPressMove;
|
|
149
|
+
onLongPress;
|
|
150
|
+
onLayout;
|
|
151
|
+
onFocus;
|
|
152
|
+
onBlur;
|
|
153
|
+
ngOnChanges(changes) {
|
|
154
|
+
for (const name of Object.keys(changes)) {
|
|
155
|
+
this.renderer.setProperty(this.host.nativeElement, name, this.wrapCallback(name, changes[name]?.currentValue));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SymbioteElement, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
159
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SymbioteElement, isStandalone: true, inputs: { testID: "testID", nativeID: "nativeID", id: "id", accessible: "accessible", accessibilityLabel: "accessibilityLabel", accessibilityHint: "accessibilityHint", accessibilityRole: "accessibilityRole", accessibilityState: "accessibilityState", accessibilityValue: "accessibilityValue", accessibilityActions: "accessibilityActions", accessibilityLabelledBy: "accessibilityLabelledBy", importantForAccessibility: "importantForAccessibility", accessibilityLiveRegion: "accessibilityLiveRegion", screenReaderFocusable: "screenReaderFocusable", accessibilityViewIsModal: "accessibilityViewIsModal", accessibilityElementsHidden: "accessibilityElementsHidden", accessibilityIgnoresInvertColors: "accessibilityIgnoresInvertColors", accessibilityLanguage: "accessibilityLanguage", accessibilityRespondsToUserInteraction: "accessibilityRespondsToUserInteraction", accessibilityShowsLargeContentViewer: "accessibilityShowsLargeContentViewer", accessibilityLargeContentTitle: "accessibilityLargeContentTitle", onAccessibilityAction: "onAccessibilityAction", onAccessibilityTap: "onAccessibilityTap", onMagicTap: "onMagicTap", onAccessibilityEscape: "onAccessibilityEscape", role: "role", "aria-label": "aria-label", "aria-labelledby": "aria-labelledby", "aria-live": "aria-live", "aria-hidden": "aria-hidden", "aria-busy": "aria-busy", "aria-checked": "aria-checked", "aria-disabled": "aria-disabled", "aria-expanded": "aria-expanded", "aria-selected": "aria-selected", "aria-modal": "aria-modal", "aria-valuemax": "aria-valuemax", "aria-valuemin": "aria-valuemin", "aria-valuenow": "aria-valuenow", "aria-valuetext": "aria-valuetext", onStartShouldSetResponder: "onStartShouldSetResponder", onStartShouldSetResponderCapture: "onStartShouldSetResponderCapture", onMoveShouldSetResponder: "onMoveShouldSetResponder", onMoveShouldSetResponderCapture: "onMoveShouldSetResponderCapture", onResponderGrant: "onResponderGrant", onResponderReject: "onResponderReject", onResponderStart: "onResponderStart", onResponderMove: "onResponderMove", onResponderEnd: "onResponderEnd", onResponderRelease: "onResponderRelease", onResponderTerminate: "onResponderTerminate", onResponderTerminationRequest: "onResponderTerminationRequest", pointerEvents: "pointerEvents", hitSlop: "hitSlop", focusable: "focusable", collapsable: "collapsable", removeClippedSubviews: "removeClippedSubviews", renderToHardwareTextureAndroid: "renderToHardwareTextureAndroid", shouldRasterizeIOS: "shouldRasterizeIOS", needsOffscreenAlphaCompositing: "needsOffscreenAlphaCompositing", symbioteStyle: "symbioteStyle", style: "style", onPress: "onPress", onPressIn: "onPressIn", onPressOut: "onPressOut", onPressMove: "onPressMove", onLongPress: "onLongPress", onLayout: "onLayout", onFocus: "onFocus", onBlur: "onBlur" }, usesOnChanges: true, ngImport: i0 });
|
|
160
|
+
}
|
|
161
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SymbioteElement, decorators: [{
|
|
162
|
+
type: Directive
|
|
163
|
+
}], propDecorators: { testID: [{
|
|
164
|
+
type: Input
|
|
165
|
+
}], nativeID: [{
|
|
166
|
+
type: Input
|
|
167
|
+
}], id: [{
|
|
168
|
+
type: Input
|
|
169
|
+
}], accessible: [{
|
|
170
|
+
type: Input
|
|
171
|
+
}], accessibilityLabel: [{
|
|
172
|
+
type: Input
|
|
173
|
+
}], accessibilityHint: [{
|
|
174
|
+
type: Input
|
|
175
|
+
}], accessibilityRole: [{
|
|
176
|
+
type: Input
|
|
177
|
+
}], accessibilityState: [{
|
|
178
|
+
type: Input
|
|
179
|
+
}], accessibilityValue: [{
|
|
180
|
+
type: Input
|
|
181
|
+
}], accessibilityActions: [{
|
|
182
|
+
type: Input
|
|
183
|
+
}], accessibilityLabelledBy: [{
|
|
184
|
+
type: Input
|
|
185
|
+
}], importantForAccessibility: [{
|
|
186
|
+
type: Input
|
|
187
|
+
}], accessibilityLiveRegion: [{
|
|
188
|
+
type: Input
|
|
189
|
+
}], screenReaderFocusable: [{
|
|
190
|
+
type: Input
|
|
191
|
+
}], accessibilityViewIsModal: [{
|
|
192
|
+
type: Input
|
|
193
|
+
}], accessibilityElementsHidden: [{
|
|
194
|
+
type: Input
|
|
195
|
+
}], accessibilityIgnoresInvertColors: [{
|
|
196
|
+
type: Input
|
|
197
|
+
}], accessibilityLanguage: [{
|
|
198
|
+
type: Input
|
|
199
|
+
}], accessibilityRespondsToUserInteraction: [{
|
|
200
|
+
type: Input
|
|
201
|
+
}], accessibilityShowsLargeContentViewer: [{
|
|
202
|
+
type: Input
|
|
203
|
+
}], accessibilityLargeContentTitle: [{
|
|
204
|
+
type: Input
|
|
205
|
+
}], onAccessibilityAction: [{
|
|
206
|
+
type: Input
|
|
207
|
+
}], onAccessibilityTap: [{
|
|
208
|
+
type: Input
|
|
209
|
+
}], onMagicTap: [{
|
|
210
|
+
type: Input
|
|
211
|
+
}], onAccessibilityEscape: [{
|
|
212
|
+
type: Input
|
|
213
|
+
}], role: [{
|
|
214
|
+
type: Input
|
|
215
|
+
}], "aria-label": [{
|
|
216
|
+
type: Input
|
|
217
|
+
}], "aria-labelledby": [{
|
|
218
|
+
type: Input
|
|
219
|
+
}], "aria-live": [{
|
|
220
|
+
type: Input
|
|
221
|
+
}], "aria-hidden": [{
|
|
222
|
+
type: Input
|
|
223
|
+
}], "aria-busy": [{
|
|
224
|
+
type: Input
|
|
225
|
+
}], "aria-checked": [{
|
|
226
|
+
type: Input
|
|
227
|
+
}], "aria-disabled": [{
|
|
228
|
+
type: Input
|
|
229
|
+
}], "aria-expanded": [{
|
|
230
|
+
type: Input
|
|
231
|
+
}], "aria-selected": [{
|
|
232
|
+
type: Input
|
|
233
|
+
}], "aria-modal": [{
|
|
234
|
+
type: Input
|
|
235
|
+
}], "aria-valuemax": [{
|
|
236
|
+
type: Input
|
|
237
|
+
}], "aria-valuemin": [{
|
|
238
|
+
type: Input
|
|
239
|
+
}], "aria-valuenow": [{
|
|
240
|
+
type: Input
|
|
241
|
+
}], "aria-valuetext": [{
|
|
242
|
+
type: Input
|
|
243
|
+
}], onStartShouldSetResponder: [{
|
|
244
|
+
type: Input
|
|
245
|
+
}], onStartShouldSetResponderCapture: [{
|
|
246
|
+
type: Input
|
|
247
|
+
}], onMoveShouldSetResponder: [{
|
|
248
|
+
type: Input
|
|
249
|
+
}], onMoveShouldSetResponderCapture: [{
|
|
250
|
+
type: Input
|
|
251
|
+
}], onResponderGrant: [{
|
|
252
|
+
type: Input
|
|
253
|
+
}], onResponderReject: [{
|
|
254
|
+
type: Input
|
|
255
|
+
}], onResponderStart: [{
|
|
256
|
+
type: Input
|
|
257
|
+
}], onResponderMove: [{
|
|
258
|
+
type: Input
|
|
259
|
+
}], onResponderEnd: [{
|
|
260
|
+
type: Input
|
|
261
|
+
}], onResponderRelease: [{
|
|
262
|
+
type: Input
|
|
263
|
+
}], onResponderTerminate: [{
|
|
264
|
+
type: Input
|
|
265
|
+
}], onResponderTerminationRequest: [{
|
|
266
|
+
type: Input
|
|
267
|
+
}], pointerEvents: [{
|
|
268
|
+
type: Input
|
|
269
|
+
}], hitSlop: [{
|
|
270
|
+
type: Input
|
|
271
|
+
}], focusable: [{
|
|
272
|
+
type: Input
|
|
273
|
+
}], collapsable: [{
|
|
274
|
+
type: Input
|
|
275
|
+
}], removeClippedSubviews: [{
|
|
276
|
+
type: Input
|
|
277
|
+
}], renderToHardwareTextureAndroid: [{
|
|
278
|
+
type: Input
|
|
279
|
+
}], shouldRasterizeIOS: [{
|
|
280
|
+
type: Input
|
|
281
|
+
}], needsOffscreenAlphaCompositing: [{
|
|
282
|
+
type: Input
|
|
283
|
+
}], symbioteStyle: [{
|
|
284
|
+
type: Input
|
|
285
|
+
}], style: [{
|
|
286
|
+
type: Input
|
|
287
|
+
}], onPress: [{
|
|
288
|
+
type: Input
|
|
289
|
+
}], onPressIn: [{
|
|
290
|
+
type: Input
|
|
291
|
+
}], onPressOut: [{
|
|
292
|
+
type: Input
|
|
293
|
+
}], onPressMove: [{
|
|
294
|
+
type: Input
|
|
295
|
+
}], onLongPress: [{
|
|
296
|
+
type: Input
|
|
297
|
+
}], onLayout: [{
|
|
298
|
+
type: Input
|
|
299
|
+
}], onFocus: [{
|
|
300
|
+
type: Input
|
|
301
|
+
}], onBlur: [{
|
|
302
|
+
type: Input
|
|
303
|
+
}] } });
|
|
304
|
+
/**
|
|
305
|
+
* The base for a tag whose app callback an engine behavior READS BACK inside the same microtask
|
|
306
|
+
* turn — `<text-input>`, `<switch>`, `<refresh-control>`. Zoneless change detection is a macrotask,
|
|
307
|
+
* so without this the behavior sees the PRE-event value and undoes the user; the full mechanism,
|
|
308
|
+
* and why this is `detectChanges()` on one view rather than `ApplicationRef.tick()`, is in
|
|
309
|
+
* `./change-detection-flush`.
|
|
310
|
+
*
|
|
311
|
+
* The directive is the only thing in the adapter that owns a `ChangeDetectorRef` for the view
|
|
312
|
+
* holding the binding, so it hands one to the renderer keyed on its own node.
|
|
313
|
+
*/
|
|
314
|
+
class ReadBackElement extends SymbioteElement {
|
|
315
|
+
constructor() {
|
|
316
|
+
super();
|
|
317
|
+
const node = this.host.nativeElement;
|
|
318
|
+
if (typeof node === 'object' && node !== null) {
|
|
319
|
+
registerViewFlush(node, () => this.detector.detectChanges());
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
ngOnDestroy() {
|
|
323
|
+
const node = this.host.nativeElement;
|
|
324
|
+
if (typeof node === 'object' && node !== null)
|
|
325
|
+
unregisterViewFlush(node);
|
|
326
|
+
}
|
|
327
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ReadBackElement, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
328
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ReadBackElement, isStandalone: true, usesInheritance: true, ngImport: i0 });
|
|
329
|
+
}
|
|
330
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ReadBackElement, decorators: [{
|
|
331
|
+
type: Directive
|
|
332
|
+
}], ctorParameters: () => [] });
|
|
333
|
+
export class ViewElement extends SymbioteElement {
|
|
334
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ViewElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
335
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ViewElement, isStandalone: true, selector: "view", usesInheritance: true, ngImport: i0 });
|
|
336
|
+
}
|
|
337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ViewElement, decorators: [{
|
|
338
|
+
type: Directive,
|
|
339
|
+
args: [{ selector: 'view', standalone: true }]
|
|
340
|
+
}] });
|
|
341
|
+
export class PressableElement extends SymbioteElement {
|
|
342
|
+
disabled;
|
|
343
|
+
cancelable;
|
|
344
|
+
delayLongPress;
|
|
345
|
+
delayHoverIn;
|
|
346
|
+
delayHoverOut;
|
|
347
|
+
onHoverIn;
|
|
348
|
+
onHoverOut;
|
|
349
|
+
pressRetentionOffset;
|
|
350
|
+
unstable_pressDelay;
|
|
351
|
+
android_ripple;
|
|
352
|
+
android_disableSound;
|
|
353
|
+
hasTVPreferredFocus;
|
|
354
|
+
nextFocusDown;
|
|
355
|
+
nextFocusForward;
|
|
356
|
+
nextFocusLeft;
|
|
357
|
+
nextFocusRight;
|
|
358
|
+
nextFocusUp;
|
|
359
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PressableElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
360
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: PressableElement, isStandalone: true, selector: "pressable", inputs: { disabled: "disabled", cancelable: "cancelable", delayLongPress: "delayLongPress", delayHoverIn: "delayHoverIn", delayHoverOut: "delayHoverOut", onHoverIn: "onHoverIn", onHoverOut: "onHoverOut", pressRetentionOffset: "pressRetentionOffset", unstable_pressDelay: "unstable_pressDelay", android_ripple: "android_ripple", android_disableSound: "android_disableSound", hasTVPreferredFocus: "hasTVPreferredFocus", nextFocusDown: "nextFocusDown", nextFocusForward: "nextFocusForward", nextFocusLeft: "nextFocusLeft", nextFocusRight: "nextFocusRight", nextFocusUp: "nextFocusUp" }, usesInheritance: true, ngImport: i0 });
|
|
361
|
+
}
|
|
362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: PressableElement, decorators: [{
|
|
363
|
+
type: Directive,
|
|
364
|
+
args: [{ selector: 'pressable', standalone: true }]
|
|
365
|
+
}], propDecorators: { disabled: [{
|
|
366
|
+
type: Input
|
|
367
|
+
}], cancelable: [{
|
|
368
|
+
type: Input
|
|
369
|
+
}], delayLongPress: [{
|
|
370
|
+
type: Input
|
|
371
|
+
}], delayHoverIn: [{
|
|
372
|
+
type: Input
|
|
373
|
+
}], delayHoverOut: [{
|
|
374
|
+
type: Input
|
|
375
|
+
}], onHoverIn: [{
|
|
376
|
+
type: Input
|
|
377
|
+
}], onHoverOut: [{
|
|
378
|
+
type: Input
|
|
379
|
+
}], pressRetentionOffset: [{
|
|
380
|
+
type: Input
|
|
381
|
+
}], unstable_pressDelay: [{
|
|
382
|
+
type: Input
|
|
383
|
+
}], android_ripple: [{
|
|
384
|
+
type: Input
|
|
385
|
+
}], android_disableSound: [{
|
|
386
|
+
type: Input
|
|
387
|
+
}], hasTVPreferredFocus: [{
|
|
388
|
+
type: Input
|
|
389
|
+
}], nextFocusDown: [{
|
|
390
|
+
type: Input
|
|
391
|
+
}], nextFocusForward: [{
|
|
392
|
+
type: Input
|
|
393
|
+
}], nextFocusLeft: [{
|
|
394
|
+
type: Input
|
|
395
|
+
}], nextFocusRight: [{
|
|
396
|
+
type: Input
|
|
397
|
+
}], nextFocusUp: [{
|
|
398
|
+
type: Input
|
|
399
|
+
}] } });
|
|
400
|
+
// RN's TouchableOpacity is a Pressable that also fades, and both halves are on the engine node —
|
|
401
|
+
// so it takes the same inputs and adds only the fade's own knob.
|
|
402
|
+
export class TouchableOpacityElement extends PressableElement {
|
|
403
|
+
activeOpacity;
|
|
404
|
+
delayPressIn;
|
|
405
|
+
delayPressOut;
|
|
406
|
+
minPressDuration;
|
|
407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TouchableOpacityElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
408
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: TouchableOpacityElement, isStandalone: true, selector: "touchable-opacity", inputs: { activeOpacity: "activeOpacity", delayPressIn: "delayPressIn", delayPressOut: "delayPressOut", minPressDuration: "minPressDuration" }, usesInheritance: true, ngImport: i0 });
|
|
409
|
+
}
|
|
410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TouchableOpacityElement, decorators: [{
|
|
411
|
+
type: Directive,
|
|
412
|
+
args: [{ selector: 'touchable-opacity', standalone: true }]
|
|
413
|
+
}], propDecorators: { activeOpacity: [{
|
|
414
|
+
type: Input
|
|
415
|
+
}], delayPressIn: [{
|
|
416
|
+
type: Input
|
|
417
|
+
}], delayPressOut: [{
|
|
418
|
+
type: Input
|
|
419
|
+
}], minPressDuration: [{
|
|
420
|
+
type: Input
|
|
421
|
+
}] } });
|
|
422
|
+
// RN's TouchableHighlight is a Pressable that swaps its own background while pressed
|
|
423
|
+
// (TouchableHighlight.js), and the underlay machine runs on the engine node — so the tag takes the
|
|
424
|
+
// press surface plus the two knobs that describe the underlay. `onShowUnderlay`/`onHideUnderlay`
|
|
425
|
+
// need no @Input: they are events, bound as `(showUnderlay)` through the renderer's own listen.
|
|
426
|
+
export class TouchableHighlightElement extends PressableElement {
|
|
427
|
+
activeOpacity;
|
|
428
|
+
underlayColor;
|
|
429
|
+
delayPressIn;
|
|
430
|
+
delayPressOut;
|
|
431
|
+
minPressDuration;
|
|
432
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TouchableHighlightElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
433
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: TouchableHighlightElement, isStandalone: true, selector: "touchable-highlight", inputs: { activeOpacity: "activeOpacity", underlayColor: "underlayColor", delayPressIn: "delayPressIn", delayPressOut: "delayPressOut", minPressDuration: "minPressDuration" }, usesInheritance: true, ngImport: i0 });
|
|
434
|
+
}
|
|
435
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TouchableHighlightElement, decorators: [{
|
|
436
|
+
type: Directive,
|
|
437
|
+
args: [{ selector: 'touchable-highlight', standalone: true }]
|
|
438
|
+
}], propDecorators: { activeOpacity: [{
|
|
439
|
+
type: Input
|
|
440
|
+
}], underlayColor: [{
|
|
441
|
+
type: Input
|
|
442
|
+
}], delayPressIn: [{
|
|
443
|
+
type: Input
|
|
444
|
+
}], delayPressOut: [{
|
|
445
|
+
type: Input
|
|
446
|
+
}], minPressDuration: [{
|
|
447
|
+
type: Input
|
|
448
|
+
}] } });
|
|
449
|
+
// RN's TouchableNativeFeedback is a Pressable that CLONES onto its single child instead of
|
|
450
|
+
// rendering anything (TouchableNativeFeedback.js:339) — so the tag takes the press surface plus the
|
|
451
|
+
// two props that pick the Android ripple drawable. The tag itself commits no native view; the
|
|
452
|
+
// behavior configures the child, which is why `elements.test.ts` reads it as an anchor.
|
|
453
|
+
export class TouchableNativeFeedbackElement extends PressableElement {
|
|
454
|
+
background;
|
|
455
|
+
useForeground;
|
|
456
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TouchableNativeFeedbackElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
457
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: TouchableNativeFeedbackElement, isStandalone: true, selector: "touchable-native-feedback", inputs: { background: "background", useForeground: "useForeground" }, usesInheritance: true, ngImport: i0 });
|
|
458
|
+
}
|
|
459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TouchableNativeFeedbackElement, decorators: [{
|
|
460
|
+
type: Directive,
|
|
461
|
+
args: [{ selector: 'touchable-native-feedback', standalone: true }]
|
|
462
|
+
}], propDecorators: { background: [{
|
|
463
|
+
type: Input
|
|
464
|
+
}], useForeground: [{
|
|
465
|
+
type: Input
|
|
466
|
+
}] } });
|
|
467
|
+
// RN's TouchableWithoutFeedback clones onto its single child the same way
|
|
468
|
+
// (TouchableWithoutFeedback.js:286) and installs no drawable, so it takes the press surface plus the
|
|
469
|
+
// three timing knobs it forwards to Pressability (:186-190) and nothing else. Like the tag above it
|
|
470
|
+
// commits no native view; `elements.test.ts` reads it as an anchor.
|
|
471
|
+
export class TouchableWithoutFeedbackElement extends PressableElement {
|
|
472
|
+
delayPressIn;
|
|
473
|
+
delayPressOut;
|
|
474
|
+
minPressDuration;
|
|
475
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TouchableWithoutFeedbackElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
476
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: TouchableWithoutFeedbackElement, isStandalone: true, selector: "touchable-without-feedback", inputs: { delayPressIn: "delayPressIn", delayPressOut: "delayPressOut", minPressDuration: "minPressDuration" }, usesInheritance: true, ngImport: i0 });
|
|
477
|
+
}
|
|
478
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TouchableWithoutFeedbackElement, decorators: [{
|
|
479
|
+
type: Directive,
|
|
480
|
+
args: [{ selector: 'touchable-without-feedback', standalone: true }]
|
|
481
|
+
}], propDecorators: { delayPressIn: [{
|
|
482
|
+
type: Input
|
|
483
|
+
}], delayPressOut: [{
|
|
484
|
+
type: Input
|
|
485
|
+
}], minPressDuration: [{
|
|
486
|
+
type: Input
|
|
487
|
+
}] } });
|
|
488
|
+
// RN's Button IS a TouchableOpacity (Button.js:384), and the behavior builds the view and the
|
|
489
|
+
// label under it — so the tag takes the touchable's surface plus the four props Button owns. There
|
|
490
|
+
// is no `style`: RN's Button has no such prop, and the label/background come from `color`.
|
|
491
|
+
export class ButtonElement extends TouchableOpacityElement {
|
|
492
|
+
title;
|
|
493
|
+
color;
|
|
494
|
+
touchSoundDisabled;
|
|
495
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ButtonElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
496
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ButtonElement, isStandalone: true, selector: "button", inputs: { title: "title", color: "color", touchSoundDisabled: "touchSoundDisabled" }, usesInheritance: true, ngImport: i0 });
|
|
497
|
+
}
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ButtonElement, decorators: [{
|
|
499
|
+
type: Directive,
|
|
500
|
+
args: [{ selector: 'button', standalone: true }]
|
|
501
|
+
}], propDecorators: { title: [{
|
|
502
|
+
type: Input
|
|
503
|
+
}], color: [{
|
|
504
|
+
type: Input
|
|
505
|
+
}], touchSoundDisabled: [{
|
|
506
|
+
type: Input
|
|
507
|
+
}] } });
|
|
508
|
+
export class TextElement extends SymbioteElement {
|
|
509
|
+
// Narrows the inherited input to a TEXT style so `fontSize`/`fontWeight` type-check here. The
|
|
510
|
+
// initializer is what TS2612 asks for to accept a redeclaration as deliberate; `declare` would
|
|
511
|
+
// be the other answer and cannot carry a decorator.
|
|
512
|
+
style = undefined;
|
|
513
|
+
numberOfLines;
|
|
514
|
+
ellipsizeMode;
|
|
515
|
+
selectable;
|
|
516
|
+
adjustsFontSizeToFit;
|
|
517
|
+
minimumFontScale;
|
|
518
|
+
allowFontScaling;
|
|
519
|
+
maxFontSizeMultiplier;
|
|
520
|
+
selectionColor;
|
|
521
|
+
disabled;
|
|
522
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TextElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
523
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: TextElement, isStandalone: true, selector: "text", inputs: { style: "style", numberOfLines: "numberOfLines", ellipsizeMode: "ellipsizeMode", selectable: "selectable", adjustsFontSizeToFit: "adjustsFontSizeToFit", minimumFontScale: "minimumFontScale", allowFontScaling: "allowFontScaling", maxFontSizeMultiplier: "maxFontSizeMultiplier", selectionColor: "selectionColor", disabled: "disabled" }, usesInheritance: true, ngImport: i0 });
|
|
524
|
+
}
|
|
525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TextElement, decorators: [{
|
|
526
|
+
type: Directive,
|
|
527
|
+
args: [{ selector: 'text', standalone: true }]
|
|
528
|
+
}], propDecorators: { style: [{
|
|
529
|
+
type: Input
|
|
530
|
+
}], numberOfLines: [{
|
|
531
|
+
type: Input
|
|
532
|
+
}], ellipsizeMode: [{
|
|
533
|
+
type: Input
|
|
534
|
+
}], selectable: [{
|
|
535
|
+
type: Input
|
|
536
|
+
}], adjustsFontSizeToFit: [{
|
|
537
|
+
type: Input
|
|
538
|
+
}], minimumFontScale: [{
|
|
539
|
+
type: Input
|
|
540
|
+
}], allowFontScaling: [{
|
|
541
|
+
type: Input
|
|
542
|
+
}], maxFontSizeMultiplier: [{
|
|
543
|
+
type: Input
|
|
544
|
+
}], selectionColor: [{
|
|
545
|
+
type: Input
|
|
546
|
+
}], disabled: [{
|
|
547
|
+
type: Input
|
|
548
|
+
}] } });
|
|
549
|
+
export class ImageElement extends SymbioteElement {
|
|
550
|
+
source;
|
|
551
|
+
src;
|
|
552
|
+
srcSet;
|
|
553
|
+
alt;
|
|
554
|
+
width;
|
|
555
|
+
height;
|
|
556
|
+
resizeMode;
|
|
557
|
+
resizeMethod;
|
|
558
|
+
defaultSource;
|
|
559
|
+
loadingIndicatorSource;
|
|
560
|
+
blurRadius;
|
|
561
|
+
capInsets;
|
|
562
|
+
crossOrigin;
|
|
563
|
+
referrerPolicy;
|
|
564
|
+
fadeDuration;
|
|
565
|
+
progressiveRenderingEnabled;
|
|
566
|
+
tintColor;
|
|
567
|
+
onLoad;
|
|
568
|
+
onLoadStart;
|
|
569
|
+
onLoadEnd;
|
|
570
|
+
onError;
|
|
571
|
+
onProgress;
|
|
572
|
+
onPartialLoad;
|
|
573
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ImageElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
574
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ImageElement, isStandalone: true, selector: "image", inputs: { source: "source", src: "src", srcSet: "srcSet", alt: "alt", width: "width", height: "height", resizeMode: "resizeMode", resizeMethod: "resizeMethod", defaultSource: "defaultSource", loadingIndicatorSource: "loadingIndicatorSource", blurRadius: "blurRadius", capInsets: "capInsets", crossOrigin: "crossOrigin", referrerPolicy: "referrerPolicy", fadeDuration: "fadeDuration", progressiveRenderingEnabled: "progressiveRenderingEnabled", tintColor: "tintColor", onLoad: "onLoad", onLoadStart: "onLoadStart", onLoadEnd: "onLoadEnd", onError: "onError", onProgress: "onProgress", onPartialLoad: "onPartialLoad" }, usesInheritance: true, ngImport: i0 });
|
|
575
|
+
}
|
|
576
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ImageElement, decorators: [{
|
|
577
|
+
type: Directive,
|
|
578
|
+
args: [{ selector: 'image', standalone: true }]
|
|
579
|
+
}], propDecorators: { source: [{
|
|
580
|
+
type: Input
|
|
581
|
+
}], src: [{
|
|
582
|
+
type: Input
|
|
583
|
+
}], srcSet: [{
|
|
584
|
+
type: Input
|
|
585
|
+
}], alt: [{
|
|
586
|
+
type: Input
|
|
587
|
+
}], width: [{
|
|
588
|
+
type: Input
|
|
589
|
+
}], height: [{
|
|
590
|
+
type: Input
|
|
591
|
+
}], resizeMode: [{
|
|
592
|
+
type: Input
|
|
593
|
+
}], resizeMethod: [{
|
|
594
|
+
type: Input
|
|
595
|
+
}], defaultSource: [{
|
|
596
|
+
type: Input
|
|
597
|
+
}], loadingIndicatorSource: [{
|
|
598
|
+
type: Input
|
|
599
|
+
}], blurRadius: [{
|
|
600
|
+
type: Input
|
|
601
|
+
}], capInsets: [{
|
|
602
|
+
type: Input
|
|
603
|
+
}], crossOrigin: [{
|
|
604
|
+
type: Input
|
|
605
|
+
}], referrerPolicy: [{
|
|
606
|
+
type: Input
|
|
607
|
+
}], fadeDuration: [{
|
|
608
|
+
type: Input
|
|
609
|
+
}], progressiveRenderingEnabled: [{
|
|
610
|
+
type: Input
|
|
611
|
+
}], tintColor: [{
|
|
612
|
+
type: Input
|
|
613
|
+
}], onLoad: [{
|
|
614
|
+
type: Input
|
|
615
|
+
}], onLoadStart: [{
|
|
616
|
+
type: Input
|
|
617
|
+
}], onLoadEnd: [{
|
|
618
|
+
type: Input
|
|
619
|
+
}], onError: [{
|
|
620
|
+
type: Input
|
|
621
|
+
}], onProgress: [{
|
|
622
|
+
type: Input
|
|
623
|
+
}], onPartialLoad: [{
|
|
624
|
+
type: Input
|
|
625
|
+
}] } });
|
|
626
|
+
// The box, not the image. Every Image prop below rides the engine's `slotPropsExcept` redirect onto
|
|
627
|
+
// the absolutely-filled image the behavior builds, exactly as RN's own `...props` spread does
|
|
628
|
+
// (ImageBackground.js:81) — so this directive declares them to make the BINDING legal, and the
|
|
629
|
+
// engine decides which node each lands on.
|
|
630
|
+
export class ImageBackgroundElement extends SymbioteElement {
|
|
631
|
+
imageStyle;
|
|
632
|
+
source;
|
|
633
|
+
src;
|
|
634
|
+
srcSet;
|
|
635
|
+
alt;
|
|
636
|
+
width;
|
|
637
|
+
height;
|
|
638
|
+
resizeMode;
|
|
639
|
+
resizeMethod;
|
|
640
|
+
defaultSource;
|
|
641
|
+
loadingIndicatorSource;
|
|
642
|
+
blurRadius;
|
|
643
|
+
capInsets;
|
|
644
|
+
crossOrigin;
|
|
645
|
+
referrerPolicy;
|
|
646
|
+
fadeDuration;
|
|
647
|
+
progressiveRenderingEnabled;
|
|
648
|
+
tintColor;
|
|
649
|
+
onLoad;
|
|
650
|
+
onLoadStart;
|
|
651
|
+
onLoadEnd;
|
|
652
|
+
onError;
|
|
653
|
+
onProgress;
|
|
654
|
+
onPartialLoad;
|
|
655
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ImageBackgroundElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
656
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ImageBackgroundElement, isStandalone: true, selector: "image-background", inputs: { imageStyle: "imageStyle", source: "source", src: "src", srcSet: "srcSet", alt: "alt", width: "width", height: "height", resizeMode: "resizeMode", resizeMethod: "resizeMethod", defaultSource: "defaultSource", loadingIndicatorSource: "loadingIndicatorSource", blurRadius: "blurRadius", capInsets: "capInsets", crossOrigin: "crossOrigin", referrerPolicy: "referrerPolicy", fadeDuration: "fadeDuration", progressiveRenderingEnabled: "progressiveRenderingEnabled", tintColor: "tintColor", onLoad: "onLoad", onLoadStart: "onLoadStart", onLoadEnd: "onLoadEnd", onError: "onError", onProgress: "onProgress", onPartialLoad: "onPartialLoad" }, usesInheritance: true, ngImport: i0 });
|
|
657
|
+
}
|
|
658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ImageBackgroundElement, decorators: [{
|
|
659
|
+
type: Directive,
|
|
660
|
+
args: [{ selector: 'image-background', standalone: true }]
|
|
661
|
+
}], propDecorators: { imageStyle: [{
|
|
662
|
+
type: Input
|
|
663
|
+
}], source: [{
|
|
664
|
+
type: Input
|
|
665
|
+
}], src: [{
|
|
666
|
+
type: Input
|
|
667
|
+
}], srcSet: [{
|
|
668
|
+
type: Input
|
|
669
|
+
}], alt: [{
|
|
670
|
+
type: Input
|
|
671
|
+
}], width: [{
|
|
672
|
+
type: Input
|
|
673
|
+
}], height: [{
|
|
674
|
+
type: Input
|
|
675
|
+
}], resizeMode: [{
|
|
676
|
+
type: Input
|
|
677
|
+
}], resizeMethod: [{
|
|
678
|
+
type: Input
|
|
679
|
+
}], defaultSource: [{
|
|
680
|
+
type: Input
|
|
681
|
+
}], loadingIndicatorSource: [{
|
|
682
|
+
type: Input
|
|
683
|
+
}], blurRadius: [{
|
|
684
|
+
type: Input
|
|
685
|
+
}], capInsets: [{
|
|
686
|
+
type: Input
|
|
687
|
+
}], crossOrigin: [{
|
|
688
|
+
type: Input
|
|
689
|
+
}], referrerPolicy: [{
|
|
690
|
+
type: Input
|
|
691
|
+
}], fadeDuration: [{
|
|
692
|
+
type: Input
|
|
693
|
+
}], progressiveRenderingEnabled: [{
|
|
694
|
+
type: Input
|
|
695
|
+
}], tintColor: [{
|
|
696
|
+
type: Input
|
|
697
|
+
}], onLoad: [{
|
|
698
|
+
type: Input
|
|
699
|
+
}], onLoadStart: [{
|
|
700
|
+
type: Input
|
|
701
|
+
}], onLoadEnd: [{
|
|
702
|
+
type: Input
|
|
703
|
+
}], onError: [{
|
|
704
|
+
type: Input
|
|
705
|
+
}], onProgress: [{
|
|
706
|
+
type: Input
|
|
707
|
+
}], onPartialLoad: [{
|
|
708
|
+
type: Input
|
|
709
|
+
}] } });
|
|
710
|
+
export class ScrollViewElement extends SymbioteElement {
|
|
711
|
+
// No `horizontal` @Input: the axis is the TAG you write, never a prop — see
|
|
712
|
+
// `../components/scroll-view-props.ts`'s header. `HorizontalScrollViewElement` below is the
|
|
713
|
+
// other spelling, not a variant of this one.
|
|
714
|
+
scrollEnabled;
|
|
715
|
+
scrollEventThrottle;
|
|
716
|
+
contentContainerStyle;
|
|
717
|
+
contentInset;
|
|
718
|
+
contentInsetAdjustmentBehavior;
|
|
719
|
+
contentOffset;
|
|
720
|
+
scrollIndicatorInsets;
|
|
721
|
+
showsHorizontalScrollIndicator;
|
|
722
|
+
showsVerticalScrollIndicator;
|
|
723
|
+
alwaysBounceHorizontal;
|
|
724
|
+
alwaysBounceVertical;
|
|
725
|
+
bounces;
|
|
726
|
+
bouncesZoom;
|
|
727
|
+
centerContent;
|
|
728
|
+
decelerationRate;
|
|
729
|
+
directionalLockEnabled;
|
|
730
|
+
disableIntervalMomentum;
|
|
731
|
+
endFillColor;
|
|
732
|
+
fadingEdgeLength;
|
|
733
|
+
indicatorStyle;
|
|
734
|
+
invertStickyHeaders;
|
|
735
|
+
keyboardDismissMode;
|
|
736
|
+
keyboardShouldPersistTaps;
|
|
737
|
+
automaticallyAdjustKeyboardInsets;
|
|
738
|
+
maintainVisibleContentPosition;
|
|
739
|
+
maximumZoomScale;
|
|
740
|
+
minimumZoomScale;
|
|
741
|
+
zoomScale;
|
|
742
|
+
nestedScrollEnabled;
|
|
743
|
+
overScrollMode;
|
|
744
|
+
pagingEnabled;
|
|
745
|
+
persistentScrollbar;
|
|
746
|
+
pinchGestureEnabled;
|
|
747
|
+
snapToAlignment;
|
|
748
|
+
snapToEnd;
|
|
749
|
+
snapToInterval;
|
|
750
|
+
snapToOffsets;
|
|
751
|
+
snapToStart;
|
|
752
|
+
stickyHeaderIndices;
|
|
753
|
+
onScroll;
|
|
754
|
+
onScrollBeginDrag;
|
|
755
|
+
onScrollEndDrag;
|
|
756
|
+
onMomentumScrollBegin;
|
|
757
|
+
onMomentumScrollEnd;
|
|
758
|
+
onScrollToTop;
|
|
759
|
+
onContentSizeChange;
|
|
760
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ScrollViewElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
761
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ScrollViewElement, isStandalone: true, selector: "scroll-view", inputs: { scrollEnabled: "scrollEnabled", scrollEventThrottle: "scrollEventThrottle", contentContainerStyle: "contentContainerStyle", contentInset: "contentInset", contentInsetAdjustmentBehavior: "contentInsetAdjustmentBehavior", contentOffset: "contentOffset", scrollIndicatorInsets: "scrollIndicatorInsets", showsHorizontalScrollIndicator: "showsHorizontalScrollIndicator", showsVerticalScrollIndicator: "showsVerticalScrollIndicator", alwaysBounceHorizontal: "alwaysBounceHorizontal", alwaysBounceVertical: "alwaysBounceVertical", bounces: "bounces", bouncesZoom: "bouncesZoom", centerContent: "centerContent", decelerationRate: "decelerationRate", directionalLockEnabled: "directionalLockEnabled", disableIntervalMomentum: "disableIntervalMomentum", endFillColor: "endFillColor", fadingEdgeLength: "fadingEdgeLength", indicatorStyle: "indicatorStyle", invertStickyHeaders: "invertStickyHeaders", keyboardDismissMode: "keyboardDismissMode", keyboardShouldPersistTaps: "keyboardShouldPersistTaps", automaticallyAdjustKeyboardInsets: "automaticallyAdjustKeyboardInsets", maintainVisibleContentPosition: "maintainVisibleContentPosition", maximumZoomScale: "maximumZoomScale", minimumZoomScale: "minimumZoomScale", zoomScale: "zoomScale", nestedScrollEnabled: "nestedScrollEnabled", overScrollMode: "overScrollMode", pagingEnabled: "pagingEnabled", persistentScrollbar: "persistentScrollbar", pinchGestureEnabled: "pinchGestureEnabled", snapToAlignment: "snapToAlignment", snapToEnd: "snapToEnd", snapToInterval: "snapToInterval", snapToOffsets: "snapToOffsets", snapToStart: "snapToStart", stickyHeaderIndices: "stickyHeaderIndices", onScroll: "onScroll", onScrollBeginDrag: "onScrollBeginDrag", onScrollEndDrag: "onScrollEndDrag", onMomentumScrollBegin: "onMomentumScrollBegin", onMomentumScrollEnd: "onMomentumScrollEnd", onScrollToTop: "onScrollToTop", onContentSizeChange: "onContentSizeChange" }, usesInheritance: true, ngImport: i0 });
|
|
762
|
+
}
|
|
763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ScrollViewElement, decorators: [{
|
|
764
|
+
type: Directive,
|
|
765
|
+
args: [{ selector: 'scroll-view', standalone: true }]
|
|
766
|
+
}], propDecorators: { scrollEnabled: [{
|
|
767
|
+
type: Input
|
|
768
|
+
}], scrollEventThrottle: [{
|
|
769
|
+
type: Input
|
|
770
|
+
}], contentContainerStyle: [{
|
|
771
|
+
type: Input
|
|
772
|
+
}], contentInset: [{
|
|
773
|
+
type: Input
|
|
774
|
+
}], contentInsetAdjustmentBehavior: [{
|
|
775
|
+
type: Input
|
|
776
|
+
}], contentOffset: [{
|
|
777
|
+
type: Input
|
|
778
|
+
}], scrollIndicatorInsets: [{
|
|
779
|
+
type: Input
|
|
780
|
+
}], showsHorizontalScrollIndicator: [{
|
|
781
|
+
type: Input
|
|
782
|
+
}], showsVerticalScrollIndicator: [{
|
|
783
|
+
type: Input
|
|
784
|
+
}], alwaysBounceHorizontal: [{
|
|
785
|
+
type: Input
|
|
786
|
+
}], alwaysBounceVertical: [{
|
|
787
|
+
type: Input
|
|
788
|
+
}], bounces: [{
|
|
789
|
+
type: Input
|
|
790
|
+
}], bouncesZoom: [{
|
|
791
|
+
type: Input
|
|
792
|
+
}], centerContent: [{
|
|
793
|
+
type: Input
|
|
794
|
+
}], decelerationRate: [{
|
|
795
|
+
type: Input
|
|
796
|
+
}], directionalLockEnabled: [{
|
|
797
|
+
type: Input
|
|
798
|
+
}], disableIntervalMomentum: [{
|
|
799
|
+
type: Input
|
|
800
|
+
}], endFillColor: [{
|
|
801
|
+
type: Input
|
|
802
|
+
}], fadingEdgeLength: [{
|
|
803
|
+
type: Input
|
|
804
|
+
}], indicatorStyle: [{
|
|
805
|
+
type: Input
|
|
806
|
+
}], invertStickyHeaders: [{
|
|
807
|
+
type: Input
|
|
808
|
+
}], keyboardDismissMode: [{
|
|
809
|
+
type: Input
|
|
810
|
+
}], keyboardShouldPersistTaps: [{
|
|
811
|
+
type: Input
|
|
812
|
+
}], automaticallyAdjustKeyboardInsets: [{
|
|
813
|
+
type: Input
|
|
814
|
+
}], maintainVisibleContentPosition: [{
|
|
815
|
+
type: Input
|
|
816
|
+
}], maximumZoomScale: [{
|
|
817
|
+
type: Input
|
|
818
|
+
}], minimumZoomScale: [{
|
|
819
|
+
type: Input
|
|
820
|
+
}], zoomScale: [{
|
|
821
|
+
type: Input
|
|
822
|
+
}], nestedScrollEnabled: [{
|
|
823
|
+
type: Input
|
|
824
|
+
}], overScrollMode: [{
|
|
825
|
+
type: Input
|
|
826
|
+
}], pagingEnabled: [{
|
|
827
|
+
type: Input
|
|
828
|
+
}], persistentScrollbar: [{
|
|
829
|
+
type: Input
|
|
830
|
+
}], pinchGestureEnabled: [{
|
|
831
|
+
type: Input
|
|
832
|
+
}], snapToAlignment: [{
|
|
833
|
+
type: Input
|
|
834
|
+
}], snapToEnd: [{
|
|
835
|
+
type: Input
|
|
836
|
+
}], snapToInterval: [{
|
|
837
|
+
type: Input
|
|
838
|
+
}], snapToOffsets: [{
|
|
839
|
+
type: Input
|
|
840
|
+
}], snapToStart: [{
|
|
841
|
+
type: Input
|
|
842
|
+
}], stickyHeaderIndices: [{
|
|
843
|
+
type: Input
|
|
844
|
+
}], onScroll: [{
|
|
845
|
+
type: Input
|
|
846
|
+
}], onScrollBeginDrag: [{
|
|
847
|
+
type: Input
|
|
848
|
+
}], onScrollEndDrag: [{
|
|
849
|
+
type: Input
|
|
850
|
+
}], onMomentumScrollBegin: [{
|
|
851
|
+
type: Input
|
|
852
|
+
}], onMomentumScrollEnd: [{
|
|
853
|
+
type: Input
|
|
854
|
+
}], onScrollToTop: [{
|
|
855
|
+
type: Input
|
|
856
|
+
}], onContentSizeChange: [{
|
|
857
|
+
type: Input
|
|
858
|
+
}] } });
|
|
859
|
+
export class HorizontalScrollViewElement extends ScrollViewElement {
|
|
860
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: HorizontalScrollViewElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
861
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: HorizontalScrollViewElement, isStandalone: true, selector: "horizontal-scroll-view", usesInheritance: true, ngImport: i0 });
|
|
862
|
+
}
|
|
863
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: HorizontalScrollViewElement, decorators: [{
|
|
864
|
+
type: Directive,
|
|
865
|
+
args: [{ selector: 'horizontal-scroll-view', standalone: true }]
|
|
866
|
+
}] });
|
|
867
|
+
export class ScrollContentElement extends SymbioteElement {
|
|
868
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ScrollContentElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
869
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ScrollContentElement, isStandalone: true, selector: "scroll-content", usesInheritance: true, ngImport: i0 });
|
|
870
|
+
}
|
|
871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ScrollContentElement, decorators: [{
|
|
872
|
+
type: Directive,
|
|
873
|
+
args: [{ selector: 'scroll-content', standalone: true }]
|
|
874
|
+
}] });
|
|
875
|
+
export class HorizontalScrollContentElement extends SymbioteElement {
|
|
876
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: HorizontalScrollContentElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
877
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: HorizontalScrollContentElement, isStandalone: true, selector: "horizontal-scroll-content", usesInheritance: true, ngImport: i0 });
|
|
878
|
+
}
|
|
879
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: HorizontalScrollContentElement, decorators: [{
|
|
880
|
+
type: Directive,
|
|
881
|
+
args: [{ selector: 'horizontal-scroll-content', standalone: true }]
|
|
882
|
+
}] });
|
|
883
|
+
/**
|
|
884
|
+
* The `[(value)]` half of a controlled tag — `<switch>` and `<text-input>`.
|
|
885
|
+
*
|
|
886
|
+
* The one `@Output` in this file, and it is FORCED rather than chosen. `[(value)]` desugars to
|
|
887
|
+
* `[value]` + `(valueChange)`, and ngtsc requires both halves to resolve to the SAME target: a
|
|
888
|
+
* declared `value` input beside an event no directive claims is NG8007, "the property and event
|
|
889
|
+
* halves are not bound to the same target". So the sugar this adapter documents cannot work without
|
|
890
|
+
* the output existing, whatever the file header says about events in general.
|
|
891
|
+
*
|
|
892
|
+
* The bridge below is NOT what makes the binding work today, and the comment says so because the
|
|
893
|
+
* obvious reading is wrong: the file header's "an `@Output` CONSUMES the binding" holds for a
|
|
894
|
+
* COMPONENT, and an element is the other case — Angular attaches the renderer listener for the
|
|
895
|
+
* event as well, so `Renderer2.listen` still runs and the engine still hears the change. Measured
|
|
896
|
+
* under JIT by deleting this whole hook: every case in `lowered-two-way-value.test.ts` stayed
|
|
897
|
+
* green, delivery included, and exactly ONCE (nothing double-fires when both paths exist).
|
|
898
|
+
*
|
|
899
|
+
* It is kept because the measurement is JIT-only and this adapter has a recorded case of JIT and
|
|
900
|
+
* AOT resolving a binding differently (`test-harness-false-greens.md` §21). If AOT routes the event
|
|
901
|
+
* exclusively to the output, this hook is the only thing keeping `[(value)]` alive; if it routes to
|
|
902
|
+
* both, it is one extra listener on a control an app explicitly bound. Delete it once something
|
|
903
|
+
* executes the LINKED artifact and shows the renderer listener is attached there too.
|
|
904
|
+
*
|
|
905
|
+
* Opened only when something is SUBSCRIBED: the prop's PRESENCE is what a behavior reads to decide
|
|
906
|
+
* it is controlled, so a `<switch>` given a handler nobody asked for changes how it snaps back.
|
|
907
|
+
* `.observed` is readable from `ngOnInit` because Angular subscribes outputs in the creation pass,
|
|
908
|
+
* before the update pass runs the hook — observed directly (true for the two bound tags, false for
|
|
909
|
+
* an unbound one), not assumed.
|
|
910
|
+
*/
|
|
911
|
+
class ValueChangeElement extends ReadBackElement {
|
|
912
|
+
valueRenderer = inject(Renderer2);
|
|
913
|
+
valueHost = inject(ElementRef);
|
|
914
|
+
unlistenValue;
|
|
915
|
+
ngOnInit() {
|
|
916
|
+
if (!this.hasValueSubscriber())
|
|
917
|
+
return;
|
|
918
|
+
this.unlistenValue = this.valueRenderer.listen(this.valueHost.nativeElement, VALUE_CHANGE_EVENT, (value) => {
|
|
919
|
+
this.emitValue(value);
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
ngOnDestroy() {
|
|
923
|
+
super.ngOnDestroy();
|
|
924
|
+
this.unlistenValue?.();
|
|
925
|
+
}
|
|
926
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ValueChangeElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
927
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ValueChangeElement, isStandalone: true, usesInheritance: true, ngImport: i0 });
|
|
928
|
+
}
|
|
929
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ValueChangeElement, decorators: [{
|
|
930
|
+
type: Directive
|
|
931
|
+
}] });
|
|
932
|
+
export class TextInputElement extends ValueChangeElement {
|
|
933
|
+
value;
|
|
934
|
+
defaultValue;
|
|
935
|
+
placeholder;
|
|
936
|
+
placeholderTextColor;
|
|
937
|
+
multiline;
|
|
938
|
+
numberOfLines;
|
|
939
|
+
maxLength;
|
|
940
|
+
editable;
|
|
941
|
+
readOnly;
|
|
942
|
+
autoFocus;
|
|
943
|
+
autoCapitalize;
|
|
944
|
+
autoComplete;
|
|
945
|
+
autoCorrect;
|
|
946
|
+
blurOnSubmit;
|
|
947
|
+
submitBehavior;
|
|
948
|
+
cursorColor;
|
|
949
|
+
enterKeyHint;
|
|
950
|
+
returnKeyType;
|
|
951
|
+
inputMode;
|
|
952
|
+
keyboardType;
|
|
953
|
+
inputAccessoryViewID;
|
|
954
|
+
scrollEnabled;
|
|
955
|
+
secureTextEntry;
|
|
956
|
+
selectTextOnFocus;
|
|
957
|
+
selection;
|
|
958
|
+
selectionColor;
|
|
959
|
+
selectionHandleColor;
|
|
960
|
+
showSoftInputOnFocus;
|
|
961
|
+
textAlign;
|
|
962
|
+
textContentType;
|
|
963
|
+
underlineColorAndroid;
|
|
964
|
+
onValueChange;
|
|
965
|
+
onContentSizeChange;
|
|
966
|
+
onEndEditing;
|
|
967
|
+
onKeyPress;
|
|
968
|
+
onSelectionChange;
|
|
969
|
+
onSubmitEditing;
|
|
970
|
+
// NonNullable, not the prop type: `[(value)]="name"` binds a `string`, and an emitter that can
|
|
971
|
+
// also emit `undefined` fails the two-way assignability check ngtsc runs on the event half.
|
|
972
|
+
valueChange = new EventEmitter();
|
|
973
|
+
hasValueSubscriber() {
|
|
974
|
+
return this.valueChange.observed;
|
|
975
|
+
}
|
|
976
|
+
emitValue(value) {
|
|
977
|
+
if (typeof value === 'string')
|
|
978
|
+
this.valueChange.emit(value);
|
|
979
|
+
}
|
|
980
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TextInputElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
981
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: TextInputElement, isStandalone: true, selector: "text-input", inputs: { value: "value", defaultValue: "defaultValue", placeholder: "placeholder", placeholderTextColor: "placeholderTextColor", multiline: "multiline", numberOfLines: "numberOfLines", maxLength: "maxLength", editable: "editable", readOnly: "readOnly", autoFocus: "autoFocus", autoCapitalize: "autoCapitalize", autoComplete: "autoComplete", autoCorrect: "autoCorrect", blurOnSubmit: "blurOnSubmit", submitBehavior: "submitBehavior", cursorColor: "cursorColor", enterKeyHint: "enterKeyHint", returnKeyType: "returnKeyType", inputMode: "inputMode", keyboardType: "keyboardType", inputAccessoryViewID: "inputAccessoryViewID", scrollEnabled: "scrollEnabled", secureTextEntry: "secureTextEntry", selectTextOnFocus: "selectTextOnFocus", selection: "selection", selectionColor: "selectionColor", selectionHandleColor: "selectionHandleColor", showSoftInputOnFocus: "showSoftInputOnFocus", textAlign: "textAlign", textContentType: "textContentType", underlineColorAndroid: "underlineColorAndroid", onValueChange: "onValueChange", onContentSizeChange: "onContentSizeChange", onEndEditing: "onEndEditing", onKeyPress: "onKeyPress", onSelectionChange: "onSelectionChange", onSubmitEditing: "onSubmitEditing" }, outputs: { valueChange: "valueChange" }, usesInheritance: true, ngImport: i0 });
|
|
982
|
+
}
|
|
983
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TextInputElement, decorators: [{
|
|
984
|
+
type: Directive,
|
|
985
|
+
args: [{ selector: 'text-input', standalone: true }]
|
|
986
|
+
}], propDecorators: { value: [{
|
|
987
|
+
type: Input
|
|
988
|
+
}], defaultValue: [{
|
|
989
|
+
type: Input
|
|
990
|
+
}], placeholder: [{
|
|
991
|
+
type: Input
|
|
992
|
+
}], placeholderTextColor: [{
|
|
993
|
+
type: Input
|
|
994
|
+
}], multiline: [{
|
|
995
|
+
type: Input
|
|
996
|
+
}], numberOfLines: [{
|
|
997
|
+
type: Input
|
|
998
|
+
}], maxLength: [{
|
|
999
|
+
type: Input
|
|
1000
|
+
}], editable: [{
|
|
1001
|
+
type: Input
|
|
1002
|
+
}], readOnly: [{
|
|
1003
|
+
type: Input
|
|
1004
|
+
}], autoFocus: [{
|
|
1005
|
+
type: Input
|
|
1006
|
+
}], autoCapitalize: [{
|
|
1007
|
+
type: Input
|
|
1008
|
+
}], autoComplete: [{
|
|
1009
|
+
type: Input
|
|
1010
|
+
}], autoCorrect: [{
|
|
1011
|
+
type: Input
|
|
1012
|
+
}], blurOnSubmit: [{
|
|
1013
|
+
type: Input
|
|
1014
|
+
}], submitBehavior: [{
|
|
1015
|
+
type: Input
|
|
1016
|
+
}], cursorColor: [{
|
|
1017
|
+
type: Input
|
|
1018
|
+
}], enterKeyHint: [{
|
|
1019
|
+
type: Input
|
|
1020
|
+
}], returnKeyType: [{
|
|
1021
|
+
type: Input
|
|
1022
|
+
}], inputMode: [{
|
|
1023
|
+
type: Input
|
|
1024
|
+
}], keyboardType: [{
|
|
1025
|
+
type: Input
|
|
1026
|
+
}], inputAccessoryViewID: [{
|
|
1027
|
+
type: Input
|
|
1028
|
+
}], scrollEnabled: [{
|
|
1029
|
+
type: Input
|
|
1030
|
+
}], secureTextEntry: [{
|
|
1031
|
+
type: Input
|
|
1032
|
+
}], selectTextOnFocus: [{
|
|
1033
|
+
type: Input
|
|
1034
|
+
}], selection: [{
|
|
1035
|
+
type: Input
|
|
1036
|
+
}], selectionColor: [{
|
|
1037
|
+
type: Input
|
|
1038
|
+
}], selectionHandleColor: [{
|
|
1039
|
+
type: Input
|
|
1040
|
+
}], showSoftInputOnFocus: [{
|
|
1041
|
+
type: Input
|
|
1042
|
+
}], textAlign: [{
|
|
1043
|
+
type: Input
|
|
1044
|
+
}], textContentType: [{
|
|
1045
|
+
type: Input
|
|
1046
|
+
}], underlineColorAndroid: [{
|
|
1047
|
+
type: Input
|
|
1048
|
+
}], onValueChange: [{
|
|
1049
|
+
type: Input
|
|
1050
|
+
}], onContentSizeChange: [{
|
|
1051
|
+
type: Input
|
|
1052
|
+
}], onEndEditing: [{
|
|
1053
|
+
type: Input
|
|
1054
|
+
}], onKeyPress: [{
|
|
1055
|
+
type: Input
|
|
1056
|
+
}], onSelectionChange: [{
|
|
1057
|
+
type: Input
|
|
1058
|
+
}], onSubmitEditing: [{
|
|
1059
|
+
type: Input
|
|
1060
|
+
}], valueChange: [{
|
|
1061
|
+
type: Output
|
|
1062
|
+
}] } });
|
|
1063
|
+
export class MultilineTextInputElement extends TextInputElement {
|
|
1064
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MultilineTextInputElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1065
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: MultilineTextInputElement, isStandalone: true, selector: "text-input-multiline", usesInheritance: true, ngImport: i0 });
|
|
1066
|
+
}
|
|
1067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: MultilineTextInputElement, decorators: [{
|
|
1068
|
+
type: Directive,
|
|
1069
|
+
args: [{ selector: 'text-input-multiline', standalone: true }]
|
|
1070
|
+
}] });
|
|
1071
|
+
// The COMPONENT path's spelling of the pair above — same native views, a tag the behavior registry
|
|
1072
|
+
// deliberately does not carry (`component-names/shared.ts`). Declared so the tag alphabet is
|
|
1073
|
+
// complete; an app writes the plain name.
|
|
1074
|
+
export class ManagedTextInputElement extends TextInputElement {
|
|
1075
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ManagedTextInputElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1076
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ManagedTextInputElement, isStandalone: true, selector: "text-input-managed", usesInheritance: true, ngImport: i0 });
|
|
1077
|
+
}
|
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ManagedTextInputElement, decorators: [{
|
|
1079
|
+
type: Directive,
|
|
1080
|
+
args: [{ selector: 'text-input-managed', standalone: true }]
|
|
1081
|
+
}] });
|
|
1082
|
+
export class ManagedMultilineTextInputElement extends TextInputElement {
|
|
1083
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ManagedMultilineTextInputElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1084
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ManagedMultilineTextInputElement, isStandalone: true, selector: "text-input-multiline-managed", usesInheritance: true, ngImport: i0 });
|
|
1085
|
+
}
|
|
1086
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ManagedMultilineTextInputElement, decorators: [{
|
|
1087
|
+
type: Directive,
|
|
1088
|
+
args: [{ selector: 'text-input-multiline-managed', standalone: true }]
|
|
1089
|
+
}] });
|
|
1090
|
+
export class SwitchElement extends ValueChangeElement {
|
|
1091
|
+
value;
|
|
1092
|
+
disabled;
|
|
1093
|
+
trackColor;
|
|
1094
|
+
thumbColor;
|
|
1095
|
+
ios_backgroundColor;
|
|
1096
|
+
onValueChange;
|
|
1097
|
+
valueChange = new EventEmitter();
|
|
1098
|
+
hasValueSubscriber() {
|
|
1099
|
+
return this.valueChange.observed;
|
|
1100
|
+
}
|
|
1101
|
+
emitValue(value) {
|
|
1102
|
+
if (typeof value === 'boolean')
|
|
1103
|
+
this.valueChange.emit(value);
|
|
1104
|
+
}
|
|
1105
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SwitchElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1106
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SwitchElement, isStandalone: true, selector: "switch", inputs: { value: "value", disabled: "disabled", trackColor: "trackColor", thumbColor: "thumbColor", ios_backgroundColor: "ios_backgroundColor", onValueChange: "onValueChange" }, outputs: { valueChange: "valueChange" }, usesInheritance: true, ngImport: i0 });
|
|
1107
|
+
}
|
|
1108
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SwitchElement, decorators: [{
|
|
1109
|
+
type: Directive,
|
|
1110
|
+
args: [{ selector: 'switch', standalone: true }]
|
|
1111
|
+
}], propDecorators: { value: [{
|
|
1112
|
+
type: Input
|
|
1113
|
+
}], disabled: [{
|
|
1114
|
+
type: Input
|
|
1115
|
+
}], trackColor: [{
|
|
1116
|
+
type: Input
|
|
1117
|
+
}], thumbColor: [{
|
|
1118
|
+
type: Input
|
|
1119
|
+
}], ios_backgroundColor: [{
|
|
1120
|
+
type: Input
|
|
1121
|
+
}], onValueChange: [{
|
|
1122
|
+
type: Input
|
|
1123
|
+
}], valueChange: [{
|
|
1124
|
+
type: Output
|
|
1125
|
+
}] } });
|
|
1126
|
+
export class ManagedSwitchElement extends SwitchElement {
|
|
1127
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ManagedSwitchElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1128
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ManagedSwitchElement, isStandalone: true, selector: "switch-managed", usesInheritance: true, ngImport: i0 });
|
|
1129
|
+
}
|
|
1130
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ManagedSwitchElement, decorators: [{
|
|
1131
|
+
type: Directive,
|
|
1132
|
+
args: [{ selector: 'switch-managed', standalone: true }]
|
|
1133
|
+
}] });
|
|
1134
|
+
/**
|
|
1135
|
+
* `[(ngModel)]` / `formControlName` on a `<text-input>` or a `<switch>`.
|
|
1136
|
+
*
|
|
1137
|
+
* The wrappers provided `NG_VALUE_ACCESSOR` themselves; a tag has no class for @angular/forms to
|
|
1138
|
+
* call into, so the accessor moves onto a directive of its own rather than being dropped — the
|
|
1139
|
+
* shape Angular's own `DefaultValueAccessor` takes for `<input>`. Providing it unconditionally is
|
|
1140
|
+
* safe: @angular/forms looks the accessor up only when an `ngModel` / `formControl*` directive sits
|
|
1141
|
+
* on the SAME element, so a plain `<switch [(value)]>` never reaches it.
|
|
1142
|
+
*
|
|
1143
|
+
* Everything below goes through `Renderer2`, which is the adapter's own — `setProperty` lands in
|
|
1144
|
+
* `routeProp` and `listen('valueChange')` is already unwrapped to a bare value there, so this
|
|
1145
|
+
* directive holds no fold of its own.
|
|
1146
|
+
*/
|
|
1147
|
+
class SymbioteValueAccessor {
|
|
1148
|
+
renderer = inject(Renderer2);
|
|
1149
|
+
host = inject(ElementRef);
|
|
1150
|
+
unlisten;
|
|
1151
|
+
setProp(name, value) {
|
|
1152
|
+
this.renderer.setProperty(this.host.nativeElement, name, value);
|
|
1153
|
+
}
|
|
1154
|
+
writeValue(value) {
|
|
1155
|
+
this.setProp('value', value ?? undefined);
|
|
1156
|
+
}
|
|
1157
|
+
registerOnChange(fn) {
|
|
1158
|
+
this.unlisten?.();
|
|
1159
|
+
this.unlisten = this.renderer.listen(this.host.nativeElement, VALUE_CHANGE_EVENT, (value) => {
|
|
1160
|
+
fn(value);
|
|
1161
|
+
});
|
|
1162
|
+
}
|
|
1163
|
+
// Native has no blur-driven "touched" signal distinct from `blur`, and RN's own onBlur is what an
|
|
1164
|
+
// app binds — so touched is driven off the same event rather than a second channel.
|
|
1165
|
+
registerOnTouched(fn) {
|
|
1166
|
+
this.setProp('onBlur', () => fn());
|
|
1167
|
+
}
|
|
1168
|
+
setDisabledState(isDisabled) {
|
|
1169
|
+
this.writeDisabled(isDisabled);
|
|
1170
|
+
}
|
|
1171
|
+
ngOnDestroy() {
|
|
1172
|
+
this.unlisten?.();
|
|
1173
|
+
}
|
|
1174
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SymbioteValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1175
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SymbioteValueAccessor, isStandalone: true, ngImport: i0 });
|
|
1176
|
+
}
|
|
1177
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SymbioteValueAccessor, decorators: [{
|
|
1178
|
+
type: Directive
|
|
1179
|
+
}] });
|
|
1180
|
+
export class TextInputValueAccessor extends SymbioteValueAccessor {
|
|
1181
|
+
writeDisabled(isDisabled) {
|
|
1182
|
+
this.setProp('editable', !isDisabled);
|
|
1183
|
+
}
|
|
1184
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TextInputValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1185
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: TextInputValueAccessor, isStandalone: true, selector: "text-input[ngModel], text-input[formControl], text-input[formControlName], text-input-multiline[ngModel], text-input-multiline[formControl], text-input-multiline[formControlName]", providers: [
|
|
1186
|
+
{
|
|
1187
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1188
|
+
useExisting: forwardRef(() => TextInputValueAccessor),
|
|
1189
|
+
multi: true,
|
|
1190
|
+
},
|
|
1191
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1192
|
+
}
|
|
1193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: TextInputValueAccessor, decorators: [{
|
|
1194
|
+
type: Directive,
|
|
1195
|
+
args: [{
|
|
1196
|
+
selector: 'text-input[ngModel], text-input[formControl], text-input[formControlName], text-input-multiline[ngModel], text-input-multiline[formControl], text-input-multiline[formControlName]',
|
|
1197
|
+
standalone: true,
|
|
1198
|
+
providers: [
|
|
1199
|
+
{
|
|
1200
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1201
|
+
useExisting: forwardRef(() => TextInputValueAccessor),
|
|
1202
|
+
multi: true,
|
|
1203
|
+
},
|
|
1204
|
+
],
|
|
1205
|
+
}]
|
|
1206
|
+
}] });
|
|
1207
|
+
export class SwitchValueAccessor extends SymbioteValueAccessor {
|
|
1208
|
+
writeDisabled(isDisabled) {
|
|
1209
|
+
this.setProp('disabled', isDisabled);
|
|
1210
|
+
}
|
|
1211
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SwitchValueAccessor, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1212
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SwitchValueAccessor, isStandalone: true, selector: "switch[ngModel], switch[formControl], switch[formControlName], switch-managed[ngModel], switch-managed[formControl], switch-managed[formControlName]", providers: [
|
|
1213
|
+
{
|
|
1214
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1215
|
+
useExisting: forwardRef(() => SwitchValueAccessor),
|
|
1216
|
+
multi: true,
|
|
1217
|
+
},
|
|
1218
|
+
], usesInheritance: true, ngImport: i0 });
|
|
1219
|
+
}
|
|
1220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SwitchValueAccessor, decorators: [{
|
|
1221
|
+
type: Directive,
|
|
1222
|
+
args: [{
|
|
1223
|
+
selector: 'switch[ngModel], switch[formControl], switch[formControlName], switch-managed[ngModel], switch-managed[formControl], switch-managed[formControlName]',
|
|
1224
|
+
standalone: true,
|
|
1225
|
+
providers: [
|
|
1226
|
+
{
|
|
1227
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1228
|
+
useExisting: forwardRef(() => SwitchValueAccessor),
|
|
1229
|
+
multi: true,
|
|
1230
|
+
},
|
|
1231
|
+
],
|
|
1232
|
+
}]
|
|
1233
|
+
}] });
|
|
1234
|
+
// The HOST — RN's centering RCTView (ActivityIndicator.js:112), which is the tag an app writes.
|
|
1235
|
+
// The four spinner props are declared here because that is where the app writes them; the engine's
|
|
1236
|
+
// behavior redirects them onto the spinner it builds underneath (`slotProps`).
|
|
1237
|
+
export class ActivityIndicatorElement extends SymbioteElement {
|
|
1238
|
+
animating;
|
|
1239
|
+
color;
|
|
1240
|
+
size;
|
|
1241
|
+
hidesWhenStopped;
|
|
1242
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ActivityIndicatorElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1243
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ActivityIndicatorElement, isStandalone: true, selector: "activity-indicator", inputs: { animating: "animating", color: "color", size: "size", hidesWhenStopped: "hidesWhenStopped" }, usesInheritance: true, ngImport: i0 });
|
|
1244
|
+
}
|
|
1245
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ActivityIndicatorElement, decorators: [{
|
|
1246
|
+
type: Directive,
|
|
1247
|
+
args: [{ selector: 'activity-indicator', standalone: true }]
|
|
1248
|
+
}], propDecorators: { animating: [{
|
|
1249
|
+
type: Input
|
|
1250
|
+
}], color: [{
|
|
1251
|
+
type: Input
|
|
1252
|
+
}], size: [{
|
|
1253
|
+
type: Input
|
|
1254
|
+
}], hidesWhenStopped: [{
|
|
1255
|
+
type: Input
|
|
1256
|
+
}] } });
|
|
1257
|
+
// The native spinner. Built by the behavior's `buildStructure` and by the wrapper's render fn, never
|
|
1258
|
+
// written in an app template — declared only so the tag alphabet stays covered, the same as
|
|
1259
|
+
// `scroll-content`.
|
|
1260
|
+
export class ActivityIndicatorSpinnerElement extends ActivityIndicatorElement {
|
|
1261
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ActivityIndicatorSpinnerElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1262
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ActivityIndicatorSpinnerElement, isStandalone: true, selector: "activity-indicator-spinner", usesInheritance: true, ngImport: i0 });
|
|
1263
|
+
}
|
|
1264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ActivityIndicatorSpinnerElement, decorators: [{
|
|
1265
|
+
type: Directive,
|
|
1266
|
+
args: [{ selector: 'activity-indicator-spinner', standalone: true }]
|
|
1267
|
+
}] });
|
|
1268
|
+
export class SafeAreaViewElement extends SymbioteElement {
|
|
1269
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SafeAreaViewElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1270
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SafeAreaViewElement, isStandalone: true, selector: "safe-area-view", usesInheritance: true, ngImport: i0 });
|
|
1271
|
+
}
|
|
1272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SafeAreaViewElement, decorators: [{
|
|
1273
|
+
type: Directive,
|
|
1274
|
+
args: [{ selector: 'safe-area-view', standalone: true }]
|
|
1275
|
+
}] });
|
|
1276
|
+
export class ModalElement extends SymbioteElement {
|
|
1277
|
+
visible;
|
|
1278
|
+
transparent;
|
|
1279
|
+
animationType;
|
|
1280
|
+
presentationStyle;
|
|
1281
|
+
supportedOrientations;
|
|
1282
|
+
hardwareAccelerated;
|
|
1283
|
+
statusBarTranslucent;
|
|
1284
|
+
navigationBarTranslucent;
|
|
1285
|
+
allowSwipeDismissal;
|
|
1286
|
+
backdropColor;
|
|
1287
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ModalElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1288
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: ModalElement, isStandalone: true, selector: "modal", inputs: { visible: "visible", transparent: "transparent", animationType: "animationType", presentationStyle: "presentationStyle", supportedOrientations: "supportedOrientations", hardwareAccelerated: "hardwareAccelerated", statusBarTranslucent: "statusBarTranslucent", navigationBarTranslucent: "navigationBarTranslucent", allowSwipeDismissal: "allowSwipeDismissal", backdropColor: "backdropColor" }, usesInheritance: true, ngImport: i0 });
|
|
1289
|
+
}
|
|
1290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ModalElement, decorators: [{
|
|
1291
|
+
type: Directive,
|
|
1292
|
+
args: [{ selector: 'modal', standalone: true }]
|
|
1293
|
+
}], propDecorators: { visible: [{
|
|
1294
|
+
type: Input
|
|
1295
|
+
}], transparent: [{
|
|
1296
|
+
type: Input
|
|
1297
|
+
}], animationType: [{
|
|
1298
|
+
type: Input
|
|
1299
|
+
}], presentationStyle: [{
|
|
1300
|
+
type: Input
|
|
1301
|
+
}], supportedOrientations: [{
|
|
1302
|
+
type: Input
|
|
1303
|
+
}], hardwareAccelerated: [{
|
|
1304
|
+
type: Input
|
|
1305
|
+
}], statusBarTranslucent: [{
|
|
1306
|
+
type: Input
|
|
1307
|
+
}], navigationBarTranslucent: [{
|
|
1308
|
+
type: Input
|
|
1309
|
+
}], allowSwipeDismissal: [{
|
|
1310
|
+
type: Input
|
|
1311
|
+
}], backdropColor: [{
|
|
1312
|
+
type: Input
|
|
1313
|
+
}] } });
|
|
1314
|
+
export class RefreshControlElement extends ReadBackElement {
|
|
1315
|
+
refreshing;
|
|
1316
|
+
enabled;
|
|
1317
|
+
colors;
|
|
1318
|
+
tintColor;
|
|
1319
|
+
title;
|
|
1320
|
+
titleColor;
|
|
1321
|
+
size;
|
|
1322
|
+
progressBackgroundColor;
|
|
1323
|
+
progressViewOffset;
|
|
1324
|
+
onRefresh;
|
|
1325
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: RefreshControlElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1326
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: RefreshControlElement, isStandalone: true, selector: "refresh-control", inputs: { refreshing: "refreshing", enabled: "enabled", colors: "colors", tintColor: "tintColor", title: "title", titleColor: "titleColor", size: "size", progressBackgroundColor: "progressBackgroundColor", progressViewOffset: "progressViewOffset", onRefresh: "onRefresh" }, usesInheritance: true, ngImport: i0 });
|
|
1327
|
+
}
|
|
1328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: RefreshControlElement, decorators: [{
|
|
1329
|
+
type: Directive,
|
|
1330
|
+
args: [{ selector: 'refresh-control', standalone: true }]
|
|
1331
|
+
}], propDecorators: { refreshing: [{
|
|
1332
|
+
type: Input
|
|
1333
|
+
}], enabled: [{
|
|
1334
|
+
type: Input
|
|
1335
|
+
}], colors: [{
|
|
1336
|
+
type: Input
|
|
1337
|
+
}], tintColor: [{
|
|
1338
|
+
type: Input
|
|
1339
|
+
}], title: [{
|
|
1340
|
+
type: Input
|
|
1341
|
+
}], titleColor: [{
|
|
1342
|
+
type: Input
|
|
1343
|
+
}], size: [{
|
|
1344
|
+
type: Input
|
|
1345
|
+
}], progressBackgroundColor: [{
|
|
1346
|
+
type: Input
|
|
1347
|
+
}], progressViewOffset: [{
|
|
1348
|
+
type: Input
|
|
1349
|
+
}], onRefresh: [{
|
|
1350
|
+
type: Input
|
|
1351
|
+
}] } });
|
|
1352
|
+
export class StickyHeaderElement extends SymbioteElement {
|
|
1353
|
+
inverted;
|
|
1354
|
+
nextHeaderLayoutY;
|
|
1355
|
+
scrollAnimatedValue;
|
|
1356
|
+
scrollViewHeight;
|
|
1357
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: StickyHeaderElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1358
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: StickyHeaderElement, isStandalone: true, selector: "sticky-header", inputs: { inverted: "inverted", nextHeaderLayoutY: "nextHeaderLayoutY", scrollAnimatedValue: "scrollAnimatedValue", scrollViewHeight: "scrollViewHeight" }, usesInheritance: true, ngImport: i0 });
|
|
1359
|
+
}
|
|
1360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: StickyHeaderElement, decorators: [{
|
|
1361
|
+
type: Directive,
|
|
1362
|
+
args: [{ selector: 'sticky-header', standalone: true }]
|
|
1363
|
+
}], propDecorators: { inverted: [{
|
|
1364
|
+
type: Input
|
|
1365
|
+
}], nextHeaderLayoutY: [{
|
|
1366
|
+
type: Input
|
|
1367
|
+
}], scrollAnimatedValue: [{
|
|
1368
|
+
type: Input
|
|
1369
|
+
}], scrollViewHeight: [{
|
|
1370
|
+
type: Input
|
|
1371
|
+
}] } });
|
|
1372
|
+
export class InputAccessoryViewElement extends SymbioteElement {
|
|
1373
|
+
backgroundColor;
|
|
1374
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: InputAccessoryViewElement, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
1375
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: InputAccessoryViewElement, isStandalone: true, selector: "input-accessory-view", inputs: { backgroundColor: "backgroundColor" }, usesInheritance: true, ngImport: i0 });
|
|
1376
|
+
}
|
|
1377
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: InputAccessoryViewElement, decorators: [{
|
|
1378
|
+
type: Directive,
|
|
1379
|
+
args: [{ selector: 'input-accessory-view', standalone: true }]
|
|
1380
|
+
}], propDecorators: { backgroundColor: [{
|
|
1381
|
+
type: Input
|
|
1382
|
+
}] } });
|
|
1383
|
+
/**
|
|
1384
|
+
* Every element directive, as ONE symbol an app puts in `imports`. Angular flattens a nested array
|
|
1385
|
+
* there, so the line does not grow as the tag alphabet does — and a per-component `imports` line is
|
|
1386
|
+
* the floor for standalone components whatever we ship (there is no global-import mechanism, by
|
|
1387
|
+
* design: angular/angular#43784).
|
|
1388
|
+
*
|
|
1389
|
+
* `elements.test.ts` asserts this covers every key of `COMPONENT_DESCRIPTORS`, derived from that
|
|
1390
|
+
* table, so a future primitive joins by existing rather than by someone remembering.
|
|
1391
|
+
*/
|
|
1392
|
+
export const SYMBIOTE_ELEMENTS = [
|
|
1393
|
+
ViewElement,
|
|
1394
|
+
PressableElement,
|
|
1395
|
+
TouchableOpacityElement,
|
|
1396
|
+
TouchableHighlightElement,
|
|
1397
|
+
TouchableNativeFeedbackElement,
|
|
1398
|
+
TouchableWithoutFeedbackElement,
|
|
1399
|
+
ButtonElement,
|
|
1400
|
+
TextElement,
|
|
1401
|
+
ImageElement,
|
|
1402
|
+
ImageBackgroundElement,
|
|
1403
|
+
ScrollViewElement,
|
|
1404
|
+
HorizontalScrollViewElement,
|
|
1405
|
+
ScrollContentElement,
|
|
1406
|
+
HorizontalScrollContentElement,
|
|
1407
|
+
TextInputElement,
|
|
1408
|
+
MultilineTextInputElement,
|
|
1409
|
+
ManagedTextInputElement,
|
|
1410
|
+
ManagedMultilineTextInputElement,
|
|
1411
|
+
SwitchElement,
|
|
1412
|
+
ManagedSwitchElement,
|
|
1413
|
+
ActivityIndicatorElement,
|
|
1414
|
+
ActivityIndicatorSpinnerElement,
|
|
1415
|
+
SafeAreaViewElement,
|
|
1416
|
+
ModalElement,
|
|
1417
|
+
RefreshControlElement,
|
|
1418
|
+
StickyHeaderElement,
|
|
1419
|
+
InputAccessoryViewElement,
|
|
1420
|
+
// Not tags — the `[(ngModel)]` / `formControl*` accessors for the two controlled ones. They ride
|
|
1421
|
+
// this list so an app that already imports it keeps the forms integration the deleted wrappers
|
|
1422
|
+
// provided, and `elements.test.ts` subtracts them from its tag-coverage check by name.
|
|
1423
|
+
TextInputValueAccessor,
|
|
1424
|
+
SwitchValueAccessor,
|
|
1425
|
+
];
|
|
1426
|
+
const DECLARES_EVERY_PROP = {
|
|
1427
|
+
view: true,
|
|
1428
|
+
pressable: true,
|
|
1429
|
+
touchableOpacity: true,
|
|
1430
|
+
touchableHighlight: true,
|
|
1431
|
+
text: true,
|
|
1432
|
+
image: true,
|
|
1433
|
+
imageBackground: true,
|
|
1434
|
+
scrollView: true,
|
|
1435
|
+
textInput: true,
|
|
1436
|
+
switch: true,
|
|
1437
|
+
activityIndicator: true,
|
|
1438
|
+
modal: true,
|
|
1439
|
+
refreshControl: true,
|
|
1440
|
+
stickyHeader: true,
|
|
1441
|
+
inputAccessoryView: true,
|
|
1442
|
+
};
|
|
1443
|
+
void DECLARES_EVERY_PROP;
|
|
1444
|
+
//# sourceMappingURL=elements.js.map
|