@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.cjs
CHANGED
|
@@ -94,69 +94,147 @@ class PolicyEngine extends kit.PolicyEngine {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
/*
|
|
98
|
+
* Copyright (c) 2024.
|
|
99
|
+
* Author Peter Placzek (tada5hi)
|
|
100
|
+
* For the full copyright and license information,
|
|
101
|
+
* view the LICENSE file that was distributed with this source code.
|
|
102
|
+
*/ var StoreDispatcherEventName = /*#__PURE__*/ function(StoreDispatcherEventName) {
|
|
103
|
+
StoreDispatcherEventName["LOGGING_IN"] = "loggingIn";
|
|
104
|
+
StoreDispatcherEventName["LOGGED_IN"] = "loggedIn";
|
|
105
|
+
StoreDispatcherEventName["LOGGING_OUT"] = "loggingOut";
|
|
106
|
+
StoreDispatcherEventName["LOGGED_OUT"] = "loggedOut";
|
|
107
|
+
StoreDispatcherEventName["RESOLVING"] = "resolving";
|
|
108
|
+
StoreDispatcherEventName["RESOLVED"] = "resolved";
|
|
109
|
+
StoreDispatcherEventName["ACCESS_TOKEN_UPDATED"] = "accessTokenUpdated";
|
|
110
|
+
StoreDispatcherEventName["ACCESS_TOKEN_EXPIRE_DATE_UPDATED"] = "accessTokenExpireDateUpdated";
|
|
111
|
+
StoreDispatcherEventName["REFRESH_TOKEN_UPDATED"] = "refreshTokenUpdated";
|
|
112
|
+
StoreDispatcherEventName["USER_UPDATED"] = "userUpdated";
|
|
113
|
+
StoreDispatcherEventName["REALM_UPDATED"] = "realmUpdated";
|
|
114
|
+
StoreDispatcherEventName["REALM_MANAGEMENT_UPDATED"] = "realmManagementUpdated";
|
|
115
|
+
return StoreDispatcherEventName;
|
|
116
|
+
}({});
|
|
117
|
+
|
|
118
|
+
// src/event-emitter.ts
|
|
119
|
+
var EventEmitter = class {
|
|
120
|
+
on(type, handler) {
|
|
121
|
+
if (!this.all.has(type)) {
|
|
122
|
+
this.all.set(type, []);
|
|
123
|
+
}
|
|
124
|
+
const handlers = this.all.get(type);
|
|
125
|
+
handlers.push(handler);
|
|
126
|
+
return ()=>handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
|
127
|
+
}
|
|
128
|
+
off(type, handler) {
|
|
129
|
+
if (!type) {
|
|
130
|
+
return this.all.clear();
|
|
131
|
+
}
|
|
132
|
+
const handlers = this.all.get(type);
|
|
133
|
+
if (handlers) {
|
|
134
|
+
if (handler) {
|
|
135
|
+
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
|
136
|
+
} else {
|
|
137
|
+
this.all.delete(type);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Invoke all handlers for the given type.
|
|
143
|
+
* If present, `'*'` handlers are invoked after type-matched handlers.
|
|
144
|
+
*
|
|
145
|
+
* Note: Manually firing `'*'` handlers is not supported.
|
|
146
|
+
*
|
|
147
|
+
* @param type The event type to invoke
|
|
148
|
+
* @param payload Any value to each handler
|
|
149
|
+
*/ emit(type, ...payload) {
|
|
150
|
+
let handlers = this.all.get(type);
|
|
151
|
+
handlers?.slice().map((handler)=>{
|
|
152
|
+
handler(...payload);
|
|
153
|
+
});
|
|
154
|
+
handlers = this.all.get("*");
|
|
155
|
+
if (handlers) {
|
|
156
|
+
handlers.slice().map((handler)=>{
|
|
157
|
+
handler(type, payload);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
constructor(all){
|
|
162
|
+
this.all = all || /* @__PURE__ */ new Map();
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
function createStoreDispatcher() {
|
|
167
|
+
return new EventEmitter();
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const sym$1 = Symbol.for('AuthupStoreEventBus');
|
|
171
|
+
function injectStoreDispatcher(app) {
|
|
172
|
+
const instance = inject$1(sym$1, app);
|
|
173
|
+
if (!instance) {
|
|
174
|
+
throw new Error('The store dispatcher has not been injected in the app context.');
|
|
175
|
+
}
|
|
176
|
+
return instance;
|
|
177
|
+
}
|
|
178
|
+
function provideStoreDispatcher(eventBus, app) {
|
|
179
|
+
provide(sym$1, eventBus, app);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function createPromiseShareWrapperFn(fn) {
|
|
183
|
+
let promise;
|
|
184
|
+
return (...args)=>{
|
|
185
|
+
if (promise) {
|
|
186
|
+
return promise;
|
|
187
|
+
}
|
|
188
|
+
promise = new Promise((resolve, reject)=>{
|
|
189
|
+
fn(...args).then((r)=>resolve(r)).catch((e)=>reject(e));
|
|
190
|
+
});
|
|
191
|
+
promise.finally(()=>{
|
|
192
|
+
setTimeout(()=>{
|
|
193
|
+
promise = undefined;
|
|
194
|
+
}, 0);
|
|
195
|
+
});
|
|
196
|
+
return promise;
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
function createStore(context) {
|
|
98
200
|
const client = new coreHttpKit.Client({
|
|
99
201
|
baseURL: context.baseURL
|
|
100
202
|
});
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
|
|
203
|
+
const cookiesRead = vue.ref(false);
|
|
204
|
+
const setCookiesRead = (value)=>{
|
|
205
|
+
cookiesRead.value = value;
|
|
104
206
|
};
|
|
105
207
|
// --------------------------------------------------------------------
|
|
106
|
-
const accessToken = vue.ref(
|
|
208
|
+
const accessToken = vue.ref(null);
|
|
107
209
|
const setAccessToken = (input)=>{
|
|
108
210
|
accessToken.value = input;
|
|
211
|
+
context.dispatcher.emit(StoreDispatcherEventName.ACCESS_TOKEN_UPDATED, input);
|
|
109
212
|
};
|
|
110
213
|
// --------------------------------------------------------------------
|
|
111
|
-
const accessTokenExpireDate = vue.ref(
|
|
214
|
+
const accessTokenExpireDate = vue.ref(null);
|
|
112
215
|
const setAccessTokenExpireDate = (input)=>{
|
|
113
216
|
if (typeof input === 'number' || typeof input === 'string') {
|
|
114
217
|
accessTokenExpireDate.value = new Date(input); // verify microseconds or seconds
|
|
115
|
-
|
|
218
|
+
} else {
|
|
219
|
+
accessTokenExpireDate.value = input;
|
|
116
220
|
}
|
|
117
|
-
accessTokenExpireDate.value
|
|
221
|
+
context.dispatcher.emit(StoreDispatcherEventName.ACCESS_TOKEN_EXPIRE_DATE_UPDATED, accessTokenExpireDate.value);
|
|
118
222
|
};
|
|
119
223
|
// --------------------------------------------------------------------
|
|
120
|
-
const refreshToken = vue.ref(
|
|
224
|
+
const refreshToken = vue.ref(null);
|
|
121
225
|
const setRefreshToken = (input)=>{
|
|
122
226
|
refreshToken.value = input;
|
|
227
|
+
context.dispatcher.emit(StoreDispatcherEventName.REFRESH_TOKEN_UPDATED, input);
|
|
123
228
|
};
|
|
124
229
|
// --------------------------------------------------------------------
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
131
|
-
// --------------------------------------------------------------------
|
|
132
|
-
let refreshTokenPromise;
|
|
133
|
-
const attemptRefreshToken = ()=>{
|
|
134
|
-
if (!refreshToken.value) {
|
|
135
|
-
return Promise.reject(new Error('No refresh token is present.'));
|
|
136
|
-
}
|
|
137
|
-
if (refreshTokenPromise) {
|
|
138
|
-
return refreshTokenPromise;
|
|
139
|
-
}
|
|
140
|
-
refreshTokenPromise = client.token.createWithRefreshToken({
|
|
141
|
-
refresh_token: refreshToken.value
|
|
142
|
-
}).then((r)=>{
|
|
143
|
-
handleTokenGrantResponse(r);
|
|
144
|
-
return r;
|
|
145
|
-
}).finally(()=>{
|
|
146
|
-
refreshTokenPromise = undefined;
|
|
147
|
-
});
|
|
148
|
-
return refreshTokenPromise;
|
|
149
|
-
};
|
|
150
|
-
// --------------------------------------------------------------------
|
|
151
|
-
const user = vue.ref(undefined);
|
|
152
|
-
const userId = vue.computed(()=>user.value ? user.value.id : undefined);
|
|
153
|
-
const userResolved = vue.ref(false);
|
|
154
|
-
const setUser = (entity)=>{
|
|
155
|
-
user.value = entity;
|
|
156
|
-
userResolved.value = !!entity;
|
|
230
|
+
const user = vue.ref(null);
|
|
231
|
+
const userId = vue.computed(()=>user.value ? user.value.id : null);
|
|
232
|
+
const setUser = (input)=>{
|
|
233
|
+
user.value = input;
|
|
234
|
+
context.dispatcher.emit(StoreDispatcherEventName.USER_UPDATED, input);
|
|
157
235
|
};
|
|
158
236
|
// --------------------------------------------------------------------
|
|
159
|
-
const realm = vue.ref(
|
|
237
|
+
const realm = vue.ref(null);
|
|
160
238
|
const realmId = vue.computed(()=>realm.value ? realm.value.id : undefined);
|
|
161
239
|
const realmName = vue.computed(()=>realm.value ? realm.value.name : undefined);
|
|
162
240
|
const realmIsRoot = vue.computed(()=>{
|
|
@@ -165,122 +243,185 @@ function createStore(context = {}) {
|
|
|
165
243
|
}
|
|
166
244
|
return false;
|
|
167
245
|
});
|
|
168
|
-
const setRealm = (
|
|
169
|
-
realm.value =
|
|
246
|
+
const setRealm = (input)=>{
|
|
247
|
+
realm.value = input;
|
|
248
|
+
context.dispatcher.emit(StoreDispatcherEventName.REALM_UPDATED, input);
|
|
170
249
|
};
|
|
171
|
-
const realmManagement = vue.ref(
|
|
250
|
+
const realmManagement = vue.ref(null);
|
|
172
251
|
const realmManagementId = vue.computed(()=>realmManagement.value ? realmManagement.value.id : realmId.value);
|
|
173
252
|
const realmManagementName = vue.computed(()=>realmManagement.value ? realmManagement.value.name : realmName.value);
|
|
174
|
-
const setRealmManagement = (
|
|
175
|
-
realmManagement.value =
|
|
253
|
+
const setRealmManagement = (input)=>{
|
|
254
|
+
realmManagement.value = input;
|
|
255
|
+
context.dispatcher.emit(StoreDispatcherEventName.REALM_MANAGEMENT_UPDATED, input);
|
|
176
256
|
};
|
|
257
|
+
// --------------------------------------------------------------------
|
|
177
258
|
const permissionRepository = new kit.PermissionMemoryProvider();
|
|
178
259
|
const permissionChecker = new kit.PermissionChecker({
|
|
179
260
|
provider: permissionRepository,
|
|
180
261
|
policyEngine: new PolicyEngine()
|
|
181
262
|
});
|
|
182
|
-
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if (!entity) {
|
|
188
|
-
setRealm(undefined);
|
|
189
|
-
setRealmManagement(undefined);
|
|
190
|
-
permissionRepository.setMany([]);
|
|
191
|
-
return;
|
|
263
|
+
// --------------------------------------------------------------------
|
|
264
|
+
const userResolved = vue.ref(false);
|
|
265
|
+
const resolveUser = async ()=>{
|
|
266
|
+
if (!accessToken.value || userResolved.value) {
|
|
267
|
+
return Promise.resolve();
|
|
192
268
|
}
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
269
|
+
userResolved.value = true;
|
|
270
|
+
return client.userInfo.get(`Bearer ${accessToken.value}`).then((response)=>{
|
|
271
|
+
setUser(response);
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
// --------------------------------------------------------------------
|
|
275
|
+
const tokenResolved = vue.ref(false);
|
|
276
|
+
const resolveToken = async ()=>{
|
|
277
|
+
if (!accessToken.value || tokenResolved.value) {
|
|
278
|
+
return Promise.resolve();
|
|
196
279
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
280
|
+
tokenResolved.value = true;
|
|
281
|
+
return client.token.introspect({
|
|
282
|
+
token: accessToken.value
|
|
283
|
+
}, {
|
|
284
|
+
authorizationHeader: {
|
|
285
|
+
type: 'Bearer',
|
|
286
|
+
token: accessToken.value
|
|
204
287
|
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
288
|
+
}).then((response)=>{
|
|
289
|
+
if (response.exp) {
|
|
290
|
+
const expireDate = new Date(response.exp * 1000);
|
|
291
|
+
setAccessTokenExpireDate(expireDate);
|
|
292
|
+
}
|
|
293
|
+
if (response.realm_id && response.realm_name) {
|
|
294
|
+
realm.value = {
|
|
295
|
+
id: response.realm_id,
|
|
296
|
+
name: response.realm_name
|
|
297
|
+
};
|
|
298
|
+
if (!realmManagement.value) {
|
|
299
|
+
setRealmManagement(realm.value);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (response.permissions) {
|
|
303
|
+
permissionRepository.setMany(response.permissions);
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
};
|
|
307
|
+
// --------------------------------------------------------------------
|
|
308
|
+
const applyTokenGrantResponse = (response)=>{
|
|
309
|
+
const expireDate = new Date(Date.now() + response.expires_in * 1000);
|
|
310
|
+
setAccessTokenExpireDate(expireDate);
|
|
311
|
+
setAccessToken(response.access_token);
|
|
312
|
+
if (response.refresh_token) {
|
|
313
|
+
setRefreshToken(response.refresh_token);
|
|
314
|
+
} else {
|
|
315
|
+
setRefreshToken(null);
|
|
208
316
|
}
|
|
209
317
|
};
|
|
210
318
|
// --------------------------------------------------------------------
|
|
211
|
-
const
|
|
212
|
-
if (!
|
|
319
|
+
const refreshSession = createPromiseShareWrapperFn(async ()=>{
|
|
320
|
+
if (!refreshToken.value) {
|
|
321
|
+
throw new kit.TokenError('The access token can not be renewed.');
|
|
322
|
+
}
|
|
323
|
+
return client.token.createWithRefreshToken({
|
|
324
|
+
refresh_token: refreshToken.value
|
|
325
|
+
}).then((r)=>applyTokenGrantResponse(r)).catch((e)=>{
|
|
326
|
+
reset();
|
|
327
|
+
return Promise.reject(e);
|
|
328
|
+
}).finally(()=>{
|
|
329
|
+
tokenResolved.value = false;
|
|
330
|
+
userResolved.value = false;
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
// --------------------------------------------------------------------
|
|
334
|
+
const resolveInternal = async ()=>{
|
|
335
|
+
context.dispatcher.emit(StoreDispatcherEventName.RESOLVING);
|
|
213
336
|
try {
|
|
214
|
-
if (!
|
|
215
|
-
|
|
216
|
-
token: accessToken.value
|
|
217
|
-
}, {
|
|
218
|
-
authorizationHeader: {
|
|
219
|
-
type: 'Bearer',
|
|
220
|
-
token: accessToken.value
|
|
221
|
-
}
|
|
222
|
-
});
|
|
223
|
-
setTokenInfo(token);
|
|
224
|
-
tokenResolved.value = true;
|
|
337
|
+
if (!accessToken.value && refreshToken.value) {
|
|
338
|
+
await refreshSession();
|
|
225
339
|
}
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
340
|
+
if (accessToken.value) {
|
|
341
|
+
await resolveToken();
|
|
342
|
+
if (!user.value) {
|
|
343
|
+
await resolveUser();
|
|
344
|
+
}
|
|
230
345
|
}
|
|
231
346
|
} catch (e) {
|
|
232
|
-
if (coreHttpKit.isClientTokenExpiredError(e)) {
|
|
233
|
-
await
|
|
234
|
-
|
|
235
|
-
refresh: true,
|
|
236
|
-
attempts: ctx.attempts ? ctx.attempts++ : 1
|
|
237
|
-
});
|
|
238
|
-
return;
|
|
347
|
+
if (coreHttpKit.isClientTokenExpiredError(e) && refreshToken.value) {
|
|
348
|
+
await refreshSession();
|
|
349
|
+
return resolveInternal();
|
|
239
350
|
}
|
|
240
351
|
throw e;
|
|
241
352
|
}
|
|
353
|
+
context.dispatcher.emit(StoreDispatcherEventName.RESOLVED);
|
|
354
|
+
return Promise.resolve();
|
|
242
355
|
};
|
|
356
|
+
const resolve = createPromiseShareWrapperFn(resolveInternal);
|
|
243
357
|
const loggedIn = vue.computed(()=>!!accessToken.value);
|
|
244
358
|
const login = async (ctx)=>{
|
|
359
|
+
context.dispatcher.emit(StoreDispatcherEventName.LOGGING_IN);
|
|
360
|
+
const response = await client.token.createWithPasswordGrant({
|
|
361
|
+
username: ctx.name,
|
|
362
|
+
password: ctx.password,
|
|
363
|
+
...realmId.value ? {
|
|
364
|
+
realm_id: ctx.realmId
|
|
365
|
+
} : {}
|
|
366
|
+
});
|
|
367
|
+
applyTokenGrantResponse(response);
|
|
245
368
|
try {
|
|
246
|
-
const response = await client.token.createWithPasswordGrant({
|
|
247
|
-
username: ctx.name,
|
|
248
|
-
password: ctx.password,
|
|
249
|
-
...realmId.value ? {
|
|
250
|
-
realm_id: ctx.realmId
|
|
251
|
-
} : {}
|
|
252
|
-
});
|
|
253
|
-
handleTokenGrantResponse(response);
|
|
254
369
|
await resolve();
|
|
255
370
|
} catch (e) {
|
|
256
|
-
|
|
371
|
+
await logout();
|
|
257
372
|
throw e;
|
|
258
373
|
}
|
|
374
|
+
context.dispatcher.emit(StoreDispatcherEventName.LOGGED_IN);
|
|
259
375
|
};
|
|
260
|
-
const
|
|
261
|
-
setAccessToken(
|
|
262
|
-
setAccessTokenExpireDate(
|
|
263
|
-
setRefreshToken(
|
|
264
|
-
setUser(
|
|
265
|
-
|
|
376
|
+
const reset = ()=>{
|
|
377
|
+
setAccessToken(null);
|
|
378
|
+
setAccessTokenExpireDate(null);
|
|
379
|
+
setRefreshToken(null);
|
|
380
|
+
setUser(null);
|
|
381
|
+
setRealm(null);
|
|
382
|
+
setRealmManagement(null);
|
|
383
|
+
permissionRepository.setMany([]);
|
|
384
|
+
tokenResolved.value = false;
|
|
385
|
+
userResolved.value = false;
|
|
386
|
+
};
|
|
387
|
+
const logout = async ()=>{
|
|
388
|
+
context.dispatcher.emit(StoreDispatcherEventName.LOGGING_OUT);
|
|
389
|
+
try {
|
|
390
|
+
if (accessToken.value) {
|
|
391
|
+
await client.token.revoke({
|
|
392
|
+
token: accessToken.value
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
} catch (e) {
|
|
396
|
+
// ...
|
|
397
|
+
}
|
|
398
|
+
try {
|
|
399
|
+
if (refreshToken.value) {
|
|
400
|
+
await client.token.revoke({
|
|
401
|
+
token: refreshToken.value
|
|
402
|
+
});
|
|
403
|
+
}
|
|
404
|
+
} catch (e) {
|
|
405
|
+
// ...
|
|
406
|
+
}
|
|
407
|
+
reset();
|
|
408
|
+
context.dispatcher.emit(StoreDispatcherEventName.LOGGED_OUT);
|
|
266
409
|
};
|
|
267
410
|
return {
|
|
268
|
-
|
|
269
|
-
|
|
411
|
+
cookiesRead,
|
|
412
|
+
setCookiesRead,
|
|
270
413
|
permissionChecker,
|
|
271
414
|
login,
|
|
272
415
|
logout,
|
|
273
416
|
loggedIn,
|
|
274
417
|
resolve,
|
|
275
|
-
|
|
418
|
+
applyTokenGrantResponse,
|
|
276
419
|
accessToken,
|
|
277
420
|
setAccessToken,
|
|
278
421
|
accessTokenExpireDate,
|
|
279
422
|
setAccessTokenExpireDate,
|
|
280
423
|
refreshToken,
|
|
281
424
|
setRefreshToken,
|
|
282
|
-
tokenInfo,
|
|
283
|
-
setTokenInfo,
|
|
284
425
|
realm,
|
|
285
426
|
realmId,
|
|
286
427
|
realmIsRoot,
|
|
@@ -361,36 +502,39 @@ function shouldUpdate(dependencies, newCookies, oldCookies) {
|
|
|
361
502
|
return false;
|
|
362
503
|
}
|
|
363
504
|
|
|
364
|
-
const
|
|
505
|
+
const sym = Symbol.for('AuthupStore');
|
|
365
506
|
function useStore(pinia, app) {
|
|
366
|
-
const instance =
|
|
507
|
+
const instance = injectStoreFactory(app);
|
|
367
508
|
if (!instance) {
|
|
368
509
|
throw new Error('The store has not been injected in the app context.');
|
|
369
510
|
}
|
|
370
511
|
return instance(pinia);
|
|
371
512
|
}
|
|
372
|
-
function
|
|
373
|
-
const instance = inject$1(
|
|
513
|
+
function injectStoreFactory(app) {
|
|
514
|
+
const instance = inject$1(sym, app);
|
|
374
515
|
if (!instance) {
|
|
375
|
-
throw new Error('The store has not been injected in the app context.');
|
|
516
|
+
throw new Error('The store factory has not been injected in the app context.');
|
|
376
517
|
}
|
|
377
518
|
return instance;
|
|
378
519
|
}
|
|
379
|
-
function
|
|
380
|
-
return !!inject$1(
|
|
520
|
+
function hasStoreFactory(app) {
|
|
521
|
+
return !!inject$1(sym, app);
|
|
381
522
|
}
|
|
382
|
-
function
|
|
383
|
-
provide(
|
|
523
|
+
function provideStoreFactory(store, app) {
|
|
524
|
+
provide(sym, store, app);
|
|
384
525
|
}
|
|
385
526
|
|
|
386
527
|
function installStore(app, options = {}) {
|
|
387
|
-
if (
|
|
528
|
+
if (hasStoreFactory(app)) {
|
|
388
529
|
return;
|
|
389
530
|
}
|
|
390
|
-
const
|
|
391
|
-
|
|
531
|
+
const storeDispatcher = createStoreDispatcher();
|
|
532
|
+
provideStoreDispatcher(storeDispatcher, app);
|
|
533
|
+
const storeFactory = pinia.defineStore(STORE_ID, ()=>createStore({
|
|
534
|
+
baseURL: options.baseURL,
|
|
535
|
+
dispatcher: storeDispatcher
|
|
392
536
|
}));
|
|
393
|
-
const store =
|
|
537
|
+
const store = storeFactory(options.pinia);
|
|
394
538
|
let cookieGet;
|
|
395
539
|
if (options.cookieGet) {
|
|
396
540
|
cookieGet = options.cookieGet;
|
|
@@ -409,18 +553,18 @@ function installStore(app, options = {}) {
|
|
|
409
553
|
if (options.cookieUnset) {
|
|
410
554
|
cookieUnset = options.cookieUnset;
|
|
411
555
|
} else if (options.cookieSet) {
|
|
412
|
-
cookieUnset = (key)=>{
|
|
413
|
-
options.cookieSet(key, null);
|
|
556
|
+
cookieUnset = (key, opts)=>{
|
|
557
|
+
options.cookieSet(key, null, opts);
|
|
414
558
|
};
|
|
415
559
|
} else {
|
|
416
560
|
const cookies = useCookies();
|
|
417
561
|
cookieUnset = cookies.remove;
|
|
418
562
|
}
|
|
419
|
-
const
|
|
420
|
-
if (store.
|
|
563
|
+
const readCookies = ()=>{
|
|
564
|
+
if (store.cookiesRead) {
|
|
421
565
|
return;
|
|
422
566
|
}
|
|
423
|
-
store.
|
|
567
|
+
store.setCookiesRead(true);
|
|
424
568
|
const keys = Object.values(coreHttpKit.CookieName);
|
|
425
569
|
let value;
|
|
426
570
|
for(let i = 0; i < keys.length; i++){
|
|
@@ -462,44 +606,61 @@ function installStore(app, options = {}) {
|
|
|
462
606
|
}
|
|
463
607
|
}
|
|
464
608
|
};
|
|
465
|
-
|
|
466
|
-
if (
|
|
467
|
-
return;
|
|
609
|
+
const maxAgeFn = ()=>{
|
|
610
|
+
if (!store.accessTokenExpireDate) {
|
|
611
|
+
return undefined;
|
|
468
612
|
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
613
|
+
return Math.floor(Math.max(1000, new Date(`${store.accessTokenExpireDate}`).getTime() - Date.now()) / 1000);
|
|
614
|
+
};
|
|
615
|
+
storeDispatcher.on(StoreDispatcherEventName.ACCESS_TOKEN_EXPIRE_DATE_UPDATED, (input)=>{
|
|
616
|
+
if (input) {
|
|
617
|
+
cookieSet(coreHttpKit.CookieName.ACCESS_TOKEN_EXPIRE_DATE, input, {
|
|
618
|
+
maxAge: maxAgeFn()
|
|
619
|
+
});
|
|
620
|
+
} else {
|
|
621
|
+
cookieUnset(coreHttpKit.CookieName.ACCESS_TOKEN_EXPIRE_DATE, {});
|
|
476
622
|
}
|
|
477
623
|
});
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
if (state.accessTokenExpireDate) {
|
|
487
|
-
cookieSet(coreHttpKit.CookieName.ACCESS_TOKEN_EXPIRE_DATE, state.accessTokenExpireDate);
|
|
624
|
+
storeDispatcher.on(StoreDispatcherEventName.ACCESS_TOKEN_UPDATED, (input)=>{
|
|
625
|
+
if (input) {
|
|
626
|
+
const maxAge = maxAgeFn();
|
|
627
|
+
cookieSet(coreHttpKit.CookieName.ACCESS_TOKEN, input, {
|
|
628
|
+
maxAge
|
|
629
|
+
});
|
|
630
|
+
} else {
|
|
631
|
+
cookieUnset(coreHttpKit.CookieName.ACCESS_TOKEN, {});
|
|
488
632
|
}
|
|
489
|
-
|
|
490
|
-
|
|
633
|
+
});
|
|
634
|
+
storeDispatcher.on(StoreDispatcherEventName.REFRESH_TOKEN_UPDATED, (input)=>{
|
|
635
|
+
if (input) {
|
|
636
|
+
cookieSet(coreHttpKit.CookieName.REFRESH_TOKEN, input, {});
|
|
637
|
+
} else {
|
|
638
|
+
cookieUnset(coreHttpKit.CookieName.REFRESH_TOKEN, {});
|
|
491
639
|
}
|
|
492
|
-
|
|
493
|
-
|
|
640
|
+
});
|
|
641
|
+
storeDispatcher.on(StoreDispatcherEventName.USER_UPDATED, (input)=>{
|
|
642
|
+
if (input) {
|
|
643
|
+
cookieSet(coreHttpKit.CookieName.USER, input, {});
|
|
644
|
+
} else {
|
|
645
|
+
cookieUnset(coreHttpKit.CookieName.USER, {});
|
|
494
646
|
}
|
|
495
|
-
|
|
496
|
-
|
|
647
|
+
});
|
|
648
|
+
storeDispatcher.on(StoreDispatcherEventName.REALM_UPDATED, (input)=>{
|
|
649
|
+
if (input) {
|
|
650
|
+
cookieSet(coreHttpKit.CookieName.REALM, input, {});
|
|
651
|
+
} else {
|
|
652
|
+
cookieUnset(coreHttpKit.CookieName.REALM, {});
|
|
497
653
|
}
|
|
498
|
-
|
|
499
|
-
|
|
654
|
+
});
|
|
655
|
+
storeDispatcher.on(StoreDispatcherEventName.REALM_MANAGEMENT_UPDATED, (input)=>{
|
|
656
|
+
if (input) {
|
|
657
|
+
cookieSet(coreHttpKit.CookieName.REALM_MANAGEMENT, input, {});
|
|
658
|
+
} else {
|
|
659
|
+
cookieUnset(coreHttpKit.CookieName.REALM_MANAGEMENT, {});
|
|
500
660
|
}
|
|
501
661
|
});
|
|
502
|
-
|
|
662
|
+
readCookies();
|
|
663
|
+
provideStoreFactory(storeFactory, app);
|
|
503
664
|
}
|
|
504
665
|
|
|
505
666
|
function storeToRefs(store) {
|
|
@@ -522,8 +683,8 @@ function installHTTPClient(app, options = {}) {
|
|
|
522
683
|
const client = new coreHttpKit.Client({
|
|
523
684
|
baseURL: options.baseURL
|
|
524
685
|
});
|
|
525
|
-
const
|
|
526
|
-
const store =
|
|
686
|
+
const storeFactory = injectStoreFactory(app);
|
|
687
|
+
const store = storeFactory(options.pinia);
|
|
527
688
|
const { refreshToken } = pinia.storeToRefs(store);
|
|
528
689
|
const tokenHook = new coreHttpKit.ClientResponseErrorTokenHook(client, {
|
|
529
690
|
baseURL: options.baseURL,
|
|
@@ -536,32 +697,36 @@ function installHTTPClient(app, options = {}) {
|
|
|
536
697
|
});
|
|
537
698
|
},
|
|
538
699
|
tokenCreated: (response)=>{
|
|
539
|
-
store.
|
|
700
|
+
store.applyTokenGrantResponse(response);
|
|
540
701
|
},
|
|
541
702
|
tokenFailed: ()=>{
|
|
542
|
-
store.logout();
|
|
543
|
-
}
|
|
703
|
+
Promise.resolve().then(()=>store.logout());
|
|
704
|
+
},
|
|
705
|
+
timer: !options.isServer
|
|
544
706
|
});
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
if (
|
|
707
|
+
const storeDispatcher = injectStoreDispatcher(app);
|
|
708
|
+
const handleAccessTokenEvent = ()=>{
|
|
709
|
+
if (store.accessToken) {
|
|
548
710
|
client.setAuthorizationHeader({
|
|
549
711
|
type: 'Bearer',
|
|
550
|
-
token:
|
|
712
|
+
token: store.accessToken
|
|
551
713
|
});
|
|
552
714
|
tokenHook.mount();
|
|
553
715
|
} else {
|
|
554
716
|
client.unsetAuthorizationHeader();
|
|
555
717
|
tokenHook.unmount();
|
|
556
718
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
});
|
|
719
|
+
};
|
|
720
|
+
const handleAccessTokenExpireDateEvent = ()=>{
|
|
721
|
+
if (store.accessTokenExpireDate) {
|
|
722
|
+
const expiresIn = Math.floor((store.accessTokenExpireDate.getTime() - Date.now()) / 1000);
|
|
723
|
+
tokenHook.setTimer(expiresIn, ()=>refreshToken.value || undefined);
|
|
563
724
|
}
|
|
564
|
-
}
|
|
725
|
+
};
|
|
726
|
+
storeDispatcher.on(StoreDispatcherEventName.ACCESS_TOKEN_UPDATED, ()=>handleAccessTokenEvent());
|
|
727
|
+
storeDispatcher.on(StoreDispatcherEventName.ACCESS_TOKEN_EXPIRE_DATE_UPDATED, ()=>handleAccessTokenExpireDateEvent());
|
|
728
|
+
handleAccessTokenEvent();
|
|
729
|
+
handleAccessTokenExpireDateEvent();
|
|
565
730
|
provideHTTPClient(client, app);
|
|
566
731
|
}
|
|
567
732
|
|
|
@@ -777,7 +942,7 @@ function injectSocketManager(app) {
|
|
|
777
942
|
}
|
|
778
943
|
|
|
779
944
|
function installSocketManager(app, options) {
|
|
780
|
-
const storeCreator =
|
|
945
|
+
const storeCreator = injectStoreFactory(app);
|
|
781
946
|
const store = storeCreator(options.pinia);
|
|
782
947
|
const { accessToken } = storeToRefs(store);
|
|
783
948
|
const manager = new coreRealtimeKit.ClientManager({
|
|
@@ -1016,7 +1181,7 @@ function createList(context) {
|
|
|
1016
1181
|
}
|
|
1017
1182
|
}
|
|
1018
1183
|
const handleCreated = buildListCreatedHandler(data, (cbEntity)=>{
|
|
1019
|
-
total.value
|
|
1184
|
+
total.value++;
|
|
1020
1185
|
if (context.onCreated) {
|
|
1021
1186
|
context.onCreated(cbEntity, meta.value);
|
|
1022
1187
|
}
|
|
@@ -1049,7 +1214,7 @@ function createList(context) {
|
|
|
1049
1214
|
noMore: renderOptions.noMore,
|
|
1050
1215
|
body: renderOptions.body,
|
|
1051
1216
|
loading: renderOptions.loading,
|
|
1052
|
-
total,
|
|
1217
|
+
total: total.value,
|
|
1053
1218
|
load,
|
|
1054
1219
|
busy: busy.value,
|
|
1055
1220
|
data: data.value,
|
|
@@ -1058,16 +1223,19 @@ function createList(context) {
|
|
|
1058
1223
|
if (context.setup.emit) {
|
|
1059
1224
|
context.setup.emit('created', value);
|
|
1060
1225
|
}
|
|
1226
|
+
handleCreated(value);
|
|
1061
1227
|
},
|
|
1062
1228
|
onDeleted: (value)=>{
|
|
1063
1229
|
if (context.setup.emit) {
|
|
1064
1230
|
context.setup.emit('deleted', value);
|
|
1065
1231
|
}
|
|
1232
|
+
handleDeleted(value);
|
|
1066
1233
|
},
|
|
1067
1234
|
onUpdated: (value)=>{
|
|
1068
1235
|
if (context.setup.emit) {
|
|
1069
1236
|
context.setup.emit('updated', value);
|
|
1070
1237
|
}
|
|
1238
|
+
handleUpdated(value);
|
|
1071
1239
|
},
|
|
1072
1240
|
slotItems: context.setup.slots || {}
|
|
1073
1241
|
});
|
|
@@ -1543,26 +1711,25 @@ function createEntityManager(ctx) {
|
|
|
1543
1711
|
* Author Peter Placzek (tada5hi)
|
|
1544
1712
|
* For the full copyright and license information,
|
|
1545
1713
|
* view the LICENSE file that was distributed with this source code.
|
|
1546
|
-
*/
|
|
1547
|
-
(function(TranslatorTranslationGroup) {
|
|
1714
|
+
*/ var TranslatorTranslationGroup = /*#__PURE__*/ function(TranslatorTranslationGroup) {
|
|
1548
1715
|
TranslatorTranslationGroup["DEFAULT"] = "default";
|
|
1549
1716
|
TranslatorTranslationGroup["CLIENT"] = "authupClient";
|
|
1550
1717
|
TranslatorTranslationGroup["VUECS"] = "vuecs";
|
|
1551
1718
|
TranslatorTranslationGroup["VUELIDATE"] = "vuelidate";
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1719
|
+
return TranslatorTranslationGroup;
|
|
1720
|
+
}({});
|
|
1721
|
+
var TranslatorTranslationVuecsKey = /*#__PURE__*/ function(TranslatorTranslationVuecsKey) {
|
|
1555
1722
|
TranslatorTranslationVuecsKey["NO_MORE"] = "noMore";
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1723
|
+
return TranslatorTranslationVuecsKey;
|
|
1724
|
+
}({});
|
|
1725
|
+
var TranslatorTranslationClientKey = /*#__PURE__*/ function(TranslatorTranslationClientKey) {
|
|
1559
1726
|
TranslatorTranslationClientKey["NAME_HINT"] = "nameHint";
|
|
1560
1727
|
TranslatorTranslationClientKey["DESCRIPTION_HINT"] = "descriptionHint";
|
|
1561
1728
|
TranslatorTranslationClientKey["REDIRECT_URI_HINT"] = "redirectURIHint";
|
|
1562
1729
|
TranslatorTranslationClientKey["IS_CONFIDENTIAL"] = "isConfidential";
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1730
|
+
return TranslatorTranslationClientKey;
|
|
1731
|
+
}({});
|
|
1732
|
+
var TranslatorTranslationDefaultKey = /*#__PURE__*/ function(TranslatorTranslationDefaultKey) {
|
|
1566
1733
|
TranslatorTranslationDefaultKey["ADD"] = "add";
|
|
1567
1734
|
TranslatorTranslationDefaultKey["CREATE"] = "create";
|
|
1568
1735
|
TranslatorTranslationDefaultKey["DELETE"] = "delete";
|
|
@@ -1593,7 +1760,8 @@ exports.TranslatorTranslationDefaultKey = void 0;
|
|
|
1593
1760
|
TranslatorTranslationDefaultKey["SECRET"] = "secret";
|
|
1594
1761
|
TranslatorTranslationDefaultKey["REDIRECT_URIS"] = "redirectUris";
|
|
1595
1762
|
TranslatorTranslationDefaultKey["USERS"] = "users";
|
|
1596
|
-
|
|
1763
|
+
return TranslatorTranslationDefaultKey;
|
|
1764
|
+
}({});
|
|
1597
1765
|
|
|
1598
1766
|
/*
|
|
1599
1767
|
* Copyright (c) 2024-2024.
|
|
@@ -1881,49 +2049,49 @@ function useTranslationsForGroup(group, elements) {
|
|
|
1881
2049
|
}
|
|
1882
2050
|
|
|
1883
2051
|
const TranslatorTranslationClientGerman = {
|
|
1884
|
-
[
|
|
1885
|
-
[
|
|
1886
|
-
[
|
|
1887
|
-
[
|
|
2052
|
+
[TranslatorTranslationClientKey.NAME_HINT]: 'Etwas, das Benutzer erkennen und vertrauen werden',
|
|
2053
|
+
[TranslatorTranslationClientKey.DESCRIPTION_HINT]: 'Dies wird allen Benutzern dieser Anwendung angezeigt',
|
|
2054
|
+
[TranslatorTranslationClientKey.REDIRECT_URI_HINT]: 'URI-Muster, zu dem ein Browser nach einem erfolgreichen Login weiterleiten kann',
|
|
2055
|
+
[TranslatorTranslationClientKey.IS_CONFIDENTIAL]: 'Ist vertraulich?'
|
|
1888
2056
|
};
|
|
1889
2057
|
|
|
1890
2058
|
const TranslatorTranslationDefaultGerman = {
|
|
1891
|
-
[
|
|
1892
|
-
[
|
|
1893
|
-
[
|
|
1894
|
-
[
|
|
1895
|
-
[
|
|
1896
|
-
[
|
|
1897
|
-
[
|
|
1898
|
-
[
|
|
1899
|
-
[
|
|
1900
|
-
[
|
|
1901
|
-
[
|
|
1902
|
-
[
|
|
1903
|
-
[
|
|
1904
|
-
[
|
|
1905
|
-
[
|
|
1906
|
-
[
|
|
1907
|
-
[
|
|
1908
|
-
[
|
|
1909
|
-
[
|
|
1910
|
-
[
|
|
1911
|
-
[
|
|
1912
|
-
[
|
|
1913
|
-
[
|
|
1914
|
-
[
|
|
1915
|
-
[
|
|
1916
|
-
[
|
|
1917
|
-
[
|
|
1918
|
-
[
|
|
1919
|
-
[
|
|
2059
|
+
[TranslatorTranslationDefaultKey.ADD]: 'hinzufügen',
|
|
2060
|
+
[TranslatorTranslationDefaultKey.CREATE]: 'erstellen',
|
|
2061
|
+
[TranslatorTranslationDefaultKey.DELETE]: 'löschen',
|
|
2062
|
+
[TranslatorTranslationDefaultKey.GENERATE]: 'generieren',
|
|
2063
|
+
[TranslatorTranslationDefaultKey.UPDATE]: 'aktualisieren',
|
|
2064
|
+
[TranslatorTranslationDefaultKey.ACTIVE]: 'aktiv',
|
|
2065
|
+
[TranslatorTranslationDefaultKey.INACTIVE]: 'inaktiv',
|
|
2066
|
+
[TranslatorTranslationDefaultKey.LOCKED]: 'gesperrt',
|
|
2067
|
+
[TranslatorTranslationDefaultKey.NOT_LOCKED]: 'nicht gesperrt',
|
|
2068
|
+
[TranslatorTranslationDefaultKey.VALUE_IS_REGEX]: 'Wert ist regex pattern?',
|
|
2069
|
+
[TranslatorTranslationDefaultKey.CLIENT]: 'Client',
|
|
2070
|
+
[TranslatorTranslationDefaultKey.CLIENTS]: 'Clients',
|
|
2071
|
+
[TranslatorTranslationDefaultKey.CLIENT_SCOPES]: 'Client-Bereiche',
|
|
2072
|
+
[TranslatorTranslationDefaultKey.DISPLAY_NAME]: 'Anzeigename',
|
|
2073
|
+
[TranslatorTranslationDefaultKey.EMAIL]: 'E-Mail',
|
|
2074
|
+
[TranslatorTranslationDefaultKey.EXTERNAL_ID]: 'externe ID',
|
|
2075
|
+
[TranslatorTranslationDefaultKey.HASHED]: 'gehasht',
|
|
2076
|
+
[TranslatorTranslationDefaultKey.OVERVIEW]: 'Überblick',
|
|
2077
|
+
[TranslatorTranslationDefaultKey.IDENTITY_PROVIDERS]: 'Identitätsanbieter',
|
|
2078
|
+
[TranslatorTranslationDefaultKey.NAME]: 'Name',
|
|
2079
|
+
[TranslatorTranslationDefaultKey.DESCRIPTION]: 'Beschreibung',
|
|
2080
|
+
[TranslatorTranslationDefaultKey.PERMISSIONS]: 'Berechtigungen',
|
|
2081
|
+
[TranslatorTranslationDefaultKey.REALM]: 'Organisation',
|
|
2082
|
+
[TranslatorTranslationDefaultKey.REALMS]: 'Organisationen',
|
|
2083
|
+
[TranslatorTranslationDefaultKey.ROLES]: 'Rollen',
|
|
2084
|
+
[TranslatorTranslationDefaultKey.SCOPES]: 'Bereiche',
|
|
2085
|
+
[TranslatorTranslationDefaultKey.SECRET]: 'Geheimnis',
|
|
2086
|
+
[TranslatorTranslationDefaultKey.REDIRECT_URIS]: 'Weiterleitungs-URIs',
|
|
2087
|
+
[TranslatorTranslationDefaultKey.USERS]: 'Benutzer'
|
|
1920
2088
|
};
|
|
1921
2089
|
|
|
1922
|
-
|
|
1923
|
-
(function(VuelidateCustomRuleKey) {
|
|
2090
|
+
var VuelidateCustomRuleKey = /*#__PURE__*/ function(VuelidateCustomRuleKey) {
|
|
1924
2091
|
VuelidateCustomRuleKey["ALPHA_NUM_HYPHEN_UNDERSCORE"] = "alphaNumHyphenUnderscore";
|
|
1925
2092
|
VuelidateCustomRuleKey["ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE"] = "alphaUpperNumHyphenUnderscore";
|
|
1926
|
-
|
|
2093
|
+
return VuelidateCustomRuleKey;
|
|
2094
|
+
}({});
|
|
1927
2095
|
const VuelidateCustomRule = {
|
|
1928
2096
|
["alphaNumHyphenUnderscore"]: validators.helpers.regex(/^[a-z0-9-_]*$/),
|
|
1929
2097
|
["alphaUpperNumHyphenUnderscore"]: validators.helpers.regex(/^[a-zA-Z0-9-_]*$/)
|
|
@@ -1947,76 +2115,76 @@ function extractVuelidateResultsFromChild(vuelidate, child, keys) {
|
|
|
1947
2115
|
}
|
|
1948
2116
|
|
|
1949
2117
|
const TranslatorTranslationVuelidateGerman = {
|
|
1950
|
-
[
|
|
1951
|
-
[
|
|
2118
|
+
[VuelidateCustomRuleKey.ALPHA_NUM_HYPHEN_UNDERSCORE]: 'Der Eingabewert darf nur aus folgenden Zeichen bestehen: [0-9a-z-_]+',
|
|
2119
|
+
[VuelidateCustomRuleKey.ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE]: 'Der Eingabewert darf nur aus folgenden Zeichen bestehen: [0-9a-zA-Z-_]+'
|
|
1952
2120
|
};
|
|
1953
2121
|
|
|
1954
2122
|
const TranslatorTranslationVuecsGerman = {
|
|
1955
|
-
[
|
|
2123
|
+
[TranslatorTranslationVuecsKey.NO_MORE]: 'Keine weiteren {{name}} verfügbar'
|
|
1956
2124
|
};
|
|
1957
2125
|
|
|
1958
2126
|
const TranslatorTranslationClientEnglish = {
|
|
1959
|
-
[
|
|
1960
|
-
[
|
|
1961
|
-
[
|
|
1962
|
-
[
|
|
2127
|
+
[TranslatorTranslationClientKey.NAME_HINT]: 'Something users will recognize and trust',
|
|
2128
|
+
[TranslatorTranslationClientKey.DESCRIPTION_HINT]: 'Displayed to all users of this application',
|
|
2129
|
+
[TranslatorTranslationClientKey.REDIRECT_URI_HINT]: 'URI pattern a browser can redirect to after a successful login',
|
|
2130
|
+
[TranslatorTranslationClientKey.IS_CONFIDENTIAL]: 'Is confidential?'
|
|
1963
2131
|
};
|
|
1964
2132
|
|
|
1965
2133
|
const TranslatorTranslationDefaultEnglish = {
|
|
1966
|
-
[
|
|
1967
|
-
[
|
|
1968
|
-
[
|
|
1969
|
-
[
|
|
1970
|
-
[
|
|
1971
|
-
[
|
|
1972
|
-
[
|
|
1973
|
-
[
|
|
1974
|
-
[
|
|
1975
|
-
[
|
|
1976
|
-
[
|
|
1977
|
-
[
|
|
1978
|
-
[
|
|
1979
|
-
[
|
|
1980
|
-
[
|
|
1981
|
-
[
|
|
1982
|
-
[
|
|
1983
|
-
[
|
|
1984
|
-
[
|
|
1985
|
-
[
|
|
1986
|
-
[
|
|
1987
|
-
[
|
|
1988
|
-
[
|
|
1989
|
-
[
|
|
1990
|
-
[
|
|
1991
|
-
[
|
|
1992
|
-
[
|
|
1993
|
-
[
|
|
1994
|
-
[
|
|
2134
|
+
[TranslatorTranslationDefaultKey.ADD]: 'add',
|
|
2135
|
+
[TranslatorTranslationDefaultKey.CREATE]: 'create',
|
|
2136
|
+
[TranslatorTranslationDefaultKey.DELETE]: 'delete',
|
|
2137
|
+
[TranslatorTranslationDefaultKey.GENERATE]: 'generate',
|
|
2138
|
+
[TranslatorTranslationDefaultKey.UPDATE]: 'update',
|
|
2139
|
+
[TranslatorTranslationDefaultKey.ACTIVE]: 'active',
|
|
2140
|
+
[TranslatorTranslationDefaultKey.INACTIVE]: 'inactive',
|
|
2141
|
+
[TranslatorTranslationDefaultKey.LOCKED]: 'locked',
|
|
2142
|
+
[TranslatorTranslationDefaultKey.NOT_LOCKED]: 'not locked',
|
|
2143
|
+
[TranslatorTranslationDefaultKey.VALUE_IS_REGEX]: 'Value is regex pattern?',
|
|
2144
|
+
[TranslatorTranslationDefaultKey.CLIENT]: 'update',
|
|
2145
|
+
[TranslatorTranslationDefaultKey.CLIENTS]: 'clients',
|
|
2146
|
+
[TranslatorTranslationDefaultKey.CLIENT_SCOPES]: 'client scopes',
|
|
2147
|
+
[TranslatorTranslationDefaultKey.DISPLAY_NAME]: 'display name',
|
|
2148
|
+
[TranslatorTranslationDefaultKey.EMAIL]: 'email',
|
|
2149
|
+
[TranslatorTranslationDefaultKey.EXTERNAL_ID]: 'external id',
|
|
2150
|
+
[TranslatorTranslationDefaultKey.HASHED]: 'hashed',
|
|
2151
|
+
[TranslatorTranslationDefaultKey.OVERVIEW]: 'overview',
|
|
2152
|
+
[TranslatorTranslationDefaultKey.IDENTITY_PROVIDERS]: 'identity providers',
|
|
2153
|
+
[TranslatorTranslationDefaultKey.NAME]: 'name',
|
|
2154
|
+
[TranslatorTranslationDefaultKey.DESCRIPTION]: 'description',
|
|
2155
|
+
[TranslatorTranslationDefaultKey.PERMISSIONS]: 'permissions',
|
|
2156
|
+
[TranslatorTranslationDefaultKey.REALM]: 'realm',
|
|
2157
|
+
[TranslatorTranslationDefaultKey.REALMS]: 'realms',
|
|
2158
|
+
[TranslatorTranslationDefaultKey.ROLES]: 'roles',
|
|
2159
|
+
[TranslatorTranslationDefaultKey.SCOPES]: 'scopes',
|
|
2160
|
+
[TranslatorTranslationDefaultKey.SECRET]: 'secret',
|
|
2161
|
+
[TranslatorTranslationDefaultKey.REDIRECT_URIS]: 'redirect uri(s)',
|
|
2162
|
+
[TranslatorTranslationDefaultKey.USERS]: 'users'
|
|
1995
2163
|
};
|
|
1996
2164
|
|
|
1997
2165
|
const TranslatorTranslationVuelidateEnglish = {
|
|
1998
|
-
[
|
|
1999
|
-
[
|
|
2166
|
+
[VuelidateCustomRuleKey.ALPHA_NUM_HYPHEN_UNDERSCORE]: 'The input value is only allowed to consist of the following characters: [0-9a-z-_]+',
|
|
2167
|
+
[VuelidateCustomRuleKey.ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE]: 'The input value is only allowed to consist of the following characters: [0-9a-zA-Z-_]+'
|
|
2000
2168
|
};
|
|
2001
2169
|
|
|
2002
2170
|
const TranslatorTranslationVuecsEnglish = {
|
|
2003
|
-
[
|
|
2171
|
+
[TranslatorTranslationVuecsKey.NO_MORE]: 'No more {{name}} available'
|
|
2004
2172
|
};
|
|
2005
2173
|
|
|
2006
2174
|
function installTranslator(app, options = {}) {
|
|
2007
2175
|
const store = new MemoryStore({
|
|
2008
2176
|
data: {
|
|
2009
2177
|
de: {
|
|
2010
|
-
[
|
|
2011
|
-
[
|
|
2012
|
-
[
|
|
2013
|
-
[
|
|
2178
|
+
[TranslatorTranslationGroup.CLIENT]: TranslatorTranslationClientGerman,
|
|
2179
|
+
[TranslatorTranslationGroup.DEFAULT]: TranslatorTranslationDefaultGerman,
|
|
2180
|
+
[TranslatorTranslationGroup.VUECS]: TranslatorTranslationVuecsGerman,
|
|
2181
|
+
[TranslatorTranslationGroup.VUELIDATE]: TranslatorTranslationVuelidateGerman
|
|
2014
2182
|
},
|
|
2015
2183
|
en: {
|
|
2016
|
-
[
|
|
2017
|
-
[
|
|
2018
|
-
[
|
|
2019
|
-
[
|
|
2184
|
+
[TranslatorTranslationGroup.CLIENT]: TranslatorTranslationClientEnglish,
|
|
2185
|
+
[TranslatorTranslationGroup.DEFAULT]: TranslatorTranslationDefaultEnglish,
|
|
2186
|
+
[TranslatorTranslationGroup.VUECS]: TranslatorTranslationVuecsEnglish,
|
|
2187
|
+
[TranslatorTranslationGroup.VUELIDATE]: TranslatorTranslationVuelidateEnglish
|
|
2020
2188
|
}
|
|
2021
2189
|
}
|
|
2022
2190
|
});
|
|
@@ -2028,12 +2196,12 @@ function installTranslator(app, options = {}) {
|
|
|
2028
2196
|
|
|
2029
2197
|
function createFormSubmitTranslations() {
|
|
2030
2198
|
const updateText = useTranslation({
|
|
2031
|
-
group:
|
|
2032
|
-
key:
|
|
2199
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
2200
|
+
key: TranslatorTranslationDefaultKey.UPDATE
|
|
2033
2201
|
});
|
|
2034
2202
|
const createText = useTranslation({
|
|
2035
|
-
group:
|
|
2036
|
-
key:
|
|
2203
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
2204
|
+
key: TranslatorTranslationDefaultKey.CREATE
|
|
2037
2205
|
});
|
|
2038
2206
|
return {
|
|
2039
2207
|
createText,
|
|
@@ -2063,6 +2231,65 @@ function buildFormSubmitWithTranslations(options, translations) {
|
|
|
2063
2231
|
};
|
|
2064
2232
|
}
|
|
2065
2233
|
|
|
2234
|
+
function createPermissionCheckerReactiveFn(ctx = {}) {
|
|
2235
|
+
let store;
|
|
2236
|
+
if (ctx.store) {
|
|
2237
|
+
store = ctx.store;
|
|
2238
|
+
} else {
|
|
2239
|
+
store = useStore(ctx.pinia, ctx.app);
|
|
2240
|
+
}
|
|
2241
|
+
const storeRefs = storeToRefs(store);
|
|
2242
|
+
return (ctx)=>{
|
|
2243
|
+
const data = vue.ref(false);
|
|
2244
|
+
let computePromise;
|
|
2245
|
+
const compute = async ()=>{
|
|
2246
|
+
if (computePromise) {
|
|
2247
|
+
return computePromise;
|
|
2248
|
+
}
|
|
2249
|
+
let identity;
|
|
2250
|
+
if (storeRefs.userId.value) {
|
|
2251
|
+
identity = {
|
|
2252
|
+
type: 'user',
|
|
2253
|
+
id: storeRefs.userId.value
|
|
2254
|
+
};
|
|
2255
|
+
}
|
|
2256
|
+
let outcome;
|
|
2257
|
+
try {
|
|
2258
|
+
computePromise = store.permissionChecker.preCheckOneOf({
|
|
2259
|
+
...ctx,
|
|
2260
|
+
data: {
|
|
2261
|
+
...ctx.data || {},
|
|
2262
|
+
identity
|
|
2263
|
+
}
|
|
2264
|
+
}).then(()=>true).catch(()=>false);
|
|
2265
|
+
outcome = await computePromise;
|
|
2266
|
+
} catch (e) {
|
|
2267
|
+
outcome = false;
|
|
2268
|
+
} finally{
|
|
2269
|
+
computePromise = undefined;
|
|
2270
|
+
}
|
|
2271
|
+
return outcome;
|
|
2272
|
+
};
|
|
2273
|
+
Promise.resolve().then(()=>compute()).then((outcome)=>{
|
|
2274
|
+
data.value = outcome;
|
|
2275
|
+
});
|
|
2276
|
+
let removeListener;
|
|
2277
|
+
vue.onMounted(()=>{
|
|
2278
|
+
removeListener = vue.watch(storeRefs.loggedIn, ()=>{
|
|
2279
|
+
Promise.resolve().then(()=>compute()).then((outcome)=>{
|
|
2280
|
+
data.value = outcome;
|
|
2281
|
+
});
|
|
2282
|
+
});
|
|
2283
|
+
});
|
|
2284
|
+
vue.onUnmounted(()=>{
|
|
2285
|
+
if (typeof removeListener !== 'undefined') {
|
|
2286
|
+
removeListener();
|
|
2287
|
+
}
|
|
2288
|
+
});
|
|
2289
|
+
return data;
|
|
2290
|
+
};
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2066
2293
|
const AClient = vue.defineComponent({
|
|
2067
2294
|
props: defineEntityManagerProps(),
|
|
2068
2295
|
emits: defineEntityManagerEvents(),
|
|
@@ -2110,55 +2337,9 @@ function useUpdatedAt(input) {
|
|
|
2110
2337
|
});
|
|
2111
2338
|
}
|
|
2112
2339
|
|
|
2113
|
-
function
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2116
|
-
const data = vue.ref(false);
|
|
2117
|
-
let computePromise;
|
|
2118
|
-
const compute = async ()=>{
|
|
2119
|
-
if (computePromise) {
|
|
2120
|
-
return computePromise;
|
|
2121
|
-
}
|
|
2122
|
-
let identity;
|
|
2123
|
-
if (refs.userId.value) {
|
|
2124
|
-
identity = {
|
|
2125
|
-
type: 'user',
|
|
2126
|
-
id: refs.userId.value
|
|
2127
|
-
};
|
|
2128
|
-
}
|
|
2129
|
-
let outcome;
|
|
2130
|
-
try {
|
|
2131
|
-
computePromise = store.permissionChecker.preCheck({
|
|
2132
|
-
name,
|
|
2133
|
-
data: {
|
|
2134
|
-
identity
|
|
2135
|
-
}
|
|
2136
|
-
}).then(()=>true).catch(()=>false);
|
|
2137
|
-
outcome = await computePromise;
|
|
2138
|
-
} catch (e) {
|
|
2139
|
-
outcome = false;
|
|
2140
|
-
} finally{
|
|
2141
|
-
computePromise = undefined;
|
|
2142
|
-
}
|
|
2143
|
-
return outcome;
|
|
2144
|
-
};
|
|
2145
|
-
Promise.resolve().then(()=>compute()).then((outcome)=>{
|
|
2146
|
-
data.value = outcome;
|
|
2147
|
-
});
|
|
2148
|
-
let removeListener;
|
|
2149
|
-
vue.onMounted(()=>{
|
|
2150
|
-
removeListener = vue.watch(refs.loggedIn, ()=>{
|
|
2151
|
-
Promise.resolve().then(()=>compute()).then((outcome)=>{
|
|
2152
|
-
data.value = outcome;
|
|
2153
|
-
});
|
|
2154
|
-
});
|
|
2155
|
-
});
|
|
2156
|
-
vue.onUnmounted(()=>{
|
|
2157
|
-
if (typeof removeListener !== 'undefined') {
|
|
2158
|
-
removeListener();
|
|
2159
|
-
}
|
|
2160
|
-
});
|
|
2161
|
-
return data;
|
|
2340
|
+
function usePermissionCheck(ctx) {
|
|
2341
|
+
const checkFn = createPermissionCheckerReactiveFn();
|
|
2342
|
+
return checkFn(ctx);
|
|
2162
2343
|
}
|
|
2163
2344
|
|
|
2164
2345
|
function useRealmResourceWritableCheck(realmId) {
|
|
@@ -2252,18 +2433,18 @@ const ARealmForm = vue.defineComponent({
|
|
|
2252
2433
|
};
|
|
2253
2434
|
const translationsValidation = useTranslationsForNestedValidation($v.value);
|
|
2254
2435
|
const translationsSubmit = createFormSubmitTranslations();
|
|
2255
|
-
const translationsDefault = useTranslationsForGroup(
|
|
2436
|
+
const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
|
|
2256
2437
|
{
|
|
2257
|
-
key:
|
|
2438
|
+
key: TranslatorTranslationDefaultKey.GENERATE
|
|
2258
2439
|
},
|
|
2259
2440
|
{
|
|
2260
|
-
key:
|
|
2441
|
+
key: TranslatorTranslationDefaultKey.NAME
|
|
2261
2442
|
},
|
|
2262
2443
|
{
|
|
2263
|
-
key:
|
|
2444
|
+
key: TranslatorTranslationDefaultKey.DISPLAY_NAME
|
|
2264
2445
|
},
|
|
2265
2446
|
{
|
|
2266
|
-
key:
|
|
2447
|
+
key: TranslatorTranslationDefaultKey.DESCRIPTION
|
|
2267
2448
|
}
|
|
2268
2449
|
]);
|
|
2269
2450
|
const render = ()=>{
|
|
@@ -2272,7 +2453,7 @@ const ARealmForm = vue.defineComponent({
|
|
|
2272
2453
|
validationMessages: translationsValidation.name.value,
|
|
2273
2454
|
validationSeverity: getVuelidateSeverity($v.value.name),
|
|
2274
2455
|
label: true,
|
|
2275
|
-
labelContent: translationsDefault[
|
|
2456
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.NAME].value,
|
|
2276
2457
|
content: formControls.buildFormInput({
|
|
2277
2458
|
value: $v.value.name.$model,
|
|
2278
2459
|
onChange (input) {
|
|
@@ -2305,7 +2486,7 @@ const ARealmForm = vue.defineComponent({
|
|
|
2305
2486
|
class: 'fa fa-wrench'
|
|
2306
2487
|
}),
|
|
2307
2488
|
' ',
|
|
2308
|
-
translationsDefault[
|
|
2489
|
+
translationsDefault[TranslatorTranslationDefaultKey.GENERATE].value
|
|
2309
2490
|
])
|
|
2310
2491
|
])
|
|
2311
2492
|
]);
|
|
@@ -2314,7 +2495,7 @@ const ARealmForm = vue.defineComponent({
|
|
|
2314
2495
|
validationMessages: translationsValidation.display_name.value,
|
|
2315
2496
|
validationSeverity: getVuelidateSeverity($v.value.display_name),
|
|
2316
2497
|
label: true,
|
|
2317
|
-
labelContent: translationsDefault[
|
|
2498
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DISPLAY_NAME].value,
|
|
2318
2499
|
content: formControls.buildFormInput({
|
|
2319
2500
|
value: $v.value.display_name.$model,
|
|
2320
2501
|
onChange (input) {
|
|
@@ -2326,7 +2507,7 @@ const ARealmForm = vue.defineComponent({
|
|
|
2326
2507
|
validationMessages: translationsValidation.description.value,
|
|
2327
2508
|
validationSeverity: getVuelidateSeverity($v.value.description),
|
|
2328
2509
|
label: true,
|
|
2329
|
-
labelContent: translationsDefault[
|
|
2510
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DESCRIPTION].value,
|
|
2330
2511
|
content: formControls.buildFormTextarea({
|
|
2331
2512
|
value: $v.value.description.$model,
|
|
2332
2513
|
onChange (input) {
|
|
@@ -2365,12 +2546,12 @@ const ARealms = vue.defineComponent({
|
|
|
2365
2546
|
setup: ctx
|
|
2366
2547
|
});
|
|
2367
2548
|
const translationsName = useTranslation({
|
|
2368
|
-
group:
|
|
2369
|
-
key:
|
|
2549
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
2550
|
+
key: TranslatorTranslationDefaultKey.REALMS
|
|
2370
2551
|
});
|
|
2371
2552
|
const translation = useTranslation({
|
|
2372
|
-
group:
|
|
2373
|
-
key:
|
|
2553
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
2554
|
+
key: TranslatorTranslationVuecsKey.NO_MORE,
|
|
2374
2555
|
data: {
|
|
2375
2556
|
name: translationsName
|
|
2376
2557
|
}
|
|
@@ -2469,8 +2650,8 @@ const AClientRedirectUris = vue.defineComponent({
|
|
|
2469
2650
|
return lastEl && lastEl.trim() !== '';
|
|
2470
2651
|
});
|
|
2471
2652
|
const addTranslation = useTranslation({
|
|
2472
|
-
group:
|
|
2473
|
-
key:
|
|
2653
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
2654
|
+
key: TranslatorTranslationDefaultKey.ADD
|
|
2474
2655
|
});
|
|
2475
2656
|
const render = ()=>{
|
|
2476
2657
|
const elements = items.value.map((item, index)=>vue.h(AClientRedirectUrisItem, {
|
|
@@ -2541,7 +2722,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2541
2722
|
const $v = useVuelidate({
|
|
2542
2723
|
name: {
|
|
2543
2724
|
required: validators.required,
|
|
2544
|
-
[
|
|
2725
|
+
[VuelidateCustomRuleKey.ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE]: VuelidateCustomRule[VuelidateCustomRuleKey.ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE],
|
|
2545
2726
|
minLength: validators.minLength(3),
|
|
2546
2727
|
maxLength: validators.maxLength(256)
|
|
2547
2728
|
},
|
|
@@ -2605,41 +2786,41 @@ const AClientForm = vue.defineComponent({
|
|
|
2605
2786
|
};
|
|
2606
2787
|
const translationsValidation = useTranslationsForNestedValidation($v.value);
|
|
2607
2788
|
const translationsSubmit = createFormSubmitTranslations();
|
|
2608
|
-
const translationsClient = useTranslationsForGroup(
|
|
2789
|
+
const translationsClient = useTranslationsForGroup(TranslatorTranslationGroup.CLIENT, [
|
|
2609
2790
|
{
|
|
2610
|
-
key:
|
|
2791
|
+
key: TranslatorTranslationClientKey.NAME_HINT
|
|
2611
2792
|
},
|
|
2612
2793
|
{
|
|
2613
|
-
key:
|
|
2794
|
+
key: TranslatorTranslationClientKey.DESCRIPTION_HINT
|
|
2614
2795
|
},
|
|
2615
2796
|
{
|
|
2616
|
-
key:
|
|
2797
|
+
key: TranslatorTranslationClientKey.REDIRECT_URI_HINT
|
|
2617
2798
|
},
|
|
2618
2799
|
{
|
|
2619
|
-
key:
|
|
2800
|
+
key: TranslatorTranslationClientKey.IS_CONFIDENTIAL
|
|
2620
2801
|
}
|
|
2621
2802
|
]);
|
|
2622
|
-
const translationsDefault = useTranslationsForGroup(
|
|
2803
|
+
const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
|
|
2623
2804
|
{
|
|
2624
|
-
key:
|
|
2805
|
+
key: TranslatorTranslationDefaultKey.GENERATE
|
|
2625
2806
|
},
|
|
2626
2807
|
{
|
|
2627
|
-
key:
|
|
2808
|
+
key: TranslatorTranslationDefaultKey.NAME
|
|
2628
2809
|
},
|
|
2629
2810
|
{
|
|
2630
|
-
key:
|
|
2811
|
+
key: TranslatorTranslationDefaultKey.DISPLAY_NAME
|
|
2631
2812
|
},
|
|
2632
2813
|
{
|
|
2633
|
-
key:
|
|
2814
|
+
key: TranslatorTranslationDefaultKey.DESCRIPTION
|
|
2634
2815
|
},
|
|
2635
2816
|
{
|
|
2636
|
-
key:
|
|
2817
|
+
key: TranslatorTranslationDefaultKey.REALM
|
|
2637
2818
|
},
|
|
2638
2819
|
{
|
|
2639
|
-
key:
|
|
2820
|
+
key: TranslatorTranslationDefaultKey.REDIRECT_URIS
|
|
2640
2821
|
},
|
|
2641
2822
|
{
|
|
2642
|
-
key:
|
|
2823
|
+
key: TranslatorTranslationDefaultKey.SECRET
|
|
2643
2824
|
}
|
|
2644
2825
|
]);
|
|
2645
2826
|
const render = ()=>{
|
|
@@ -2648,7 +2829,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2648
2829
|
validationMessages: translationsValidation.name.value,
|
|
2649
2830
|
validationSeverity: getVuelidateSeverity($v.value.name),
|
|
2650
2831
|
label: true,
|
|
2651
|
-
labelContent: translationsDefault[
|
|
2832
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.NAME].value,
|
|
2652
2833
|
content: formControls.buildFormInput({
|
|
2653
2834
|
value: $v.value.name.$model,
|
|
2654
2835
|
onChange (input) {
|
|
@@ -2659,13 +2840,13 @@ const AClientForm = vue.defineComponent({
|
|
|
2659
2840
|
}
|
|
2660
2841
|
})
|
|
2661
2842
|
}),
|
|
2662
|
-
vue.h('small', translationsClient[
|
|
2843
|
+
vue.h('small', translationsClient[TranslatorTranslationClientKey.NAME_HINT].value)
|
|
2663
2844
|
];
|
|
2664
2845
|
const displayName = formControls.buildFormGroup({
|
|
2665
2846
|
validationMessages: translationsValidation.display_name.value,
|
|
2666
2847
|
validationSeverity: getVuelidateSeverity($v.value.display_name),
|
|
2667
2848
|
label: true,
|
|
2668
|
-
labelContent: translationsDefault[
|
|
2849
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DISPLAY_NAME].value,
|
|
2669
2850
|
content: formControls.buildFormInput({
|
|
2670
2851
|
value: $v.value.display_name.$model,
|
|
2671
2852
|
onChange (input) {
|
|
@@ -2679,7 +2860,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2679
2860
|
validationMessages: translationsValidation.description.value,
|
|
2680
2861
|
validationSeverity: getVuelidateSeverity($v.value.description),
|
|
2681
2862
|
label: true,
|
|
2682
|
-
labelContent: translationsDefault[
|
|
2863
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DESCRIPTION].value,
|
|
2683
2864
|
content: formControls.buildFormTextarea({
|
|
2684
2865
|
value: $v.value.description.$model,
|
|
2685
2866
|
onChange (input) {
|
|
@@ -2690,7 +2871,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2690
2871
|
}
|
|
2691
2872
|
})
|
|
2692
2873
|
}),
|
|
2693
|
-
vue.h('small', translationsClient[
|
|
2874
|
+
vue.h('small', translationsClient[TranslatorTranslationClientKey.DESCRIPTION_HINT].value)
|
|
2694
2875
|
])
|
|
2695
2876
|
];
|
|
2696
2877
|
const redirectUri = [
|
|
@@ -2698,7 +2879,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2698
2879
|
vue.h('label', {
|
|
2699
2880
|
class: 'form-label'
|
|
2700
2881
|
}, [
|
|
2701
|
-
translationsDefault[
|
|
2882
|
+
translationsDefault[TranslatorTranslationDefaultKey.REDIRECT_URIS].value
|
|
2702
2883
|
]),
|
|
2703
2884
|
vue.h(AClientRedirectUris, {
|
|
2704
2885
|
uri: form.redirect_uri,
|
|
@@ -2706,7 +2887,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2706
2887
|
form.redirect_uri = value;
|
|
2707
2888
|
}
|
|
2708
2889
|
}),
|
|
2709
|
-
vue.h('small', translationsClient[
|
|
2890
|
+
vue.h('small', translationsClient[TranslatorTranslationClientKey.REDIRECT_URI_HINT].value)
|
|
2710
2891
|
])
|
|
2711
2892
|
];
|
|
2712
2893
|
const isConfidential = formControls.buildFormGroup({
|
|
@@ -2714,7 +2895,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2714
2895
|
validationSeverity: getVuelidateSeverity($v.value.is_confidential),
|
|
2715
2896
|
content: formControls.buildFormInputCheckbox({
|
|
2716
2897
|
groupClass: 'form-switch mt-3',
|
|
2717
|
-
labelContent: translationsClient[
|
|
2898
|
+
labelContent: translationsClient[TranslatorTranslationClientKey.IS_CONFIDENTIAL].value,
|
|
2718
2899
|
value: $v.value.is_confidential.$model,
|
|
2719
2900
|
onChange (input) {
|
|
2720
2901
|
$v.value.is_confidential.$model = input;
|
|
@@ -2742,7 +2923,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2742
2923
|
validationMessages: translationsValidation.secret.value,
|
|
2743
2924
|
validationSeverity: getVuelidateSeverity($v.value.secret),
|
|
2744
2925
|
label: true,
|
|
2745
|
-
labelContent: translationsDefault[
|
|
2926
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.SECRET].value,
|
|
2746
2927
|
content: formControls.buildFormInput({
|
|
2747
2928
|
value: $v.value.secret.$model,
|
|
2748
2929
|
onChange (input) {
|
|
@@ -2764,7 +2945,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2764
2945
|
class: 'fa fa-wrench'
|
|
2765
2946
|
}),
|
|
2766
2947
|
' ',
|
|
2767
|
-
translationsDefault[
|
|
2948
|
+
translationsDefault[TranslatorTranslationDefaultKey.GENERATE].value
|
|
2768
2949
|
])
|
|
2769
2950
|
])
|
|
2770
2951
|
];
|
|
@@ -2780,7 +2961,7 @@ const AClientForm = vue.defineComponent({
|
|
|
2780
2961
|
vue.h('hr'),
|
|
2781
2962
|
vue.h('label', {
|
|
2782
2963
|
class: 'form-label'
|
|
2783
|
-
}, translationsDefault[
|
|
2964
|
+
}, translationsDefault[TranslatorTranslationDefaultKey.REALM].value),
|
|
2784
2965
|
vue.h(ARealms, {
|
|
2785
2966
|
headerTitle: false
|
|
2786
2967
|
}, {
|
|
@@ -2849,12 +3030,12 @@ const AClients = vue.defineComponent({
|
|
|
2849
3030
|
setup: ctx
|
|
2850
3031
|
});
|
|
2851
3032
|
const translationName = useTranslation({
|
|
2852
|
-
group:
|
|
2853
|
-
key:
|
|
3033
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
3034
|
+
key: TranslatorTranslationDefaultKey.CLIENTS
|
|
2854
3035
|
});
|
|
2855
3036
|
const translation = useTranslation({
|
|
2856
|
-
group:
|
|
2857
|
-
key:
|
|
3037
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
3038
|
+
key: TranslatorTranslationVuecsKey.NO_MORE,
|
|
2858
3039
|
data: {
|
|
2859
3040
|
name: translationName
|
|
2860
3041
|
}
|
|
@@ -2897,12 +3078,12 @@ const AClientScopes = vue.defineComponent({
|
|
|
2897
3078
|
setup: ctx
|
|
2898
3079
|
});
|
|
2899
3080
|
const translationClientScopes = useTranslation({
|
|
2900
|
-
group:
|
|
2901
|
-
key:
|
|
3081
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
3082
|
+
key: TranslatorTranslationDefaultKey.CLIENT_SCOPES
|
|
2902
3083
|
});
|
|
2903
3084
|
const translation = useTranslation({
|
|
2904
|
-
group:
|
|
2905
|
-
key:
|
|
3085
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
3086
|
+
key: TranslatorTranslationVuecsKey.NO_MORE,
|
|
2906
3087
|
data: {
|
|
2907
3088
|
name: translationClientScopes
|
|
2908
3089
|
}
|
|
@@ -2956,7 +3137,7 @@ const AScopeForm = vue.defineComponent({
|
|
|
2956
3137
|
const $v = useVuelidate({
|
|
2957
3138
|
name: {
|
|
2958
3139
|
required: validators.required,
|
|
2959
|
-
[
|
|
3140
|
+
[VuelidateCustomRuleKey.ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE]: VuelidateCustomRule[VuelidateCustomRuleKey.ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE],
|
|
2960
3141
|
minLength: validators.minLength(3),
|
|
2961
3142
|
maxLength: validators.maxLength(256)
|
|
2962
3143
|
},
|
|
@@ -3012,18 +3193,18 @@ const AScopeForm = vue.defineComponent({
|
|
|
3012
3193
|
};
|
|
3013
3194
|
const translationsValidation = useTranslationsForNestedValidation($v.value);
|
|
3014
3195
|
const translationsSubmit = createFormSubmitTranslations();
|
|
3015
|
-
const translationsDefault = useTranslationsForGroup(
|
|
3196
|
+
const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
|
|
3016
3197
|
{
|
|
3017
|
-
key:
|
|
3198
|
+
key: TranslatorTranslationDefaultKey.NAME
|
|
3018
3199
|
},
|
|
3019
3200
|
{
|
|
3020
|
-
key:
|
|
3201
|
+
key: TranslatorTranslationDefaultKey.DISPLAY_NAME
|
|
3021
3202
|
},
|
|
3022
3203
|
{
|
|
3023
|
-
key:
|
|
3204
|
+
key: TranslatorTranslationDefaultKey.DESCRIPTION
|
|
3024
3205
|
},
|
|
3025
3206
|
{
|
|
3026
|
-
key:
|
|
3207
|
+
key: TranslatorTranslationDefaultKey.REALM
|
|
3027
3208
|
}
|
|
3028
3209
|
]);
|
|
3029
3210
|
return ()=>{
|
|
@@ -3032,7 +3213,7 @@ const AScopeForm = vue.defineComponent({
|
|
|
3032
3213
|
validationMessages: translationsValidation.name.value,
|
|
3033
3214
|
validationSeverity: getVuelidateSeverity($v.value.name),
|
|
3034
3215
|
label: true,
|
|
3035
|
-
labelContent: translationsDefault[
|
|
3216
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.NAME].value,
|
|
3036
3217
|
content: formControls.buildFormInput({
|
|
3037
3218
|
value: $v.value.name.$model,
|
|
3038
3219
|
onChange (input) {
|
|
@@ -3047,7 +3228,7 @@ const AScopeForm = vue.defineComponent({
|
|
|
3047
3228
|
validationMessages: translationsValidation.display_name.value,
|
|
3048
3229
|
validationSeverity: getVuelidateSeverity($v.value.display_name),
|
|
3049
3230
|
label: true,
|
|
3050
|
-
labelContent: translationsDefault[
|
|
3231
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DISPLAY_NAME].value,
|
|
3051
3232
|
content: formControls.buildFormInput({
|
|
3052
3233
|
value: $v.value.display_name.$model,
|
|
3053
3234
|
onChange (input) {
|
|
@@ -3059,7 +3240,7 @@ const AScopeForm = vue.defineComponent({
|
|
|
3059
3240
|
validationMessages: translationsValidation.description.value,
|
|
3060
3241
|
validationSeverity: getVuelidateSeverity($v.value.description),
|
|
3061
3242
|
label: true,
|
|
3062
|
-
labelContent: translationsDefault[
|
|
3243
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DESCRIPTION].value,
|
|
3063
3244
|
content: formControls.buildFormTextarea({
|
|
3064
3245
|
value: $v.value.description.$model,
|
|
3065
3246
|
onChange (input) {
|
|
@@ -3101,12 +3282,12 @@ const AScopes = vue.defineComponent({
|
|
|
3101
3282
|
setup: ctx
|
|
3102
3283
|
});
|
|
3103
3284
|
const translationName = useTranslation({
|
|
3104
|
-
group:
|
|
3105
|
-
key:
|
|
3285
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
3286
|
+
key: TranslatorTranslationDefaultKey.SCOPES
|
|
3106
3287
|
});
|
|
3107
3288
|
const translation = useTranslation({
|
|
3108
|
-
group:
|
|
3109
|
-
key:
|
|
3289
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
3290
|
+
key: TranslatorTranslationVuecsKey.NO_MORE,
|
|
3110
3291
|
data: {
|
|
3111
3292
|
name: translationName
|
|
3112
3293
|
}
|
|
@@ -3240,7 +3421,7 @@ const AIdentityProviderBasicFields = vue.defineComponent({
|
|
|
3240
3421
|
},
|
|
3241
3422
|
slug: {
|
|
3242
3423
|
required: validators.required,
|
|
3243
|
-
[
|
|
3424
|
+
[VuelidateCustomRuleKey.ALPHA_NUM_HYPHEN_UNDERSCORE]: VuelidateCustomRule[VuelidateCustomRuleKey.ALPHA_NUM_HYPHEN_UNDERSCORE],
|
|
3244
3425
|
minLength: validators.minLength(3),
|
|
3245
3426
|
maxLength: validators.maxLength(36)
|
|
3246
3427
|
},
|
|
@@ -3277,15 +3458,15 @@ const AIdentityProviderBasicFields = vue.defineComponent({
|
|
|
3277
3458
|
const updatedAt = useUpdatedAt(props.entity);
|
|
3278
3459
|
onChange(updatedAt, ()=>assign(props.entity));
|
|
3279
3460
|
assign(props.entity);
|
|
3280
|
-
const translationsDefault = useTranslationsForGroup(
|
|
3461
|
+
const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
|
|
3281
3462
|
{
|
|
3282
|
-
key:
|
|
3463
|
+
key: TranslatorTranslationDefaultKey.DISPLAY_NAME
|
|
3283
3464
|
},
|
|
3284
3465
|
{
|
|
3285
|
-
key:
|
|
3466
|
+
key: TranslatorTranslationDefaultKey.NAME
|
|
3286
3467
|
},
|
|
3287
3468
|
{
|
|
3288
|
-
key:
|
|
3469
|
+
key: TranslatorTranslationDefaultKey.DESCRIPTION
|
|
3289
3470
|
}
|
|
3290
3471
|
]);
|
|
3291
3472
|
const translationsValidation = useTranslationsForNestedValidation($v.value);
|
|
@@ -3294,7 +3475,7 @@ const AIdentityProviderBasicFields = vue.defineComponent({
|
|
|
3294
3475
|
validationMessages: translationsValidation.name.value,
|
|
3295
3476
|
validationSeverity: getVuelidateSeverity($v.value.name),
|
|
3296
3477
|
label: true,
|
|
3297
|
-
labelContent: translationsDefault[
|
|
3478
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.NAME].value,
|
|
3298
3479
|
content: formControls.buildFormInput({
|
|
3299
3480
|
value: $v.value.name.$model,
|
|
3300
3481
|
onChange (input) {
|
|
@@ -3306,7 +3487,7 @@ const AIdentityProviderBasicFields = vue.defineComponent({
|
|
|
3306
3487
|
validationMessages: translationsValidation.display_name.value,
|
|
3307
3488
|
validationSeverity: getVuelidateSeverity($v.value.display_name),
|
|
3308
3489
|
label: true,
|
|
3309
|
-
labelContent: translationsDefault[
|
|
3490
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DISPLAY_NAME].value,
|
|
3310
3491
|
content: formControls.buildFormInput({
|
|
3311
3492
|
value: $v.value.display_name.$model,
|
|
3312
3493
|
onChange (input) {
|
|
@@ -4034,7 +4215,11 @@ const AIdentityProviderPreset = vue.defineComponent({
|
|
|
4034
4215
|
}
|
|
4035
4216
|
});
|
|
4036
4217
|
|
|
4037
|
-
|
|
4218
|
+
var _sfc_main = vue.defineComponent({
|
|
4219
|
+
components: {
|
|
4220
|
+
AIdentityProviderPreset,
|
|
4221
|
+
AIdentityProviderProtocol
|
|
4222
|
+
},
|
|
4038
4223
|
props: {
|
|
4039
4224
|
protocol: {
|
|
4040
4225
|
type: String
|
|
@@ -4047,113 +4232,139 @@ const AIdentityProviderPicker = vue.defineComponent({
|
|
|
4047
4232
|
'pick'
|
|
4048
4233
|
],
|
|
4049
4234
|
setup (props, setup) {
|
|
4050
|
-
const protocols =
|
|
4051
|
-
const presets =
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
id
|
|
4055
|
-
});
|
|
4056
|
-
return id;
|
|
4057
|
-
});
|
|
4058
|
-
Object.values(coreKit.IdentityProviderPreset).map((id)=>{
|
|
4059
|
-
presets.push({
|
|
4060
|
-
id
|
|
4061
|
-
});
|
|
4062
|
-
return id;
|
|
4063
|
-
});
|
|
4064
|
-
const pick = (ctx)=>{
|
|
4065
|
-
setup.emit('pick', ctx);
|
|
4235
|
+
const protocols = Object.values(coreKit.IdentityProviderProtocol);
|
|
4236
|
+
const presets = Object.values(coreKit.IdentityProviderPreset);
|
|
4237
|
+
const pickProtocol = (protocol)=>{
|
|
4238
|
+
setup.emit('pick', 'protocol', protocol);
|
|
4066
4239
|
};
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
item: {
|
|
4076
|
-
class: [
|
|
4077
|
-
'me-1 list-item'
|
|
4078
|
-
],
|
|
4079
|
-
icon: false,
|
|
4080
|
-
content: (item)=>vue.h(AIdentityProviderProtocol, {
|
|
4081
|
-
id: item.id
|
|
4082
|
-
}, {
|
|
4083
|
-
default: (element)=>[
|
|
4084
|
-
vue.h('i', {
|
|
4085
|
-
class: [
|
|
4086
|
-
element.icon,
|
|
4087
|
-
'pe-1'
|
|
4088
|
-
]
|
|
4089
|
-
}),
|
|
4090
|
-
element.name,
|
|
4091
|
-
vue.h('button', {
|
|
4092
|
-
class: 'btn btn-xs btn-dark ms-1',
|
|
4093
|
-
onClick ($event) {
|
|
4094
|
-
$event.preventDefault();
|
|
4095
|
-
pick({
|
|
4096
|
-
protocol: item.id
|
|
4097
|
-
});
|
|
4098
|
-
}
|
|
4099
|
-
}, [
|
|
4100
|
-
vue.h('i', {
|
|
4101
|
-
class: 'fa fa-plus'
|
|
4102
|
-
})
|
|
4103
|
-
])
|
|
4104
|
-
]
|
|
4105
|
-
})
|
|
4106
|
-
}
|
|
4107
|
-
}
|
|
4108
|
-
});
|
|
4109
|
-
const protocolNodeConfigurationNode = listControls.buildList({
|
|
4110
|
-
data: presets,
|
|
4111
|
-
header: {
|
|
4112
|
-
content: vue.h('h6', 'Presets')
|
|
4113
|
-
},
|
|
4114
|
-
body: {
|
|
4115
|
-
class: 'd-flex flex-row',
|
|
4116
|
-
item: {
|
|
4117
|
-
class: 'me-1 list-item',
|
|
4118
|
-
icon: false,
|
|
4119
|
-
content: (preset)=>vue.h(AIdentityProviderPreset, {
|
|
4120
|
-
id: preset.id
|
|
4121
|
-
}, {
|
|
4122
|
-
default: (item)=>vue.h('div', [
|
|
4123
|
-
vue.h('i', {
|
|
4124
|
-
class: [
|
|
4125
|
-
item.icon,
|
|
4126
|
-
'pe-1'
|
|
4127
|
-
]
|
|
4128
|
-
}),
|
|
4129
|
-
item.name,
|
|
4130
|
-
vue.h('button', {
|
|
4131
|
-
class: 'btn btn-xs btn-dark ms-1',
|
|
4132
|
-
onClick ($event) {
|
|
4133
|
-
$event.preventDefault();
|
|
4134
|
-
pick({
|
|
4135
|
-
preset: preset.id,
|
|
4136
|
-
protocol: coreKit.getIdentityProviderProtocolForPreset(preset.id)
|
|
4137
|
-
});
|
|
4138
|
-
}
|
|
4139
|
-
}, [
|
|
4140
|
-
vue.h('i', {
|
|
4141
|
-
class: 'fa fa-plus'
|
|
4142
|
-
})
|
|
4143
|
-
])
|
|
4144
|
-
])
|
|
4145
|
-
})
|
|
4146
|
-
}
|
|
4147
|
-
}
|
|
4148
|
-
});
|
|
4149
|
-
return [
|
|
4150
|
-
protocolNode,
|
|
4151
|
-
protocolNodeConfigurationNode
|
|
4152
|
-
];
|
|
4240
|
+
const pickPreset = (preset)=>{
|
|
4241
|
+
setup.emit('pick', 'preset', preset);
|
|
4242
|
+
};
|
|
4243
|
+
return {
|
|
4244
|
+
protocols,
|
|
4245
|
+
presets,
|
|
4246
|
+
pickProtocol,
|
|
4247
|
+
pickPreset
|
|
4153
4248
|
};
|
|
4154
4249
|
}
|
|
4155
4250
|
});
|
|
4156
4251
|
|
|
4252
|
+
var _export_sfc = (sfc, props) => {
|
|
4253
|
+
const target = sfc.__vccOpts || sfc;
|
|
4254
|
+
for (const [key, val] of props) {
|
|
4255
|
+
target[key] = val;
|
|
4256
|
+
}
|
|
4257
|
+
return target;
|
|
4258
|
+
};
|
|
4259
|
+
|
|
4260
|
+
const _hoisted_1 = {
|
|
4261
|
+
class: "d-flex flex-column gap-2"
|
|
4262
|
+
};
|
|
4263
|
+
const _hoisted_2 = {
|
|
4264
|
+
class: "d-flex flex-row gap-2 flex-wrap"
|
|
4265
|
+
};
|
|
4266
|
+
const _hoisted_3 = [
|
|
4267
|
+
"onClick"
|
|
4268
|
+
];
|
|
4269
|
+
const _hoisted_4 = {
|
|
4270
|
+
class: "d-flex flex-row gap-2 flex-wrap"
|
|
4271
|
+
};
|
|
4272
|
+
const _hoisted_5 = [
|
|
4273
|
+
"onClick"
|
|
4274
|
+
];
|
|
4275
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4276
|
+
const _component_AIdentityProviderProtocol = vue.resolveComponent("AIdentityProviderProtocol");
|
|
4277
|
+
const _component_AIdentityProviderPreset = vue.resolveComponent("AIdentityProviderPreset");
|
|
4278
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
4279
|
+
vue.createElementVNode("div", null, [
|
|
4280
|
+
_cache[0] || (_cache[0] = vue.createElementVNode("h6", null, "Protocols", -1)),
|
|
4281
|
+
vue.createElementVNode("div", _hoisted_2, [
|
|
4282
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.protocols, (item, key)=>{
|
|
4283
|
+
return vue.openBlock(), vue.createBlock(_component_AIdentityProviderProtocol, {
|
|
4284
|
+
key,
|
|
4285
|
+
id: item
|
|
4286
|
+
}, {
|
|
4287
|
+
default: vue.withCtx((props)=>[
|
|
4288
|
+
vue.createElementVNode("div", {
|
|
4289
|
+
class: vue.normalizeClass([
|
|
4290
|
+
{
|
|
4291
|
+
"active": item === _ctx.protocol && !_ctx.preset
|
|
4292
|
+
},
|
|
4293
|
+
"d-flex flex-column gap-1 text-center identity-provider-picker-item"
|
|
4294
|
+
]),
|
|
4295
|
+
onClick: vue.withModifiers(($event)=>_ctx.pickProtocol(item), [
|
|
4296
|
+
"prevent"
|
|
4297
|
+
])
|
|
4298
|
+
}, [
|
|
4299
|
+
vue.createElementVNode("div", null, [
|
|
4300
|
+
vue.createElementVNode("i", {
|
|
4301
|
+
class: vue.normalizeClass([
|
|
4302
|
+
"fa-2x",
|
|
4303
|
+
props.icon
|
|
4304
|
+
])
|
|
4305
|
+
}, null, 2)
|
|
4306
|
+
]),
|
|
4307
|
+
vue.createElementVNode("div", null, vue.toDisplayString(props.name), 1)
|
|
4308
|
+
], 10, _hoisted_3)
|
|
4309
|
+
]),
|
|
4310
|
+
_: 2
|
|
4311
|
+
}, 1032, [
|
|
4312
|
+
"id"
|
|
4313
|
+
]);
|
|
4314
|
+
}), 128))
|
|
4315
|
+
])
|
|
4316
|
+
]),
|
|
4317
|
+
vue.createElementVNode("div", null, [
|
|
4318
|
+
_cache[1] || (_cache[1] = vue.createElementVNode("h6", null, "Presets", -1)),
|
|
4319
|
+
vue.createElementVNode("div", _hoisted_4, [
|
|
4320
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(_ctx.presets, (item, key)=>{
|
|
4321
|
+
return vue.openBlock(), vue.createBlock(_component_AIdentityProviderPreset, {
|
|
4322
|
+
key,
|
|
4323
|
+
id: item
|
|
4324
|
+
}, {
|
|
4325
|
+
default: vue.withCtx((props)=>[
|
|
4326
|
+
vue.createElementVNode("div", {
|
|
4327
|
+
class: vue.normalizeClass([
|
|
4328
|
+
{
|
|
4329
|
+
"active": item === _ctx.preset
|
|
4330
|
+
},
|
|
4331
|
+
"d-flex flex-column gap-1 text-center identity-provider-picker-item"
|
|
4332
|
+
]),
|
|
4333
|
+
onClick: vue.withModifiers(($event)=>_ctx.pickPreset(item), [
|
|
4334
|
+
"prevent"
|
|
4335
|
+
])
|
|
4336
|
+
}, [
|
|
4337
|
+
vue.createElementVNode("div", null, [
|
|
4338
|
+
vue.createElementVNode("i", {
|
|
4339
|
+
class: vue.normalizeClass([
|
|
4340
|
+
"fa-2x",
|
|
4341
|
+
props.icon
|
|
4342
|
+
])
|
|
4343
|
+
}, null, 2)
|
|
4344
|
+
]),
|
|
4345
|
+
vue.createElementVNode("div", null, vue.toDisplayString(props.name), 1)
|
|
4346
|
+
], 10, _hoisted_5)
|
|
4347
|
+
]),
|
|
4348
|
+
_: 2
|
|
4349
|
+
}, 1032, [
|
|
4350
|
+
"id"
|
|
4351
|
+
]);
|
|
4352
|
+
}), 128))
|
|
4353
|
+
])
|
|
4354
|
+
])
|
|
4355
|
+
]);
|
|
4356
|
+
}
|
|
4357
|
+
var AIdentityProviderPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [
|
|
4358
|
+
[
|
|
4359
|
+
"render",
|
|
4360
|
+
_sfc_render
|
|
4361
|
+
],
|
|
4362
|
+
[
|
|
4363
|
+
"__scopeId",
|
|
4364
|
+
"data-v-0df1e731"
|
|
4365
|
+
]
|
|
4366
|
+
]);
|
|
4367
|
+
|
|
4157
4368
|
const AIdentityProviderOAuth2ClientFields = vue.defineComponent({
|
|
4158
4369
|
props: {
|
|
4159
4370
|
entity: {
|
|
@@ -4691,17 +4902,16 @@ const AIdentityProviderForm = vue.defineComponent({
|
|
|
4691
4902
|
set();
|
|
4692
4903
|
onChange(updatedAt, ()=>set());
|
|
4693
4904
|
const renderPicker = ()=>vue.h(AIdentityProviderPicker, {
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
preset.value = value.preset;
|
|
4702
|
-
} else {
|
|
4703
|
-
preset.value = null;
|
|
4905
|
+
protocol: protocol.value,
|
|
4906
|
+
preset: preset.value,
|
|
4907
|
+
onPick (type, value) {
|
|
4908
|
+
if (type === 'preset') {
|
|
4909
|
+
preset.value = value;
|
|
4910
|
+
protocol.value = `${coreKit.getIdentityProviderProtocolForPreset(value)}`;
|
|
4911
|
+
return;
|
|
4704
4912
|
}
|
|
4913
|
+
protocol.value = value;
|
|
4914
|
+
preset.value = null;
|
|
4705
4915
|
}
|
|
4706
4916
|
});
|
|
4707
4917
|
const render = (node)=>{
|
|
@@ -4783,12 +4993,12 @@ const AIdentityProviders = vue.defineComponent({
|
|
|
4783
4993
|
setup: ctx
|
|
4784
4994
|
});
|
|
4785
4995
|
const translationName = useTranslation({
|
|
4786
|
-
group:
|
|
4787
|
-
key:
|
|
4996
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
4997
|
+
key: TranslatorTranslationDefaultKey.IDENTITY_PROVIDERS
|
|
4788
4998
|
});
|
|
4789
4999
|
const translation = useTranslation({
|
|
4790
|
-
group:
|
|
4791
|
-
key:
|
|
5000
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
5001
|
+
key: TranslatorTranslationVuecsKey.NO_MORE,
|
|
4792
5002
|
data: {
|
|
4793
5003
|
name: translationName
|
|
4794
5004
|
}
|
|
@@ -4868,9 +5078,9 @@ const AIdentityProviderRoleAssignment = vue.defineComponent({
|
|
|
4868
5078
|
value_is_regex: {}
|
|
4869
5079
|
}, form);
|
|
4870
5080
|
const validationMessages = useTranslationsForNestedValidation($v.value);
|
|
4871
|
-
const translationsDefault = useTranslationsForGroup(
|
|
5081
|
+
const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
|
|
4872
5082
|
{
|
|
4873
|
-
key:
|
|
5083
|
+
key: TranslatorTranslationDefaultKey.VALUE_IS_REGEX
|
|
4874
5084
|
}
|
|
4875
5085
|
]);
|
|
4876
5086
|
const manager = createEntityManager({
|
|
@@ -5112,15 +5322,15 @@ const ARoleForm = vue.defineComponent({
|
|
|
5112
5322
|
};
|
|
5113
5323
|
const translationsValidation = useTranslationsForNestedValidation($v.value);
|
|
5114
5324
|
const translationsSubmit = createFormSubmitTranslations();
|
|
5115
|
-
const translationsDefault = useTranslationsForGroup(
|
|
5325
|
+
const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
|
|
5116
5326
|
{
|
|
5117
|
-
key:
|
|
5327
|
+
key: TranslatorTranslationDefaultKey.NAME
|
|
5118
5328
|
},
|
|
5119
5329
|
{
|
|
5120
|
-
key:
|
|
5330
|
+
key: TranslatorTranslationDefaultKey.DISPLAY_NAME
|
|
5121
5331
|
},
|
|
5122
5332
|
{
|
|
5123
|
-
key:
|
|
5333
|
+
key: TranslatorTranslationDefaultKey.DESCRIPTION
|
|
5124
5334
|
}
|
|
5125
5335
|
]);
|
|
5126
5336
|
const render = ()=>{
|
|
@@ -5129,7 +5339,7 @@ const ARoleForm = vue.defineComponent({
|
|
|
5129
5339
|
validationMessages: translationsValidation.name.value,
|
|
5130
5340
|
validationSeverity: getVuelidateSeverity($v.value.name),
|
|
5131
5341
|
label: true,
|
|
5132
|
-
labelContent: translationsDefault[
|
|
5342
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.NAME].value,
|
|
5133
5343
|
content: formControls.buildFormInput({
|
|
5134
5344
|
value: $v.value.name.$model,
|
|
5135
5345
|
onChange (input) {
|
|
@@ -5141,7 +5351,7 @@ const ARoleForm = vue.defineComponent({
|
|
|
5141
5351
|
validationMessages: translationsValidation.display_name.value,
|
|
5142
5352
|
validationSeverity: getVuelidateSeverity($v.value.display_name),
|
|
5143
5353
|
label: true,
|
|
5144
|
-
labelContent: translationsDefault[
|
|
5354
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DISPLAY_NAME].value,
|
|
5145
5355
|
content: formControls.buildFormInput({
|
|
5146
5356
|
value: $v.value.display_name.$model,
|
|
5147
5357
|
onChange (input) {
|
|
@@ -5153,7 +5363,7 @@ const ARoleForm = vue.defineComponent({
|
|
|
5153
5363
|
validationMessages: translationsValidation.description.value,
|
|
5154
5364
|
validationSeverity: getVuelidateSeverity($v.value.description),
|
|
5155
5365
|
label: true,
|
|
5156
|
-
labelContent: translationsDefault[
|
|
5366
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DESCRIPTION].value,
|
|
5157
5367
|
content: formControls.buildFormTextarea({
|
|
5158
5368
|
value: $v.value.description.$model,
|
|
5159
5369
|
onChange (input) {
|
|
@@ -5195,12 +5405,12 @@ const ARoles = vue.defineComponent({
|
|
|
5195
5405
|
setup: ctx
|
|
5196
5406
|
});
|
|
5197
5407
|
const translationName = useTranslation({
|
|
5198
|
-
group:
|
|
5199
|
-
key:
|
|
5408
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
5409
|
+
key: TranslatorTranslationDefaultKey.ROLES
|
|
5200
5410
|
});
|
|
5201
5411
|
const translation = useTranslation({
|
|
5202
|
-
group:
|
|
5203
|
-
key:
|
|
5412
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
5413
|
+
key: TranslatorTranslationVuecsKey.NO_MORE,
|
|
5204
5414
|
data: {
|
|
5205
5415
|
name: translationName
|
|
5206
5416
|
}
|
|
@@ -5272,6 +5482,38 @@ const APermission = vue.defineComponent({
|
|
|
5272
5482
|
}
|
|
5273
5483
|
});
|
|
5274
5484
|
|
|
5485
|
+
const APermissionCheck = vue.defineComponent({
|
|
5486
|
+
props: {
|
|
5487
|
+
name: {
|
|
5488
|
+
type: [
|
|
5489
|
+
String,
|
|
5490
|
+
Array
|
|
5491
|
+
],
|
|
5492
|
+
required: true
|
|
5493
|
+
},
|
|
5494
|
+
data: {
|
|
5495
|
+
type: Object
|
|
5496
|
+
},
|
|
5497
|
+
options: {
|
|
5498
|
+
type: Object
|
|
5499
|
+
}
|
|
5500
|
+
},
|
|
5501
|
+
setup (props, { slots }) {
|
|
5502
|
+
const fn = createPermissionCheckerReactiveFn();
|
|
5503
|
+
const isPermitted = vue.computed(()=>fn({
|
|
5504
|
+
name: props.name,
|
|
5505
|
+
data: props.data,
|
|
5506
|
+
options: props.options
|
|
5507
|
+
}));
|
|
5508
|
+
return ()=>{
|
|
5509
|
+
if (isPermitted.value && hasNormalizedSlot(listControls.SlotName.DEFAULT, slots)) {
|
|
5510
|
+
return normalizeSlot(listControls.SlotName.DEFAULT, {}, slots);
|
|
5511
|
+
}
|
|
5512
|
+
return [];
|
|
5513
|
+
};
|
|
5514
|
+
}
|
|
5515
|
+
});
|
|
5516
|
+
|
|
5275
5517
|
const APermissionForm = vue.defineComponent({
|
|
5276
5518
|
props: {
|
|
5277
5519
|
entity: {
|
|
@@ -5336,15 +5578,15 @@ const APermissionForm = vue.defineComponent({
|
|
|
5336
5578
|
};
|
|
5337
5579
|
const translationsValidation = useTranslationsForNestedValidation($v.value);
|
|
5338
5580
|
const translationsSubmit = createFormSubmitTranslations();
|
|
5339
|
-
const translationsDefault = useTranslationsForGroup(
|
|
5581
|
+
const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
|
|
5340
5582
|
{
|
|
5341
|
-
key:
|
|
5583
|
+
key: TranslatorTranslationDefaultKey.NAME
|
|
5342
5584
|
},
|
|
5343
5585
|
{
|
|
5344
|
-
key:
|
|
5586
|
+
key: TranslatorTranslationDefaultKey.DISPLAY_NAME
|
|
5345
5587
|
},
|
|
5346
5588
|
{
|
|
5347
|
-
key:
|
|
5589
|
+
key: TranslatorTranslationDefaultKey.DESCRIPTION
|
|
5348
5590
|
}
|
|
5349
5591
|
]);
|
|
5350
5592
|
const render = ()=>{
|
|
@@ -5353,7 +5595,7 @@ const APermissionForm = vue.defineComponent({
|
|
|
5353
5595
|
validationMessages: translationsValidation.name.value,
|
|
5354
5596
|
validationSeverity: getVuelidateSeverity($v.value.name),
|
|
5355
5597
|
label: true,
|
|
5356
|
-
labelContent: translationsDefault[
|
|
5598
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.NAME].value,
|
|
5357
5599
|
content: formControls.buildFormInput({
|
|
5358
5600
|
value: $v.value.name.$model,
|
|
5359
5601
|
onChange (input) {
|
|
@@ -5368,7 +5610,7 @@ const APermissionForm = vue.defineComponent({
|
|
|
5368
5610
|
validationMessages: translationsValidation.display_name.value,
|
|
5369
5611
|
validationSeverity: getVuelidateSeverity($v.value.display_name),
|
|
5370
5612
|
label: true,
|
|
5371
|
-
labelContent: translationsDefault[
|
|
5613
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DISPLAY_NAME].value,
|
|
5372
5614
|
content: formControls.buildFormInput({
|
|
5373
5615
|
value: $v.value.display_name.$model,
|
|
5374
5616
|
onChange (input) {
|
|
@@ -5380,7 +5622,7 @@ const APermissionForm = vue.defineComponent({
|
|
|
5380
5622
|
validationMessages: translationsValidation.description.value,
|
|
5381
5623
|
validationSeverity: getVuelidateSeverity($v.value.description),
|
|
5382
5624
|
label: true,
|
|
5383
|
-
labelContent: translationsDefault[
|
|
5625
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DESCRIPTION].value,
|
|
5384
5626
|
content: formControls.buildFormTextarea({
|
|
5385
5627
|
value: $v.value.description.$model,
|
|
5386
5628
|
onChange (input) {
|
|
@@ -5422,12 +5664,12 @@ const APermissions = vue.defineComponent({
|
|
|
5422
5664
|
setup
|
|
5423
5665
|
});
|
|
5424
5666
|
const translationName = useTranslation({
|
|
5425
|
-
group:
|
|
5426
|
-
key:
|
|
5667
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
5668
|
+
key: TranslatorTranslationDefaultKey.PERMISSIONS
|
|
5427
5669
|
});
|
|
5428
5670
|
const translation = useTranslation({
|
|
5429
|
-
group:
|
|
5430
|
-
key:
|
|
5671
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
5672
|
+
key: TranslatorTranslationVuecsKey.NO_MORE,
|
|
5431
5673
|
data: {
|
|
5432
5674
|
name: translationName
|
|
5433
5675
|
}
|
|
@@ -5521,7 +5763,7 @@ const ARobotForm = vue.defineComponent({
|
|
|
5521
5763
|
});
|
|
5522
5764
|
const $v = useVuelidate({
|
|
5523
5765
|
name: {
|
|
5524
|
-
[
|
|
5766
|
+
[VuelidateCustomRuleKey.ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE]: VuelidateCustomRule[VuelidateCustomRuleKey.ALPHA_UPPER_NUM_HYPHEN_UNDERSCORE],
|
|
5525
5767
|
minLength: validators.minLength(3),
|
|
5526
5768
|
maxLength: validators.maxLength(128)
|
|
5527
5769
|
},
|
|
@@ -5580,24 +5822,24 @@ const ARobotForm = vue.defineComponent({
|
|
|
5580
5822
|
};
|
|
5581
5823
|
const translationsValidation = useTranslationsForNestedValidation($v.value);
|
|
5582
5824
|
const translationsSubmit = createFormSubmitTranslations();
|
|
5583
|
-
const translationsDefault = useTranslationsForGroup(
|
|
5825
|
+
const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
|
|
5584
5826
|
{
|
|
5585
|
-
key:
|
|
5827
|
+
key: TranslatorTranslationDefaultKey.GENERATE
|
|
5586
5828
|
},
|
|
5587
5829
|
{
|
|
5588
|
-
key:
|
|
5830
|
+
key: TranslatorTranslationDefaultKey.HASHED
|
|
5589
5831
|
},
|
|
5590
5832
|
{
|
|
5591
|
-
key:
|
|
5833
|
+
key: TranslatorTranslationDefaultKey.NAME
|
|
5592
5834
|
},
|
|
5593
5835
|
{
|
|
5594
|
-
key:
|
|
5836
|
+
key: TranslatorTranslationDefaultKey.DISPLAY_NAME
|
|
5595
5837
|
},
|
|
5596
5838
|
{
|
|
5597
|
-
key:
|
|
5839
|
+
key: TranslatorTranslationDefaultKey.DESCRIPTION
|
|
5598
5840
|
},
|
|
5599
5841
|
{
|
|
5600
|
-
key:
|
|
5842
|
+
key: TranslatorTranslationDefaultKey.SECRET
|
|
5601
5843
|
}
|
|
5602
5844
|
]);
|
|
5603
5845
|
const render = ()=>{
|
|
@@ -5605,7 +5847,7 @@ const ARobotForm = vue.defineComponent({
|
|
|
5605
5847
|
validationMessages: translationsValidation.name.value,
|
|
5606
5848
|
validationSeverity: getVuelidateSeverity($v.value.name),
|
|
5607
5849
|
label: true,
|
|
5608
|
-
labelContent: translationsDefault[
|
|
5850
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.NAME].value,
|
|
5609
5851
|
content: formControls.buildFormInput({
|
|
5610
5852
|
value: $v.value.name.$model,
|
|
5611
5853
|
onChange (input) {
|
|
@@ -5620,7 +5862,7 @@ const ARobotForm = vue.defineComponent({
|
|
|
5620
5862
|
validationMessages: translationsValidation.display_name.value,
|
|
5621
5863
|
validationSeverity: getVuelidateSeverity($v.value.display_name),
|
|
5622
5864
|
label: true,
|
|
5623
|
-
labelContent: translationsDefault[
|
|
5865
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DISPLAY_NAME].value,
|
|
5624
5866
|
content: formControls.buildFormInput({
|
|
5625
5867
|
value: $v.value.display_name.$model,
|
|
5626
5868
|
onChange (input) {
|
|
@@ -5648,11 +5890,11 @@ const ARobotForm = vue.defineComponent({
|
|
|
5648
5890
|
validationSeverity: getVuelidateSeverity($v.value.secret),
|
|
5649
5891
|
label: true,
|
|
5650
5892
|
labelContent: [
|
|
5651
|
-
translationsDefault[
|
|
5893
|
+
translationsDefault[TranslatorTranslationDefaultKey.SECRET].value,
|
|
5652
5894
|
isSecretHashed.value ? vue.h('span', {
|
|
5653
5895
|
class: 'text-danger font-weight-bold ps-1'
|
|
5654
5896
|
}, [
|
|
5655
|
-
translationsDefault[
|
|
5897
|
+
translationsDefault[TranslatorTranslationDefaultKey.HASHED].value,
|
|
5656
5898
|
' ',
|
|
5657
5899
|
vue.h('i', {
|
|
5658
5900
|
class: 'fa fa-exclamation-triangle ps-1'
|
|
@@ -5678,7 +5920,7 @@ const ARobotForm = vue.defineComponent({
|
|
|
5678
5920
|
class: 'fa fa-wrench'
|
|
5679
5921
|
}),
|
|
5680
5922
|
' ',
|
|
5681
|
-
translationsDefault[
|
|
5923
|
+
translationsDefault[TranslatorTranslationDefaultKey.GENERATE].value
|
|
5682
5924
|
])
|
|
5683
5925
|
]);
|
|
5684
5926
|
const submitForm = buildFormSubmitWithTranslations({
|
|
@@ -5749,12 +5991,12 @@ const ARobots = vue.defineComponent({
|
|
|
5749
5991
|
setup: ctx
|
|
5750
5992
|
});
|
|
5751
5993
|
const translationName = useTranslation({
|
|
5752
|
-
group:
|
|
5753
|
-
key:
|
|
5994
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
5995
|
+
key: TranslatorTranslationDefaultKey.ROBOTS
|
|
5754
5996
|
});
|
|
5755
5997
|
const translation = useTranslation({
|
|
5756
|
-
group:
|
|
5757
|
-
key:
|
|
5998
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
5999
|
+
key: TranslatorTranslationVuecsKey.NO_MORE,
|
|
5758
6000
|
data: {
|
|
5759
6001
|
name: translationName
|
|
5760
6002
|
}
|
|
@@ -6013,30 +6255,30 @@ const AUserForm = vue.defineComponent({
|
|
|
6013
6255
|
};
|
|
6014
6256
|
const translationsValidation = useTranslationsForNestedValidation($v.value);
|
|
6015
6257
|
const translationsSubmit = createFormSubmitTranslations();
|
|
6016
|
-
const translationsDefault = useTranslationsForGroup(
|
|
6258
|
+
const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
|
|
6017
6259
|
{
|
|
6018
|
-
key:
|
|
6260
|
+
key: TranslatorTranslationDefaultKey.ACTIVE
|
|
6019
6261
|
},
|
|
6020
6262
|
{
|
|
6021
|
-
key:
|
|
6263
|
+
key: TranslatorTranslationDefaultKey.INACTIVE
|
|
6022
6264
|
},
|
|
6023
6265
|
{
|
|
6024
|
-
key:
|
|
6266
|
+
key: TranslatorTranslationDefaultKey.DISPLAY_NAME
|
|
6025
6267
|
},
|
|
6026
6268
|
{
|
|
6027
|
-
key:
|
|
6269
|
+
key: TranslatorTranslationDefaultKey.EMAIL
|
|
6028
6270
|
},
|
|
6029
6271
|
{
|
|
6030
|
-
key:
|
|
6272
|
+
key: TranslatorTranslationDefaultKey.LOCKED
|
|
6031
6273
|
},
|
|
6032
6274
|
{
|
|
6033
|
-
key:
|
|
6275
|
+
key: TranslatorTranslationDefaultKey.NOT_LOCKED
|
|
6034
6276
|
},
|
|
6035
6277
|
{
|
|
6036
|
-
key:
|
|
6278
|
+
key: TranslatorTranslationDefaultKey.NAME
|
|
6037
6279
|
},
|
|
6038
6280
|
{
|
|
6039
|
-
key:
|
|
6281
|
+
key: TranslatorTranslationDefaultKey.DESCRIPTION
|
|
6040
6282
|
}
|
|
6041
6283
|
]);
|
|
6042
6284
|
const render = ()=>{
|
|
@@ -6044,7 +6286,7 @@ const AUserForm = vue.defineComponent({
|
|
|
6044
6286
|
validationMessages: translationsValidation.name.value,
|
|
6045
6287
|
validationSeverity: getVuelidateSeverity($v.value.name),
|
|
6046
6288
|
label: true,
|
|
6047
|
-
labelContent: translationsDefault[
|
|
6289
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.NAME].value,
|
|
6048
6290
|
content: formControls.buildFormInput({
|
|
6049
6291
|
value: $v.value.name.$model,
|
|
6050
6292
|
onChange (input) {
|
|
@@ -6059,7 +6301,7 @@ const AUserForm = vue.defineComponent({
|
|
|
6059
6301
|
validationMessages: translationsValidation.display_name.value,
|
|
6060
6302
|
validationSeverity: getVuelidateSeverity($v.value.display_name),
|
|
6061
6303
|
label: true,
|
|
6062
|
-
labelContent: translationsDefault[
|
|
6304
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.DISPLAY_NAME].value,
|
|
6063
6305
|
content: formControls.buildFormInput({
|
|
6064
6306
|
value: $v.value.display_name.$model,
|
|
6065
6307
|
onChange (input) {
|
|
@@ -6071,7 +6313,7 @@ const AUserForm = vue.defineComponent({
|
|
|
6071
6313
|
validationMessages: translationsValidation.email.value,
|
|
6072
6314
|
validationSeverity: getVuelidateSeverity($v.value.email),
|
|
6073
6315
|
label: true,
|
|
6074
|
-
labelContent: translationsDefault[
|
|
6316
|
+
labelContent: translationsDefault[TranslatorTranslationDefaultKey.EMAIL].value,
|
|
6075
6317
|
content: formControls.buildFormInput({
|
|
6076
6318
|
value: $v.value.email.$model,
|
|
6077
6319
|
props: {
|
|
@@ -6096,7 +6338,7 @@ const AUserForm = vue.defineComponent({
|
|
|
6096
6338
|
'text-success': form.name_locked
|
|
6097
6339
|
}
|
|
6098
6340
|
}, [
|
|
6099
|
-
form.name_locked ? translationsDefault[
|
|
6341
|
+
form.name_locked ? translationsDefault[TranslatorTranslationDefaultKey.LOCKED].value : translationsDefault[TranslatorTranslationDefaultKey.NOT_LOCKED].value
|
|
6100
6342
|
]),
|
|
6101
6343
|
value: form.name_locked,
|
|
6102
6344
|
onChange (input) {
|
|
@@ -6120,7 +6362,7 @@ const AUserForm = vue.defineComponent({
|
|
|
6120
6362
|
'text-success': form.active
|
|
6121
6363
|
}
|
|
6122
6364
|
}, [
|
|
6123
|
-
form.active ? translationsDefault[
|
|
6365
|
+
form.active ? translationsDefault[TranslatorTranslationDefaultKey.ACTIVE].value : translationsDefault[TranslatorTranslationDefaultKey.INACTIVE].value
|
|
6124
6366
|
]),
|
|
6125
6367
|
value: form.active,
|
|
6126
6368
|
onChange (input) {
|
|
@@ -6203,12 +6445,12 @@ const AUsers = vue.defineComponent({
|
|
|
6203
6445
|
setup: ctx
|
|
6204
6446
|
});
|
|
6205
6447
|
const translationName = useTranslation({
|
|
6206
|
-
group:
|
|
6207
|
-
key:
|
|
6448
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
6449
|
+
key: TranslatorTranslationDefaultKey.USERS
|
|
6208
6450
|
});
|
|
6209
6451
|
const translation = useTranslation({
|
|
6210
|
-
group:
|
|
6211
|
-
key:
|
|
6452
|
+
group: TranslatorTranslationGroup.VUECS,
|
|
6453
|
+
key: TranslatorTranslationVuecsKey.NO_MORE,
|
|
6212
6454
|
data: {
|
|
6213
6455
|
name: translationName
|
|
6214
6456
|
}
|
|
@@ -6574,11 +6816,11 @@ const APagination = vue.defineComponent({
|
|
|
6574
6816
|
* Author Peter Placzek (tada5hi)
|
|
6575
6817
|
* For the full copyright and license information,
|
|
6576
6818
|
* view the LICENSE file that was distributed with this source code.
|
|
6577
|
-
*/ var TitleSlotName
|
|
6578
|
-
(function(TitleSlotName) {
|
|
6819
|
+
*/ var TitleSlotName = /*#__PURE__*/ function(TitleSlotName) {
|
|
6579
6820
|
TitleSlotName["DEFAULT"] = "default";
|
|
6580
6821
|
TitleSlotName["ICON"] = "icon";
|
|
6581
|
-
|
|
6822
|
+
return TitleSlotName;
|
|
6823
|
+
}({});
|
|
6582
6824
|
|
|
6583
6825
|
function buildTitle(ctx) {
|
|
6584
6826
|
ctx.tag = ctx.tag || 'h6';
|
|
@@ -6647,8 +6889,8 @@ const ATitle = vue.defineComponent({
|
|
|
6647
6889
|
slots: Object,
|
|
6648
6890
|
setup (props, { slots }) {
|
|
6649
6891
|
const translation = useTranslation({
|
|
6650
|
-
group:
|
|
6651
|
-
key:
|
|
6892
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
6893
|
+
key: TranslatorTranslationDefaultKey.OVERVIEW
|
|
6652
6894
|
});
|
|
6653
6895
|
return ()=>buildTitle({
|
|
6654
6896
|
slots,
|
|
@@ -6664,11 +6906,11 @@ const ATitle = vue.defineComponent({
|
|
|
6664
6906
|
* Author Peter Placzek (tada5hi)
|
|
6665
6907
|
* For the full copyright and license information,
|
|
6666
6908
|
* view the LICENSE file that was distributed with this source code.
|
|
6667
|
-
*/ var ListSearchSlotName
|
|
6668
|
-
(function(ListSearchSlotName) {
|
|
6909
|
+
*/ var ListSearchSlotName = /*#__PURE__*/ function(ListSearchSlotName) {
|
|
6669
6910
|
ListSearchSlotName["DEFAULT"] = "default";
|
|
6670
6911
|
ListSearchSlotName["ICON"] = "icon";
|
|
6671
|
-
|
|
6912
|
+
return ListSearchSlotName;
|
|
6913
|
+
}({});
|
|
6672
6914
|
|
|
6673
6915
|
function debounce(func, timeout = 200) {
|
|
6674
6916
|
let timer;
|
|
@@ -6838,12 +7080,6 @@ const LanguageSwitcherDropdown = vue.defineComponent({
|
|
|
6838
7080
|
}
|
|
6839
7081
|
});
|
|
6840
7082
|
|
|
6841
|
-
var ElementType;
|
|
6842
|
-
(function(ElementType) {
|
|
6843
|
-
ElementType["BUTTON"] = "button";
|
|
6844
|
-
ElementType["LINK"] = "link";
|
|
6845
|
-
ElementType["DROP_DOWN_ITEM"] = "dropDownItem";
|
|
6846
|
-
})(ElementType || (ElementType = {}));
|
|
6847
7083
|
const AEntityDelete = vue.defineComponent({
|
|
6848
7084
|
props: {
|
|
6849
7085
|
elementIcon: {
|
|
@@ -6896,8 +7132,8 @@ const AEntityDelete = vue.defineComponent({
|
|
|
6896
7132
|
}
|
|
6897
7133
|
});
|
|
6898
7134
|
const translation = useTranslation({
|
|
6899
|
-
group:
|
|
6900
|
-
key:
|
|
7135
|
+
group: TranslatorTranslationGroup.DEFAULT,
|
|
7136
|
+
key: TranslatorTranslationDefaultKey.DELETE
|
|
6901
7137
|
});
|
|
6902
7138
|
const render = ()=>{
|
|
6903
7139
|
let tag = 'button';
|
|
@@ -6970,6 +7206,7 @@ var components = /*#__PURE__*/Object.freeze({
|
|
|
6970
7206
|
AIdentityProviders: AIdentityProviders,
|
|
6971
7207
|
APagination: APagination,
|
|
6972
7208
|
APermission: APermission,
|
|
7209
|
+
APermissionCheck: APermissionCheck,
|
|
6973
7210
|
APermissionForm: APermissionForm,
|
|
6974
7211
|
APermissionRobotAssignments: APermissionRobotAssignments,
|
|
6975
7212
|
APermissionRoleAssignments: APermissionRoleAssignments,
|
|
@@ -7041,7 +7278,8 @@ function install(app1, options) {
|
|
|
7041
7278
|
});
|
|
7042
7279
|
installHTTPClient(app1, {
|
|
7043
7280
|
pinia: options.pinia,
|
|
7044
|
-
baseURL: options.baseURL
|
|
7281
|
+
baseURL: options.baseURL,
|
|
7282
|
+
isServer: options.isServer
|
|
7045
7283
|
});
|
|
7046
7284
|
installTranslator(app1, {
|
|
7047
7285
|
locale: options.translatorLocale
|
|
@@ -7075,6 +7313,7 @@ exports.AIdentityProviderRoleAssignments = AIdentityProviderRoleAssignments;
|
|
|
7075
7313
|
exports.AIdentityProviders = AIdentityProviders;
|
|
7076
7314
|
exports.APagination = APagination;
|
|
7077
7315
|
exports.APermission = APermission;
|
|
7316
|
+
exports.APermissionCheck = APermissionCheck;
|
|
7078
7317
|
exports.APermissionForm = APermissionForm;
|
|
7079
7318
|
exports.APermissionRobotAssignments = APermissionRobotAssignments;
|
|
7080
7319
|
exports.APermissionRoleAssignments = APermissionRoleAssignments;
|
|
@@ -7116,8 +7355,13 @@ exports.HTTPClientSymbol = HTTPClientSymbol;
|
|
|
7116
7355
|
exports.LanguageSwitcherDropdown = LanguageSwitcherDropdown;
|
|
7117
7356
|
exports.STORE_ID = STORE_ID;
|
|
7118
7357
|
exports.SocketClientSymbol = SocketClientSymbol;
|
|
7119
|
-
exports.
|
|
7358
|
+
exports.StoreDispatcherEventName = StoreDispatcherEventName;
|
|
7359
|
+
exports.TranslatorTranslationClientKey = TranslatorTranslationClientKey;
|
|
7360
|
+
exports.TranslatorTranslationDefaultKey = TranslatorTranslationDefaultKey;
|
|
7361
|
+
exports.TranslatorTranslationGroup = TranslatorTranslationGroup;
|
|
7362
|
+
exports.TranslatorTranslationVuecsKey = TranslatorTranslationVuecsKey;
|
|
7120
7363
|
exports.VuelidateCustomRule = VuelidateCustomRule;
|
|
7364
|
+
exports.VuelidateCustomRuleKey = VuelidateCustomRuleKey;
|
|
7121
7365
|
exports.buildEntityManagerSlotProps = buildEntityManagerSlotProps;
|
|
7122
7366
|
exports.buildFormSubmitWithTranslations = buildFormSubmitWithTranslations;
|
|
7123
7367
|
exports.buildListCreatedHandler = buildListCreatedHandler;
|
|
@@ -7126,7 +7370,9 @@ exports.buildListUpdatedHandler = buildListUpdatedHandler;
|
|
|
7126
7370
|
exports.createEntityManager = createEntityManager;
|
|
7127
7371
|
exports.createFormSubmitTranslations = createFormSubmitTranslations;
|
|
7128
7372
|
exports.createList = createList;
|
|
7373
|
+
exports.createPermissionCheckerReactiveFn = createPermissionCheckerReactiveFn;
|
|
7129
7374
|
exports.createStore = createStore;
|
|
7375
|
+
exports.createStoreDispatcher = createStoreDispatcher;
|
|
7130
7376
|
exports.default = index;
|
|
7131
7377
|
exports.defineEntityManagerEvents = defineEntityManagerEvents;
|
|
7132
7378
|
exports.defineEntityManagerProps = defineEntityManagerProps;
|
|
@@ -7137,12 +7383,13 @@ exports.extractVuelidateResultsFromChild = extractVuelidateResultsFromChild;
|
|
|
7137
7383
|
exports.getVuelidateSeverity = getVuelidateSeverity;
|
|
7138
7384
|
exports.hasHTTPClient = hasHTTPClient;
|
|
7139
7385
|
exports.hasNormalizedSlot = hasNormalizedSlot;
|
|
7140
|
-
exports.
|
|
7386
|
+
exports.hasStoreFactory = hasStoreFactory;
|
|
7141
7387
|
exports.initFormAttributesFromSource = initFormAttributesFromSource;
|
|
7142
7388
|
exports.inject = inject$1;
|
|
7143
7389
|
exports.injectHTTPClient = injectHTTPClient;
|
|
7144
7390
|
exports.injectSocketManager = injectSocketManager;
|
|
7145
|
-
exports.
|
|
7391
|
+
exports.injectStoreDispatcher = injectStoreDispatcher;
|
|
7392
|
+
exports.injectStoreFactory = injectStoreFactory;
|
|
7146
7393
|
exports.injectTranslatorLocale = injectTranslatorLocale;
|
|
7147
7394
|
exports.install = install;
|
|
7148
7395
|
exports.installHTTPClient = installHTTPClient;
|
|
@@ -7157,11 +7404,12 @@ exports.onChange = onChange;
|
|
|
7157
7404
|
exports.provide = provide;
|
|
7158
7405
|
exports.provideHTTPClient = provideHTTPClient;
|
|
7159
7406
|
exports.provideSocketManager = provideSocketManager;
|
|
7160
|
-
exports.
|
|
7407
|
+
exports.provideStoreDispatcher = provideStoreDispatcher;
|
|
7408
|
+
exports.provideStoreFactory = provideStoreFactory;
|
|
7161
7409
|
exports.renderEntityAssignAction = renderEntityAssignAction;
|
|
7162
7410
|
exports.storeToRefs = storeToRefs;
|
|
7163
|
-
exports.useAbilityCheck = useAbilityCheck;
|
|
7164
7411
|
exports.useIsEditing = useIsEditing;
|
|
7412
|
+
exports.usePermissionCheck = usePermissionCheck;
|
|
7165
7413
|
exports.useRealmResourceWritableCheck = useRealmResourceWritableCheck;
|
|
7166
7414
|
exports.useStore = useStore;
|
|
7167
7415
|
exports.useTranslation = useTranslation;
|