@authup/client-web-kit 1.0.0-beta.16 → 1.0.1-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -267,7 +267,6 @@ function tryOnScopeDispose(fn) {
267
267
  return false;
268
268
  }
269
269
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
270
- const noop = ()=>{};
271
270
 
272
271
  function useCookies(dependencies, { doNotParse = false, autoUpdateDependencies = false } = {}, cookies = new Cookie()) {
273
272
  const watchingDependencies = autoUpdateDependencies ? [
@@ -281,7 +280,9 @@ function useCookies(dependencies, { doNotParse = false, autoUpdateDependencies =
281
280
  const newCookies = cookies.getAll({
282
281
  doNotParse: true
283
282
  });
284
- if (shouldUpdate(watchingDependencies || null, newCookies, previousCookies)) touches.value++;
283
+ if (shouldUpdate(watchingDependencies || null, newCookies, previousCookies)) {
284
+ touches.value++;
285
+ }
285
286
  previousCookies = newCookies;
286
287
  };
287
288
  cookies.addChangeListener(onChange);
@@ -351,7 +352,7 @@ function installStore(app, options = {}) {
351
352
  const storeCreator = defineStore(STORE_ID, ()=>createStore({
352
353
  baseURL: options.baseURL
353
354
  }));
354
- const store = storeCreator();
355
+ const store = storeCreator(options.pinia);
355
356
  const cookies = useCookies();
356
357
  let cookieGet;
357
358
  if (options.cookieGet) {
@@ -482,7 +483,7 @@ function installHTTPClient(app, options = {}) {
482
483
  baseURL: options.baseURL
483
484
  });
484
485
  const storeCreator = injectStore(app);
485
- const store = storeCreator();
486
+ const store = storeCreator(options.pinia);
486
487
  const { refreshToken } = storeToRefs$1(store);
487
488
  const tokenHook = new ClientResponseErrorTokenHook(client, {
488
489
  baseURL: options.baseURL,
@@ -736,7 +737,8 @@ function injectSocketManager(app) {
736
737
  }
737
738
 
738
739
  function installSocketManager(app, options) {
739
- const store = useStore();
740
+ const storeCreator = injectStore(app);
741
+ const store = storeCreator(options.pinia);
740
742
  const { accessToken } = storeToRefs(store);
741
743
  const manager = new ClientManager({
742
744
  url: options.baseURL,
@@ -1530,6 +1532,7 @@ var TranslatorTranslationDefaultKey;
1530
1532
  TranslatorTranslationDefaultKey["INACTIVE"] = "inactive";
1531
1533
  TranslatorTranslationDefaultKey["LOCKED"] = "locked";
1532
1534
  TranslatorTranslationDefaultKey["NOT_LOCKED"] = "notLocked";
1535
+ TranslatorTranslationDefaultKey["VALUE_IS_REGEX"] = "valueIsRegex";
1533
1536
  TranslatorTranslationDefaultKey["CLIENT"] = "client";
1534
1537
  TranslatorTranslationDefaultKey["CLIENTS"] = "clients";
1535
1538
  TranslatorTranslationDefaultKey["CLIENT_SCOPES"] = "clientScopes";
@@ -1609,6 +1612,9 @@ class MemoryStore {
1609
1612
  }
1610
1613
  }
1611
1614
 
1615
+ typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
1616
+ const noop = ()=>{};
1617
+
1612
1618
  function computedAsync(evaluationCallback, initialState, optionsOrRef) {
1613
1619
  let options;
1614
1620
  if (isRef(optionsOrRef)) {
@@ -1777,6 +1783,7 @@ const TranslatorTranslationDefaultGerman = {
1777
1783
  [TranslatorTranslationDefaultKey.INACTIVE]: 'inaktiv',
1778
1784
  [TranslatorTranslationDefaultKey.LOCKED]: 'gesperrt',
1779
1785
  [TranslatorTranslationDefaultKey.NOT_LOCKED]: 'nicht gesperrt',
1786
+ [TranslatorTranslationDefaultKey.VALUE_IS_REGEX]: 'Wert ist regex pattern?',
1780
1787
  [TranslatorTranslationDefaultKey.CLIENT]: 'Client',
1781
1788
  [TranslatorTranslationDefaultKey.CLIENTS]: 'Clients',
1782
1789
  [TranslatorTranslationDefaultKey.CLIENT_SCOPES]: 'Client-Bereiche',
@@ -1851,6 +1858,7 @@ const TranslatorTranslationDefaultEnglish = {
1851
1858
  [TranslatorTranslationDefaultKey.INACTIVE]: 'inactive',
1852
1859
  [TranslatorTranslationDefaultKey.LOCKED]: 'locked',
1853
1860
  [TranslatorTranslationDefaultKey.NOT_LOCKED]: 'not locked',
1861
+ [TranslatorTranslationDefaultKey.VALUE_IS_REGEX]: 'Value is regex pattern?',
1854
1862
  [TranslatorTranslationDefaultKey.CLIENT]: 'update',
1855
1863
  [TranslatorTranslationDefaultKey.CLIENTS]: 'clients',
1856
1864
  [TranslatorTranslationDefaultKey.CLIENT_SCOPES]: 'client scopes',
@@ -4609,23 +4617,29 @@ const AIdentityProviderRoleAssignment = defineComponent({
4609
4617
  display.value = !display.value;
4610
4618
  };
4611
4619
  const form = reactive({
4612
- external_id: ''
4620
+ name: '',
4621
+ value: '',
4622
+ value_is_regex: false
4613
4623
  });
4614
4624
  const $v = useVuelidate({
4615
- external_id: {
4616
- required,
4625
+ name: {
4626
+ minLength: minLength(3),
4627
+ maxLength: maxLength(32)
4628
+ },
4629
+ value: {
4617
4630
  minLength: minLength(3),
4618
4631
  maxLength: maxLength(128)
4619
- }
4632
+ },
4633
+ value_is_regex: {}
4620
4634
  }, form);
4621
- const validationMessages = useTranslationsForBaseValidation($v.value.external_id);
4622
- const translationExternalID = useTranslation({
4623
- group: TranslatorTranslationGroup.DEFAULT,
4624
- key: TranslatorTranslationDefaultKey.EXTERNAL_ID
4625
- });
4626
- const isExternalIDDefined = computed(()=>form.external_id && form.external_id.length > 0);
4635
+ const validationMessages = useTranslationsForNestedValidation($v.value);
4636
+ const translationsDefault = useTranslationsForGroup(TranslatorTranslationGroup.DEFAULT, [
4637
+ {
4638
+ key: TranslatorTranslationDefaultKey.VALUE_IS_REGEX
4639
+ }
4640
+ ]);
4627
4641
  const manager = createEntityManager({
4628
- type: `${DomainType.IDENTITY_PROVIDER_ROLE}`,
4642
+ type: `${DomainType.IDENTITY_PROVIDER_ROLE_MAPPING}`,
4629
4643
  setup,
4630
4644
  socket: {
4631
4645
  processEvent (event) {
@@ -4695,7 +4709,6 @@ const AIdentityProviderRoleAssignment = defineComponent({
4695
4709
  'btn-dark': !!manager.data.value
4696
4710
  }
4697
4711
  ],
4698
- disabled: !isExternalIDDefined.value,
4699
4712
  onClick ($event) {
4700
4713
  $event.preventDefault();
4701
4714
  if (manager.data.value) {
@@ -4749,13 +4762,39 @@ const AIdentityProviderRoleAssignment = defineComponent({
4749
4762
  }, [
4750
4763
  buildFormGroup({
4751
4764
  label: true,
4752
- labelContent: translationExternalID.value,
4753
- validationMessages: validationMessages.value,
4754
- validationSeverity: getVuelidateSeverity($v.value.external_id),
4765
+ labelContent: 'Name',
4766
+ validationMessages: validationMessages.name.value,
4767
+ validationSeverity: getVuelidateSeverity($v.value.name),
4755
4768
  content: buildFormInput({
4756
- value: $v.value.external_id.$model,
4769
+ value: $v.value.name.$model,
4757
4770
  onChange (input) {
4758
- $v.value.external_id.$model = input;
4771
+ $v.value.name.$model = input;
4772
+ }
4773
+ })
4774
+ }),
4775
+ buildFormGroup({
4776
+ label: true,
4777
+ labelContent: 'Value',
4778
+ validationMessages: validationMessages.value.value,
4779
+ validationSeverity: getVuelidateSeverity($v.value.value),
4780
+ content: buildFormInput({
4781
+ value: $v.value.value.$model,
4782
+ onChange (input) {
4783
+ $v.value.value.$model = input;
4784
+ }
4785
+ })
4786
+ }),
4787
+ buildFormGroup({
4788
+ validationMessages: validationMessages.value_is_regex.value,
4789
+ validationSeverity: getVuelidateSeverity($v.value.value_is_regex),
4790
+ label: true,
4791
+ labelContent: 'Regex',
4792
+ content: buildFormInputCheckbox({
4793
+ groupClass: 'form-switch',
4794
+ labelContent: translationsDefault.valueIsRegex.value,
4795
+ value: $v.value.value_is_regex.$model,
4796
+ onChange (input) {
4797
+ $v.value.value_is_regex.$model = input;
4759
4798
  }
4760
4799
  })
4761
4800
  })
@@ -6557,11 +6596,11 @@ const AEntityDelete = defineComponent({
6557
6596
  const instance = getCurrentInstance();
6558
6597
  const busy = ref(false);
6559
6598
  const submit = wrapFnWithBusyState(busy, async ()=>{
6560
- let domainAPI;
6561
- if (hasOwnProperty(apiClient, props.entityType) && isObject$1(apiClient[props.entityType]) && hasOwnProperty(apiClient[props.entityType], 'delete')) {
6562
- domainAPI = apiClient[props.entityType];
6599
+ const domainAPI = apiClient[props.entityType];
6600
+ if (!isObject$1(domainAPI)) {
6601
+ return;
6563
6602
  }
6564
- if (!domainAPI) {
6603
+ if (typeof domainAPI.delete !== 'function') {
6565
6604
  return;
6566
6605
  }
6567
6606
  try {
@@ -6705,16 +6744,19 @@ function installComponents(input) {
6705
6744
  function install(app1, options) {
6706
6745
  if (options.realtime) {
6707
6746
  installSocketManager(app1, {
6747
+ pinia: options.pinia,
6708
6748
  baseURL: options.realtimeURL || options.baseURL
6709
6749
  });
6710
6750
  }
6711
6751
  installStore(app1, {
6752
+ pinia: options.pinia,
6712
6753
  baseURL: options.baseURL,
6713
6754
  cookieSet: options.cookieSet,
6714
6755
  cookieGet: options.cookieGet,
6715
6756
  cookieUnset: options.cookieUnset
6716
6757
  });
6717
6758
  installHTTPClient(app1, {
6759
+ pinia: options.pinia,
6718
6760
  baseURL: options.baseURL
6719
6761
  });
6720
6762
  installTranslator(app1, {