@digipair/skill-keycloak 0.11.3 → 0.11.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 +13 -10
- package/index.esm.js +13 -10
- package/package.json +1 -1
- package/schema.json +9 -0
package/index.cjs.js
CHANGED
|
@@ -23522,14 +23522,14 @@ function indent(str, spaces) {
|
|
|
23522
23522
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23523
23523
|
// match is required
|
|
23524
23524
|
if (!match) {
|
|
23525
|
-
return
|
|
23525
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23526
23526
|
v: nextMatch1
|
|
23527
23527
|
};
|
|
23528
23528
|
}
|
|
23529
23529
|
var token = match.token, offset = match.offset;
|
|
23530
23530
|
i1 += offset;
|
|
23531
23531
|
if (token === " ") {
|
|
23532
|
-
return
|
|
23532
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23533
23533
|
}
|
|
23534
23534
|
tokens1 = _to_consumable_array$3(tokens1).concat([
|
|
23535
23535
|
token
|
|
@@ -23548,7 +23548,7 @@ function indent(str, spaces) {
|
|
|
23548
23548
|
if (contextKeys.some(function(el) {
|
|
23549
23549
|
return el.startsWith(name);
|
|
23550
23550
|
})) {
|
|
23551
|
-
return
|
|
23551
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23552
23552
|
}
|
|
23553
23553
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23554
23554
|
return el === name;
|
|
@@ -23567,9 +23567,9 @@ function indent(str, spaces) {
|
|
|
23567
23567
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23568
23568
|
return el.startsWith(name);
|
|
23569
23569
|
})) {
|
|
23570
|
-
return
|
|
23570
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, "continue";
|
|
23571
23571
|
}
|
|
23572
|
-
return
|
|
23572
|
+
return tokens = tokens1, nextMatch = nextMatch1, i = i1, {
|
|
23573
23573
|
v: nextMatch1
|
|
23574
23574
|
};
|
|
23575
23575
|
};
|
|
@@ -27360,6 +27360,9 @@ const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR
|
|
|
27360
27360
|
LIBRARIES: {},
|
|
27361
27361
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27362
27362
|
};
|
|
27363
|
+
const isPinsSettings = (value)=>{
|
|
27364
|
+
return typeof value === 'object' && value !== null && typeof value.element === 'string' && typeof value.library === 'string';
|
|
27365
|
+
};
|
|
27363
27366
|
const applyTemplate = (value, context)=>{
|
|
27364
27367
|
let result = value;
|
|
27365
27368
|
if (typeof value === 'string') {
|
|
@@ -27372,7 +27375,7 @@ const applyTemplate = (value, context)=>{
|
|
|
27372
27375
|
result = evaluate(path, context);
|
|
27373
27376
|
}
|
|
27374
27377
|
} else if (typeof value === 'object' && Array.isArray(value)) {
|
|
27375
|
-
result = value;
|
|
27378
|
+
result = value.map((item)=>isPinsSettings(item) ? item : applyTemplate(item, context));
|
|
27376
27379
|
} else if (typeof value === 'object') {
|
|
27377
27380
|
result = {};
|
|
27378
27381
|
Object.entries(value || {}).forEach(([key, attributeValue])=>{
|
|
@@ -33897,8 +33900,8 @@ let KeycloakService = class KeycloakService {
|
|
|
33897
33900
|
}
|
|
33898
33901
|
async page(params, _pinsSettingsList, context) {
|
|
33899
33902
|
var _context_request_body;
|
|
33900
|
-
const { body, title = 'Digipair', favicon = 'https://res.cloudinary.com/do87nxq3l/image/upload/fl_preserve_transparency/v1717769492/logo-digipair_oyvvxz.png?_s=public-apps', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID,
|
|
33901
|
-
const engineVersion =
|
|
33903
|
+
const { body, title = 'Digipair', favicon = 'https://res.cloudinary.com/do87nxq3l/image/upload/fl_preserve_transparency/v1717769492/logo-digipair_oyvvxz.png?_s=public-apps', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, factoryInitialize = [], browserInitialize = [], browserLoad = [], logged = [], unlogged = [], factoryUrl = context.privates.FACTORY_URL || process.env['FACTORY_URL'] || 'https://factory.digipair.ai' } = params;
|
|
33904
|
+
const engineVersion = context.config.VERSIONS['@digipair/engine'] || 'latest';
|
|
33902
33905
|
const preparedData = {};
|
|
33903
33906
|
if (context.request.method === 'POST' && ((_context_request_body = context.request.body) == null ? void 0 : _context_request_body.type) === 'DIGIPAIR_EXECUTE_FACTORY') {
|
|
33904
33907
|
var _pinsSettings_properties, _context_request_headers_authorization, _pinsSettings_properties1, _pinsSettings_properties2;
|
|
@@ -33936,7 +33939,7 @@ let KeycloakService = class KeycloakService {
|
|
|
33936
33939
|
import '${url}/js/keycloak.js';
|
|
33937
33940
|
import { config, executePinsList, generateElementFromPins } from '${baseUrl}/@digipair/engine@${engineVersion}/index.esm.js';
|
|
33938
33941
|
|
|
33939
|
-
const serverUrl = '${
|
|
33942
|
+
const serverUrl = '${factoryUrl}';
|
|
33940
33943
|
const keycloakService = ${this.skillKeycloak};
|
|
33941
33944
|
|
|
33942
33945
|
const originalFetch = window.fetch;
|
|
@@ -33976,7 +33979,7 @@ let KeycloakService = class KeycloakService {
|
|
|
33976
33979
|
keycloakService.login(),
|
|
33977
33980
|
};
|
|
33978
33981
|
|
|
33979
|
-
config.set('LIBRARIES', { '@digipair/skill-keycloak': skillWeb
|
|
33982
|
+
config.set('LIBRARIES', { '@digipair/skill-keycloak': skillWeb });
|
|
33980
33983
|
config.set('BASE_URL', '${baseUrl}');
|
|
33981
33984
|
|
|
33982
33985
|
// Keycloak initialization
|
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
|
|
23496
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
|
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
|
|
23503
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "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
|
|
23522
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "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
|
|
23541
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, "continue";
|
|
23542
23542
|
}
|
|
23543
|
-
return
|
|
23543
|
+
return nextMatch = nextMatch1, tokens = tokens1, i = i1, {
|
|
23544
23544
|
v: nextMatch1
|
|
23545
23545
|
};
|
|
23546
23546
|
};
|
|
@@ -27331,6 +27331,9 @@ const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR
|
|
|
27331
27331
|
LIBRARIES: {},
|
|
27332
27332
|
BASE_URL: 'https://cdn.jsdelivr.net/npm'
|
|
27333
27333
|
};
|
|
27334
|
+
const isPinsSettings = (value)=>{
|
|
27335
|
+
return typeof value === 'object' && value !== null && typeof value.element === 'string' && typeof value.library === 'string';
|
|
27336
|
+
};
|
|
27334
27337
|
const applyTemplate = (value, context)=>{
|
|
27335
27338
|
let result = value;
|
|
27336
27339
|
if (typeof value === 'string') {
|
|
@@ -27343,7 +27346,7 @@ const applyTemplate = (value, context)=>{
|
|
|
27343
27346
|
result = evaluate(path, context);
|
|
27344
27347
|
}
|
|
27345
27348
|
} else if (typeof value === 'object' && Array.isArray(value)) {
|
|
27346
|
-
result = value;
|
|
27349
|
+
result = value.map((item)=>isPinsSettings(item) ? item : applyTemplate(item, context));
|
|
27347
27350
|
} else if (typeof value === 'object') {
|
|
27348
27351
|
result = {};
|
|
27349
27352
|
Object.entries(value || {}).forEach(([key, attributeValue])=>{
|
|
@@ -33868,8 +33871,8 @@ let KeycloakService = class KeycloakService {
|
|
|
33868
33871
|
}
|
|
33869
33872
|
async page(params, _pinsSettingsList, context) {
|
|
33870
33873
|
var _context_request_body;
|
|
33871
|
-
const { body, title = 'Digipair', favicon = 'https://res.cloudinary.com/do87nxq3l/image/upload/fl_preserve_transparency/v1717769492/logo-digipair_oyvvxz.png?_s=public-apps', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID,
|
|
33872
|
-
const engineVersion =
|
|
33874
|
+
const { body, title = 'Digipair', favicon = 'https://res.cloudinary.com/do87nxq3l/image/upload/fl_preserve_transparency/v1717769492/logo-digipair_oyvvxz.png?_s=public-apps', styleHtml = '', styleBody = '', baseUrl = 'https://cdn.jsdelivr.net/npm', url = context.privates.KEYCLOAK_URL, realm = context.privates.KEYCLOAK_REALM, clientId = context.privates.KEYCLOAK_CLIENTID, factoryInitialize = [], browserInitialize = [], browserLoad = [], logged = [], unlogged = [], factoryUrl = context.privates.FACTORY_URL || process.env['FACTORY_URL'] || 'https://factory.digipair.ai' } = params;
|
|
33875
|
+
const engineVersion = context.config.VERSIONS['@digipair/engine'] || 'latest';
|
|
33873
33876
|
const preparedData = {};
|
|
33874
33877
|
if (context.request.method === 'POST' && ((_context_request_body = context.request.body) == null ? void 0 : _context_request_body.type) === 'DIGIPAIR_EXECUTE_FACTORY') {
|
|
33875
33878
|
var _pinsSettings_properties, _context_request_headers_authorization, _pinsSettings_properties1, _pinsSettings_properties2;
|
|
@@ -33907,7 +33910,7 @@ let KeycloakService = class KeycloakService {
|
|
|
33907
33910
|
import '${url}/js/keycloak.js';
|
|
33908
33911
|
import { config, executePinsList, generateElementFromPins } from '${baseUrl}/@digipair/engine@${engineVersion}/index.esm.js';
|
|
33909
33912
|
|
|
33910
|
-
const serverUrl = '${
|
|
33913
|
+
const serverUrl = '${factoryUrl}';
|
|
33911
33914
|
const keycloakService = ${this.skillKeycloak};
|
|
33912
33915
|
|
|
33913
33916
|
const originalFetch = window.fetch;
|
|
@@ -33947,7 +33950,7 @@ let KeycloakService = class KeycloakService {
|
|
|
33947
33950
|
keycloakService.login(),
|
|
33948
33951
|
};
|
|
33949
33952
|
|
|
33950
|
-
config.set('LIBRARIES', { '@digipair/skill-keycloak': skillWeb
|
|
33953
|
+
config.set('LIBRARIES', { '@digipair/skill-keycloak': skillWeb });
|
|
33951
33954
|
config.set('BASE_URL', '${baseUrl}');
|
|
33952
33955
|
|
|
33953
33956
|
// Keycloak initialization
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -176,6 +176,15 @@
|
|
|
176
176
|
"type": "string"
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
|
+
{
|
|
180
|
+
"name": "factoryUrl",
|
|
181
|
+
"summary": "Adresse de la factory",
|
|
182
|
+
"required": false,
|
|
183
|
+
"description": "Adresse de la factory Digipair",
|
|
184
|
+
"schema": {
|
|
185
|
+
"type": "string"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
179
188
|
{
|
|
180
189
|
"name": "factoryInitialize",
|
|
181
190
|
"summary": "Lors de la l'initialisation coté factory",
|