eligius 1.0.11 → 1.0.12
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/eligius.cjs.development.js +60 -0
- package/dist/eligius.cjs.development.js.map +1 -1
- package/dist/eligius.cjs.production.min.js +1 -1
- package/dist/eligius.cjs.production.min.js.map +1 -1
- package/dist/eligius.esm.js +60 -1
- package/dist/eligius.esm.js.map +1 -1
- package/dist/operation/helper/globals.d.ts +3 -0
- package/dist/operation/index.d.ts +1 -0
- package/dist/operation/metadata/index.d.ts +1 -0
- package/dist/operation/metadata/set-global-data.d.ts +4 -0
- package/dist/operation/set-global-data.d.ts +11 -0
- package/package.json +1 -1
- package/dist/operation/helper/get-globals.d.ts +0 -1
|
@@ -3322,6 +3322,25 @@ function removeEventDataFromOperationData(operationData) {
|
|
|
3322
3322
|
delete operationData.eventArgs;
|
|
3323
3323
|
}
|
|
3324
3324
|
|
|
3325
|
+
var cache$1 = {};
|
|
3326
|
+
|
|
3327
|
+
function _getGlobals(cache, name) {
|
|
3328
|
+
var value = name ? cache[name] : cache;
|
|
3329
|
+
return value && value !== cache ? deepCopy(value) : value;
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
function _setGlobals(cache, newValues) {
|
|
3333
|
+
Object.entries(newValues).forEach(function (_ref) {
|
|
3334
|
+
var name = _ref[0],
|
|
3335
|
+
value = _ref[1];
|
|
3336
|
+
return cache[name] = value;
|
|
3337
|
+
});
|
|
3338
|
+
console.log('cache', cache);
|
|
3339
|
+
}
|
|
3340
|
+
|
|
3341
|
+
var getGlobals = /*#__PURE__*/_getGlobals.bind(null, cache$1);
|
|
3342
|
+
var setGlobals = /*#__PURE__*/_setGlobals.bind(null, cache$1);
|
|
3343
|
+
|
|
3325
3344
|
function extractOperationDataArgumentValues(sourceObject, argumentValue) {
|
|
3326
3345
|
if (typeof argumentValue === 'string' && argumentValue.toLowerCase().startsWith('operationdata.')) {
|
|
3327
3346
|
var propNames = argumentValue.split('.');
|
|
@@ -3329,6 +3348,14 @@ function extractOperationDataArgumentValues(sourceObject, argumentValue) {
|
|
|
3329
3348
|
return getNestedValue(propNames, sourceObject);
|
|
3330
3349
|
}
|
|
3331
3350
|
|
|
3351
|
+
if (typeof argumentValue === 'string' && argumentValue.toLowerCase().startsWith('globaldata.')) {
|
|
3352
|
+
var _propNames = argumentValue.split('.');
|
|
3353
|
+
|
|
3354
|
+
_propNames.shift();
|
|
3355
|
+
|
|
3356
|
+
return getNestedValue(_propNames, getGlobals());
|
|
3357
|
+
}
|
|
3358
|
+
|
|
3332
3359
|
return argumentValue;
|
|
3333
3360
|
}
|
|
3334
3361
|
|
|
@@ -4226,6 +4253,24 @@ var setElementContent$1 = function setElementContent(operationData) {
|
|
|
4226
4253
|
return operationData;
|
|
4227
4254
|
};
|
|
4228
4255
|
|
|
4256
|
+
/**
|
|
4257
|
+
* This operation copies the specified values from the operationData to the global data.
|
|
4258
|
+
*
|
|
4259
|
+
* @param operationData
|
|
4260
|
+
* @returns
|
|
4261
|
+
*/
|
|
4262
|
+
|
|
4263
|
+
var setGlobalData$1 = function setGlobalData(operationData) {
|
|
4264
|
+
var properties = operationData.properties;
|
|
4265
|
+
var newGlobals = Object.fromEntries(Object.entries(operationData).filter(function (_ref) {
|
|
4266
|
+
var name = _ref[0];
|
|
4267
|
+
return properties.includes(name);
|
|
4268
|
+
}));
|
|
4269
|
+
setGlobals(newGlobals);
|
|
4270
|
+
delete operationData.properties;
|
|
4271
|
+
return operationData;
|
|
4272
|
+
};
|
|
4273
|
+
|
|
4229
4274
|
/**
|
|
4230
4275
|
* This operation assigns the specified properties to the current operation data.
|
|
4231
4276
|
* When override is set to true the properties replace the current operation data entirely.
|
|
@@ -4402,6 +4447,7 @@ var ops = {
|
|
|
4402
4447
|
selectElement: selectElement$1,
|
|
4403
4448
|
setElementAttributes: setElementAttributes$1,
|
|
4404
4449
|
setElementContent: setElementContent$1,
|
|
4450
|
+
setGlobalData: setGlobalData$1,
|
|
4405
4451
|
setOperationData: setOperationData$1,
|
|
4406
4452
|
setStyle: setStyle$1,
|
|
4407
4453
|
startAction: startAction$1,
|
|
@@ -5420,6 +5466,18 @@ function setElementContent() {
|
|
|
5420
5466
|
};
|
|
5421
5467
|
}
|
|
5422
5468
|
|
|
5469
|
+
function setGlobalData() {
|
|
5470
|
+
return {
|
|
5471
|
+
description: 'Copies the specified values from the operationData to the global data',
|
|
5472
|
+
properties: {
|
|
5473
|
+
properties: {
|
|
5474
|
+
type: 'ParameterType:array',
|
|
5475
|
+
required: true
|
|
5476
|
+
}
|
|
5477
|
+
}
|
|
5478
|
+
};
|
|
5479
|
+
}
|
|
5480
|
+
|
|
5423
5481
|
function setOperationData() {
|
|
5424
5482
|
return {
|
|
5425
5483
|
description: 'Sets the given properties on the current operation data',
|
|
@@ -5535,6 +5593,7 @@ var index = {
|
|
|
5535
5593
|
selectElement: selectElement,
|
|
5536
5594
|
setElementAttributes: setElementAttributes,
|
|
5537
5595
|
setElementContent: setElementContent,
|
|
5596
|
+
setGlobalData: setGlobalData,
|
|
5538
5597
|
setOperationData: setOperationData,
|
|
5539
5598
|
setStyle: setStyle,
|
|
5540
5599
|
startAction: startAction,
|
|
@@ -5602,6 +5661,7 @@ exports.resizeAction = resizeAction$1;
|
|
|
5602
5661
|
exports.selectElement = selectElement$1;
|
|
5603
5662
|
exports.setElementAttributes = setElementAttributes$1;
|
|
5604
5663
|
exports.setElementContent = setElementContent$1;
|
|
5664
|
+
exports.setGlobalData = setGlobalData$1;
|
|
5605
5665
|
exports.setOperationData = setOperationData$1;
|
|
5606
5666
|
exports.setStyle = setStyle$1;
|
|
5607
5667
|
exports.startAction = startAction$1;
|