@rdlabo/ionic-angular-kit 22.0.0-0 → 22.0.0-2
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/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdlabo/ionic-angular-kit",
|
|
3
|
-
"version": "22.0.0-
|
|
3
|
+
"version": "22.0.0-2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/rdlabo-dev/ionic-angular-library.git"
|
|
7
7
|
},
|
|
8
|
+
"homepage": "https://docs.rdlabo.dev/projects/ionic-angular-kit",
|
|
8
9
|
"peerDependencies": {
|
|
9
10
|
"@angular/common": ">=21.0.0 <23.0.0",
|
|
10
11
|
"@angular/core": ">=21.0.0 <23.0.0",
|
|
@@ -91,7 +91,7 @@ declare class KitStorageService {
|
|
|
91
91
|
* that later fails to sign in is still remembered by design: the user simply re-enters/corrects it.
|
|
92
92
|
*
|
|
93
93
|
* These live in the main entry (next to {@link KitStorageService}) rather than in `auth-firebase`,
|
|
94
|
-
* so
|
|
94
|
+
* so `KitAuthInputDirective` can consume them without the main entry depending on the Firebase
|
|
95
95
|
* entry.
|
|
96
96
|
*/
|
|
97
97
|
/** Minimal async key/value store — structurally satisfied by `KitStorageService`. */
|
|
@@ -768,69 +768,40 @@ interface KitLanguageActionSheetOptions {
|
|
|
768
768
|
declare const kitPresentLanguageActionSheet: (actionSheetCtrl: ActionSheetController, options: KitLanguageActionSheetOptions) => Promise<void>;
|
|
769
769
|
|
|
770
770
|
/**
|
|
771
|
-
* The mode of {@link KitAuthInputDirective}.
|
|
771
|
+
* The email persistence mode of {@link KitAuthInputDirective}.
|
|
772
772
|
*
|
|
773
|
-
* - `'
|
|
774
|
-
* - `'email'` — sign-
|
|
775
|
-
* - `'email-remember'` — sign-up email: remember on change only (no prefill, no forget).
|
|
773
|
+
* - `'email'` — sign-in email: prefill from storage, remember on change, and forget when cleared.
|
|
774
|
+
* - `'email-remember'` — sign-up email: remember on change only, with no prefill or forget behavior.
|
|
776
775
|
*/
|
|
777
|
-
type KitAuthInputMode = '
|
|
776
|
+
type KitAuthInputMode = 'email' | 'email-remember';
|
|
778
777
|
/**
|
|
779
|
-
*
|
|
780
|
-
* attribute. The mode is a typed union so a typo is a compile-time error.
|
|
778
|
+
* Email persistence conveniences for an `ion-input`, applied via the `kitAuthInput` attribute.
|
|
781
779
|
*
|
|
782
|
-
*
|
|
783
|
-
*
|
|
784
|
-
*
|
|
785
|
-
* never sees it. This directive mirrors the first inner-input `change` back onto the host,
|
|
786
|
-
* restoring two-way binding. It is a no-op on every other platform.
|
|
787
|
-
*
|
|
788
|
-
* 2. **Remember / prefill the email (`'email'` and `'email-remember'`).**
|
|
789
|
-
* - `'email'` (sign-in) — on init recalls the last entered email and, *only while the field is
|
|
790
|
-
* still empty*, seeds it via the bound Signal Forms field, so a browser/OS autofill the user
|
|
791
|
-
* actually picks always wins over the prefill. On every committed change (`ionChange`) it
|
|
792
|
-
* remembers a well-formed address, or **forgets** the stored one when the field is cleared
|
|
793
|
-
* (empty after trim) or holds an invalid address — the user intentionally removing the prefill.
|
|
794
|
-
* - `'email-remember'` (sign-up) — remembers a well-formed address on change, but never prefills
|
|
795
|
-
* and never forgets. So the first-sign-up address is captured without pre-populating a
|
|
796
|
-
* stranger's email into a new-account form, and clearing the field does not wipe an email
|
|
797
|
-
* remembered elsewhere.
|
|
798
|
-
*
|
|
799
|
-
* A well-formed email is persisted even if it later fails to sign in — by design; the user simply
|
|
800
|
-
* re-enters it. A malformed/partial entry is never stored (see {@link kitRememberEmail}).
|
|
780
|
+
* The `'email'` mode recalls the last entered address and seeds an empty Signal Forms field. Both
|
|
781
|
+
* modes remember a well-formed address on `ionChange`; only `'email'` forgets a stored value when
|
|
782
|
+
* the field is cleared or invalid. Browser and OS autofill always wins over an asynchronous prefill.
|
|
801
783
|
*
|
|
802
784
|
* @example
|
|
803
785
|
* ```html
|
|
804
|
-
* <!-- sign-in email: iOS autofill + prefill + remember/forget -->
|
|
805
786
|
* <ion-input type="email" autocomplete="email" kitAuthInput="email" [formField]="form.email" />
|
|
806
|
-
* <!-- sign-up email: remember only -->
|
|
807
787
|
* <ion-input type="email" autocomplete="email" kitAuthInput="email-remember" [formField]="form.email" />
|
|
808
|
-
* <!-- password: iOS autofill propagation only -->
|
|
809
|
-
* <ion-input type="password" autocomplete="current-password" kitAuthInput="autofill" [formField]="form.password" />
|
|
810
788
|
* ```
|
|
811
789
|
*
|
|
812
790
|
* @remarks
|
|
813
|
-
* Prefill writes through the Signal Forms `FORM_FIELD` bound on the same element
|
|
814
|
-
*
|
|
815
|
-
*
|
|
791
|
+
* Prefill writes through the Signal Forms `FORM_FIELD` bound on the same element. With no field,
|
|
792
|
+
* prefill is skipped while remember/forget still work from the DOM event. Storage is resolved lazily
|
|
793
|
+
* so applications that do not configure `@ionic/storage` remain unaffected.
|
|
816
794
|
*/
|
|
817
795
|
declare class KitAuthInputDirective implements OnInit {
|
|
818
796
|
#private;
|
|
819
|
-
/**
|
|
797
|
+
/** Required persistence mode; see {@link KitAuthInputMode}. */
|
|
820
798
|
readonly kitAuthInput: i0.InputSignal<KitAuthInputMode>;
|
|
821
|
-
/**
|
|
822
|
-
* Register the iOS autofill workaround and, in `'email'` mode, seed the field from storage.
|
|
823
|
-
*/
|
|
799
|
+
/** Seeds an empty sign-in email field from storage. */
|
|
824
800
|
ngOnInit(): void;
|
|
825
|
-
/**
|
|
826
|
-
* On every committed change (`ionChange`): remember a well-formed email, or — only in the
|
|
827
|
-
* prefilling `'email'` (sign-in) mode — forget the stored one when the field is cleared or invalid,
|
|
828
|
-
* which is the user intentionally removing the prefill. `'email-remember'` never forgets, so
|
|
829
|
-
* editing the sign-up field cannot wipe an email remembered from sign-in.
|
|
830
|
-
*/
|
|
801
|
+
/** Remembers a valid committed email and applies the selected clearing policy. */
|
|
831
802
|
onIonChange(event: Event): void;
|
|
832
803
|
static ɵfac: i0.ɵɵFactoryDeclaration<KitAuthInputDirective, never>;
|
|
833
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<KitAuthInputDirective, "[kitAuthInput]", never, { "kitAuthInput": { "alias": "kitAuthInput"; "required":
|
|
804
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KitAuthInputDirective, "[kitAuthInput]", never, { "kitAuthInput": { "alias": "kitAuthInput"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
834
805
|
}
|
|
835
806
|
|
|
836
807
|
/**
|
|
@@ -1755,15 +1726,18 @@ declare const objectEqual: (a: object, b: object) => boolean;
|
|
|
1755
1726
|
* controls always recover; handle errors inside `work` when the caller needs to react.
|
|
1756
1727
|
*
|
|
1757
1728
|
* @param event - The click or submit event that triggered the operation.
|
|
1758
|
-
* @param work - The
|
|
1759
|
-
*
|
|
1729
|
+
* @param work - The operation result. Promise-like work keeps controls disabled until it settles;
|
|
1730
|
+
* void work still shares this entry point and submit prevention without a synthetic async boundary.
|
|
1731
|
+
* @returns A Promise for asynchronous work, otherwise void.
|
|
1760
1732
|
* @example
|
|
1761
1733
|
* ```html
|
|
1762
1734
|
* <form #formRef (submit)="helper.disableHandler($event, save())"></form>
|
|
1763
1735
|
* <ion-button type="submit" [form]="formRef">Save</ion-button>
|
|
1764
1736
|
* ```
|
|
1765
1737
|
*/
|
|
1766
|
-
declare
|
|
1738
|
+
declare function disableHandler(event: Event, work: void): void;
|
|
1739
|
+
declare function disableHandler(event: Event, work: PromiseLike<unknown>): Promise<void>;
|
|
1740
|
+
declare function disableHandler(event: Event, work: void | PromiseLike<unknown>): void | Promise<void>;
|
|
1767
1741
|
|
|
1768
1742
|
/**
|
|
1769
1743
|
* Toggle the `disabled` flag of a signal-held `ion-infinite-scroll` / `ion-refresher` element.
|