@authup/client-web-kit 1.0.0-beta.13 → 1.0.0-beta.14
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/dist/core/http-client/types.d.ts +2 -0
- package/dist/core/http-client/types.d.ts.map +1 -1
- package/dist/core/store/types.d.ts +2 -1
- package/dist/core/store/types.d.ts.map +1 -1
- package/dist/core/vuelidate.d.ts +1 -1
- package/dist/core/vuelidate.d.ts.map +1 -1
- package/dist/index.cjs +110 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +110 -105
- package/dist/index.mjs.map +1 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/http-client/types.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,wBAAwB,GAAG;IACnC,OAAO,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/http-client/types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAEnC,MAAM,MAAM,wBAAwB,GAAG;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAA;CAChB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Store as BaseStore, StoreDefinition as BaseStoreDefinition, _ExtractActionsFromSetupStore, _ExtractGettersFromSetupStore, _ExtractStateFromSetupStore } from 'pinia';
|
|
1
|
+
import type { Store as BaseStore, StoreDefinition as BaseStoreDefinition, Pinia, _ExtractActionsFromSetupStore, _ExtractGettersFromSetupStore, _ExtractStateFromSetupStore } from 'pinia';
|
|
2
2
|
import type { CookieGetFn, CookieSetFn, CookieUnsetFn } from '../../types';
|
|
3
3
|
import type { createStore } from './create';
|
|
4
4
|
type StoreData = ReturnType<typeof createStore>;
|
|
@@ -18,6 +18,7 @@ export type StoreLoginContext = {
|
|
|
18
18
|
};
|
|
19
19
|
export type StoreInstallOptions = {
|
|
20
20
|
baseURL?: string;
|
|
21
|
+
pinia?: Pinia;
|
|
21
22
|
cookieSet?: CookieSetFn;
|
|
22
23
|
cookieUnset?: CookieUnsetFn;
|
|
23
24
|
cookieGet?: CookieGetFn;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/store/types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACR,KAAK,IAAI,SAAS,EAClB,eAAe,IAAI,mBAAmB,EACtC,6BAA6B,EAC7B,6BAA6B,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/store/types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACR,KAAK,IAAI,SAAS,EAClB,eAAe,IAAI,mBAAmB,EACtC,KAAK,EACL,6BAA6B,EAC7B,6BAA6B,EAAE,2BAA2B,EAC7D,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAChD,MAAM,MAAM,KAAK,GAAG,SAAS,CAC7B,MAAM,EACN,2BAA2B,CAAC,SAAS,CAAC,EACtC,6BAA6B,CAAC,SAAS,CAAC,EACxC,6BAA6B,CAAC,SAAS,CAAC,CACvC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,mBAAmB,CACjD,MAAM,EACN,2BAA2B,CAAC,SAAS,CAAC,EACtC,6BAA6B,CAAC,SAAS,CAAC,EACxC,6BAA6B,CAAC,SAAS,CAAC,CACvC,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,WAAW,CAAC,EAAE,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAC"}
|
package/dist/core/vuelidate.d.ts
CHANGED
|
@@ -8,6 +8,6 @@ export declare const VuelidateCustomRule: {
|
|
|
8
8
|
alphaNumHyphenUnderscore: any;
|
|
9
9
|
alphaUpperNumHyphenUnderscore: any;
|
|
10
10
|
};
|
|
11
|
-
export declare function getVuelidateSeverity<T = unknown, V extends ValidationRuleCollection<T>
|
|
11
|
+
export declare function getVuelidateSeverity<T = unknown, V extends ValidationRuleCollection<T> = ValidationRuleCollection<T>>(vuelidate: BaseValidation<T, V>): "error" | "warning";
|
|
12
12
|
export declare function extractVuelidateResultsFromChild(vuelidate: Ref<Validation>, child: string, keys?: string[]): Record<string, any>;
|
|
13
13
|
//# sourceMappingURL=vuelidate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vuelidate.d.ts","sourceRoot":"","sources":["../../src/core/vuelidate.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE5F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B,oBAAY,sBAAsB;IAC9B,2BAA2B,6BAA6B;IACxD,iCAAiC,kCAAkC;CACtE;AAED,eAAO,MAAM,mBAAmB;;;CAG/B,CAAC;AAEF,wBAAgB,oBAAoB,CAChC,CAAC,GAAG,OAAO,EACX,CAAC,SAAS,wBAAwB,CAAC,CAAC,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"vuelidate.d.ts","sourceRoot":"","sources":["../../src/core/vuelidate.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAE5F,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B,oBAAY,sBAAsB;IAC9B,2BAA2B,6BAA6B;IACxD,iCAAiC,kCAAkC;CACtE;AAED,eAAO,MAAM,mBAAmB;;;CAG/B,CAAC;AAEF,wBAAgB,oBAAoB,CAChC,CAAC,GAAG,OAAO,EACX,CAAC,SAAS,wBAAwB,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,EACrE,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,uBAEhC;AAED,wBAAgB,gCAAgC,CAAC,SAAS,EAAE,GAAG,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,uBAiB1G"}
|
package/dist/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var coreKit = require('@authup/core-kit');
|
|
6
5
|
var vue = require('vue');
|
|
6
|
+
var coreKit = require('@authup/core-kit');
|
|
7
7
|
var coreHttpKit = require('@authup/core-http-kit');
|
|
8
8
|
var kit = require('@authup/kit');
|
|
9
9
|
var smob = require('smob');
|
|
@@ -17,46 +17,6 @@ var useVuelidate = require('@vuelidate/core');
|
|
|
17
17
|
var pagination = require('@vuecs/pagination');
|
|
18
18
|
var Cookie = require('universal-cookie');
|
|
19
19
|
|
|
20
|
-
function inject$1(key, instance) {
|
|
21
|
-
if (instance && instance._context && instance._context.provides && instance._context.provides[key]) {
|
|
22
|
-
return instance._context.provides[key];
|
|
23
|
-
}
|
|
24
|
-
if (vue.hasInjectionContext()) {
|
|
25
|
-
return vue.inject(key, undefined);
|
|
26
|
-
}
|
|
27
|
-
return undefined;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function provide(key, value, app) {
|
|
31
|
-
if (typeof app === 'undefined') {
|
|
32
|
-
const val = inject$1(key);
|
|
33
|
-
if (typeof val !== 'undefined') {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
vue.provide(key, value);
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (app && app._context && app._context.provides && app._context.provides[key]) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
app.provide(key, value);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const HTTPClientSymbol = Symbol.for('AuthupHTTPClient');
|
|
46
|
-
function provideHTTPClient(client, app) {
|
|
47
|
-
provide(HTTPClientSymbol, client, app);
|
|
48
|
-
}
|
|
49
|
-
function hasHTTPClient(app) {
|
|
50
|
-
return !!inject$1(HTTPClientSymbol, app);
|
|
51
|
-
}
|
|
52
|
-
function injectHTTPClient(app) {
|
|
53
|
-
const instance = inject$1(HTTPClientSymbol, app);
|
|
54
|
-
if (!instance) {
|
|
55
|
-
throw new Error('The api client has not been injected.');
|
|
56
|
-
}
|
|
57
|
-
return instance;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
20
|
var isVue2 = false;
|
|
61
21
|
function set(target, key, val) {
|
|
62
22
|
if (Array.isArray(target)) {
|
|
@@ -695,6 +655,46 @@ idOrOptions, setup, setupOptions) {
|
|
|
695
655
|
}
|
|
696
656
|
}
|
|
697
657
|
|
|
658
|
+
function inject$1(key, instance) {
|
|
659
|
+
if (instance && instance._context && instance._context.provides && instance._context.provides[key]) {
|
|
660
|
+
return instance._context.provides[key];
|
|
661
|
+
}
|
|
662
|
+
if (vue.hasInjectionContext()) {
|
|
663
|
+
return vue.inject(key, undefined);
|
|
664
|
+
}
|
|
665
|
+
return undefined;
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
function provide(key, value, app) {
|
|
669
|
+
if (typeof app === 'undefined') {
|
|
670
|
+
const val = inject$1(key);
|
|
671
|
+
if (typeof val !== 'undefined') {
|
|
672
|
+
return;
|
|
673
|
+
}
|
|
674
|
+
vue.provide(key, value);
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
if (app && app._context && app._context.provides && app._context.provides[key]) {
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
app.provide(key, value);
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
const HTTPClientSymbol = Symbol.for('AuthupHTTPClient');
|
|
684
|
+
function provideHTTPClient(client, app) {
|
|
685
|
+
provide(HTTPClientSymbol, client, app);
|
|
686
|
+
}
|
|
687
|
+
function hasHTTPClient(app) {
|
|
688
|
+
return !!inject$1(HTTPClientSymbol, app);
|
|
689
|
+
}
|
|
690
|
+
function injectHTTPClient(app) {
|
|
691
|
+
const instance = inject$1(HTTPClientSymbol, app);
|
|
692
|
+
if (!instance) {
|
|
693
|
+
throw new Error('The api client has not been injected.');
|
|
694
|
+
}
|
|
695
|
+
return instance;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
698
|
/*
|
|
699
699
|
* Copyright (c) 2024.
|
|
700
700
|
* Author Peter Placzek (tada5hi)
|
|
@@ -992,7 +992,7 @@ function installStore(app, options = {}) {
|
|
|
992
992
|
const storeCreator = defineStore(STORE_ID, ()=>createStore({
|
|
993
993
|
baseURL: options.baseURL
|
|
994
994
|
}));
|
|
995
|
-
const store = storeCreator();
|
|
995
|
+
const store = storeCreator(options.pinia);
|
|
996
996
|
const cookies = useCookies();
|
|
997
997
|
let cookieGet;
|
|
998
998
|
if (options.cookieGet) {
|
|
@@ -1123,7 +1123,7 @@ function installHTTPClient(app, options = {}) {
|
|
|
1123
1123
|
baseURL: options.baseURL
|
|
1124
1124
|
});
|
|
1125
1125
|
const storeCreator = injectStore(app);
|
|
1126
|
-
const store = storeCreator();
|
|
1126
|
+
const store = storeCreator(options.pinia);
|
|
1127
1127
|
const { refreshToken } = storeToRefs$1(store);
|
|
1128
1128
|
const tokenHook = new coreHttpKit.ClientResponseErrorTokenHook(client, {
|
|
1129
1129
|
baseURL: options.baseURL,
|
|
@@ -7248,66 +7248,66 @@ const AEntityDelete = vue.defineComponent({
|
|
|
7248
7248
|
});
|
|
7249
7249
|
|
|
7250
7250
|
var components = /*#__PURE__*/Object.freeze({
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
|
|
7308
|
-
|
|
7309
|
-
|
|
7310
|
-
|
|
7251
|
+
__proto__: null,
|
|
7252
|
+
AClient: AClient,
|
|
7253
|
+
AClientForm: AClientForm,
|
|
7254
|
+
AClientRedirectUris: AClientRedirectUris,
|
|
7255
|
+
AClientRedirectUrisItem: AClientRedirectUrisItem,
|
|
7256
|
+
AClientScope: AClientScope,
|
|
7257
|
+
AClientScopeAssignment: AClientScopeAssignment,
|
|
7258
|
+
AClientScopeAssignments: AClientScopeAssignments,
|
|
7259
|
+
AClientScopes: AClientScopes,
|
|
7260
|
+
AClients: AClients,
|
|
7261
|
+
AEntityDelete: AEntityDelete,
|
|
7262
|
+
AIdentityProvider: AIdentityProvider,
|
|
7263
|
+
AIdentityProviderForm: AIdentityProviderForm,
|
|
7264
|
+
AIdentityProviderIcon: AIdentityProviderIcon,
|
|
7265
|
+
AIdentityProviderLdapForm: AIdentityProviderLdapForm,
|
|
7266
|
+
AIdentityProviderOAuth2Form: AIdentityProviderOAuth2Form,
|
|
7267
|
+
AIdentityProviderPreset: AIdentityProviderPreset,
|
|
7268
|
+
AIdentityProviderProtocol: AIdentityProviderProtocol,
|
|
7269
|
+
AIdentityProviderRoleAssignment: AIdentityProviderRoleAssignment,
|
|
7270
|
+
AIdentityProviderRoleAssignments: AIdentityProviderRoleAssignments,
|
|
7271
|
+
AIdentityProviders: AIdentityProviders,
|
|
7272
|
+
APagination: APagination,
|
|
7273
|
+
APermission: APermission,
|
|
7274
|
+
APermissionForm: APermissionForm,
|
|
7275
|
+
APermissionRobotAssignments: APermissionRobotAssignments,
|
|
7276
|
+
APermissionRoleAssignments: APermissionRoleAssignments,
|
|
7277
|
+
APermissionUserAssignments: APermissionUserAssignments,
|
|
7278
|
+
APermissions: APermissions,
|
|
7279
|
+
ARealm: ARealm,
|
|
7280
|
+
ARealmForm: ARealmForm,
|
|
7281
|
+
ARealms: ARealms,
|
|
7282
|
+
ARobot: ARobot,
|
|
7283
|
+
ARobotForm: ARobotForm,
|
|
7284
|
+
ARobotPermissionAssignment: ARobotPermissionAssignment,
|
|
7285
|
+
ARobotPermissionAssignments: ARobotPermissionAssignments,
|
|
7286
|
+
ARobotRoleAssignment: ARobotRoleAssignment,
|
|
7287
|
+
ARobotRoleAssignments: ARobotRoleAssignments,
|
|
7288
|
+
ARobots: ARobots,
|
|
7289
|
+
ARole: ARole,
|
|
7290
|
+
ARoleForm: ARoleForm,
|
|
7291
|
+
ARolePermissionAssignment: ARolePermissionAssignment,
|
|
7292
|
+
ARolePermissionAssignments: ARolePermissionAssignments,
|
|
7293
|
+
ARoleRobotAssignments: ARoleRobotAssignments,
|
|
7294
|
+
ARoleUserAssignments: ARoleUserAssignments,
|
|
7295
|
+
ARoles: ARoles,
|
|
7296
|
+
AScope: AScope,
|
|
7297
|
+
AScopeClientAssignments: AScopeClientAssignments,
|
|
7298
|
+
AScopeForm: AScopeForm,
|
|
7299
|
+
AScopes: AScopes,
|
|
7300
|
+
ASearch: ASearch,
|
|
7301
|
+
ATitle: ATitle,
|
|
7302
|
+
AUser: AUser,
|
|
7303
|
+
AUserForm: AUserForm,
|
|
7304
|
+
AUserPasswordForm: AUserPasswordForm,
|
|
7305
|
+
AUserPermissionAssignment: AUserPermissionAssignment,
|
|
7306
|
+
AUserPermissionAssignments: AUserPermissionAssignments,
|
|
7307
|
+
AUserRoleAssignment: AUserRoleAssignment,
|
|
7308
|
+
AUserRoleAssignments: AUserRoleAssignments,
|
|
7309
|
+
AUsers: AUsers,
|
|
7310
|
+
LanguageSwitcherDropdown: LanguageSwitcherDropdown
|
|
7311
7311
|
});
|
|
7312
7312
|
|
|
7313
7313
|
function installComponents(input) {
|
|
@@ -7332,14 +7332,19 @@ function install(app1, options) {
|
|
|
7332
7332
|
baseURL: options.realtimeURL || options.baseURL
|
|
7333
7333
|
});
|
|
7334
7334
|
}
|
|
7335
|
+
if (options.pinia) {
|
|
7336
|
+
setActivePinia(options.pinia);
|
|
7337
|
+
}
|
|
7335
7338
|
installStore(app1, {
|
|
7336
7339
|
baseURL: options.baseURL,
|
|
7337
7340
|
cookieSet: options.cookieSet,
|
|
7338
7341
|
cookieGet: options.cookieGet,
|
|
7339
|
-
cookieUnset: options.cookieUnset
|
|
7342
|
+
cookieUnset: options.cookieUnset,
|
|
7343
|
+
pinia: options.pinia
|
|
7340
7344
|
});
|
|
7341
7345
|
installHTTPClient(app1, {
|
|
7342
|
-
baseURL: options.baseURL
|
|
7346
|
+
baseURL: options.baseURL,
|
|
7347
|
+
pinia: options.pinia
|
|
7343
7348
|
});
|
|
7344
7349
|
installTranslator(app1, {
|
|
7345
7350
|
locale: options.translatorLocale
|