@rdlabo/ionic-angular-kit 21.4.2 → 21.4.4
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rdlabo/ionic-angular-kit",
|
|
3
|
-
"version": "21.4.
|
|
3
|
+
"version": "21.4.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/rdlabo-team/ionic-angular-library.git"
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
"@capacitor/core": ">=6.0.0 <9.0.0",
|
|
16
16
|
"@capacitor/app": ">=6.0.0 <9.0.0",
|
|
17
17
|
"@capawesome/capacitor-live-update": ">=6.0.0 <9.0.0",
|
|
18
|
-
"@capawesome-team/capacitor-sqlite": ">=0.3.0 <1.0.0",
|
|
19
18
|
"@capacitor/haptics": ">=6.0.0 <9.0.0",
|
|
20
19
|
"@capacitor/keyboard": ">=6.0.0 <9.0.0",
|
|
21
20
|
"@capacitor/network": ">=6.0.0 <9.0.0",
|
|
@@ -37,9 +36,6 @@
|
|
|
37
36
|
"@capawesome/capacitor-live-update": {
|
|
38
37
|
"optional": true
|
|
39
38
|
},
|
|
40
|
-
"@capawesome-team/capacitor-sqlite": {
|
|
41
|
-
"optional": true
|
|
42
|
-
},
|
|
43
39
|
"@capacitor/preferences": {
|
|
44
40
|
"optional": true
|
|
45
41
|
},
|
|
@@ -84,12 +84,15 @@ interface OfflineReplicaIgnoredDef {
|
|
|
84
84
|
}
|
|
85
85
|
type StripNullish<T> = Exclude<T, null | undefined>;
|
|
86
86
|
type NormalizeReplicaColumnValue<T> = T extends string ? string : T extends number ? number : T extends boolean ? boolean : T extends Date ? string | Date : T;
|
|
87
|
-
type
|
|
88
|
-
type
|
|
87
|
+
type StrictNullChecksEnabled = undefined extends null ? false : true;
|
|
88
|
+
type ReplicaColumnNullabilityForSelect<T> = StrictNullChecksEnabled extends true ? null extends T ? ReplicaNullableBrand & {
|
|
89
89
|
readonly [replicaNullableBrand]: 'nullable';
|
|
90
|
-
}
|
|
90
|
+
} : undefined extends T ? ReplicaNullableBrand & {
|
|
91
|
+
readonly [replicaNullableBrand]: 'nullable';
|
|
92
|
+
} : ReplicaNullableBrand & {
|
|
91
93
|
readonly [replicaNullableBrand]: 'required';
|
|
92
|
-
}
|
|
94
|
+
} : ReplicaNullableBrand;
|
|
95
|
+
type OfflineReplicaColumnDefForValue<T> = OfflineReplicaColumnDef<NormalizeReplicaColumnValue<StripNullish<T>>, ReplicaColumnNullabilityForSelect<T>>;
|
|
93
96
|
type OfflineReplicaFieldDefForKey<TSelect extends Record<string, unknown>, K extends keyof TSelect> = (StripNullish<TSelect[K]> extends number ? OfflineReplicaServerIdDef : never) | OfflineReplicaIgnoredDef | OfflineReplicaColumnDefForValue<TSelect[K]>;
|
|
94
97
|
type ExactSelectKeys<TSelect extends Record<string, unknown>, TFields> = Exclude<keyof TFields, keyof TSelect> extends never ? (Exclude<keyof TSelect, keyof TFields> extends never ? TFields : never) : never;
|
|
95
98
|
/** Configuration accepted by {@link defineReplicaEntity}. */
|
|
@@ -427,8 +430,8 @@ declare class OfflineCoordinatorService {
|
|
|
427
430
|
interface OfflineKitOptions {
|
|
428
431
|
/** Encrypted SQLite database name used on iOS and Android. */
|
|
429
432
|
databaseName: string;
|
|
430
|
-
/**
|
|
431
|
-
|
|
433
|
+
/** Creates the native database encryption key on first install. Required on iOS and Android. */
|
|
434
|
+
createEncryptionKey?: () => Promise<string>;
|
|
432
435
|
/** Versioned product replica schema applied to native SQLite during initialization. */
|
|
433
436
|
replicaSchema: OfflineReplicaSchemaBundle;
|
|
434
437
|
}
|
|
@@ -479,12 +482,11 @@ declare class OfflineRequestPolicyRegistry {
|
|
|
479
482
|
static ɵprov: i0.ɵɵInjectableDeclaration<OfflineRequestPolicyRegistry>;
|
|
480
483
|
}
|
|
481
484
|
|
|
482
|
-
/** Minimal
|
|
483
|
-
interface
|
|
485
|
+
/** Minimal native SQLite driver surface required by the offline repository. */
|
|
486
|
+
interface CommunitySqliteDriver {
|
|
484
487
|
open(options: {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
readOnly: false;
|
|
488
|
+
databaseName: string;
|
|
489
|
+
createEncryptionKey?: () => Promise<string>;
|
|
488
490
|
}): Promise<{
|
|
489
491
|
databaseId: string;
|
|
490
492
|
}>;
|
|
@@ -511,10 +513,31 @@ interface CapawesomeSqlitePlugin {
|
|
|
511
513
|
databaseId: string;
|
|
512
514
|
}): Promise<void>;
|
|
513
515
|
}
|
|
514
|
-
/**
|
|
515
|
-
|
|
516
|
+
/** Open community SQLite database surface used by the standard driver. */
|
|
517
|
+
interface CommunitySqliteDatabase {
|
|
518
|
+
open(): Promise<void>;
|
|
519
|
+
run(statement: string, values?: unknown[], transaction?: boolean): Promise<unknown>;
|
|
520
|
+
query(statement: string, values?: unknown[]): Promise<{
|
|
521
|
+
values?: unknown[];
|
|
522
|
+
}>;
|
|
523
|
+
beginTransaction(): Promise<unknown>;
|
|
524
|
+
commitTransaction(): Promise<unknown>;
|
|
525
|
+
rollbackTransaction(): Promise<unknown>;
|
|
526
|
+
}
|
|
527
|
+
/** Community SQLite connection surface used to provision encrypted databases. */
|
|
528
|
+
interface CommunitySqliteConnection {
|
|
529
|
+
isSecretStored(): Promise<{
|
|
530
|
+
result?: boolean;
|
|
531
|
+
}>;
|
|
532
|
+
setEncryptionSecret(passphrase: string): Promise<void>;
|
|
533
|
+
createConnection(database: string, encrypted: boolean, mode: string, version: number, readonly: boolean): Promise<CommunitySqliteDatabase>;
|
|
534
|
+
}
|
|
535
|
+
/** DI token for the native community SQLite driver. */
|
|
536
|
+
declare const COMMUNITY_SQLITE: InjectionToken<CommunitySqliteDriver | null>;
|
|
537
|
+
/** Create the standard encrypted `@capacitor-community/sqlite` driver. */
|
|
538
|
+
declare function createCommunitySqliteDriver(connection: CommunitySqliteConnection): CommunitySqliteDriver;
|
|
516
539
|
type SQLiteValue = string | number | null;
|
|
517
|
-
/** Native iOS/Android
|
|
540
|
+
/** Native iOS/Android repository backed by encrypted `@capacitor-community/sqlite`. */
|
|
518
541
|
declare class SqliteOfflineRepository implements OfflineRepository {
|
|
519
542
|
#private;
|
|
520
543
|
initialize(): Promise<void>;
|
|
@@ -550,14 +573,14 @@ interface ProvideOfflineOptions extends OfflineKitOptions {
|
|
|
550
573
|
commandHooks?: Type<OfflineCommandHooks>;
|
|
551
574
|
/** Optional additional providers required by product adapters. */
|
|
552
575
|
providers?: readonly Provider[];
|
|
553
|
-
/**
|
|
554
|
-
|
|
576
|
+
/** Application-installed `@capacitor-community/sqlite` connection. Required only on iOS and Android. */
|
|
577
|
+
sqliteConnection?: CommunitySqliteConnection;
|
|
555
578
|
}
|
|
556
579
|
/**
|
|
557
580
|
* Provide the standard scoped offline runtime.
|
|
558
581
|
*
|
|
559
582
|
* @remarks
|
|
560
|
-
* Web uses Ionic Storage. Native iOS/Android uses encrypted
|
|
583
|
+
* Web uses Ionic Storage. Native iOS/Android uses encrypted `@capacitor-community/sqlite`. The application owns
|
|
561
584
|
* URL/DTO policy and command execution; the kit owns persistence, ordering, retries, and session
|
|
562
585
|
* isolation.
|
|
563
586
|
*/
|
|
@@ -641,5 +664,5 @@ declare class OfflineRequestFallbackService {
|
|
|
641
664
|
static ɵprov: i0.ɵɵInjectableDeclaration<OfflineRequestFallbackService>;
|
|
642
665
|
}
|
|
643
666
|
|
|
644
|
-
export {
|
|
645
|
-
export type {
|
|
667
|
+
export { COMMUNITY_SQLITE, DEFAULT_OFFLINE_COMMAND_HOOKS, IonicOfflineRepository, OFFLINE_BYPASS, OFFLINE_COMMAND_EXECUTOR, OFFLINE_COMMAND_HOOKS, OFFLINE_KIT_OPTIONS, OFFLINE_REPLICA_PULLER, OFFLINE_REPOSITORY, OFFLINE_REQUEST_POLICIES, OFFLINE_RESPONSE_HEADER, OFFLINE_SCHEMA_VERSION, OFFLINE_SYNC_CONTEXT, OfflineCoordinatorService, OfflineNetworkService, OfflinePayloadValidationError, OfflineReplicaPullService, OfflineRequestFallbackService, OfflineRequestPolicyRegistry, OfflineSessionService, OfflineSyncService, SqliteOfflineRepository, booleanColumn, createCommunitySqliteDriver, datetime, decodeOfflineReplicaValues, defineOfflineReplicaSchema, defineReplicaEntity, encodeOfflineReplicaValues, ignored, integer, isOfflineFallbackError, json, nullable, offlineInterceptor, projectOfflineReplicaValues, provideOffline, provideOfflineRequestPolicy, real, selectOfflineRepository, serverId, sha256OfflineReplicaSchema, text };
|
|
668
|
+
export type { CommunitySqliteConnection, CommunitySqliteDatabase, CommunitySqliteDriver, EnqueueOfflineCommand, OfflineCommand, OfflineCommandExecutor, OfflineCommandHooks, OfflineCommandResult, OfflineCommandState, OfflineCommandTarget, OfflineKitOptions, OfflineLogoutAction, OfflineNetworkState, OfflineReadRequestPlan, OfflineReplicaChange, OfflineReplicaColumnDef, OfflineReplicaCursor, OfflineReplicaEntityDefinition, OfflineReplicaEntitySchema, OfflineReplicaEntityScope, OfflineReplicaFieldDescriptor, OfflineReplicaFieldPolicy, OfflineReplicaIgnoredDef, OfflineReplicaMigration, OfflineReplicaPullPage, OfflineReplicaPullRequest, OfflineReplicaPuller, OfflineReplicaRow, OfflineReplicaRowKey, OfflineReplicaSchemaBundle, OfflineReplicaSchemaDefinition, OfflineReplicaServerIdDef, OfflineReplicaSqliteAffinity, OfflineReplicaStorageKind, OfflineReplicaSyncState, OfflineReplicaTransaction, OfflineReplicaWebMigrationCallback, OfflineReplicaWebMigrationResult, OfflineReplicaWebMigrationRow, OfflineRepository, OfflineRequestPlan, OfflineRequestPolicy, OfflineResponseSource, OfflineScope, OfflineSessionManifest, OfflineSyncContext, OfflineSyncSession, OfflineSyncState, ProvideOfflineOptions };
|