@digipair/skill-keycloak 0.66.3 → 0.66.4

Sign up to get free protection for your applications and to get access to all the features.
package/index.cjs.js CHANGED
@@ -16544,7 +16544,7 @@ let KeycloakService = class KeycloakService {
16544
16544
  }
16545
16545
  async page(params, _pinsSettingsList, context) {
16546
16546
  var _context_request_body;
16547
- const { body, head, ssr = false, styleHtml = '', styleBody = '', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, factoryInitialize = [], browserInitialize = [], browserLoad = [], confirmBeforeUnload = [], logged = [], unlogged = [], factoryUrl = context.privates.FACTORY_URL || process.env['FACTORY_URL'] || 'https://factory.digipair.ai' } = params;
16547
+ const { body, head, ssr = false, styleHtml = '', styleBody = '', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, factoryInitialize = [], browserInitialize = [], browserLoad = [], confirmBeforeUnload = 'false', logged = [], unlogged = [], factoryUrl = context.privates.FACTORY_URL || process.env['FACTORY_URL'] || 'https://factory.digipair.ai' } = params;
16548
16548
  const engineVersion = context.config.VERSIONS['@digipair/engine'] || 'latest';
16549
16549
  const preparedData = {};
16550
16550
  if (context.request.params[0] === '__digipair_www__') {
@@ -16714,6 +16714,15 @@ let KeycloakService = class KeycloakService {
16714
16714
  setTimeout(async () => {
16715
16715
  await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserLoad', browserLoad))}, context);
16716
16716
  }, 1);
16717
+
16718
+ window.addEventListener('beforeunload', (event) => {
16719
+ const showConfirmationMessage = applyTemplate('EVALUATE:' + ${JSON.stringify(confirmBeforeUnload)}, context);
16720
+
16721
+ if (showConfirmationMessage) {
16722
+ event.preventDefault();
16723
+ event.returnValue = '';
16724
+ }
16725
+ });
16717
16726
  </script>
16718
16727
 
16719
16728
  ${ssr ? await this.pins2html(body, context) : ''}
package/index.esm.js CHANGED
@@ -23907,14 +23907,14 @@ function indent(str, spaces) {
23907
23907
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23908
23908
  // match is required
23909
23909
  if (!match) {
23910
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23910
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23911
23911
  v: nextMatch1
23912
23912
  };
23913
23913
  }
23914
23914
  var token = match.token, offset = match.offset;
23915
23915
  i1 += offset;
23916
23916
  if (token === " ") {
23917
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23917
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23918
23918
  }
23919
23919
  tokens1 = _to_consumable_array$3(tokens1).concat([
23920
23920
  token
@@ -23933,7 +23933,7 @@ function indent(str, spaces) {
23933
23933
  if (contextKeys.some(function(el) {
23934
23934
  return el.startsWith(name);
23935
23935
  })) {
23936
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23936
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23937
23937
  }
23938
23938
  if (dateTimeIdentifiers.some(function(el) {
23939
23939
  return el === name;
@@ -23952,9 +23952,9 @@ function indent(str, spaces) {
23952
23952
  if (dateTimeIdentifiers.some(function(el) {
23953
23953
  return el.startsWith(name);
23954
23954
  })) {
23955
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
23955
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23956
23956
  }
23957
- return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
23957
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23958
23958
  v: nextMatch1
23959
23959
  };
23960
23960
  };
@@ -44571,7 +44571,7 @@ let KeycloakService = class KeycloakService {
44571
44571
  }
44572
44572
  async page(params, _pinsSettingsList, context) {
44573
44573
  var _context_request_body;
44574
- const { body, head, ssr = false, styleHtml = '', styleBody = '', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, factoryInitialize = [], browserInitialize = [], browserLoad = [], confirmBeforeUnload = [], logged = [], unlogged = [], factoryUrl = context.privates.FACTORY_URL || process.env['FACTORY_URL'] || 'https://factory.digipair.ai' } = params;
44574
+ const { body, head, ssr = false, styleHtml = '', styleBody = '', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, factoryInitialize = [], browserInitialize = [], browserLoad = [], confirmBeforeUnload = 'false', logged = [], unlogged = [], factoryUrl = context.privates.FACTORY_URL || process.env['FACTORY_URL'] || 'https://factory.digipair.ai' } = params;
44575
44575
  const engineVersion = context.config.VERSIONS['@digipair/engine'] || 'latest';
44576
44576
  const preparedData = {};
44577
44577
  if (context.request.params[0] === '__digipair_www__') {
@@ -44741,6 +44741,15 @@ let KeycloakService = class KeycloakService {
44741
44741
  setTimeout(async () => {
44742
44742
  await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserLoad', browserLoad))}, context);
44743
44743
  }, 1);
44744
+
44745
+ window.addEventListener('beforeunload', (event) => {
44746
+ const showConfirmationMessage = applyTemplate('EVALUATE:' + ${JSON.stringify(confirmBeforeUnload)}, context);
44747
+
44748
+ if (showConfirmationMessage) {
44749
+ event.preventDefault();
44750
+ event.returnValue = '';
44751
+ }
44752
+ });
44744
44753
  </script>
44745
44754
 
44746
44755
  ${ssr ? await this.pins2html(body, context) : ''}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-keycloak",
3
- "version": "0.66.3",
3
+ "version": "0.66.4",
4
4
  "dependencies": {
5
5
  "jsdom": "^25.0.1"
6
6
  },
package/schema.fr.json CHANGED
@@ -267,10 +267,7 @@
267
267
  "required": false,
268
268
  "description": "Message de confirmation avant de quitter la page",
269
269
  "schema": {
270
- "type": "array",
271
- "items": {
272
- "$ref": "https://schemas.digipair.ai/pinsSettings"
273
- }
270
+ "type": "string"
274
271
  }
275
272
  }
276
273
  ]
package/schema.json CHANGED
@@ -267,10 +267,7 @@
267
267
  "required": false,
268
268
  "description": "Confirmation message before leaving the page",
269
269
  "schema": {
270
- "type": "array",
271
- "items": {
272
- "$ref": "https://schemas.digipair.ai/pinsSettings"
273
- }
270
+ "type": "string"
274
271
  }
275
272
  }
276
273
  ]