@authup/client-web-kit 1.0.0-beta.14 → 1.0.0-beta.16
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-scope/AClientScopeAssignments.d.ts.map +1 -1
- package/dist/components/permission-robot/APermissionRobotAssignments.d.ts.map +1 -1
- package/dist/components/permission-role/APermissionRoleAssignments.d.ts.map +1 -1
- package/dist/components/permission-user/APermissionUserAssignments.d.ts.map +1 -1
- package/dist/components/robot-permission/ARobotPermissionAssignments.d.ts.map +1 -1
- package/dist/components/robot-role/ARobotRoleAssignments.d.ts.map +1 -1
- package/dist/components/role-permission/ARolePermissionAssignments.d.ts.map +1 -1
- package/dist/components/role-robot/ARoleRobotAssignments.d.ts.map +1 -1
- package/dist/components/role-user/ARoleUserAssignments.d.ts.map +1 -1
- package/dist/components/scope-client/AScopeClientAssignments.d.ts.map +1 -1
- package/dist/components/user-permission/AUserPermissionAssignments.d.ts.map +1 -1
- package/dist/components/user-role/AUserRoleAssignments.d.ts.map +1 -1
- package/dist/core/entity-socket/module.d.ts.map +1 -1
- package/dist/core/http-client/types.d.ts +0 -2
- package/dist/core/http-client/types.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/socket-manager/index.d.ts.map +1 -0
- package/dist/core/socket-manager/install.d.ts +6 -0
- package/dist/core/socket-manager/install.d.ts.map +1 -0
- package/dist/core/socket-manager/singleton.d.ts +7 -0
- package/dist/core/socket-manager/singleton.d.ts.map +1 -0
- package/dist/core/store/types.d.ts +1 -2
- package/dist/core/store/types.d.ts.map +1 -1
- package/dist/index.cjs +121 -746
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +115 -740
- package/dist/index.mjs.map +1 -1
- package/dist/module.d.ts.map +1 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -1
- package/dist/core/socket-client-manager/index.d.ts.map +0 -1
- package/dist/core/socket-client-manager/install.d.ts +0 -6
- package/dist/core/socket-client-manager/install.d.ts.map +0 -1
- package/dist/core/socket-client-manager/singleton.d.ts +0 -7
- package/dist/core/socket-client-manager/singleton.d.ts.map +0 -1
- /package/dist/core/{socket-client-manager → socket-manager}/index.d.ts +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { toRaw, isRef, isReactive, toRef, hasInjectionContext, inject as inject$2, getCurrentInstance, ref, watch, reactive, markRaw, effectScope, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, provide as provide$1, unref, h, onMounted, onUnmounted, shallowRef, watchEffect, defineComponent, resolveDynamicComponent, mergeProps } from 'vue';
|
|
2
1
|
import { REALM_MASTER_NAME, DomainEventName, buildDomainChannelName, DomainType, isRealmResourceWritable, IdentityProviderProtocol, IdentityProviderPreset, getIdentityProviderProtocolForPreset } from '@authup/core-kit';
|
|
2
|
+
import { hasInjectionContext, inject as inject$2, provide as provide$1, ref, computed, getCurrentScope, onScopeDispose, toRaw, isRef, isReactive, toRef, unref, h, onMounted, onUnmounted, watch, shallowRef, watchEffect, defineComponent, reactive, nextTick, getCurrentInstance, resolveDynamicComponent, mergeProps } from 'vue';
|
|
3
3
|
import { Client, isClientTokenExpiredError, CookieName, ClientResponseErrorTokenHook } from '@authup/core-http-kit';
|
|
4
|
+
import { defineStore, storeToRefs as storeToRefs$1 } from 'pinia';
|
|
4
5
|
import { Abilities, buildEventFullName, EventNameSuffix, hasOwnProperty, createNanoID, isOAuth2OpenIDProviderMetadata, isObject as isObject$1 } from '@authup/kit';
|
|
5
6
|
import { merge, isObject, createMerger } from 'smob';
|
|
6
7
|
import { buildList, SlotName } from '@vuecs/list-controls';
|
|
@@ -13,644 +14,6 @@ import useVuelidate from '@vuelidate/core';
|
|
|
13
14
|
import { buildPagination as buildPagination$1 } from '@vuecs/pagination';
|
|
14
15
|
import Cookie from 'universal-cookie';
|
|
15
16
|
|
|
16
|
-
var isVue2 = false;
|
|
17
|
-
function set(target, key, val) {
|
|
18
|
-
if (Array.isArray(target)) {
|
|
19
|
-
target.length = Math.max(target.length, key);
|
|
20
|
-
target.splice(key, 1, val);
|
|
21
|
-
return val;
|
|
22
|
-
}
|
|
23
|
-
target[key] = val;
|
|
24
|
-
return val;
|
|
25
|
-
}
|
|
26
|
-
function del(target, key) {
|
|
27
|
-
if (Array.isArray(target)) {
|
|
28
|
-
target.splice(key, 1);
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
delete target[key];
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* setActivePinia must be called to handle SSR at the top of functions like
|
|
36
|
-
* `fetch`, `setup`, `serverPrefetch` and others
|
|
37
|
-
*/ let activePinia;
|
|
38
|
-
/**
|
|
39
|
-
* Sets or unsets the active pinia. Used in SSR and internally when calling
|
|
40
|
-
* actions and getters
|
|
41
|
-
*
|
|
42
|
-
* @param pinia - Pinia instance
|
|
43
|
-
*/ // @ts-expect-error: cannot constrain the type of the return
|
|
44
|
-
const setActivePinia = (pinia)=>activePinia = pinia;
|
|
45
|
-
const piniaSymbol = process.env.NODE_ENV !== 'production' ? Symbol('pinia') : /* istanbul ignore next */ Symbol();
|
|
46
|
-
function isPlainObject(// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
47
|
-
o) {
|
|
48
|
-
return o && typeof o === 'object' && Object.prototype.toString.call(o) === '[object Object]' && typeof o.toJSON !== 'function';
|
|
49
|
-
}
|
|
50
|
-
// type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> }
|
|
51
|
-
// TODO: can we change these to numbers?
|
|
52
|
-
/**
|
|
53
|
-
* Possible types for SubscriptionCallback
|
|
54
|
-
*/ var MutationType;
|
|
55
|
-
(function(MutationType) {
|
|
56
|
-
/**
|
|
57
|
-
* Direct mutation of the state:
|
|
58
|
-
*
|
|
59
|
-
* - `store.name = 'new name'`
|
|
60
|
-
* - `store.$state.name = 'new name'`
|
|
61
|
-
* - `store.list.push('new item')`
|
|
62
|
-
*/ MutationType["direct"] = "direct";
|
|
63
|
-
/**
|
|
64
|
-
* Mutated the state with `$patch` and an object
|
|
65
|
-
*
|
|
66
|
-
* - `store.$patch({ name: 'newName' })`
|
|
67
|
-
*/ MutationType["patchObject"] = "patch object";
|
|
68
|
-
/**
|
|
69
|
-
* Mutated the state with `$patch` and a function
|
|
70
|
-
*
|
|
71
|
-
* - `store.$patch(state => state.name = 'newName')`
|
|
72
|
-
*/ MutationType["patchFunction"] = "patch function";
|
|
73
|
-
// maybe reset? for $state = {} and $reset
|
|
74
|
-
})(MutationType || (MutationType = {}));
|
|
75
|
-
const IS_CLIENT = typeof window !== 'undefined';
|
|
76
|
-
/**
|
|
77
|
-
* Should we add the devtools plugins.
|
|
78
|
-
* - only if dev mode or forced through the prod devtools flag
|
|
79
|
-
* - not in test
|
|
80
|
-
* - only if window exists (could change in the future)
|
|
81
|
-
*/ const USE_DEVTOOLS = (process.env.NODE_ENV !== 'production' || typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__) && !(process.env.NODE_ENV === 'test') && IS_CLIENT;
|
|
82
|
-
/**
|
|
83
|
-
* Mutates in place `newState` with `oldState` to _hot update_ it. It will
|
|
84
|
-
* remove any key not existing in `newState` and recursively merge plain
|
|
85
|
-
* objects.
|
|
86
|
-
*
|
|
87
|
-
* @param newState - new state object to be patched
|
|
88
|
-
* @param oldState - old state that should be used to patch newState
|
|
89
|
-
* @returns - newState
|
|
90
|
-
*/ function patchObject(newState, oldState) {
|
|
91
|
-
// no need to go through symbols because they cannot be serialized anyway
|
|
92
|
-
for(const key in oldState){
|
|
93
|
-
const subPatch = oldState[key];
|
|
94
|
-
// skip the whole sub tree
|
|
95
|
-
if (!(key in newState)) {
|
|
96
|
-
continue;
|
|
97
|
-
}
|
|
98
|
-
const targetValue = newState[key];
|
|
99
|
-
if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {
|
|
100
|
-
newState[key] = patchObject(targetValue, subPatch);
|
|
101
|
-
} else {
|
|
102
|
-
// objects are either a bit more complex (e.g. refs) or primitives, so we
|
|
103
|
-
// just set the whole thing
|
|
104
|
-
{
|
|
105
|
-
newState[key] = subPatch;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return newState;
|
|
110
|
-
}
|
|
111
|
-
const noop$1 = ()=>{};
|
|
112
|
-
function addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {
|
|
113
|
-
subscriptions.push(callback);
|
|
114
|
-
const removeSubscription = ()=>{
|
|
115
|
-
const idx = subscriptions.indexOf(callback);
|
|
116
|
-
if (idx > -1) {
|
|
117
|
-
subscriptions.splice(idx, 1);
|
|
118
|
-
onCleanup();
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
if (!detached && getCurrentScope()) {
|
|
122
|
-
onScopeDispose(removeSubscription);
|
|
123
|
-
}
|
|
124
|
-
return removeSubscription;
|
|
125
|
-
}
|
|
126
|
-
function triggerSubscriptions(subscriptions, ...args) {
|
|
127
|
-
subscriptions.slice().forEach((callback)=>{
|
|
128
|
-
callback(...args);
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
const fallbackRunWithContext = (fn)=>fn();
|
|
132
|
-
function mergeReactiveObjects(target, patchToApply) {
|
|
133
|
-
// Handle Map instances
|
|
134
|
-
if (target instanceof Map && patchToApply instanceof Map) {
|
|
135
|
-
patchToApply.forEach((value, key)=>target.set(key, value));
|
|
136
|
-
}
|
|
137
|
-
// Handle Set instances
|
|
138
|
-
if (target instanceof Set && patchToApply instanceof Set) {
|
|
139
|
-
patchToApply.forEach(target.add, target);
|
|
140
|
-
}
|
|
141
|
-
// no need to go through symbols because they cannot be serialized anyway
|
|
142
|
-
for(const key in patchToApply){
|
|
143
|
-
if (!patchToApply.hasOwnProperty(key)) continue;
|
|
144
|
-
const subPatch = patchToApply[key];
|
|
145
|
-
const targetValue = target[key];
|
|
146
|
-
if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {
|
|
147
|
-
// NOTE: here I wanted to warn about inconsistent types but it's not possible because in setup stores one might
|
|
148
|
-
// start the value of a property as a certain type e.g. a Map, and then for some reason, during SSR, change that
|
|
149
|
-
// to `undefined`. When trying to hydrate, we want to override the Map with `undefined`.
|
|
150
|
-
target[key] = mergeReactiveObjects(targetValue, subPatch);
|
|
151
|
-
} else {
|
|
152
|
-
// @ts-expect-error: subPatch is a valid value
|
|
153
|
-
target[key] = subPatch;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
return target;
|
|
157
|
-
}
|
|
158
|
-
const skipHydrateSymbol = process.env.NODE_ENV !== 'production' ? Symbol('pinia:skipHydration') : /* istanbul ignore next */ Symbol();
|
|
159
|
-
/**
|
|
160
|
-
* Returns whether a value should be hydrated
|
|
161
|
-
*
|
|
162
|
-
* @param obj - target variable
|
|
163
|
-
* @returns true if `obj` should be hydrated
|
|
164
|
-
*/ function shouldHydrate(obj) {
|
|
165
|
-
return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
|
|
166
|
-
}
|
|
167
|
-
const { assign } = Object;
|
|
168
|
-
function isComputed(o) {
|
|
169
|
-
return !!(isRef(o) && o.effect);
|
|
170
|
-
}
|
|
171
|
-
function createOptionsStore(id, options, pinia, hot) {
|
|
172
|
-
const { state, actions, getters } = options;
|
|
173
|
-
const initialState = pinia.state.value[id];
|
|
174
|
-
let store;
|
|
175
|
-
function setup() {
|
|
176
|
-
if (!initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {
|
|
177
|
-
/* istanbul ignore if */ {
|
|
178
|
-
pinia.state.value[id] = state ? state() : {};
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
// avoid creating a state in pinia.state.value
|
|
182
|
-
const localState = process.env.NODE_ENV !== 'production' && hot ? toRefs(ref(state ? state() : {}).value) : toRefs(pinia.state.value[id]);
|
|
183
|
-
return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name)=>{
|
|
184
|
-
if (process.env.NODE_ENV !== 'production' && name in localState) {
|
|
185
|
-
console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${name}" in store "${id}".`);
|
|
186
|
-
}
|
|
187
|
-
computedGetters[name] = markRaw(computed(()=>{
|
|
188
|
-
setActivePinia(pinia);
|
|
189
|
-
// it was created just before
|
|
190
|
-
const store = pinia._s.get(id);
|
|
191
|
-
// @ts-expect-error
|
|
192
|
-
// return getters![name].call(context, context)
|
|
193
|
-
// TODO: avoid reading the getter while assigning with a global variable
|
|
194
|
-
return getters[name].call(store, store);
|
|
195
|
-
}));
|
|
196
|
-
return computedGetters;
|
|
197
|
-
}, {}));
|
|
198
|
-
}
|
|
199
|
-
store = createSetupStore(id, setup, options, pinia, hot, true);
|
|
200
|
-
return store;
|
|
201
|
-
}
|
|
202
|
-
function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {
|
|
203
|
-
let scope;
|
|
204
|
-
const optionsForPlugin = assign({
|
|
205
|
-
actions: {}
|
|
206
|
-
}, options);
|
|
207
|
-
/* istanbul ignore if */ if (process.env.NODE_ENV !== 'production' && !pinia._e.active) {
|
|
208
|
-
throw new Error('Pinia destroyed');
|
|
209
|
-
}
|
|
210
|
-
// watcher options for $subscribe
|
|
211
|
-
const $subscribeOptions = {
|
|
212
|
-
deep: true
|
|
213
|
-
};
|
|
214
|
-
/* istanbul ignore else */ if (process.env.NODE_ENV !== 'production' && !isVue2) {
|
|
215
|
-
$subscribeOptions.onTrigger = (event)=>{
|
|
216
|
-
/* istanbul ignore else */ if (isListening) {
|
|
217
|
-
debuggerEvents = event;
|
|
218
|
-
// avoid triggering this while the store is being built and the state is being set in pinia
|
|
219
|
-
} else if (isListening == false && !store._hotUpdating) {
|
|
220
|
-
// let patch send all the events together later
|
|
221
|
-
/* istanbul ignore else */ if (Array.isArray(debuggerEvents)) {
|
|
222
|
-
debuggerEvents.push(event);
|
|
223
|
-
} else {
|
|
224
|
-
console.error('🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.');
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
// internal state
|
|
230
|
-
let isListening; // set to true at the end
|
|
231
|
-
let isSyncListening; // set to true at the end
|
|
232
|
-
let subscriptions = [];
|
|
233
|
-
let actionSubscriptions = [];
|
|
234
|
-
let debuggerEvents;
|
|
235
|
-
const initialState = pinia.state.value[$id];
|
|
236
|
-
// avoid setting the state for option stores if it is set
|
|
237
|
-
// by the setup
|
|
238
|
-
if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {
|
|
239
|
-
/* istanbul ignore if */ {
|
|
240
|
-
pinia.state.value[$id] = {};
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
const hotState = ref({});
|
|
244
|
-
// avoid triggering too many listeners
|
|
245
|
-
// https://github.com/vuejs/pinia/issues/1129
|
|
246
|
-
let activeListener;
|
|
247
|
-
function $patch(partialStateOrMutator) {
|
|
248
|
-
let subscriptionMutation;
|
|
249
|
-
isListening = isSyncListening = false;
|
|
250
|
-
// reset the debugger events since patches are sync
|
|
251
|
-
/* istanbul ignore else */ if (process.env.NODE_ENV !== 'production') {
|
|
252
|
-
debuggerEvents = [];
|
|
253
|
-
}
|
|
254
|
-
if (typeof partialStateOrMutator === 'function') {
|
|
255
|
-
partialStateOrMutator(pinia.state.value[$id]);
|
|
256
|
-
subscriptionMutation = {
|
|
257
|
-
type: MutationType.patchFunction,
|
|
258
|
-
storeId: $id,
|
|
259
|
-
events: debuggerEvents
|
|
260
|
-
};
|
|
261
|
-
} else {
|
|
262
|
-
mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
|
|
263
|
-
subscriptionMutation = {
|
|
264
|
-
type: MutationType.patchObject,
|
|
265
|
-
payload: partialStateOrMutator,
|
|
266
|
-
storeId: $id,
|
|
267
|
-
events: debuggerEvents
|
|
268
|
-
};
|
|
269
|
-
}
|
|
270
|
-
const myListenerId = activeListener = Symbol();
|
|
271
|
-
nextTick().then(()=>{
|
|
272
|
-
if (activeListener === myListenerId) {
|
|
273
|
-
isListening = true;
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
isSyncListening = true;
|
|
277
|
-
// because we paused the watcher, we need to manually call the subscriptions
|
|
278
|
-
triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
|
|
279
|
-
}
|
|
280
|
-
const $reset = isOptionsStore ? function $reset() {
|
|
281
|
-
const { state } = options;
|
|
282
|
-
const newState = state ? state() : {};
|
|
283
|
-
// we use a patch to group all changes into one single subscription
|
|
284
|
-
this.$patch(($state)=>{
|
|
285
|
-
assign($state, newState);
|
|
286
|
-
});
|
|
287
|
-
} : /* istanbul ignore next */ process.env.NODE_ENV !== 'production' ? ()=>{
|
|
288
|
-
throw new Error(`🍍: Store "${$id}" is built using the setup syntax and does not implement $reset().`);
|
|
289
|
-
} : noop$1;
|
|
290
|
-
function $dispose() {
|
|
291
|
-
scope.stop();
|
|
292
|
-
subscriptions = [];
|
|
293
|
-
actionSubscriptions = [];
|
|
294
|
-
pinia._s.delete($id);
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Wraps an action to handle subscriptions.
|
|
298
|
-
*
|
|
299
|
-
* @param name - name of the action
|
|
300
|
-
* @param action - action to wrap
|
|
301
|
-
* @returns a wrapped action to handle subscriptions
|
|
302
|
-
*/ function wrapAction(name, action) {
|
|
303
|
-
return function() {
|
|
304
|
-
setActivePinia(pinia);
|
|
305
|
-
const args = Array.from(arguments);
|
|
306
|
-
const afterCallbackList = [];
|
|
307
|
-
const onErrorCallbackList = [];
|
|
308
|
-
function after(callback) {
|
|
309
|
-
afterCallbackList.push(callback);
|
|
310
|
-
}
|
|
311
|
-
function onError(callback) {
|
|
312
|
-
onErrorCallbackList.push(callback);
|
|
313
|
-
}
|
|
314
|
-
// @ts-expect-error
|
|
315
|
-
triggerSubscriptions(actionSubscriptions, {
|
|
316
|
-
args,
|
|
317
|
-
name,
|
|
318
|
-
store,
|
|
319
|
-
after,
|
|
320
|
-
onError
|
|
321
|
-
});
|
|
322
|
-
let ret;
|
|
323
|
-
try {
|
|
324
|
-
ret = action.apply(this && this.$id === $id ? this : store, args);
|
|
325
|
-
// handle sync errors
|
|
326
|
-
} catch (error) {
|
|
327
|
-
triggerSubscriptions(onErrorCallbackList, error);
|
|
328
|
-
throw error;
|
|
329
|
-
}
|
|
330
|
-
if (ret instanceof Promise) {
|
|
331
|
-
return ret.then((value)=>{
|
|
332
|
-
triggerSubscriptions(afterCallbackList, value);
|
|
333
|
-
return value;
|
|
334
|
-
}).catch((error)=>{
|
|
335
|
-
triggerSubscriptions(onErrorCallbackList, error);
|
|
336
|
-
return Promise.reject(error);
|
|
337
|
-
});
|
|
338
|
-
}
|
|
339
|
-
// trigger after callbacks
|
|
340
|
-
triggerSubscriptions(afterCallbackList, ret);
|
|
341
|
-
return ret;
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
const _hmrPayload = /*#__PURE__*/ markRaw({
|
|
345
|
-
actions: {},
|
|
346
|
-
getters: {},
|
|
347
|
-
state: [],
|
|
348
|
-
hotState
|
|
349
|
-
});
|
|
350
|
-
const partialStore = {
|
|
351
|
-
_p: pinia,
|
|
352
|
-
// _s: scope,
|
|
353
|
-
$id,
|
|
354
|
-
$onAction: addSubscription.bind(null, actionSubscriptions),
|
|
355
|
-
$patch,
|
|
356
|
-
$reset,
|
|
357
|
-
$subscribe (callback, options = {}) {
|
|
358
|
-
const removeSubscription = addSubscription(subscriptions, callback, options.detached, ()=>stopWatcher());
|
|
359
|
-
const stopWatcher = scope.run(()=>watch(()=>pinia.state.value[$id], (state)=>{
|
|
360
|
-
if (options.flush === 'sync' ? isSyncListening : isListening) {
|
|
361
|
-
callback({
|
|
362
|
-
storeId: $id,
|
|
363
|
-
type: MutationType.direct,
|
|
364
|
-
events: debuggerEvents
|
|
365
|
-
}, state);
|
|
366
|
-
}
|
|
367
|
-
}, assign({}, $subscribeOptions, options)));
|
|
368
|
-
return removeSubscription;
|
|
369
|
-
},
|
|
370
|
-
$dispose
|
|
371
|
-
};
|
|
372
|
-
const store = reactive(process.env.NODE_ENV !== 'production' || USE_DEVTOOLS ? assign({
|
|
373
|
-
_hmrPayload,
|
|
374
|
-
_customProperties: markRaw(new Set())
|
|
375
|
-
}, partialStore) : partialStore);
|
|
376
|
-
// store the partial store now so the setup of stores can instantiate each other before they are finished without
|
|
377
|
-
// creating infinite loops.
|
|
378
|
-
pinia._s.set($id, store);
|
|
379
|
-
const runWithContext = pinia._a && pinia._a.runWithContext || fallbackRunWithContext;
|
|
380
|
-
// TODO: idea create skipSerialize that marks properties as non serializable and they are skipped
|
|
381
|
-
const setupStore = runWithContext(()=>pinia._e.run(()=>(scope = effectScope()).run(setup)));
|
|
382
|
-
// overwrite existing actions to support $onAction
|
|
383
|
-
for(const key in setupStore){
|
|
384
|
-
const prop = setupStore[key];
|
|
385
|
-
if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {
|
|
386
|
-
// mark it as a piece of state to be serialized
|
|
387
|
-
if (process.env.NODE_ENV !== 'production' && hot) {
|
|
388
|
-
set(hotState.value, key, toRef(setupStore, key));
|
|
389
|
-
// createOptionStore directly sets the state in pinia.state.value so we
|
|
390
|
-
// can just skip that
|
|
391
|
-
} else if (!isOptionsStore) {
|
|
392
|
-
// in setup stores we must hydrate the state and sync pinia state tree with the refs the user just created
|
|
393
|
-
if (initialState && shouldHydrate(prop)) {
|
|
394
|
-
if (isRef(prop)) {
|
|
395
|
-
prop.value = initialState[key];
|
|
396
|
-
} else {
|
|
397
|
-
// probably a reactive object, lets recursively assign
|
|
398
|
-
// @ts-expect-error: prop is unknown
|
|
399
|
-
mergeReactiveObjects(prop, initialState[key]);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
// transfer the ref to the pinia state to keep everything in sync
|
|
403
|
-
/* istanbul ignore if */ {
|
|
404
|
-
pinia.state.value[$id][key] = prop;
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
/* istanbul ignore else */ if (process.env.NODE_ENV !== 'production') {
|
|
408
|
-
_hmrPayload.state.push(key);
|
|
409
|
-
}
|
|
410
|
-
// action
|
|
411
|
-
} else if (typeof prop === 'function') {
|
|
412
|
-
// @ts-expect-error: we are overriding the function we avoid wrapping if
|
|
413
|
-
const actionValue = process.env.NODE_ENV !== 'production' && hot ? prop : wrapAction(key, prop);
|
|
414
|
-
// this a hot module replacement store because the hotUpdate method needs
|
|
415
|
-
// to do it with the right context
|
|
416
|
-
/* istanbul ignore if */ {
|
|
417
|
-
// @ts-expect-error
|
|
418
|
-
setupStore[key] = actionValue;
|
|
419
|
-
}
|
|
420
|
-
/* istanbul ignore else */ if (process.env.NODE_ENV !== 'production') {
|
|
421
|
-
_hmrPayload.actions[key] = prop;
|
|
422
|
-
}
|
|
423
|
-
// list actions so they can be used in plugins
|
|
424
|
-
// @ts-expect-error
|
|
425
|
-
optionsForPlugin.actions[key] = prop;
|
|
426
|
-
} else if (process.env.NODE_ENV !== 'production') {
|
|
427
|
-
// add getters for devtools
|
|
428
|
-
if (isComputed(prop)) {
|
|
429
|
-
_hmrPayload.getters[key] = isOptionsStore ? options.getters[key] : prop;
|
|
430
|
-
if (IS_CLIENT) {
|
|
431
|
-
const getters = setupStore._getters || // @ts-expect-error: same
|
|
432
|
-
(setupStore._getters = markRaw([]));
|
|
433
|
-
getters.push(key);
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
// add the state, getters, and action properties
|
|
439
|
-
/* istanbul ignore if */ {
|
|
440
|
-
assign(store, setupStore);
|
|
441
|
-
// allows retrieving reactive objects with `storeToRefs()`. Must be called after assigning to the reactive object.
|
|
442
|
-
// Make `storeToRefs()` work with `reactive()` #799
|
|
443
|
-
assign(toRaw(store), setupStore);
|
|
444
|
-
}
|
|
445
|
-
// use this instead of a computed with setter to be able to create it anywhere
|
|
446
|
-
// without linking the computed lifespan to wherever the store is first
|
|
447
|
-
// created.
|
|
448
|
-
Object.defineProperty(store, '$state', {
|
|
449
|
-
get: ()=>process.env.NODE_ENV !== 'production' && hot ? hotState.value : pinia.state.value[$id],
|
|
450
|
-
set: (state)=>{
|
|
451
|
-
/* istanbul ignore if */ if (process.env.NODE_ENV !== 'production' && hot) {
|
|
452
|
-
throw new Error('cannot set hotState');
|
|
453
|
-
}
|
|
454
|
-
$patch(($state)=>{
|
|
455
|
-
assign($state, state);
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
// add the hotUpdate before plugins to allow them to override it
|
|
460
|
-
/* istanbul ignore else */ if (process.env.NODE_ENV !== 'production') {
|
|
461
|
-
store._hotUpdate = markRaw((newStore)=>{
|
|
462
|
-
store._hotUpdating = true;
|
|
463
|
-
newStore._hmrPayload.state.forEach((stateKey)=>{
|
|
464
|
-
if (stateKey in store.$state) {
|
|
465
|
-
const newStateTarget = newStore.$state[stateKey];
|
|
466
|
-
const oldStateSource = store.$state[stateKey];
|
|
467
|
-
if (typeof newStateTarget === 'object' && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {
|
|
468
|
-
patchObject(newStateTarget, oldStateSource);
|
|
469
|
-
} else {
|
|
470
|
-
// transfer the ref
|
|
471
|
-
newStore.$state[stateKey] = oldStateSource;
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
// patch direct access properties to allow store.stateProperty to work as
|
|
475
|
-
// store.$state.stateProperty
|
|
476
|
-
set(store, stateKey, toRef(newStore.$state, stateKey));
|
|
477
|
-
});
|
|
478
|
-
// remove deleted state properties
|
|
479
|
-
Object.keys(store.$state).forEach((stateKey)=>{
|
|
480
|
-
if (!(stateKey in newStore.$state)) {
|
|
481
|
-
del(store, stateKey);
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
// avoid devtools logging this as a mutation
|
|
485
|
-
isListening = false;
|
|
486
|
-
isSyncListening = false;
|
|
487
|
-
pinia.state.value[$id] = toRef(newStore._hmrPayload, 'hotState');
|
|
488
|
-
isSyncListening = true;
|
|
489
|
-
nextTick().then(()=>{
|
|
490
|
-
isListening = true;
|
|
491
|
-
});
|
|
492
|
-
for(const actionName in newStore._hmrPayload.actions){
|
|
493
|
-
const action = newStore[actionName];
|
|
494
|
-
set(store, actionName, wrapAction(actionName, action));
|
|
495
|
-
}
|
|
496
|
-
// TODO: does this work in both setup and option store?
|
|
497
|
-
for(const getterName in newStore._hmrPayload.getters){
|
|
498
|
-
const getter = newStore._hmrPayload.getters[getterName];
|
|
499
|
-
const getterValue = isOptionsStore ? computed(()=>{
|
|
500
|
-
setActivePinia(pinia);
|
|
501
|
-
return getter.call(store, store);
|
|
502
|
-
}) : getter;
|
|
503
|
-
set(store, getterName, getterValue);
|
|
504
|
-
}
|
|
505
|
-
// remove deleted getters
|
|
506
|
-
Object.keys(store._hmrPayload.getters).forEach((key)=>{
|
|
507
|
-
if (!(key in newStore._hmrPayload.getters)) {
|
|
508
|
-
del(store, key);
|
|
509
|
-
}
|
|
510
|
-
});
|
|
511
|
-
// remove old actions
|
|
512
|
-
Object.keys(store._hmrPayload.actions).forEach((key)=>{
|
|
513
|
-
if (!(key in newStore._hmrPayload.actions)) {
|
|
514
|
-
del(store, key);
|
|
515
|
-
}
|
|
516
|
-
});
|
|
517
|
-
// update the values used in devtools and to allow deleting new properties later on
|
|
518
|
-
store._hmrPayload = newStore._hmrPayload;
|
|
519
|
-
store._getters = newStore._getters;
|
|
520
|
-
store._hotUpdating = false;
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
if (USE_DEVTOOLS) {
|
|
524
|
-
const nonEnumerable = {
|
|
525
|
-
writable: true,
|
|
526
|
-
configurable: true,
|
|
527
|
-
// avoid warning on devtools trying to display this property
|
|
528
|
-
enumerable: false
|
|
529
|
-
};
|
|
530
|
-
[
|
|
531
|
-
'_p',
|
|
532
|
-
'_hmrPayload',
|
|
533
|
-
'_getters',
|
|
534
|
-
'_customProperties'
|
|
535
|
-
].forEach((p)=>{
|
|
536
|
-
Object.defineProperty(store, p, assign({
|
|
537
|
-
value: store[p]
|
|
538
|
-
}, nonEnumerable));
|
|
539
|
-
});
|
|
540
|
-
}
|
|
541
|
-
// apply all plugins
|
|
542
|
-
pinia._p.forEach((extender)=>{
|
|
543
|
-
/* istanbul ignore else */ if (USE_DEVTOOLS) {
|
|
544
|
-
const extensions = scope.run(()=>extender({
|
|
545
|
-
store,
|
|
546
|
-
app: pinia._a,
|
|
547
|
-
pinia,
|
|
548
|
-
options: optionsForPlugin
|
|
549
|
-
}));
|
|
550
|
-
Object.keys(extensions || {}).forEach((key)=>store._customProperties.add(key));
|
|
551
|
-
assign(store, extensions);
|
|
552
|
-
} else {
|
|
553
|
-
assign(store, scope.run(()=>extender({
|
|
554
|
-
store,
|
|
555
|
-
app: pinia._a,
|
|
556
|
-
pinia,
|
|
557
|
-
options: optionsForPlugin
|
|
558
|
-
})));
|
|
559
|
-
}
|
|
560
|
-
});
|
|
561
|
-
if (process.env.NODE_ENV !== 'production' && store.$state && typeof store.$state === 'object' && typeof store.$state.constructor === 'function' && !store.$state.constructor.toString().includes('[native code]')) {
|
|
562
|
-
console.warn(`[🍍]: The "state" must be a plain object. It cannot be\n` + `\tstate: () => new MyClass()\n` + `Found in store "${store.$id}".`);
|
|
563
|
-
}
|
|
564
|
-
// only apply hydrate to option stores with an initial state in pinia
|
|
565
|
-
if (initialState && isOptionsStore && options.hydrate) {
|
|
566
|
-
options.hydrate(store.$state, initialState);
|
|
567
|
-
}
|
|
568
|
-
isListening = true;
|
|
569
|
-
isSyncListening = true;
|
|
570
|
-
return store;
|
|
571
|
-
}
|
|
572
|
-
function defineStore(// TODO: add proper types from above
|
|
573
|
-
idOrOptions, setup, setupOptions) {
|
|
574
|
-
let id;
|
|
575
|
-
let options;
|
|
576
|
-
const isSetupStore = typeof setup === 'function';
|
|
577
|
-
{
|
|
578
|
-
id = idOrOptions;
|
|
579
|
-
// the option store setup will contain the actual options in this case
|
|
580
|
-
options = isSetupStore ? setupOptions : setup;
|
|
581
|
-
}
|
|
582
|
-
function useStore(pinia, hot) {
|
|
583
|
-
const hasContext = hasInjectionContext();
|
|
584
|
-
pinia = // in test mode, ignore the argument provided as we can always retrieve a
|
|
585
|
-
// pinia instance with getActivePinia()
|
|
586
|
-
(process.env.NODE_ENV === 'test' && activePinia && activePinia._testing ? null : pinia) || (hasContext ? inject$2(piniaSymbol, null) : null);
|
|
587
|
-
if (pinia) setActivePinia(pinia);
|
|
588
|
-
if (process.env.NODE_ENV !== 'production' && !activePinia) {
|
|
589
|
-
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?\n` + `See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\n` + `This will fail in production.`);
|
|
590
|
-
}
|
|
591
|
-
pinia = activePinia;
|
|
592
|
-
if (!pinia._s.has(id)) {
|
|
593
|
-
// creating the store registers it in `pinia._s`
|
|
594
|
-
if (isSetupStore) {
|
|
595
|
-
createSetupStore(id, setup, options, pinia);
|
|
596
|
-
} else {
|
|
597
|
-
createOptionsStore(id, options, pinia);
|
|
598
|
-
}
|
|
599
|
-
/* istanbul ignore else */ if (process.env.NODE_ENV !== 'production') {
|
|
600
|
-
// @ts-expect-error: not the right inferred type
|
|
601
|
-
useStore._pinia = pinia;
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
const store = pinia._s.get(id);
|
|
605
|
-
if (process.env.NODE_ENV !== 'production' && hot) {
|
|
606
|
-
const hotId = '__hot:' + id;
|
|
607
|
-
const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia, true) : createOptionsStore(hotId, assign({}, options), pinia, true);
|
|
608
|
-
hot._hotUpdate(newStore);
|
|
609
|
-
// cleanup the state properties and the store from the cache
|
|
610
|
-
delete pinia.state.value[hotId];
|
|
611
|
-
pinia._s.delete(hotId);
|
|
612
|
-
}
|
|
613
|
-
if (process.env.NODE_ENV !== 'production' && IS_CLIENT) {
|
|
614
|
-
const currentInstance = getCurrentInstance();
|
|
615
|
-
// save stores in instances to access them devtools
|
|
616
|
-
if (currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement
|
|
617
|
-
!hot) {
|
|
618
|
-
const vm = currentInstance.proxy;
|
|
619
|
-
const cache = '_pStores' in vm ? vm._pStores : vm._pStores = {};
|
|
620
|
-
cache[id] = store;
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
// StoreGeneric cannot be casted towards Store
|
|
624
|
-
return store;
|
|
625
|
-
}
|
|
626
|
-
useStore.$id = id;
|
|
627
|
-
return useStore;
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* Creates an object of references with all the state, getters, and plugin-added
|
|
631
|
-
* state properties of the store. Similar to `toRefs()` but specifically
|
|
632
|
-
* designed for Pinia stores so methods and non reactive properties are
|
|
633
|
-
* completely ignored.
|
|
634
|
-
*
|
|
635
|
-
* @param store - store to extract the refs from
|
|
636
|
-
*/ function storeToRefs$1(store) {
|
|
637
|
-
// See https://github.com/vuejs/pinia/issues/852
|
|
638
|
-
// It's easier to just use toRefs() even if it includes more stuff
|
|
639
|
-
{
|
|
640
|
-
store = toRaw(store);
|
|
641
|
-
const refs = {};
|
|
642
|
-
for(const key in store){
|
|
643
|
-
const value = store[key];
|
|
644
|
-
if (isRef(value) || isReactive(value)) {
|
|
645
|
-
// @ts-expect-error: the key is state or getter
|
|
646
|
-
refs[key] = // ---
|
|
647
|
-
toRef(store, key);
|
|
648
|
-
}
|
|
649
|
-
}
|
|
650
|
-
return refs;
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
|
|
654
17
|
function inject$1(key, instance) {
|
|
655
18
|
if (instance && instance._context && instance._context.provides && instance._context.provides[key]) {
|
|
656
19
|
return instance._context.provides[key];
|
|
@@ -988,7 +351,7 @@ function installStore(app, options = {}) {
|
|
|
988
351
|
const storeCreator = defineStore(STORE_ID, ()=>createStore({
|
|
989
352
|
baseURL: options.baseURL
|
|
990
353
|
}));
|
|
991
|
-
const store = storeCreator(
|
|
354
|
+
const store = storeCreator();
|
|
992
355
|
const cookies = useCookies();
|
|
993
356
|
let cookieGet;
|
|
994
357
|
if (options.cookieGet) {
|
|
@@ -1119,7 +482,7 @@ function installHTTPClient(app, options = {}) {
|
|
|
1119
482
|
baseURL: options.baseURL
|
|
1120
483
|
});
|
|
1121
484
|
const storeCreator = injectStore(app);
|
|
1122
|
-
const store = storeCreator(
|
|
485
|
+
const store = storeCreator();
|
|
1123
486
|
const { refreshToken } = storeToRefs$1(store);
|
|
1124
487
|
const tokenHook = new ClientResponseErrorTokenHook(client, {
|
|
1125
488
|
baseURL: options.baseURL,
|
|
@@ -1357,39 +720,46 @@ function buildListDeletedHandler(items, cb) {
|
|
|
1357
720
|
return input;
|
|
1358
721
|
}
|
|
1359
722
|
|
|
1360
|
-
const SocketClientSymbol = Symbol.for('
|
|
1361
|
-
function
|
|
1362
|
-
|
|
1363
|
-
return false;
|
|
1364
|
-
}
|
|
1365
|
-
const instance = inject$1(SocketClientSymbol);
|
|
1366
|
-
return !!instance;
|
|
723
|
+
const SocketClientSymbol = Symbol.for('AuthupSocketManager');
|
|
724
|
+
function isSocketManagerUsable() {
|
|
725
|
+
return !!inject$1(SocketClientSymbol);
|
|
1367
726
|
}
|
|
1368
|
-
function
|
|
727
|
+
function provideSocketManager(manager, app) {
|
|
1369
728
|
provide(SocketClientSymbol, manager, app);
|
|
1370
729
|
}
|
|
1371
|
-
function
|
|
1372
|
-
const manager = inject$1(SocketClientSymbol);
|
|
730
|
+
function injectSocketManager(app) {
|
|
731
|
+
const manager = inject$1(SocketClientSymbol, app);
|
|
1373
732
|
if (!manager) {
|
|
1374
|
-
throw new Error('The socket
|
|
733
|
+
throw new Error('The socket manager has not been injected in the app context.');
|
|
1375
734
|
}
|
|
1376
735
|
return manager;
|
|
1377
736
|
}
|
|
1378
737
|
|
|
1379
|
-
function
|
|
1380
|
-
const
|
|
1381
|
-
|
|
738
|
+
function installSocketManager(app, options) {
|
|
739
|
+
const store = useStore();
|
|
740
|
+
const { accessToken } = storeToRefs(store);
|
|
741
|
+
const manager = new ClientManager({
|
|
742
|
+
url: options.baseURL,
|
|
743
|
+
token: ()=>accessToken.value
|
|
744
|
+
});
|
|
745
|
+
const oldValue = ref();
|
|
746
|
+
store.$subscribe((mutation, state)=>{
|
|
747
|
+
if (state.accessToken !== oldValue.value) {
|
|
748
|
+
oldValue.value = state.accessToken;
|
|
749
|
+
Promise.resolve().then(()=>manager.reconnect());
|
|
750
|
+
}
|
|
1382
751
|
});
|
|
1383
|
-
|
|
752
|
+
provideSocketManager(manager, app);
|
|
1384
753
|
}
|
|
1385
754
|
|
|
1386
755
|
function createEntitySocket(ctx) {
|
|
1387
|
-
if (!
|
|
756
|
+
if (!isSocketManagerUsable()) {
|
|
1388
757
|
return {
|
|
1389
758
|
mount () {},
|
|
1390
759
|
unmount () {}
|
|
1391
760
|
};
|
|
1392
761
|
}
|
|
762
|
+
const socketManager = injectSocketManager();
|
|
1393
763
|
const store = useStore();
|
|
1394
764
|
const storeRefs = storeToRefs(store);
|
|
1395
765
|
const realmId = computed(()=>{
|
|
@@ -1449,7 +819,6 @@ function createEntitySocket(ctx) {
|
|
|
1449
819
|
return;
|
|
1450
820
|
}
|
|
1451
821
|
mounted = true;
|
|
1452
|
-
const socketManager = injectSocketClientManager();
|
|
1453
822
|
const socket = await socketManager.connect(`/resources#${realmId.value}`);
|
|
1454
823
|
let event;
|
|
1455
824
|
if (ctx.buildSubscribeEventName) {
|
|
@@ -1473,7 +842,6 @@ function createEntitySocket(ctx) {
|
|
|
1473
842
|
return;
|
|
1474
843
|
}
|
|
1475
844
|
mounted = false;
|
|
1476
|
-
const socketManager = injectSocketClientManager();
|
|
1477
845
|
const socket = await socketManager.connect(`/resources#${realmId.value}`);
|
|
1478
846
|
let event;
|
|
1479
847
|
if (ctx.buildUnsubscribeEventName) {
|
|
@@ -3603,7 +2971,8 @@ const AClientScopeAssignments = defineComponent({
|
|
|
3603
2971
|
return ()=>h(AScopes, {}, {
|
|
3604
2972
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(AClientScopeAssignment, {
|
|
3605
2973
|
clientId: props.entityId,
|
|
3606
|
-
scopeId: slotProps.data.id
|
|
2974
|
+
scopeId: slotProps.data.id,
|
|
2975
|
+
key: slotProps.data.id
|
|
3607
2976
|
}),
|
|
3608
2977
|
...slots
|
|
3609
2978
|
});
|
|
@@ -6074,7 +5443,8 @@ const APermissionRobotAssignments = defineComponent({
|
|
|
6074
5443
|
return ()=>h(ARobots, {}, {
|
|
6075
5444
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(ARobotPermissionAssignment, {
|
|
6076
5445
|
permissionId: props.entityId,
|
|
6077
|
-
robotId: slotProps.data.id
|
|
5446
|
+
robotId: slotProps.data.id,
|
|
5447
|
+
key: slotProps.data.id
|
|
6078
5448
|
}),
|
|
6079
5449
|
...slots
|
|
6080
5450
|
});
|
|
@@ -6128,7 +5498,8 @@ const ARolePermissionAssignments = defineComponent({
|
|
|
6128
5498
|
return ()=>h(APermissions, {}, {
|
|
6129
5499
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(ARolePermissionAssignment, {
|
|
6130
5500
|
roleId: props.entityId,
|
|
6131
|
-
permissionId: slotProps.data.id
|
|
5501
|
+
permissionId: slotProps.data.id,
|
|
5502
|
+
key: slotProps.data.id
|
|
6132
5503
|
}),
|
|
6133
5504
|
...slots
|
|
6134
5505
|
});
|
|
@@ -6146,7 +5517,8 @@ const APermissionRoleAssignments = defineComponent({
|
|
|
6146
5517
|
return ()=>h(ARoles, {}, {
|
|
6147
5518
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(ARolePermissionAssignment, {
|
|
6148
5519
|
permissionId: props.entityId,
|
|
6149
|
-
roleId: slotProps.data.id
|
|
5520
|
+
roleId: slotProps.data.id,
|
|
5521
|
+
key: slotProps.data.id
|
|
6150
5522
|
}),
|
|
6151
5523
|
...slots
|
|
6152
5524
|
});
|
|
@@ -6200,7 +5572,8 @@ const AUserPermissionAssignments = defineComponent({
|
|
|
6200
5572
|
return ()=>h(APermissions, {}, {
|
|
6201
5573
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(AUserPermissionAssignment, {
|
|
6202
5574
|
userId: props.entityId,
|
|
6203
|
-
permissionId: slotProps.data.id
|
|
5575
|
+
permissionId: slotProps.data.id,
|
|
5576
|
+
key: slotProps.data.id
|
|
6204
5577
|
}),
|
|
6205
5578
|
...slots
|
|
6206
5579
|
});
|
|
@@ -6650,7 +6023,8 @@ const APermissionUserAssignments = defineComponent({
|
|
|
6650
6023
|
return ()=>h(AUsers, {}, {
|
|
6651
6024
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(AUserPermissionAssignment, {
|
|
6652
6025
|
permissionId: props.entityId,
|
|
6653
|
-
userId: slotProps.data.id
|
|
6026
|
+
userId: slotProps.data.id,
|
|
6027
|
+
key: slotProps.data.id
|
|
6654
6028
|
}),
|
|
6655
6029
|
...slots
|
|
6656
6030
|
});
|
|
@@ -6668,7 +6042,8 @@ const ARobotPermissionAssignments = defineComponent({
|
|
|
6668
6042
|
return ()=>h(APermissions, {}, {
|
|
6669
6043
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(ARobotPermissionAssignment, {
|
|
6670
6044
|
robotId: props.entityId,
|
|
6671
|
-
permissionId: slotProps.data.id
|
|
6045
|
+
permissionId: slotProps.data.id,
|
|
6046
|
+
key: slotProps.data.id
|
|
6672
6047
|
}),
|
|
6673
6048
|
...slots
|
|
6674
6049
|
});
|
|
@@ -6719,7 +6094,8 @@ const ARobotRoleAssignments = defineComponent({
|
|
|
6719
6094
|
return ()=>h(ARoles, {}, {
|
|
6720
6095
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(ARobotRoleAssignment, {
|
|
6721
6096
|
robotId: props.entityId,
|
|
6722
|
-
roleId: slotProps.data.id
|
|
6097
|
+
roleId: slotProps.data.id,
|
|
6098
|
+
key: slotProps.data.id
|
|
6723
6099
|
}),
|
|
6724
6100
|
...slots
|
|
6725
6101
|
});
|
|
@@ -6734,7 +6110,8 @@ const ARoleRobotAssignments = defineComponent({
|
|
|
6734
6110
|
return ()=>h(ARobots, {}, {
|
|
6735
6111
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(ARobotRoleAssignment, {
|
|
6736
6112
|
roleId: props.entityId,
|
|
6737
|
-
robotId: slotProps.data.id
|
|
6113
|
+
robotId: slotProps.data.id,
|
|
6114
|
+
key: slotProps.data.id
|
|
6738
6115
|
})
|
|
6739
6116
|
});
|
|
6740
6117
|
}
|
|
@@ -6784,7 +6161,8 @@ const AUserRoleAssignments = defineComponent({
|
|
|
6784
6161
|
return ()=>h(ARoles, {}, {
|
|
6785
6162
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(AUserRoleAssignment, {
|
|
6786
6163
|
userId: props.entityId,
|
|
6787
|
-
roleId: slotProps.data.id
|
|
6164
|
+
roleId: slotProps.data.id,
|
|
6165
|
+
key: slotProps.data.id
|
|
6788
6166
|
}),
|
|
6789
6167
|
...slots
|
|
6790
6168
|
});
|
|
@@ -6799,7 +6177,8 @@ const ARoleUserAssignments = defineComponent({
|
|
|
6799
6177
|
return ()=>h(AUsers, {}, {
|
|
6800
6178
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(AUserRoleAssignment, {
|
|
6801
6179
|
roleId: props.entityId,
|
|
6802
|
-
userId: slotProps.data.id
|
|
6180
|
+
userId: slotProps.data.id,
|
|
6181
|
+
key: slotProps.data.id
|
|
6803
6182
|
}),
|
|
6804
6183
|
...slots
|
|
6805
6184
|
});
|
|
@@ -6817,7 +6196,8 @@ const AScopeClientAssignments = defineComponent({
|
|
|
6817
6196
|
return ()=>h(AClients, {}, {
|
|
6818
6197
|
[SlotName.ITEM_ACTIONS]: (slotProps)=>h(AClientScopeAssignment, {
|
|
6819
6198
|
scopeId: props.entityId,
|
|
6820
|
-
clientId: slotProps.data.id
|
|
6199
|
+
clientId: slotProps.data.id,
|
|
6200
|
+
key: slotProps.data.id
|
|
6821
6201
|
}),
|
|
6822
6202
|
...slots
|
|
6823
6203
|
});
|
|
@@ -7244,66 +6624,66 @@ const AEntityDelete = defineComponent({
|
|
|
7244
6624
|
});
|
|
7245
6625
|
|
|
7246
6626
|
var components = /*#__PURE__*/Object.freeze({
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
6627
|
+
__proto__: null,
|
|
6628
|
+
AClient: AClient,
|
|
6629
|
+
AClientForm: AClientForm,
|
|
6630
|
+
AClientRedirectUris: AClientRedirectUris,
|
|
6631
|
+
AClientRedirectUrisItem: AClientRedirectUrisItem,
|
|
6632
|
+
AClientScope: AClientScope,
|
|
6633
|
+
AClientScopeAssignment: AClientScopeAssignment,
|
|
6634
|
+
AClientScopeAssignments: AClientScopeAssignments,
|
|
6635
|
+
AClientScopes: AClientScopes,
|
|
6636
|
+
AClients: AClients,
|
|
6637
|
+
AEntityDelete: AEntityDelete,
|
|
6638
|
+
AIdentityProvider: AIdentityProvider,
|
|
6639
|
+
AIdentityProviderForm: AIdentityProviderForm,
|
|
6640
|
+
AIdentityProviderIcon: AIdentityProviderIcon,
|
|
6641
|
+
AIdentityProviderLdapForm: AIdentityProviderLdapForm,
|
|
6642
|
+
AIdentityProviderOAuth2Form: AIdentityProviderOAuth2Form,
|
|
6643
|
+
AIdentityProviderPreset: AIdentityProviderPreset,
|
|
6644
|
+
AIdentityProviderProtocol: AIdentityProviderProtocol,
|
|
6645
|
+
AIdentityProviderRoleAssignment: AIdentityProviderRoleAssignment,
|
|
6646
|
+
AIdentityProviderRoleAssignments: AIdentityProviderRoleAssignments,
|
|
6647
|
+
AIdentityProviders: AIdentityProviders,
|
|
6648
|
+
APagination: APagination,
|
|
6649
|
+
APermission: APermission,
|
|
6650
|
+
APermissionForm: APermissionForm,
|
|
6651
|
+
APermissionRobotAssignments: APermissionRobotAssignments,
|
|
6652
|
+
APermissionRoleAssignments: APermissionRoleAssignments,
|
|
6653
|
+
APermissionUserAssignments: APermissionUserAssignments,
|
|
6654
|
+
APermissions: APermissions,
|
|
6655
|
+
ARealm: ARealm,
|
|
6656
|
+
ARealmForm: ARealmForm,
|
|
6657
|
+
ARealms: ARealms,
|
|
6658
|
+
ARobot: ARobot,
|
|
6659
|
+
ARobotForm: ARobotForm,
|
|
6660
|
+
ARobotPermissionAssignment: ARobotPermissionAssignment,
|
|
6661
|
+
ARobotPermissionAssignments: ARobotPermissionAssignments,
|
|
6662
|
+
ARobotRoleAssignment: ARobotRoleAssignment,
|
|
6663
|
+
ARobotRoleAssignments: ARobotRoleAssignments,
|
|
6664
|
+
ARobots: ARobots,
|
|
6665
|
+
ARole: ARole,
|
|
6666
|
+
ARoleForm: ARoleForm,
|
|
6667
|
+
ARolePermissionAssignment: ARolePermissionAssignment,
|
|
6668
|
+
ARolePermissionAssignments: ARolePermissionAssignments,
|
|
6669
|
+
ARoleRobotAssignments: ARoleRobotAssignments,
|
|
6670
|
+
ARoleUserAssignments: ARoleUserAssignments,
|
|
6671
|
+
ARoles: ARoles,
|
|
6672
|
+
AScope: AScope,
|
|
6673
|
+
AScopeClientAssignments: AScopeClientAssignments,
|
|
6674
|
+
AScopeForm: AScopeForm,
|
|
6675
|
+
AScopes: AScopes,
|
|
6676
|
+
ASearch: ASearch,
|
|
6677
|
+
ATitle: ATitle,
|
|
6678
|
+
AUser: AUser,
|
|
6679
|
+
AUserForm: AUserForm,
|
|
6680
|
+
AUserPasswordForm: AUserPasswordForm,
|
|
6681
|
+
AUserPermissionAssignment: AUserPermissionAssignment,
|
|
6682
|
+
AUserPermissionAssignments: AUserPermissionAssignments,
|
|
6683
|
+
AUserRoleAssignment: AUserRoleAssignment,
|
|
6684
|
+
AUserRoleAssignments: AUserRoleAssignments,
|
|
6685
|
+
AUsers: AUsers,
|
|
6686
|
+
LanguageSwitcherDropdown: LanguageSwitcherDropdown
|
|
7307
6687
|
});
|
|
7308
6688
|
|
|
7309
6689
|
function installComponents(input) {
|
|
@@ -7324,23 +6704,18 @@ function installComponents(input) {
|
|
|
7324
6704
|
}
|
|
7325
6705
|
function install(app1, options) {
|
|
7326
6706
|
if (options.realtime) {
|
|
7327
|
-
|
|
6707
|
+
installSocketManager(app1, {
|
|
7328
6708
|
baseURL: options.realtimeURL || options.baseURL
|
|
7329
6709
|
});
|
|
7330
6710
|
}
|
|
7331
|
-
if (options.pinia) {
|
|
7332
|
-
setActivePinia(options.pinia);
|
|
7333
|
-
}
|
|
7334
6711
|
installStore(app1, {
|
|
7335
6712
|
baseURL: options.baseURL,
|
|
7336
6713
|
cookieSet: options.cookieSet,
|
|
7337
6714
|
cookieGet: options.cookieGet,
|
|
7338
|
-
cookieUnset: options.cookieUnset
|
|
7339
|
-
pinia: options.pinia
|
|
6715
|
+
cookieUnset: options.cookieUnset
|
|
7340
6716
|
});
|
|
7341
6717
|
installHTTPClient(app1, {
|
|
7342
|
-
baseURL: options.baseURL
|
|
7343
|
-
pinia: options.pinia
|
|
6718
|
+
baseURL: options.baseURL
|
|
7344
6719
|
});
|
|
7345
6720
|
installTranslator(app1, {
|
|
7346
6721
|
locale: options.translatorLocale
|
|
@@ -7352,5 +6727,5 @@ var index = {
|
|
|
7352
6727
|
install
|
|
7353
6728
|
};
|
|
7354
6729
|
|
|
7355
|
-
export { AClient, AClientForm, AClientRedirectUris, AClientRedirectUrisItem, AClientScope, AClientScopeAssignment, AClientScopeAssignments, AClientScopes, AClients, AEntityDelete, AIdentityProvider, AIdentityProviderForm, AIdentityProviderIcon, AIdentityProviderLdapForm, AIdentityProviderOAuth2Form, AIdentityProviderPreset, AIdentityProviderProtocol, AIdentityProviderRoleAssignment, AIdentityProviderRoleAssignments, AIdentityProviders, APagination, APermission, APermissionForm, APermissionRobotAssignments, APermissionRoleAssignments, APermissionUserAssignments, APermissions, ARealm, ARealmForm, ARealms, ARobot, ARobotForm, ARobotPermissionAssignment, ARobotPermissionAssignments, ARobotRoleAssignment, ARobotRoleAssignments, ARobots, ARole, ARoleForm, ARolePermissionAssignment, ARolePermissionAssignments, ARoleRobotAssignments, ARoleUserAssignments, ARoles, AScope, AScopeClientAssignments, AScopeForm, AScopes, ASearch, ATitle, AUser, AUserForm, AUserPasswordForm, AUserPermissionAssignment, AUserPermissionAssignments, AUserRoleAssignment, AUserRoleAssignments, AUsers, EntityManagerError, HTTPClientSymbol, LanguageSwitcherDropdown, STORE_ID, SocketClientSymbol, StoreSymbol, TranslatorTranslationClientKey, TranslatorTranslationDefaultKey, TranslatorTranslationGroup, TranslatorTranslationVuecsKey, VuelidateCustomRule, VuelidateCustomRuleKey, buildEntityManagerSlotProps, buildFormSubmitWithTranslations, buildListCreatedHandler, buildListDeletedHandler, buildListUpdatedHandler, createEntityManager, createFormSubmitTranslations, createList, createStore, index as default, defineEntityManagerEvents, defineEntityManagerProps, defineListEvents, defineListProps, extendObjectProperties, extractVuelidateResultsFromChild, getVuelidateSeverity, hasHTTPClient, hasNormalizedSlot, hasStore, initFormAttributesFromSource, inject$1 as inject, injectHTTPClient,
|
|
6730
|
+
export { AClient, AClientForm, AClientRedirectUris, AClientRedirectUrisItem, AClientScope, AClientScopeAssignment, AClientScopeAssignments, AClientScopes, AClients, AEntityDelete, AIdentityProvider, AIdentityProviderForm, AIdentityProviderIcon, AIdentityProviderLdapForm, AIdentityProviderOAuth2Form, AIdentityProviderPreset, AIdentityProviderProtocol, AIdentityProviderRoleAssignment, AIdentityProviderRoleAssignments, AIdentityProviders, APagination, APermission, APermissionForm, APermissionRobotAssignments, APermissionRoleAssignments, APermissionUserAssignments, APermissions, ARealm, ARealmForm, ARealms, ARobot, ARobotForm, ARobotPermissionAssignment, ARobotPermissionAssignments, ARobotRoleAssignment, ARobotRoleAssignments, ARobots, ARole, ARoleForm, ARolePermissionAssignment, ARolePermissionAssignments, ARoleRobotAssignments, ARoleUserAssignments, ARoles, AScope, AScopeClientAssignments, AScopeForm, AScopes, ASearch, ATitle, AUser, AUserForm, AUserPasswordForm, AUserPermissionAssignment, AUserPermissionAssignments, AUserRoleAssignment, AUserRoleAssignments, AUsers, EntityManagerError, HTTPClientSymbol, LanguageSwitcherDropdown, STORE_ID, SocketClientSymbol, StoreSymbol, TranslatorTranslationClientKey, TranslatorTranslationDefaultKey, TranslatorTranslationGroup, TranslatorTranslationVuecsKey, VuelidateCustomRule, VuelidateCustomRuleKey, buildEntityManagerSlotProps, buildFormSubmitWithTranslations, buildListCreatedHandler, buildListDeletedHandler, buildListUpdatedHandler, createEntityManager, createFormSubmitTranslations, createList, createStore, index as default, defineEntityManagerEvents, defineEntityManagerProps, defineListEvents, defineListProps, extendObjectProperties, extractVuelidateResultsFromChild, getVuelidateSeverity, hasHTTPClient, hasNormalizedSlot, hasStore, initFormAttributesFromSource, inject$1 as inject, injectHTTPClient, injectSocketManager, injectStore, injectTranslatorLocale, install, installHTTPClient, installSocketManager, installStore, installTranslator, isQuerySortedDescByDate, isSocketManagerUsable, mergeListOptions, normalizeSlot, onChange, provide, provideHTTPClient, provideSocketManager, provideStore, renderEntityAssignAction, storeToRefs, useAbilityCheck, useIsEditing, useRealmResourceWritableCheck, useStore, useTranslation, useTranslationsForBaseValidation, useTranslationsForGroup, useTranslationsForNestedValidation, useUpdatedAt, wrapFnWithBusyState };
|
|
7356
6731
|
//# sourceMappingURL=index.mjs.map
|