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