@authup/client-web-kit 1.0.0-beta.20 → 1.0.0-beta.22
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/components/client/AClient.d.ts +1 -1
- package/dist/components/client/AClientForm.d.ts +2 -2
- package/dist/components/client-scope/AClientScope.d.ts +1 -1
- package/dist/components/client-scope/AClientScopeAssignment.d.ts +1 -1
- package/dist/components/identity-provider/AIdentityProvider.d.ts +1 -1
- package/dist/components/identity-provider/AIdentityProviderForm.d.ts.map +1 -1
- package/dist/components/identity-provider/AIdentityProviderLdapForm.d.ts +1 -1
- package/dist/components/identity-provider/AIdentityProviderOAuth2Form.d.ts +1 -1
- package/dist/components/identity-provider/AIdentityProviderPicker.vue.d.ts +56 -0
- package/dist/components/identity-provider/AIdentityProviderPicker.vue.d.ts.map +1 -0
- package/dist/components/identity-provider-role/AIdentityProviderRoleAssignment.d.ts +1 -1
- package/dist/components/permission/APermission.d.ts +1 -1
- package/dist/components/permission/APermissionCheck.d.ts +30 -0
- package/dist/components/permission/APermissionCheck.d.ts.map +1 -0
- package/dist/components/permission/APermissionForm.d.ts +1 -1
- package/dist/components/permission/index.d.ts +1 -0
- package/dist/components/permission/index.d.ts.map +1 -1
- package/dist/components/realm/ARealm.d.ts +1 -1
- package/dist/components/realm/ARealmForm.d.ts +1 -1
- package/dist/components/robot/ARobot.d.ts +1 -1
- package/dist/components/robot/ARobotForm.d.ts +2 -2
- package/dist/components/robot-permission/ARobotPermissionAssignment.d.ts +1 -1
- package/dist/components/robot-role/ARobotRoleAssignment.d.ts +1 -1
- package/dist/components/role/ARole.d.ts +1 -1
- package/dist/components/role/ARoleForm.d.ts +1 -1
- package/dist/components/role-permission/ARolePermissionAssignment.d.ts +1 -1
- package/dist/components/scope/AScope.d.ts +1 -1
- package/dist/components/scope/AScopeForm.d.ts +1 -1
- package/dist/components/user/AUser.d.ts +1 -1
- package/dist/components/user/AUserForm.d.ts +1 -1
- package/dist/components/user-permission/AUserPermissionAssignment.d.ts +1 -1
- package/dist/components/user-role/AUserRoleAssignment.d.ts +1 -1
- package/dist/composables/index.d.ts +1 -1
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/use-permission-check.d.ts +4 -0
- package/dist/composables/use-permission-check.d.ts.map +1 -0
- package/dist/core/http-client/install.d.ts.map +1 -1
- package/dist/core/http-client/types.d.ts +1 -0
- package/dist/core/http-client/types.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/list/module.d.ts.map +1 -1
- package/dist/core/permission-check/index.d.ts +3 -0
- package/dist/core/permission-check/index.d.ts.map +1 -0
- package/dist/core/permission-check/module.d.ts +3 -0
- package/dist/core/permission-check/module.d.ts.map +1 -0
- package/dist/core/permission-check/types.d.ts +11 -0
- package/dist/core/permission-check/types.d.ts.map +1 -0
- package/dist/core/store/create.d.ts +20 -70
- package/dist/core/store/create.d.ts.map +1 -1
- package/dist/core/store/dispatcher/constants.d.ts +15 -0
- package/dist/core/store/dispatcher/constants.d.ts.map +1 -0
- package/dist/core/store/dispatcher/index.d.ts +5 -0
- package/dist/core/store/dispatcher/index.d.ts.map +1 -0
- package/dist/core/store/dispatcher/module.d.ts +3 -0
- package/dist/core/store/dispatcher/module.d.ts.map +1 -0
- package/dist/core/store/dispatcher/singleton.d.ts +5 -0
- package/dist/core/store/dispatcher/singleton.d.ts.map +1 -0
- package/dist/core/store/dispatcher/types.d.ts +23 -0
- package/dist/core/store/dispatcher/types.d.ts.map +1 -0
- package/dist/core/store/index.d.ts +1 -0
- package/dist/core/store/index.d.ts.map +1 -1
- package/dist/core/store/install.d.ts.map +1 -1
- package/dist/core/store/singleton.d.ts +3 -4
- package/dist/core/store/singleton.d.ts.map +1 -1
- package/dist/core/store/types.d.ts +2 -4
- package/dist/core/store/types.d.ts.map +1 -1
- package/dist/core/store/utils.d.ts +1 -2
- package/dist/core/store/utils.d.ts.map +1 -1
- package/dist/index.cjs +842 -594
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +15 -0
- package/dist/index.mjs +611 -373
- package/dist/index.mjs.map +1 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/types.d.ts +13 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +22 -20
- package/dist/components/identity-provider/AIdentityProviderPicker.d.ts +0 -18
- package/dist/components/identity-provider/AIdentityProviderPicker.d.ts.map +0 -1
- package/dist/composables/use-ability-check.d.ts +0 -3
- package/dist/composables/use-ability-check.d.ts.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { REALM_MASTER_NAME, DomainEventName, buildDomainChannelName, DomainType, isRealmResourceWritable, IdentityProviderProtocol, IdentityProviderPreset, getIdentityProviderProtocolForPreset } from '@authup/core-kit';
|
|
2
|
-
import { hasInjectionContext, inject as inject$2, provide as provide$1, ref, computed, getCurrentScope, onScopeDispose, toRaw, isRef, isReactive, toRef, unref, h, onMounted, onUnmounted, watch, shallowRef, watchEffect, defineComponent, reactive, nextTick, getCurrentInstance, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
|
+
import { hasInjectionContext, inject as inject$2, provide as provide$1, ref, computed, getCurrentScope, onScopeDispose, toRaw, isRef, isReactive, toRef, unref, h, onMounted, onUnmounted, watch, shallowRef, watchEffect, defineComponent, reactive, nextTick, resolveComponent, openBlock, createElementBlock, createElementVNode, Fragment, renderList, createBlock, withCtx, normalizeClass, withModifiers, toDisplayString, getCurrentInstance, resolveDynamicComponent, mergeProps } from 'vue';
|
|
3
3
|
import { Client, isClientTokenExpiredError, CookieName, ClientResponseErrorTokenHook } from '@authup/core-http-kit';
|
|
4
4
|
import { defineStore, storeToRefs as storeToRefs$1 } from 'pinia';
|
|
5
|
-
import { BuiltInPolicyType, PolicyError, maybeInvertPolicyOutcome, PermissionBindingPolicyValidator, PolicyEngine as PolicyEngine$1, PermissionMemoryProvider, PermissionChecker, buildEventFullName, EventNameSuffix, hasOwnProperty, createNanoID, isOAuth2OpenIDProviderMetadata, isObject as isObject$2 } from '@authup/kit';
|
|
5
|
+
import { BuiltInPolicyType, PolicyError, maybeInvertPolicyOutcome, PermissionBindingPolicyValidator, PolicyEngine as PolicyEngine$1, PermissionMemoryProvider, PermissionChecker, TokenError, buildEventFullName, EventNameSuffix, hasOwnProperty, createNanoID, isOAuth2OpenIDProviderMetadata, isObject as isObject$2 } from '@authup/kit';
|
|
6
6
|
import { isObject as isObject$1, merge, createMerger } from 'smob';
|
|
7
7
|
import { buildList, SlotName } from '@vuecs/list-controls';
|
|
8
8
|
import { ClientManager } from '@authup/core-realtime-kit';
|
|
@@ -90,69 +90,147 @@ class PolicyEngine extends PolicyEngine$1 {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
/*
|
|
94
|
+
* Copyright (c) 2024.
|
|
95
|
+
* Author Peter Placzek (tada5hi)
|
|
96
|
+
* For the full copyright and license information,
|
|
97
|
+
* view the LICENSE file that was distributed with this source code.
|
|
98
|
+
*/ var StoreDispatcherEventName = /*#__PURE__*/ function(StoreDispatcherEventName) {
|
|
99
|
+
StoreDispatcherEventName["LOGGING_IN"] = "loggingIn";
|
|
100
|
+
StoreDispatcherEventName["LOGGED_IN"] = "loggedIn";
|
|
101
|
+
StoreDispatcherEventName["LOGGING_OUT"] = "loggingOut";
|
|
102
|
+
StoreDispatcherEventName["LOGGED_OUT"] = "loggedOut";
|
|
103
|
+
StoreDispatcherEventName["RESOLVING"] = "resolving";
|
|
104
|
+
StoreDispatcherEventName["RESOLVED"] = "resolved";
|
|
105
|
+
StoreDispatcherEventName["ACCESS_TOKEN_UPDATED"] = "accessTokenUpdated";
|
|
106
|
+
StoreDispatcherEventName["ACCESS_TOKEN_EXPIRE_DATE_UPDATED"] = "accessTokenExpireDateUpdated";
|
|
107
|
+
StoreDispatcherEventName["REFRESH_TOKEN_UPDATED"] = "refreshTokenUpdated";
|
|
108
|
+
StoreDispatcherEventName["USER_UPDATED"] = "userUpdated";
|
|
109
|
+
StoreDispatcherEventName["REALM_UPDATED"] = "realmUpdated";
|
|
110
|
+
StoreDispatcherEventName["REALM_MANAGEMENT_UPDATED"] = "realmManagementUpdated";
|
|
111
|
+
return StoreDispatcherEventName;
|
|
112
|
+
}({});
|
|
113
|
+
|
|
114
|
+
// src/event-emitter.ts
|
|
115
|
+
var EventEmitter = class {
|
|
116
|
+
on(type, handler) {
|
|
117
|
+
if (!this.all.has(type)) {
|
|
118
|
+
this.all.set(type, []);
|
|
119
|
+
}
|
|
120
|
+
const handlers = this.all.get(type);
|
|
121
|
+
handlers.push(handler);
|
|
122
|
+
return ()=>handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
|
123
|
+
}
|
|
124
|
+
off(type, handler) {
|
|
125
|
+
if (!type) {
|
|
126
|
+
return this.all.clear();
|
|
127
|
+
}
|
|
128
|
+
const handlers = this.all.get(type);
|
|
129
|
+
if (handlers) {
|
|
130
|
+
if (handler) {
|
|
131
|
+
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
|
132
|
+
} else {
|
|
133
|
+
this.all.delete(type);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Invoke all handlers for the given type.
|
|
139
|
+
* If present, `'*'` handlers are invoked after type-matched handlers.
|
|
140
|
+
*
|
|
141
|
+
* Note: Manually firing `'*'` handlers is not supported.
|
|
142
|
+
*
|
|
143
|
+
* @param type The event type to invoke
|
|
144
|
+
* @param payload Any value to each handler
|
|
145
|
+
*/ emit(type, ...payload) {
|
|
146
|
+
let handlers = this.all.get(type);
|
|
147
|
+
handlers?.slice().map((handler)=>{
|
|
148
|
+
handler(...payload);
|
|
149
|
+
});
|
|
150
|
+
handlers = this.all.get("*");
|
|
151
|
+
if (handlers) {
|
|
152
|
+
handlers.slice().map((handler)=>{
|
|
153
|
+
handler(type, payload);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
constructor(all){
|
|
158
|
+
this.all = all || /* @__PURE__ */ new Map();
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
function createStoreDispatcher() {
|
|
163
|
+
return new EventEmitter();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const sym$1 = Symbol.for('AuthupStoreEventBus');
|
|
167
|
+
function injectStoreDispatcher(app) {
|
|
168
|
+
const instance = inject$1(sym$1, app);
|
|
169
|
+
if (!instance) {
|
|
170
|
+
throw new Error('The store dispatcher has not been injected in the app context.');
|
|
171
|
+
}
|
|
172
|
+
return instance;
|
|
173
|
+
}
|
|
174
|
+
function provideStoreDispatcher(eventBus, app) {
|
|
175
|
+
provide(sym$1, eventBus, app);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function createPromiseShareWrapperFn(fn) {
|
|
179
|
+
let promise;
|
|
180
|
+
return (...args)=>{
|
|
181
|
+
if (promise) {
|
|
182
|
+
return promise;
|
|
183
|
+
}
|
|
184
|
+
promise = new Promise((resolve, reject)=>{
|
|
185
|
+
fn(...args).then((r)=>resolve(r)).catch((e)=>reject(e));
|
|
186
|
+
});
|
|
187
|
+
promise.finally(()=>{
|
|
188
|
+
setTimeout(()=>{
|
|
189
|
+
promise = undefined;
|
|
190
|
+
}, 0);
|
|
191
|
+
});
|
|
192
|
+
return promise;
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function createStore(context) {
|
|
94
196
|
const client = new Client({
|
|
95
197
|
baseURL: context.baseURL
|
|
96
198
|
});
|
|
97
|
-
const
|
|
98
|
-
const
|
|
99
|
-
|
|
199
|
+
const cookiesRead = ref(false);
|
|
200
|
+
const setCookiesRead = (value)=>{
|
|
201
|
+
cookiesRead.value = value;
|
|
100
202
|
};
|
|
101
203
|
// --------------------------------------------------------------------
|
|
102
|
-
const accessToken = ref(
|
|
204
|
+
const accessToken = ref(null);
|
|
103
205
|
const setAccessToken = (input)=>{
|
|
104
206
|
accessToken.value = input;
|
|
207
|
+
context.dispatcher.emit(StoreDispatcherEventName.ACCESS_TOKEN_UPDATED, input);
|
|
105
208
|
};
|
|
106
209
|
// --------------------------------------------------------------------
|
|
107
|
-
const accessTokenExpireDate = ref(
|
|
210
|
+
const accessTokenExpireDate = ref(null);
|
|
108
211
|
const setAccessTokenExpireDate = (input)=>{
|
|
109
212
|
if (typeof input === 'number' || typeof input === 'string') {
|
|
110
213
|
accessTokenExpireDate.value = new Date(input); // verify microseconds or seconds
|
|
111
|
-
|
|
214
|
+
} else {
|
|
215
|
+
accessTokenExpireDate.value = input;
|
|
112
216
|
}
|
|
113
|
-
accessTokenExpireDate.value
|
|
217
|
+
context.dispatcher.emit(StoreDispatcherEventName.ACCESS_TOKEN_EXPIRE_DATE_UPDATED, accessTokenExpireDate.value);
|
|
114
218
|
};
|
|
115
219
|
// --------------------------------------------------------------------
|
|
116
|
-
const refreshToken = ref(
|
|
220
|
+
const refreshToken = ref(null);
|
|
117
221
|
const setRefreshToken = (input)=>{
|
|
118
222
|
refreshToken.value = input;
|
|
223
|
+
context.dispatcher.emit(StoreDispatcherEventName.REFRESH_TOKEN_UPDATED, input);
|
|
119
224
|
};
|
|
120
225
|
// --------------------------------------------------------------------
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
};
|
|
127
|
-
// --------------------------------------------------------------------
|
|
128
|
-
let refreshTokenPromise;
|
|
129
|
-
const attemptRefreshToken = ()=>{
|
|
130
|
-
if (!refreshToken.value) {
|
|
131
|
-
return Promise.reject(new Error('No refresh token is present.'));
|
|
132
|
-
}
|
|
133
|
-
if (refreshTokenPromise) {
|
|
134
|
-
return refreshTokenPromise;
|
|
135
|
-
}
|
|
136
|
-
refreshTokenPromise = client.token.createWithRefreshToken({
|
|
137
|
-
refresh_token: refreshToken.value
|
|
138
|
-
}).then((r)=>{
|
|
139
|
-
handleTokenGrantResponse(r);
|
|
140
|
-
return r;
|
|
141
|
-
}).finally(()=>{
|
|
142
|
-
refreshTokenPromise = undefined;
|
|
143
|
-
});
|
|
144
|
-
return refreshTokenPromise;
|
|
145
|
-
};
|
|
146
|
-
// --------------------------------------------------------------------
|
|
147
|
-
const user = ref(undefined);
|
|
148
|
-
const userId = computed(()=>user.value ? user.value.id : undefined);
|
|
149
|
-
const userResolved = ref(false);
|
|
150
|
-
const setUser = (entity)=>{
|
|
151
|
-
user.value = entity;
|
|
152
|
-
userResolved.value = !!entity;
|
|
226
|
+
const user = ref(null);
|
|
227
|
+
const userId = computed(()=>user.value ? user.value.id : null);
|
|
228
|
+
const setUser = (input)=>{
|
|
229
|
+
user.value = input;
|
|
230
|
+
context.dispatcher.emit(StoreDispatcherEventName.USER_UPDATED, input);
|
|
153
231
|
};
|
|
154
232
|
// --------------------------------------------------------------------
|
|
155
|
-
const realm = ref(
|
|
233
|
+
const realm = ref(null);
|
|
156
234
|
const realmId = computed(()=>realm.value ? realm.value.id : undefined);
|
|
157
235
|
const realmName = computed(()=>realm.value ? realm.value.name : undefined);
|
|
158
236
|
const realmIsRoot = computed(()=>{
|
|
@@ -161,122 +239,185 @@ function createStore(context = {}) {
|
|
|
161
239
|
}
|
|
162
240
|
return false;
|
|
163
241
|
});
|
|
164
|
-
const setRealm = (
|
|
165
|
-
realm.value =
|
|
242
|
+
const setRealm = (input)=>{
|
|
243
|
+
realm.value = input;
|
|
244
|
+
context.dispatcher.emit(StoreDispatcherEventName.REALM_UPDATED, input);
|
|
166
245
|
};
|
|
167
|
-
const realmManagement = ref(
|
|
246
|
+
const realmManagement = ref(null);
|
|
168
247
|
const realmManagementId = computed(()=>realmManagement.value ? realmManagement.value.id : realmId.value);
|
|
169
248
|
const realmManagementName = computed(()=>realmManagement.value ? realmManagement.value.name : realmName.value);
|
|
170
|
-
const setRealmManagement = (
|
|
171
|
-
realmManagement.value =
|
|
249
|
+
const setRealmManagement = (input)=>{
|
|
250
|
+
realmManagement.value = input;
|
|
251
|
+
context.dispatcher.emit(StoreDispatcherEventName.REALM_MANAGEMENT_UPDATED, input);
|
|
172
252
|
};
|
|
253
|
+
// --------------------------------------------------------------------
|
|
173
254
|
const permissionRepository = new PermissionMemoryProvider();
|
|
174
255
|
const permissionChecker = new PermissionChecker({
|
|
175
256
|
provider: permissionRepository,
|
|
176
257
|
policyEngine: new PolicyEngine()
|
|
177
258
|
});
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
if (!entity) {
|
|
184
|
-
setRealm(undefined);
|
|
185
|
-
setRealmManagement(undefined);
|
|
186
|
-
permissionRepository.setMany([]);
|
|
187
|
-
return;
|
|
259
|
+
// --------------------------------------------------------------------
|
|
260
|
+
const userResolved = ref(false);
|
|
261
|
+
const resolveUser = async ()=>{
|
|
262
|
+
if (!accessToken.value || userResolved.value) {
|
|
263
|
+
return Promise.resolve();
|
|
188
264
|
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
265
|
+
userResolved.value = true;
|
|
266
|
+
return client.userInfo.get(`Bearer ${accessToken.value}`).then((response)=>{
|
|
267
|
+
setUser(response);
|
|
268
|
+
});
|
|
269
|
+
};
|
|
270
|
+
// --------------------------------------------------------------------
|
|
271
|
+
const tokenResolved = ref(false);
|
|
272
|
+
const resolveToken = async ()=>{
|
|
273
|
+
if (!accessToken.value || tokenResolved.value) {
|
|
274
|
+
return Promise.resolve();
|
|
192
275
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
276
|
+
tokenResolved.value = true;
|
|
277
|
+
return client.token.introspect({
|
|
278
|
+
token: accessToken.value
|
|
279
|
+
}, {
|
|
280
|
+
authorizationHeader: {
|
|
281
|
+
type: 'Bearer',
|
|
282
|
+
token: accessToken.value
|
|
200
283
|
}
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
284
|
+
}).then((response)=>{
|
|
285
|
+
if (response.exp) {
|
|
286
|
+
const expireDate = new Date(response.exp * 1000);
|
|
287
|
+
setAccessTokenExpireDate(expireDate);
|
|
288
|
+
}
|
|
289
|
+
if (response.realm_id && response.realm_name) {
|
|
290
|
+
realm.value = {
|
|
291
|
+
id: response.realm_id,
|
|
292
|
+
name: response.realm_name
|
|
293
|
+
};
|
|
294
|
+
if (!realmManagement.value) {
|
|
295
|
+
setRealmManagement(realm.value);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
if (response.permissions) {
|
|
299
|
+
permissionRepository.setMany(response.permissions);
|
|
300
|
+
}
|
|
301
|
+
});
|
|
302
|
+
};
|
|
303
|
+
// --------------------------------------------------------------------
|
|
304
|
+
const applyTokenGrantResponse = (response)=>{
|
|
305
|
+
const expireDate = new Date(Date.now() + response.expires_in * 1000);
|
|
306
|
+
setAccessTokenExpireDate(expireDate);
|
|
307
|
+
setAccessToken(response.access_token);
|
|
308
|
+
if (response.refresh_token) {
|
|
309
|
+
setRefreshToken(response.refresh_token);
|
|
310
|
+
} else {
|
|
311
|
+
setRefreshToken(null);
|
|
204
312
|
}
|
|
205
313
|
};
|
|
206
314
|
// --------------------------------------------------------------------
|
|
207
|
-
const
|
|
208
|
-
if (!
|
|
315
|
+
const refreshSession = createPromiseShareWrapperFn(async ()=>{
|
|
316
|
+
if (!refreshToken.value) {
|
|
317
|
+
throw new TokenError('The access token can not be renewed.');
|
|
318
|
+
}
|
|
319
|
+
return client.token.createWithRefreshToken({
|
|
320
|
+
refresh_token: refreshToken.value
|
|
321
|
+
}).then((r)=>applyTokenGrantResponse(r)).catch((e)=>{
|
|
322
|
+
reset();
|
|
323
|
+
return Promise.reject(e);
|
|
324
|
+
}).finally(()=>{
|
|
325
|
+
tokenResolved.value = false;
|
|
326
|
+
userResolved.value = false;
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
// --------------------------------------------------------------------
|
|
330
|
+
const resolveInternal = async ()=>{
|
|
331
|
+
context.dispatcher.emit(StoreDispatcherEventName.RESOLVING);
|
|
209
332
|
try {
|
|
210
|
-
if (!
|
|
211
|
-
|
|
212
|
-
token: accessToken.value
|
|
213
|
-
}, {
|
|
214
|
-
authorizationHeader: {
|
|
215
|
-
type: 'Bearer',
|
|
216
|
-
token: accessToken.value
|
|
217
|
-
}
|
|
218
|
-
});
|
|
219
|
-
setTokenInfo(token);
|
|
220
|
-
tokenResolved.value = true;
|
|
333
|
+
if (!accessToken.value && refreshToken.value) {
|
|
334
|
+
await refreshSession();
|
|
221
335
|
}
|
|
222
|
-
if (
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
336
|
+
if (accessToken.value) {
|
|
337
|
+
await resolveToken();
|
|
338
|
+
if (!user.value) {
|
|
339
|
+
await resolveUser();
|
|
340
|
+
}
|
|
226
341
|
}
|
|
227
342
|
} catch (e) {
|
|
228
|
-
if (isClientTokenExpiredError(e)) {
|
|
229
|
-
await
|
|
230
|
-
|
|
231
|
-
refresh: true,
|
|
232
|
-
attempts: ctx.attempts ? ctx.attempts++ : 1
|
|
233
|
-
});
|
|
234
|
-
return;
|
|
343
|
+
if (isClientTokenExpiredError(e) && refreshToken.value) {
|
|
344
|
+
await refreshSession();
|
|
345
|
+
return resolveInternal();
|
|
235
346
|
}
|
|
236
347
|
throw e;
|
|
237
348
|
}
|
|
349
|
+
context.dispatcher.emit(StoreDispatcherEventName.RESOLVED);
|
|
350
|
+
return Promise.resolve();
|
|
238
351
|
};
|
|
352
|
+
const resolve = createPromiseShareWrapperFn(resolveInternal);
|
|
239
353
|
const loggedIn = computed(()=>!!accessToken.value);
|
|
240
354
|
const login = async (ctx)=>{
|
|
355
|
+
context.dispatcher.emit(StoreDispatcherEventName.LOGGING_IN);
|
|
356
|
+
const response = await client.token.createWithPasswordGrant({
|
|
357
|
+
username: ctx.name,
|
|
358
|
+
password: ctx.password,
|
|
359
|
+
...realmId.value ? {
|
|
360
|
+
realm_id: ctx.realmId
|
|
361
|
+
} : {}
|
|
362
|
+
});
|
|
363
|
+
applyTokenGrantResponse(response);
|
|
241
364
|
try {
|
|
242
|
-
const response = await client.token.createWithPasswordGrant({
|
|
243
|
-
username: ctx.name,
|
|
244
|
-
password: ctx.password,
|
|
245
|
-
...realmId.value ? {
|
|
246
|
-
realm_id: ctx.realmId
|
|
247
|
-
} : {}
|
|
248
|
-
});
|
|
249
|
-
handleTokenGrantResponse(response);
|
|
250
365
|
await resolve();
|
|
251
366
|
} catch (e) {
|
|
252
|
-
|
|
367
|
+
await logout();
|
|
253
368
|
throw e;
|
|
254
369
|
}
|
|
370
|
+
context.dispatcher.emit(StoreDispatcherEventName.LOGGED_IN);
|
|
255
371
|
};
|
|
256
|
-
const
|
|
257
|
-
setAccessToken(
|
|
258
|
-
setAccessTokenExpireDate(
|
|
259
|
-
setRefreshToken(
|
|
260
|
-
setUser(
|
|
261
|
-
|
|
372
|
+
const reset = ()=>{
|
|
373
|
+
setAccessToken(null);
|
|
374
|
+
setAccessTokenExpireDate(null);
|
|
375
|
+
setRefreshToken(null);
|
|
376
|
+
setUser(null);
|
|
377
|
+
setRealm(null);
|
|
378
|
+
setRealmManagement(null);
|
|
379
|
+
permissionRepository.setMany([]);
|
|
380
|
+
tokenResolved.value = false;
|
|
381
|
+
userResolved.value = false;
|
|
382
|
+
};
|
|
383
|
+
const logout = async ()=>{
|
|
384
|
+
context.dispatcher.emit(StoreDispatcherEventName.LOGGING_OUT);
|
|
385
|
+
try {
|
|
386
|
+
if (accessToken.value) {
|
|
387
|
+
await client.token.revoke({
|
|
388
|
+
token: accessToken.value
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
} catch (e) {
|
|
392
|
+
// ...
|
|
393
|
+
}
|
|
394
|
+
try {
|
|
395
|
+
if (refreshToken.value) {
|
|
396
|
+
await client.token.revoke({
|
|
397
|
+
token: refreshToken.value
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
} catch (e) {
|
|
401
|
+
// ...
|
|
402
|
+
}
|
|
403
|
+
reset();
|
|
404
|
+
context.dispatcher.emit(StoreDispatcherEventName.LOGGED_OUT);
|
|
262
405
|
};
|
|
263
406
|
return {
|
|
264
|
-
|
|
265
|
-
|
|
407
|
+
cookiesRead,
|
|
408
|
+
setCookiesRead,
|
|
266
409
|
permissionChecker,
|
|
267
410
|
login,
|
|
268
411
|
logout,
|
|
269
412
|
loggedIn,
|
|
270
413
|
resolve,
|
|
271
|
-
|
|
414
|
+
applyTokenGrantResponse,
|
|
272
415
|
accessToken,
|
|
273
416
|
setAccessToken,
|
|
274
417
|
accessTokenExpireDate,
|
|
275
418
|
setAccessTokenExpireDate,
|
|
276
419
|
refreshToken,
|
|
277
420
|
setRefreshToken,
|
|
278
|
-
tokenInfo,
|
|
279
|
-
setTokenInfo,
|
|
280
421
|
realm,
|
|
281
422
|
realmId,
|
|
282
423
|
realmIsRoot,
|
|
@@ -357,36 +498,39 @@ function shouldUpdate(dependencies, newCookies, oldCookies) {
|
|
|
357
498
|
return false;
|
|
358
499
|
}
|
|
359
500
|
|
|
360
|
-
const
|
|
501
|
+
const sym = Symbol.for('AuthupStore');
|
|
361
502
|
function useStore(pinia, app) {
|
|
362
|
-
const instance =
|
|
503
|
+
const instance = injectStoreFactory(app);
|
|
363
504
|
if (!instance) {
|
|
364
505
|
throw new Error('The store has not been injected in the app context.');
|
|
365
506
|
}
|
|
366
507
|
return instance(pinia);
|
|
367
508
|
}
|
|
368
|
-
function
|
|
369
|
-
const instance = inject$1(
|
|
509
|
+
function injectStoreFactory(app) {
|
|
510
|
+
const instance = inject$1(sym, app);
|
|
370
511
|
if (!instance) {
|
|
371
|
-
throw new Error('The store has not been injected in the app context.');
|
|
512
|
+
throw new Error('The store factory has not been injected in the app context.');
|
|
372
513
|
}
|
|
373
514
|
return instance;
|
|
374
515
|
}
|
|
375
|
-
function
|
|
376
|
-
return !!inject$1(
|
|
516
|
+
function hasStoreFactory(app) {
|
|
517
|
+
return !!inject$1(sym, app);
|
|
377
518
|
}
|
|
378
|
-
function
|
|
379
|
-
provide(
|
|
519
|
+
function provideStoreFactory(store, app) {
|
|
520
|
+
provide(sym, store, app);
|
|
380
521
|
}
|
|
381
522
|
|
|
382
523
|
function installStore(app, options = {}) {
|
|
383
|
-
if (
|
|
524
|
+
if (hasStoreFactory(app)) {
|
|
384
525
|
return;
|
|
385
526
|
}
|
|
386
|
-
const
|
|
387
|
-
|
|
527
|
+
const storeDispatcher = createStoreDispatcher();
|
|
528
|
+
provideStoreDispatcher(storeDispatcher, app);
|
|
529
|
+
const storeFactory = defineStore(STORE_ID, ()=>createStore({
|
|
530
|
+
baseURL: options.baseURL,
|
|
531
|
+
dispatcher: storeDispatcher
|
|
388
532
|
}));
|
|
389
|
-
const store =
|
|
533
|
+
const store = storeFactory(options.pinia);
|
|
390
534
|
let cookieGet;
|
|
391
535
|
if (options.cookieGet) {
|
|
392
536
|
cookieGet = options.cookieGet;
|
|
@@ -405,18 +549,18 @@ function installStore(app, options = {}) {
|
|
|
405
549
|
if (options.cookieUnset) {
|
|
406
550
|
cookieUnset = options.cookieUnset;
|
|
407
551
|
} else if (options.cookieSet) {
|
|
408
|
-
cookieUnset = (key)=>{
|
|
409
|
-
options.cookieSet(key, null);
|
|
552
|
+
cookieUnset = (key, opts)=>{
|
|
553
|
+
options.cookieSet(key, null, opts);
|
|
410
554
|
};
|
|
411
555
|
} else {
|
|
412
556
|
const cookies = useCookies();
|
|
413
557
|
cookieUnset = cookies.remove;
|
|
414
558
|
}
|
|
415
|
-
const
|
|
416
|
-
if (store.
|
|
559
|
+
const readCookies = ()=>{
|
|
560
|
+
if (store.cookiesRead) {
|
|
417
561
|
return;
|
|
418
562
|
}
|
|
419
|
-
store.
|
|
563
|
+
store.setCookiesRead(true);
|
|
420
564
|
const keys = Object.values(CookieName);
|
|
421
565
|
let value;
|
|
422
566
|
for(let i = 0; i < keys.length; i++){
|
|
@@ -458,44 +602,61 @@ function installStore(app, options = {}) {
|
|
|
458
602
|
}
|
|
459
603
|
}
|
|
460
604
|
};
|
|
461
|
-
|
|
462
|
-
if (
|
|
463
|
-
return;
|
|
605
|
+
const maxAgeFn = ()=>{
|
|
606
|
+
if (!store.accessTokenExpireDate) {
|
|
607
|
+
return undefined;
|
|
464
608
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
609
|
+
return Math.floor(Math.max(1000, new Date(`${store.accessTokenExpireDate}`).getTime() - Date.now()) / 1000);
|
|
610
|
+
};
|
|
611
|
+
storeDispatcher.on(StoreDispatcherEventName.ACCESS_TOKEN_EXPIRE_DATE_UPDATED, (input)=>{
|
|
612
|
+
if (input) {
|
|
613
|
+
cookieSet(CookieName.ACCESS_TOKEN_EXPIRE_DATE, input, {
|
|
614
|
+
maxAge: maxAgeFn()
|
|
615
|
+
});
|
|
616
|
+
} else {
|
|
617
|
+
cookieUnset(CookieName.ACCESS_TOKEN_EXPIRE_DATE, {});
|
|
472
618
|
}
|
|
473
619
|
});
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
if (state.accessTokenExpireDate) {
|
|
483
|
-
cookieSet(CookieName.ACCESS_TOKEN_EXPIRE_DATE, state.accessTokenExpireDate);
|
|
620
|
+
storeDispatcher.on(StoreDispatcherEventName.ACCESS_TOKEN_UPDATED, (input)=>{
|
|
621
|
+
if (input) {
|
|
622
|
+
const maxAge = maxAgeFn();
|
|
623
|
+
cookieSet(CookieName.ACCESS_TOKEN, input, {
|
|
624
|
+
maxAge
|
|
625
|
+
});
|
|
626
|
+
} else {
|
|
627
|
+
cookieUnset(CookieName.ACCESS_TOKEN, {});
|
|
484
628
|
}
|
|
485
|
-
|
|
486
|
-
|
|
629
|
+
});
|
|
630
|
+
storeDispatcher.on(StoreDispatcherEventName.REFRESH_TOKEN_UPDATED, (input)=>{
|
|
631
|
+
if (input) {
|
|
632
|
+
cookieSet(CookieName.REFRESH_TOKEN, input, {});
|
|
633
|
+
} else {
|
|
634
|
+
cookieUnset(CookieName.REFRESH_TOKEN, {});
|
|
487
635
|
}
|
|
488
|
-
|
|
489
|
-
|
|
636
|
+
});
|
|
637
|
+
storeDispatcher.on(StoreDispatcherEventName.USER_UPDATED, (input)=>{
|
|
638
|
+
if (input) {
|
|
639
|
+
cookieSet(CookieName.USER, input, {});
|
|
640
|
+
} else {
|
|
641
|
+
cookieUnset(CookieName.USER, {});
|
|
490
642
|
}
|
|
491
|
-
|
|
492
|
-
|
|
643
|
+
});
|
|
644
|
+
storeDispatcher.on(StoreDispatcherEventName.REALM_UPDATED, (input)=>{
|
|
645
|
+
if (input) {
|
|
646
|
+
cookieSet(CookieName.REALM, input, {});
|
|
647
|
+
} else {
|
|
648
|
+
cookieUnset(CookieName.REALM, {});
|
|
493
649
|
}
|
|
494
|
-
|
|
495
|
-
|
|
650
|
+
});
|
|
651
|
+
storeDispatcher.on(StoreDispatcherEventName.REALM_MANAGEMENT_UPDATED, (input)=>{
|
|
652
|
+
if (input) {
|
|
653
|
+
cookieSet(CookieName.REALM_MANAGEMENT, input, {});
|
|
654
|
+
} else {
|
|
655
|
+
cookieUnset(CookieName.REALM_MANAGEMENT, {});
|
|
496
656
|
}
|
|
497
657
|
});
|
|
498
|
-
|
|
658
|
+
readCookies();
|
|
659
|
+
provideStoreFactory(storeFactory, app);
|
|
499
660
|
}
|
|
500
661
|
|
|
501
662
|
function storeToRefs(store) {
|
|
@@ -518,8 +679,8 @@ function installHTTPClient(app, options = {}) {
|
|
|
518
679
|
const client = new Client({
|
|
519
680
|
baseURL: options.baseURL
|
|
520
681
|
});
|
|
521
|
-
const
|
|
522
|
-
const store =
|
|
682
|
+
const storeFactory = injectStoreFactory(app);
|
|
683
|
+
const store = storeFactory(options.pinia);
|
|
523
684
|
const { refreshToken } = storeToRefs$1(store);
|
|
524
685
|
const tokenHook = new ClientResponseErrorTokenHook(client, {
|
|
525
686
|
baseURL: options.baseURL,
|
|
@@ -532,32 +693,36 @@ function installHTTPClient(app, options = {}) {
|
|
|
532
693
|
});
|
|
533
694
|
},
|
|
534
695
|
tokenCreated: (response)=>{
|
|
535
|
-
store.
|
|
696
|
+
store.applyTokenGrantResponse(response);
|
|
536
697
|
},
|
|
537
698
|
tokenFailed: ()=>{
|
|
538
|
-
store.logout();
|
|
539
|
-
}
|
|
699
|
+
Promise.resolve().then(()=>store.logout());
|
|
700
|
+
},
|
|
701
|
+
timer: !options.isServer
|
|
540
702
|
});
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
if (
|
|
703
|
+
const storeDispatcher = injectStoreDispatcher(app);
|
|
704
|
+
const handleAccessTokenEvent = ()=>{
|
|
705
|
+
if (store.accessToken) {
|
|
544
706
|
client.setAuthorizationHeader({
|
|
545
707
|
type: 'Bearer',
|
|
546
|
-
token:
|
|
708
|
+
token: store.accessToken
|
|
547
709
|
});
|
|
548
710
|
tokenHook.mount();
|
|
549
711
|
} else {
|
|
550
712
|
client.unsetAuthorizationHeader();
|
|
551
713
|
tokenHook.unmount();
|
|
552
714
|
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
});
|
|
715
|
+
};
|
|
716
|
+
const handleAccessTokenExpireDateEvent = ()=>{
|
|
717
|
+
if (store.accessTokenExpireDate) {
|
|
718
|
+
const expiresIn = Math.floor((store.accessTokenExpireDate.getTime() - Date.now()) / 1000);
|
|
719
|
+
tokenHook.setTimer(expiresIn, ()=>refreshToken.value || undefined);
|
|
559
720
|
}
|
|
560
|
-
}
|
|
721
|
+
};
|
|
722
|
+
storeDispatcher.on(StoreDispatcherEventName.ACCESS_TOKEN_UPDATED, ()=>handleAccessTokenEvent());
|
|
723
|
+
storeDispatcher.on(StoreDispatcherEventName.ACCESS_TOKEN_EXPIRE_DATE_UPDATED, ()=>handleAccessTokenExpireDateEvent());
|
|
724
|
+
handleAccessTokenEvent();
|
|
725
|
+
handleAccessTokenExpireDateEvent();
|
|
561
726
|
provideHTTPClient(client, app);
|
|
562
727
|
}
|
|
563
728
|
|
|
@@ -773,7 +938,7 @@ function injectSocketManager(app) {
|
|
|
773
938
|
}
|
|
774
939
|
|
|
775
940
|
function installSocketManager(app, options) {
|
|
776
|
-
const storeCreator =
|
|
941
|
+
const storeCreator = injectStoreFactory(app);
|
|
777
942
|
const store = storeCreator(options.pinia);
|
|
778
943
|
const { accessToken } = storeToRefs(store);
|
|
779
944
|
const manager = new ClientManager({
|
|
@@ -1012,7 +1177,7 @@ function createList(context) {
|
|
|
1012
1177
|
}
|
|
1013
1178
|
}
|
|
1014
1179
|
const handleCreated = buildListCreatedHandler(data, (cbEntity)=>{
|
|
1015
|
-
total.value
|
|
1180
|
+
total.value++;
|
|
1016
1181
|
if (context.onCreated) {
|
|
1017
1182
|
context.onCreated(cbEntity, meta.value);
|
|
1018
1183
|
}
|
|
@@ -1045,7 +1210,7 @@ function createList(context) {
|
|
|
1045
1210
|
noMore: renderOptions.noMore,
|
|
1046
1211
|
body: renderOptions.body,
|
|
1047
1212
|
loading: renderOptions.loading,
|
|
1048
|
-
total,
|
|
1213
|
+
total: total.value,
|
|
1049
1214
|
load,
|
|
1050
1215
|
busy: busy.value,
|
|
1051
1216
|
data: data.value,
|
|
@@ -1054,16 +1219,19 @@ function createList(context) {
|
|
|
1054
1219
|
if (context.setup.emit) {
|
|
1055
1220
|
context.setup.emit('created', value);
|
|
1056
1221
|
}
|
|
1222
|
+
handleCreated(value);
|
|
1057
1223
|
},
|
|
1058
1224
|
onDeleted: (value)=>{
|
|
1059
1225
|
if (context.setup.emit) {
|
|
1060
1226
|
context.setup.emit('deleted', value);
|
|
1061
1227
|
}
|
|
1228
|
+
handleDeleted(value);
|
|
1062
1229
|
},
|
|
1063
1230
|
onUpdated: (value)=>{
|
|
1064
1231
|
if (context.setup.emit) {
|
|
1065
1232
|
context.setup.emit('updated', value);
|
|
1066
1233
|
}
|
|
1234
|
+
handleUpdated(value);
|
|
1067
1235
|
},
|
|
1068
1236
|
slotItems: context.setup.slots || {}
|
|
1069
1237
|
});
|
|
@@ -1539,26 +1707,25 @@ function createEntityManager(ctx) {
|
|
|
1539
1707
|
* Author Peter Placzek (tada5hi)
|
|
1540
1708
|
* For the full copyright and license information,
|
|
1541
1709
|
* view the LICENSE file that was distributed with this source code.
|
|
1542
|
-
*/ var TranslatorTranslationGroup
|
|
1543
|
-
(function(TranslatorTranslationGroup) {
|
|
1710
|
+
*/ var TranslatorTranslationGroup = /*#__PURE__*/ function(TranslatorTranslationGroup) {
|
|
1544
1711
|
TranslatorTranslationGroup["DEFAULT"] = "default";
|
|
1545
1712
|
TranslatorTranslationGroup["CLIENT"] = "authupClient";
|
|
1546
1713
|
TranslatorTranslationGroup["VUECS"] = "vuecs";
|
|
1547
1714
|
TranslatorTranslationGroup["VUELIDATE"] = "vuelidate";
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1715
|
+
return TranslatorTranslationGroup;
|
|
1716
|
+
}({});
|
|
1717
|
+
var TranslatorTranslationVuecsKey = /*#__PURE__*/ function(TranslatorTranslationVuecsKey) {
|
|
1551
1718
|
TranslatorTranslationVuecsKey["NO_MORE"] = "noMore";
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1719
|
+
return TranslatorTranslationVuecsKey;
|
|
1720
|
+
}({});
|
|
1721
|
+
var TranslatorTranslationClientKey = /*#__PURE__*/ function(TranslatorTranslationClientKey) {
|
|
1555
1722
|
TranslatorTranslationClientKey["NAME_HINT"] = "nameHint";
|
|
1556
1723
|
TranslatorTranslationClientKey["DESCRIPTION_HINT"] = "descriptionHint";
|
|
1557
1724
|
TranslatorTranslationClientKey["REDIRECT_URI_HINT"] = "redirectURIHint";
|
|
1558
1725
|
TranslatorTranslationClientKey["IS_CONFIDENTIAL"] = "isConfidential";
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1726
|
+
return TranslatorTranslationClientKey;
|
|
1727
|
+
}({});
|
|
1728
|
+
var TranslatorTranslationDefaultKey = /*#__PURE__*/ function(TranslatorTranslationDefaultKey) {
|
|
1562
1729
|
TranslatorTranslationDefaultKey["ADD"] = "add";
|
|
1563
1730
|
TranslatorTranslationDefaultKey["CREATE"] = "create";
|
|
1564
1731
|
TranslatorTranslationDefaultKey["DELETE"] = "delete";
|
|
@@ -1589,7 +1756,8 @@ var TranslatorTranslationDefaultKey;
|
|
|
1589
1756
|
TranslatorTranslationDefaultKey["SECRET"] = "secret";
|
|
1590
1757
|
TranslatorTranslationDefaultKey["REDIRECT_URIS"] = "redirectUris";
|
|
1591
1758
|
TranslatorTranslationDefaultKey["USERS"] = "users";
|
|
1592
|
-
|
|
1759
|
+
return TranslatorTranslationDefaultKey;
|
|
1760
|
+
}({});
|
|
1593
1761
|
|
|
1594
1762
|
/*
|
|
1595
1763
|
* Copyright (c) 2024-2024.
|
|
@@ -1915,11 +2083,11 @@ const TranslatorTranslationDefaultGerman = {
|
|
|
1915
2083
|
[TranslatorTranslationDefaultKey.USERS]: 'Benutzer'
|
|
1916
2084
|
};
|
|
1917
2085
|
|
|
1918
|
-
var VuelidateCustomRuleKey
|
|
1919
|
-
(function(VuelidateCustomRuleKey) {
|
|
2086
|
+
var VuelidateCustomRuleKey = /*#__PURE__*/ function(VuelidateCustomRuleKey) {
|
|
1920
2087
|
VuelidateCustomRuleKey["ALPHA_NUM_HYPHEN_UNDERSCORE"] = "alphaNumHyphenUnderscore";
|
|
1921
2088
|
VuelidateCustomRuleKey["ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE"] = "alphaUpperNumHyphenUnderscore";
|
|
1922
|
-
|
|
2089
|
+
return VuelidateCustomRuleKey;
|
|
2090
|
+
}({});
|
|
1923
2091
|
const VuelidateCustomRule = {
|
|
1924
2092
|
["alphaNumHyphenUnderscore"]: helpers.regex(/^[a-z0-9-_]*$/),
|
|
1925
2093
|
["alphaUpperNumHyphenUnderscore"]: helpers.regex(/^[a-zA-Z0-9-_]*$/)
|
|
@@ -2059,6 +2227,65 @@ function buildFormSubmitWithTranslations(options, translations) {
|
|
|
2059
2227
|
};
|
|
2060
2228
|
}
|
|
2061
2229
|
|
|
2230
|
+
function createPermissionCheckerReactiveFn(ctx = {}) {
|
|
2231
|
+
let store;
|
|
2232
|
+
if (ctx.store) {
|
|
2233
|
+
store = ctx.store;
|
|
2234
|
+
} else {
|
|
2235
|
+
store = useStore(ctx.pinia, ctx.app);
|
|
2236
|
+
}
|
|
2237
|
+
const storeRefs = storeToRefs(store);
|
|
2238
|
+
return (ctx)=>{
|
|
2239
|
+
const data = ref(false);
|
|
2240
|
+
let computePromise;
|
|
2241
|
+
const compute = async ()=>{
|
|
2242
|
+
if (computePromise) {
|
|
2243
|
+
return computePromise;
|
|
2244
|
+
}
|
|
2245
|
+
let identity;
|
|
2246
|
+
if (storeRefs.userId.value) {
|
|
2247
|
+
identity = {
|
|
2248
|
+
type: 'user',
|
|
2249
|
+
id: storeRefs.userId.value
|
|
2250
|
+
};
|
|
2251
|
+
}
|
|
2252
|
+
let outcome;
|
|
2253
|
+
try {
|
|
2254
|
+
computePromise = store.permissionChecker.preCheckOneOf({
|
|
2255
|
+
...ctx,
|
|
2256
|
+
data: {
|
|
2257
|
+
...ctx.data || {},
|
|
2258
|
+
identity
|
|
2259
|
+
}
|
|
2260
|
+
}).then(()=>true).catch(()=>false);
|
|
2261
|
+
outcome = await computePromise;
|
|
2262
|
+
} catch (e) {
|
|
2263
|
+
outcome = false;
|
|
2264
|
+
} finally{
|
|
2265
|
+
computePromise = undefined;
|
|
2266
|
+
}
|
|
2267
|
+
return outcome;
|
|
2268
|
+
};
|
|
2269
|
+
Promise.resolve().then(()=>compute()).then((outcome)=>{
|
|
2270
|
+
data.value = outcome;
|
|
2271
|
+
});
|
|
2272
|
+
let removeListener;
|
|
2273
|
+
onMounted(()=>{
|
|
2274
|
+
removeListener = watch(storeRefs.loggedIn, ()=>{
|
|
2275
|
+
Promise.resolve().then(()=>compute()).then((outcome)=>{
|
|
2276
|
+
data.value = outcome;
|
|
2277
|
+
});
|
|
2278
|
+
});
|
|
2279
|
+
});
|
|
2280
|
+
onUnmounted(()=>{
|
|
2281
|
+
if (typeof removeListener !== 'undefined') {
|
|
2282
|
+
removeListener();
|
|
2283
|
+
}
|
|
2284
|
+
});
|
|
2285
|
+
return data;
|
|
2286
|
+
};
|
|
2287
|
+
}
|
|
2288
|
+
|
|
2062
2289
|
const AClient = defineComponent({
|
|
2063
2290
|
props: defineEntityManagerProps(),
|
|
2064
2291
|
emits: defineEntityManagerEvents(),
|
|
@@ -2106,55 +2333,9 @@ function useUpdatedAt(input) {
|
|
|
2106
2333
|
});
|
|
2107
2334
|
}
|
|
2108
2335
|
|
|
2109
|
-
function
|
|
2110
|
-
const
|
|
2111
|
-
|
|
2112
|
-
const data = ref(false);
|
|
2113
|
-
let computePromise;
|
|
2114
|
-
const compute = async ()=>{
|
|
2115
|
-
if (computePromise) {
|
|
2116
|
-
return computePromise;
|
|
2117
|
-
}
|
|
2118
|
-
let identity;
|
|
2119
|
-
if (refs.userId.value) {
|
|
2120
|
-
identity = {
|
|
2121
|
-
type: 'user',
|
|
2122
|
-
id: refs.userId.value
|
|
2123
|
-
};
|
|
2124
|
-
}
|
|
2125
|
-
let outcome;
|
|
2126
|
-
try {
|
|
2127
|
-
computePromise = store.permissionChecker.preCheck({
|
|
2128
|
-
name,
|
|
2129
|
-
data: {
|
|
2130
|
-
identity
|
|
2131
|
-
}
|
|
2132
|
-
}).then(()=>true).catch(()=>false);
|
|
2133
|
-
outcome = await computePromise;
|
|
2134
|
-
} catch (e) {
|
|
2135
|
-
outcome = false;
|
|
2136
|
-
} finally{
|
|
2137
|
-
computePromise = undefined;
|
|
2138
|
-
}
|
|
2139
|
-
return outcome;
|
|
2140
|
-
};
|
|
2141
|
-
Promise.resolve().then(()=>compute()).then((outcome)=>{
|
|
2142
|
-
data.value = outcome;
|
|
2143
|
-
});
|
|
2144
|
-
let removeListener;
|
|
2145
|
-
onMounted(()=>{
|
|
2146
|
-
removeListener = watch(refs.loggedIn, ()=>{
|
|
2147
|
-
Promise.resolve().then(()=>compute()).then((outcome)=>{
|
|
2148
|
-
data.value = outcome;
|
|
2149
|
-
});
|
|
2150
|
-
});
|
|
2151
|
-
});
|
|
2152
|
-
onUnmounted(()=>{
|
|
2153
|
-
if (typeof removeListener !== 'undefined') {
|
|
2154
|
-
removeListener();
|
|
2155
|
-
}
|
|
2156
|
-
});
|
|
2157
|
-
return data;
|
|
2336
|
+
function usePermissionCheck(ctx) {
|
|
2337
|
+
const checkFn = createPermissionCheckerReactiveFn();
|
|
2338
|
+
return checkFn(ctx);
|
|
2158
2339
|
}
|
|
2159
2340
|
|
|
2160
2341
|
function useRealmResourceWritableCheck(realmId) {
|
|
@@ -4030,7 +4211,11 @@ const AIdentityProviderPreset = defineComponent({
|
|
|
4030
4211
|
}
|
|
4031
4212
|
});
|
|
4032
4213
|
|
|
4033
|
-
|
|
4214
|
+
var _sfc_main = defineComponent({
|
|
4215
|
+
components: {
|
|
4216
|
+
AIdentityProviderPreset,
|
|
4217
|
+
AIdentityProviderProtocol
|
|
4218
|
+
},
|
|
4034
4219
|
props: {
|
|
4035
4220
|
protocol: {
|
|
4036
4221
|
type: String
|
|
@@ -4043,113 +4228,139 @@ const AIdentityProviderPicker = defineComponent({
|
|
|
4043
4228
|
'pick'
|
|
4044
4229
|
],
|
|
4045
4230
|
setup (props, setup) {
|
|
4046
|
-
const protocols =
|
|
4047
|
-
const presets =
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
id
|
|
4051
|
-
});
|
|
4052
|
-
return id;
|
|
4053
|
-
});
|
|
4054
|
-
Object.values(IdentityProviderPreset).map((id)=>{
|
|
4055
|
-
presets.push({
|
|
4056
|
-
id
|
|
4057
|
-
});
|
|
4058
|
-
return id;
|
|
4059
|
-
});
|
|
4060
|
-
const pick = (ctx)=>{
|
|
4061
|
-
setup.emit('pick', ctx);
|
|
4231
|
+
const protocols = Object.values(IdentityProviderProtocol);
|
|
4232
|
+
const presets = Object.values(IdentityProviderPreset);
|
|
4233
|
+
const pickProtocol = (protocol)=>{
|
|
4234
|
+
setup.emit('pick', 'protocol', protocol);
|
|
4062
4235
|
};
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
item: {
|
|
4072
|
-
class: [
|
|
4073
|
-
'me-1 list-item'
|
|
4074
|
-
],
|
|
4075
|
-
icon: false,
|
|
4076
|
-
content: (item)=>h(AIdentityProviderProtocol, {
|
|
4077
|
-
id: item.id
|
|
4078
|
-
}, {
|
|
4079
|
-
default: (element)=>[
|
|
4080
|
-
h('i', {
|
|
4081
|
-
class: [
|
|
4082
|
-
element.icon,
|
|
4083
|
-
'pe-1'
|
|
4084
|
-
]
|
|
4085
|
-
}),
|
|
4086
|
-
element.name,
|
|
4087
|
-
h('button', {
|
|
4088
|
-
class: 'btn btn-xs btn-dark ms-1',
|
|
4089
|
-
onClick ($event) {
|
|
4090
|
-
$event.preventDefault();
|
|
4091
|
-
pick({
|
|
4092
|
-
protocol: item.id
|
|
4093
|
-
});
|
|
4094
|
-
}
|
|
4095
|
-
}, [
|
|
4096
|
-
h('i', {
|
|
4097
|
-
class: 'fa fa-plus'
|
|
4098
|
-
})
|
|
4099
|
-
])
|
|
4100
|
-
]
|
|
4101
|
-
})
|
|
4102
|
-
}
|
|
4103
|
-
}
|
|
4104
|
-
});
|
|
4105
|
-
const protocolNodeConfigurationNode = buildList({
|
|
4106
|
-
data: presets,
|
|
4107
|
-
header: {
|
|
4108
|
-
content: h('h6', 'Presets')
|
|
4109
|
-
},
|
|
4110
|
-
body: {
|
|
4111
|
-
class: 'd-flex flex-row',
|
|
4112
|
-
item: {
|
|
4113
|
-
class: 'me-1 list-item',
|
|
4114
|
-
icon: false,
|
|
4115
|
-
content: (preset)=>h(AIdentityProviderPreset, {
|
|
4116
|
-
id: preset.id
|
|
4117
|
-
}, {
|
|
4118
|
-
default: (item)=>h('div', [
|
|
4119
|
-
h('i', {
|
|
4120
|
-
class: [
|
|
4121
|
-
item.icon,
|
|
4122
|
-
'pe-1'
|
|
4123
|
-
]
|
|
4124
|
-
}),
|
|
4125
|
-
item.name,
|
|
4126
|
-
h('button', {
|
|
4127
|
-
class: 'btn btn-xs btn-dark ms-1',
|
|
4128
|
-
onClick ($event) {
|
|
4129
|
-
$event.preventDefault();
|
|
4130
|
-
pick({
|
|
4131
|
-
preset: preset.id,
|
|
4132
|
-
protocol: getIdentityProviderProtocolForPreset(preset.id)
|
|
4133
|
-
});
|
|
4134
|
-
}
|
|
4135
|
-
}, [
|
|
4136
|
-
h('i', {
|
|
4137
|
-
class: 'fa fa-plus'
|
|
4138
|
-
})
|
|
4139
|
-
])
|
|
4140
|
-
])
|
|
4141
|
-
})
|
|
4142
|
-
}
|
|
4143
|
-
}
|
|
4144
|
-
});
|
|
4145
|
-
return [
|
|
4146
|
-
protocolNode,
|
|
4147
|
-
protocolNodeConfigurationNode
|
|
4148
|
-
];
|
|
4236
|
+
const pickPreset = (preset)=>{
|
|
4237
|
+
setup.emit('pick', 'preset', preset);
|
|
4238
|
+
};
|
|
4239
|
+
return {
|
|
4240
|
+
protocols,
|
|
4241
|
+
presets,
|
|
4242
|
+
pickProtocol,
|
|
4243
|
+
pickPreset
|
|
4149
4244
|
};
|
|
4150
4245
|
}
|
|
4151
4246
|
});
|
|
4152
4247
|
|
|
4248
|
+
var _export_sfc = (sfc, props) => {
|
|
4249
|
+
const target = sfc.__vccOpts || sfc;
|
|
4250
|
+
for (const [key, val] of props) {
|
|
4251
|
+
target[key] = val;
|
|
4252
|
+
}
|
|
4253
|
+
return target;
|
|
4254
|
+
};
|
|
4255
|
+
|
|
4256
|
+
const _hoisted_1 = {
|
|
4257
|
+
class: "d-flex flex-column gap-2"
|
|
4258
|
+
};
|
|
4259
|
+
const _hoisted_2 = {
|
|
4260
|
+
class: "d-flex flex-row gap-2 flex-wrap"
|
|
4261
|
+
};
|
|
4262
|
+
const _hoisted_3 = [
|
|
4263
|
+
"onClick"
|
|
4264
|
+
];
|
|
4265
|
+
const _hoisted_4 = {
|
|
4266
|
+
class: "d-flex flex-row gap-2 flex-wrap"
|
|
4267
|
+
};
|
|
4268
|
+
const _hoisted_5 = [
|
|
4269
|
+
"onClick"
|
|
4270
|
+
];
|
|
4271
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4272
|
+
const _component_AIdentityProviderProtocol = resolveComponent("AIdentityProviderProtocol");
|
|
4273
|
+
const _component_AIdentityProviderPreset = resolveComponent("AIdentityProviderPreset");
|
|
4274
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
4275
|
+
createElementVNode("div", null, [
|
|
4276
|
+
_cache[0] || (_cache[0] = createElementVNode("h6", null, "Protocols", -1)),
|
|
4277
|
+
createElementVNode("div", _hoisted_2, [
|
|
4278
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.protocols, (item, key)=>{
|
|
4279
|
+
return openBlock(), createBlock(_component_AIdentityProviderProtocol, {
|
|
4280
|
+
key,
|
|
4281
|
+
id: item
|
|
4282
|
+
}, {
|
|
4283
|
+
default: withCtx((props)=>[
|
|
4284
|
+
createElementVNode("div", {
|
|
4285
|
+
class: normalizeClass([
|
|
4286
|
+
{
|
|
4287
|
+
"active": item === _ctx.protocol && !_ctx.preset
|
|
4288
|
+
},
|
|
4289
|
+
"d-flex flex-column gap-1 text-center identity-provider-picker-item"
|
|
4290
|
+
]),
|
|
4291
|
+
onClick: withModifiers(($event)=>_ctx.pickProtocol(item), [
|
|
4292
|
+
"prevent"
|
|
4293
|
+
])
|
|
4294
|
+
}, [
|
|
4295
|
+
createElementVNode("div", null, [
|
|
4296
|
+
createElementVNode("i", {
|
|
4297
|
+
class: normalizeClass([
|
|
4298
|
+
"fa-2x",
|
|
4299
|
+
props.icon
|
|
4300
|
+
])
|
|
4301
|
+
}, null, 2)
|
|
4302
|
+
]),
|
|
4303
|
+
createElementVNode("div", null, toDisplayString(props.name), 1)
|
|
4304
|
+
], 10, _hoisted_3)
|
|
4305
|
+
]),
|
|
4306
|
+
_: 2
|
|
4307
|
+
}, 1032, [
|
|
4308
|
+
"id"
|
|
4309
|
+
]);
|
|
4310
|
+
}), 128))
|
|
4311
|
+
])
|
|
4312
|
+
]),
|
|
4313
|
+
createElementVNode("div", null, [
|
|
4314
|
+
_cache[1] || (_cache[1] = createElementVNode("h6", null, "Presets", -1)),
|
|
4315
|
+
createElementVNode("div", _hoisted_4, [
|
|
4316
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.presets, (item, key)=>{
|
|
4317
|
+
return openBlock(), createBlock(_component_AIdentityProviderPreset, {
|
|
4318
|
+
key,
|
|
4319
|
+
id: item
|
|
4320
|
+
}, {
|
|
4321
|
+
default: withCtx((props)=>[
|
|
4322
|
+
createElementVNode("div", {
|
|
4323
|
+
class: normalizeClass([
|
|
4324
|
+
{
|
|
4325
|
+
"active": item === _ctx.preset
|
|
4326
|
+
},
|
|
4327
|
+
"d-flex flex-column gap-1 text-center identity-provider-picker-item"
|
|
4328
|
+
]),
|
|
4329
|
+
onClick: withModifiers(($event)=>_ctx.pickPreset(item), [
|
|
4330
|
+
"prevent"
|
|
4331
|
+
])
|
|
4332
|
+
}, [
|
|
4333
|
+
createElementVNode("div", null, [
|
|
4334
|
+
createElementVNode("i", {
|
|
4335
|
+
class: normalizeClass([
|
|
4336
|
+
"fa-2x",
|
|
4337
|
+
props.icon
|
|
4338
|
+
])
|
|
4339
|
+
}, null, 2)
|
|
4340
|
+
]),
|
|
4341
|
+
createElementVNode("div", null, toDisplayString(props.name), 1)
|
|
4342
|
+
], 10, _hoisted_5)
|
|
4343
|
+
]),
|
|
4344
|
+
_: 2
|
|
4345
|
+
}, 1032, [
|
|
4346
|
+
"id"
|
|
4347
|
+
]);
|
|
4348
|
+
}), 128))
|
|
4349
|
+
])
|
|
4350
|
+
])
|
|
4351
|
+
]);
|
|
4352
|
+
}
|
|
4353
|
+
var AIdentityProviderPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [
|
|
4354
|
+
[
|
|
4355
|
+
"render",
|
|
4356
|
+
_sfc_render
|
|
4357
|
+
],
|
|
4358
|
+
[
|
|
4359
|
+
"__scopeId",
|
|
4360
|
+
"data-v-0df1e731"
|
|
4361
|
+
]
|
|
4362
|
+
]);
|
|
4363
|
+
|
|
4153
4364
|
const AIdentityProviderOAuth2ClientFields = defineComponent({
|
|
4154
4365
|
props: {
|
|
4155
4366
|
entity: {
|
|
@@ -4687,17 +4898,16 @@ const AIdentityProviderForm = defineComponent({
|
|
|
4687
4898
|
set();
|
|
4688
4899
|
onChange(updatedAt, ()=>set());
|
|
4689
4900
|
const renderPicker = ()=>h(AIdentityProviderPicker, {
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
preset.value = value.preset;
|
|
4698
|
-
} else {
|
|
4699
|
-
preset.value = null;
|
|
4901
|
+
protocol: protocol.value,
|
|
4902
|
+
preset: preset.value,
|
|
4903
|
+
onPick (type, value) {
|
|
4904
|
+
if (type === 'preset') {
|
|
4905
|
+
preset.value = value;
|
|
4906
|
+
protocol.value = `${getIdentityProviderProtocolForPreset(value)}`;
|
|
4907
|
+
return;
|
|
4700
4908
|
}
|
|
4909
|
+
protocol.value = value;
|
|
4910
|
+
preset.value = null;
|
|
4701
4911
|
}
|
|
4702
4912
|
});
|
|
4703
4913
|
const render = (node)=>{
|
|
@@ -5268,6 +5478,38 @@ const APermission = defineComponent({
|
|
|
5268
5478
|
}
|
|
5269
5479
|
});
|
|
5270
5480
|
|
|
5481
|
+
const APermissionCheck = defineComponent({
|
|
5482
|
+
props: {
|
|
5483
|
+
name: {
|
|
5484
|
+
type: [
|
|
5485
|
+
String,
|
|
5486
|
+
Array
|
|
5487
|
+
],
|
|
5488
|
+
required: true
|
|
5489
|
+
},
|
|
5490
|
+
data: {
|
|
5491
|
+
type: Object
|
|
5492
|
+
},
|
|
5493
|
+
options: {
|
|
5494
|
+
type: Object
|
|
5495
|
+
}
|
|
5496
|
+
},
|
|
5497
|
+
setup (props, { slots }) {
|
|
5498
|
+
const fn = createPermissionCheckerReactiveFn();
|
|
5499
|
+
const isPermitted = computed(()=>fn({
|
|
5500
|
+
name: props.name,
|
|
5501
|
+
data: props.data,
|
|
5502
|
+
options: props.options
|
|
5503
|
+
}));
|
|
5504
|
+
return ()=>{
|
|
5505
|
+
if (isPermitted.value && hasNormalizedSlot(SlotName.DEFAULT, slots)) {
|
|
5506
|
+
return normalizeSlot(SlotName.DEFAULT, {}, slots);
|
|
5507
|
+
}
|
|
5508
|
+
return [];
|
|
5509
|
+
};
|
|
5510
|
+
}
|
|
5511
|
+
});
|
|
5512
|
+
|
|
5271
5513
|
const APermissionForm = defineComponent({
|
|
5272
5514
|
props: {
|
|
5273
5515
|
entity: {
|
|
@@ -6570,11 +6812,11 @@ const APagination = defineComponent({
|
|
|
6570
6812
|
* Author Peter Placzek (tada5hi)
|
|
6571
6813
|
* For the full copyright and license information,
|
|
6572
6814
|
* view the LICENSE file that was distributed with this source code.
|
|
6573
|
-
*/ var TitleSlotName
|
|
6574
|
-
(function(TitleSlotName) {
|
|
6815
|
+
*/ var TitleSlotName = /*#__PURE__*/ function(TitleSlotName) {
|
|
6575
6816
|
TitleSlotName["DEFAULT"] = "default";
|
|
6576
6817
|
TitleSlotName["ICON"] = "icon";
|
|
6577
|
-
|
|
6818
|
+
return TitleSlotName;
|
|
6819
|
+
}({});
|
|
6578
6820
|
|
|
6579
6821
|
function buildTitle(ctx) {
|
|
6580
6822
|
ctx.tag = ctx.tag || 'h6';
|
|
@@ -6660,11 +6902,11 @@ const ATitle = defineComponent({
|
|
|
6660
6902
|
* Author Peter Placzek (tada5hi)
|
|
6661
6903
|
* For the full copyright and license information,
|
|
6662
6904
|
* view the LICENSE file that was distributed with this source code.
|
|
6663
|
-
*/ var ListSearchSlotName
|
|
6664
|
-
(function(ListSearchSlotName) {
|
|
6905
|
+
*/ var ListSearchSlotName = /*#__PURE__*/ function(ListSearchSlotName) {
|
|
6665
6906
|
ListSearchSlotName["DEFAULT"] = "default";
|
|
6666
6907
|
ListSearchSlotName["ICON"] = "icon";
|
|
6667
|
-
|
|
6908
|
+
return ListSearchSlotName;
|
|
6909
|
+
}({});
|
|
6668
6910
|
|
|
6669
6911
|
function debounce(func, timeout = 200) {
|
|
6670
6912
|
let timer;
|
|
@@ -6834,12 +7076,6 @@ const LanguageSwitcherDropdown = defineComponent({
|
|
|
6834
7076
|
}
|
|
6835
7077
|
});
|
|
6836
7078
|
|
|
6837
|
-
var ElementType;
|
|
6838
|
-
(function(ElementType) {
|
|
6839
|
-
ElementType["BUTTON"] = "button";
|
|
6840
|
-
ElementType["LINK"] = "link";
|
|
6841
|
-
ElementType["DROP_DOWN_ITEM"] = "dropDownItem";
|
|
6842
|
-
})(ElementType || (ElementType = {}));
|
|
6843
7079
|
const AEntityDelete = defineComponent({
|
|
6844
7080
|
props: {
|
|
6845
7081
|
elementIcon: {
|
|
@@ -6966,6 +7202,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
6966
7202
|
AIdentityProviders: AIdentityProviders,
|
|
6967
7203
|
APagination: APagination,
|
|
6968
7204
|
APermission: APermission,
|
|
7205
|
+
APermissionCheck: APermissionCheck,
|
|
6969
7206
|
APermissionForm: APermissionForm,
|
|
6970
7207
|
APermissionRobotAssignments: APermissionRobotAssignments,
|
|
6971
7208
|
APermissionRoleAssignments: APermissionRoleAssignments,
|
|
@@ -7037,7 +7274,8 @@ function install(app1, options) {
|
|
|
7037
7274
|
});
|
|
7038
7275
|
installHTTPClient(app1, {
|
|
7039
7276
|
pinia: options.pinia,
|
|
7040
|
-
baseURL: options.baseURL
|
|
7277
|
+
baseURL: options.baseURL,
|
|
7278
|
+
isServer: options.isServer
|
|
7041
7279
|
});
|
|
7042
7280
|
installTranslator(app1, {
|
|
7043
7281
|
locale: options.translatorLocale
|
|
@@ -7049,5 +7287,5 @@ var index = {
|
|
|
7049
7287
|
install
|
|
7050
7288
|
};
|
|
7051
7289
|
|
|
7052
|
-
export { AClient, AClientForm, AClientRedirectUris, AClientRedirectUrisItem, AClientScope, AClientScopeAssignment, AClientScopeAssignments, AClientScopes, AClients, AEntityDelete, AIdentityProvider, AIdentityProviderForm, AIdentityProviderIcon, AIdentityProviderLdapForm, AIdentityProviderOAuth2Form, AIdentityProviderPreset, AIdentityProviderProtocol, AIdentityProviderRoleAssignment, AIdentityProviderRoleAssignments, AIdentityProviders, APagination, APermission, APermissionForm, APermissionRobotAssignments, APermissionRoleAssignments, APermissionUserAssignments, APermissions, ARealm, ARealmForm, ARealms, ARobot, ARobotForm, ARobotPermissionAssignment, ARobotPermissionAssignments, ARobotRoleAssignment, ARobotRoleAssignments, ARobots, ARole, ARoleForm, ARolePermissionAssignment, ARolePermissionAssignments, ARoleRobotAssignments, ARoleUserAssignments, ARoles, AScope, AScopeClientAssignments, AScopeForm, AScopes, ASearch, ATitle, AUser, AUserForm, AUserPasswordForm, AUserPermissionAssignment, AUserPermissionAssignments, AUserRoleAssignment, AUserRoleAssignments, AUsers, EntityManagerError, HTTPClientSymbol, LanguageSwitcherDropdown, STORE_ID, SocketClientSymbol,
|
|
7290
|
+
export { AClient, AClientForm, AClientRedirectUris, AClientRedirectUrisItem, AClientScope, AClientScopeAssignment, AClientScopeAssignments, AClientScopes, AClients, AEntityDelete, AIdentityProvider, AIdentityProviderForm, AIdentityProviderIcon, AIdentityProviderLdapForm, AIdentityProviderOAuth2Form, AIdentityProviderPreset, AIdentityProviderProtocol, AIdentityProviderRoleAssignment, AIdentityProviderRoleAssignments, AIdentityProviders, APagination, APermission, APermissionCheck, APermissionForm, APermissionRobotAssignments, APermissionRoleAssignments, APermissionUserAssignments, APermissions, ARealm, ARealmForm, ARealms, ARobot, ARobotForm, ARobotPermissionAssignment, ARobotPermissionAssignments, ARobotRoleAssignment, ARobotRoleAssignments, ARobots, ARole, ARoleForm, ARolePermissionAssignment, ARolePermissionAssignments, ARoleRobotAssignments, ARoleUserAssignments, ARoles, AScope, AScopeClientAssignments, AScopeForm, AScopes, ASearch, ATitle, AUser, AUserForm, AUserPasswordForm, AUserPermissionAssignment, AUserPermissionAssignments, AUserRoleAssignment, AUserRoleAssignments, AUsers, EntityManagerError, HTTPClientSymbol, LanguageSwitcherDropdown, STORE_ID, SocketClientSymbol, StoreDispatcherEventName, TranslatorTranslationClientKey, TranslatorTranslationDefaultKey, TranslatorTranslationGroup, TranslatorTranslationVuecsKey, VuelidateCustomRule, VuelidateCustomRuleKey, buildEntityManagerSlotProps, buildFormSubmitWithTranslations, buildListCreatedHandler, buildListDeletedHandler, buildListUpdatedHandler, createEntityManager, createFormSubmitTranslations, createList, createPermissionCheckerReactiveFn, createStore, createStoreDispatcher, index as default, defineEntityManagerEvents, defineEntityManagerProps, defineListEvents, defineListProps, extendObjectProperties, extractVuelidateResultsFromChild, getVuelidateSeverity, hasHTTPClient, hasNormalizedSlot, hasStoreFactory, initFormAttributesFromSource, inject$1 as inject, injectHTTPClient, injectSocketManager, injectStoreDispatcher, injectStoreFactory, injectTranslatorLocale, install, installHTTPClient, installSocketManager, installStore, installTranslator, isQuerySortedDescByDate, isSocketManagerUsable, mergeListOptions, normalizeSlot, onChange, provide, provideHTTPClient, provideSocketManager, provideStoreDispatcher, provideStoreFactory, renderEntityAssignAction, storeToRefs, useIsEditing, usePermissionCheck, useRealmResourceWritableCheck, useStore, useTranslation, useTranslationsForBaseValidation, useTranslationsForGroup, useTranslationsForNestedValidation, useUpdatedAt, wrapFnWithBusyState };
|
|
7053
7291
|
//# sourceMappingURL=index.mjs.map
|