@symbiote-native/angular 0.6.2 → 0.8.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 +3 -3
- 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/bootstrap.js +1 -1
- package/build/angular/bootstrap.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 +12 -4
- 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 +8 -3
- package/build/angular/components/activity-indicator/index.ios.js.map +1 -1
- package/build/angular/components/activity-indicator/shared.d.ts +1 -1
- package/build/angular/components/activity-indicator/shared.js +4 -4
- package/build/angular/components/activity-indicator/shared.js.map +1 -1
- package/build/angular/components/button.d.ts +4 -2
- package/build/angular/components/button.js +41 -22
- package/build/angular/components/button.js.map +1 -1
- package/build/angular/components/flat-list/index.d.ts +6 -4
- package/build/angular/components/flat-list/index.js +80 -50
- 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 +42 -10
- 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 +42 -10
- 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 +51 -8
- 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 +26 -10
- 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 +49 -10
- package/build/angular/components/input-accessory-view/index.js.map +1 -1
- package/build/angular/components/keyboard-avoiding-view/index.d.ts +3 -1
- package/build/angular/components/keyboard-avoiding-view/index.js +44 -12
- 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 +51 -29
- package/build/angular/components/modal/index.js.map +1 -1
- package/build/angular/components/pressable/index.d.ts +12 -6
- package/build/angular/components/pressable/index.js +66 -13
- 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 +54 -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 +48 -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 +88 -61
- 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 +24 -18
- package/build/angular/components/scroll-view/index.ios.js.map +1 -1
- package/build/angular/components/scroll-view/projection.d.ts +35 -0
- package/build/angular/components/scroll-view/projection.js +279 -53
- 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 +225 -75
- package/build/angular/components/scroll-view/shared.js.map +1 -1
- package/build/angular/components/scroll-view/sticky-header.js +21 -22
- package/build/angular/components/scroll-view/sticky-header.js.map +1 -1
- package/build/angular/components/section-list/index.d.ts +7 -1
- package/build/angular/components/section-list/index.js +91 -54
- 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 +52 -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 +52 -10
- package/build/angular/components/switch/index.ios.js.map +1 -1
- package/build/angular/components/switch/shared.d.ts +13 -4
- package/build/angular/components/switch/shared.js +71 -7
- package/build/angular/components/switch/shared.js.map +1 -1
- package/build/angular/components/text-input.d.ts +11 -3
- package/build/angular/components/text-input.js +68 -8
- package/build/angular/components/text-input.js.map +1 -1
- package/build/angular/components/touchable/index.d.ts +40 -9
- package/build/angular/components/touchable/index.js +303 -67
- 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 +63 -27
- package/build/angular/components/touchable-native-feedback/index.js.map +1 -1
- package/build/angular/components/virtualized-list/directives.js +22 -18
- package/build/angular/components/virtualized-list/directives.js.map +1 -1
- package/build/angular/components/virtualized-list/index.d.ts +15 -4
- package/build/angular/components/virtualized-list/index.js +326 -94
- 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/directives.js.map +1 -1
- package/build/angular/components/virtualized-section-list/index.d.ts +19 -1
- package/build/angular/components/virtualized-section-list/index.js +93 -22
- package/build/angular/components/virtualized-section-list/index.js.map +1 -1
- package/build/angular/components.d.ts +2 -2
- package/build/angular/components.js +5 -0
- package/build/angular/components.js.map +1 -1
- package/build/angular/create-portal/index.js +34 -36
- 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 +6 -4
- package/build/angular/descriptor-to-angular/index.js.map +1 -1
- package/build/angular/diagnostics.d.ts +33 -0
- package/build/angular/diagnostics.js +82 -0
- package/build/angular/diagnostics.js.map +1 -0
- package/build/angular/host-instance/index.js +1 -1
- package/build/angular/host-instance/index.js.map +1 -1
- package/build/angular/index.d.ts +9 -4
- package/build/angular/index.js +17 -3
- 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 +106 -55
- package/build/angular/modules/animated/create-animated-component.js.map +1 -1
- package/build/angular/modules/status-bar/index.js +4 -4
- package/build/angular/modules/status-bar/index.js.map +1 -1
- package/build/angular/primitives/index.d.ts +20 -3
- package/build/angular/primitives/index.js +84 -48
- package/build/angular/primitives/index.js.map +1 -1
- package/build/angular/primitives/shared.d.ts +48 -2
- package/build/angular/primitives/shared.js +158 -11
- package/build/angular/primitives/shared.js.map +1 -1
- package/build/angular/render/index.js +69 -38
- package/build/angular/render/index.js.map +1 -1
- package/build/angular/renderer/index.d.ts +1 -0
- package/build/angular/renderer/index.js +37 -2
- package/build/angular/renderer/index.js.map +1 -1
- package/build/angular/services/color-scheme.service.js +3 -3
- package/build/angular/services/color-scheme.service.js.map +1 -1
- package/build/angular/services/window-dimensions.service.js +4 -4
- package/build/angular/services/window-dimensions.service.js.map +1 -1
- package/package.json +10 -8
- package/src/anchor-host-registry.ts +2 -2
- package/src/bootstrap.ts +4 -1
- package/src/components/activity-indicator/index.android.ts +8 -1
- package/src/components/activity-indicator/index.ios.ts +4 -0
- package/src/components/activity-indicator/shared.ts +32 -13
- package/src/components/button.ts +46 -19
- package/src/components/flat-list/index.ts +122 -62
- package/src/components/image/index.android.ts +58 -7
- package/src/components/image/index.ios.ts +58 -7
- package/src/components/image/shared.ts +92 -21
- package/src/components/image-background.ts +29 -9
- package/src/components/input-accessory-view/index.ts +67 -12
- package/src/components/keyboard-avoiding-view/index.ts +61 -15
- package/src/components/modal/index.ts +72 -33
- package/src/components/pressable/index.ts +117 -28
- package/src/components/refresh-control/index.ts +74 -18
- package/src/components/safe-area-view/index.ts +64 -10
- package/src/components/scroll-view/index.android.ts +62 -47
- package/src/components/scroll-view/index.ios.ts +19 -17
- package/src/components/scroll-view/projection.ts +363 -64
- package/src/components/scroll-view/shared.ts +312 -90
- package/src/components/scroll-view/sticky-header.ts +36 -24
- package/src/components/section-list/index.ts +86 -53
- package/src/components/switch/index.android.ts +60 -8
- package/src/components/switch/index.ios.ts +60 -8
- package/src/components/switch/shared.ts +93 -6
- package/src/components/text-input.ts +95 -13
- package/src/components/touchable/index.ts +348 -64
- package/src/components/touchable-native-feedback/index.ts +94 -31
- package/src/components/virtualized-list/directives.ts +19 -5
- package/src/components/virtualized-list/index.ts +380 -85
- package/src/components/virtualized-section-list/directives.ts +6 -3
- package/src/components/virtualized-section-list/index.ts +146 -33
- package/src/components.ts +9 -1
- package/src/create-portal/index.ts +31 -31
- package/src/create-tunnel/index.ts +16 -17
- package/src/descriptor-to-angular/index.ts +29 -8
- package/src/diagnostics.ts +138 -0
- package/src/host-instance/index.ts +9 -3
- package/src/index.ts +61 -3
- package/src/modules/animated/animated-leaf-binder.ts +28 -77
- package/src/modules/animated/create-animated-component.ts +115 -47
- package/src/modules/app-registry/index.ts +9 -9
- package/src/modules/status-bar/index.ts +13 -4
- package/src/primitives/index.ts +47 -2
- package/src/primitives/shared.ts +170 -10
- package/src/render/index.ts +77 -39
- package/src/renderer/index.ts +76 -14
- package/src/services/color-scheme.service.ts +3 -1
- package/src/services/window-dimensions.service.ts +11 -4
- 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/modules/animated/animated-leaf-binder/index.ts +0 -101
|
@@ -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,69 @@ 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: [
|
|
52
|
+
{
|
|
53
|
+
provide: NG_VALUE_ACCESSOR,
|
|
54
|
+
useExisting: forwardRef(() => Switch),
|
|
55
|
+
multi: true,
|
|
56
|
+
},
|
|
57
|
+
], usesInheritance: true, hostDirectives: [{ directive: i1.SymbioteStyleInputDirective, inputs: ["style", "style"] }], ngImport: i0, template: `
|
|
26
58
|
<symbiote-switch
|
|
27
59
|
#nativeSwitch="symbioteHost"
|
|
28
|
-
[symbioteHostProps]="hostProps"
|
|
60
|
+
[symbioteHostProps]="hostProps()"
|
|
29
61
|
(change)="handleChange($event, nativeSwitch)"
|
|
30
62
|
/>
|
|
31
63
|
`, isInline: true, dependencies: [{ kind: "component", type: SwitchHost, selector: "symbiote-switch" }, { kind: "directive", type: SymbioteHostPropsDirective, selector: "[symbioteHostProps]", inputs: ["symbioteHostProps"], exportAs: ["symbioteHost"] }] });
|
|
32
64
|
}
|
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Switch, decorators: [{
|
|
34
66
|
type: Component,
|
|
35
67
|
args: [{
|
|
36
68
|
selector: 'Switch',
|
|
37
69
|
standalone: true,
|
|
70
|
+
hostDirectives: [
|
|
71
|
+
{ directive: SymbioteStyleInputDirective, inputs: ['style'] },
|
|
72
|
+
],
|
|
38
73
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
39
74
|
imports: [SwitchHost, SymbioteHostPropsDirective],
|
|
75
|
+
providers: [
|
|
76
|
+
{
|
|
77
|
+
provide: NG_VALUE_ACCESSOR,
|
|
78
|
+
useExisting: forwardRef(() => Switch),
|
|
79
|
+
multi: true,
|
|
80
|
+
},
|
|
81
|
+
],
|
|
40
82
|
inputs: [
|
|
41
83
|
'value',
|
|
42
84
|
'disabled',
|
|
@@ -61,7 +103,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
61
103
|
template: `
|
|
62
104
|
<symbiote-switch
|
|
63
105
|
#nativeSwitch="symbioteHost"
|
|
64
|
-
[symbioteHostProps]="hostProps"
|
|
106
|
+
[symbioteHostProps]="hostProps()"
|
|
65
107
|
(change)="handleChange($event, nativeSwitch)"
|
|
66
108
|
/>
|
|
67
109
|
`,
|
|
@@ -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;;;AA+CtC,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,CACf,KAAc,EACd,UAA8C,EAC9C,EAAE,CAAC,CAAC;YACJ,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;IAChD,EAAE;IACF,8FAA8F;IAC9F,+FAA+F;IAC/F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;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,69 @@ 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: [
|
|
51
|
+
{
|
|
52
|
+
provide: NG_VALUE_ACCESSOR,
|
|
53
|
+
useExisting: forwardRef(() => Switch),
|
|
54
|
+
multi: true,
|
|
55
|
+
},
|
|
56
|
+
], usesInheritance: true, hostDirectives: [{ directive: i1.SymbioteStyleInputDirective, inputs: ["style", "style"] }], ngImport: i0, template: `
|
|
25
57
|
<symbiote-switch
|
|
26
58
|
#nativeSwitch="symbioteHost"
|
|
27
|
-
[symbioteHostProps]="hostProps"
|
|
59
|
+
[symbioteHostProps]="hostProps()"
|
|
28
60
|
(change)="handleChange($event, nativeSwitch)"
|
|
29
61
|
/>
|
|
30
62
|
`, isInline: true, dependencies: [{ kind: "component", type: SwitchHost, selector: "symbiote-switch" }, { kind: "directive", type: SymbioteHostPropsDirective, selector: "[symbioteHostProps]", inputs: ["symbioteHostProps"], exportAs: ["symbioteHost"] }] });
|
|
31
63
|
}
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: Switch, decorators: [{
|
|
33
65
|
type: Component,
|
|
34
66
|
args: [{
|
|
35
67
|
selector: 'Switch',
|
|
36
68
|
standalone: true,
|
|
69
|
+
hostDirectives: [
|
|
70
|
+
{ directive: SymbioteStyleInputDirective, inputs: ['style'] },
|
|
71
|
+
],
|
|
37
72
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
38
73
|
imports: [SwitchHost, SymbioteHostPropsDirective],
|
|
74
|
+
providers: [
|
|
75
|
+
{
|
|
76
|
+
provide: NG_VALUE_ACCESSOR,
|
|
77
|
+
useExisting: forwardRef(() => Switch),
|
|
78
|
+
multi: true,
|
|
79
|
+
},
|
|
80
|
+
],
|
|
39
81
|
inputs: [
|
|
40
82
|
'value',
|
|
41
83
|
'disabled',
|
|
@@ -60,7 +102,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
60
102
|
template: `
|
|
61
103
|
<symbiote-switch
|
|
62
104
|
#nativeSwitch="symbioteHost"
|
|
63
|
-
[symbioteHostProps]="hostProps"
|
|
105
|
+
[symbioteHostProps]="hostProps()"
|
|
64
106
|
(change)="handleChange($event, nativeSwitch)"
|
|
65
107
|
/>
|
|
66
108
|
`,
|
|
@@ -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;;;AA+CtC,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,CACf,MAAe,EACf,UAA8C,EAC9C,EAAE,CAAC,CAAC;YACJ,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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AC;4BACrC,KAAK,EAAE,IAAI;yBACZ;qBACF;oBACD,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,14 +1,15 @@
|
|
|
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";
|
|
5
|
-
export type { ISwitchProps, ISwitchTrackColor } from '@symbiote-native/components';
|
|
6
|
+
export type { ISwitchProps, ISwitchTrackColor, } from '@symbiote-native/components';
|
|
6
7
|
export type ISwitchInputs = Pick<ISwitchProps, 'value' | 'disabled' | 'trackColor' | 'thumbColor' | 'ios_backgroundColor' | 'style' | 'nativeID' | 'testID' | 'accessibilityLabel' | 'accessibilityRole' | 'accessibilityState' | 'accessibilityValue' | 'accessibilityHint' | 'accessible' | 'role' | 'aria-label' | 'aria-disabled' | 'aria-checked'>;
|
|
7
8
|
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>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Directive, EventEmitter, Output } from '@angular/core';
|
|
2
|
-
import { renderSwitch, resolveAccessibilityProps } from '@symbiote-native/components';
|
|
1
|
+
import { ChangeDetectorRef, Directive, EventEmitter, Output, computed, inject, signal, } from '@angular/core';
|
|
2
|
+
import { renderSwitch, resolveAccessibilityProps, } from '@symbiote-native/components';
|
|
3
3
|
import { createInitialSwitchState, shouldSnapBack, switchReducer, valueFromChange, } from '@symbiote-native/components';
|
|
4
4
|
import { dispatchViewCommand, dlog, isSymbioteNode, whenCommitted, } from '@symbiote-native/engine';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
@@ -49,8 +49,44 @@ export class SwitchBase {
|
|
|
49
49
|
'aria-label';
|
|
50
50
|
'aria-disabled';
|
|
51
51
|
'aria-checked';
|
|
52
|
+
// NOT a hostProps dependency - only snapBackIfNeeded reads it, and the bag's `value` comes from
|
|
53
|
+
// the @Input, not from this reducer state. So it stays a plain field; if a future change makes
|
|
54
|
+
// the bag read it, it must become a signal first (see inputsRevision's note).
|
|
52
55
|
switchState = createInitialSwitchState();
|
|
53
|
-
|
|
56
|
+
// Only setDisabledState()/writeValue() need this: @angular/forms mutates `value`/`disabled` from
|
|
57
|
+
// OUTSIDE Angular's own binding path, which doesn't itself schedule a tick under zoneless CD.
|
|
58
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
59
|
+
// Bridges the non-reactive @Input fields into the reactive graph so hostProps below can be a
|
|
60
|
+
// memoized computed(). Signal inputs would make this unnecessary, but `input()` is visible only
|
|
61
|
+
// to the AOT compiler and this package's unit suite runs on JIT - see the
|
|
62
|
+
// `angular-adapter-change-detection` skill, §6. `signal()`/`computed()` are plain runtime APIs
|
|
63
|
+
// and need no compiler support, which is what makes this bridge possible at all.
|
|
64
|
+
//
|
|
65
|
+
// Bumped from ngOnChanges (covers every @Input) AND from the two ControlValueAccessor writers
|
|
66
|
+
// below, which assign `value`/`disabled` from OUTSIDE Angular's binding path and so never reach
|
|
67
|
+
// ngOnChanges. ONLY a genuine dependency of the bag may bump it - widening it to "bump on
|
|
68
|
+
// everything" silently un-memoizes the bag and defeats the point. State that is not an @Input
|
|
69
|
+
// and is not one of those two writers needs its OWN signal instead (the platform components'
|
|
70
|
+
// anchor style is exactly that case).
|
|
71
|
+
inputsRevision = signal(0, /* @ts-ignore */
|
|
72
|
+
...(ngDevMode ? [{ debugName: "inputsRevision" }] : /* istanbul ignore next */ []));
|
|
73
|
+
ngOnChanges() {
|
|
74
|
+
this.inputsRevision.update(revision => revision + 1);
|
|
75
|
+
}
|
|
76
|
+
// MEASURED 2026-08-16: as a getter this rebuilt the bag on every refresh of this view, so
|
|
77
|
+
// `[symbioteHostProps]`'s reference check failed every time and every key was re-pushed through
|
|
78
|
+
// Renderer2 -> routeProp - pure waste when nothing changed. computed() returns the SAME object
|
|
79
|
+
// until a tracked dependency actually changes, and the input setter then skips the whole spread.
|
|
80
|
+
//
|
|
81
|
+
// A computed FIELD cannot be overridden by a subclass accessor the way a getter can, so the
|
|
82
|
+
// platform components override buildHostProps() below and this stays the single memoization
|
|
83
|
+
// point for every platform.
|
|
84
|
+
hostProps = computed(() => {
|
|
85
|
+
this.inputsRevision();
|
|
86
|
+
return this.buildHostProps();
|
|
87
|
+
}, /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "hostProps" }] : /* istanbul ignore next */ []));
|
|
89
|
+
buildHostProps() {
|
|
54
90
|
const props = resolveAccessibilityProps(this.inputProps());
|
|
55
91
|
const { value, disabled, trackColor, thumbColor, ios_backgroundColor, style, onValueChange: _onValueChange, ...passthrough } = props;
|
|
56
92
|
return renderSwitch({
|
|
@@ -72,7 +108,10 @@ export class SwitchBase {
|
|
|
72
108
|
if (next === undefined)
|
|
73
109
|
return;
|
|
74
110
|
this.valueChange.emit(next);
|
|
75
|
-
this.switchState = switchReducer(this.switchState, {
|
|
111
|
+
this.switchState = switchReducer(this.switchState, {
|
|
112
|
+
type: 'native-reported',
|
|
113
|
+
value: next,
|
|
114
|
+
});
|
|
76
115
|
const hostNode = readSwitchNode(node);
|
|
77
116
|
if (hostNode === null)
|
|
78
117
|
return;
|
|
@@ -89,6 +128,31 @@ export class SwitchBase {
|
|
|
89
128
|
dispatchViewCommand(node, this.platform.snapBackCommand, [fabricValue]);
|
|
90
129
|
});
|
|
91
130
|
}
|
|
131
|
+
// ControlValueAccessor — `value` is a plain field feeding `hostProps` on every CD check, no
|
|
132
|
+
// ngOnChanges/stale-safe commit dance to guard (unlike TextInput, a boolean toggle has no
|
|
133
|
+
// keystroke to race), so writeValue()/setDisabledState() can set it straight.
|
|
134
|
+
writeValue(value) {
|
|
135
|
+
this.value = value ?? false;
|
|
136
|
+
// `value` feeds hostProps but this write bypasses Angular's binding path, so ngOnChanges never
|
|
137
|
+
// fires for it - without the bump the memoized bag would keep reporting the old value and the
|
|
138
|
+
// switch would stop reflecting a form-driven change.
|
|
139
|
+
this.inputsRevision.update(revision => revision + 1);
|
|
140
|
+
this.changeDetector.markForCheck();
|
|
141
|
+
}
|
|
142
|
+
registerOnChange(fn) {
|
|
143
|
+
this.valueChange.subscribe(fn);
|
|
144
|
+
}
|
|
145
|
+
registerOnTouched(fn) {
|
|
146
|
+
// Switch has no blur concept (it's a discrete toggle, not a text field) — `change` is the
|
|
147
|
+
// closest touched signal, same convention Angular's own checkbox CVAs use.
|
|
148
|
+
this.change.subscribe(() => fn());
|
|
149
|
+
}
|
|
150
|
+
setDisabledState(isDisabled) {
|
|
151
|
+
this.disabled = isDisabled;
|
|
152
|
+
// Same reason as writeValue: an @angular/forms write that never reaches ngOnChanges.
|
|
153
|
+
this.inputsRevision.update(revision => revision + 1);
|
|
154
|
+
this.changeDetector.markForCheck();
|
|
155
|
+
}
|
|
92
156
|
inputProps() {
|
|
93
157
|
const props = {
|
|
94
158
|
value: this.value,
|
|
@@ -114,10 +178,10 @@ export class SwitchBase {
|
|
|
114
178
|
'aria-checked': this['aria-checked'],
|
|
115
179
|
};
|
|
116
180
|
}
|
|
117
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.
|
|
118
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.
|
|
181
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SwitchBase, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
182
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: SwitchBase, isStandalone: true, outputs: { valueChange: "valueChange", change: "change" }, usesOnChanges: true, ngImport: i0 });
|
|
119
183
|
}
|
|
120
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.
|
|
184
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: SwitchBase, decorators: [{
|
|
121
185
|
type: Directive
|
|
122
186
|
}], propDecorators: { valueChange: [{
|
|
123
187
|
type: Output
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/components/switch/shared.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/components/switch/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,GAEP,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,YAAY,EACZ,yBAAyB,GAC1B,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EACL,wBAAwB,EACxB,cAAc,EACd,aAAa,EACb,eAAe,GAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,mBAAmB,EACnB,IAAI,EACJ,cAAc,EACd,aAAa,GAKd,MAAM,yBAAyB,CAAC;;AAiCjC,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,cAAc,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACxC,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,MAAM,IAAI,KAAK;QACf,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,EAC1B,CAAC;QACD,OAAO,KAAK,CAAC,IAAI,CAAC;IACpB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,CACL,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAAI;QACd,aAAa,IAAI,KAAK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;uGA1LmB,UAAU;2FAAV,UAAU;;2FAAV,UAAU;kBAD/B,SAAS;;sBAQP,MAAM;;sBACN,MAAM"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { EventEmitter, type AfterViewInit, type OnChanges, type OnDestroy, type SimpleChanges } from '@angular/core';
|
|
2
|
+
import { type ControlValueAccessor } from '@angular/forms';
|
|
2
3
|
import { type IAccessibilityProps, type IAccessibilityStateValue, type IAriaProps, type IEnterKeyHint, type IInputMode, type ISubmitBehavior, type ITextInputEventHandler, type ITextInputHandle, type ITextInputSelection } from '@symbiote-native/components';
|
|
3
4
|
import { type IStyleProp, type ISymbioteEvent, type ITextStyle } from '@symbiote-native/engine';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
|
|
6
|
+
import * as i1 from "../primitives/shared";
|
|
7
|
+
export type { ITextInputHandle, ITextInputSelection, IInputMode, IEnterKeyHint, ISubmitBehavior, };
|
|
6
8
|
export interface IAngularTextInputProps extends IAccessibilityProps, IAriaProps {
|
|
7
9
|
value?: string;
|
|
8
10
|
defaultValue?: string;
|
|
@@ -47,7 +49,7 @@ export interface IAngularTextInputProps extends IAccessibilityProps, IAriaProps
|
|
|
47
49
|
onContentSizeChange?: ITextInputEventHandler;
|
|
48
50
|
}
|
|
49
51
|
export type IAngularTextInputInputs = Omit<IAngularTextInputProps, 'onValueChange' | 'onChange' | 'onFocus' | 'onBlur' | 'onEndEditing' | 'onSubmitEditing' | 'onKeyPress' | 'onSelectionChange' | 'onContentSizeChange' | 'onAccessibilityAction' | 'onAccessibilityTap' | 'onMagicTap' | 'onAccessibilityEscape'>;
|
|
50
|
-
export declare class TextInput implements IAngularTextInputInputs, ITextInputHandle, OnChanges, AfterViewInit, OnDestroy {
|
|
52
|
+
export declare class TextInput implements IAngularTextInputInputs, ITextInputHandle, OnChanges, AfterViewInit, OnDestroy, ControlValueAccessor {
|
|
51
53
|
value?: string;
|
|
52
54
|
defaultValue?: string;
|
|
53
55
|
placeholder?: string;
|
|
@@ -125,13 +127,19 @@ export declare class TextInput implements IAngularTextInputInputs, ITextInputHan
|
|
|
125
127
|
ariaSelected?: boolean;
|
|
126
128
|
private hostRef?;
|
|
127
129
|
private readonly elementRef;
|
|
130
|
+
private readonly changeDetector;
|
|
128
131
|
private mostRecentEventCount;
|
|
129
132
|
private lastNativeText;
|
|
130
133
|
private focused;
|
|
131
134
|
private cancelAutoFocus?;
|
|
135
|
+
private isFirstFormWrite;
|
|
132
136
|
get isMultiline(): boolean;
|
|
133
137
|
get hostProps(): Record<string, unknown>;
|
|
134
138
|
ngOnChanges(changes: SimpleChanges): void;
|
|
139
|
+
writeValue(value: string | null): void;
|
|
140
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
141
|
+
registerOnTouched(fn: () => void): void;
|
|
142
|
+
setDisabledState(isDisabled: boolean): void;
|
|
135
143
|
ngAfterViewInit(): void;
|
|
136
144
|
ngOnDestroy(): void;
|
|
137
145
|
handleChange(event: unknown): void;
|
|
@@ -149,5 +157,5 @@ export declare class TextInput implements IAngularTextInputInputs, ITextInputHan
|
|
|
149
157
|
private get foldedAccessibility();
|
|
150
158
|
private get hostNode();
|
|
151
159
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextInput, never>;
|
|
152
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TextInput, "TextInput", never, { "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "placeholderTextColor": { "alias": "placeholderTextColor"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "keyboardType": { "alias": "keyboardType"; "required": false; }; "secureTextEntry": { "alias": "secureTextEntry"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "autoCapitalize": { "alias": "autoCapitalize"; "required": false; }; "autoCorrect": { "alias": "autoCorrect"; "required": false; }; "autoComplete": { "alias": "autoComplete"; "required": false; }; "textContentType": { "alias": "textContentType"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "showSoftInputOnFocus": { "alias": "showSoftInputOnFocus"; "required": false; }; "returnKeyType": { "alias": "returnKeyType"; "required": false; }; "selectTextOnFocus": { "alias": "selectTextOnFocus"; "required": false; }; "scrollEnabled": { "alias": "scrollEnabled"; "required": false; }; "numberOfLines": { "alias": "numberOfLines"; "required": false; }; "textAlign": { "alias": "textAlign"; "required": false; }; "blurOnSubmit": { "alias": "blurOnSubmit"; "required": false; }; "inputMode": { "alias": "inputMode"; "required": false; }; "enterKeyHint": { "alias": "enterKeyHint"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "submitBehavior": { "alias": "submitBehavior"; "required": false; }; "cursorColor": { "alias": "cursorColor"; "required": false; }; "selectionColor": { "alias": "selectionColor"; "required": false; }; "selectionHandleColor": { "alias": "selectionHandleColor"; "required": false; }; "underlineColorAndroid": { "alias": "underlineColorAndroid"; "required": false; }; "inputAccessoryViewID": { "alias": "inputAccessoryViewID"; "required": false; }; "style": { "alias": "style"; "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": "aria-label"; "required": false; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; }; "ariaLive": { "alias": "aria-live"; "required": false; }; "ariaHidden": { "alias": "aria-hidden"; "required": false; }; "ariaBusy": { "alias": "aria-busy"; "required": false; }; "ariaChecked": { "alias": "aria-checked"; "required": false; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; }; "ariaExpanded": { "alias": "aria-expanded"; "required": false; }; "ariaSelected": { "alias": "aria-selected"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; "focusEvent": "focus"; "blurEvent": "blur"; "endEditing": "endEditing"; "submitEditing": "submitEditing"; "keyPress": "keyPress"; "selectionChange": "selectionChange"; "contentSizeChange": "contentSizeChange"; "accessibilityAction": "accessibilityAction"; "accessibilityTap": "accessibilityTap"; "magicTap": "magicTap"; "accessibilityEscape": "accessibilityEscape"; }, never, never, true,
|
|
160
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TextInput, "TextInput", never, { "value": { "alias": "value"; "required": false; }; "defaultValue": { "alias": "defaultValue"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "placeholderTextColor": { "alias": "placeholderTextColor"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "keyboardType": { "alias": "keyboardType"; "required": false; }; "secureTextEntry": { "alias": "secureTextEntry"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "multiline": { "alias": "multiline"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "autoCapitalize": { "alias": "autoCapitalize"; "required": false; }; "autoCorrect": { "alias": "autoCorrect"; "required": false; }; "autoComplete": { "alias": "autoComplete"; "required": false; }; "textContentType": { "alias": "textContentType"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "showSoftInputOnFocus": { "alias": "showSoftInputOnFocus"; "required": false; }; "returnKeyType": { "alias": "returnKeyType"; "required": false; }; "selectTextOnFocus": { "alias": "selectTextOnFocus"; "required": false; }; "scrollEnabled": { "alias": "scrollEnabled"; "required": false; }; "numberOfLines": { "alias": "numberOfLines"; "required": false; }; "textAlign": { "alias": "textAlign"; "required": false; }; "blurOnSubmit": { "alias": "blurOnSubmit"; "required": false; }; "inputMode": { "alias": "inputMode"; "required": false; }; "enterKeyHint": { "alias": "enterKeyHint"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "submitBehavior": { "alias": "submitBehavior"; "required": false; }; "cursorColor": { "alias": "cursorColor"; "required": false; }; "selectionColor": { "alias": "selectionColor"; "required": false; }; "selectionHandleColor": { "alias": "selectionHandleColor"; "required": false; }; "underlineColorAndroid": { "alias": "underlineColorAndroid"; "required": false; }; "inputAccessoryViewID": { "alias": "inputAccessoryViewID"; "required": false; }; "style": { "alias": "style"; "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": "aria-label"; "required": false; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; }; "ariaLive": { "alias": "aria-live"; "required": false; }; "ariaHidden": { "alias": "aria-hidden"; "required": false; }; "ariaBusy": { "alias": "aria-busy"; "required": false; }; "ariaChecked": { "alias": "aria-checked"; "required": false; }; "ariaDisabled": { "alias": "aria-disabled"; "required": false; }; "ariaExpanded": { "alias": "aria-expanded"; "required": false; }; "ariaSelected": { "alias": "aria-selected"; "required": false; }; }, { "valueChange": "valueChange"; "change": "change"; "focusEvent": "focus"; "blurEvent": "blur"; "endEditing": "endEditing"; "submitEditing": "submitEditing"; "keyPress": "keyPress"; "selectionChange": "selectionChange"; "contentSizeChange": "contentSizeChange"; "accessibilityAction": "accessibilityAction"; "accessibilityTap": "accessibilityTap"; "magicTap": "magicTap"; "accessibilityEscape": "accessibilityEscape"; }, never, never, true, [{ directive: typeof i1.SymbioteStyleInputDirective; inputs: { "style": "style"; }; outputs: {}; }]>;
|
|
153
161
|
}
|