@symbiote-native/angular 0.6.1 → 0.7.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 +1 -1
- package/bin/symbiote-angular-dev.cjs +20 -19
- package/build/angular/anchor-host-registry.js +2 -2
- package/build/angular/anchor-host-registry.js.map +1 -1
- package/build/angular/components/activity-indicator/index.android.d.ts +2 -1
- package/build/angular/components/activity-indicator/index.android.js +6 -3
- package/build/angular/components/activity-indicator/index.android.js.map +1 -1
- package/build/angular/components/activity-indicator/index.ios.d.ts +2 -1
- package/build/angular/components/activity-indicator/index.ios.js +6 -3
- package/build/angular/components/activity-indicator/index.ios.js.map +1 -1
- package/build/angular/components/activity-indicator/shared.js +3 -3
- package/build/angular/components/button.d.ts +4 -2
- package/build/angular/components/button.js +28 -17
- package/build/angular/components/button.js.map +1 -1
- package/build/angular/components/flat-list/index.d.ts +5 -3
- package/build/angular/components/flat-list/index.js +35 -38
- package/build/angular/components/flat-list/index.js.map +1 -1
- package/build/angular/components/image/index.android.d.ts +8 -3
- package/build/angular/components/image/index.android.js +39 -9
- package/build/angular/components/image/index.android.js.map +1 -1
- package/build/angular/components/image/index.ios.d.ts +8 -3
- package/build/angular/components/image/index.ios.js +39 -9
- package/build/angular/components/image/index.ios.js.map +1 -1
- package/build/angular/components/image/shared.d.ts +4 -1
- package/build/angular/components/image/shared.js +33 -2
- package/build/angular/components/image/shared.js.map +1 -1
- package/build/angular/components/image-background.d.ts +2 -1
- package/build/angular/components/image-background.js +6 -4
- package/build/angular/components/image-background.js.map +1 -1
- package/build/angular/components/input-accessory-view/index.d.ts +9 -4
- package/build/angular/components/input-accessory-view/index.js +43 -9
- package/build/angular/components/input-accessory-view/index.js.map +1 -1
- package/build/angular/components/keyboard-avoiding-view/index.d.ts +2 -1
- package/build/angular/components/keyboard-avoiding-view/index.js +6 -4
- package/build/angular/components/keyboard-avoiding-view/index.js.map +1 -1
- package/build/angular/components/modal/index.d.ts +11 -8
- package/build/angular/components/modal/index.js +45 -28
- package/build/angular/components/modal/index.js.map +1 -1
- package/build/angular/components/pressable/index.d.ts +11 -5
- package/build/angular/components/pressable/index.js +61 -12
- package/build/angular/components/pressable/index.js.map +1 -1
- package/build/angular/components/refresh-control/index.d.ts +8 -4
- package/build/angular/components/refresh-control/index.js +52 -16
- package/build/angular/components/refresh-control/index.js.map +1 -1
- package/build/angular/components/safe-area-view/index.d.ts +9 -4
- package/build/angular/components/safe-area-view/index.js +46 -9
- package/build/angular/components/safe-area-view/index.js.map +1 -1
- package/build/angular/components/scroll-view/index.android.d.ts +2 -3
- package/build/angular/components/scroll-view/index.android.js +49 -52
- package/build/angular/components/scroll-view/index.android.js.map +1 -1
- package/build/angular/components/scroll-view/index.ios.d.ts +2 -3
- package/build/angular/components/scroll-view/index.ios.js +15 -17
- package/build/angular/components/scroll-view/index.ios.js.map +1 -1
- package/build/angular/components/scroll-view/projection.d.ts +3 -0
- package/build/angular/components/scroll-view/projection.js +68 -7
- package/build/angular/components/scroll-view/projection.js.map +1 -1
- package/build/angular/components/scroll-view/shared.d.ts +14 -5
- package/build/angular/components/scroll-view/shared.js +198 -69
- package/build/angular/components/scroll-view/shared.js.map +1 -1
- package/build/angular/components/scroll-view/sticky-header.js +14 -19
- package/build/angular/components/scroll-view/sticky-header.js.map +1 -1
- package/build/angular/components/section-list/index.d.ts +2 -1
- package/build/angular/components/section-list/index.js +31 -39
- package/build/angular/components/section-list/index.js.map +1 -1
- package/build/angular/components/switch/index.android.d.ts +7 -3
- package/build/angular/components/switch/index.android.js +38 -10
- package/build/angular/components/switch/index.android.js.map +1 -1
- package/build/angular/components/switch/index.ios.d.ts +7 -3
- package/build/angular/components/switch/index.ios.js +38 -10
- package/build/angular/components/switch/index.ios.js.map +1 -1
- package/build/angular/components/switch/shared.d.ts +12 -3
- package/build/angular/components/switch/shared.js +66 -5
- package/build/angular/components/switch/shared.js.map +1 -1
- package/build/angular/components/text-input.d.ts +10 -2
- package/build/angular/components/text-input.js +46 -6
- package/build/angular/components/text-input.js.map +1 -1
- package/build/angular/components/touchable/index.d.ts +17 -8
- package/build/angular/components/touchable/index.js +78 -19
- package/build/angular/components/touchable/index.js.map +1 -1
- package/build/angular/components/touchable-native-feedback/index.d.ts +6 -3
- package/build/angular/components/touchable-native-feedback/index.js +61 -25
- package/build/angular/components/touchable-native-feedback/index.js.map +1 -1
- package/build/angular/components/virtualized-list/directives.js +18 -18
- package/build/angular/components/virtualized-list/index.d.ts +12 -4
- package/build/angular/components/virtualized-list/index.js +163 -68
- package/build/angular/components/virtualized-list/index.js.map +1 -1
- package/build/angular/components/virtualized-section-list/directives.js +12 -12
- package/build/angular/components/virtualized-section-list/index.d.ts +2 -1
- package/build/angular/components/virtualized-section-list/index.js +6 -4
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/components.d.ts +1 -1
- package/build/angular/components.js +5 -0
- package/build/angular/components.js.map +1 -1
- package/build/angular/create-portal/index.js +29 -35
- package/build/angular/create-portal/index.js.map +1 -1
- package/build/angular/create-tunnel/index.js +19 -22
- package/build/angular/create-tunnel/index.js.map +1 -1
- package/build/angular/descriptor-to-angular/index.js +3 -3
- package/build/angular/index.d.ts +4 -2
- package/build/angular/index.js +2 -2
- package/build/angular/index.js.map +1 -1
- package/build/angular/modules/animated/animated-leaf-binder.d.ts +1 -7
- package/build/angular/modules/animated/animated-leaf-binder.js +22 -72
- package/build/angular/modules/animated/animated-leaf-binder.js.map +1 -1
- package/build/angular/modules/animated/create-animated-component.d.ts +11 -6
- package/build/angular/modules/animated/create-animated-component.js +83 -50
- package/build/angular/modules/animated/create-animated-component.js.map +1 -1
- package/build/angular/modules/app-registry/index.js.map +1 -1
- package/build/angular/modules/status-bar/index.js +3 -3
- package/build/angular/primitives/index.d.ts +1 -1
- package/build/angular/primitives/index.js +46 -46
- package/build/angular/primitives/index.js.map +1 -1
- package/build/angular/primitives/shared.d.ts +39 -1
- package/build/angular/primitives/shared.js +110 -9
- package/build/angular/primitives/shared.js.map +1 -1
- package/build/angular/render/index.js +23 -35
- package/build/angular/render/index.js.map +1 -1
- package/build/angular/services/color-scheme.service.js +3 -3
- package/build/angular/services/window-dimensions.service.js +3 -3
- package/package.json +13 -8
- package/src/anchor-host-registry.ts +2 -2
- package/src/components/activity-indicator/index.android.ts +2 -0
- package/src/components/activity-indicator/index.ios.ts +2 -0
- package/src/components/button.ts +28 -14
- package/src/components/flat-list/index.ts +34 -36
- package/src/components/image/index.android.ts +50 -6
- package/src/components/image/index.ios.ts +50 -6
- package/src/components/image/shared.ts +34 -2
- package/src/components/image-background.ts +2 -1
- package/src/components/input-accessory-view/index.ts +42 -4
- package/src/components/keyboard-avoiding-view/index.ts +7 -1
- package/src/components/modal/index.ts +51 -26
- package/src/components/pressable/index.ts +67 -8
- package/src/components/refresh-control/index.ts +54 -12
- package/src/components/safe-area-view/index.ts +50 -5
- package/src/components/scroll-view/index.android.ts +34 -41
- package/src/components/scroll-view/index.ios.ts +10 -21
- package/src/components/scroll-view/projection.ts +79 -7
- package/src/components/scroll-view/shared.ts +223 -68
- package/src/components/scroll-view/sticky-header.ts +11 -16
- package/src/components/section-list/index.ts +27 -36
- package/src/components/switch/index.android.ts +48 -7
- package/src/components/switch/index.ios.ts +48 -7
- package/src/components/switch/shared.ts +79 -3
- package/src/components/text-input.ts +52 -2
- package/src/components/touchable/index.ts +76 -16
- package/src/components/touchable-native-feedback/index.ts +62 -21
- package/src/components/virtualized-list/index.ts +137 -44
- package/src/components/virtualized-section-list/index.ts +2 -1
- package/src/components.ts +5 -0
- package/src/create-portal/index.ts +23 -29
- package/src/create-tunnel/index.ts +13 -16
- package/src/index.ts +30 -1
- package/src/modules/animated/animated-leaf-binder.ts +28 -77
- package/src/modules/animated/create-animated-component.ts +75 -36
- package/src/modules/app-registry/index.ts +6 -8
- package/src/primitives/index.ts +1 -0
- package/src/primitives/shared.ts +102 -3
- package/src/render/index.ts +23 -35
- package/build/angular/modules/animated/animated-leaf-binder/index.d.ts +0 -14
- package/build/angular/modules/animated/animated-leaf-binder/index.js +0 -91
- package/build/angular/modules/animated/animated-leaf-binder/index.js.map +0 -1
- package/src/__tests__/responder-change-detection.test.ts +0 -102
- package/src/__tests__/responder-nested-cd.test.ts +0 -113
- package/src/angular-gaps.test.ts +0 -142
- package/src/angular-imports.test.ts +0 -100
- package/src/components/activity-indicator/activity-indicator-class-style.test.ts +0 -44
- package/src/components/activity-indicator/activity-indicator.test.ts +0 -131
- package/src/components/flat-list/column-wrapper-style-class.test.ts +0 -116
- package/src/components/flat-list/flat-list-array-style.test.ts +0 -131
- package/src/components/flat-list/flat-list-class-style.test.ts +0 -74
- package/src/components/flat-list/flat-list-scroll-containment.test.ts +0 -107
- package/src/components/flat-list/flat-list.test.ts +0 -99
- package/src/components/image/image-class-style.test.ts +0 -46
- package/src/components/image-background-class-style.test.ts +0 -48
- package/src/components/image-background-style-class.test.ts +0 -79
- package/src/components/input-accessory-view/input-accessory-view.test.ts +0 -43
- package/src/components/keyboard-avoiding-view/keyboard-avoiding-view.test.ts +0 -54
- package/src/components/modal/modal.test.ts +0 -43
- package/src/components/pressable/pressable.test.ts +0 -85
- package/src/components/refresh-control/refresh-control.test.ts +0 -41
- package/src/components/safe-area-view/safe-area-view.test.ts +0 -43
- package/src/components/scroll-view/android-scroll-view-axis-projection.test.ts +0 -123
- package/src/components/scroll-view/content-container-style-class.test.ts +0 -75
- package/src/components/scroll-view/scroll-view-class-style.test.ts +0 -134
- package/src/components/scroll-view/scroll-view-projection.test.ts +0 -194
- package/src/components/switch/android-switch-class.test.ts +0 -42
- package/src/components/switch/switch.test.ts +0 -92
- package/src/components/text-input-class-style.test.ts +0 -54
- package/src/components/touchable/touchable.test.ts +0 -102
- package/src/components/touchable-native-feedback/touchable-native-feedback.test.ts +0 -49
- package/src/components/virtualized-list/virtualized-list-class-style.test.ts +0 -76
- package/src/components/virtualized-section-list/virtualized-section-list-class-style.test.ts +0 -60
- package/src/create-portal/create-portal.test.ts +0 -90
- package/src/create-tunnel/create-tunnel.test.ts +0 -120
- package/src/descriptor-to-angular/descriptor-outlet.test.ts +0 -94
- package/src/host-instance/host-instance.test.ts +0 -49
- package/src/modules/animated/animated-leaf-binder/animated-leaf-binder.test.ts +0 -116
- package/src/modules/animated/animated-leaf-binder/index.ts +0 -101
- package/src/modules/animated/animated-leaf-binder.test.ts +0 -116
- package/src/modules/animated/animated-scroll-view.test.ts +0 -102
- package/src/modules/app-registry/app-registry.test.ts +0 -106
- package/src/modules/status-bar/status-bar.test.ts +0 -50
- package/src/render/render.test.ts +0 -147
- package/src/renderer/renderer.test.ts +0 -203
- package/src/services/services.test.ts +0 -163
|
@@ -4,6 +4,7 @@ import { type IStyleProp, type ISymbioteEvent, type ISymbioteNode, type IViewSty
|
|
|
4
4
|
import { VListEmptyDirective, VListFooterDirective, VListHeaderDirective, VListSeparatorDirective, type IVListSeparatorContext } from '../virtualized-list';
|
|
5
5
|
import { VSectionFooterDirective, VSectionHeaderDirective, VSectionItemDirective, VSectionSeparatorDirective, type IVirtualizedSectionListProps } from '../virtualized-section-list';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
import * as i1 from "../../primitives/shared";
|
|
7
8
|
export type { ISection } from '@symbiote-native/components';
|
|
8
9
|
export type ISectionListHandle = IVirtualizedSectionListHandle;
|
|
9
10
|
export { VSectionFooterDirective, VSectionHeaderDirective, VSectionItemDirective, VSectionSeparatorDirective, } from '../virtualized-section-list';
|
|
@@ -112,5 +113,5 @@ export declare class SectionList<ItemT = unknown> implements ISectionListInputs<
|
|
|
112
113
|
getScrollNode(): ISymbioteNode | null;
|
|
113
114
|
recordInteraction(): void;
|
|
114
115
|
static ɵfac: i0.ɵɵFactoryDeclaration<SectionList<any>, never>;
|
|
115
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SectionList<any>, "SectionList", never, { "sections": { "alias": "sections"; "required": true; }; "keyExtractor": { "alias": "keyExtractor"; "required": false; }; "stickySectionHeadersEnabled": { "alias": "stickySectionHeadersEnabled"; "required": false; }; "extraData": { "alias": "extraData"; "required": false; }; "onEndReachedThreshold": { "alias": "onEndReachedThreshold"; "required": false; }; "onStartReachedThreshold": { "alias": "onStartReachedThreshold"; "required": false; }; "refreshing": { "alias": "refreshing"; "required": false; }; "progressViewOffset": { "alias": "progressViewOffset"; "required": false; }; "initialNumToRender": { "alias": "initialNumToRender"; "required": false; }; "initialScrollIndex": { "alias": "initialScrollIndex"; "required": false; }; "maxToRenderPerBatch": { "alias": "maxToRenderPerBatch"; "required": false; }; "updateCellsBatchingPeriod": { "alias": "updateCellsBatchingPeriod"; "required": false; }; "windowSize": { "alias": "windowSize"; "required": false; }; "inverted": { "alias": "inverted"; "required": false; }; "maintainVisibleContentPosition": { "alias": "maintainVisibleContentPosition"; "required": false; }; "onScroll": { "alias": "onScroll"; "required": false; }; "onScrollBeginDrag": { "alias": "onScrollBeginDrag"; "required": false; }; "onScrollEndDrag": { "alias": "onScrollEndDrag"; "required": false; }; "onMomentumScrollBegin": { "alias": "onMomentumScrollBegin"; "required": false; }; "onMomentumScrollEnd": { "alias": "onMomentumScrollEnd"; "required": false; }; "scrollEventThrottle": { "alias": "scrollEventThrottle"; "required": false; }; "keyboardShouldPersistTaps": { "alias": "keyboardShouldPersistTaps"; "required": false; }; "keyboardDismissMode": { "alias": "keyboardDismissMode"; "required": false; }; "style": { "alias": "style"; "required": false; }; "contentContainerStyle": { "alias": "contentContainerStyle"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; "accessible": { "alias": "accessible"; "required": false; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; }; "accessibilityActions": { "alias": "accessibilityActions"; "required": false; }; "accessibilityLabelledBy": { "alias": "accessibilityLabelledBy"; "required": false; }; "importantForAccessibility": { "alias": "importantForAccessibility"; "required": false; }; "accessibilityLiveRegion": { "alias": "accessibilityLiveRegion"; "required": false; }; "screenReaderFocusable": { "alias": "screenReaderFocusable"; "required": false; }; "accessibilityViewIsModal": { "alias": "accessibilityViewIsModal"; "required": false; }; "accessibilityElementsHidden": { "alias": "accessibilityElementsHidden"; "required": false; }; "accessibilityIgnoresInvertColors": { "alias": "accessibilityIgnoresInvertColors"; "required": false; }; "accessibilityLanguage": { "alias": "accessibilityLanguage"; "required": false; }; "accessibilityRespondsToUserInteraction": { "alias": "accessibilityRespondsToUserInteraction"; "required": false; }; "accessibilityShowsLargeContentViewer": { "alias": "accessibilityShowsLargeContentViewer"; "required": false; }; "accessibilityLargeContentTitle": { "alias": "accessibilityLargeContentTitle"; "required": false; }; "role": { "alias": "role"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "ariaLive": { "alias": "ariaLive"; "required": false; }; "ariaHidden": { "alias": "ariaHidden"; "required": false; }; "ariaBusy": { "alias": "ariaBusy"; "required": false; }; "ariaChecked": { "alias": "ariaChecked"; "required": false; }; "ariaDisabled": { "alias": "ariaDisabled"; "required": false; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; }; "ariaSelected": { "alias": "ariaSelected"; "required": false; }; "ariaModal": { "alias": "ariaModal"; "required": false; }; "ariaValueMax": { "alias": "ariaValueMax"; "required": false; }; "ariaValueMin": { "alias": "ariaValueMin"; "required": false; }; "ariaValueNow": { "alias": "ariaValueNow"; "required": false; }; "ariaValueText": { "alias": "ariaValueText"; "required": false; }; }, { "endReached": "endReached"; "startReached": "startReached"; "refresh": "refresh"; "accessibilityAction": "accessibilityAction"; "accessibilityTap": "accessibilityTap"; "magicTap": "magicTap"; "accessibilityEscape": "accessibilityEscape"; }, ["sectionItemDir", "sectionHeaderDir", "sectionFooterDir", "sectionSeparatorDir", "listHeaderDir", "listFooterDir", "listEmptyDir", "itemSeparatorDir"], never, true,
|
|
116
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SectionList<any>, "SectionList", never, { "sections": { "alias": "sections"; "required": true; }; "keyExtractor": { "alias": "keyExtractor"; "required": false; }; "stickySectionHeadersEnabled": { "alias": "stickySectionHeadersEnabled"; "required": false; }; "extraData": { "alias": "extraData"; "required": false; }; "onEndReachedThreshold": { "alias": "onEndReachedThreshold"; "required": false; }; "onStartReachedThreshold": { "alias": "onStartReachedThreshold"; "required": false; }; "refreshing": { "alias": "refreshing"; "required": false; }; "progressViewOffset": { "alias": "progressViewOffset"; "required": false; }; "initialNumToRender": { "alias": "initialNumToRender"; "required": false; }; "initialScrollIndex": { "alias": "initialScrollIndex"; "required": false; }; "maxToRenderPerBatch": { "alias": "maxToRenderPerBatch"; "required": false; }; "updateCellsBatchingPeriod": { "alias": "updateCellsBatchingPeriod"; "required": false; }; "windowSize": { "alias": "windowSize"; "required": false; }; "inverted": { "alias": "inverted"; "required": false; }; "maintainVisibleContentPosition": { "alias": "maintainVisibleContentPosition"; "required": false; }; "onScroll": { "alias": "onScroll"; "required": false; }; "onScrollBeginDrag": { "alias": "onScrollBeginDrag"; "required": false; }; "onScrollEndDrag": { "alias": "onScrollEndDrag"; "required": false; }; "onMomentumScrollBegin": { "alias": "onMomentumScrollBegin"; "required": false; }; "onMomentumScrollEnd": { "alias": "onMomentumScrollEnd"; "required": false; }; "scrollEventThrottle": { "alias": "scrollEventThrottle"; "required": false; }; "keyboardShouldPersistTaps": { "alias": "keyboardShouldPersistTaps"; "required": false; }; "keyboardDismissMode": { "alias": "keyboardDismissMode"; "required": false; }; "style": { "alias": "style"; "required": false; }; "contentContainerStyle": { "alias": "contentContainerStyle"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; "accessible": { "alias": "accessible"; "required": false; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; }; "accessibilityActions": { "alias": "accessibilityActions"; "required": false; }; "accessibilityLabelledBy": { "alias": "accessibilityLabelledBy"; "required": false; }; "importantForAccessibility": { "alias": "importantForAccessibility"; "required": false; }; "accessibilityLiveRegion": { "alias": "accessibilityLiveRegion"; "required": false; }; "screenReaderFocusable": { "alias": "screenReaderFocusable"; "required": false; }; "accessibilityViewIsModal": { "alias": "accessibilityViewIsModal"; "required": false; }; "accessibilityElementsHidden": { "alias": "accessibilityElementsHidden"; "required": false; }; "accessibilityIgnoresInvertColors": { "alias": "accessibilityIgnoresInvertColors"; "required": false; }; "accessibilityLanguage": { "alias": "accessibilityLanguage"; "required": false; }; "accessibilityRespondsToUserInteraction": { "alias": "accessibilityRespondsToUserInteraction"; "required": false; }; "accessibilityShowsLargeContentViewer": { "alias": "accessibilityShowsLargeContentViewer"; "required": false; }; "accessibilityLargeContentTitle": { "alias": "accessibilityLargeContentTitle"; "required": false; }; "role": { "alias": "role"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; }; "ariaLive": { "alias": "ariaLive"; "required": false; }; "ariaHidden": { "alias": "ariaHidden"; "required": false; }; "ariaBusy": { "alias": "ariaBusy"; "required": false; }; "ariaChecked": { "alias": "ariaChecked"; "required": false; }; "ariaDisabled": { "alias": "ariaDisabled"; "required": false; }; "ariaExpanded": { "alias": "ariaExpanded"; "required": false; }; "ariaSelected": { "alias": "ariaSelected"; "required": false; }; "ariaModal": { "alias": "ariaModal"; "required": false; }; "ariaValueMax": { "alias": "ariaValueMax"; "required": false; }; "ariaValueMin": { "alias": "ariaValueMin"; "required": false; }; "ariaValueNow": { "alias": "ariaValueNow"; "required": false; }; "ariaValueText": { "alias": "ariaValueText"; "required": false; }; }, { "endReached": "endReached"; "startReached": "startReached"; "refresh": "refresh"; "accessibilityAction": "accessibilityAction"; "accessibilityTap": "accessibilityTap"; "magicTap": "magicTap"; "accessibilityEscape": "accessibilityEscape"; }, ["sectionItemDir", "sectionHeaderDir", "sectionFooterDir", "sectionSeparatorDir", "listHeaderDir", "listFooterDir", "listEmptyDir", "itemSeparatorDir"], never, true, [{ directive: typeof i1.SymbioteStyleInputDirective; inputs: { "style": "style"; }; outputs: {}; }]>;
|
|
116
117
|
}
|
|
@@ -1,40 +1,35 @@
|
|
|
1
1
|
// SectionList, the Angular public list-of-sections component. A thin convenience surface over
|
|
2
2
|
// VirtualizedSectionList, mirroring RN's layering (SectionList -> VirtualizedSectionList ->
|
|
3
3
|
// VirtualizedList). All section-flattening / windowing / sticky-header / imperative-scroll logic
|
|
4
|
-
// lives below; this layer re-exposes the same surface under the SectionList name and
|
|
5
|
-
// handle
|
|
6
|
-
// adapters/vue/src/components/section-list/index.ts.
|
|
4
|
+
// lives below; this layer re-exposes the same surface under the SectionList name and delegates
|
|
5
|
+
// the handle to the inner VirtualizedSectionList.
|
|
7
6
|
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
// each prop unchanged (undefined included) and the default lands one layer down; double-applying
|
|
14
|
-
// here would fight VSL. Vue spreads $attrs to do this in one line — Angular has no attrs-spread, so
|
|
15
|
-
// every prop is forwarded as an explicit @Input binding, except the seven list-lifecycle events
|
|
7
|
+
// SectionList is a PURE FORWARDER: its public prop surface IS VirtualizedSectionList's (RN layers
|
|
8
|
+
// them one-for-one), and the SectionList-flavour defaults (stickySectionHeadersEnabled per
|
|
9
|
+
// Platform.OS, the section entry keyExtractor) already live INSIDE VirtualizedSectionList — double-
|
|
10
|
+
// applying them here would fight it. Angular has no attrs-spread (unlike Vue's $attrs), so every
|
|
11
|
+
// prop is forwarded as an explicit @Input binding, except the seven list-lifecycle events
|
|
16
12
|
// (endReached/startReached/refresh/accessibilityAction/accessibilityTap/magicTap/
|
|
17
13
|
// accessibilityEscape), which are real @Output() EventEmitters re-emitted via a listener binding.
|
|
18
14
|
//
|
|
19
|
-
// TEMPLATE FORWARDING — RE-STAMP, the same pattern FlatList's single-column branch
|
|
20
|
-
//
|
|
21
|
-
// VirtualizedSectionList's own @ContentChild resolve directives across
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
// templateRef + context through VListOutletDirective, exactly mirroring how VirtualizedSectionList
|
|
30
|
-
// itself re-stamps its own captured directives onto its inner VirtualizedList.
|
|
15
|
+
// TEMPLATE FORWARDING — RE-STAMP, the same pattern FlatList's single-column branch uses (see
|
|
16
|
+
// flat-list/index.ts). A bare `<ng-content></ng-content>` passthrough does NOT let
|
|
17
|
+
// VirtualizedSectionList's own @ContentChild resolve directives across a SECOND projection hop —
|
|
18
|
+
// Angular's content queries resolve only against what was projected directly onto the querying
|
|
19
|
+
// component's OWN tag. So SectionList captures the app's `<ng-template vSectionItem>` /
|
|
20
|
+
// vSectionHeader / vSectionFooter / vSectionSeparator / vListHeader / vListFooter / vListEmpty /
|
|
21
|
+
// vListSeparator with its OWN @ContentChild (a single, direct hop — always resolves) and
|
|
22
|
+
// re-authors equivalent `<ng-template>`s on `<VirtualizedSectionList>`, forwarding the captured
|
|
23
|
+
// templateRef + context through VListOutletDirective — mirroring how VirtualizedSectionList itself
|
|
24
|
+
// re-stamps its own captured directives onto its inner VirtualizedList.
|
|
31
25
|
import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, Input, Output, ViewChild, inject, } from '@angular/core';
|
|
32
26
|
import {} from '@symbiote-native/engine';
|
|
33
27
|
import { VListEmptyDirective, VListFooterDirective, VListHeaderDirective, VListSeparatorDirective, } from '../virtualized-list';
|
|
34
28
|
import { VListOutletDirective } from '../virtualized-list/directives';
|
|
35
|
-
import { stableAnchorStyle } from '../../primitives';
|
|
29
|
+
import { stableAnchorStyle, SymbioteStyleInputDirective } from '../../primitives';
|
|
36
30
|
import { VSectionFooterDirective, VSectionHeaderDirective, VSectionItemDirective, VSectionSeparatorDirective, VirtualizedSectionList, } from '../virtualized-section-list';
|
|
37
31
|
import * as i0 from "@angular/core";
|
|
32
|
+
import * as i1 from "../../primitives/shared";
|
|
38
33
|
// Angular cannot preserve VListSeparatorDirective<ItemT>'s type parameter across this re-stamp
|
|
39
34
|
// reuse (the directive is matched structurally in SectionList's own template with no explicit type
|
|
40
35
|
// argument to pin ItemT to, so `let-leadingItem`/`let-trailingItem` arrive typed `unknown`) — even
|
|
@@ -81,18 +76,14 @@ export class SectionList {
|
|
|
81
76
|
contentContainerStyle;
|
|
82
77
|
testID;
|
|
83
78
|
nativeID;
|
|
84
|
-
// Bound to
|
|
85
|
-
//
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
//
|
|
92
|
-
// style` — defeats VirtualizedList's `ngDoCheck` dedup gate and free-runs change detection
|
|
93
|
-
// forever (the exact bug `stableAnchorStyle` exists to prevent, see its doc comment and the
|
|
94
|
-
// `flat-list-array-style.test.ts` regression it fixes). `cachedResolvedStyle` is the getter's own
|
|
95
|
-
// persisted "previous" value across reads, since a getter has no natural field to compare against.
|
|
79
|
+
// Bound to `[style]="resolvedStyle"`, which Angular compiles to ɵɵstyleMap — it only
|
|
80
|
+
// understands a flat object, never an array (RN's `style={[a, b]}` idiom crashes deep inside
|
|
81
|
+
// Angular's styling engine), so this flattens `style` first, merging in this component's OWN
|
|
82
|
+
// anchor's class-derived style via anchorHostStyle (`elementRef` here is SectionList's own
|
|
83
|
+
// host, not `list`'s inner VirtualizedSectionList). A plain `flattenStyle([...])` would
|
|
84
|
+
// allocate a fresh object on every CD check, defeating VirtualizedList's `ngDoCheck` dedup gate
|
|
85
|
+
// and free-running change detection forever — the bug `stableAnchorStyle` exists to prevent
|
|
86
|
+
// (see its doc comment). `cachedResolvedStyle` is the getter's own persisted "previous" value.
|
|
96
87
|
cachedResolvedStyle;
|
|
97
88
|
get resolvedStyle() {
|
|
98
89
|
this.cachedResolvedStyle = stableAnchorStyle(this.elementRef, this.style, this.cachedResolvedStyle);
|
|
@@ -186,8 +177,8 @@ export class SectionList {
|
|
|
186
177
|
recordInteraction() {
|
|
187
178
|
this.list?.recordInteraction();
|
|
188
179
|
}
|
|
189
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
190
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.
|
|
180
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SectionList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
181
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: SectionList, isStandalone: true, selector: "SectionList", inputs: { sections: "sections", keyExtractor: "keyExtractor", stickySectionHeadersEnabled: "stickySectionHeadersEnabled", extraData: "extraData", onEndReachedThreshold: "onEndReachedThreshold", onStartReachedThreshold: "onStartReachedThreshold", refreshing: "refreshing", progressViewOffset: "progressViewOffset", initialNumToRender: "initialNumToRender", initialScrollIndex: "initialScrollIndex", maxToRenderPerBatch: "maxToRenderPerBatch", updateCellsBatchingPeriod: "updateCellsBatchingPeriod", windowSize: "windowSize", inverted: "inverted", maintainVisibleContentPosition: "maintainVisibleContentPosition", onScroll: "onScroll", onScrollBeginDrag: "onScrollBeginDrag", onScrollEndDrag: "onScrollEndDrag", onMomentumScrollBegin: "onMomentumScrollBegin", onMomentumScrollEnd: "onMomentumScrollEnd", scrollEventThrottle: "scrollEventThrottle", keyboardShouldPersistTaps: "keyboardShouldPersistTaps", keyboardDismissMode: "keyboardDismissMode", style: "style", contentContainerStyle: "contentContainerStyle", testID: "testID", nativeID: "nativeID", 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", role: "role", ariaLabel: "ariaLabel", ariaLabelledBy: "ariaLabelledBy", ariaLive: "ariaLive", ariaHidden: "ariaHidden", ariaBusy: "ariaBusy", ariaChecked: "ariaChecked", ariaDisabled: "ariaDisabled", ariaExpanded: "ariaExpanded", ariaSelected: "ariaSelected", ariaModal: "ariaModal", ariaValueMax: "ariaValueMax", ariaValueMin: "ariaValueMin", ariaValueNow: "ariaValueNow", ariaValueText: "ariaValueText" }, outputs: { endReached: "endReached", startReached: "startReached", refresh: "refresh", accessibilityAction: "accessibilityAction", accessibilityTap: "accessibilityTap", magicTap: "magicTap", accessibilityEscape: "accessibilityEscape" }, queries: [{ propertyName: "sectionItemDir", first: true, predicate: VSectionItemDirective, descendants: true }, { propertyName: "sectionHeaderDir", first: true, predicate: VSectionHeaderDirective, descendants: true }, { propertyName: "sectionFooterDir", first: true, predicate: VSectionFooterDirective, descendants: true }, { propertyName: "sectionSeparatorDir", first: true, predicate: VSectionSeparatorDirective, descendants: true }, { propertyName: "listHeaderDir", first: true, predicate: VListHeaderDirective, descendants: true }, { propertyName: "listFooterDir", first: true, predicate: VListFooterDirective, descendants: true }, { propertyName: "listEmptyDir", first: true, predicate: VListEmptyDirective, descendants: true }, { propertyName: "itemSeparatorDir", first: true, predicate: VListSeparatorDirective, descendants: true }], viewQueries: [{ propertyName: "list", first: true, predicate: VirtualizedSectionList, descendants: true }], hostDirectives: [{ directive: i1.SymbioteStyleInputDirective, inputs: ["style", "style"] }], ngImport: i0, template: `
|
|
191
182
|
<VirtualizedSectionList
|
|
192
183
|
[sections]="sections"
|
|
193
184
|
[keyExtractor]="keyExtractor"
|
|
@@ -322,11 +313,12 @@ export class SectionList {
|
|
|
322
313
|
</VirtualizedSectionList>
|
|
323
314
|
`, isInline: true, dependencies: [{ kind: "component", type: VirtualizedSectionList, selector: "VirtualizedSectionList", inputs: ["sections", "keyExtractor", "stickySectionHeadersEnabled", "extraData", "onEndReachedThreshold", "onStartReachedThreshold", "refreshing", "progressViewOffset", "refreshRequested", "initialNumToRender", "initialScrollIndex", "maxToRenderPerBatch", "updateCellsBatchingPeriod", "windowSize", "inverted", "maintainVisibleContentPosition", "onScroll", "onScrollBeginDrag", "onScrollEndDrag", "onMomentumScrollBegin", "onMomentumScrollEnd", "scrollEventThrottle", "keyboardShouldPersistTaps", "keyboardDismissMode", "style", "contentContainerStyle", "testID", "nativeID", "accessible", "accessibilityLabel", "accessibilityHint", "accessibilityRole", "accessibilityState", "accessibilityValue", "accessibilityActions", "accessibilityLabelledBy", "importantForAccessibility", "accessibilityLiveRegion", "screenReaderFocusable", "accessibilityViewIsModal", "accessibilityElementsHidden", "accessibilityIgnoresInvertColors", "accessibilityLanguage", "accessibilityRespondsToUserInteraction", "accessibilityShowsLargeContentViewer", "accessibilityLargeContentTitle", "role", "ariaLabel", "ariaLabelledBy", "ariaLive", "ariaHidden", "ariaBusy", "ariaChecked", "ariaDisabled", "ariaExpanded", "ariaSelected", "ariaModal", "ariaValueMax", "ariaValueMin", "ariaValueNow", "ariaValueText"], outputs: ["endReached", "startReached", "refresh", "accessibilityAction", "accessibilityTap", "magicTap", "accessibilityEscape"] }, { kind: "directive", type: VSectionItemDirective, selector: "[vSectionItem]" }, { kind: "directive", type: VSectionHeaderDirective, selector: "[vSectionHeader]" }, { kind: "directive", type: VSectionFooterDirective, selector: "[vSectionFooter]" }, { kind: "directive", type: VSectionSeparatorDirective, selector: "[vSectionSeparator]" }, { kind: "directive", type: VListHeaderDirective, selector: "[vListHeader]" }, { kind: "directive", type: VListFooterDirective, selector: "[vListFooter]" }, { kind: "directive", type: VListEmptyDirective, selector: "[vListEmpty]" }, { kind: "directive", type: VListSeparatorDirective, selector: "[vListSeparator]" }, { kind: "directive", type: VListOutletDirective, selector: "[vListOutlet]", inputs: ["vListOutlet", "vListOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
324
315
|
}
|
|
325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SectionList, decorators: [{
|
|
326
317
|
type: Component,
|
|
327
318
|
args: [{
|
|
328
319
|
selector: 'SectionList',
|
|
329
320
|
standalone: true,
|
|
321
|
+
hostDirectives: [{ directive: SymbioteStyleInputDirective, inputs: ['style'] }],
|
|
330
322
|
imports: [
|
|
331
323
|
VirtualizedSectionList,
|
|
332
324
|
VSectionItemDirective,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/section-list/index.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,4FAA4F;AAC5F,iGAAiG;AACjG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/section-list/index.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,4FAA4F;AAC5F,iGAAiG;AACjG,+FAA+F;AAC/F,kDAAkD;AAClD,EAAE;AACF,kGAAkG;AAClG,2FAA2F;AAC3F,oGAAoG;AACpG,iGAAiG;AACjG,0FAA0F;AAC1F,kFAAkF;AAClF,kGAAkG;AAClG,EAAE;AACF,6FAA6F;AAC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AAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBAIL,YAAY;uBAAC,qBAAqB;;sBAClC,YAAY;uBAAC,uBAAuB;;sBACpC,YAAY;uBAAC,uBAAuB;;sBACpC,YAAY;uBAAC,0BAA0B;;sBACvC,YAAY;uBAAC,oBAAoB;;sBACjC,YAAY;uBAAC,oBAAoB;;sBACjC,YAAY;uBAAC,mBAAmB;;sBAChC,YAAY;uBAAC,uBAAuB;;sBAIpC,SAAS;uBAAC,sBAAsB"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { type DoCheck } from '@angular/core';
|
|
1
2
|
import { SwitchBase } from './shared';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../primitives/shared";
|
|
3
5
|
export type { ISwitchProps, ISwitchTrackColor } from './shared';
|
|
4
|
-
export declare class Switch extends SwitchBase {
|
|
6
|
+
export declare class Switch extends SwitchBase implements DoCheck {
|
|
5
7
|
private readonly elementRef;
|
|
6
8
|
protected readonly platform: {
|
|
7
9
|
snapBackCommand: string;
|
|
@@ -14,7 +16,9 @@ export declare class Switch extends SwitchBase {
|
|
|
14
16
|
trackTintColor: string | undefined;
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
|
-
|
|
19
|
+
private readonly anchorStyle;
|
|
20
|
+
ngDoCheck(): void;
|
|
21
|
+
protected buildHostProps(): Record<string, unknown>;
|
|
18
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<Switch, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Switch, "Switch", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "trackColor": { "alias": "trackColor"; "required": false; }; "thumbColor": { "alias": "thumbColor"; "required": false; }; "ios_backgroundColor": { "alias": "ios_backgroundColor"; "required": false; }; "style": { "alias": "style"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; }; "accessible": { "alias": "accessible"; "required": false; }; "role": { "alias": "role"; "required": false; }; "aria-label": { "alias": "aria-label"; "required": false; }; "aria-disabled": { "alias": "aria-disabled"; "required": false; }; "aria-checked": { "alias": "aria-checked"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; }, never, never, true,
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Switch, "Switch", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "trackColor": { "alias": "trackColor"; "required": false; }; "thumbColor": { "alias": "thumbColor"; "required": false; }; "ios_backgroundColor": { "alias": "ios_backgroundColor"; "required": false; }; "style": { "alias": "style"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; }; "accessible": { "alias": "accessible"; "required": false; }; "role": { "alias": "role"; "required": false; }; "aria-label": { "alias": "aria-label"; "required": false; }; "aria-disabled": { "alias": "aria-disabled"; "required": false; }; "aria-checked": { "alias": "aria-checked"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; }, never, never, true, [{ directive: typeof i1.SymbioteStyleInputDirective; inputs: { "style": "style"; }; outputs: {}; }]>;
|
|
20
24
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { CUSTOM_ELEMENTS_SCHEMA, Component, ElementRef, inject } from '@angular/core';
|
|
2
|
-
import {
|
|
1
|
+
import { CUSTOM_ELEMENTS_SCHEMA, Component, ElementRef, forwardRef, inject, signal, } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import { anchorHostStyle, SwitchHost, SymbioteHostPropsDirective, SymbioteStyleInputDirective, } from '../../primitives';
|
|
3
4
|
import { SwitchBase } from './shared';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "../../primitives/shared";
|
|
5
7
|
export class Switch extends SwitchBase {
|
|
6
8
|
// This component's OWN host — the non-painting anchor `class="..."` at the use site resolves
|
|
7
9
|
// onto (see anchorHostStyle's doc comment) — NOT the <symbiote-switch> leaf one level down.
|
|
@@ -14,29 +16,55 @@ export class Switch extends SwitchBase {
|
|
|
14
16
|
trackTintColor: value ? trackColor?.true : trackColor?.false,
|
|
15
17
|
}),
|
|
16
18
|
};
|
|
19
|
+
// The anchor's class-derived style is written by the renderer's addClass/removeClass and never
|
|
20
|
+
// reaches Angular's input pipeline (a bare `class="x"` never appears in SimpleChanges — see
|
|
21
|
+
// anchorHostStyle's doc comment), so SwitchBase's inputsRevision cannot see it. Hence its own
|
|
22
|
+
// signal: a plain field read inside a computed() would be untracked and the bag would go stale
|
|
23
|
+
// the moment a `[class.x]`/`[ngClass]` toggled.
|
|
24
|
+
//
|
|
25
|
+
// ngDoCheck is the right cadence: render3's callHooks flushes a node's pre-order hooks at the
|
|
26
|
+
// next `ɵɵadvance` past it (or in refreshView's post-template flush), i.e. AFTER the declaring
|
|
27
|
+
// template's ɵɵclassProp wrote the class onto this element and BEFORE this component's own view
|
|
28
|
+
// refreshes — the exact window a class poll needs. callHooks also runs under
|
|
29
|
+
// setActiveConsumer(null), so the write registers no dependency on the caller's view (no NG0600).
|
|
30
|
+
// commitClassStyle allocates a fresh style array only when a token actually moved, so signal.set's
|
|
31
|
+
// own Object.is check makes an unchanged poll a no-op that dirties nothing.
|
|
32
|
+
//
|
|
33
|
+
// Known gap, shared with every other component polling this way (Pressable, SafeAreaView,
|
|
34
|
+
// TouchableNativeFeedback): `[ngClass]` applies its tokens from NgClass's OWN ngDoCheck, and a
|
|
35
|
+
// node's hooks flush in registration order with the component's first, so an [ngClass] flip lands
|
|
36
|
+
// one pass after this poll reads it. `class=` and `[class.x]` are written by the declaring
|
|
37
|
+
// template's styling instructions and so are always current here.
|
|
38
|
+
anchorStyle = signal(undefined, /* @ts-ignore */
|
|
39
|
+
...(ngDevMode ? [{ debugName: "anchorStyle" }] : /* istanbul ignore next */ []));
|
|
40
|
+
ngDoCheck() {
|
|
41
|
+
this.anchorStyle.set(anchorHostStyle(this.elementRef));
|
|
42
|
+
}
|
|
17
43
|
// The anchor's class-derived style goes first, then whatever SwitchBase already resolved
|
|
18
44
|
// (its own explicit `style` @Input plus the ios_backgroundColor fold), so an explicit [style]
|
|
19
45
|
// still beats the ambient class.
|
|
20
|
-
|
|
21
|
-
const props = super.
|
|
22
|
-
return { ...props, style: [
|
|
46
|
+
buildHostProps() {
|
|
47
|
+
const props = super.buildHostProps();
|
|
48
|
+
return { ...props, style: [this.anchorStyle(), props['style']] };
|
|
23
49
|
}
|
|
24
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
25
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
50
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Switch, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
51
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: Switch, isStandalone: true, selector: "Switch", inputs: { value: "value", disabled: "disabled", trackColor: "trackColor", thumbColor: "thumbColor", ios_backgroundColor: "ios_backgroundColor", style: "style", nativeID: "nativeID", testID: "testID", accessibilityLabel: "accessibilityLabel", accessibilityRole: "accessibilityRole", accessibilityState: "accessibilityState", accessibilityValue: "accessibilityValue", accessibilityHint: "accessibilityHint", accessible: "accessible", role: "role", "aria-label": "aria-label", "aria-disabled": "aria-disabled", "aria-checked": "aria-checked" }, outputs: { valueChange: "valueChange", change: "change" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => Switch), multi: true }], usesInheritance: true, hostDirectives: [{ directive: i1.SymbioteStyleInputDirective, inputs: ["style", "style"] }], ngImport: i0, template: `
|
|
26
52
|
<symbiote-switch
|
|
27
53
|
#nativeSwitch="symbioteHost"
|
|
28
|
-
[symbioteHostProps]="hostProps"
|
|
54
|
+
[symbioteHostProps]="hostProps()"
|
|
29
55
|
(change)="handleChange($event, nativeSwitch)"
|
|
30
56
|
/>
|
|
31
57
|
`, isInline: true, dependencies: [{ kind: "component", type: SwitchHost, selector: "symbiote-switch" }, { kind: "directive", type: SymbioteHostPropsDirective, selector: "[symbioteHostProps]", inputs: ["symbioteHostProps"], exportAs: ["symbioteHost"] }] });
|
|
32
58
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Switch, decorators: [{
|
|
34
60
|
type: Component,
|
|
35
61
|
args: [{
|
|
36
62
|
selector: 'Switch',
|
|
37
63
|
standalone: true,
|
|
64
|
+
hostDirectives: [{ directive: SymbioteStyleInputDirective, inputs: ['style'] }],
|
|
38
65
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
39
66
|
imports: [SwitchHost, SymbioteHostPropsDirective],
|
|
67
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => Switch), multi: true }],
|
|
40
68
|
inputs: [
|
|
41
69
|
'value',
|
|
42
70
|
'disabled',
|
|
@@ -61,7 +89,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
61
89
|
template: `
|
|
62
90
|
<symbiote-switch
|
|
63
91
|
#nativeSwitch="symbioteHost"
|
|
64
|
-
[symbioteHostProps]="hostProps"
|
|
92
|
+
[symbioteHostProps]="hostProps()"
|
|
65
93
|
(change)="handleChange($event, nativeSwitch)"
|
|
66
94
|
/>
|
|
67
95
|
`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../src/components/switch/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.android.js","sourceRoot":"","sources":["../../../../src/components/switch/index.android.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,UAAU,EACV,UAAU,EACV,MAAM,EACN,MAAM,GAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,UAAU,EACV,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;;;AAuCtC,MAAM,OAAO,MAAO,SAAQ,UAAU;IACpC,6FAA6F;IAC7F,4FAA4F;IAC3E,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAE9B,QAAQ,GAAG;QAC5B,eAAe,EAAE,gBAAgB;QACjC,eAAe,EAAE,CAAC,KAAc,EAAE,UAA8C,EAAE,EAAE,CAAC,CAAC;YACpF,kBAAkB,EAAE,UAAU,EAAE,KAAK;YACrC,iBAAiB,EAAE,UAAU,EAAE,IAAI;YACnC,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,EAAE,KAAK;SAC7D,CAAC;KACH,CAAC;IAEF,+FAA+F;IAC/F,4FAA4F;IAC5F,8FAA8F;IAC9F,+FAA+F;IAC/F,gDAAgD;I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AAE,IAAI,EAAE,CAAC;oBAC/F,MAAM,EAAE;wBACN,OAAO;wBACP,UAAU;wBACV,YAAY;wBACZ,YAAY;wBACZ,qBAAqB;wBACrB,OAAO;wBACP,UAAU;wBACV,QAAQ;wBACR,oBAAoB;wBACpB,mBAAmB;wBACnB,oBAAoB;wBACpB,oBAAoB;wBACpB,mBAAmB;wBACnB,YAAY;wBACZ,MAAM;wBACN,YAAY;wBACZ,eAAe;wBACf,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC;oBAClC,QAAQ,EAAE;;;;;;GAMT;iBACF"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { type DoCheck } from '@angular/core';
|
|
1
2
|
import { SwitchBase } from './shared';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../primitives/shared";
|
|
3
5
|
export type { ISwitchProps, ISwitchTrackColor } from './shared';
|
|
4
|
-
export declare class Switch extends SwitchBase {
|
|
6
|
+
export declare class Switch extends SwitchBase implements DoCheck {
|
|
5
7
|
private readonly elementRef;
|
|
6
8
|
protected readonly platform: {
|
|
7
9
|
snapBackCommand: string;
|
|
@@ -13,7 +15,9 @@ export declare class Switch extends SwitchBase {
|
|
|
13
15
|
tintColor: string | undefined;
|
|
14
16
|
};
|
|
15
17
|
};
|
|
16
|
-
|
|
18
|
+
private readonly anchorStyle;
|
|
19
|
+
ngDoCheck(): void;
|
|
20
|
+
protected buildHostProps(): Record<string, unknown>;
|
|
17
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<Switch, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<Switch, "Switch", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "trackColor": { "alias": "trackColor"; "required": false; }; "thumbColor": { "alias": "thumbColor"; "required": false; }; "ios_backgroundColor": { "alias": "ios_backgroundColor"; "required": false; }; "style": { "alias": "style"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; }; "accessible": { "alias": "accessible"; "required": false; }; "role": { "alias": "role"; "required": false; }; "aria-label": { "alias": "aria-label"; "required": false; }; "aria-disabled": { "alias": "aria-disabled"; "required": false; }; "aria-checked": { "alias": "aria-checked"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; }, never, never, true,
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<Switch, "Switch", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "trackColor": { "alias": "trackColor"; "required": false; }; "thumbColor": { "alias": "thumbColor"; "required": false; }; "ios_backgroundColor": { "alias": "ios_backgroundColor"; "required": false; }; "style": { "alias": "style"; "required": false; }; "nativeID": { "alias": "nativeID"; "required": false; }; "testID": { "alias": "testID"; "required": false; }; "accessibilityLabel": { "alias": "accessibilityLabel"; "required": false; }; "accessibilityRole": { "alias": "accessibilityRole"; "required": false; }; "accessibilityState": { "alias": "accessibilityState"; "required": false; }; "accessibilityValue": { "alias": "accessibilityValue"; "required": false; }; "accessibilityHint": { "alias": "accessibilityHint"; "required": false; }; "accessible": { "alias": "accessible"; "required": false; }; "role": { "alias": "role"; "required": false; }; "aria-label": { "alias": "aria-label"; "required": false; }; "aria-disabled": { "alias": "aria-disabled"; "required": false; }; "aria-checked": { "alias": "aria-checked"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; }, never, never, true, [{ directive: typeof i1.SymbioteStyleInputDirective; inputs: { "style": "style"; }; outputs: {}; }]>;
|
|
19
23
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { CUSTOM_ELEMENTS_SCHEMA, Component, ElementRef, inject } from '@angular/core';
|
|
2
|
-
import {
|
|
1
|
+
import { CUSTOM_ELEMENTS_SCHEMA, Component, ElementRef, forwardRef, inject, signal, } from '@angular/core';
|
|
2
|
+
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
3
|
+
import { anchorHostStyle, SwitchHost, SymbioteHostPropsDirective, SymbioteStyleInputDirective, } from '../../primitives';
|
|
3
4
|
import { SwitchBase } from './shared';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "../../primitives/shared";
|
|
5
7
|
export class Switch extends SwitchBase {
|
|
6
8
|
// This component's OWN host — the non-painting anchor `class="..."` at the use site resolves
|
|
7
9
|
// onto (see anchorHostStyle's doc comment) — NOT the <symbiote-switch> leaf one level down.
|
|
@@ -13,29 +15,55 @@ export class Switch extends SwitchBase {
|
|
|
13
15
|
tintColor: trackColor?.false,
|
|
14
16
|
}),
|
|
15
17
|
};
|
|
18
|
+
// The anchor's class-derived style is written by the renderer's addClass/removeClass and never
|
|
19
|
+
// reaches Angular's input pipeline (a bare `class="x"` never appears in SimpleChanges — see
|
|
20
|
+
// anchorHostStyle's doc comment), so SwitchBase's inputsRevision cannot see it. Hence its own
|
|
21
|
+
// signal: a plain field read inside a computed() would be untracked and the bag would go stale
|
|
22
|
+
// the moment a `[class.x]`/`[ngClass]` toggled.
|
|
23
|
+
//
|
|
24
|
+
// ngDoCheck is the right cadence: render3's callHooks flushes a node's pre-order hooks at the
|
|
25
|
+
// next `ɵɵadvance` past it (or in refreshView's post-template flush), i.e. AFTER the declaring
|
|
26
|
+
// template's ɵɵclassProp wrote the class onto this element and BEFORE this component's own view
|
|
27
|
+
// refreshes — the exact window a class poll needs. callHooks also runs under
|
|
28
|
+
// setActiveConsumer(null), so the write registers no dependency on the caller's view (no NG0600).
|
|
29
|
+
// commitClassStyle allocates a fresh style array only when a token actually moved, so signal.set's
|
|
30
|
+
// own Object.is check makes an unchanged poll a no-op that dirties nothing.
|
|
31
|
+
//
|
|
32
|
+
// Known gap, shared with every other component polling this way (Pressable, SafeAreaView,
|
|
33
|
+
// TouchableNativeFeedback): `[ngClass]` applies its tokens from NgClass's OWN ngDoCheck, and a
|
|
34
|
+
// node's hooks flush in registration order with the component's first, so an [ngClass] flip lands
|
|
35
|
+
// one pass after this poll reads it. `class=` and `[class.x]` are written by the declaring
|
|
36
|
+
// template's styling instructions and so are always current here.
|
|
37
|
+
anchorStyle = signal(undefined, /* @ts-ignore */
|
|
38
|
+
...(ngDevMode ? [{ debugName: "anchorStyle" }] : /* istanbul ignore next */ []));
|
|
39
|
+
ngDoCheck() {
|
|
40
|
+
this.anchorStyle.set(anchorHostStyle(this.elementRef));
|
|
41
|
+
}
|
|
16
42
|
// The anchor's class-derived style goes first, then whatever SwitchBase already resolved
|
|
17
43
|
// (its own explicit `style` @Input plus the ios_backgroundColor fold), so an explicit [style]
|
|
18
44
|
// still beats the ambient class.
|
|
19
|
-
|
|
20
|
-
const props = super.
|
|
21
|
-
return { ...props, style: [
|
|
45
|
+
buildHostProps() {
|
|
46
|
+
const props = super.buildHostProps();
|
|
47
|
+
return { ...props, style: [this.anchorStyle(), props['style']] };
|
|
22
48
|
}
|
|
23
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
24
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.
|
|
49
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Switch, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.8", type: Switch, isStandalone: true, selector: "Switch", inputs: { value: "value", disabled: "disabled", trackColor: "trackColor", thumbColor: "thumbColor", ios_backgroundColor: "ios_backgroundColor", style: "style", nativeID: "nativeID", testID: "testID", accessibilityLabel: "accessibilityLabel", accessibilityRole: "accessibilityRole", accessibilityState: "accessibilityState", accessibilityValue: "accessibilityValue", accessibilityHint: "accessibilityHint", accessible: "accessible", role: "role", "aria-label": "aria-label", "aria-disabled": "aria-disabled", "aria-checked": "aria-checked" }, outputs: { valueChange: "valueChange", change: "change" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => Switch), multi: true }], usesInheritance: true, hostDirectives: [{ directive: i1.SymbioteStyleInputDirective, inputs: ["style", "style"] }], ngImport: i0, template: `
|
|
25
51
|
<symbiote-switch
|
|
26
52
|
#nativeSwitch="symbioteHost"
|
|
27
|
-
[symbioteHostProps]="hostProps"
|
|
53
|
+
[symbioteHostProps]="hostProps()"
|
|
28
54
|
(change)="handleChange($event, nativeSwitch)"
|
|
29
55
|
/>
|
|
30
56
|
`, isInline: true, dependencies: [{ kind: "component", type: SwitchHost, selector: "symbiote-switch" }, { kind: "directive", type: SymbioteHostPropsDirective, selector: "[symbioteHostProps]", inputs: ["symbioteHostProps"], exportAs: ["symbioteHost"] }] });
|
|
31
57
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Switch, decorators: [{
|
|
33
59
|
type: Component,
|
|
34
60
|
args: [{
|
|
35
61
|
selector: 'Switch',
|
|
36
62
|
standalone: true,
|
|
63
|
+
hostDirectives: [{ directive: SymbioteStyleInputDirective, inputs: ['style'] }],
|
|
37
64
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
38
65
|
imports: [SwitchHost, SymbioteHostPropsDirective],
|
|
66
|
+
providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => Switch), multi: true }],
|
|
39
67
|
inputs: [
|
|
40
68
|
'value',
|
|
41
69
|
'disabled',
|
|
@@ -60,7 +88,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
60
88
|
template: `
|
|
61
89
|
<symbiote-switch
|
|
62
90
|
#nativeSwitch="symbioteHost"
|
|
63
|
-
[symbioteHostProps]="hostProps"
|
|
91
|
+
[symbioteHostProps]="hostProps()"
|
|
64
92
|
(change)="handleChange($event, nativeSwitch)"
|
|
65
93
|
/>
|
|
66
94
|
`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../src/components/switch/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.ios.js","sourceRoot":"","sources":["../../../../src/components/switch/index.ios.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,SAAS,EACT,UAAU,EACV,UAAU,EACV,MAAM,EACN,MAAM,GAEP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EACL,eAAe,EACf,UAAU,EACV,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;;;AAuCtC,MAAM,OAAO,MAAO,SAAQ,UAAU;IACpC,6FAA6F;IAC7F,4FAA4F;IAC3E,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAE9B,QAAQ,GAAG;QAC5B,eAAe,EAAE,UAAU;QAC3B,eAAe,EAAE,CAAC,MAAe,EAAE,UAA8C,EAAE,EAAE,CAAC,CAAC;YACrF,WAAW,EAAE,UAAU,EAAE,IAAI;YAC7B,SAAS,EAAE,UAAU,EAAE,KAAK;SAC7B,CAAC;KACH,CAAC;IAEF,+FAA+F;IAC/F,4FAA4F;IAC5F,8FAA8F;IAC9F,+FAA+F;IAC/F,gDAAgD;IAChD,EAAE;IACF,8FAA8F;IAC9F,+FAA+F;IAC/F,gGAAgG;IAChG,6EAA6E;IAC7E,kGAAkG;IAClG,mGAAmG;IACnG,4EAA4E;IAC5E,EAAE;I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AAU;wBACV,QAAQ;wBACR,oBAAoB;wBACpB,mBAAmB;wBACnB,oBAAoB;wBACpB,oBAAoB;wBACpB,mBAAmB;wBACnB,YAAY;wBACZ,MAAM;wBACN,YAAY;wBACZ,eAAe;wBACf,cAAc;qBACf;oBACD,OAAO,EAAE,CAAC,aAAa,EAAE,QAAQ,CAAC;oBAClC,QAAQ,EAAE;;;;;;GAMT;iBACF"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { EventEmitter, type OnChanges } from '@angular/core';
|
|
2
|
+
import type { ControlValueAccessor } from '@angular/forms';
|
|
2
3
|
import type { ISwitchPlatform, ISwitchProps, ISwitchTrackColor } from '@symbiote-native/components';
|
|
3
4
|
import { type ISymbioteEvent, type IStyleProp, type IViewStyle } from '@symbiote-native/engine';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
@@ -8,7 +9,7 @@ type ISwitchHostPlatform = ISwitchPlatform & {
|
|
|
8
9
|
snapBackCommand: string;
|
|
9
10
|
};
|
|
10
11
|
type IHostProps = Record<string, unknown>;
|
|
11
|
-
export declare abstract class SwitchBase implements ISwitchInputs {
|
|
12
|
+
export declare abstract class SwitchBase implements ISwitchInputs, ControlValueAccessor, OnChanges {
|
|
12
13
|
readonly valueChange: EventEmitter<boolean>;
|
|
13
14
|
readonly change: EventEmitter<ISymbioteEvent>;
|
|
14
15
|
value: boolean | undefined;
|
|
@@ -31,9 +32,17 @@ export declare abstract class SwitchBase implements ISwitchInputs {
|
|
|
31
32
|
'aria-checked': boolean | 'mixed' | undefined;
|
|
32
33
|
protected abstract readonly platform: ISwitchHostPlatform;
|
|
33
34
|
private switchState;
|
|
34
|
-
|
|
35
|
+
private readonly changeDetector;
|
|
36
|
+
private readonly inputsRevision;
|
|
37
|
+
ngOnChanges(): void;
|
|
38
|
+
readonly hostProps: import("@angular/core").Signal<IHostProps>;
|
|
39
|
+
protected buildHostProps(): IHostProps;
|
|
35
40
|
handleChange(event: unknown, node: unknown): void;
|
|
36
41
|
private snapBackIfNeeded;
|
|
42
|
+
writeValue(value: boolean | null): void;
|
|
43
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
44
|
+
registerOnTouched(fn: () => void): void;
|
|
45
|
+
setDisabledState(isDisabled: boolean): void;
|
|
37
46
|
private inputProps;
|
|
38
47
|
static ɵfac: i0.ɵɵFactoryDeclaration<SwitchBase, never>;
|
|
39
48
|
static ɵdir: i0.ɵɵDirectiveDeclaration<SwitchBase, never, never, {}, { "valueChange": "valueChange"; "change": "change"; }, never, never, true, never>;
|