@authup/client-web-kit 1.0.0-beta.29 → 1.0.0-beta.32

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.
Files changed (61) hide show
  1. package/dist/components/entities/identity-provider/AIdentityProviderIcon.d.ts +1 -3
  2. package/dist/components/entities/identity-provider/AIdentityProviderIcon.d.ts.map +1 -1
  3. package/dist/components/entities/identity-provider-role/AIdentityProviderRoleAssignment.d.ts.map +1 -1
  4. package/dist/components/entities/index.d.ts +1 -0
  5. package/dist/components/entities/index.d.ts.map +1 -1
  6. package/dist/components/entities/permission/APermissionCheck.d.ts +3 -3
  7. package/dist/components/entities/permission/APermissionCheck.d.ts.map +1 -1
  8. package/dist/components/entities/permission/APermissionForm.d.ts.map +1 -1
  9. package/dist/components/entities/permission-policy/APermissionPolicyAssignment.d.ts +29 -0
  10. package/dist/components/entities/permission-policy/APermissionPolicyAssignment.d.ts.map +1 -0
  11. package/dist/components/entities/permission-policy/APermissionPolicyAssignments.d.ts +15 -0
  12. package/dist/components/entities/permission-policy/APermissionPolicyAssignments.d.ts.map +1 -0
  13. package/dist/components/entities/permission-policy/index.d.ts +3 -0
  14. package/dist/components/entities/permission-policy/index.d.ts.map +1 -0
  15. package/dist/components/entities/policy/APolicyBasicForm.vue.d.ts.map +1 -1
  16. package/dist/components/entities/policy/APolicyForm.vue.d.ts.map +1 -1
  17. package/dist/components/entities/policy/attribute-names/AAttributeNamesPolicyForm.vue.d.ts.map +1 -1
  18. package/dist/components/entities/policy/date/ADatePolicyForm.vue.d.ts.map +1 -1
  19. package/dist/components/entities/policy/identity/AIdentityPolicyForm.vue.d.ts.map +1 -1
  20. package/dist/components/entities/policy/realm-match/ARealmMatchPolicyForm.vue.d.ts +16 -16
  21. package/dist/components/entities/policy/realm-match/ARealmMatchPolicyForm.vue.d.ts.map +1 -1
  22. package/dist/components/entities/policy/time/ATimePolicyForm.vue.d.ts +12 -12
  23. package/dist/components/entities/policy/time/ATimePolicyForm.vue.d.ts.map +1 -1
  24. package/dist/components/entities/user/AUserForm.d.ts +4 -4
  25. package/dist/components/entities/user/AUserForm.d.ts.map +1 -1
  26. package/dist/components/entities/user/AUserPasswordForm.d.ts +8 -5
  27. package/dist/components/entities/user/AUserPasswordForm.d.ts.map +1 -1
  28. package/dist/components/utility/entity/collection/utils/handlers.d.ts.map +1 -1
  29. package/dist/components/utility/entity/picker/types.d.ts.map +1 -1
  30. package/dist/components/utility/entity/record/types.d.ts +1 -1
  31. package/dist/components/utility/entity/record/types.d.ts.map +1 -1
  32. package/dist/components/utility/form-input-list/AFormInputList.vue.d.ts.map +1 -1
  33. package/dist/components/utility/form-input-list/AFormInputListItem.vue.d.ts.map +1 -1
  34. package/dist/components/utility/pagination/APagination.d.ts +0 -2
  35. package/dist/components/utility/pagination/APagination.d.ts.map +1 -1
  36. package/dist/components/utility/pagination/type.d.ts +1 -1
  37. package/dist/components/utility/pagination/type.d.ts.map +1 -1
  38. package/dist/components/utility/search/ASearch.d.ts +2 -2
  39. package/dist/components/utility/search/ASearch.d.ts.map +1 -1
  40. package/dist/components/workflows/Login.vue.d.ts +1 -5
  41. package/dist/components/workflows/Login.vue.d.ts.map +1 -1
  42. package/dist/components/workflows/authorize/Authorize.vue.d.ts +38 -6
  43. package/dist/components/workflows/authorize/Authorize.vue.d.ts.map +1 -1
  44. package/dist/components/workflows/authorize/AuthorizeForm.vue.d.ts +37 -1
  45. package/dist/components/workflows/authorize/AuthorizeForm.vue.d.ts.map +1 -1
  46. package/dist/components/workflows/authorize/AuthorizeScopes.vue.d.ts +37 -1
  47. package/dist/components/workflows/authorize/AuthorizeScopes.vue.d.ts.map +1 -1
  48. package/dist/composables/updated-at.d.ts +1 -1
  49. package/dist/composables/updated-at.d.ts.map +1 -1
  50. package/dist/composables/use-permission-check.d.ts +2 -2
  51. package/dist/composables/use-permission-check.d.ts.map +1 -1
  52. package/dist/core/permission-check/types.d.ts +2 -2
  53. package/dist/core/permission-check/types.d.ts.map +1 -1
  54. package/dist/core/socket-manager/install.d.ts.map +1 -1
  55. package/dist/core/store/create.d.ts +3 -2
  56. package/dist/core/store/create.d.ts.map +1 -1
  57. package/dist/core/store/types.d.ts.map +1 -1
  58. package/dist/index.css +12 -12
  59. package/dist/index.mjs +1272 -1634
  60. package/dist/index.mjs.map +1 -1
  61. package/package.json +36 -36
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import installFormControl, { VCFormGroup, VCFormInput, buildFormSubmit, buildFormInputText, buildFormGroup, buildFormInput, buildFormTextarea, buildFormInputCheckbox, VCFormInputCheckbox } from '@vuecs/form-controls';
2
2
  import { hasOwnProperty, isObject as isObject$1, merge, createMerger } from 'smob';
3
- import { hasInjectionContext, inject as inject$3, provide as provide$2, defineComponent, reactive, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, withModifiers, ref, computed, getCurrentScope, onScopeDispose, shallowRef, toRaw, isRef, isReactive, toRef, watchEffect, unref, onMounted, watch, onUnmounted, h, createElementBlock, renderSlot, createTextVNode, createCommentVNode, Fragment, renderList, mergeProps, getCurrentInstance, resolveDynamicComponent, toDisplayString, nextTick, normalizeClass, Suspense } from 'vue';
3
+ import { hasInjectionContext, inject as inject$3, provide as provide$2, defineComponent, reactive, resolveComponent, openBlock, createBlock, withCtx, createVNode, createElementVNode, withModifiers, ref, computed, getCurrentScope, onScopeDispose, shallowRef, toRaw, isRef, isReactive, toRef, watchEffect, unref, onMounted, watch, onUnmounted, h, createElementBlock, renderSlot, createTextVNode, createCommentVNode, Fragment, renderList, mergeProps, getCurrentInstance, resolveDynamicComponent, toDisplayString, normalizeClass, nextTick, Suspense } from 'vue';
4
4
  import installPagination, { buildPagination as buildPagination$1 } from '@vuecs/pagination';
5
5
  import { REALM_MASTER_NAME, EntityDefaultEventName, buildEntityChannelName, EntityType, IdentityProviderProtocol, IdentityProviderPreset, getIdentityProviderProtocolForPreset, isUserFakeEmail, buildUserFakeEmail } from '@authup/core-kit';
6
6
  import { IVuelidate, useTranslationsForNestedValidations, useTranslationsForBaseValidation as useTranslationsForBaseValidation$1, getSeverity, install as install$1 } from '@ilingo/vuelidate';
@@ -9,23 +9,119 @@ import { required, maxLength, minLength, helpers, numeric, url, maxValue, minVal
9
9
  import { SlotName, buildList } from '@vuecs/list-controls';
10
10
  import { Client, CookieName, ClientAuthenticationHook, ClientAuthenticationHookEventName } from '@authup/core-http-kit';
11
11
  import { defineStore, storeToRefs as storeToRefs$1 } from 'pinia';
12
- import { PermissionMemoryRepository, PermissionChecker, PolicyEngine, PolicyData, BuiltInPolicyType, TimePolicyInterval, isIntervalForDayOfWeek, isIntervalForDayOfMonth, isIntervalForDayOfYear } from '@authup/access';
12
+ import { PermissionMemoryProvider, PermissionEvaluator, PolicyEngine, PolicyData, BuiltInPolicyType, TimePolicyInterval, isIntervalForDayOfWeek, isIntervalForDayOfMonth, isIntervalForDayOfYear } from '@authup/access';
13
13
  import { OAuth2Error, isOpenIDProviderMetadata, deserializeOAuth2Scope } from '@authup/specs';
14
14
  import { hasOwnProperty as hasOwnProperty$1, extendObject, isObject as isObject$2, createNanoID, isBCryptHash, base64URLEncode } from '@authup/kit';
15
15
  import { SortDirection } from 'rapiq';
16
16
  import { ClientManager, buildEventFullName, EventNameSuffix } from '@authup/core-realtime-kit';
17
17
  import Cookie from 'universal-cookie';
18
18
 
19
+ /*
20
+ * Copyright (c) 2024-2024.
21
+ * Author Peter Placzek (tada5hi)
22
+ * For the full copyright and license information,
23
+ * view the LICENSE file that was distributed with this source code.
24
+ */ const BRACKET_NUMBER_REGEX = RegExp("(?<!\\\\)\\[(\\d+)]$");
25
+ /**
26
+ * Convert string to property path array.
27
+ *
28
+ * @see https://github.com/lodash/lodash/blob/main/src/.internal/stringToPath.ts
29
+ * @see https://github.com/chaijs/pathval
30
+ *
31
+ * @param segment
32
+ */ function pathToArray(segment) {
33
+ const str = segment.replace(/([^\\])\[/g, '$1.[');
34
+ const parts = str.match(/(\\\.|[^.]+?)+/g);
35
+ if (!parts) {
36
+ return [];
37
+ }
38
+ const result = [];
39
+ for(let i = 0; i < parts.length; i++){
40
+ if (parts[i] === 'constructor' || parts[i] === '__proto__' || parts[i] === 'prototype') {
41
+ continue;
42
+ }
43
+ const regex = BRACKET_NUMBER_REGEX.exec(parts[i]);
44
+ if (regex) {
45
+ result.push(regex[1]);
46
+ } else {
47
+ result.push(parts[i].replace(/\\([.[\]])/g, '$1'));
48
+ }
49
+ }
50
+ return result;
51
+ }
52
+
19
53
  /*
20
54
  * Copyright (c) 2024.
21
55
  * Author Peter Placzek (tada5hi)
22
56
  * For the full copyright and license information,
23
57
  * view the LICENSE file that was distributed with this source code.
24
- */ var Character$1;
58
+ */ var Character;
25
59
  (function(Character) {
26
60
  Character["WILDCARD"] = "*";
27
61
  Character["GLOBSTAR"] = "**";
28
- })(Character$1 || (Character$1 = {}));
62
+ })(Character || (Character = {}));
63
+
64
+ /*
65
+ * Copyright (c) 2024.
66
+ * Author Peter Placzek (tada5hi)
67
+ * For the full copyright and license information,
68
+ * view the LICENSE file that was distributed with this source code.
69
+ */ function isObject(input) {
70
+ return !!input && typeof input === 'object' && !Array.isArray(input);
71
+ }
72
+
73
+ function getPathValue(data, path) {
74
+ const parts = Array.isArray(path) ? path : pathToArray(path);
75
+ let res;
76
+ let temp = data;
77
+ let index = 0;
78
+ while(index < parts.length){
79
+ if (temp === null || typeof temp === 'undefined') {
80
+ break;
81
+ }
82
+ if (parts[index] in Object(temp)) {
83
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
84
+ // @ts-expect-error
85
+ temp = temp[parts[index]];
86
+ } else {
87
+ break;
88
+ }
89
+ if (index === parts.length - 1) {
90
+ res = temp;
91
+ }
92
+ index++;
93
+ }
94
+ return res;
95
+ }
96
+
97
+ const NUMBER_REGEX = /^\d+$/;
98
+ function setPathValue(data, path, value) {
99
+ const parts = Array.isArray(path) ? path : pathToArray(path);
100
+ let temp = data;
101
+ let index = 0;
102
+ while(index < parts.length){
103
+ /* istanbul ignore next */ if (!Array.isArray(temp) && !isObject(temp)) {
104
+ break;
105
+ }
106
+ const key = parts[index];
107
+ // [foo, '0']
108
+ if (typeof temp[key] === 'undefined') {
109
+ const match = NUMBER_REGEX.test(key);
110
+ if (match) {
111
+ temp[key] = [];
112
+ } else {
113
+ temp[key] = {};
114
+ }
115
+ }
116
+ if (index === parts.length - 1) {
117
+ temp[key] = value;
118
+ break;
119
+ }
120
+ index++;
121
+ temp = temp[key];
122
+ }
123
+ return data;
124
+ }
29
125
 
30
126
  class Store {
31
127
  /**
@@ -182,41 +278,31 @@ var _export_sfc = (sfc, props) => {
182
278
 
183
279
  const _hoisted_1$d = ["disabled"];
184
280
  function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
185
- const _component_VCFormInput = resolveComponent("VCFormInput");
186
- const _component_VCFormGroup = resolveComponent("VCFormGroup");
187
- const _component_IVuelidate = resolveComponent("IVuelidate");
188
- return openBlock(), createBlock(_component_IVuelidate, {
189
- validation: _ctx.vuelidate.name
190
- }, {
191
- default: withCtx((props) => [
192
- createVNode(_component_VCFormGroup, {
193
- "validation-messages": props.data,
194
- "validation-severity": props.severity
195
- }, {
196
- default: withCtx(() => [
197
- createVNode(_component_VCFormInput, {
198
- modelValue: _ctx.vuelidate.name.$model,
199
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.name.$model = $event),
200
- onChange: _ctx.handleUpdated
201
- }, {
202
- groupAppend: withCtx(() => [
203
- createElementVNode("button", {
204
- disabled: _ctx.disabled,
205
- type: "button",
206
- class: "btn btn-xs btn-warning",
207
- onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.handleDeleted && _ctx.handleDeleted(...args), ["prevent"]))
208
- }, [..._cache[2] || (_cache[2] = [
209
- createElementVNode("i", { class: "fa fa-minus" }, null, -1)
210
- ])], 8, _hoisted_1$d)
211
- ]),
212
- _: 1
213
- }, 8, ["modelValue", "onChange"])
214
- ]),
215
- _: 1
216
- }, 8, ["validation-messages", "validation-severity"])
217
- ]),
218
- _: 1
219
- }, 8, ["validation"]);
281
+ const _component_VCFormInput = resolveComponent("VCFormInput");
282
+ const _component_VCFormGroup = resolveComponent("VCFormGroup");
283
+ const _component_IVuelidate = resolveComponent("IVuelidate");
284
+ return openBlock(), createBlock(_component_IVuelidate, { validation: _ctx.vuelidate.name }, {
285
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
286
+ "validation-messages": props.data,
287
+ "validation-severity": props.severity
288
+ }, {
289
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
290
+ modelValue: _ctx.vuelidate.name.$model,
291
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.name.$model = $event),
292
+ onChange: _ctx.handleUpdated
293
+ }, {
294
+ groupAppend: withCtx(() => [createElementVNode("button", {
295
+ disabled: _ctx.disabled,
296
+ type: "button",
297
+ class: "btn btn-xs btn-warning",
298
+ onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.handleDeleted && _ctx.handleDeleted(...args), ["prevent"]))
299
+ }, [..._cache[2] || (_cache[2] = [createElementVNode("i", { class: "fa fa-minus" }, null, -1)])], 8, _hoisted_1$d)]),
300
+ _: 1
301
+ }, 8, ["modelValue", "onChange"])]),
302
+ _: 1
303
+ }, 8, ["validation-messages", "validation-severity"])]),
304
+ _: 1
305
+ }, 8, ["validation"]);
220
306
  }
221
307
  var AFormInputListItem = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$h]]);
222
308
 
@@ -256,7 +342,7 @@ function injectHTTPClientAuthenticationHook(app) {
256
342
  function hasHTTPClientAuthenticationHook(app) {
257
343
  try {
258
344
  return !!injectHTTPClientAuthenticationHook(app);
259
- } catch (e) {
345
+ } catch {
260
346
  return false;
261
347
  }
262
348
  }
@@ -437,8 +523,8 @@ function createStore(context) {
437
523
  context.dispatcher.emit(StoreDispatcherEventName.REALM_MANAGEMENT_UPDATED, input);
438
524
  };
439
525
  // --------------------------------------------------------------------
440
- const permissionRepository = new PermissionMemoryRepository();
441
- const permissionChecker = new PermissionChecker({
526
+ const permissionRepository = new PermissionMemoryProvider();
527
+ const permissionEvaluator = new PermissionEvaluator({
442
528
  repository: permissionRepository,
443
529
  policyEngine: new PolicyEngine()
444
530
  });
@@ -461,7 +547,7 @@ function createStore(context) {
461
547
  token: tempAccessToken
462
548
  });
463
549
  }
464
- } catch (e) {
550
+ } catch {
465
551
  // ...
466
552
  }
467
553
  try {
@@ -470,7 +556,7 @@ function createStore(context) {
470
556
  token: tempRefreshToken
471
557
  });
472
558
  }
473
- } catch (e) {
559
+ } catch {
474
560
  // ...
475
561
  }
476
562
  };
@@ -515,9 +601,11 @@ function createStore(context) {
515
601
  }
516
602
  if (response.permissions) {
517
603
  permissionRepository.setMany(response.permissions.map((permission)=>({
518
- name: permission.name,
519
- realmId: permission.realm_id,
520
- clientId: permission.client_id
604
+ permission: {
605
+ name: permission.name,
606
+ realm_id: permission.realm_id,
607
+ client_id: permission.client_id
608
+ }
521
609
  })));
522
610
  }
523
611
  });
@@ -592,6 +680,15 @@ function createStore(context) {
592
680
  await resolveUser();
593
681
  context.dispatcher.emit(StoreDispatcherEventName.LOGGED_IN);
594
682
  };
683
+ const exchangeAuthorizationCode = async (code)=>{
684
+ const response = await client.token.createWithAuthorizationCode({
685
+ code
686
+ });
687
+ await cleanup();
688
+ applyTokenGrantResponse(response);
689
+ await resolveToken();
690
+ await resolveUser();
691
+ };
595
692
  const logout = async ()=>{
596
693
  context.dispatcher.emit(StoreDispatcherEventName.LOGGING_OUT);
597
694
  await cleanup();
@@ -600,11 +697,12 @@ function createStore(context) {
600
697
  return {
601
698
  cookiesRead,
602
699
  setCookiesRead,
603
- permissionChecker,
700
+ permissionEvaluator,
604
701
  login,
605
702
  logout,
606
703
  loggedIn,
607
704
  resolve,
705
+ exchangeAuthorizationCode,
608
706
  applyTokenGrantResponse,
609
707
  accessToken,
610
708
  setAccessToken,
@@ -642,6 +740,7 @@ function tryOnScopeDispose(fn, failSilently) {
642
740
  return false;
643
741
  }
644
742
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
743
+ const noop = () => {};
645
744
 
646
745
  /**
647
746
  * Reactive methods to work with cookies (use {@link createCookies} method instead if you are using SSR)
@@ -765,12 +864,12 @@ function installStore(app, options = {}) {
765
864
  store.setCookiesRead(true);
766
865
  const keys = Object.values(CookieName);
767
866
  let value;
768
- for(let i = 0; i < keys.length; i++){
769
- value = cookieGet(keys[i]);
867
+ for (const key of keys){
868
+ value = cookieGet(key);
770
869
  if (!value) {
771
870
  continue;
772
871
  }
773
- switch(keys[i]){
872
+ switch(key){
774
873
  case CookieName.ACCESS_TOKEN:
775
874
  if (!store.accessToken) {
776
875
  store.setAccessToken(value);
@@ -865,10 +964,10 @@ function storeToRefs(store) {
865
964
  store = toRaw(store);
866
965
  const refs = {};
867
966
  const keys = Object.keys(store);
868
- for(let i = 0; i < keys.length; i++){
869
- const value = store[keys[i]];
967
+ for (const key of keys){
968
+ const value = store[key];
870
969
  if (isRef(value) || isReactive(value)) {
871
- refs[keys[i]] = toRef(store, keys[i]);
970
+ refs[key] = toRef(store, key);
872
971
  }
873
972
  }
874
973
  return refs;
@@ -940,7 +1039,7 @@ function provideHTTPClient(client, app) {
940
1039
  function hasHTTPClient(app) {
941
1040
  try {
942
1041
  return !!injectHTTPClient(app);
943
- } catch (e) {
1042
+ } catch {
944
1043
  return false;
945
1044
  }
946
1045
  }
@@ -977,12 +1076,12 @@ function installHTTPClient(app, options = {}) {
977
1076
  * @param input
978
1077
  */ function assignFormProperties(src, input = {}) {
979
1078
  const keys = Object.keys(input);
980
- for(let i = 0; i < keys.length; i++){
981
- const value = input[keys[i]];
1079
+ for (const key of keys){
1080
+ const value = input[key];
982
1081
  if (value === null) {
983
- src[keys[i]] = '';
1082
+ src[key] = '';
984
1083
  } else {
985
- src[keys[i]] = value;
1084
+ src[key] = value;
986
1085
  }
987
1086
  }
988
1087
  return src;
@@ -1049,113 +1148,6 @@ var TranslatorTranslationDefaultKey = /*#__PURE__*/ function(TranslatorTranslati
1049
1148
  return TranslatorTranslationDefaultKey;
1050
1149
  }({});
1051
1150
 
1052
- /*
1053
- * Copyright (c) 2024-2024.
1054
- * Author Peter Placzek (tada5hi)
1055
- * For the full copyright and license information,
1056
- * view the LICENSE file that was distributed with this source code.
1057
- */ const BRACKET_NUMBER_REGEX = RegExp("(?<!\\\\)\\[(\\d+)]$");
1058
- /**
1059
- * Convert string to property path array.
1060
- *
1061
- * @see https://github.com/lodash/lodash/blob/main/src/.internal/stringToPath.ts
1062
- * @see https://github.com/chaijs/pathval
1063
- *
1064
- * @param segment
1065
- */ function pathToArray(segment) {
1066
- const str = segment.replace(/([^\\])\[/g, '$1.[');
1067
- const parts = str.match(/(\\\.|[^.]+?)+/g);
1068
- if (!parts) {
1069
- return [];
1070
- }
1071
- const result = [];
1072
- for(let i = 0; i < parts.length; i++){
1073
- if (parts[i] === 'constructor' || parts[i] === '__proto__' || parts[i] === 'prototype') {
1074
- continue;
1075
- }
1076
- const regex = BRACKET_NUMBER_REGEX.exec(parts[i]);
1077
- if (regex) {
1078
- result.push(regex[1]);
1079
- } else {
1080
- result.push(parts[i].replace(/\\([.[\]])/g, '$1'));
1081
- }
1082
- }
1083
- return result;
1084
- }
1085
-
1086
- /*
1087
- * Copyright (c) 2024.
1088
- * Author Peter Placzek (tada5hi)
1089
- * For the full copyright and license information,
1090
- * view the LICENSE file that was distributed with this source code.
1091
- */ var Character;
1092
- (function(Character) {
1093
- Character["WILDCARD"] = "*";
1094
- Character["GLOBSTAR"] = "**";
1095
- })(Character || (Character = {}));
1096
-
1097
- /*
1098
- * Copyright (c) 2024.
1099
- * Author Peter Placzek (tada5hi)
1100
- * For the full copyright and license information,
1101
- * view the LICENSE file that was distributed with this source code.
1102
- */ function isObject(input) {
1103
- return !!input && typeof input === 'object' && !Array.isArray(input);
1104
- }
1105
-
1106
- function getPathValue(data, path) {
1107
- const parts = Array.isArray(path) ? path : pathToArray(path);
1108
- let res;
1109
- let temp = data;
1110
- let index = 0;
1111
- while(index < parts.length){
1112
- if (temp === null || typeof temp === 'undefined') {
1113
- break;
1114
- }
1115
- if (parts[index] in Object(temp)) {
1116
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
1117
- // @ts-expect-error
1118
- temp = temp[parts[index]];
1119
- } else {
1120
- break;
1121
- }
1122
- if (index === parts.length - 1) {
1123
- res = temp;
1124
- }
1125
- index++;
1126
- }
1127
- return res;
1128
- }
1129
-
1130
- const NUMBER_REGEX = /^\d+$/;
1131
- function setPathValue(data, path, value) {
1132
- const parts = Array.isArray(path) ? path : pathToArray(path);
1133
- let temp = data;
1134
- let index = 0;
1135
- while(index < parts.length){
1136
- /* istanbul ignore next */ if (!Array.isArray(temp) && !isObject(temp)) {
1137
- break;
1138
- }
1139
- const key = parts[index];
1140
- // [foo, '0']
1141
- if (typeof temp[key] === 'undefined') {
1142
- const match = NUMBER_REGEX.test(key);
1143
- if (match) {
1144
- temp[key] = [];
1145
- } else {
1146
- temp[key] = {};
1147
- }
1148
- }
1149
- if (index === parts.length - 1) {
1150
- temp[key] = value;
1151
- break;
1152
- }
1153
- index++;
1154
- temp = temp[key];
1155
- }
1156
- return data;
1157
- }
1158
-
1159
1151
  class MemoryStore {
1160
1152
  data;
1161
1153
  constructor(options){
@@ -1188,68 +1180,44 @@ class MemoryStore {
1188
1180
  }
1189
1181
  }
1190
1182
 
1191
- typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
1192
- const noop = () => {
1193
- };
1194
-
1183
+ //#region computedAsync/index.ts
1195
1184
  function computedAsync(evaluationCallback, initialState, optionsOrRef) {
1196
- var _a;
1197
- let options;
1198
- if (isRef(optionsOrRef)) {
1199
- options = {
1200
- evaluating: optionsOrRef
1201
- };
1202
- } else {
1203
- options = {};
1204
- }
1205
- const {
1206
- lazy = false,
1207
- flush = "pre",
1208
- evaluating = void 0,
1209
- shallow = true,
1210
- onError = (_a = globalThis.reportError) != null ? _a : noop
1211
- } = options;
1212
- const started = shallowRef(!lazy);
1213
- const current = shallow ? shallowRef(initialState) : ref(initialState);
1214
- let counter = 0;
1215
- watchEffect(async (onInvalidate) => {
1216
- if (!started.value)
1217
- return;
1218
- counter++;
1219
- const counterAtBeginning = counter;
1220
- let hasFinished = false;
1221
- if (evaluating) {
1222
- Promise.resolve().then(() => {
1223
- evaluating.value = true;
1224
- });
1225
- }
1226
- try {
1227
- const result = await evaluationCallback((cancelCallback) => {
1228
- onInvalidate(() => {
1229
- if (evaluating)
1230
- evaluating.value = false;
1231
- if (!hasFinished)
1232
- cancelCallback();
1233
- });
1234
- });
1235
- if (counterAtBeginning === counter)
1236
- current.value = result;
1237
- } catch (e) {
1238
- onError(e);
1239
- } finally {
1240
- if (evaluating && counterAtBeginning === counter)
1241
- evaluating.value = false;
1242
- hasFinished = true;
1243
- }
1244
- }, { flush });
1245
- if (lazy) {
1246
- return computed(() => {
1247
- started.value = true;
1248
- return current.value;
1249
- });
1250
- } else {
1251
- return current;
1252
- }
1185
+ var _globalThis$reportErr;
1186
+ let options;
1187
+ if (isRef(optionsOrRef)) options = { evaluating: optionsOrRef };
1188
+ else options = optionsOrRef || {};
1189
+ const { lazy = false, flush = "sync", evaluating = void 0, shallow = true, onError = (_globalThis$reportErr = globalThis.reportError) !== null && _globalThis$reportErr !== void 0 ? _globalThis$reportErr : noop } = options;
1190
+ const started = shallowRef(!lazy);
1191
+ const current = shallow ? shallowRef(initialState) : ref(initialState);
1192
+ let counter = 0;
1193
+ watchEffect(async (onInvalidate) => {
1194
+ if (!started.value) return;
1195
+ counter++;
1196
+ const counterAtBeginning = counter;
1197
+ let hasFinished = false;
1198
+ if (evaluating) Promise.resolve().then(() => {
1199
+ evaluating.value = true;
1200
+ });
1201
+ try {
1202
+ const result = await evaluationCallback((cancelCallback) => {
1203
+ onInvalidate(() => {
1204
+ if (evaluating) evaluating.value = false;
1205
+ if (!hasFinished) cancelCallback();
1206
+ });
1207
+ });
1208
+ if (counterAtBeginning === counter) current.value = result;
1209
+ } catch (e) {
1210
+ onError(e);
1211
+ } finally {
1212
+ if (evaluating && counterAtBeginning === counter) evaluating.value = false;
1213
+ hasFinished = true;
1214
+ }
1215
+ }, { flush });
1216
+ if (lazy) return computed(() => {
1217
+ started.value = true;
1218
+ return current.value;
1219
+ });
1220
+ else return current;
1253
1221
  }
1254
1222
 
1255
1223
  function inject(key, instance) {
@@ -1351,9 +1319,9 @@ function useTranslationsForNestedValidation(validation) {
1351
1319
 
1352
1320
  function useTranslationsForGroup(group, elements) {
1353
1321
  const output = {};
1354
- for(let i = 0; i < elements.length; i++){
1355
- output[elements[i].key] = useTranslation({
1356
- ...elements[i],
1322
+ for (const element of elements){
1323
+ output[element.key] = useTranslation({
1324
+ ...element,
1357
1325
  group
1358
1326
  });
1359
1327
  }
@@ -1422,9 +1390,9 @@ function extractVuelidateResultsFromChild(vuelidate, child, keys) {
1422
1390
  }
1423
1391
  const childKeys = keys ?? Object.keys(childResults).filter((key)=>!key.startsWith('$'));
1424
1392
  const result = {};
1425
- for(let i = 0; i < childKeys.length; i++){
1426
- if (hasOwnProperty$1(childResults, childKeys[i])) {
1427
- result[childKeys[i]] = childResults[childKeys[i]].$model;
1393
+ for (const childKey of childKeys){
1394
+ if (hasOwnProperty$1(childResults, childKey)) {
1395
+ result[childKey] = childResults[childKey].$model;
1428
1396
  }
1429
1397
  }
1430
1398
  return result;
@@ -1593,12 +1561,12 @@ function createPermissionCheckerReactiveFn(ctx = {}) {
1593
1561
  const input = ctx.input || new PolicyData();
1594
1562
  input.set(BuiltInPolicyType.IDENTITY, identity);
1595
1563
  try {
1596
- computePromise = store.permissionChecker.preCheckOneOf({
1564
+ computePromise = store.permissionEvaluator.preEvaluateOneOf({
1597
1565
  ...ctx,
1598
1566
  input
1599
1567
  }).then(()=>true).catch(()=>false);
1600
1568
  outcome = await computePromise;
1601
- } catch (e) {
1569
+ } catch {
1602
1570
  outcome = false;
1603
1571
  } finally{
1604
1572
  computePromise = undefined;
@@ -1646,12 +1614,13 @@ function installSocketManager(app, options) {
1646
1614
  const { accessToken } = storeToRefs(store);
1647
1615
  const manager = new ClientManager({
1648
1616
  url: options.baseURL,
1649
- token: ()=>accessToken.value
1617
+ token: ()=>accessToken.value ?? undefined
1650
1618
  });
1651
1619
  const oldValue = ref();
1652
1620
  store.$subscribe((mutation, state)=>{
1653
- if (state.accessToken !== oldValue.value) {
1654
- oldValue.value = state.accessToken;
1621
+ const normalizedToken = state.accessToken ?? undefined;
1622
+ if (normalizedToken !== oldValue.value) {
1623
+ oldValue.value = normalizedToken;
1655
1624
  Promise.resolve().then(()=>manager.reconnect());
1656
1625
  }
1657
1626
  });
@@ -1780,7 +1749,7 @@ var _sfc_main$h = defineComponent({
1780
1749
  };
1781
1750
  const handleUpdated = (id, value)=>{
1782
1751
  const index = items.value.findIndex((el)=>el.id === id);
1783
- if (index > -1) {
1752
+ if (index > -1 && items.value[index]) {
1784
1753
  items.value[index].value = value;
1785
1754
  }
1786
1755
  emitUpdated();
@@ -1813,60 +1782,46 @@ const _hoisted_4$7 = { class: "ms-auto" };
1813
1782
  const _hoisted_5$4 = ["disabled"];
1814
1783
  const _hoisted_6$3 = { class: "d-flex flex-column gap-1" };
1815
1784
  function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
1816
- const _component_ATranslationDefault = resolveComponent("ATranslationDefault");
1817
- const _component_AFormInputListItem = resolveComponent("AFormInputListItem");
1818
- return openBlock(), createElementBlock("div", _hoisted_1$c, [
1819
- createElementVNode("div", _hoisted_2$b, [
1820
- createElementVNode("div", _hoisted_3$9, [
1821
- renderSlot(_ctx.$slots, "label", {}, () => [
1822
- _cache[1] || (_cache[1] = createTextVNode(" Names ", -1))
1823
- ])
1824
- ]),
1825
- createElementVNode("div", _hoisted_4$7, [
1826
- createElementVNode("button", {
1827
- class: "btn btn-xs btn-primary",
1828
- type: "button",
1829
- disabled: !_ctx.canAdd,
1830
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.add(), ["prevent"]))
1831
- }, [
1832
- _cache[2] || (_cache[2] = createElementVNode("i", { class: "fa fa-plus" }, null, -1)),
1833
- _cache[3] || (_cache[3] = createTextVNode()),
1834
- createVNode(_component_ATranslationDefault, { name: "add" })
1835
- ], 8, _hoisted_5$4)
1836
- ])
1837
- ]),
1838
- createElementVNode("div", _hoisted_6$3, [
1839
- _ctx.items.length === 0 ? renderSlot(_ctx.$slots, "noItems", { key: 0 }, () => [
1840
- _cache[4] || (_cache[4] = createElementVNode("div", { class: "alert alert-sm alert-info" }, " The form list has no items yet ", -1))
1841
- ]) : createCommentVNode("", true),
1842
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
1843
- return renderSlot(_ctx.$slots, "default", {
1844
- key: item.id,
1845
- item,
1846
- updated: _ctx.handleUpdated,
1847
- deleted: _ctx.handleDeleted
1848
- }, () => [
1849
- (openBlock(), createBlock(_component_AFormInputListItem, {
1850
- key: item.id,
1851
- disabled: !_ctx.canDrop,
1852
- name: item.value,
1853
- onUpdated: (input) => {
1854
- _ctx.handleUpdated(item.id, input);
1855
- },
1856
- onDeleted: () => {
1857
- _ctx.handleDeleted(item.id);
1858
- }
1859
- }, null, 8, ["disabled", "name", "onUpdated", "onDeleted"]))
1860
- ]);
1861
- }), 128))
1862
- ])
1863
- ]);
1785
+ const _component_ATranslationDefault = resolveComponent("ATranslationDefault");
1786
+ const _component_AFormInputListItem = resolveComponent("AFormInputListItem");
1787
+ return openBlock(), createElementBlock("div", _hoisted_1$c, [createElementVNode("div", _hoisted_2$b, [createElementVNode("div", _hoisted_3$9, [renderSlot(_ctx.$slots, "label", {}, () => [_cache[1] || (_cache[1] = createTextVNode(" Names ", -1))])]), createElementVNode("div", _hoisted_4$7, [createElementVNode("button", {
1788
+ class: "btn btn-xs btn-primary",
1789
+ type: "button",
1790
+ disabled: !_ctx.canAdd,
1791
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.add(), ["prevent"]))
1792
+ }, [
1793
+ _cache[2] || (_cache[2] = createElementVNode("i", { class: "fa fa-plus" }, null, -1)),
1794
+ _cache[3] || (_cache[3] = createTextVNode()),
1795
+ createVNode(_component_ATranslationDefault, { name: "add" })
1796
+ ], 8, _hoisted_5$4)])]), createElementVNode("div", _hoisted_6$3, [_ctx.items.length === 0 ? renderSlot(_ctx.$slots, "noItems", { key: 0 }, () => [_cache[4] || (_cache[4] = createElementVNode("div", { class: "alert alert-sm alert-info" }, " The form list has no items yet ", -1))]) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.items, (item) => {
1797
+ return renderSlot(_ctx.$slots, "default", {
1798
+ key: item.id,
1799
+ item,
1800
+ updated: _ctx.handleUpdated,
1801
+ deleted: _ctx.handleDeleted
1802
+ }, () => [(openBlock(), createBlock(_component_AFormInputListItem, {
1803
+ key: item.id,
1804
+ disabled: !_ctx.canDrop,
1805
+ name: item.value,
1806
+ onUpdated: (input) => {
1807
+ _ctx.handleUpdated(item.id, input);
1808
+ },
1809
+ onDeleted: () => {
1810
+ _ctx.handleDeleted(item.id);
1811
+ }
1812
+ }, null, 8, [
1813
+ "disabled",
1814
+ "name",
1815
+ "onUpdated",
1816
+ "onDeleted"
1817
+ ]))]);
1818
+ }), 128))])]);
1864
1819
  }
1865
1820
  var AFormInputList = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$g]]);
1866
1821
 
1867
1822
  function buildPagination(ctx) {
1868
1823
  return buildPagination$1({
1869
- load: (pagination)=>ctx.load({
1824
+ load: (pagination)=>ctx.load?.({
1870
1825
  ...ctx.meta,
1871
1826
  pagination: {
1872
1827
  limit: pagination.limit,
@@ -1892,8 +1847,7 @@ const APagination = defineComponent({
1892
1847
  type: Boolean
1893
1848
  },
1894
1849
  load: {
1895
- type: Function,
1896
- required: true
1850
+ type: Function
1897
1851
  }
1898
1852
  },
1899
1853
  setup (props) {
@@ -1913,11 +1867,8 @@ const APagination = defineComponent({
1913
1867
  * view the LICENSE file that was distributed with this source code.
1914
1868
  */ function defineEntityCollectionVEmitOptions() {
1915
1869
  return {
1916
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1917
1870
  created: (_item)=>true,
1918
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1919
1871
  deleted: (_item)=>true,
1920
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1921
1872
  updated: (_item)=>true
1922
1873
  };
1923
1874
  }
@@ -2025,9 +1976,12 @@ function buildEntityCollectionUpdatedHandler(items, cb) {
2025
1976
  }
2026
1977
  const index = items.value.findIndex((el)=>el.id === item.id);
2027
1978
  if (index !== -1) {
2028
- const keys = Object.keys(item);
2029
- for(let i = 0; i < keys.length; i++){
2030
- items.value[index][keys[i]] = item[keys[i]];
1979
+ const el = items.value[index];
1980
+ if (el) {
1981
+ const keys = Object.keys(item);
1982
+ for (const key of keys){
1983
+ el[key] = item[key];
1984
+ }
2031
1985
  }
2032
1986
  if (cb) {
2033
1987
  cb(item);
@@ -2042,8 +1996,9 @@ function buildEntityCollectionDeletedHandler(items, cb) {
2042
1996
  }
2043
1997
  const index = items.value.findIndex((el)=>el.id === item.id);
2044
1998
  if (index !== -1) {
2045
- if (cb) {
2046
- cb(items.value[index]);
1999
+ const el = items.value[index];
2000
+ if (cb && el) {
2001
+ cb(el);
2047
2002
  }
2048
2003
  return items.value.splice(index, 1).pop();
2049
2004
  }
@@ -2409,15 +2364,10 @@ function buildEntityVSlotProps(input) {
2409
2364
  }
2410
2365
  function defineEntityVEmitOptions() {
2411
2366
  return {
2412
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2413
2367
  failed: (_item)=>true,
2414
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2415
2368
  created: (_item)=>true,
2416
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2417
2369
  deleted: (_item)=>true,
2418
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2419
2370
  updated: (_item)=>true,
2420
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2421
2371
  resolved: (_item)=>true
2422
2372
  };
2423
2373
  }
@@ -2898,7 +2848,6 @@ const ASearch = defineComponent({
2898
2848
 
2899
2849
  function defineEntityPickerVEmitOptions() {
2900
2850
  return {
2901
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
2902
2851
  change: (_values)=>true,
2903
2852
  ...defineEntityCollectionVEmitOptions()
2904
2853
  };
@@ -3007,7 +2956,7 @@ function defineEntityPicker({ props, setup, component }) {
3007
2956
  return content;
3008
2957
  }
3009
2958
  return renderToggleButton({
3010
- value: items.value.indexOf(slotProps.data.id) !== -1,
2959
+ value: items.value.includes(slotProps.data.id),
3011
2960
  isBusy: slotProps.busy,
3012
2961
  changed () {
3013
2962
  toggle(slotProps.data.id);
@@ -3228,10 +3177,10 @@ const LanguageSwitcherDropdown = defineComponent({
3228
3177
  ];
3229
3178
  const elements = computed(()=>{
3230
3179
  const output = [];
3231
- for(let i = 0; i < locales.length; i++){
3180
+ for (const locale_ of locales){
3232
3181
  output.push({
3233
- value: locales[i],
3234
- active: locale.value === locales[i]
3182
+ value: locale_,
3183
+ active: locale.value === locale_
3235
3184
  });
3236
3185
  }
3237
3186
  return output;
@@ -3769,8 +3718,8 @@ var _sfc_main$g = defineComponent({
3769
3718
  const _hoisted_1$b = { class: "row" };
3770
3719
  const _hoisted_2$a = { class: "col" };
3771
3720
  const _hoisted_3$8 = {
3772
- key: 0,
3773
- class: "text-danger font-weight-bold"
3721
+ key: 0,
3722
+ class: "text-danger font-weight-bold"
3774
3723
  };
3775
3724
  const _hoisted_4$6 = { class: "row" };
3776
3725
  const _hoisted_5$3 = { class: "col" };
@@ -3778,269 +3727,187 @@ const _hoisted_6$2 = { class: "col" };
3778
3727
  const _hoisted_7$1 = { class: "col" };
3779
3728
  const _hoisted_8$1 = { class: "col" };
3780
3729
  function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
3781
- const _component_VCFormInput = resolveComponent("VCFormInput");
3782
- const _component_VCFormGroup = resolveComponent("VCFormGroup");
3783
- const _component_IVuelidate = resolveComponent("IVuelidate");
3784
- const _component_VCFormInputCheckbox = resolveComponent("VCFormInputCheckbox");
3785
- const _component_ARealmPicker = resolveComponent("ARealmPicker");
3786
- const _component_AFormInputList = resolveComponent("AFormInputList");
3787
- const _component_VCFormTextarea = resolveComponent("VCFormTextarea");
3788
- const _component_AFormSubmit = resolveComponent("AFormSubmit");
3789
- return openBlock(), createElementBlock("div", _hoisted_1$b, [
3790
- createElementVNode("div", _hoisted_2$a, [
3791
- _ctx.data ? (openBlock(), createBlock(_component_VCFormGroup, { key: 0 }, {
3792
- label: withCtx(() => [..._cache[10] || (_cache[10] = [
3793
- createTextVNode(" ID ", -1)
3794
- ])]),
3795
- default: withCtx(() => [
3796
- createVNode(_component_VCFormInput, {
3797
- "model-value": _ctx.data.id,
3798
- disabled: true
3799
- }, null, 8, ["model-value"])
3800
- ]),
3801
- _: 1
3802
- })) : createCommentVNode("", true),
3803
- createVNode(_component_IVuelidate, {
3804
- validation: _ctx.vuelidate.name
3805
- }, {
3806
- default: withCtx((props) => [
3807
- createVNode(_component_VCFormGroup, {
3808
- "validation-messages": props.data,
3809
- "validation-severity": props.severity
3810
- }, {
3811
- label: withCtx(() => [
3812
- createTextVNode(toDisplayString(_ctx.translationsDefault.name), 1)
3813
- ]),
3814
- default: withCtx(() => [
3815
- createVNode(_component_VCFormInput, {
3816
- modelValue: _ctx.vuelidate.name.$model,
3817
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.name.$model = $event),
3818
- disabled: _ctx.isNameFixed
3819
- }, null, 8, ["modelValue", "disabled"])
3820
- ]),
3821
- _: 1
3822
- }, 8, ["validation-messages", "validation-severity"]),
3823
- createElementVNode("small", null, toDisplayString(_ctx.translationsClient.nameHint), 1)
3824
- ]),
3825
- _: 1
3826
- }, 8, ["validation"]),
3827
- _cache[14] || (_cache[14] = createElementVNode("hr", null, null, -1)),
3828
- createVNode(_component_IVuelidate, {
3829
- validation: _ctx.vuelidate.display_name
3830
- }, {
3831
- default: withCtx((props) => [
3832
- createVNode(_component_VCFormGroup, {
3833
- "validation-messages": props.data,
3834
- "validation-severity": props.severity
3835
- }, {
3836
- label: withCtx(() => [
3837
- createTextVNode(toDisplayString(_ctx.translationsDefault.displayName), 1)
3838
- ]),
3839
- default: withCtx(() => [
3840
- createVNode(_component_VCFormInput, {
3841
- modelValue: _ctx.vuelidate.display_name.$model,
3842
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.display_name.$model = $event),
3843
- disabled: _ctx.isNameFixed
3844
- }, null, 8, ["modelValue", "disabled"])
3845
- ]),
3846
- _: 1
3847
- }, 8, ["validation-messages", "validation-severity"])
3848
- ]),
3849
- _: 1
3850
- }, 8, ["validation"]),
3851
- _cache[15] || (_cache[15] = createElementVNode("hr", null, null, -1)),
3852
- createVNode(_component_IVuelidate, {
3853
- validation: _ctx.vuelidate.secret
3854
- }, {
3855
- default: withCtx((props) => [
3856
- createVNode(_component_VCFormGroup, {
3857
- "validation-messages": props.data,
3858
- "validation-severity": props.severity
3859
- }, {
3860
- label: withCtx(() => [
3861
- createTextVNode(toDisplayString(_ctx.translationsDefault.secret) + " ", 1),
3862
- _ctx.isSecretHashed ? (openBlock(), createElementBlock("span", _hoisted_3$8, [..._cache[11] || (_cache[11] = [
3863
- createElementVNode("i", { class: "fa fa-exclamation-triangle" }, null, -1)
3864
- ])])) : createCommentVNode("", true)
3865
- ]),
3866
- default: withCtx(() => [
3867
- createVNode(_component_VCFormInput, {
3868
- modelValue: _ctx.vuelidate.secret.$model,
3869
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.vuelidate.secret.$model = $event),
3870
- disabled: !_ctx.vuelidate.is_confidential.$model
3871
- }, {
3872
- groupAppend: withCtx(() => [
3873
- createElementVNode("button", {
3874
- class: "btn",
3875
- type: "button",
3876
- onClick: _cache[2] || (_cache[2] = withModifiers(() => _ctx.vuelidate.secret.$model = _ctx.generateSecret(), ["prevent"]))
3877
- }, [..._cache[12] || (_cache[12] = [
3878
- createElementVNode("i", { class: "fa fa-refresh" }, null, -1)
3879
- ])])
3880
- ]),
3881
- _: 1
3882
- }, 8, ["modelValue", "disabled"])
3883
- ]),
3884
- _: 1
3885
- }, 8, ["validation-messages", "validation-severity"])
3886
- ]),
3887
- _: 1
3888
- }, 8, ["validation"]),
3889
- createElementVNode("div", _hoisted_4$6, [
3890
- createElementVNode("div", _hoisted_5$3, [
3891
- createVNode(_component_IVuelidate, {
3892
- validation: _ctx.vuelidate.is_confidential
3893
- }, {
3894
- default: withCtx((props) => [
3895
- createVNode(_component_VCFormGroup, {
3896
- "validation-messages": props.data,
3897
- "validation-severity": props.severity
3898
- }, {
3899
- default: withCtx(() => [
3900
- createVNode(_component_VCFormInputCheckbox, {
3901
- modelValue: _ctx.vuelidate.is_confidential.$model,
3902
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.vuelidate.is_confidential.$model = $event),
3903
- "group-class": "form-switch",
3904
- label: true,
3905
- "label-content": _ctx.translationsClient.isConfidential.value
3906
- }, null, 8, ["modelValue", "label-content"])
3907
- ]),
3908
- _: 1
3909
- }, 8, ["validation-messages", "validation-severity"])
3910
- ]),
3911
- _: 1
3912
- }, 8, ["validation"])
3913
- ]),
3914
- createElementVNode("div", _hoisted_6$2, [
3915
- createVNode(_component_IVuelidate, {
3916
- validation: _ctx.vuelidate.secret_hashed
3917
- }, {
3918
- default: withCtx((props) => [
3919
- createVNode(_component_VCFormGroup, {
3920
- "validation-messages": props.data,
3921
- "validation-severity": props.severity
3922
- }, {
3923
- default: withCtx(() => [
3924
- createVNode(_component_VCFormInputCheckbox, {
3925
- modelValue: _ctx.vuelidate.secret_hashed.$model,
3926
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.vuelidate.secret_hashed.$model = $event),
3927
- "group-class": "form-switch",
3928
- label: true,
3929
- "label-content": _ctx.translationsClient.hashSecret.value
3930
- }, null, 8, ["modelValue", "label-content"])
3931
- ]),
3932
- _: 1
3933
- }, 8, ["validation-messages", "validation-severity"])
3934
- ]),
3935
- _: 1
3936
- }, 8, ["validation"])
3937
- ]),
3938
- createElementVNode("div", _hoisted_7$1, [
3939
- createVNode(_component_IVuelidate, {
3940
- validation: _ctx.vuelidate.active
3941
- }, {
3942
- default: withCtx((props) => [
3943
- createVNode(_component_VCFormGroup, {
3944
- "validation-messages": props.data,
3945
- "validation-severity": props.severity
3946
- }, {
3947
- default: withCtx(() => [
3948
- createVNode(_component_VCFormInputCheckbox, {
3949
- modelValue: _ctx.vuelidate.active.$model,
3950
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.vuelidate.active.$model = $event),
3951
- "group-class": "form-switch",
3952
- label: true,
3953
- "label-content": _ctx.translationsClient.isActive.value
3954
- }, null, 8, ["modelValue", "label-content"])
3955
- ]),
3956
- _: 1
3957
- }, 8, ["validation-messages", "validation-severity"])
3958
- ]),
3959
- _: 1
3960
- }, 8, ["validation"])
3961
- ])
3962
- ]),
3963
- !_ctx.realmId && !_ctx.isEditing ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
3964
- _cache[13] || (_cache[13] = createElementVNode("hr", null, null, -1)),
3965
- createVNode(_component_IVuelidate, {
3966
- validation: _ctx.vuelidate.realm_id
3967
- }, {
3968
- default: withCtx((props) => [
3969
- createVNode(_component_VCFormGroup, {
3970
- "validation-messages": props.data,
3971
- "validation-severity": props.severity
3972
- }, {
3973
- label: withCtx(() => [
3974
- createTextVNode(toDisplayString(_ctx.translationsDefault.realm), 1)
3975
- ]),
3976
- default: withCtx(() => [
3977
- createVNode(_component_ARealmPicker, {
3978
- value: _ctx.vuelidate.realm_id.$model,
3979
- onChange: _cache[7] || (_cache[7] = (input) => {
3980
- _ctx.vuelidate.realm_id.$model = input.length > 0 ? input[0] : "";
3981
- })
3982
- }, null, 8, ["value"])
3983
- ]),
3984
- _: 1
3985
- }, 8, ["validation-messages", "validation-severity"])
3986
- ]),
3987
- _: 1
3988
- }, 8, ["validation"])
3989
- ], 64)) : createCommentVNode("", true)
3990
- ]),
3991
- createElementVNode("div", _hoisted_8$1, [
3992
- createVNode(_component_AFormInputList, {
3993
- names: _ctx.redirectUris,
3994
- onChanged: _cache[8] || (_cache[8] = (value) => {
3995
- if (value.length === 0) {
3996
- _ctx.vuelidate.redirect_uri.$model = "";
3997
- return;
3998
- }
3999
- _ctx.vuelidate.redirect_uri.$model = value.join(",");
4000
- })
4001
- }, {
4002
- label: withCtx(() => [
4003
- createTextVNode(toDisplayString(_ctx.translationsDefault.redirectUris), 1)
4004
- ]),
4005
- _: 1
4006
- }, 8, ["names"]),
4007
- createElementVNode("small", null, toDisplayString(_ctx.translationsClient.redirectURIHint), 1),
4008
- _cache[16] || (_cache[16] = createElementVNode("hr", null, null, -1)),
4009
- createVNode(_component_IVuelidate, {
4010
- validation: _ctx.vuelidate.description
4011
- }, {
4012
- default: withCtx((props) => [
4013
- createVNode(_component_VCFormGroup, {
4014
- "validation-messages": props.data,
4015
- "validation-severity": props.severity
4016
- }, {
4017
- label: withCtx(() => [
4018
- createTextVNode(toDisplayString(_ctx.translationsDefault.description), 1)
4019
- ]),
4020
- default: withCtx(() => [
4021
- createVNode(_component_VCFormTextarea, {
4022
- modelValue: _ctx.vuelidate.description.$model,
4023
- "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => _ctx.vuelidate.description.$model = $event),
4024
- rows: "7"
4025
- }, null, 8, ["modelValue"])
4026
- ]),
4027
- _: 1
4028
- }, 8, ["validation-messages", "validation-severity"]),
4029
- createElementVNode("small", null, toDisplayString(_ctx.translationsClient.descriptionHint), 1)
4030
- ]),
4031
- _: 1
4032
- }, 8, ["validation"]),
4033
- _cache[17] || (_cache[17] = createElementVNode("hr", null, null, -1)),
4034
- createElementVNode("div", null, [
4035
- createVNode(_component_AFormSubmit, {
4036
- "is-busy": _ctx.isBusy,
4037
- "is-editing": _ctx.isEditing,
4038
- "is-invalid": _ctx.vuelidate.$invalid,
4039
- onSubmit: _ctx.submit
4040
- }, null, 8, ["is-busy", "is-editing", "is-invalid", "onSubmit"])
4041
- ])
4042
- ])
4043
- ]);
3730
+ const _component_VCFormInput = resolveComponent("VCFormInput");
3731
+ const _component_VCFormGroup = resolveComponent("VCFormGroup");
3732
+ const _component_IVuelidate = resolveComponent("IVuelidate");
3733
+ const _component_VCFormInputCheckbox = resolveComponent("VCFormInputCheckbox");
3734
+ const _component_ARealmPicker = resolveComponent("ARealmPicker");
3735
+ const _component_AFormInputList = resolveComponent("AFormInputList");
3736
+ const _component_VCFormTextarea = resolveComponent("VCFormTextarea");
3737
+ const _component_AFormSubmit = resolveComponent("AFormSubmit");
3738
+ return openBlock(), createElementBlock("div", _hoisted_1$b, [createElementVNode("div", _hoisted_2$a, [
3739
+ _ctx.data ? (openBlock(), createBlock(_component_VCFormGroup, { key: 0 }, {
3740
+ label: withCtx(() => [..._cache[10] || (_cache[10] = [createTextVNode(" ID ", -1)])]),
3741
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
3742
+ "model-value": _ctx.data.id,
3743
+ disabled: true
3744
+ }, null, 8, ["model-value"])]),
3745
+ _: 1
3746
+ })) : createCommentVNode("", true),
3747
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.name }, {
3748
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
3749
+ "validation-messages": props.data,
3750
+ "validation-severity": props.severity
3751
+ }, {
3752
+ label: withCtx(() => [createTextVNode(toDisplayString(_ctx.translationsDefault.name), 1)]),
3753
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
3754
+ modelValue: _ctx.vuelidate.name.$model,
3755
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.name.$model = $event),
3756
+ disabled: _ctx.isNameFixed
3757
+ }, null, 8, ["modelValue", "disabled"])]),
3758
+ _: 1
3759
+ }, 8, ["validation-messages", "validation-severity"]), createElementVNode("small", null, toDisplayString(_ctx.translationsClient.nameHint), 1)]),
3760
+ _: 1
3761
+ }, 8, ["validation"]),
3762
+ _cache[14] || (_cache[14] = createElementVNode("hr", null, null, -1)),
3763
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.display_name }, {
3764
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
3765
+ "validation-messages": props.data,
3766
+ "validation-severity": props.severity
3767
+ }, {
3768
+ label: withCtx(() => [createTextVNode(toDisplayString(_ctx.translationsDefault.displayName), 1)]),
3769
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
3770
+ modelValue: _ctx.vuelidate.display_name.$model,
3771
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.display_name.$model = $event),
3772
+ disabled: _ctx.isNameFixed
3773
+ }, null, 8, ["modelValue", "disabled"])]),
3774
+ _: 1
3775
+ }, 8, ["validation-messages", "validation-severity"])]),
3776
+ _: 1
3777
+ }, 8, ["validation"]),
3778
+ _cache[15] || (_cache[15] = createElementVNode("hr", null, null, -1)),
3779
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.secret }, {
3780
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
3781
+ "validation-messages": props.data,
3782
+ "validation-severity": props.severity
3783
+ }, {
3784
+ label: withCtx(() => [createTextVNode(toDisplayString(_ctx.translationsDefault.secret) + " ", 1), _ctx.isSecretHashed ? (openBlock(), createElementBlock("span", _hoisted_3$8, [..._cache[11] || (_cache[11] = [createElementVNode("i", { class: "fa fa-exclamation-triangle" }, null, -1)])])) : createCommentVNode("", true)]),
3785
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
3786
+ modelValue: _ctx.vuelidate.secret.$model,
3787
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.vuelidate.secret.$model = $event),
3788
+ disabled: !_ctx.vuelidate.is_confidential.$model
3789
+ }, {
3790
+ groupAppend: withCtx(() => [createElementVNode("button", {
3791
+ class: "btn",
3792
+ type: "button",
3793
+ onClick: _cache[2] || (_cache[2] = withModifiers(() => _ctx.vuelidate.secret.$model = _ctx.generateSecret(), ["prevent"]))
3794
+ }, [..._cache[12] || (_cache[12] = [createElementVNode("i", { class: "fa fa-refresh" }, null, -1)])])]),
3795
+ _: 1
3796
+ }, 8, ["modelValue", "disabled"])]),
3797
+ _: 1
3798
+ }, 8, ["validation-messages", "validation-severity"])]),
3799
+ _: 1
3800
+ }, 8, ["validation"]),
3801
+ createElementVNode("div", _hoisted_4$6, [
3802
+ createElementVNode("div", _hoisted_5$3, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.is_confidential }, {
3803
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
3804
+ "validation-messages": props.data,
3805
+ "validation-severity": props.severity
3806
+ }, {
3807
+ default: withCtx(() => [createVNode(_component_VCFormInputCheckbox, {
3808
+ modelValue: _ctx.vuelidate.is_confidential.$model,
3809
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.vuelidate.is_confidential.$model = $event),
3810
+ "group-class": "form-switch",
3811
+ label: true,
3812
+ "label-content": _ctx.translationsClient.isConfidential.value
3813
+ }, null, 8, ["modelValue", "label-content"])]),
3814
+ _: 1
3815
+ }, 8, ["validation-messages", "validation-severity"])]),
3816
+ _: 1
3817
+ }, 8, ["validation"])]),
3818
+ createElementVNode("div", _hoisted_6$2, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.secret_hashed }, {
3819
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
3820
+ "validation-messages": props.data,
3821
+ "validation-severity": props.severity
3822
+ }, {
3823
+ default: withCtx(() => [createVNode(_component_VCFormInputCheckbox, {
3824
+ modelValue: _ctx.vuelidate.secret_hashed.$model,
3825
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.vuelidate.secret_hashed.$model = $event),
3826
+ "group-class": "form-switch",
3827
+ label: true,
3828
+ "label-content": _ctx.translationsClient.hashSecret.value
3829
+ }, null, 8, ["modelValue", "label-content"])]),
3830
+ _: 1
3831
+ }, 8, ["validation-messages", "validation-severity"])]),
3832
+ _: 1
3833
+ }, 8, ["validation"])]),
3834
+ createElementVNode("div", _hoisted_7$1, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.active }, {
3835
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
3836
+ "validation-messages": props.data,
3837
+ "validation-severity": props.severity
3838
+ }, {
3839
+ default: withCtx(() => [createVNode(_component_VCFormInputCheckbox, {
3840
+ modelValue: _ctx.vuelidate.active.$model,
3841
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => _ctx.vuelidate.active.$model = $event),
3842
+ "group-class": "form-switch",
3843
+ label: true,
3844
+ "label-content": _ctx.translationsClient.isActive.value
3845
+ }, null, 8, ["modelValue", "label-content"])]),
3846
+ _: 1
3847
+ }, 8, ["validation-messages", "validation-severity"])]),
3848
+ _: 1
3849
+ }, 8, ["validation"])])
3850
+ ]),
3851
+ !_ctx.realmId && !_ctx.isEditing ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [_cache[13] || (_cache[13] = createElementVNode("hr", null, null, -1)), createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.realm_id }, {
3852
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
3853
+ "validation-messages": props.data,
3854
+ "validation-severity": props.severity
3855
+ }, {
3856
+ label: withCtx(() => [createTextVNode(toDisplayString(_ctx.translationsDefault.realm), 1)]),
3857
+ default: withCtx(() => [createVNode(_component_ARealmPicker, {
3858
+ value: _ctx.vuelidate.realm_id.$model,
3859
+ onChange: _cache[7] || (_cache[7] = (input) => {
3860
+ _ctx.vuelidate.realm_id.$model = input.length > 0 ? input[0] ?? "" : "";
3861
+ })
3862
+ }, null, 8, ["value"])]),
3863
+ _: 1
3864
+ }, 8, ["validation-messages", "validation-severity"])]),
3865
+ _: 1
3866
+ }, 8, ["validation"])], 64)) : createCommentVNode("", true)
3867
+ ]), createElementVNode("div", _hoisted_8$1, [
3868
+ createVNode(_component_AFormInputList, {
3869
+ names: _ctx.redirectUris,
3870
+ onChanged: _cache[8] || (_cache[8] = (value) => {
3871
+ if (value.length === 0) {
3872
+ _ctx.vuelidate.redirect_uri.$model = "";
3873
+ return;
3874
+ }
3875
+ _ctx.vuelidate.redirect_uri.$model = value.join(",");
3876
+ })
3877
+ }, {
3878
+ label: withCtx(() => [createTextVNode(toDisplayString(_ctx.translationsDefault.redirectUris), 1)]),
3879
+ _: 1
3880
+ }, 8, ["names"]),
3881
+ createElementVNode("small", null, toDisplayString(_ctx.translationsClient.redirectURIHint), 1),
3882
+ _cache[16] || (_cache[16] = createElementVNode("hr", null, null, -1)),
3883
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.description }, {
3884
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
3885
+ "validation-messages": props.data,
3886
+ "validation-severity": props.severity
3887
+ }, {
3888
+ label: withCtx(() => [createTextVNode(toDisplayString(_ctx.translationsDefault.description), 1)]),
3889
+ default: withCtx(() => [createVNode(_component_VCFormTextarea, {
3890
+ modelValue: _ctx.vuelidate.description.$model,
3891
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => _ctx.vuelidate.description.$model = $event),
3892
+ rows: "7"
3893
+ }, null, 8, ["modelValue"])]),
3894
+ _: 1
3895
+ }, 8, ["validation-messages", "validation-severity"]), createElementVNode("small", null, toDisplayString(_ctx.translationsClient.descriptionHint), 1)]),
3896
+ _: 1
3897
+ }, 8, ["validation"]),
3898
+ _cache[17] || (_cache[17] = createElementVNode("hr", null, null, -1)),
3899
+ createElementVNode("div", null, [createVNode(_component_AFormSubmit, {
3900
+ "is-busy": _ctx.isBusy,
3901
+ "is-editing": _ctx.isEditing,
3902
+ "is-invalid": _ctx.vuelidate.$invalid,
3903
+ onSubmit: _ctx.submit
3904
+ }, null, 8, [
3905
+ "is-busy",
3906
+ "is-editing",
3907
+ "is-invalid",
3908
+ "onSubmit"
3909
+ ])])
3910
+ ])]);
4044
3911
  }
4045
3912
  var AClientForm = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$f]]);
4046
3913
 
@@ -4153,145 +4020,28 @@ const APermissionCheck = defineComponent({
4153
4020
  String,
4154
4021
  Array
4155
4022
  ],
4156
- required: true
4157
- },
4158
- input: {
4159
- type: Object
4160
- },
4161
- options: {
4162
- type: Object
4163
- }
4164
- },
4165
- setup (props, { slots }) {
4166
- const fn = createPermissionCheckerReactiveFn();
4167
- const isPermitted = computed(()=>fn({
4168
- name: props.name,
4169
- input: new PolicyData(props.input),
4170
- options: props.options
4171
- }));
4172
- return ()=>{
4173
- if (isPermitted.value && hasNormalizedSlot(SlotName.DEFAULT, slots)) {
4174
- return normalizeSlot(SlotName.DEFAULT, {}, slots);
4175
- }
4176
- return [];
4177
- };
4178
- }
4179
- });
4180
-
4181
- const APolicies = defineComponent({
4182
- props: defineEntityCollectionVProps(),
4183
- emits: defineEntityCollectionVEmitOptions(),
4184
- slots: Object,
4185
- setup (props, setup) {
4186
- const { render } = defineEntityCollectionManager({
4187
- type: `${EntityType.POLICY}`,
4188
- props,
4189
- setup
4190
- });
4191
- const translationName = useTranslation({
4192
- group: TranslatorTranslationGroup.DEFAULT,
4193
- key: TranslatorTranslationDefaultKey.POLICIES
4194
- });
4195
- const translation = useTranslation({
4196
- group: TranslatorTranslationGroup.VUECS,
4197
- key: TranslatorTranslationVuecsKey.NO_MORE,
4198
- data: {
4199
- name: translationName
4200
- }
4201
- });
4202
- return ()=>render({
4203
- noMore: {
4204
- content: translation.value
4205
- }
4206
- });
4207
- }
4208
- });
4209
-
4210
- const APolicyParentAssignment = defineComponent({
4211
- props: {
4212
- entityId: {
4213
- type: String,
4214
- required: true
4215
- },
4216
- entity: {
4217
- type: Object
4218
- },
4219
- parentId: {
4220
- type: String,
4221
- required: true
4222
- }
4223
- },
4224
- emits: defineEntityVEmitOptions(),
4225
- async setup (props, setup) {
4226
- const manager = defineEntityManager({
4227
- type: `${EntityType.POLICY}`,
4228
- setup,
4229
- socket: {
4230
- processEvent (event) {
4231
- return event.data.id === props.entityId;
4232
- }
4233
- },
4234
- props: {
4235
- entity: props.entity,
4236
- entityId: props.entityId
4237
- }
4238
- });
4239
- await manager.resolve({
4240
- query: {
4241
- filters: {
4242
- id: props.entityId
4243
- }
4244
- }
4245
- });
4246
- return ()=>renderToggleButton({
4247
- changed: (value)=>{
4248
- if (!manager.data.value) {
4249
- return;
4250
- }
4251
- if (value) {
4252
- manager.data.value.parent_id = props.parentId;
4253
- } else {
4254
- manager.data.value.parent_id = null;
4255
- if (manager.data.value.parent) {
4256
- manager.data.value.parent = null;
4257
- }
4258
- }
4259
- manager.update(manager.data.value);
4260
- },
4261
- value: !!manager.data.value && manager.data.value.parent_id === props.parentId,
4262
- isBusy: manager.busy.value
4263
- });
4264
- }
4265
- });
4266
-
4267
- const APolicyPicker = defineComponent({
4268
- props: {
4269
- parentId: {
4270
- type: String
4271
- },
4272
- ...defineEntityPickerVProps()
4273
- },
4274
- emits: defineEntityPickerVEmitOptions(),
4275
- slots: Object,
4276
- setup (props, { slots, ...setup }) {
4277
- const { render } = defineEntityPicker({
4278
- component: APolicies,
4279
- props,
4280
- setup: {
4281
- ...setup,
4282
- slots: {
4283
- ...props.parentId ? {
4284
- [SlotName.ITEM_ACTIONS]: (slotProps)=>h(APolicyParentAssignment, {
4285
- entity: slotProps.data,
4286
- entityId: slotProps.data.id,
4287
- parentId: props.parentId
4288
- })
4289
- } : {},
4290
- ...slots
4291
- }
4023
+ required: true
4024
+ },
4025
+ input: {
4026
+ type: Object
4027
+ },
4028
+ options: {
4029
+ type: Object
4030
+ }
4031
+ },
4032
+ setup (props, { slots }) {
4033
+ const fn = createPermissionCheckerReactiveFn();
4034
+ const isPermitted = computed(()=>fn({
4035
+ name: props.name,
4036
+ input: new PolicyData(props.input),
4037
+ options: props.options
4038
+ }));
4039
+ return ()=>{
4040
+ if (isPermitted.value && hasNormalizedSlot(SlotName.DEFAULT, slots)) {
4041
+ return normalizeSlot(SlotName.DEFAULT, {}, slots);
4292
4042
  }
4293
- });
4294
- return ()=>render();
4043
+ return [];
4044
+ };
4295
4045
  }
4296
4046
  });
4297
4047
 
@@ -4303,14 +4053,12 @@ const APermissionForm = defineComponent({
4303
4053
  },
4304
4054
  emits: defineEntityVEmitOptions(),
4305
4055
  setup (props, ctx) {
4306
- const policyPickerVNode = ref(null);
4307
4056
  const busy = ref(false);
4308
4057
  const form = reactive({
4309
4058
  name: '',
4310
4059
  display_name: '',
4311
4060
  description: '',
4312
- realm_id: '',
4313
- policy_id: ''
4061
+ realm_id: ''
4314
4062
  });
4315
4063
  const $v = useVuelidate({
4316
4064
  name: {
@@ -4327,8 +4075,7 @@ const APermissionForm = defineComponent({
4327
4075
  minLength: minLength(5),
4328
4076
  maxLength: maxLength(4096)
4329
4077
  },
4330
- realm_id: {},
4331
- policy_id: {}
4078
+ realm_id: {}
4332
4079
  }, form);
4333
4080
  const store = injectStore();
4334
4081
  const storeRefs = storeToRefs(store);
@@ -4376,9 +4123,6 @@ const APermissionForm = defineComponent({
4376
4123
  {
4377
4124
  key: TranslatorTranslationDefaultKey.DESCRIPTION
4378
4125
  },
4379
- {
4380
- key: TranslatorTranslationDefaultKey.POLICY
4381
- },
4382
4126
  {
4383
4127
  key: TranslatorTranslationDefaultKey.REALM
4384
4128
  }
@@ -4437,38 +4181,11 @@ const APermissionForm = defineComponent({
4437
4181
  value: $v.value.realm_id.$model,
4438
4182
  multiple: false,
4439
4183
  onChange (input) {
4440
- $v.value.realm_id.$model = input.length > 0 ? input[0] : '';
4441
- $v.value.policy_id.$model = '';
4442
- nextTick(()=>{
4443
- if (policyPickerVNode.value) {
4444
- policyPickerVNode.value.load();
4445
- }
4446
- });
4184
+ $v.value.realm_id.$model = input.length > 0 ? input[0] ?? '' : '';
4447
4185
  }
4448
4186
  })
4449
4187
  }));
4450
4188
  }
4451
- children.push(buildFormGroup({
4452
- validationMessages: translationsValidation.policy_id.value,
4453
- validationSeverity: getVuelidateSeverity($v.value.policy_id),
4454
- label: true,
4455
- labelContent: translationsDefault[TranslatorTranslationDefaultKey.POLICY].value,
4456
- content: h(APolicyPicker, {
4457
- ref: policyPickerVNode,
4458
- value: $v.value.policy_id.$model,
4459
- onChange: (input)=>{
4460
- $v.value.policy_id.$model = input.length > 0 ? input[0] : '';
4461
- },
4462
- query: {
4463
- filters: {
4464
- parent_id: null,
4465
- ...form.realm_id ? {
4466
- realm_id: form.realm_id
4467
- } : {}
4468
- }
4469
- }
4470
- })
4471
- }));
4472
4189
  children.push(buildFormSubmitWithTranslations({
4473
4190
  submit,
4474
4191
  busy,
@@ -4664,7 +4381,7 @@ const ARoleForm = defineComponent({
4664
4381
  content: h(ARealmPicker, {
4665
4382
  value: $v.value.realm_id.$model,
4666
4383
  onChange: (input)=>{
4667
- $v.value.realm_id.$model = input.length > 0 ? input[0] : '';
4384
+ $v.value.realm_id.$model = input.length > 0 ? input[0] ?? '' : '';
4668
4385
  }
4669
4386
  })
4670
4387
  }));
@@ -4996,7 +4713,7 @@ const AScopeForm = defineComponent({
4996
4713
  content: h(ARealmPicker, {
4997
4714
  value: $v.value.realm_id.$model,
4998
4715
  onChange: (input)=>{
4999
- $v.value.realm_id.$model = input.length > 0 ? input[0] : '';
4716
+ $v.value.realm_id.$model = input.length > 0 ? input[0] ?? '' : '';
5000
4717
  }
5001
4718
  })
5002
4719
  }));
@@ -5980,64 +5697,33 @@ const _hoisted_3$7 = ["onClick"];
5980
5697
  const _hoisted_4$5 = { class: "d-flex flex-row gap-2 flex-wrap" };
5981
5698
  const _hoisted_5$2 = ["onClick"];
5982
5699
  function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
5983
- const _component_AIdentityProviderProtocol = resolveComponent("AIdentityProviderProtocol");
5984
- const _component_AIdentityProviderPreset = resolveComponent("AIdentityProviderPreset");
5985
- return openBlock(), createElementBlock("div", _hoisted_1$a, [
5986
- createElementVNode("div", null, [
5987
- _cache[0] || (_cache[0] = createElementVNode("h6", null, "Protocols", -1)),
5988
- createElementVNode("div", _hoisted_2$9, [
5989
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.protocols, (item, key) => {
5990
- return openBlock(), createBlock(_component_AIdentityProviderProtocol, {
5991
- key,
5992
- id: item
5993
- }, {
5994
- default: withCtx((props) => [
5995
- createElementVNode("div", {
5996
- class: normalizeClass([{ "active": item === _ctx.protocol && !_ctx.preset }, "d-flex flex-column gap-1 text-center identity-provider-picker-item"]),
5997
- onClick: withModifiers(($event) => _ctx.pickProtocol(item), ["prevent"])
5998
- }, [
5999
- createElementVNode("div", null, [
6000
- createElementVNode("i", {
6001
- class: normalizeClass(["fa-2x", props.icon])
6002
- }, null, 2)
6003
- ]),
6004
- createElementVNode("div", null, toDisplayString(props.name), 1)
6005
- ], 10, _hoisted_3$7)
6006
- ]),
6007
- _: 2
6008
- }, 1032, ["id"]);
6009
- }), 128))
6010
- ])
6011
- ]),
6012
- createElementVNode("div", null, [
6013
- _cache[1] || (_cache[1] = createElementVNode("h6", null, "Presets", -1)),
6014
- createElementVNode("div", _hoisted_4$5, [
6015
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.presets, (item, key) => {
6016
- return openBlock(), createBlock(_component_AIdentityProviderPreset, {
6017
- key,
6018
- id: item
6019
- }, {
6020
- default: withCtx((props) => [
6021
- createElementVNode("div", {
6022
- class: normalizeClass([{ "active": item === _ctx.preset }, "d-flex flex-column gap-1 text-center identity-provider-picker-item"]),
6023
- onClick: withModifiers(($event) => _ctx.pickPreset(item), ["prevent"])
6024
- }, [
6025
- createElementVNode("div", null, [
6026
- createElementVNode("i", {
6027
- class: normalizeClass(["fa-2x", props.icon])
6028
- }, null, 2)
6029
- ]),
6030
- createElementVNode("div", null, toDisplayString(props.name), 1)
6031
- ], 10, _hoisted_5$2)
6032
- ]),
6033
- _: 2
6034
- }, 1032, ["id"]);
6035
- }), 128))
6036
- ])
6037
- ])
6038
- ]);
5700
+ const _component_AIdentityProviderProtocol = resolveComponent("AIdentityProviderProtocol");
5701
+ const _component_AIdentityProviderPreset = resolveComponent("AIdentityProviderPreset");
5702
+ return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("div", null, [_cache[0] || (_cache[0] = createElementVNode("h6", null, "Protocols", -1)), createElementVNode("div", _hoisted_2$9, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.protocols, (item, key) => {
5703
+ return openBlock(), createBlock(_component_AIdentityProviderProtocol, {
5704
+ key,
5705
+ id: item
5706
+ }, {
5707
+ default: withCtx((props) => [createElementVNode("div", {
5708
+ class: normalizeClass([{ "active": item === _ctx.protocol && !_ctx.preset }, "d-flex flex-column gap-1 text-center identity-provider-picker-item"]),
5709
+ onClick: withModifiers(($event) => _ctx.pickProtocol(item), ["prevent"])
5710
+ }, [createElementVNode("div", null, [createElementVNode("i", { class: normalizeClass(["fa-2x", props.icon]) }, null, 2)]), createElementVNode("div", null, toDisplayString(props.name), 1)], 10, _hoisted_3$7)]),
5711
+ _: 2
5712
+ }, 1032, ["id"]);
5713
+ }), 128))])]), createElementVNode("div", null, [_cache[1] || (_cache[1] = createElementVNode("h6", null, "Presets", -1)), createElementVNode("div", _hoisted_4$5, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.presets, (item, key) => {
5714
+ return openBlock(), createBlock(_component_AIdentityProviderPreset, {
5715
+ key,
5716
+ id: item
5717
+ }, {
5718
+ default: withCtx((props) => [createElementVNode("div", {
5719
+ class: normalizeClass([{ "active": item === _ctx.preset }, "d-flex flex-column gap-1 text-center identity-provider-picker-item"]),
5720
+ onClick: withModifiers(($event) => _ctx.pickPreset(item), ["prevent"])
5721
+ }, [createElementVNode("div", null, [createElementVNode("i", { class: normalizeClass(["fa-2x", props.icon]) }, null, 2)]), createElementVNode("div", null, toDisplayString(props.name), 1)], 10, _hoisted_5$2)]),
5722
+ _: 2
5723
+ }, 1032, ["id"]);
5724
+ }), 128))])])]);
6039
5725
  }
6040
- var AIdentityProviderPicker = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-af0f282c"]]);
5726
+ var AIdentityProviderPicker = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$e], ["__scopeId", "data-v-eb096917"]]);
6041
5727
 
6042
5728
  const AIdentityProviderOAuth2ClientFields = defineComponent({
6043
5729
  props: {
@@ -6568,8 +6254,8 @@ const AIdentityProviderForm = defineComponent({
6568
6254
  set();
6569
6255
  onChange(updatedAt, ()=>set());
6570
6256
  const renderPicker = ()=>h(AIdentityProviderPicker, {
6571
- protocol: protocol.value,
6572
- preset: preset.value,
6257
+ protocol: protocol.value ?? undefined,
6258
+ preset: preset.value ?? undefined,
6573
6259
  onPick (type, value) {
6574
6260
  if (type === 'preset') {
6575
6261
  preset.value = value;
@@ -6685,8 +6371,9 @@ const AIdentityProviderIcon = defineComponent({
6685
6371
  },
6686
6372
  setup (props, setup) {
6687
6373
  if (props.entity.preset) {
6374
+ const { preset } = props.entity;
6688
6375
  return ()=>h(AIdentityProviderPreset, {
6689
- id: props.entity.preset
6376
+ id: preset
6690
6377
  }, {
6691
6378
  default: (item)=>h('i', {
6692
6379
  class: [
@@ -6696,8 +6383,12 @@ const AIdentityProviderIcon = defineComponent({
6696
6383
  })
6697
6384
  });
6698
6385
  }
6386
+ if (!props.entity.protocol) {
6387
+ return ()=>null;
6388
+ }
6389
+ const { protocol } = props.entity;
6699
6390
  return ()=>h(AIdentityProviderProtocol, {
6700
- id: props.entity.protocol
6391
+ id: protocol
6701
6392
  }, {
6702
6393
  default: (item)=>h('i', {
6703
6394
  class: [
@@ -6769,8 +6460,7 @@ const AIdentityProviderRoleAssignment = defineComponent({
6769
6460
  assignFormProperties(form, manager.data.value);
6770
6461
  }
6771
6462
  const render = ()=>{
6772
- let displayButton = [];
6773
- displayButton = [
6463
+ const displayButton = [
6774
6464
  h('button', {
6775
6465
  class: 'btn btn-xs btn-dark',
6776
6466
  onClick ($event) {
@@ -6965,7 +6655,7 @@ var _sfc_main$e = defineComponent({
6965
6655
  $registerAs: 'type'
6966
6656
  });
6967
6657
  function assign(data = {}) {
6968
- form.names = data.names;
6658
+ form.names = data.names || [];
6969
6659
  }
6970
6660
  setup.expose({
6971
6661
  assign
@@ -6985,15 +6675,132 @@ var _sfc_main$e = defineComponent({
6985
6675
  });
6986
6676
 
6987
6677
  function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
6988
- const _component_AFormInputList = resolveComponent("AFormInputList");
6989
- return openBlock(), createBlock(_component_AFormInputList, {
6990
- names: _ctx.vuelidate.names.$model,
6991
- "min-items": 1,
6992
- onChanged: _ctx.handleUpdated
6993
- }, null, 8, ["names", "onChanged"]);
6678
+ const _component_AFormInputList = resolveComponent("AFormInputList");
6679
+ return openBlock(), createBlock(_component_AFormInputList, {
6680
+ names: _ctx.vuelidate.names.$model,
6681
+ "min-items": 1,
6682
+ onChanged: _ctx.handleUpdated
6683
+ }, null, 8, ["names", "onChanged"]);
6994
6684
  }
6995
6685
  var AAttributeNamesPolicyForm = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$d]]);
6996
6686
 
6687
+ const APolicies = defineComponent({
6688
+ props: defineEntityCollectionVProps(),
6689
+ emits: defineEntityCollectionVEmitOptions(),
6690
+ slots: Object,
6691
+ setup (props, setup) {
6692
+ const { render } = defineEntityCollectionManager({
6693
+ type: `${EntityType.POLICY}`,
6694
+ props,
6695
+ setup
6696
+ });
6697
+ const translationName = useTranslation({
6698
+ group: TranslatorTranslationGroup.DEFAULT,
6699
+ key: TranslatorTranslationDefaultKey.POLICIES
6700
+ });
6701
+ const translation = useTranslation({
6702
+ group: TranslatorTranslationGroup.VUECS,
6703
+ key: TranslatorTranslationVuecsKey.NO_MORE,
6704
+ data: {
6705
+ name: translationName
6706
+ }
6707
+ });
6708
+ return ()=>render({
6709
+ noMore: {
6710
+ content: translation.value
6711
+ }
6712
+ });
6713
+ }
6714
+ });
6715
+
6716
+ const APolicyParentAssignment = defineComponent({
6717
+ props: {
6718
+ entityId: {
6719
+ type: String,
6720
+ required: true
6721
+ },
6722
+ entity: {
6723
+ type: Object
6724
+ },
6725
+ parentId: {
6726
+ type: String,
6727
+ required: true
6728
+ }
6729
+ },
6730
+ emits: defineEntityVEmitOptions(),
6731
+ async setup (props, setup) {
6732
+ const manager = defineEntityManager({
6733
+ type: `${EntityType.POLICY}`,
6734
+ setup,
6735
+ socket: {
6736
+ processEvent (event) {
6737
+ return event.data.id === props.entityId;
6738
+ }
6739
+ },
6740
+ props: {
6741
+ entity: props.entity,
6742
+ entityId: props.entityId
6743
+ }
6744
+ });
6745
+ await manager.resolve({
6746
+ query: {
6747
+ filters: {
6748
+ id: props.entityId
6749
+ }
6750
+ }
6751
+ });
6752
+ return ()=>renderToggleButton({
6753
+ changed: (value)=>{
6754
+ if (!manager.data.value) {
6755
+ return;
6756
+ }
6757
+ if (value) {
6758
+ manager.data.value.parent_id = props.parentId;
6759
+ } else {
6760
+ manager.data.value.parent_id = null;
6761
+ if (manager.data.value.parent) {
6762
+ manager.data.value.parent = null;
6763
+ }
6764
+ }
6765
+ manager.update(manager.data.value);
6766
+ },
6767
+ value: !!manager.data.value && manager.data.value.parent_id === props.parentId,
6768
+ isBusy: manager.busy.value
6769
+ });
6770
+ }
6771
+ });
6772
+
6773
+ const APolicyPicker = defineComponent({
6774
+ props: {
6775
+ parentId: {
6776
+ type: String
6777
+ },
6778
+ ...defineEntityPickerVProps()
6779
+ },
6780
+ emits: defineEntityPickerVEmitOptions(),
6781
+ slots: Object,
6782
+ setup (props, { slots, ...setup }) {
6783
+ const { render } = defineEntityPicker({
6784
+ component: APolicies,
6785
+ props,
6786
+ setup: {
6787
+ ...setup,
6788
+ slots: {
6789
+ ...props.parentId ? {
6790
+ [SlotName.ITEM_ACTIONS]: (slotProps)=>h(APolicyParentAssignment, {
6791
+ entity: slotProps.data,
6792
+ entityId: slotProps.data.id,
6793
+ parentId: props.parentId
6794
+ })
6795
+ } : {},
6796
+ ...slots
6797
+ }
6798
+ }
6799
+ });
6800
+ return ()=>render();
6801
+ }
6802
+ });
6803
+
6997
6804
  var _sfc_main$d = defineComponent({
6998
6805
  components: {
6999
6806
  APolicyChildrenPicker: APolicyPicker,
@@ -7081,35 +6888,30 @@ var _sfc_main$d = defineComponent({
7081
6888
  });
7082
6889
 
7083
6890
  function _sfc_render$c(_ctx, _cache, $props, $setup, $data, $options) {
7084
- const _component_APolicyChildrenPicker = resolveComponent("APolicyChildrenPicker");
7085
- const _component_VCFormGroup = resolveComponent("VCFormGroup");
7086
- const _component_IVuelidate = resolveComponent("IVuelidate");
7087
- return openBlock(), createElementBlock("div", null, [
7088
- createVNode(_component_IVuelidate, {
7089
- validation: _ctx.vuelidate.items
7090
- }, {
7091
- default: withCtx((props) => [
7092
- createVNode(_component_VCFormGroup, {
7093
- "validation-messages": props.data,
7094
- "validation-severity": props.severity
7095
- }, {
7096
- label: withCtx(() => [..._cache[0] || (_cache[0] = [
7097
- createTextVNode(" Children ", -1)
7098
- ])]),
7099
- default: withCtx(() => [
7100
- createVNode(_component_APolicyChildrenPicker, {
7101
- "parent-id": _ctx.id,
7102
- query: _ctx.query,
7103
- value: _ctx.vuelidate.items.$model,
7104
- onChange: _ctx.handleUpdated
7105
- }, null, 8, ["parent-id", "query", "value", "onChange"])
7106
- ]),
7107
- _: 1
7108
- }, 8, ["validation-messages", "validation-severity"])
7109
- ]),
7110
- _: 1
7111
- }, 8, ["validation"])
7112
- ]);
6891
+ const _component_APolicyChildrenPicker = resolveComponent("APolicyChildrenPicker");
6892
+ const _component_VCFormGroup = resolveComponent("VCFormGroup");
6893
+ const _component_IVuelidate = resolveComponent("IVuelidate");
6894
+ return openBlock(), createElementBlock("div", null, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.items }, {
6895
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
6896
+ "validation-messages": props.data,
6897
+ "validation-severity": props.severity
6898
+ }, {
6899
+ label: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" Children ", -1)])]),
6900
+ default: withCtx(() => [createVNode(_component_APolicyChildrenPicker, {
6901
+ "parent-id": _ctx.id,
6902
+ query: _ctx.query,
6903
+ value: _ctx.vuelidate.items.$model,
6904
+ onChange: _ctx.handleUpdated
6905
+ }, null, 8, [
6906
+ "parent-id",
6907
+ "query",
6908
+ "value",
6909
+ "onChange"
6910
+ ])]),
6911
+ _: 1
6912
+ }, 8, ["validation-messages", "validation-severity"])]),
6913
+ _: 1
6914
+ }, 8, ["validation"])]);
7113
6915
  }
7114
6916
  var ACompositePolicyForm = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$c]]);
7115
6917
 
@@ -7139,6 +6941,7 @@ var _sfc_main$c = defineComponent({
7139
6941
  $registerAs: 'type'
7140
6942
  });
7141
6943
  function assign(data = {}) {
6944
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7142
6945
  assignFormProperties(form, data);
7143
6946
  }
7144
6947
  setup.expose({
@@ -7161,59 +6964,40 @@ var _sfc_main$c = defineComponent({
7161
6964
  });
7162
6965
 
7163
6966
  function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
7164
- const _component_VCFormInput = resolveComponent("VCFormInput");
7165
- const _component_VCFormGroup = resolveComponent("VCFormGroup");
7166
- const _component_IVuelidate = resolveComponent("IVuelidate");
7167
- return openBlock(), createElementBlock("div", null, [
7168
- createVNode(_component_IVuelidate, {
7169
- validation: _ctx.vuelidate.start
7170
- }, {
7171
- default: withCtx((props) => [
7172
- createVNode(_component_VCFormGroup, {
7173
- "validation-messages": props.data,
7174
- "validation-severity": props.severity
7175
- }, {
7176
- label: withCtx(() => [..._cache[2] || (_cache[2] = [
7177
- createTextVNode(" Start ", -1)
7178
- ])]),
7179
- default: withCtx(() => [
7180
- createVNode(_component_VCFormInput, {
7181
- modelValue: _ctx.vuelidate.start.$model,
7182
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.start.$model = $event),
7183
- placeholder: "YYYY-MM-DD",
7184
- onChange: _ctx.handleUpdated
7185
- }, null, 8, ["modelValue", "onChange"])
7186
- ]),
7187
- _: 1
7188
- }, 8, ["validation-messages", "validation-severity"])
7189
- ]),
7190
- _: 1
7191
- }, 8, ["validation"]),
7192
- createVNode(_component_IVuelidate, {
7193
- validation: _ctx.vuelidate.end
7194
- }, {
7195
- default: withCtx((props) => [
7196
- createVNode(_component_VCFormGroup, {
7197
- "validation-messages": props.data,
7198
- "validation-severity": props.severity
7199
- }, {
7200
- label: withCtx(() => [..._cache[3] || (_cache[3] = [
7201
- createTextVNode(" End ", -1)
7202
- ])]),
7203
- default: withCtx(() => [
7204
- createVNode(_component_VCFormInput, {
7205
- modelValue: _ctx.vuelidate.end.$model,
7206
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.end.$model = $event),
7207
- placeholder: "YYYY-MM-DD",
7208
- onChange: _ctx.handleUpdated
7209
- }, null, 8, ["modelValue", "onChange"])
7210
- ]),
7211
- _: 1
7212
- }, 8, ["validation-messages", "validation-severity"])
7213
- ]),
7214
- _: 1
7215
- }, 8, ["validation"])
7216
- ]);
6967
+ const _component_VCFormInput = resolveComponent("VCFormInput");
6968
+ const _component_VCFormGroup = resolveComponent("VCFormGroup");
6969
+ const _component_IVuelidate = resolveComponent("IVuelidate");
6970
+ return openBlock(), createElementBlock("div", null, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.start }, {
6971
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
6972
+ "validation-messages": props.data,
6973
+ "validation-severity": props.severity
6974
+ }, {
6975
+ label: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode(" Start ", -1)])]),
6976
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
6977
+ modelValue: _ctx.vuelidate.start.$model,
6978
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.start.$model = $event),
6979
+ placeholder: "YYYY-MM-DD",
6980
+ onChange: _ctx.handleUpdated
6981
+ }, null, 8, ["modelValue", "onChange"])]),
6982
+ _: 1
6983
+ }, 8, ["validation-messages", "validation-severity"])]),
6984
+ _: 1
6985
+ }, 8, ["validation"]), createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.end }, {
6986
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
6987
+ "validation-messages": props.data,
6988
+ "validation-severity": props.severity
6989
+ }, {
6990
+ label: withCtx(() => [..._cache[3] || (_cache[3] = [createTextVNode(" End ", -1)])]),
6991
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
6992
+ modelValue: _ctx.vuelidate.end.$model,
6993
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.end.$model = $event),
6994
+ placeholder: "YYYY-MM-DD",
6995
+ onChange: _ctx.handleUpdated
6996
+ }, null, 8, ["modelValue", "onChange"])]),
6997
+ _: 1
6998
+ }, 8, ["validation-messages", "validation-severity"])]),
6999
+ _: 1
7000
+ }, 8, ["validation"])]);
7217
7001
  }
7218
7002
  var ADatePolicyForm = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_render$b]]);
7219
7003
 
@@ -7259,17 +7043,15 @@ var _sfc_main$b = defineComponent({
7259
7043
  });
7260
7044
 
7261
7045
  function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
7262
- const _component_AFormInputList = resolveComponent("AFormInputList");
7263
- return openBlock(), createBlock(_component_AFormInputList, {
7264
- names: _ctx.vuelidate.types.$model,
7265
- "min-items": 1,
7266
- onChanged: _ctx.handleUpdated
7267
- }, {
7268
- label: withCtx(() => [..._cache[0] || (_cache[0] = [
7269
- createTextVNode(" Types ", -1)
7270
- ])]),
7271
- _: 1
7272
- }, 8, ["names", "onChanged"]);
7046
+ const _component_AFormInputList = resolveComponent("AFormInputList");
7047
+ return openBlock(), createBlock(_component_AFormInputList, {
7048
+ names: _ctx.vuelidate.types.$model,
7049
+ "min-items": 1,
7050
+ onChanged: _ctx.handleUpdated
7051
+ }, {
7052
+ label: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode(" Types ", -1)])]),
7053
+ _: 1
7054
+ }, 8, ["names", "onChanged"]);
7273
7055
  }
7274
7056
  var AIdentityPolicyForm = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$a]]);
7275
7057
 
@@ -7289,26 +7071,29 @@ var _sfc_main$a = defineComponent({
7289
7071
  ],
7290
7072
  setup (props, setup) {
7291
7073
  const form = reactive({
7292
- attributeNameStrict: false,
7293
- attributeNullMatchAll: false,
7294
- identityMasterMatchAll: false,
7295
- attributeName: []
7074
+ attribute_name_strict: false,
7075
+ attribute_null_match_all: false,
7076
+ identity_master_match_all: false,
7077
+ attribute_name: []
7296
7078
  });
7297
7079
  const vuelidate = useVuelidate({
7298
- attributeNameStrict: {},
7299
- attributeNullMatchAll: {},
7300
- identityMasterMatchAll: {},
7301
- attributeName: {}
7080
+ attribute_name_strict: {},
7081
+ attribute_null_match_all: {},
7082
+ identity_master_match_all: {},
7083
+ attribute_name: {}
7302
7084
  }, form, {
7303
7085
  $registerAs: 'type'
7304
7086
  });
7305
7087
  function assign(input = {}) {
7306
- const { attributeName, ...data } = input;
7088
+ const { attribute_name, ...data } = input;
7089
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7307
7090
  assignFormProperties(form, data);
7308
- if (attributeName) {
7309
- form.attributeName = typeof attributeName === 'string' ? [
7310
- attributeName
7311
- ] : attributeName;
7091
+ if (attribute_name) {
7092
+ form.attribute_name = typeof attribute_name === 'string' ? [
7093
+ attribute_name
7094
+ ] : attribute_name;
7095
+ } else {
7096
+ form.attribute_name = [];
7312
7097
  }
7313
7098
  }
7314
7099
  setup.expose({
@@ -7324,7 +7109,7 @@ var _sfc_main$a = defineComponent({
7324
7109
  });
7325
7110
  };
7326
7111
  const handleAttributeNameChanged = (data)=>{
7327
- form.attributeName = data;
7112
+ form.attribute_name = data;
7328
7113
  handleUpdated();
7329
7114
  };
7330
7115
  return {
@@ -7342,130 +7127,89 @@ const _hoisted_4$4 = ["for"];
7342
7127
  const _hoisted_5$1 = ["for"];
7343
7128
  const _hoisted_6$1 = ["for"];
7344
7129
  function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
7345
- const _component_AFormInputList = resolveComponent("AFormInputList");
7346
- const _component_VCFormGroup = resolveComponent("VCFormGroup");
7347
- const _component_IVuelidate = resolveComponent("IVuelidate");
7348
- const _component_VCFormInputCheckbox = resolveComponent("VCFormInputCheckbox");
7349
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
7350
- createElementVNode("div", _hoisted_2$8, [
7351
- createVNode(_component_IVuelidate, {
7352
- validation: _ctx.vuelidate.attributeName
7353
- }, {
7354
- default: withCtx((props) => [
7355
- createVNode(_component_VCFormGroup, {
7356
- "validation-messages": props.data,
7357
- "validation-severity": props.severity
7358
- }, {
7359
- default: withCtx(() => [
7360
- createVNode(_component_AFormInputList, {
7361
- names: _ctx.vuelidate.attributeName.$model,
7362
- onChanged: _ctx.handleAttributeNameChanged
7363
- }, null, 8, ["names", "onChanged"])
7364
- ]),
7365
- _: 1
7366
- }, 8, ["validation-messages", "validation-severity"])
7367
- ]),
7368
- _: 1
7369
- }, 8, ["validation"])
7370
- ]),
7371
- createElementVNode("div", _hoisted_3$6, [
7372
- createVNode(_component_IVuelidate, {
7373
- validation: _ctx.vuelidate.attributeNameStrict
7374
- }, {
7375
- default: withCtx((props) => [
7376
- createVNode(_component_VCFormGroup, {
7377
- "validation-messages": props.data,
7378
- "validation-severity": props.severity
7379
- }, {
7380
- default: withCtx(() => [
7381
- createVNode(_component_VCFormInputCheckbox, {
7382
- modelValue: _ctx.vuelidate.attributeNameStrict.$model,
7383
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.attributeNameStrict.$model = $event),
7384
- "group-class": "form-switch",
7385
- label: true,
7386
- onChange: _ctx.handleUpdated
7387
- }, {
7388
- label: withCtx((iProps) => [
7389
- createElementVNode("label", {
7390
- for: iProps.id
7391
- }, " Only match if the attribute is strict equal to the name? ", 8, _hoisted_4$4)
7392
- ]),
7393
- _: 1
7394
- }, 8, ["modelValue", "onChange"])
7395
- ]),
7396
- _: 1
7397
- }, 8, ["validation-messages", "validation-severity"])
7398
- ]),
7399
- _: 1
7400
- }, 8, ["validation"]),
7401
- createVNode(_component_IVuelidate, {
7402
- validation: _ctx.vuelidate.attributeNullMatchAll
7403
- }, {
7404
- default: withCtx((props) => [
7405
- createVNode(_component_VCFormGroup, {
7406
- "validation-messages": props.data,
7407
- "validation-severity": props.severity
7408
- }, {
7409
- default: withCtx(() => [
7410
- createVNode(_component_VCFormInputCheckbox, {
7411
- modelValue: _ctx.vuelidate.attributeNullMatchAll.$model,
7412
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.attributeNullMatchAll.$model = $event),
7413
- "group-class": "form-switch",
7414
- label: true,
7415
- onChange: _ctx.handleUpdated
7416
- }, {
7417
- label: withCtx((iProps) => [
7418
- createElementVNode("label", {
7419
- for: iProps.id
7420
- }, [..._cache[3] || (_cache[3] = [
7421
- createTextVNode(" Determines if resources with null realm-id/name value should match all identity realms.", -1),
7422
- createElementVNode("br", null, null, -1),
7423
- createTextVNode(" If true, any identity realm can access resources with null realm-id/name values. ", -1)
7424
- ])], 8, _hoisted_5$1)
7425
- ]),
7426
- _: 1
7427
- }, 8, ["modelValue", "onChange"])
7428
- ]),
7429
- _: 1
7430
- }, 8, ["validation-messages", "validation-severity"])
7431
- ]),
7432
- _: 1
7433
- }, 8, ["validation"]),
7434
- createVNode(_component_IVuelidate, {
7435
- validation: _ctx.vuelidate.identityMasterMatchAll
7436
- }, {
7437
- default: withCtx((props) => [
7438
- createVNode(_component_VCFormGroup, {
7439
- "validation-messages": props.data,
7440
- "validation-severity": props.severity
7441
- }, {
7442
- default: withCtx(() => [
7443
- createVNode(_component_VCFormInputCheckbox, {
7444
- modelValue: _ctx.vuelidate.identityMasterMatchAll.$model,
7445
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.vuelidate.identityMasterMatchAll.$model = $event),
7446
- "group-class": "form-switch",
7447
- label: true,
7448
- onChange: _ctx.handleUpdated
7449
- }, {
7450
- label: withCtx((iProps) => [
7451
- createElementVNode("label", {
7452
- for: iProps.id
7453
- }, [..._cache[4] || (_cache[4] = [
7454
- createTextVNode(" Specifies whether the master realm of an identity should match all realm-id/name attributes, including null.", -1),
7455
- createElementVNode("br", null, null, -1),
7456
- createTextVNode(" If true, the master realm can access any resource regardless of its realm value. ", -1)
7457
- ])], 8, _hoisted_6$1)
7458
- ]),
7459
- _: 1
7460
- }, 8, ["modelValue", "onChange"])
7461
- ]),
7462
- _: 1
7463
- }, 8, ["validation-messages", "validation-severity"])
7464
- ]),
7465
- _: 1
7466
- }, 8, ["validation"])
7467
- ])
7468
- ]);
7130
+ const _component_AFormInputList = resolveComponent("AFormInputList");
7131
+ const _component_VCFormGroup = resolveComponent("VCFormGroup");
7132
+ const _component_IVuelidate = resolveComponent("IVuelidate");
7133
+ const _component_VCFormInputCheckbox = resolveComponent("VCFormInputCheckbox");
7134
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [createElementVNode("div", _hoisted_2$8, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.attribute_name }, {
7135
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7136
+ "validation-messages": props.data,
7137
+ "validation-severity": props.severity
7138
+ }, {
7139
+ default: withCtx(() => [createVNode(_component_AFormInputList, {
7140
+ names: _ctx.vuelidate.attribute_name.$model,
7141
+ onChanged: _ctx.handleAttributeNameChanged
7142
+ }, null, 8, ["names", "onChanged"])]),
7143
+ _: 1
7144
+ }, 8, ["validation-messages", "validation-severity"])]),
7145
+ _: 1
7146
+ }, 8, ["validation"])]), createElementVNode("div", _hoisted_3$6, [
7147
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.attribute_name_strict }, {
7148
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7149
+ "validation-messages": props.data,
7150
+ "validation-severity": props.severity
7151
+ }, {
7152
+ default: withCtx(() => [createVNode(_component_VCFormInputCheckbox, {
7153
+ modelValue: _ctx.vuelidate.attribute_name_strict.$model,
7154
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.attribute_name_strict.$model = $event),
7155
+ "group-class": "form-switch",
7156
+ label: true,
7157
+ onChange: _ctx.handleUpdated
7158
+ }, {
7159
+ label: withCtx((iProps) => [createElementVNode("label", { for: iProps.id }, " Only match if the attribute is strict equal to the name? ", 8, _hoisted_4$4)]),
7160
+ _: 1
7161
+ }, 8, ["modelValue", "onChange"])]),
7162
+ _: 1
7163
+ }, 8, ["validation-messages", "validation-severity"])]),
7164
+ _: 1
7165
+ }, 8, ["validation"]),
7166
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.attribute_null_match_all }, {
7167
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7168
+ "validation-messages": props.data,
7169
+ "validation-severity": props.severity
7170
+ }, {
7171
+ default: withCtx(() => [createVNode(_component_VCFormInputCheckbox, {
7172
+ modelValue: _ctx.vuelidate.attribute_null_match_all.$model,
7173
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.attribute_null_match_all.$model = $event),
7174
+ "group-class": "form-switch",
7175
+ label: true,
7176
+ onChange: _ctx.handleUpdated
7177
+ }, {
7178
+ label: withCtx((iProps) => [createElementVNode("label", { for: iProps.id }, [..._cache[3] || (_cache[3] = [
7179
+ createTextVNode(" Determines if resources with null realm-id/name value should match all identity realms.", -1),
7180
+ createElementVNode("br", null, null, -1),
7181
+ createTextVNode(" If true, any identity realm can access resources with null realm-id/name values. ", -1)
7182
+ ])], 8, _hoisted_5$1)]),
7183
+ _: 1
7184
+ }, 8, ["modelValue", "onChange"])]),
7185
+ _: 1
7186
+ }, 8, ["validation-messages", "validation-severity"])]),
7187
+ _: 1
7188
+ }, 8, ["validation"]),
7189
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.identity_master_match_all }, {
7190
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7191
+ "validation-messages": props.data,
7192
+ "validation-severity": props.severity
7193
+ }, {
7194
+ default: withCtx(() => [createVNode(_component_VCFormInputCheckbox, {
7195
+ modelValue: _ctx.vuelidate.identity_master_match_all.$model,
7196
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.vuelidate.identity_master_match_all.$model = $event),
7197
+ "group-class": "form-switch",
7198
+ label: true,
7199
+ onChange: _ctx.handleUpdated
7200
+ }, {
7201
+ label: withCtx((iProps) => [createElementVNode("label", { for: iProps.id }, [..._cache[4] || (_cache[4] = [
7202
+ createTextVNode(" Specifies whether the master realm of an identity should match all realm-id/name attributes, including null.", -1),
7203
+ createElementVNode("br", null, null, -1),
7204
+ createTextVNode(" If true, the master realm can access any resource regardless of its realm value. ", -1)
7205
+ ])], 8, _hoisted_6$1)]),
7206
+ _: 1
7207
+ }, 8, ["modelValue", "onChange"])]),
7208
+ _: 1
7209
+ }, 8, ["validation-messages", "validation-severity"])]),
7210
+ _: 1
7211
+ }, 8, ["validation"])
7212
+ ])]);
7469
7213
  }
7470
7214
  var ARealmMatchPolicyForm = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["render", _sfc_render$9]]);
7471
7215
 
@@ -7488,9 +7232,9 @@ var _sfc_main$9 = defineComponent({
7488
7232
  start: '',
7489
7233
  end: '',
7490
7234
  interval: '',
7491
- dayOfWeek: '',
7492
- dayOfMonth: '',
7493
- dayOfYear: ''
7235
+ day_of_week: '',
7236
+ day_of_month: '',
7237
+ day_of_year: ''
7494
7238
  });
7495
7239
  const intervalOptions = Object.values(TimePolicyInterval).map((el)=>({
7496
7240
  id: el,
@@ -7500,15 +7244,15 @@ var _sfc_main$9 = defineComponent({
7500
7244
  start: {},
7501
7245
  end: {},
7502
7246
  interval: {},
7503
- dayOfWeek: {
7247
+ day_of_week: {
7504
7248
  minValue: minValue(0),
7505
7249
  maxValue: maxValue(6)
7506
7250
  },
7507
- dayOfMonth: {
7251
+ day_of_month: {
7508
7252
  minValue: minValue(1),
7509
7253
  maxValue: maxValue(31)
7510
7254
  },
7511
- dayOfYear: {
7255
+ day_of_year: {
7512
7256
  minValue: minValue(1),
7513
7257
  maxValue: maxValue(365)
7514
7258
  }
@@ -7516,6 +7260,7 @@ var _sfc_main$9 = defineComponent({
7516
7260
  $registerAs: 'type'
7517
7261
  });
7518
7262
  function assign(data = {}) {
7263
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
7519
7264
  assignFormProperties(form, data);
7520
7265
  }
7521
7266
  setup.expose({
@@ -7535,13 +7280,13 @@ var _sfc_main$9 = defineComponent({
7535
7280
  };
7536
7281
  const handleIntervalUpdated = (value)=>{
7537
7282
  if (!isIntervalForDayOfWeek(value)) {
7538
- vuelidate.value.dayOfWeek.$model = '';
7283
+ vuelidate.value.day_of_week.$model = '';
7539
7284
  }
7540
7285
  if (!isIntervalForDayOfMonth(value)) {
7541
- vuelidate.value.dayOfMonth.$model = '';
7286
+ vuelidate.value.day_of_month.$model = '';
7542
7287
  }
7543
7288
  if (!isIntervalForDayOfYear(value)) {
7544
- vuelidate.value.dayOfYear.$model = '';
7289
+ vuelidate.value.day_of_year.$model = '';
7545
7290
  }
7546
7291
  handleUpdated();
7547
7292
  };
@@ -7559,179 +7304,129 @@ var _sfc_main$9 = defineComponent({
7559
7304
 
7560
7305
  const _hoisted_1$8 = { class: "row" };
7561
7306
  const _hoisted_2$7 = {
7562
- key: 0,
7563
- class: "col"
7307
+ key: 0,
7308
+ class: "col"
7564
7309
  };
7565
7310
  const _hoisted_3$5 = {
7566
- key: 1,
7567
- class: "col"
7311
+ key: 1,
7312
+ class: "col"
7568
7313
  };
7569
7314
  const _hoisted_4$3 = {
7570
- key: 2,
7571
- class: "col"
7315
+ key: 2,
7316
+ class: "col"
7572
7317
  };
7573
7318
  function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
7574
- const _component_VCFormInput = resolveComponent("VCFormInput");
7575
- const _component_VCFormGroup = resolveComponent("VCFormGroup");
7576
- const _component_IVuelidate = resolveComponent("IVuelidate");
7577
- const _component_VCFormSelect = resolveComponent("VCFormSelect");
7578
- return openBlock(), createElementBlock("div", null, [
7579
- createVNode(_component_IVuelidate, {
7580
- validation: _ctx.vuelidate.start
7581
- }, {
7582
- default: withCtx((props) => [
7583
- createVNode(_component_VCFormGroup, {
7584
- "validation-messages": props.data,
7585
- "validation-severity": props.severity
7586
- }, {
7587
- label: withCtx(() => [..._cache[6] || (_cache[6] = [
7588
- createTextVNode(" Start ", -1)
7589
- ])]),
7590
- default: withCtx(() => [
7591
- createVNode(_component_VCFormInput, {
7592
- modelValue: _ctx.vuelidate.start.$model,
7593
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.start.$model = $event),
7594
- placeholder: "00:00:00",
7595
- onChange: _ctx.handleUpdated
7596
- }, null, 8, ["modelValue", "onChange"])
7597
- ]),
7598
- _: 1
7599
- }, 8, ["validation-messages", "validation-severity"])
7600
- ]),
7601
- _: 1
7602
- }, 8, ["validation"]),
7603
- createVNode(_component_IVuelidate, {
7604
- validation: _ctx.vuelidate.end
7605
- }, {
7606
- default: withCtx((props) => [
7607
- createVNode(_component_VCFormGroup, {
7608
- "validation-messages": props.data,
7609
- "validation-severity": props.severity
7610
- }, {
7611
- label: withCtx(() => [..._cache[7] || (_cache[7] = [
7612
- createTextVNode(" End ", -1)
7613
- ])]),
7614
- default: withCtx(() => [
7615
- createVNode(_component_VCFormInput, {
7616
- modelValue: _ctx.vuelidate.end.$model,
7617
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.end.$model = $event),
7618
- placeholder: "00:00:00",
7619
- onChange: _ctx.handleUpdated
7620
- }, null, 8, ["modelValue", "onChange"])
7621
- ]),
7622
- _: 1
7623
- }, 8, ["validation-messages", "validation-severity"])
7624
- ]),
7625
- _: 1
7626
- }, 8, ["validation"]),
7627
- createVNode(_component_IVuelidate, {
7628
- validation: _ctx.vuelidate.interval
7629
- }, {
7630
- default: withCtx((props) => [
7631
- createVNode(_component_VCFormGroup, {
7632
- "validation-messages": props.data,
7633
- "validation-severity": props.severity
7634
- }, {
7635
- label: withCtx(() => [..._cache[8] || (_cache[8] = [
7636
- createTextVNode(" Interval ", -1)
7637
- ])]),
7638
- default: withCtx(() => [
7639
- createVNode(_component_VCFormSelect, {
7640
- modelValue: _ctx.vuelidate.interval.$model,
7641
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.vuelidate.interval.$model = $event),
7642
- options: _ctx.intervalOptions,
7643
- onChange: _ctx.handleIntervalUpdated
7644
- }, null, 8, ["modelValue", "options", "onChange"])
7645
- ]),
7646
- _: 1
7647
- }, 8, ["validation-messages", "validation-severity"])
7648
- ]),
7649
- _: 1
7650
- }, 8, ["validation"]),
7651
- createElementVNode("div", _hoisted_1$8, [
7652
- _ctx.displayIntervalForDayOfWeek ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
7653
- createVNode(_component_IVuelidate, {
7654
- validation: _ctx.vuelidate.dayOfWeek
7655
- }, {
7656
- default: withCtx((props) => [
7657
- createVNode(_component_VCFormGroup, {
7658
- "validation-messages": props.data,
7659
- "validation-severity": props.severity
7660
- }, {
7661
- label: withCtx(() => [..._cache[9] || (_cache[9] = [
7662
- createTextVNode(" Day of Week ", -1)
7663
- ])]),
7664
- default: withCtx(() => [
7665
- createVNode(_component_VCFormInput, {
7666
- modelValue: _ctx.vuelidate.dayOfWeek.$model,
7667
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.vuelidate.dayOfWeek.$model = $event),
7668
- placeholder: "0-7",
7669
- type: "number",
7670
- onChange: _ctx.handleUpdated
7671
- }, null, 8, ["modelValue", "onChange"])
7672
- ]),
7673
- _: 1
7674
- }, 8, ["validation-messages", "validation-severity"])
7675
- ]),
7676
- _: 1
7677
- }, 8, ["validation"])
7678
- ])) : createCommentVNode("", true),
7679
- _ctx.displayIntervalForDayOfMonth ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
7680
- createVNode(_component_IVuelidate, {
7681
- validation: _ctx.vuelidate.dayOfMonth
7682
- }, {
7683
- default: withCtx((props) => [
7684
- createVNode(_component_VCFormGroup, {
7685
- "validation-messages": props.data,
7686
- "validation-severity": props.severity
7687
- }, {
7688
- label: withCtx(() => [..._cache[10] || (_cache[10] = [
7689
- createTextVNode(" Day of Month ", -1)
7690
- ])]),
7691
- default: withCtx(() => [
7692
- createVNode(_component_VCFormInput, {
7693
- modelValue: _ctx.vuelidate.dayOfMonth.$model,
7694
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.vuelidate.dayOfMonth.$model = $event),
7695
- placeholder: "1-31",
7696
- type: "number",
7697
- onChange: _ctx.handleUpdated
7698
- }, null, 8, ["modelValue", "onChange"])
7699
- ]),
7700
- _: 1
7701
- }, 8, ["validation-messages", "validation-severity"])
7702
- ]),
7703
- _: 1
7704
- }, 8, ["validation"])
7705
- ])) : createCommentVNode("", true),
7706
- _ctx.displayIntervalForDayOfYear ? (openBlock(), createElementBlock("div", _hoisted_4$3, [
7707
- createVNode(_component_IVuelidate, {
7708
- validation: _ctx.vuelidate.dayOfYear
7709
- }, {
7710
- default: withCtx((props) => [
7711
- createVNode(_component_VCFormGroup, {
7712
- "validation-messages": props.data,
7713
- "validation-severity": props.severity
7714
- }, {
7715
- label: withCtx(() => [..._cache[11] || (_cache[11] = [
7716
- createTextVNode(" Day of Year ", -1)
7717
- ])]),
7718
- default: withCtx(() => [
7719
- createVNode(_component_VCFormInput, {
7720
- modelValue: _ctx.vuelidate.dayOfYear.$model,
7721
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.vuelidate.dayOfYear.$model = $event),
7722
- type: "number",
7723
- placeholder: "1-365",
7724
- onChange: _ctx.handleUpdated
7725
- }, null, 8, ["modelValue", "onChange"])
7726
- ]),
7727
- _: 1
7728
- }, 8, ["validation-messages", "validation-severity"])
7729
- ]),
7730
- _: 1
7731
- }, 8, ["validation"])
7732
- ])) : createCommentVNode("", true)
7733
- ])
7734
- ]);
7319
+ const _component_VCFormInput = resolveComponent("VCFormInput");
7320
+ const _component_VCFormGroup = resolveComponent("VCFormGroup");
7321
+ const _component_IVuelidate = resolveComponent("IVuelidate");
7322
+ const _component_VCFormSelect = resolveComponent("VCFormSelect");
7323
+ return openBlock(), createElementBlock("div", null, [
7324
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.start }, {
7325
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7326
+ "validation-messages": props.data,
7327
+ "validation-severity": props.severity
7328
+ }, {
7329
+ label: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode(" Start ", -1)])]),
7330
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
7331
+ modelValue: _ctx.vuelidate.start.$model,
7332
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.start.$model = $event),
7333
+ placeholder: "00:00:00",
7334
+ onChange: _ctx.handleUpdated
7335
+ }, null, 8, ["modelValue", "onChange"])]),
7336
+ _: 1
7337
+ }, 8, ["validation-messages", "validation-severity"])]),
7338
+ _: 1
7339
+ }, 8, ["validation"]),
7340
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.end }, {
7341
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7342
+ "validation-messages": props.data,
7343
+ "validation-severity": props.severity
7344
+ }, {
7345
+ label: withCtx(() => [..._cache[7] || (_cache[7] = [createTextVNode(" End ", -1)])]),
7346
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
7347
+ modelValue: _ctx.vuelidate.end.$model,
7348
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.end.$model = $event),
7349
+ placeholder: "00:00:00",
7350
+ onChange: _ctx.handleUpdated
7351
+ }, null, 8, ["modelValue", "onChange"])]),
7352
+ _: 1
7353
+ }, 8, ["validation-messages", "validation-severity"])]),
7354
+ _: 1
7355
+ }, 8, ["validation"]),
7356
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.interval }, {
7357
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7358
+ "validation-messages": props.data,
7359
+ "validation-severity": props.severity
7360
+ }, {
7361
+ label: withCtx(() => [..._cache[8] || (_cache[8] = [createTextVNode(" Interval ", -1)])]),
7362
+ default: withCtx(() => [createVNode(_component_VCFormSelect, {
7363
+ modelValue: _ctx.vuelidate.interval.$model,
7364
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.vuelidate.interval.$model = $event),
7365
+ options: _ctx.intervalOptions,
7366
+ onChange: _ctx.handleIntervalUpdated
7367
+ }, null, 8, [
7368
+ "modelValue",
7369
+ "options",
7370
+ "onChange"
7371
+ ])]),
7372
+ _: 1
7373
+ }, 8, ["validation-messages", "validation-severity"])]),
7374
+ _: 1
7375
+ }, 8, ["validation"]),
7376
+ createElementVNode("div", _hoisted_1$8, [
7377
+ _ctx.displayIntervalForDayOfWeek ? (openBlock(), createElementBlock("div", _hoisted_2$7, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.day_of_week }, {
7378
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7379
+ "validation-messages": props.data,
7380
+ "validation-severity": props.severity
7381
+ }, {
7382
+ label: withCtx(() => [..._cache[9] || (_cache[9] = [createTextVNode(" Day of Week ", -1)])]),
7383
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
7384
+ modelValue: _ctx.vuelidate.day_of_week.$model,
7385
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.vuelidate.day_of_week.$model = $event),
7386
+ placeholder: "0-6",
7387
+ type: "number",
7388
+ onChange: _ctx.handleUpdated
7389
+ }, null, 8, ["modelValue", "onChange"])]),
7390
+ _: 1
7391
+ }, 8, ["validation-messages", "validation-severity"])]),
7392
+ _: 1
7393
+ }, 8, ["validation"])])) : createCommentVNode("", true),
7394
+ _ctx.displayIntervalForDayOfMonth ? (openBlock(), createElementBlock("div", _hoisted_3$5, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.day_of_month }, {
7395
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7396
+ "validation-messages": props.data,
7397
+ "validation-severity": props.severity
7398
+ }, {
7399
+ label: withCtx(() => [..._cache[10] || (_cache[10] = [createTextVNode(" Day of Month ", -1)])]),
7400
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
7401
+ modelValue: _ctx.vuelidate.day_of_month.$model,
7402
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => _ctx.vuelidate.day_of_month.$model = $event),
7403
+ placeholder: "1-31",
7404
+ type: "number",
7405
+ onChange: _ctx.handleUpdated
7406
+ }, null, 8, ["modelValue", "onChange"])]),
7407
+ _: 1
7408
+ }, 8, ["validation-messages", "validation-severity"])]),
7409
+ _: 1
7410
+ }, 8, ["validation"])])) : createCommentVNode("", true),
7411
+ _ctx.displayIntervalForDayOfYear ? (openBlock(), createElementBlock("div", _hoisted_4$3, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.day_of_year }, {
7412
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7413
+ "validation-messages": props.data,
7414
+ "validation-severity": props.severity
7415
+ }, {
7416
+ label: withCtx(() => [..._cache[11] || (_cache[11] = [createTextVNode(" Day of Year ", -1)])]),
7417
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
7418
+ modelValue: _ctx.vuelidate.day_of_year.$model,
7419
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => _ctx.vuelidate.day_of_year.$model = $event),
7420
+ type: "number",
7421
+ placeholder: "1-365",
7422
+ onChange: _ctx.handleUpdated
7423
+ }, null, 8, ["modelValue", "onChange"])]),
7424
+ _: 1
7425
+ }, 8, ["validation-messages", "validation-severity"])]),
7426
+ _: 1
7427
+ }, 8, ["validation"])])) : createCommentVNode("", true)
7428
+ ])
7429
+ ]);
7735
7430
  }
7736
7431
  var ATimePolicyForm = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$8]]);
7737
7432
 
@@ -7804,22 +7499,13 @@ const _hoisted_1$7 = { class: "d-flex flex-column gap-2" };
7804
7499
  const _hoisted_2$6 = { class: "d-flex flex-row gap-2 flex-wrap" };
7805
7500
  const _hoisted_3$4 = ["onClick"];
7806
7501
  function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
7807
- return openBlock(), createElementBlock("div", _hoisted_1$7, [
7808
- createElementVNode("div", null, [
7809
- _cache[0] || (_cache[0] = createElementVNode("h6", null, "Type", -1)),
7810
- createElementVNode("div", _hoisted_2$6, [
7811
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, key) => {
7812
- return openBlock(), createElementBlock("div", {
7813
- key,
7814
- class: normalizeClass([{ "active": item.id === _ctx.option }, "d-flex flex-column gap-1 text-center a-picker-item"]),
7815
- onClick: withModifiers(($event) => _ctx.pick(`${item.id}`), ["prevent"])
7816
- }, [
7817
- createElementVNode("div", null, toDisplayString(item.value), 1)
7818
- ], 10, _hoisted_3$4);
7819
- }), 128))
7820
- ])
7821
- ])
7822
- ]);
7502
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [createElementVNode("div", null, [_cache[0] || (_cache[0] = createElementVNode("h6", null, "Type", -1)), createElementVNode("div", _hoisted_2$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (item, key) => {
7503
+ return openBlock(), createElementBlock("div", {
7504
+ key,
7505
+ class: normalizeClass([{ "active": item.id === _ctx.option }, "d-flex flex-column gap-1 text-center a-picker-item"]),
7506
+ onClick: withModifiers(($event) => _ctx.pick(`${item.id}`), ["prevent"])
7507
+ }, [createElementVNode("div", null, toDisplayString(item.value), 1)], 10, _hoisted_3$4);
7508
+ }), 128))])])]);
7823
7509
  }
7824
7510
  var APolicyTypePicker = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$7], ["__scopeId", "data-v-3fa3964f"]]);
7825
7511
 
@@ -7911,145 +7597,98 @@ const _hoisted_1$6 = { class: "row" };
7911
7597
  const _hoisted_2$5 = { class: "col" };
7912
7598
  const _hoisted_3$3 = ["for"];
7913
7599
  const _hoisted_4$2 = {
7914
- key: 0,
7915
- class: "col"
7600
+ key: 0,
7601
+ class: "col"
7916
7602
  };
7917
7603
  function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
7918
- const _component_VCFormInput = resolveComponent("VCFormInput");
7919
- const _component_VCFormGroup = resolveComponent("VCFormGroup");
7920
- const _component_IVuelidate = resolveComponent("IVuelidate");
7921
- const _component_VCFormTextarea = resolveComponent("VCFormTextarea");
7922
- const _component_VCFormInputCheckbox = resolveComponent("VCFormInputCheckbox");
7923
- const _component_ARealmPicker = resolveComponent("ARealmPicker");
7924
- return openBlock(), createElementBlock("div", _hoisted_1$6, [
7925
- createElementVNode("div", _hoisted_2$5, [
7926
- createVNode(_component_IVuelidate, {
7927
- validation: _ctx.vuelidate.name
7928
- }, {
7929
- default: withCtx((props) => [
7930
- createVNode(_component_VCFormGroup, {
7931
- "validation-messages": props.data,
7932
- "validation-severity": props.severity
7933
- }, {
7934
- label: withCtx(() => [..._cache[5] || (_cache[5] = [
7935
- createTextVNode(" Name ", -1)
7936
- ])]),
7937
- default: withCtx(() => [
7938
- createVNode(_component_VCFormInput, {
7939
- modelValue: _ctx.vuelidate.name.$model,
7940
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.name.$model = $event),
7941
- onChange: _ctx.handleUpdated
7942
- }, null, 8, ["modelValue", "onChange"])
7943
- ]),
7944
- _: 1
7945
- }, 8, ["validation-messages", "validation-severity"])
7946
- ]),
7947
- _: 1
7948
- }, 8, ["validation"]),
7949
- createVNode(_component_IVuelidate, {
7950
- validation: _ctx.vuelidate.display_name
7951
- }, {
7952
- default: withCtx((props) => [
7953
- createVNode(_component_VCFormGroup, {
7954
- "validation-messages": props.data,
7955
- "validation-severity": props.severity
7956
- }, {
7957
- label: withCtx(() => [..._cache[6] || (_cache[6] = [
7958
- createTextVNode(" Display Name ", -1)
7959
- ])]),
7960
- default: withCtx(() => [
7961
- createVNode(_component_VCFormInput, {
7962
- modelValue: _ctx.vuelidate.display_name.$model,
7963
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.display_name.$model = $event),
7964
- onChange: _ctx.handleUpdated
7965
- }, null, 8, ["modelValue", "onChange"])
7966
- ]),
7967
- _: 1
7968
- }, 8, ["validation-messages", "validation-severity"])
7969
- ]),
7970
- _: 1
7971
- }, 8, ["validation"]),
7972
- createVNode(_component_IVuelidate, {
7973
- validation: _ctx.vuelidate.description
7974
- }, {
7975
- default: withCtx((props) => [
7976
- createVNode(_component_VCFormGroup, {
7977
- "validation-messages": props.data,
7978
- "validation-severity": props.severity
7979
- }, {
7980
- label: withCtx(() => [..._cache[7] || (_cache[7] = [
7981
- createTextVNode(" Description ", -1)
7982
- ])]),
7983
- default: withCtx(() => [
7984
- createVNode(_component_VCFormTextarea, {
7985
- modelValue: _ctx.vuelidate.description.$model,
7986
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.vuelidate.description.$model = $event),
7987
- rows: "4",
7988
- onChange: _ctx.handleUpdated
7989
- }, null, 8, ["modelValue", "onChange"])
7990
- ]),
7991
- _: 1
7992
- }, 8, ["validation-messages", "validation-severity"])
7993
- ]),
7994
- _: 1
7995
- }, 8, ["validation"]),
7996
- createVNode(_component_IVuelidate, {
7997
- validation: _ctx.vuelidate.invert
7998
- }, {
7999
- default: withCtx((props) => [
8000
- createVNode(_component_VCFormGroup, {
8001
- "validation-messages": props.data,
8002
- "validation-severity": props.severity
8003
- }, {
8004
- default: withCtx(() => [
8005
- createVNode(_component_VCFormInputCheckbox, {
8006
- modelValue: _ctx.vuelidate.invert.$model,
8007
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.vuelidate.invert.$model = $event),
8008
- "group-class": "form-switch",
8009
- label: true,
8010
- onChange: _ctx.handleUpdated
8011
- }, {
8012
- label: withCtx((iProps) => [
8013
- createElementVNode("label", {
8014
- for: iProps.id
8015
- }, " Invert? ", 8, _hoisted_3$3)
8016
- ]),
8017
- _: 1
8018
- }, 8, ["modelValue", "onChange"])
8019
- ]),
8020
- _: 1
8021
- }, 8, ["validation-messages", "validation-severity"])
8022
- ]),
8023
- _: 1
8024
- }, 8, ["validation"])
8025
- ]),
8026
- !_ctx.realmId && !_ctx.isEditing ? (openBlock(), createElementBlock("div", _hoisted_4$2, [
8027
- createVNode(_component_IVuelidate, {
8028
- validation: _ctx.vuelidate.invert
8029
- }, {
8030
- default: withCtx((props) => [
8031
- createVNode(_component_VCFormGroup, {
8032
- "validation-messages": props.data,
8033
- "validation-severity": props.severity
8034
- }, {
8035
- label: withCtx(() => [..._cache[8] || (_cache[8] = [
8036
- createTextVNode(" Realm ", -1)
8037
- ])]),
8038
- default: withCtx(() => [
8039
- createVNode(_component_ARealmPicker, {
8040
- value: _ctx.vuelidate.realm_id.$model,
8041
- onChange: _cache[4] || (_cache[4] = (value) => {
8042
- _ctx.vuelidate.realm_id.$model = value.length > 0 ? value[0] : "";
8043
- })
8044
- }, null, 8, ["value"])
8045
- ]),
8046
- _: 1
8047
- }, 8, ["validation-messages", "validation-severity"])
8048
- ]),
8049
- _: 1
8050
- }, 8, ["validation"])
8051
- ])) : createCommentVNode("", true)
8052
- ]);
7604
+ const _component_VCFormInput = resolveComponent("VCFormInput");
7605
+ const _component_VCFormGroup = resolveComponent("VCFormGroup");
7606
+ const _component_IVuelidate = resolveComponent("IVuelidate");
7607
+ const _component_VCFormTextarea = resolveComponent("VCFormTextarea");
7608
+ const _component_VCFormInputCheckbox = resolveComponent("VCFormInputCheckbox");
7609
+ const _component_ARealmPicker = resolveComponent("ARealmPicker");
7610
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [createElementVNode("div", _hoisted_2$5, [
7611
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.name }, {
7612
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7613
+ "validation-messages": props.data,
7614
+ "validation-severity": props.severity
7615
+ }, {
7616
+ label: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" Name ", -1)])]),
7617
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
7618
+ modelValue: _ctx.vuelidate.name.$model,
7619
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.name.$model = $event),
7620
+ onChange: _ctx.handleUpdated
7621
+ }, null, 8, ["modelValue", "onChange"])]),
7622
+ _: 1
7623
+ }, 8, ["validation-messages", "validation-severity"])]),
7624
+ _: 1
7625
+ }, 8, ["validation"]),
7626
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.display_name }, {
7627
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7628
+ "validation-messages": props.data,
7629
+ "validation-severity": props.severity
7630
+ }, {
7631
+ label: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode(" Display Name ", -1)])]),
7632
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
7633
+ modelValue: _ctx.vuelidate.display_name.$model,
7634
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.display_name.$model = $event),
7635
+ onChange: _ctx.handleUpdated
7636
+ }, null, 8, ["modelValue", "onChange"])]),
7637
+ _: 1
7638
+ }, 8, ["validation-messages", "validation-severity"])]),
7639
+ _: 1
7640
+ }, 8, ["validation"]),
7641
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.description }, {
7642
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7643
+ "validation-messages": props.data,
7644
+ "validation-severity": props.severity
7645
+ }, {
7646
+ label: withCtx(() => [..._cache[7] || (_cache[7] = [createTextVNode(" Description ", -1)])]),
7647
+ default: withCtx(() => [createVNode(_component_VCFormTextarea, {
7648
+ modelValue: _ctx.vuelidate.description.$model,
7649
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.vuelidate.description.$model = $event),
7650
+ rows: "4",
7651
+ onChange: _ctx.handleUpdated
7652
+ }, null, 8, ["modelValue", "onChange"])]),
7653
+ _: 1
7654
+ }, 8, ["validation-messages", "validation-severity"])]),
7655
+ _: 1
7656
+ }, 8, ["validation"]),
7657
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.invert }, {
7658
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7659
+ "validation-messages": props.data,
7660
+ "validation-severity": props.severity
7661
+ }, {
7662
+ default: withCtx(() => [createVNode(_component_VCFormInputCheckbox, {
7663
+ modelValue: _ctx.vuelidate.invert.$model,
7664
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.vuelidate.invert.$model = $event),
7665
+ "group-class": "form-switch",
7666
+ label: true,
7667
+ onChange: _ctx.handleUpdated
7668
+ }, {
7669
+ label: withCtx((iProps) => [createElementVNode("label", { for: iProps.id }, " Invert? ", 8, _hoisted_3$3)]),
7670
+ _: 1
7671
+ }, 8, ["modelValue", "onChange"])]),
7672
+ _: 1
7673
+ }, 8, ["validation-messages", "validation-severity"])]),
7674
+ _: 1
7675
+ }, 8, ["validation"])
7676
+ ]), !_ctx.realmId && !_ctx.isEditing ? (openBlock(), createElementBlock("div", _hoisted_4$2, [createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.invert }, {
7677
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
7678
+ "validation-messages": props.data,
7679
+ "validation-severity": props.severity
7680
+ }, {
7681
+ label: withCtx(() => [..._cache[8] || (_cache[8] = [createTextVNode(" Realm ", -1)])]),
7682
+ default: withCtx(() => [createVNode(_component_ARealmPicker, {
7683
+ value: _ctx.vuelidate.realm_id.$model,
7684
+ onChange: _cache[4] || (_cache[4] = (value) => {
7685
+ _ctx.vuelidate.realm_id.$model = value.length > 0 ? value[0] ?? "" : "";
7686
+ })
7687
+ }, null, 8, ["value"])]),
7688
+ _: 1
7689
+ }, 8, ["validation-messages", "validation-severity"])]),
7690
+ _: 1
7691
+ }, 8, ["validation"])])) : createCommentVNode("", true)]);
8053
7692
  }
8054
7693
  var APolicyBasicForm = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$6]]);
8055
7694
 
@@ -8068,6 +7707,7 @@ var _sfc_main$6 = defineComponent({
8068
7707
  }
8069
7708
  },
8070
7709
  setup (props, ctx) {
7710
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
8071
7711
  const typeComponents = {
8072
7712
  [BuiltInPolicyType.IDENTITY]: AIdentityPolicyForm,
8073
7713
  [BuiltInPolicyType.REALM_MATCH]: ARealmMatchPolicyForm,
@@ -8109,8 +7749,8 @@ var _sfc_main$6 = defineComponent({
8109
7749
  await manager.createOrUpdate(data);
8110
7750
  if (manager.data.value) {
8111
7751
  if (items.length > 0) {
8112
- for(let i = 0; i < items.length; i++){
8113
- await httpClient.policy.update(items[i], {
7752
+ for (const item of items){
7753
+ await httpClient.policy.update(item, {
8114
7754
  parent_id: manager.data.value.id
8115
7755
  });
8116
7756
  }
@@ -8131,29 +7771,30 @@ var _sfc_main$6 = defineComponent({
8131
7771
 
8132
7772
  const _hoisted_1$5 = { class: "d-flex flex-column" };
8133
7773
  function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
8134
- const _component_APolicyBasicForm = resolveComponent("APolicyBasicForm");
8135
- const _component_AFormSubmit = resolveComponent("AFormSubmit");
8136
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
8137
- _cache[0] || (_cache[0] = createElementVNode("h6", null, "General", -1)),
8138
- createVNode(_component_APolicyBasicForm, { entity: _ctx.data }, null, 8, ["entity"]),
8139
- _ctx.typeComputed ? renderSlot(_ctx.$slots, "default", {
8140
- key: 0,
8141
- entity: _ctx.entity
8142
- }, () => [
8143
- _ctx.typeComputed in _ctx.typeComponents ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.typeComponents[_ctx.typeComputed]), {
8144
- key: 0,
8145
- entity: _ctx.entity
8146
- }, null, 8, ["entity"])) : createCommentVNode("", true)
8147
- ]) : createCommentVNode("", true),
8148
- createElementVNode("div", null, [
8149
- createVNode(_component_AFormSubmit, {
8150
- "is-invalid": _ctx.vuelidate.$invalid || !_ctx.typeComputed,
8151
- "is-busy": _ctx.busy,
8152
- "is-editing": _ctx.isEditing,
8153
- onSubmit: _ctx.submit
8154
- }, null, 8, ["is-invalid", "is-busy", "is-editing", "onSubmit"])
8155
- ])
8156
- ]);
7774
+ const _component_APolicyBasicForm = resolveComponent("APolicyBasicForm");
7775
+ const _component_AFormSubmit = resolveComponent("AFormSubmit");
7776
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
7777
+ _cache[0] || (_cache[0] = createElementVNode("h6", null, "General", -1)),
7778
+ createVNode(_component_APolicyBasicForm, { entity: _ctx.data }, null, 8, ["entity"]),
7779
+ _ctx.typeComputed ? renderSlot(_ctx.$slots, "default", {
7780
+ key: 0,
7781
+ entity: _ctx.entity
7782
+ }, () => [_ctx.typeComputed in _ctx.typeComponents ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.typeComponents[_ctx.typeComputed]), {
7783
+ key: 0,
7784
+ entity: _ctx.entity
7785
+ }, null, 8, ["entity"])) : createCommentVNode("", true)]) : createCommentVNode("", true),
7786
+ createElementVNode("div", null, [createVNode(_component_AFormSubmit, {
7787
+ "is-invalid": _ctx.vuelidate.$invalid || !_ctx.typeComputed,
7788
+ "is-busy": _ctx.busy,
7789
+ "is-editing": _ctx.isEditing,
7790
+ onSubmit: _ctx.submit
7791
+ }, null, 8, [
7792
+ "is-invalid",
7793
+ "is-busy",
7794
+ "is-editing",
7795
+ "onSubmit"
7796
+ ])])
7797
+ ]);
8157
7798
  }
8158
7799
  var APolicyForm = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$5]]);
8159
7800
 
@@ -8176,6 +7817,77 @@ const APermissionClientAssignments = defineComponent({
8176
7817
  }
8177
7818
  });
8178
7819
 
7820
+ const APermissionPolicyAssignment = defineComponent({
7821
+ props: {
7822
+ permissionId: {
7823
+ type: String,
7824
+ required: true
7825
+ },
7826
+ policyId: {
7827
+ type: String,
7828
+ required: true
7829
+ }
7830
+ },
7831
+ emits: defineEntityVEmitOptions(),
7832
+ async setup (props, setup) {
7833
+ const manager = defineEntityManager({
7834
+ type: `${EntityType.PERMISSION_POLICY}`,
7835
+ setup,
7836
+ socket: {
7837
+ processEvent (event) {
7838
+ return event.data.permission_id === props.permissionId && event.data.policy_id === props.policyId;
7839
+ }
7840
+ }
7841
+ });
7842
+ await manager.resolve({
7843
+ query: {
7844
+ filters: {
7845
+ permission_id: props.permissionId,
7846
+ policy_id: props.policyId
7847
+ }
7848
+ }
7849
+ });
7850
+ return ()=>renderToggleButton({
7851
+ changed: (value)=>{
7852
+ if (value) {
7853
+ return manager.create({
7854
+ permission_id: props.permissionId,
7855
+ policy_id: props.policyId
7856
+ });
7857
+ }
7858
+ return manager.delete();
7859
+ },
7860
+ value: !!manager.data.value,
7861
+ isBusy: manager.busy.value
7862
+ });
7863
+ }
7864
+ });
7865
+
7866
+ const APermissionPolicyAssignments = defineComponent({
7867
+ props: {
7868
+ entityId: {
7869
+ type: String,
7870
+ required: true
7871
+ }
7872
+ },
7873
+ setup (props, { slots }) {
7874
+ return ()=>h(APolicies, {
7875
+ query: {
7876
+ filters: {
7877
+ parent_id: null
7878
+ }
7879
+ }
7880
+ }, {
7881
+ [SlotName.ITEM_ACTIONS]: (slotProps)=>h(APermissionPolicyAssignment, {
7882
+ permissionId: props.entityId,
7883
+ policyId: slotProps.data.id,
7884
+ key: slotProps.data.id
7885
+ }),
7886
+ ...slots
7887
+ });
7888
+ }
7889
+ });
7890
+
8179
7891
  const ARobotPermissionAssignment = defineComponent({
8180
7892
  props: {
8181
7893
  robotId: String,
@@ -8751,7 +8463,7 @@ const AUserForm = defineComponent({
8751
8463
  }
8752
8464
  watch(updatedAt, (val, oldVal)=>{
8753
8465
  if (val && val !== oldVal) {
8754
- manager.data.value = props.entity;
8466
+ manager.data.value = props.entity ?? undefined;
8755
8467
  initForm();
8756
8468
  }
8757
8469
  });
@@ -8980,7 +8692,7 @@ const AUserPasswordForm = defineComponent({
8980
8692
  props: {
8981
8693
  id: {
8982
8694
  type: String,
8983
- required: true
8695
+ default: undefined
8984
8696
  }
8985
8697
  },
8986
8698
  emits: [
@@ -9011,6 +8723,9 @@ const AUserPasswordForm = defineComponent({
9011
8723
  }
9012
8724
  }, form);
9013
8725
  const submit = wrapFnWithBusyState(busy, async ()=>{
8726
+ if (!props.id) {
8727
+ return;
8728
+ }
9014
8729
  try {
9015
8730
  const user = await apiClient.user.update(props.id, {
9016
8731
  password: form.password,
@@ -9337,6 +9052,8 @@ var components = /*#__PURE__*/Object.freeze({
9337
9052
  APermissionCheck: APermissionCheck,
9338
9053
  APermissionClientAssignments: APermissionClientAssignments,
9339
9054
  APermissionForm: APermissionForm,
9055
+ APermissionPolicyAssignment: APermissionPolicyAssignment,
9056
+ APermissionPolicyAssignments: APermissionPolicyAssignments,
9340
9057
  APermissionRobotAssignments: APermissionRobotAssignments,
9341
9058
  APermissionRoleAssignments: APermissionRoleAssignments,
9342
9059
  APermissionUserAssignments: APermissionUserAssignments,
@@ -9393,7 +9110,7 @@ function installComponents(app, input) {
9393
9110
  return;
9394
9111
  }
9395
9112
  Object.entries(components).forEach(([componentName, component])=>{
9396
- if (input.indexOf(componentName) !== -1) {
9113
+ if (input.includes(componentName)) {
9397
9114
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
9398
9115
  // @ts-ignore
9399
9116
  app.component(componentName, component);
@@ -9490,6 +9207,7 @@ var _sfc_main$5 = defineComponent({
9490
9207
  };
9491
9208
  };
9492
9209
  resetIdentityProviderQuery();
9210
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9493
9211
  const identityProviderRef = ref(null);
9494
9212
  const updateIdentityProviderList = ()=>{
9495
9213
  if (identityProviderRef.value) {
@@ -9497,7 +9215,7 @@ var _sfc_main$5 = defineComponent({
9497
9215
  }
9498
9216
  };
9499
9217
  const updateRealmId = (realmId)=>{
9500
- form.realm_id = Array.isArray(realmId) ? realmId[0] : realmId;
9218
+ form.realm_id = Array.isArray(realmId) ? realmId[0] ?? '' : realmId;
9501
9219
  resetIdentityProviderQuery();
9502
9220
  nextTick(()=>{
9503
9221
  updateIdentityProviderList();
@@ -9541,126 +9259,98 @@ const _hoisted_2$4 = ["href"];
9541
9259
  const _hoisted_3$2 = { class: "d-flex flex-column" };
9542
9260
  const _hoisted_4$1 = { class: "text-center mb-1" };
9543
9261
  function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
9544
- const _component_VCFormInput = resolveComponent("VCFormInput");
9545
- const _component_VCFormGroup = resolveComponent("VCFormGroup");
9546
- const _component_IVuelidate = resolveComponent("IVuelidate");
9547
- const _component_VCFormSubmit = resolveComponent("VCFormSubmit");
9548
- const _component_ARealmPicker = resolveComponent("ARealmPicker");
9549
- const _component_ATitle = resolveComponent("ATitle");
9550
- const _component_APagination = resolveComponent("APagination");
9551
- const _component_AIdentityProviderIcon = resolveComponent("AIdentityProviderIcon");
9552
- const _component_AIdentityProviders = resolveComponent("AIdentityProviders");
9553
- return openBlock(), createElementBlock("div", null, [
9554
- _cache[7] || (_cache[7] = createElementVNode("div", { class: "text-center" }, [
9555
- createElementVNode("h1", { class: "fw-bold" }, " Login ")
9556
- ], -1)),
9557
- createElementVNode("form", {
9558
- onSubmit: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.submit && _ctx.submit(...args), ["prevent"]))
9559
- }, [
9560
- createVNode(_component_IVuelidate, {
9561
- validation: _ctx.vuelidate.name
9562
- }, {
9563
- default: withCtx((props) => [
9564
- createVNode(_component_VCFormGroup, {
9565
- "validation-messages": props.data,
9566
- "validation-severity": props.severity
9567
- }, {
9568
- label: withCtx(() => [..._cache[4] || (_cache[4] = [
9569
- createTextVNode(" Name ", -1)
9570
- ])]),
9571
- default: withCtx(() => [
9572
- createVNode(_component_VCFormInput, {
9573
- modelValue: _ctx.vuelidate.name.$model,
9574
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.name.$model = $event)
9575
- }, null, 8, ["modelValue"])
9576
- ]),
9577
- _: 1
9578
- }, 8, ["validation-messages", "validation-severity"])
9579
- ]),
9580
- _: 1
9581
- }, 8, ["validation"]),
9582
- createVNode(_component_IVuelidate, {
9583
- validation: _ctx.vuelidate.password
9584
- }, {
9585
- default: withCtx((props) => [
9586
- createVNode(_component_VCFormGroup, {
9587
- "validation-messages": props.data,
9588
- "validation-severity": props.severity
9589
- }, {
9590
- label: withCtx(() => [..._cache[5] || (_cache[5] = [
9591
- createTextVNode(" Password ", -1)
9592
- ])]),
9593
- default: withCtx(() => [
9594
- createVNode(_component_VCFormInput, {
9595
- modelValue: _ctx.vuelidate.password.$model,
9596
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.password.$model = $event),
9597
- type: "password"
9598
- }, null, 8, ["modelValue"])
9599
- ]),
9600
- _: 1
9601
- }, 8, ["validation-messages", "validation-severity"])
9602
- ]),
9603
- _: 1
9604
- }, 8, ["validation"]),
9605
- createVNode(_component_VCFormSubmit, {
9606
- modelValue: _ctx.busy,
9607
- "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.busy = $event),
9608
- invalid: _ctx.vuelidate.$invalid,
9609
- "create-text": "Submit",
9610
- "create-button-class": { value: "btn btn-sm btn-dark btn-block", presets: { bootstrap: false } },
9611
- "create-icon-class": "fa-solid fa-right-to-bracket",
9612
- submit: _ctx.submit
9613
- }, null, 8, ["modelValue", "invalid", "submit"]),
9614
- _cache[6] || (_cache[6] = createElementVNode("hr", null, null, -1)),
9615
- !_ctx.codeRequest || !_ctx.codeRequest.realm_id ? (openBlock(), createBlock(_component_ARealmPicker, {
9616
- key: 0,
9617
- value: _ctx.form.realm_id,
9618
- onChange: _ctx.updateRealmId
9619
- }, null, 8, ["value", "onChange"])) : createCommentVNode("", true),
9620
- createVNode(_component_AIdentityProviders, {
9621
- ref: "identityProviderRef",
9622
- query: _ctx.identityProviderQuery,
9623
- footer: false
9624
- }, {
9625
- header: withCtx(() => [
9626
- createVNode(_component_ATitle, { text: "Identity Providers" })
9627
- ]),
9628
- footer: withCtx((props) => [
9629
- createVNode(_component_APagination, {
9630
- busy: props.busy,
9631
- meta: props.meta,
9632
- load: props.load,
9633
- total: props.total
9634
- }, null, 8, ["busy", "meta", "load", "total"])
9635
- ]),
9636
- body: withCtx((props) => [
9637
- createElementVNode("div", _hoisted_1$4, [
9638
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.data, (item, key) => {
9639
- return openBlock(), createElementBlock("div", { key }, [
9640
- createElementVNode("a", {
9641
- href: _ctx.buildIdentityProviderURL(item.id),
9642
- class: "btn btn-dark btn-xs p-2 me-1 identity-provider-box bg-dark"
9643
- }, [
9644
- createElementVNode("div", _hoisted_3$2, [
9645
- createElementVNode("div", _hoisted_4$1, [
9646
- createVNode(_component_AIdentityProviderIcon, {
9647
- class: "fa-2x",
9648
- entity: item
9649
- }, null, 8, ["entity"])
9650
- ]),
9651
- createElementVNode("div", null, toDisplayString(item.name), 1)
9652
- ])
9653
- ], 8, _hoisted_2$4)
9654
- ]);
9655
- }), 128))
9656
- ])
9657
- ]),
9658
- _: 1
9659
- }, 8, ["query"])
9660
- ], 32)
9661
- ]);
9262
+ const _component_VCFormInput = resolveComponent("VCFormInput");
9263
+ const _component_VCFormGroup = resolveComponent("VCFormGroup");
9264
+ const _component_IVuelidate = resolveComponent("IVuelidate");
9265
+ const _component_VCFormSubmit = resolveComponent("VCFormSubmit");
9266
+ const _component_ARealmPicker = resolveComponent("ARealmPicker");
9267
+ const _component_ATitle = resolveComponent("ATitle");
9268
+ const _component_APagination = resolveComponent("APagination");
9269
+ const _component_AIdentityProviderIcon = resolveComponent("AIdentityProviderIcon");
9270
+ const _component_AIdentityProviders = resolveComponent("AIdentityProviders");
9271
+ return openBlock(), createElementBlock("div", null, [_cache[7] || (_cache[7] = createElementVNode("div", { class: "text-center" }, [createElementVNode("h1", { class: "fw-bold" }, " Login ")], -1)), createElementVNode("form", { onSubmit: _cache[3] || (_cache[3] = withModifiers((...args) => _ctx.submit && _ctx.submit(...args), ["prevent"])) }, [
9272
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.name }, {
9273
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
9274
+ "validation-messages": props.data,
9275
+ "validation-severity": props.severity
9276
+ }, {
9277
+ label: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" Name ", -1)])]),
9278
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
9279
+ modelValue: _ctx.vuelidate.name.$model,
9280
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.vuelidate.name.$model = $event)
9281
+ }, null, 8, ["modelValue"])]),
9282
+ _: 1
9283
+ }, 8, ["validation-messages", "validation-severity"])]),
9284
+ _: 1
9285
+ }, 8, ["validation"]),
9286
+ createVNode(_component_IVuelidate, { validation: _ctx.vuelidate.password }, {
9287
+ default: withCtx((props) => [createVNode(_component_VCFormGroup, {
9288
+ "validation-messages": props.data,
9289
+ "validation-severity": props.severity
9290
+ }, {
9291
+ label: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" Password ", -1)])]),
9292
+ default: withCtx(() => [createVNode(_component_VCFormInput, {
9293
+ modelValue: _ctx.vuelidate.password.$model,
9294
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => _ctx.vuelidate.password.$model = $event),
9295
+ type: "password"
9296
+ }, null, 8, ["modelValue"])]),
9297
+ _: 1
9298
+ }, 8, ["validation-messages", "validation-severity"])]),
9299
+ _: 1
9300
+ }, 8, ["validation"]),
9301
+ createVNode(_component_VCFormSubmit, {
9302
+ modelValue: _ctx.busy,
9303
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => _ctx.busy = $event),
9304
+ invalid: _ctx.vuelidate.$invalid,
9305
+ "create-text": "Submit",
9306
+ "create-button-class": {
9307
+ value: "btn btn-sm btn-dark btn-block",
9308
+ presets: { bootstrap: false }
9309
+ },
9310
+ "create-icon-class": "fa-solid fa-right-to-bracket",
9311
+ submit: _ctx.submit
9312
+ }, null, 8, [
9313
+ "modelValue",
9314
+ "invalid",
9315
+ "submit"
9316
+ ]),
9317
+ _cache[6] || (_cache[6] = createElementVNode("hr", null, null, -1)),
9318
+ !_ctx.codeRequest || !_ctx.codeRequest.realm_id ? (openBlock(), createBlock(_component_ARealmPicker, {
9319
+ key: 0,
9320
+ value: _ctx.form.realm_id,
9321
+ onChange: _ctx.updateRealmId
9322
+ }, null, 8, ["value", "onChange"])) : createCommentVNode("", true),
9323
+ createVNode(_component_AIdentityProviders, {
9324
+ ref: "identityProviderRef",
9325
+ query: _ctx.identityProviderQuery,
9326
+ footer: false
9327
+ }, {
9328
+ header: withCtx(() => [createVNode(_component_ATitle, { text: "Identity Providers" })]),
9329
+ footer: withCtx((props) => [createVNode(_component_APagination, {
9330
+ busy: props.busy,
9331
+ meta: props.meta,
9332
+ load: (data) => props.load?.(data),
9333
+ total: props.total
9334
+ }, null, 8, [
9335
+ "busy",
9336
+ "meta",
9337
+ "load",
9338
+ "total"
9339
+ ])]),
9340
+ body: withCtx((props) => [createElementVNode("div", _hoisted_1$4, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.data, (item, key) => {
9341
+ return openBlock(), createElementBlock("div", { key }, [createElementVNode("a", {
9342
+ href: _ctx.buildIdentityProviderURL(item.id),
9343
+ class: "btn btn-dark btn-xs p-2 me-1 identity-provider-box bg-dark"
9344
+ }, [createElementVNode("div", _hoisted_3$2, [createElementVNode("div", _hoisted_4$1, [createVNode(_component_AIdentityProviderIcon, {
9345
+ class: "fa-2x",
9346
+ entity: item
9347
+ }, null, 8, ["entity"])]), createElementVNode("div", null, toDisplayString(item.name), 1)])], 8, _hoisted_2$4)]);
9348
+ }), 128))])]),
9349
+ _: 1
9350
+ }, 8, ["query"])
9351
+ ], 32)]);
9662
9352
  }
9663
- var Login = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-957a0486"]]);
9353
+ var Login = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$4], ["__scopeId", "data-v-aa7b46ad"]]);
9664
9354
 
9665
9355
  var _sfc_main$4 = defineComponent({
9666
9356
  props: {
@@ -9674,7 +9364,7 @@ var _sfc_main$4 = defineComponent({
9674
9364
  }
9675
9365
  },
9676
9366
  setup (props) {
9677
- const isEnabled = computed(()=>props.requested.indexOf(props.entity.name) !== -1);
9367
+ const isEnabled = computed(()=>props.requested.includes(props.entity.name));
9678
9368
  return {
9679
9369
  isEnabled
9680
9370
  };
@@ -9684,20 +9374,10 @@ var _sfc_main$4 = defineComponent({
9684
9374
  const _hoisted_1$3 = { class: "text-center" };
9685
9375
  const _hoisted_2$3 = { key: 0 };
9686
9376
  function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
9687
- return openBlock(), createElementBlock("div", null, [
9688
- createElementVNode("div", _hoisted_1$3, [
9689
- createElementVNode("i", {
9690
- class: normalizeClass(["fa-solid", {
9691
- "fa-check text-success": _ctx.isEnabled,
9692
- "fa-times text-danger": !_ctx.isEnabled
9693
- }])
9694
- }, null, 2)
9695
- ]),
9696
- createElementVNode("div", null, [
9697
- createElementVNode("strong", null, toDisplayString(_ctx.entity.name), 1),
9698
- _ctx.entity.description ? (openBlock(), createElementBlock("p", _hoisted_2$3, toDisplayString(_ctx.entity.description), 1)) : createCommentVNode("", true)
9699
- ])
9700
- ]);
9377
+ return openBlock(), createElementBlock("div", null, [createElementVNode("div", _hoisted_1$3, [createElementVNode("i", { class: normalizeClass(["fa-solid", {
9378
+ "fa-check text-success": _ctx.isEnabled,
9379
+ "fa-times text-danger": !_ctx.isEnabled
9380
+ }]) }, null, 2)]), createElementVNode("div", null, [createElementVNode("strong", null, toDisplayString(_ctx.entity.name), 1), _ctx.entity.description ? (openBlock(), createElementBlock("p", _hoisted_2$3, toDisplayString(_ctx.entity.description), 1)) : createCommentVNode("", true)])]);
9701
9381
  }
9702
9382
  var AuthorizeScope = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render$3]]);
9703
9383
 
@@ -9757,24 +9437,19 @@ var _sfc_main$3 = defineComponent({
9757
9437
  const _hoisted_1$2 = { key: 0 };
9758
9438
  const _hoisted_2$2 = { class: "flex-column" };
9759
9439
  function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
9760
- const _component_AuthorizeScope = resolveComponent("AuthorizeScope");
9761
- return _ctx.scopesAvailableNormalized.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
9762
- createElementVNode("div", null, [
9763
- _cache[0] || (_cache[0] = createTextVNode(" This will allow the ", -1)),
9764
- createElementVNode("strong", null, toDisplayString(_ctx.client.name), 1),
9765
- _cache[1] || (_cache[1] = createTextVNode(" application to ", -1))
9766
- ]),
9767
- createElementVNode("div", _hoisted_2$2, [
9768
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scopesAvailableNormalized, (item) => {
9769
- return openBlock(), createBlock(_component_AuthorizeScope, {
9770
- key: item.id,
9771
- entity: item,
9772
- class: "d-flex flex-row gap-1",
9773
- requested: _ctx.scopesRequestedNormalized
9774
- }, null, 8, ["entity", "requested"]);
9775
- }), 128))
9776
- ])
9777
- ])) : createCommentVNode("", true);
9440
+ const _component_AuthorizeScope = resolveComponent("AuthorizeScope");
9441
+ return _ctx.scopesAvailableNormalized.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$2, [createElementVNode("div", null, [
9442
+ _cache[0] || (_cache[0] = createTextVNode(" This will allow the ", -1)),
9443
+ createElementVNode("strong", null, toDisplayString(_ctx.client.name), 1),
9444
+ _cache[1] || (_cache[1] = createTextVNode(" application to ", -1))
9445
+ ]), createElementVNode("div", _hoisted_2$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.scopesAvailableNormalized, (item) => {
9446
+ return openBlock(), createBlock(_component_AuthorizeScope, {
9447
+ key: item.id,
9448
+ entity: item,
9449
+ class: "d-flex flex-row gap-1",
9450
+ requested: _ctx.scopesRequestedNormalized
9451
+ }, null, 8, ["entity", "requested"]);
9452
+ }), 128))])])) : createCommentVNode("", true);
9778
9453
  }
9779
9454
  var AuthorizeScopes = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$2]]);
9780
9455
 
@@ -9825,7 +9500,7 @@ var _sfc_main$2 = defineComponent({
9825
9500
  if (typeof window !== 'undefined') {
9826
9501
  window.location.href = url;
9827
9502
  }
9828
- } catch (e) {
9503
+ } catch {
9829
9504
  // todo: show toast :)
9830
9505
  }
9831
9506
  };
@@ -9850,67 +9525,37 @@ const _hoisted_11 = { class: "row" };
9850
9525
  const _hoisted_12 = { class: "col-6" };
9851
9526
  const _hoisted_13 = { class: "col-6" };
9852
9527
  function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
9853
- const _component_AuthorizeScopes = resolveComponent("AuthorizeScopes");
9854
- return openBlock(), createElementBlock("div", _hoisted_1$1, [
9855
- createElementVNode("div", _hoisted_2$1, [
9856
- _cache[2] || (_cache[2] = createElementVNode("h5", { class: "text-secondary mb-1" }, " Application ", -1)),
9857
- createElementVNode("h1", _hoisted_3$1, toDisplayString(_ctx.client.name), 1)
9858
- ]),
9859
- createVNode(_component_AuthorizeScopes, {
9860
- client: _ctx.client,
9861
- "scopes-requested": _ctx.codeRequest.scope,
9862
- "scopes-available": _ctx.scopes
9863
- }, null, 8, ["client", "scopes-requested", "scopes-available"]),
9864
- createElementVNode("div", _hoisted_4, [
9865
- createElementVNode("div", _hoisted_5, [
9866
- _cache[4] || (_cache[4] = createElementVNode("div", null, [
9867
- createElementVNode("i", { class: "fa-solid fa-link" })
9868
- ], -1)),
9869
- createElementVNode("div", _hoisted_6, [
9870
- createElementVNode("small", null, [
9871
- _cache[3] || (_cache[3] = createTextVNode(" Once authorized, you will be redirected to: ", -1)),
9872
- createElementVNode("strong", null, toDisplayString(_ctx.codeRequest.redirect_uri), 1)
9873
- ])
9874
- ])
9875
- ]),
9876
- createElementVNode("div", _hoisted_7, [
9877
- _cache[7] || (_cache[7] = createElementVNode("div", null, [
9878
- createElementVNode("i", { class: "fa fa-solid fa-lock" })
9879
- ], -1)),
9880
- createElementVNode("div", _hoisted_8, [
9881
- createElementVNode("small", null, [
9882
- _cache[5] || (_cache[5] = createTextVNode(" This application is governed by the ", -1)),
9883
- createElementVNode("strong", null, toDisplayString(_ctx.client.name), 1),
9884
- _cache[6] || (_cache[6] = createTextVNode(" application's Privacy Policy and Terms of Service. ", -1))
9885
- ])
9886
- ])
9887
- ]),
9888
- createElementVNode("div", _hoisted_9, [
9889
- _cache[8] || (_cache[8] = createElementVNode("div", null, [
9890
- createElementVNode("i", { class: "fa fa-solid fa-clock" })
9891
- ], -1)),
9892
- createElementVNode("div", _hoisted_10, [
9893
- createElementVNode("small", null, " Active since " + toDisplayString(_ctx.client.created_at), 1)
9894
- ])
9895
- ])
9896
- ]),
9897
- createElementVNode("div", _hoisted_11, [
9898
- createElementVNode("div", _hoisted_12, [
9899
- createElementVNode("button", {
9900
- type: "button",
9901
- class: "btn btn-block btn-secondary",
9902
- onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.abort && _ctx.abort(...args), ["prevent"]))
9903
- }, " Abort ")
9904
- ]),
9905
- createElementVNode("div", _hoisted_13, [
9906
- createElementVNode("button", {
9907
- type: "button",
9908
- class: "btn btn-block btn-primary",
9909
- onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.authorize && _ctx.authorize(...args), ["prevent"]))
9910
- }, " Authorize ")
9911
- ])
9912
- ])
9913
- ]);
9528
+ const _component_AuthorizeScopes = resolveComponent("AuthorizeScopes");
9529
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [
9530
+ createElementVNode("div", _hoisted_2$1, [_cache[2] || (_cache[2] = createElementVNode("h5", { class: "text-secondary mb-1" }, " Application ", -1)), createElementVNode("h1", _hoisted_3$1, toDisplayString(_ctx.client.name), 1)]),
9531
+ createVNode(_component_AuthorizeScopes, {
9532
+ client: _ctx.client,
9533
+ "scopes-requested": _ctx.codeRequest.scope,
9534
+ "scopes-available": _ctx.scopes
9535
+ }, null, 8, [
9536
+ "client",
9537
+ "scopes-requested",
9538
+ "scopes-available"
9539
+ ]),
9540
+ createElementVNode("div", _hoisted_4, [
9541
+ createElementVNode("div", _hoisted_5, [_cache[4] || (_cache[4] = createElementVNode("div", null, [createElementVNode("i", { class: "fa-solid fa-link" })], -1)), createElementVNode("div", _hoisted_6, [createElementVNode("small", null, [_cache[3] || (_cache[3] = createTextVNode(" Once authorized, you will be redirected to: ", -1)), createElementVNode("strong", null, toDisplayString(_ctx.codeRequest.redirect_uri), 1)])])]),
9542
+ createElementVNode("div", _hoisted_7, [_cache[7] || (_cache[7] = createElementVNode("div", null, [createElementVNode("i", { class: "fa fa-solid fa-lock" })], -1)), createElementVNode("div", _hoisted_8, [createElementVNode("small", null, [
9543
+ _cache[5] || (_cache[5] = createTextVNode(" This application is governed by the ", -1)),
9544
+ createElementVNode("strong", null, toDisplayString(_ctx.client.name), 1),
9545
+ _cache[6] || (_cache[6] = createTextVNode(" application's Privacy Policy and Terms of Service. ", -1))
9546
+ ])])]),
9547
+ createElementVNode("div", _hoisted_9, [_cache[8] || (_cache[8] = createElementVNode("div", null, [createElementVNode("i", { class: "fa fa-solid fa-clock" })], -1)), createElementVNode("div", _hoisted_10, [createElementVNode("small", null, " Active since " + toDisplayString(_ctx.client.created_at), 1)])])
9548
+ ]),
9549
+ createElementVNode("div", _hoisted_11, [createElementVNode("div", _hoisted_12, [createElementVNode("button", {
9550
+ type: "button",
9551
+ class: "btn btn-block btn-secondary",
9552
+ onClick: _cache[0] || (_cache[0] = withModifiers((...args) => _ctx.abort && _ctx.abort(...args), ["prevent"]))
9553
+ }, " Abort ")]), createElementVNode("div", _hoisted_13, [createElementVNode("button", {
9554
+ type: "button",
9555
+ class: "btn btn-block btn-primary",
9556
+ onClick: _cache[1] || (_cache[1] = withModifiers((...args) => _ctx.authorize && _ctx.authorize(...args), ["prevent"]))
9557
+ }, " Authorize ")])])
9558
+ ]);
9914
9559
  }
9915
9560
  var AuthorizeForm = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1]]);
9916
9561
 
@@ -9930,17 +9575,10 @@ const _hoisted_1 = { class: "flex-column" };
9930
9575
  const _hoisted_2 = { class: "text-center" };
9931
9576
  const _hoisted_3 = { class: "text-center fs-6 p-3" };
9932
9577
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
9933
- return openBlock(), createElementBlock("div", _hoisted_1, [
9934
- createElementVNode("div", _hoisted_2, [
9935
- createElementVNode("i", {
9936
- class: normalizeClass(["fa-solid fa-10x", {
9937
- "fa-exclamation text-danger": _ctx.isError,
9938
- "fa-info text-info": !_ctx.isError
9939
- }])
9940
- }, null, 2)
9941
- ]),
9942
- createElementVNode("div", _hoisted_3, toDisplayString(_ctx.message), 1)
9943
- ]);
9578
+ return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createElementVNode("i", { class: normalizeClass(["fa-solid fa-10x", {
9579
+ "fa-exclamation text-danger": _ctx.isError,
9580
+ "fa-info text-info": !_ctx.isError
9581
+ }]) }, null, 2)]), createElementVNode("div", _hoisted_3, toDisplayString(_ctx.message), 1)]);
9944
9582
  }
9945
9583
  var AuthorizeText = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
9946
9584
 
@@ -10045,5 +9683,5 @@ var index = {
10045
9683
  install
10046
9684
  };
10047
9685
 
10048
- export { AAttributeNamesPolicyForm, _sfc_main as AAuthorize, AuthorizeText as AAuthorizeText, AClient, AClientForm, AClientPermissionAssignment, AClientPermissionAssignments, AClientPicker, AClientRoleAssignment, AClientRoleAssignments, AClientScope, AClientScopeAssignment, AClientScopeAssignments, AClientScopes, AClients, ACompositePolicyForm, ADatePolicyForm, AEntityDelete, AFormInputList, AFormInputListItem, AFormSubmit, AIdentityPolicyForm, AIdentityProvider, AIdentityProviderForm, AIdentityProviderIcon, AIdentityProviderLdapForm, AIdentityProviderOAuth2Form, AIdentityProviderPreset, AIdentityProviderProtocol, AIdentityProviderRoleAssignment, AIdentityProviderRoleAssignments, AIdentityProviders, Login as ALogin, APagination, APermission, APermissionCheck, APermissionClientAssignments, APermissionForm, APermissionRobotAssignments, APermissionRoleAssignments, APermissionUserAssignments, APermissions, APolicies, APolicy, APolicyForm, APolicyTypePicker, ARealm, ARealmForm, ARealmMatchPolicyForm, ARealmPicker, ARealms, ARobot, ARobotForm, ARobotPermissionAssignment, ARobotPermissionAssignments, ARobotRoleAssignment, ARobotRoleAssignments, ARobots, ARole, ARoleClientAssignments, ARoleForm, ARolePermissionAssignment, ARolePermissionAssignments, ARoleRobotAssignments, ARoleUserAssignments, ARoles, AScope, AScopeClientAssignments, AScopeForm, AScopes, ASearch, ATimePolicyForm, ATitle, AUser, AUserForm, AUserPasswordForm, AUserPermissionAssignment, AUserPermissionAssignments, AUserRoleAssignment, AUserRoleAssignments, AUsers, EntityRecordError, HTTPClientSymbol, LanguageSwitcherDropdown, STORE_ID, SocketClientSymbol, StoreDispatcherEventName, TranslatorTranslationClientKey, TranslatorTranslationDefaultKey, TranslatorTranslationGroup, TranslatorTranslationVuecsKey, VuelidateCustomRule, VuelidateCustomRuleKey, assignFormProperties, buildEntityCollectionCreatedHandler, buildEntityCollectionDeletedHandler, buildEntityCollectionUpdatedHandler, buildEntityVSlotProps, buildFormSubmitWithTranslations, createFormSubmitTranslations, createPermissionCheckerReactiveFn, createStore, createStoreDispatcher, index as default, defineEntityCollectionManager, defineEntityCollectionVEmitOptions, defineEntityCollectionVProps, defineEntityManager, defineEntityPicker, defineEntityPickerVEmitOptions, defineEntityPickerVProps, defineEntitySocketManager, defineEntityVEmitOptions, defineEntityVProps, extractVuelidateResultsFromChild, getVuelidateSeverity, hasHTTPClient, hasHTTPClientAuthenticationHook, hasNormalizedSlot, hasStoreFactory, inject$1 as inject, injectHTTPClient, injectHTTPClientAuthenticationHook, injectSocketManager, injectStore, injectStoreDispatcher, injectStoreFactory, injectTranslatorLocale, install, installHTTPClient, installHTTPClientAuthenticationHook, installSocketManager, installStore, installTranslator, isQuerySortedDescByDate, isSocketManagerUsable, mergeEntityCollectionRenderOptions, normalizeSlot, onChange, provide, provideHTTPClient, provideHTTPClientAuthenticationHook, provideSocketManager, provideStoreDispatcher, provideStoreFactory, renderToggleButton, storeToRefs, useIsEditing, usePermissionCheck, useTranslation, useTranslationsForBaseValidation, useTranslationsForGroup, useTranslationsForNestedValidation, useUpdatedAt, wrapFnWithBusyState };
9686
+ export { AAttributeNamesPolicyForm, _sfc_main as AAuthorize, AuthorizeText as AAuthorizeText, AClient, AClientForm, AClientPermissionAssignment, AClientPermissionAssignments, AClientPicker, AClientRoleAssignment, AClientRoleAssignments, AClientScope, AClientScopeAssignment, AClientScopeAssignments, AClientScopes, AClients, ACompositePolicyForm, ADatePolicyForm, AEntityDelete, AFormInputList, AFormInputListItem, AFormSubmit, AIdentityPolicyForm, AIdentityProvider, AIdentityProviderForm, AIdentityProviderIcon, AIdentityProviderLdapForm, AIdentityProviderOAuth2Form, AIdentityProviderPreset, AIdentityProviderProtocol, AIdentityProviderRoleAssignment, AIdentityProviderRoleAssignments, AIdentityProviders, Login as ALogin, APagination, APermission, APermissionCheck, APermissionClientAssignments, APermissionForm, APermissionPolicyAssignment, APermissionPolicyAssignments, APermissionRobotAssignments, APermissionRoleAssignments, APermissionUserAssignments, APermissions, APolicies, APolicy, APolicyForm, APolicyTypePicker, ARealm, ARealmForm, ARealmMatchPolicyForm, ARealmPicker, ARealms, ARobot, ARobotForm, ARobotPermissionAssignment, ARobotPermissionAssignments, ARobotRoleAssignment, ARobotRoleAssignments, ARobots, ARole, ARoleClientAssignments, ARoleForm, ARolePermissionAssignment, ARolePermissionAssignments, ARoleRobotAssignments, ARoleUserAssignments, ARoles, AScope, AScopeClientAssignments, AScopeForm, AScopes, ASearch, ATimePolicyForm, ATitle, AUser, AUserForm, AUserPasswordForm, AUserPermissionAssignment, AUserPermissionAssignments, AUserRoleAssignment, AUserRoleAssignments, AUsers, EntityRecordError, HTTPClientSymbol, LanguageSwitcherDropdown, STORE_ID, SocketClientSymbol, StoreDispatcherEventName, TranslatorTranslationClientKey, TranslatorTranslationDefaultKey, TranslatorTranslationGroup, TranslatorTranslationVuecsKey, VuelidateCustomRule, VuelidateCustomRuleKey, assignFormProperties, buildEntityCollectionCreatedHandler, buildEntityCollectionDeletedHandler, buildEntityCollectionUpdatedHandler, buildEntityVSlotProps, buildFormSubmitWithTranslations, createFormSubmitTranslations, createPermissionCheckerReactiveFn, createStore, createStoreDispatcher, index as default, defineEntityCollectionManager, defineEntityCollectionVEmitOptions, defineEntityCollectionVProps, defineEntityManager, defineEntityPicker, defineEntityPickerVEmitOptions, defineEntityPickerVProps, defineEntitySocketManager, defineEntityVEmitOptions, defineEntityVProps, extractVuelidateResultsFromChild, getVuelidateSeverity, hasHTTPClient, hasHTTPClientAuthenticationHook, hasNormalizedSlot, hasStoreFactory, inject$1 as inject, injectHTTPClient, injectHTTPClientAuthenticationHook, injectSocketManager, injectStore, injectStoreDispatcher, injectStoreFactory, injectTranslatorLocale, install, installHTTPClient, installHTTPClientAuthenticationHook, installSocketManager, installStore, installTranslator, isQuerySortedDescByDate, isSocketManagerUsable, mergeEntityCollectionRenderOptions, normalizeSlot, onChange, provide, provideHTTPClient, provideHTTPClientAuthenticationHook, provideSocketManager, provideStoreDispatcher, provideStoreFactory, renderToggleButton, storeToRefs, useIsEditing, usePermissionCheck, useTranslation, useTranslationsForBaseValidation, useTranslationsForGroup, useTranslationsForNestedValidation, useUpdatedAt, wrapFnWithBusyState };
10049
9687
  //# sourceMappingURL=index.mjs.map