@digipair/skill-keycloak 0.8.3 → 0.8.5
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/index.cjs.js +12 -7
- package/index.esm.js +17 -12
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -27354,7 +27354,9 @@ function findNext(nodeRef) {
|
|
|
27354
27354
|
handlebars_min.exports.registerHelper('JSONstringify', function(value) {
|
|
27355
27355
|
return JSON.stringify(value);
|
|
27356
27356
|
});
|
|
27357
|
-
const
|
|
27357
|
+
const globalInstance = typeof window === 'undefined' ? global : window;
|
|
27358
|
+
var _globalInstance___DIGIPAIR_CONFIG__;
|
|
27359
|
+
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
|
27358
27360
|
LIBRARIES: {},
|
|
27359
27361
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27360
27362
|
};
|
|
@@ -33877,6 +33879,10 @@ let KeycloakService = class KeycloakService {
|
|
|
33877
33879
|
});
|
|
33878
33880
|
return decodedtoken;
|
|
33879
33881
|
}
|
|
33882
|
+
async prepareBrowserPinsSettings(name, pinsSettings) {
|
|
33883
|
+
const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
|
|
33884
|
+
return preparedPinsSettings;
|
|
33885
|
+
}
|
|
33880
33886
|
async page(params, _pinsSettingsList, context) {
|
|
33881
33887
|
var _context_request_body;
|
|
33882
33888
|
const { body, title = 'Digipair', favicon = 'https://www.digipair.ai/assets/images/favicon.ico', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, libraries = {}, factoryInitialize = [], browserInitialize = [], browserLoad = [], logged = [], unlogged = [] } = params;
|
|
@@ -33903,7 +33909,6 @@ let KeycloakService = class KeycloakService {
|
|
|
33903
33909
|
return await executePinsList(pinsSettingsList, _extends({}, context.request.body.context, context));
|
|
33904
33910
|
}
|
|
33905
33911
|
await executePinsList(factoryInitialize, context);
|
|
33906
|
-
const preparedBody = body.map((item, index)=>this.filteredWebPinsSettings(item, `body[${index}]`));
|
|
33907
33912
|
const html = `
|
|
33908
33913
|
<!DOCTYPE html>
|
|
33909
33914
|
<html style="${styleHtml}">
|
|
@@ -33955,25 +33960,25 @@ let KeycloakService = class KeycloakService {
|
|
|
33955
33960
|
};
|
|
33956
33961
|
|
|
33957
33962
|
if (keycloakService.isLogged) {
|
|
33958
|
-
await executePinsList(${JSON.stringify(logged)}, context);
|
|
33963
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('logged', logged))}, context);
|
|
33959
33964
|
} else {
|
|
33960
|
-
await executePinsList(${JSON.stringify(unlogged)}, context);
|
|
33965
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('unlogged', unlogged))}, context);
|
|
33961
33966
|
}
|
|
33962
33967
|
|
|
33963
33968
|
// Pins initialization
|
|
33964
|
-
await executePinsList(${JSON.stringify(browserInitialize)}, context);
|
|
33969
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserInitialize', browserInitialize))}, context);
|
|
33965
33970
|
|
|
33966
33971
|
const options = {
|
|
33967
33972
|
libraries: {},
|
|
33968
33973
|
};
|
|
33969
|
-
const pinsList = ${JSON.stringify(
|
|
33974
|
+
const pinsList = ${JSON.stringify(this.prepareBrowserPinsSettings('body', body))};
|
|
33970
33975
|
for (let i = 0; i < pinsList.length; i++) {
|
|
33971
33976
|
const item = pinsList[i];
|
|
33972
33977
|
await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} }, options);
|
|
33973
33978
|
}
|
|
33974
33979
|
|
|
33975
33980
|
setTimeout(async () => {
|
|
33976
|
-
await executePinsList(${JSON.stringify(browserLoad)}, context);
|
|
33981
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserLoad', browserLoad))}, context);
|
|
33977
33982
|
}, 1);
|
|
33978
33983
|
</script>
|
|
33979
33984
|
</body>
|
package/index.esm.js
CHANGED
|
@@ -23493,14 +23493,14 @@ function indent(str, spaces) {
|
|
|
23493
23493
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23494
23494
|
// match is required
|
|
23495
23495
|
if (!match) {
|
|
23496
|
-
return tokens = tokens1,
|
|
23496
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
23497
23497
|
v: nextMatch1
|
|
23498
23498
|
};
|
|
23499
23499
|
}
|
|
23500
23500
|
var token = match.token, offset = match.offset;
|
|
23501
23501
|
i1 += offset;
|
|
23502
23502
|
if (token === " ") {
|
|
23503
|
-
return tokens = tokens1,
|
|
23503
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
23504
23504
|
}
|
|
23505
23505
|
tokens1 = _to_consumable_array$3(tokens1).concat([
|
|
23506
23506
|
token
|
|
@@ -23519,7 +23519,7 @@ function indent(str, spaces) {
|
|
|
23519
23519
|
if (contextKeys.some(function(el) {
|
|
23520
23520
|
return el.startsWith(name);
|
|
23521
23521
|
})) {
|
|
23522
|
-
return tokens = tokens1,
|
|
23522
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
23523
23523
|
}
|
|
23524
23524
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23525
23525
|
return el === name;
|
|
@@ -23538,9 +23538,9 @@ function indent(str, spaces) {
|
|
|
23538
23538
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23539
23539
|
return el.startsWith(name);
|
|
23540
23540
|
})) {
|
|
23541
|
-
return tokens = tokens1,
|
|
23541
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, "continue";
|
|
23542
23542
|
}
|
|
23543
|
-
return tokens = tokens1,
|
|
23543
|
+
return tokens = tokens1, i = i1, nextMatch = nextMatch1, {
|
|
23544
23544
|
v: nextMatch1
|
|
23545
23545
|
};
|
|
23546
23546
|
};
|
|
@@ -27325,7 +27325,9 @@ function findNext(nodeRef) {
|
|
|
27325
27325
|
handlebars_min.exports.registerHelper('JSONstringify', function(value) {
|
|
27326
27326
|
return JSON.stringify(value);
|
|
27327
27327
|
});
|
|
27328
|
-
const
|
|
27328
|
+
const globalInstance = typeof window === 'undefined' ? global : window;
|
|
27329
|
+
var _globalInstance___DIGIPAIR_CONFIG__;
|
|
27330
|
+
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
|
27329
27331
|
LIBRARIES: {},
|
|
27330
27332
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27331
27333
|
};
|
|
@@ -33848,6 +33850,10 @@ let KeycloakService = class KeycloakService {
|
|
|
33848
33850
|
});
|
|
33849
33851
|
return decodedtoken;
|
|
33850
33852
|
}
|
|
33853
|
+
async prepareBrowserPinsSettings(name, pinsSettings) {
|
|
33854
|
+
const preparedPinsSettings = pinsSettings.map((item, index)=>this.filteredWebPinsSettings(item, `${name}[${index}]`));
|
|
33855
|
+
return preparedPinsSettings;
|
|
33856
|
+
}
|
|
33851
33857
|
async page(params, _pinsSettingsList, context) {
|
|
33852
33858
|
var _context_request_body;
|
|
33853
33859
|
const { body, title = 'Digipair', favicon = 'https://www.digipair.ai/assets/images/favicon.ico', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, libraries = {}, factoryInitialize = [], browserInitialize = [], browserLoad = [], logged = [], unlogged = [] } = params;
|
|
@@ -33874,7 +33880,6 @@ let KeycloakService = class KeycloakService {
|
|
|
33874
33880
|
return await executePinsList(pinsSettingsList, _extends({}, context.request.body.context, context));
|
|
33875
33881
|
}
|
|
33876
33882
|
await executePinsList(factoryInitialize, context);
|
|
33877
|
-
const preparedBody = body.map((item, index)=>this.filteredWebPinsSettings(item, `body[${index}]`));
|
|
33878
33883
|
const html = `
|
|
33879
33884
|
<!DOCTYPE html>
|
|
33880
33885
|
<html style="${styleHtml}">
|
|
@@ -33926,25 +33931,25 @@ let KeycloakService = class KeycloakService {
|
|
|
33926
33931
|
};
|
|
33927
33932
|
|
|
33928
33933
|
if (keycloakService.isLogged) {
|
|
33929
|
-
await executePinsList(${JSON.stringify(logged)}, context);
|
|
33934
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('logged', logged))}, context);
|
|
33930
33935
|
} else {
|
|
33931
|
-
await executePinsList(${JSON.stringify(unlogged)}, context);
|
|
33936
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('unlogged', unlogged))}, context);
|
|
33932
33937
|
}
|
|
33933
33938
|
|
|
33934
33939
|
// Pins initialization
|
|
33935
|
-
await executePinsList(${JSON.stringify(browserInitialize)}, context);
|
|
33940
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserInitialize', browserInitialize))}, context);
|
|
33936
33941
|
|
|
33937
33942
|
const options = {
|
|
33938
33943
|
libraries: {},
|
|
33939
33944
|
};
|
|
33940
|
-
const pinsList = ${JSON.stringify(
|
|
33945
|
+
const pinsList = ${JSON.stringify(this.prepareBrowserPinsSettings('body', body))};
|
|
33941
33946
|
for (let i = 0; i < pinsList.length; i++) {
|
|
33942
33947
|
const item = pinsList[i];
|
|
33943
33948
|
await generateElementFromPins(item, document.body, { ...context, data: ${JSON.stringify(preparedData)} }, options);
|
|
33944
33949
|
}
|
|
33945
33950
|
|
|
33946
33951
|
setTimeout(async () => {
|
|
33947
|
-
await executePinsList(${JSON.stringify(browserLoad)}, context);
|
|
33952
|
+
await executePinsList(${JSON.stringify(this.prepareBrowserPinsSettings('browserLoad', browserLoad))}, context);
|
|
33948
33953
|
}, 1);
|
|
33949
33954
|
</script>
|
|
33950
33955
|
</body>
|