@symbiote-native/angular 3.2.0 → 3.4.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/babel-register-composed.cjs +2 -0
- package/build/angular/accessibility-inputs.d.ts +2 -1
- package/build/angular/accessibility-inputs.js +4 -1
- package/build/angular/accessibility-inputs.js.map +1 -1
- package/build/angular/callback-host.d.ts +1 -1
- package/build/angular/callback-host.js +57 -9
- package/build/angular/callback-host.js.map +1 -1
- package/build/angular/components/checkbox-props.d.ts +2 -0
- package/build/angular/components/checkbox-props.js +2 -0
- package/build/angular/components/checkbox-props.js.map +1 -0
- package/build/angular/components/flat-list/flat-list-handle.d.ts +35 -0
- package/build/angular/components/flat-list/flat-list-handle.js +48 -0
- package/build/angular/components/flat-list/flat-list-handle.js.map +1 -0
- package/build/angular/components/flat-list/flat-list-template.d.ts +1 -1
- package/build/angular/components/flat-list/flat-list-template.js +16 -0
- package/build/angular/components/flat-list/flat-list-template.js.map +1 -1
- package/build/angular/components/flat-list/index.d.ts +6 -30
- package/build/angular/components/flat-list/index.js +6 -36
- package/build/angular/components/flat-list/index.js.map +1 -1
- package/build/angular/components/image-inputs.d.ts +4 -0
- package/build/angular/components/image-inputs.js +81 -0
- package/build/angular/components/image-inputs.js.map +1 -0
- package/build/angular/components/image-props-resolve.d.ts +3 -0
- package/build/angular/components/image-props-resolve.js +133 -0
- package/build/angular/components/image-props-resolve.js.map +1 -0
- package/build/angular/components/image-shared.d.ts +8 -6
- package/build/angular/components/image-shared.js +23 -212
- package/build/angular/components/image-shared.js.map +1 -1
- package/build/angular/components/input-accessory-view-props.d.ts +4 -4
- package/build/angular/components/keyboard-avoiding-view/index.d.ts +3 -6
- package/build/angular/components/keyboard-avoiding-view/index.js +29 -56
- package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -1
- package/build/angular/components/layout-conformance-props.d.ts +4 -0
- package/build/angular/components/layout-conformance-props.js +2 -0
- package/build/angular/components/layout-conformance-props.js.map +1 -0
- package/build/angular/components/modal/index.d.ts +6 -5
- package/build/angular/components/modal/index.js +17 -2
- package/build/angular/components/modal/index.js.map +1 -1
- package/build/angular/components/refresh-control-props.d.ts +7 -7
- package/build/angular/components/scroll-view-props.d.ts +8 -5
- package/build/angular/components/section-list/index.d.ts +17 -8
- package/build/angular/components/section-list/index.js +37 -28
- package/build/angular/components/section-list/index.js.map +1 -1
- package/build/angular/components/touchable-props.d.ts +2 -2
- package/build/angular/components/virtualized-list/cell-renderer-context.d.ts +12 -0
- package/build/angular/components/virtualized-list/cell-renderer-context.js +16 -0
- package/build/angular/components/virtualized-list/cell-renderer-context.js.map +1 -0
- package/build/angular/components/virtualized-list/directives.d.ts +26 -6
- package/build/angular/components/virtualized-list/directives.js +59 -5
- package/build/angular/components/virtualized-list/directives.js.map +1 -1
- package/build/angular/components/virtualized-list/index.d.ts +19 -15
- package/build/angular/components/virtualized-list/index.js +91 -61
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-list/list-bags.d.ts +5 -1
- package/build/angular/components/virtualized-list/list-bags.js +31 -19
- package/build/angular/components/virtualized-list/list-bags.js.map +1 -1
- package/build/angular/components/virtualized-list/list-effects.d.ts +2 -2
- package/build/angular/components/virtualized-list/list-effects.js +17 -27
- package/build/angular/components/virtualized-list/list-effects.js.map +1 -1
- package/build/angular/components/virtualized-list/list-handle.d.ts +4 -1
- package/build/angular/components/virtualized-list/list-handle.js +13 -3
- package/build/angular/components/virtualized-list/list-handle.js.map +1 -1
- package/build/angular/components/virtualized-list/list-inputs.d.ts +19 -5
- package/build/angular/components/virtualized-list/list-inputs.js +47 -4
- package/build/angular/components/virtualized-list/list-inputs.js.map +1 -1
- package/build/angular/components/virtualized-list/list-props.d.ts +9 -3
- package/build/angular/components/virtualized-list/list-rows.d.ts +25 -0
- package/build/angular/components/virtualized-list/list-rows.js +25 -0
- package/build/angular/components/virtualized-list/list-rows.js.map +1 -0
- package/build/angular/components/virtualized-list/list-styles.d.ts +4 -0
- package/build/angular/components/virtualized-list/list-styles.js +10 -2
- package/build/angular/components/virtualized-list/list-styles.js.map +1 -1
- package/build/angular/components/virtualized-list/list-template.d.ts +1 -1
- package/build/angular/components/virtualized-list/list-template.js +159 -73
- package/build/angular/components/virtualized-list/list-template.js.map +1 -1
- package/build/angular/components/virtualized-list/nested-scope.d.ts +6 -0
- package/build/angular/components/virtualized-list/nested-scope.js +17 -0
- package/build/angular/components/virtualized-list/nested-scope.js.map +1 -0
- package/build/angular/components/virtualized-section-list/directives.d.ts +21 -9
- package/build/angular/components/virtualized-section-list/directives.js +8 -28
- package/build/angular/components/virtualized-section-list/directives.js.map +1 -1
- package/build/angular/components/virtualized-section-list/index.d.ts +39 -60
- package/build/angular/components/virtualized-section-list/index.js +67 -33
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/section-cell.d.ts +29 -0
- package/build/angular/components/virtualized-section-list/section-cell.js +82 -0
- package/build/angular/components/virtualized-section-list/section-cell.js.map +1 -0
- package/build/angular/components/virtualized-section-list/section-list-props.d.ts +56 -0
- package/build/angular/components/virtualized-section-list/section-list-props.js +3 -0
- package/build/angular/components/virtualized-section-list/section-list-props.js.map +1 -0
- package/build/angular/components/virtualized-section-list/section-list-template.d.ts +1 -1
- package/build/angular/components/virtualized-section-list/section-list-template.js +34 -26
- package/build/angular/components/virtualized-section-list/section-list-template.js.map +1 -1
- package/build/angular/components.d.ts +8 -3
- package/build/angular/components.js +2 -1
- package/build/angular/components.js.map +1 -1
- package/build/angular/descriptor-to-angular/descriptor-host.d.ts +8 -0
- package/build/angular/descriptor-to-angular/descriptor-host.js +38 -0
- package/build/angular/descriptor-to-angular/descriptor-host.js.map +1 -0
- package/build/angular/descriptor-to-angular/index.d.ts +1 -0
- package/build/angular/descriptor-to-angular/index.js +4 -0
- package/build/angular/descriptor-to-angular/index.js.map +1 -1
- package/build/angular/element-base.d.ts +169 -0
- package/build/angular/element-base.js +304 -0
- package/build/angular/element-base.js.map +1 -0
- package/build/angular/element-props.d.ts +7 -7
- package/build/angular/element-text-input-native.d.ts +27 -0
- package/build/angular/element-text-input-native.js +52 -0
- package/build/angular/element-text-input-native.js.map +1 -0
- package/build/angular/elements-controls.d.ts +171 -0
- package/build/angular/elements-controls.js +394 -0
- package/build/angular/elements-controls.js.map +1 -0
- package/build/angular/elements-layout.d.ts +139 -0
- package/build/angular/elements-layout.js +276 -0
- package/build/angular/elements-layout.js.map +1 -0
- package/build/angular/elements-press.d.ts +103 -0
- package/build/angular/elements-press.js +239 -0
- package/build/angular/elements-press.js.map +1 -0
- package/build/angular/elements.d.ts +6 -516
- package/build/angular/elements.js +9 -1091
- package/build/angular/elements.js.map +1 -1
- package/build/angular/host-instance/index.d.ts +2 -0
- package/build/angular/host-instance/index.js +4 -4
- package/build/angular/host-instance/index.js.map +1 -1
- package/build/angular/index.d.ts +17 -9
- package/build/angular/index.js +24 -27
- package/build/angular/index.js.map +1 -1
- package/build/angular/modules/animated/create-animated-component.d.ts +1 -1
- package/build/angular/modules/animated/create-animated-component.js +1 -1
- package/build/angular/modules/animated/create-animated-component.js.map +1 -1
- package/build/angular/modules/animated/index.d.ts +54 -41
- package/build/angular/modules/animated/index.js +2 -26
- package/build/angular/modules/animated/index.js.map +1 -1
- package/build/angular/modules/app-registry/index.d.ts +3 -3
- package/build/angular/modules/app-registry/index.js +2 -2
- package/build/angular/modules/app-registry/index.js.map +1 -1
- package/build/angular/modules/status-bar/index.d.ts +9 -5
- package/build/angular/modules/status-bar/index.js +21 -10
- package/build/angular/modules/status-bar/index.js.map +1 -1
- package/build/angular/native-view-base.d.ts +10 -2
- package/build/angular/native-view-base.js +23 -2
- package/build/angular/native-view-base.js.map +1 -1
- package/build/angular/primitives/index.d.ts +4 -0
- package/build/angular/primitives/index.js +12 -0
- package/build/angular/primitives/index.js.map +1 -1
- package/build/angular/services/color-scheme.service.d.ts +1 -1
- package/build/angular/services/index.d.ts +1 -0
- package/build/angular/services/index.js +1 -0
- package/build/angular/services/index.js.map +1 -1
- package/build/angular/services/inject-event.d.ts +6 -0
- package/build/angular/services/inject-event.js +24 -0
- package/build/angular/services/inject-event.js.map +1 -0
- package/package.json +6 -6
- package/src/accessibility-inputs.ts +3 -0
- package/src/callback-host.ts +56 -8
- package/src/components/checkbox-props.ts +12 -0
- package/src/components/flat-list/flat-list-handle.ts +64 -0
- package/src/components/flat-list/flat-list-template.ts +16 -0
- package/src/components/flat-list/index.ts +6 -48
- package/src/components/image-inputs.ts +94 -0
- package/src/components/image-props-resolve.ts +172 -0
- package/src/components/image-shared.ts +26 -291
- package/src/components/input-accessory-view-props.ts +12 -8
- package/src/components/keyboard-avoiding-view/index.ts +39 -79
- package/src/components/layout-conformance-props.ts +8 -0
- package/src/components/modal/index.ts +42 -20
- package/src/components/refresh-control-props.ts +29 -25
- package/src/components/scroll-view-props.ts +84 -76
- package/src/components/section-list/index.ts +34 -37
- package/src/components/touchable-props.ts +6 -2
- package/src/components/virtualized-list/cell-renderer-context.ts +36 -0
- package/src/components/virtualized-list/directives.ts +84 -8
- package/src/components/virtualized-list/index.ts +118 -85
- package/src/components/virtualized-list/list-bags.ts +38 -19
- package/src/components/virtualized-list/list-effects.ts +20 -32
- package/src/components/virtualized-list/list-handle.ts +17 -4
- package/src/components/virtualized-list/list-inputs.ts +47 -0
- package/src/components/virtualized-list/list-props.ts +57 -50
- package/src/components/virtualized-list/list-rows.ts +66 -0
- package/src/components/virtualized-list/list-styles.ts +30 -1
- package/src/components/virtualized-list/list-template.ts +159 -73
- package/src/components/virtualized-list/nested-scope.ts +22 -0
- package/src/components/virtualized-section-list/directives.ts +41 -40
- package/src/components/virtualized-section-list/index.ts +114 -118
- package/src/components/virtualized-section-list/section-cell.ts +109 -0
- package/src/components/virtualized-section-list/section-list-props.ts +79 -0
- package/src/components/virtualized-section-list/section-list-template.ts +34 -26
- package/src/components.ts +9 -0
- package/src/descriptor-to-angular/descriptor-host.ts +27 -0
- package/src/descriptor-to-angular/index.ts +5 -0
- package/src/element-base.ts +289 -0
- package/src/element-props.ts +35 -33
- package/src/element-text-input-native.ts +31 -0
- package/src/elements-controls.ts +290 -0
- package/src/elements-layout.ts +168 -0
- package/src/elements-press.ts +153 -0
- package/src/elements.ts +76 -788
- package/src/host-instance/index.ts +4 -4
- package/src/index.ts +78 -23
- package/src/modules/animated/index.ts +2 -47
- package/src/modules/app-registry/index.ts +3 -1
- package/src/modules/status-bar/index.ts +24 -11
- package/src/native-view-base.ts +37 -2
- package/src/primitives/index.ts +7 -0
- package/src/services/color-scheme.service.ts +1 -1
- package/src/services/index.ts +1 -0
- package/src/services/inject-event.ts +52 -0
|
@@ -1,218 +1,12 @@
|
|
|
1
|
-
// The input surface and prop fold `
|
|
2
|
-
// (`ImageElement`), which folds its source via `registerImageBehavior`; `Animated.Image` stays a
|
|
3
|
-
// component and is the only consumer left, one flat file (`symbiote-file-layout`).
|
|
1
|
+
// The input surface and prop fold `Animated.Image` builds on, the `<image>` tag is `ImageElement`
|
|
4
2
|
import { EventEmitter, computed, signal } from '@angular/core';
|
|
5
3
|
import { gateWanted, injectGateDemand, } from '../gate-demand';
|
|
6
|
-
import { imageStatics,
|
|
7
|
-
import { isSymbioteEvent
|
|
4
|
+
import { imageStatics, } from '@symbiote-native/components';
|
|
5
|
+
import { isSymbioteEvent } from '@symbiote-native/engine';
|
|
6
|
+
import { resolveImageProps } from './image-props-resolve';
|
|
8
7
|
export { setImageSourceResolver } from '@symbiote-native/components';
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
'defaultSource',
|
|
12
|
-
'loadingIndicatorSource',
|
|
13
|
-
'style',
|
|
14
|
-
'resizeMode',
|
|
15
|
-
'resizeMethod',
|
|
16
|
-
'tintColor',
|
|
17
|
-
'blurRadius',
|
|
18
|
-
'capInsets',
|
|
19
|
-
'fadeDuration',
|
|
20
|
-
'progressiveRenderingEnabled',
|
|
21
|
-
'src',
|
|
22
|
-
'srcSet',
|
|
23
|
-
'alt',
|
|
24
|
-
'width',
|
|
25
|
-
'height',
|
|
26
|
-
'crossOrigin',
|
|
27
|
-
'referrerPolicy',
|
|
28
|
-
'testID',
|
|
29
|
-
'nativeID',
|
|
30
|
-
'accessible',
|
|
31
|
-
'accessibilityLabel',
|
|
32
|
-
'accessibilityHint',
|
|
33
|
-
'accessibilityRole',
|
|
34
|
-
'accessibilityState',
|
|
35
|
-
'accessibilityValue',
|
|
36
|
-
'accessibilityActions',
|
|
37
|
-
'accessibilityLabelledBy',
|
|
38
|
-
'importantForAccessibility',
|
|
39
|
-
'accessibilityLiveRegion',
|
|
40
|
-
'screenReaderFocusable',
|
|
41
|
-
'accessibilityViewIsModal',
|
|
42
|
-
'accessibilityElementsHidden',
|
|
43
|
-
'accessibilityIgnoresInvertColors',
|
|
44
|
-
'accessibilityLanguage',
|
|
45
|
-
'accessibilityRespondsToUserInteraction',
|
|
46
|
-
'accessibilityShowsLargeContentViewer',
|
|
47
|
-
'accessibilityLargeContentTitle',
|
|
48
|
-
'role',
|
|
49
|
-
'ariaLabel: aria-label',
|
|
50
|
-
'ariaLabelledBy: aria-labelledby',
|
|
51
|
-
'ariaLive: aria-live',
|
|
52
|
-
'ariaHidden: aria-hidden',
|
|
53
|
-
'ariaBusy: aria-busy',
|
|
54
|
-
'ariaChecked: aria-checked',
|
|
55
|
-
'ariaDisabled: aria-disabled',
|
|
56
|
-
'ariaExpanded: aria-expanded',
|
|
57
|
-
'ariaSelected: aria-selected',
|
|
58
|
-
'ariaModal: aria-modal',
|
|
59
|
-
'ariaValueMax: aria-valuemax',
|
|
60
|
-
'ariaValueMin: aria-valuemin',
|
|
61
|
-
'ariaValueNow: aria-valuenow',
|
|
62
|
-
'ariaValueText: aria-valuetext',
|
|
63
|
-
'onAccessibilityAction',
|
|
64
|
-
'onAccessibilityTap',
|
|
65
|
-
'onMagicTap',
|
|
66
|
-
'onAccessibilityEscape',
|
|
67
|
-
'onLoadStart',
|
|
68
|
-
'onLoad',
|
|
69
|
-
'onLoadEnd',
|
|
70
|
-
'onError',
|
|
71
|
-
'onProgress',
|
|
72
|
-
'onPartialLoad',
|
|
73
|
-
];
|
|
74
|
-
export const IMAGE_OUTPUTS = [
|
|
75
|
-
'accessibilityAction',
|
|
76
|
-
'accessibilityTap',
|
|
77
|
-
'magicTap',
|
|
78
|
-
'accessibilityEscape',
|
|
79
|
-
'loadStart',
|
|
80
|
-
'load',
|
|
81
|
-
'loadEnd',
|
|
82
|
-
'error',
|
|
83
|
-
'progress',
|
|
84
|
-
'partialLoad',
|
|
85
|
-
];
|
|
86
|
-
function asSource(value) {
|
|
87
|
-
if (typeof value === 'number')
|
|
88
|
-
return value;
|
|
89
|
-
if (typeof value === 'object' && value !== null)
|
|
90
|
-
return value;
|
|
91
|
-
return undefined;
|
|
92
|
-
}
|
|
93
|
-
function asResizeMode(value) {
|
|
94
|
-
if (value === 'cover' ||
|
|
95
|
-
value === 'contain' ||
|
|
96
|
-
value === 'stretch' ||
|
|
97
|
-
value === 'repeat' ||
|
|
98
|
-
value === 'center') {
|
|
99
|
-
return value;
|
|
100
|
-
}
|
|
101
|
-
return undefined;
|
|
102
|
-
}
|
|
103
|
-
function asString(value) {
|
|
104
|
-
return typeof value === 'string' ? value : undefined;
|
|
105
|
-
}
|
|
106
|
-
function asNumber(value) {
|
|
107
|
-
return typeof value === 'number' ? value : undefined;
|
|
108
|
-
}
|
|
109
|
-
function asCrossOrigin(value) {
|
|
110
|
-
return value === 'anonymous' || value === 'use-credentials'
|
|
111
|
-
? value
|
|
112
|
-
: undefined;
|
|
113
|
-
}
|
|
114
|
-
function asStyle(value) {
|
|
115
|
-
return typeof value === 'object' && value !== null ? value : undefined;
|
|
116
|
-
}
|
|
117
|
-
// Narrows a value out of the untyped animated prop bag. A runtime guard rather than a cast: the
|
|
118
|
-
// bag is built at runtime from merged animated values, so nothing upstream has proven the shape.
|
|
119
|
-
export function isImageEventCallback(value) {
|
|
120
|
-
return typeof value === 'function';
|
|
121
|
-
}
|
|
122
|
-
export function resolveImageProps(input) {
|
|
123
|
-
const passthrough = {
|
|
124
|
-
resizeMethod: input['resizeMethod'],
|
|
125
|
-
blurRadius: asNumber(input['blurRadius']),
|
|
126
|
-
capInsets: input['capInsets'],
|
|
127
|
-
fadeDuration: asNumber(input['fadeDuration']),
|
|
128
|
-
progressiveRenderingEnabled: typeof input['progressiveRenderingEnabled'] === 'boolean'
|
|
129
|
-
? input['progressiveRenderingEnabled']
|
|
130
|
-
: undefined,
|
|
131
|
-
testID: asString(input['testID']),
|
|
132
|
-
nativeID: asString(input['nativeID']),
|
|
133
|
-
accessible: typeof input['accessible'] === 'boolean'
|
|
134
|
-
? input['accessible']
|
|
135
|
-
: undefined,
|
|
136
|
-
accessibilityLabel: asString(input['accessibilityLabel']),
|
|
137
|
-
accessibilityHint: asString(input['accessibilityHint']),
|
|
138
|
-
accessibilityRole: input['accessibilityRole'],
|
|
139
|
-
accessibilityState: input['accessibilityState'],
|
|
140
|
-
accessibilityValue: input['accessibilityValue'],
|
|
141
|
-
accessibilityActions: input['accessibilityActions'],
|
|
142
|
-
accessibilityLabelledBy: input['accessibilityLabelledBy'],
|
|
143
|
-
importantForAccessibility: input['importantForAccessibility'],
|
|
144
|
-
accessibilityLiveRegion: input['accessibilityLiveRegion'],
|
|
145
|
-
screenReaderFocusable: typeof input['screenReaderFocusable'] === 'boolean'
|
|
146
|
-
? input['screenReaderFocusable']
|
|
147
|
-
: undefined,
|
|
148
|
-
accessibilityViewIsModal: typeof input['accessibilityViewIsModal'] === 'boolean'
|
|
149
|
-
? input['accessibilityViewIsModal']
|
|
150
|
-
: undefined,
|
|
151
|
-
accessibilityElementsHidden: typeof input['accessibilityElementsHidden'] === 'boolean'
|
|
152
|
-
? input['accessibilityElementsHidden']
|
|
153
|
-
: undefined,
|
|
154
|
-
accessibilityIgnoresInvertColors: typeof input['accessibilityIgnoresInvertColors'] === 'boolean'
|
|
155
|
-
? input['accessibilityIgnoresInvertColors']
|
|
156
|
-
: undefined,
|
|
157
|
-
accessibilityLanguage: asString(input['accessibilityLanguage']),
|
|
158
|
-
accessibilityRespondsToUserInteraction: typeof input['accessibilityRespondsToUserInteraction'] === 'boolean'
|
|
159
|
-
? input['accessibilityRespondsToUserInteraction']
|
|
160
|
-
: undefined,
|
|
161
|
-
accessibilityShowsLargeContentViewer: typeof input['accessibilityShowsLargeContentViewer'] === 'boolean'
|
|
162
|
-
? input['accessibilityShowsLargeContentViewer']
|
|
163
|
-
: undefined,
|
|
164
|
-
accessibilityLargeContentTitle: asString(input['accessibilityLargeContentTitle']),
|
|
165
|
-
role: input['role'],
|
|
166
|
-
'aria-label': asString(input['ariaLabel'] ?? input['aria-label']),
|
|
167
|
-
'aria-labelledby': asString(input['ariaLabelledBy'] ?? input['aria-labelledby']),
|
|
168
|
-
'aria-live': input['ariaLive'],
|
|
169
|
-
'aria-hidden': typeof input['ariaHidden'] === 'boolean'
|
|
170
|
-
? input['ariaHidden']
|
|
171
|
-
: undefined,
|
|
172
|
-
'aria-busy': typeof input['ariaBusy'] === 'boolean' ? input['ariaBusy'] : undefined,
|
|
173
|
-
'aria-checked': input['ariaChecked'],
|
|
174
|
-
'aria-disabled': typeof input['ariaDisabled'] === 'boolean'
|
|
175
|
-
? input['ariaDisabled']
|
|
176
|
-
: undefined,
|
|
177
|
-
'aria-expanded': typeof input['ariaExpanded'] === 'boolean'
|
|
178
|
-
? input['ariaExpanded']
|
|
179
|
-
: undefined,
|
|
180
|
-
'aria-selected': typeof input['ariaSelected'] === 'boolean'
|
|
181
|
-
? input['ariaSelected']
|
|
182
|
-
: undefined,
|
|
183
|
-
'aria-modal': typeof input['ariaModal'] === 'boolean' ? input['ariaModal'] : undefined,
|
|
184
|
-
'aria-valuemax': asNumber(input['ariaValueMax']),
|
|
185
|
-
'aria-valuemin': asNumber(input['ariaValueMin']),
|
|
186
|
-
'aria-valuenow': asNumber(input['ariaValueNow']),
|
|
187
|
-
'aria-valuetext': asString(input['ariaValueText']),
|
|
188
|
-
onAccessibilityAction: input['onAccessibilityAction'],
|
|
189
|
-
onAccessibilityTap: input['onAccessibilityTap'],
|
|
190
|
-
onMagicTap: input['onMagicTap'],
|
|
191
|
-
onAccessibilityEscape: input['onAccessibilityEscape'],
|
|
192
|
-
onLoadStart: input['onLoadStart'],
|
|
193
|
-
onLoad: input['onLoad'],
|
|
194
|
-
onLoadEnd: input['onLoadEnd'],
|
|
195
|
-
onError: input['onError'],
|
|
196
|
-
onProgress: input['onProgress'],
|
|
197
|
-
onPartialLoad: input['onPartialLoad'],
|
|
198
|
-
};
|
|
199
|
-
return renderImage({
|
|
200
|
-
source: asSource(input['source']),
|
|
201
|
-
defaultSource: asSource(input['defaultSource']),
|
|
202
|
-
loadingIndicatorSource: asSource(input['loadingIndicatorSource']),
|
|
203
|
-
style: asStyle(input['style']),
|
|
204
|
-
resizeMode: asResizeMode(input['resizeMode']),
|
|
205
|
-
tintColor: asString(input['tintColor']),
|
|
206
|
-
src: asString(input['src']),
|
|
207
|
-
srcSet: asString(input['srcSet']),
|
|
208
|
-
alt: asString(input['alt']),
|
|
209
|
-
width: asNumber(input['width']),
|
|
210
|
-
height: asNumber(input['height']),
|
|
211
|
-
crossOrigin: asCrossOrigin(input['crossOrigin']),
|
|
212
|
-
referrerPolicy: asString(input['referrerPolicy']),
|
|
213
|
-
passthrough: resolveAccessibilityProps(passthrough),
|
|
214
|
-
}).props;
|
|
215
|
-
}
|
|
8
|
+
export { IMAGE_INPUTS, IMAGE_OUTPUTS } from './image-inputs';
|
|
9
|
+
export { isImageEventCallback, resolveImageProps } from './image-props-resolve';
|
|
216
10
|
export class ImageBase {
|
|
217
11
|
constructor() {
|
|
218
12
|
this.accessibilityAction = new EventEmitter();
|
|
@@ -319,7 +113,15 @@ export class ImageBase {
|
|
|
319
113
|
this.onPartialLoad?.(event);
|
|
320
114
|
this.partialLoad.emit(event);
|
|
321
115
|
}
|
|
116
|
+
// Three groups, so no single getter holds every input name at once
|
|
322
117
|
get imageInputProps() {
|
|
118
|
+
return {
|
|
119
|
+
...this.sourceInputProps,
|
|
120
|
+
...this.accessibilityInputProps,
|
|
121
|
+
...this.handlerInputProps,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
get sourceInputProps() {
|
|
323
125
|
return {
|
|
324
126
|
source: this.source,
|
|
325
127
|
defaultSource: this.defaultSource,
|
|
@@ -327,6 +129,7 @@ export class ImageBase {
|
|
|
327
129
|
style: this.style,
|
|
328
130
|
resizeMode: this.resizeMode,
|
|
329
131
|
resizeMethod: this.resizeMethod,
|
|
132
|
+
resizeMultiplier: this.resizeMultiplier,
|
|
330
133
|
tintColor: this.tintColor,
|
|
331
134
|
blurRadius: this.blurRadius,
|
|
332
135
|
capInsets: this.capInsets,
|
|
@@ -339,6 +142,10 @@ export class ImageBase {
|
|
|
339
142
|
height: this.height,
|
|
340
143
|
crossOrigin: this.crossOrigin,
|
|
341
144
|
referrerPolicy: this.referrerPolicy,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
get accessibilityInputProps() {
|
|
148
|
+
return {
|
|
342
149
|
testID: this.testID,
|
|
343
150
|
nativeID: this.nativeID,
|
|
344
151
|
accessible: this.accessible,
|
|
@@ -374,6 +181,10 @@ export class ImageBase {
|
|
|
374
181
|
ariaValueMin: this.ariaValueMin,
|
|
375
182
|
ariaValueNow: this.ariaValueNow,
|
|
376
183
|
ariaValueText: this.ariaValueText,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
get handlerInputProps() {
|
|
187
|
+
return {
|
|
377
188
|
onAccessibilityAction: this.gatedAccessibilityHandler('accessibilityAction', this.onAccessibilityAction),
|
|
378
189
|
onAccessibilityTap: this.gatedAccessibilityHandler('accessibilityTap', this.onAccessibilityTap),
|
|
379
190
|
onMagicTap: this.gatedAccessibilityHandler('magicTap', this.onMagicTap),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-shared.js","sourceRoot":"","sources":["../../../src/components/image-shared.ts"],"names":[],"mappings":"AAAA,gGAAgG;AACh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EAAE,IAAI,CAAC,yBAAyB,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC;YACvE,qBAAqB,EAAE,IAAI,CAAC,yBAAyB,CACnD,qBAAqB,EACrB,IAAI,CAAC,qBAAqB,CAC3B;YACD,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC;IACJ,CAAC;IAiBS,kBAAkB;QAC1B,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC;IACvD,CAAC;IAcS,eAAe;QACvB,OAAO,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACjD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IAccessibilityProps, IAriaProps } from '@symbiote-native/components';
|
|
2
|
-
import type { IStyleProp, IViewStyle } from '@symbiote-native/engine';
|
|
3
|
-
export
|
|
2
|
+
import type { IColorValue, IStyleProp, IViewStyle } from '@symbiote-native/engine';
|
|
3
|
+
export type IAngularInputAccessoryViewProps = IAccessibilityProps & IAriaProps & {
|
|
4
4
|
nativeID?: string;
|
|
5
|
-
backgroundColor?:
|
|
5
|
+
backgroundColor?: IColorValue;
|
|
6
6
|
style?: IStyleProp<IViewStyle>;
|
|
7
|
-
}
|
|
7
|
+
};
|
|
@@ -5,14 +5,14 @@ import { AccessibilityEventsBase } from '../../accessibility-events';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "../../primitives/shared";
|
|
7
7
|
export type { IKeyboardAvoidingBehavior } from '@symbiote-native/components';
|
|
8
|
-
export
|
|
8
|
+
export type IAngularKeyboardAvoidingViewProps = IAccessibilityProps & IAriaProps & {
|
|
9
9
|
behavior?: IKeyboardAvoidingBehavior;
|
|
10
10
|
enabled?: boolean;
|
|
11
11
|
keyboardVerticalOffset?: number;
|
|
12
12
|
contentContainerStyle?: IStyleProp<IViewStyle>;
|
|
13
13
|
style?: IStyleProp<IViewStyle>;
|
|
14
14
|
onLayout?: (event: ISymbioteEvent) => void;
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
16
|
export type IAngularKeyboardAvoidingViewInputs = Omit<IAngularKeyboardAvoidingViewProps, 'onLayout' | 'onAccessibilityAction' | 'onAccessibilityTap' | 'onMagicTap' | 'onAccessibilityEscape'>;
|
|
17
17
|
export declare class KeyboardAvoidingView extends AccessibilityEventsBase implements IAngularKeyboardAvoidingViewInputs, OnInit, OnDestroy {
|
|
18
18
|
behavior?: IKeyboardAvoidingBehavior;
|
|
@@ -24,16 +24,13 @@ export declare class KeyboardAvoidingView extends AccessibilityEventsBase implem
|
|
|
24
24
|
testID?: string;
|
|
25
25
|
nativeID?: string;
|
|
26
26
|
private inset;
|
|
27
|
-
private frame?;
|
|
28
|
-
private initialHeight?;
|
|
29
27
|
private prefersCrossFadeTransitions;
|
|
30
28
|
private subscriptions;
|
|
31
29
|
private readonly changeDetector;
|
|
32
30
|
private readonly elementRef;
|
|
31
|
+
private readonly model;
|
|
33
32
|
ngOnInit(): void;
|
|
34
33
|
ngOnDestroy(): void;
|
|
35
|
-
private onShow;
|
|
36
|
-
private onHide;
|
|
37
34
|
handleLayout(event: unknown): void;
|
|
38
35
|
private get effectiveInset();
|
|
39
36
|
private get resolvedLayout();
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
// Full parity: behavior 'height'|'position'|'padding', enabled, keyboardVerticalOffset,
|
|
12
12
|
// contentContainerStyle, onLayout, plus the full a11y/aria surface every View carries.
|
|
13
13
|
import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, EventEmitter, inject, Input, Output, } from '@angular/core';
|
|
14
|
-
import {
|
|
15
|
-
import { Keyboard, Platform,
|
|
14
|
+
import { createKeyboardAvoidingModel, keyboardAvoidingEventNamesFor, readPrefersCrossFadeTransitions, resolveAccessibilityProps, resolveKeyboardAvoidingLayout, DEFAULT_VERTICAL_OFFSET, } from '@symbiote-native/components';
|
|
15
|
+
import { Keyboard, Platform, isSymbioteEvent, } from '@symbiote-native/engine';
|
|
16
16
|
import { AccessibilityEventsBase } from '../../accessibility-events';
|
|
17
17
|
import { anchorHostStyle, SymbioteHostPropsDirective, SymbioteStyleInputDirective, ViewHost, } from '../../primitives';
|
|
18
18
|
import * as i0 from "@angular/core";
|
|
@@ -25,31 +25,38 @@ export class KeyboardAvoidingView extends AccessibilityEventsBase {
|
|
|
25
25
|
// (see the class's `handleLayout`) — the engine's bubble() treats ANCHOR_HOST_COMPONENTS as
|
|
26
26
|
// transparent to listener lookup, so there is no double-fire.
|
|
27
27
|
this.layout = new EventEmitter();
|
|
28
|
-
//
|
|
29
|
-
// OnPush + zoneless means a keyboard event mutates it and pulls the view via markForCheck.
|
|
28
|
+
// Plain field, the model sets it and `markForCheck` pulls the OnPush view
|
|
30
29
|
this.inset = 0;
|
|
31
|
-
//
|
|
32
|
-
// field and NOT markForCheck'd when the promise lands: it is a device setting that cannot change
|
|
33
|
-
// mid-session, and it feeds only the NEXT keyboard event's math — never the current render — so
|
|
34
|
-
// under zoneless CD there is nothing to repaint at resolve time. The keyboard event that does use
|
|
35
|
-
// it already calls markForCheck itself.
|
|
30
|
+
// A device setting that cannot change mid-session, learning it must not repaint
|
|
36
31
|
this.prefersCrossFadeTransitions = false;
|
|
37
32
|
this.subscriptions = [];
|
|
38
33
|
this.changeDetector = inject(ChangeDetectorRef);
|
|
39
|
-
// This component's
|
|
40
|
-
// onto (see anchorHostStyle's doc comment) — NOT a ViewChild into the inner view (this
|
|
41
|
-
// component has none; the wrapper IS the outer template node hostProps binds onto).
|
|
34
|
+
// This component's own host, the anchor that `class` at the use site resolves onto
|
|
42
35
|
this.elementRef = inject(ElementRef);
|
|
36
|
+
// Options are read at event time, т.к. an `@Input` can change under a live subscription
|
|
37
|
+
this.model = createKeyboardAvoidingModel({
|
|
38
|
+
options: () => ({
|
|
39
|
+
behavior: this.behavior,
|
|
40
|
+
enabled: this.enabled !== false,
|
|
41
|
+
keyboardVerticalOffset: this.keyboardVerticalOffset ?? DEFAULT_VERTICAL_OFFSET,
|
|
42
|
+
}),
|
|
43
|
+
setInset: value => {
|
|
44
|
+
this.inset = value;
|
|
45
|
+
this.changeDetector.markForCheck();
|
|
46
|
+
},
|
|
47
|
+
prefersCrossFade: () => this.prefersCrossFadeTransitions,
|
|
48
|
+
});
|
|
43
49
|
}
|
|
44
50
|
ngOnInit() {
|
|
45
|
-
//
|
|
46
|
-
// the keyboard animation, Android the did* pair. The change-frame notification is deliberately
|
|
47
|
-
// absent — with an undocked/split/floating iOS keyboard it fires BEFORE the hide, so listening
|
|
48
|
-
// to it applies a frame captured mid-dismissal (RN KeyboardAvoidingView.js's own comment).
|
|
51
|
+
// iOS takes the `will*` pair so the view rides up with the keyboard, Android the `did*` pair
|
|
49
52
|
const events = keyboardAvoidingEventNamesFor(Platform.OS);
|
|
50
53
|
this.subscriptions = [
|
|
51
|
-
Keyboard.addListener(events.show, payload =>
|
|
52
|
-
|
|
54
|
+
Keyboard.addListener(events.show, payload => {
|
|
55
|
+
this.model.keyboardShown(payload);
|
|
56
|
+
// An unchanged inset skips `setInset`, the event still has to carry a new `@Input` down
|
|
57
|
+
this.changeDetector.markForCheck();
|
|
58
|
+
}),
|
|
59
|
+
Keyboard.addListener(events.hide, this.model.keyboardHidden),
|
|
53
60
|
];
|
|
54
61
|
// The core wrapper, not AccessibilityInfo directly: the engine's iOS getter REJECTS on a
|
|
55
62
|
// native error (RN parity), and nobody awaits this read, so an unwrapped call would surface
|
|
@@ -63,43 +70,11 @@ export class KeyboardAvoidingView extends AccessibilityEventsBase {
|
|
|
63
70
|
subscription.remove();
|
|
64
71
|
this.subscriptions = [];
|
|
65
72
|
}
|
|
66
|
-
|
|
67
|
-
const keyboard = readKeyboardFrame(payload);
|
|
68
|
-
const offset = this.keyboardVerticalOffset ?? DEFAULT_VERTICAL_OFFSET;
|
|
69
|
-
const next = computeInset(this.frame, keyboard, offset, {
|
|
70
|
-
// Read off the field at event time, not captured when the subscription was built: `behavior`
|
|
71
|
-
// is an @Input that can change under a long-lived subscription, and a stale one keeps
|
|
72
|
-
// applying the old mode's math (it gates the previous-inset correction below).
|
|
73
|
-
behavior: this.behavior,
|
|
74
|
-
// The inset CURRENTLY applied (RN's this.state.bottom), read off the field at event time so
|
|
75
|
-
// 'height' mode's fixpoint correction sees the live value: that mode SHRINKS the wrapper by
|
|
76
|
-
// the inset, so the next onLayout reports a frame shorter by exactly that much.
|
|
77
|
-
previousInset: this.inset,
|
|
78
|
-
prefersCrossFadeTransitions: this.prefersCrossFadeTransitions,
|
|
79
|
-
});
|
|
80
|
-
// RN's `_updateBottomIfNecessary` skips the animation when the inset did not change.
|
|
81
|
-
if (next !== this.inset)
|
|
82
|
-
configureKeyboardAvoidingAnimation(readKeyboardAnimationTiming(payload), this.enabled !== false);
|
|
83
|
-
dlog(`KeyboardAvoidingView show -> inset ${next}`);
|
|
84
|
-
this.inset = next;
|
|
85
|
-
this.changeDetector.markForCheck();
|
|
86
|
-
}
|
|
87
|
-
onHide() {
|
|
88
|
-
dlog('KeyboardAvoidingView hide -> inset 0');
|
|
89
|
-
this.inset = 0;
|
|
90
|
-
this.changeDetector.markForCheck();
|
|
91
|
-
}
|
|
92
|
-
// The wrapper's onLayout measures the frame BEFORE forwarding to the caller's onLayout, so the
|
|
93
|
-
// next keyboard event's inset math has the view's real position (React/Vue's handleLayout).
|
|
73
|
+
// Measured before the caller's `layout` output fires
|
|
94
74
|
handleLayout(event) {
|
|
95
75
|
if (!isSymbioteEvent(event))
|
|
96
76
|
return;
|
|
97
|
-
|
|
98
|
-
if (measured !== undefined) {
|
|
99
|
-
this.frame = measured;
|
|
100
|
-
if (this.initialHeight === undefined)
|
|
101
|
-
this.initialHeight = measured.height;
|
|
102
|
-
}
|
|
77
|
+
this.model.laidOut(event.nativeEvent.layout);
|
|
103
78
|
this.layout.emit(event);
|
|
104
79
|
}
|
|
105
80
|
// RN gates every inset on `enabled ?? true`; only an explicit `false` disables, forcing the inset
|
|
@@ -107,14 +82,12 @@ export class KeyboardAvoidingView extends AccessibilityEventsBase {
|
|
|
107
82
|
get effectiveInset() {
|
|
108
83
|
return this.enabled === false ? 0 : this.inset;
|
|
109
84
|
}
|
|
110
|
-
//
|
|
111
|
-
// of RN's render). Recomputed per CD pass, the Angular twin of React/Vue's per-render call.
|
|
112
|
-
// Named `resolvedLayout`, not `layout` — that name is now the onLayout @Output() EventEmitter.
|
|
85
|
+
// Not `layout`, that name is the `onLayout` output
|
|
113
86
|
get resolvedLayout() {
|
|
114
87
|
return resolveKeyboardAvoidingLayout({
|
|
115
88
|
behavior: this.behavior,
|
|
116
89
|
effectiveInset: this.effectiveInset,
|
|
117
|
-
initialHeight: this.initialHeight,
|
|
90
|
+
initialHeight: this.model.initialHeight(),
|
|
118
91
|
style: this.style,
|
|
119
92
|
contentContainerStyle: this.contentContainerStyle,
|
|
120
93
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/keyboard-avoiding-view/index.ts"],"names":[],"mappings":"AAAA,wFAAwF;AACxF,6FAA6F;AAC7F,0GAA0G;AAC1G,mGAAmG;AACnG,qGAAqG;AACrG,oGAAoG;AACpG,4FAA4F;AAC5F,kGAAkG;AAClG,sEAAsE;AACtE,EAAE;AACF,wFAAwF;AACxF,uFAAuF;AAEvF,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,MAAM,EACN,KAAK,EACL,MAAM,GAGP,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":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AQ,EAAE,0BAA0B,CAAC;oBAC/C,eAAe,EAAE,uBAAuB,CAAC,MAAM;oBAC/C,6FAA6F;oBAC7F,8FAA8F;oBAC9F,6FAA6F;oBAC7F,+FAA+F;oBAC/F,gGAAgG;oBAChG,kGAAkG;oBAClG,mGAAmG;oBACnG,6FAA6F;oBAC7F,sBAAsB;oBACtB,QAAQ,EAAE;;;;;;;;;;GAUT;iBACF;;sBAKE,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBAKL,MAAM;;sBACN,KAAK;;sBACL,KAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout-conformance-props.js","sourceRoot":"","sources":["../../../src/components/layout-conformance-props.ts"],"names":[],"mappings":""}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { EventEmitter, type DoCheck, type OnChanges, type OnInit, type SimpleChanges } from '@angular/core';
|
|
2
2
|
import { type IAccessibilityProps, type IAriaProps, type IModalAnimationType, type IModalOrientation, type IModalPresentationStyle } from '@symbiote-native/components';
|
|
3
|
-
import { type IStyleProp, type ISymbioteEvent, type IViewStyle } from '@symbiote-native/engine';
|
|
3
|
+
import { type IColorValue, type IStyleProp, type ISymbioteEvent, type IViewStyle } from '@symbiote-native/engine';
|
|
4
4
|
import { AccessibilityEventsBase } from '../../accessibility-events';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
import * as i1 from "../../primitives/shared";
|
|
7
7
|
export type { IModalAnimationType, IModalPresentationStyle, IModalOrientation, IModalOrientationChangeEvent, } from '@symbiote-native/components';
|
|
8
|
-
export
|
|
8
|
+
export type IAngularModalProps = IAccessibilityProps & IAriaProps & {
|
|
9
9
|
visible?: boolean;
|
|
10
10
|
transparent?: boolean;
|
|
11
|
-
backdropColor?:
|
|
11
|
+
backdropColor?: IColorValue;
|
|
12
12
|
animationType?: IModalAnimationType;
|
|
13
13
|
presentationStyle?: IModalPresentationStyle;
|
|
14
14
|
supportedOrientations?: ReadonlyArray<IModalOrientation>;
|
|
@@ -21,7 +21,7 @@ export interface IAngularModalProps extends IAccessibilityProps, IAriaProps {
|
|
|
21
21
|
onRequestClose?: () => void;
|
|
22
22
|
onOrientationChange?: (event: ISymbioteEvent) => void;
|
|
23
23
|
style?: IStyleProp<IViewStyle>;
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
25
|
export type IAngularModalInputs = Omit<IAngularModalProps, 'onShow' | 'onDismiss' | 'onRequestClose' | 'onOrientationChange' | 'onAccessibilityAction' | 'onAccessibilityTap' | 'onMagicTap' | 'onAccessibilityEscape'>;
|
|
26
26
|
export declare class Modal extends AccessibilityEventsBase implements IAngularModalInputs, OnInit, OnChanges, DoCheck {
|
|
27
27
|
readonly show: EventEmitter<void>;
|
|
@@ -29,7 +29,7 @@ export declare class Modal extends AccessibilityEventsBase implements IAngularMo
|
|
|
29
29
|
readonly requestClose: EventEmitter<void>;
|
|
30
30
|
visible?: boolean;
|
|
31
31
|
transparent?: boolean;
|
|
32
|
-
backdropColor?:
|
|
32
|
+
backdropColor?: IColorValue;
|
|
33
33
|
animationType?: IModalAnimationType;
|
|
34
34
|
presentationStyle?: IModalPresentationStyle;
|
|
35
35
|
supportedOrientations?: ReadonlyArray<IModalOrientation>;
|
|
@@ -44,6 +44,7 @@ export declare class Modal extends AccessibilityEventsBase implements IAngularMo
|
|
|
44
44
|
private readonly changeDetector;
|
|
45
45
|
private readonly elementRef;
|
|
46
46
|
ngOnInit(): void;
|
|
47
|
+
private warnOnMisuse;
|
|
47
48
|
private readonly hostPropsRevision;
|
|
48
49
|
private lastAnchorStyle;
|
|
49
50
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
// show (ngOnChanges) and dropped by the native dismiss on iOS, reusing renderModal's resolved props.
|
|
7
7
|
// The user children nest UNDER the container View via <ng-content>.
|
|
8
8
|
import { CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Component, computed, ElementRef, EventEmitter, inject, Input, Output, signal, } from '@angular/core';
|
|
9
|
-
import { createInitialModalState, isModalVisible, modalReducer, modalVisibilityAction, renderModal, resolveAccessibilityProps, shouldRenderModal, } from '@symbiote-native/components';
|
|
9
|
+
import { createInitialModalState, isModalVisible, modalReducer, modalVisibilityAction, renderModal, resolveAccessibilityProps, shouldRenderModal, warnAboutModalProps, } from '@symbiote-native/components';
|
|
10
10
|
import { dlog, isSymbioteEvent, Platform, } from '@symbiote-native/engine';
|
|
11
11
|
import { AccessibilityEventsBase } from '../../accessibility-events';
|
|
12
|
+
import { ListScopeProvider, NO_LIST_SCOPE, } from '../virtualized-list/nested-scope';
|
|
12
13
|
import { anchorHostStyle, ModalHost, SymbioteHostPropsDirective, SymbioteStyleInputDirective, ViewHost, } from '../../primitives';
|
|
13
14
|
import * as i0 from "@angular/core";
|
|
14
15
|
import * as i1 from "../../primitives/shared";
|
|
@@ -68,10 +69,22 @@ export class Modal extends AccessibilityEventsBase {
|
|
|
68
69
|
ngOnInit() {
|
|
69
70
|
this.state = createInitialModalState(isModalVisible(this.visible));
|
|
70
71
|
}
|
|
72
|
+
// RN checks on mount and on every update, a dev build only
|
|
73
|
+
warnOnMisuse() {
|
|
74
|
+
warnAboutModalProps({
|
|
75
|
+
presentationStyle: this.presentationStyle,
|
|
76
|
+
transparent: this.transparent,
|
|
77
|
+
navigationBarTranslucent: this.navigationBarTranslucent,
|
|
78
|
+
statusBarTranslucent: this.statusBarTranslucent,
|
|
79
|
+
allowSwipeDismissal: this.allowSwipeDismissal,
|
|
80
|
+
onRequestClose: this.requestClose.observed,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
71
83
|
ngOnChanges(changes) {
|
|
72
84
|
// Before the keep-alive early-return below: this is the single moment Angular has finished
|
|
73
85
|
// writing every changed @Input, and `hostProps` depends on far more than `visible`.
|
|
74
86
|
this.hostPropsRevision.update(revision => revision + 1);
|
|
87
|
+
this.warnOnMisuse();
|
|
75
88
|
const visibleChange = changes.visible;
|
|
76
89
|
// First change is reflected by the ngOnInit seed; only later toggles drive the keep-alive.
|
|
77
90
|
if (visibleChange === undefined || visibleChange.firstChange)
|
|
@@ -153,7 +166,7 @@ export class Modal extends AccessibilityEventsBase {
|
|
|
153
166
|
return { testID: this.testID, ...this.accessibilityInputProps() };
|
|
154
167
|
}
|
|
155
168
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Modal, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
156
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: Modal, isStandalone: true, selector: "Modal", inputs: { visible: "visible", transparent: "transparent", backdropColor: "backdropColor", animationType: "animationType", presentationStyle: "presentationStyle", supportedOrientations: "supportedOrientations", hardwareAccelerated: "hardwareAccelerated", statusBarTranslucent: "statusBarTranslucent", navigationBarTranslucent: "navigationBarTranslucent", allowSwipeDismissal: "allowSwipeDismissal", style: "style", testID: "testID" }, outputs: { show: "show", dismiss: "dismiss", requestClose: "requestClose", orientationChange: "orientationChange" }, usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: i1.SymbioteStyleInputDirective, inputs: ["style", "style"] }], ngImport: i0, template: `
|
|
169
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: Modal, isStandalone: true, selector: "Modal", inputs: { visible: "visible", transparent: "transparent", backdropColor: "backdropColor", animationType: "animationType", presentationStyle: "presentationStyle", supportedOrientations: "supportedOrientations", hardwareAccelerated: "hardwareAccelerated", statusBarTranslucent: "statusBarTranslucent", navigationBarTranslucent: "navigationBarTranslucent", allowSwipeDismissal: "allowSwipeDismissal", style: "style", testID: "testID" }, outputs: { show: "show", dismiss: "dismiss", requestClose: "requestClose", orientationChange: "orientationChange" }, providers: [{ provide: ListScopeProvider, useValue: NO_LIST_SCOPE }], usesInheritance: true, usesOnChanges: true, hostDirectives: [{ directive: i1.SymbioteStyleInputDirective, inputs: ["style", "style"] }], ngImport: i0, template: `
|
|
157
170
|
@if (shouldRender) {
|
|
158
171
|
<modal
|
|
159
172
|
[symbioteHostProps]="hostProps()"
|
|
@@ -179,6 +192,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
179
192
|
],
|
|
180
193
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
181
194
|
imports: [ModalHost, ViewHost, SymbioteHostPropsDirective],
|
|
195
|
+
// The content sits outside the list's scroll, so a list in it is not nested in that list
|
|
196
|
+
providers: [{ provide: ListScopeProvider, useValue: NO_LIST_SCOPE }],
|
|
182
197
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
183
198
|
template: `
|
|
184
199
|
@if (shouldRender) {
|