@digipair/skill-web-notification 0.70.2 → 0.71.2
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 +14 -10
- package/index.esm.js +14 -10
- package/libs/engine/src/lib/engine.d.ts +2 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -23921,14 +23921,14 @@ function indent(str, spaces) {
|
|
|
23921
23921
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23922
23922
|
// match is required
|
|
23923
23923
|
if (!match) {
|
|
23924
|
-
return
|
|
23924
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
|
23925
23925
|
v: nextMatch1
|
|
23926
23926
|
};
|
|
23927
23927
|
}
|
|
23928
23928
|
var token = match.token, offset = match.offset;
|
|
23929
23929
|
i1 += offset;
|
|
23930
23930
|
if (token === " ") {
|
|
23931
|
-
return
|
|
23931
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
23932
23932
|
}
|
|
23933
23933
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23934
23934
|
token
|
|
@@ -23947,7 +23947,7 @@ function indent(str, spaces) {
|
|
|
23947
23947
|
if (contextKeys.some(function(el) {
|
|
23948
23948
|
return el.startsWith(name);
|
|
23949
23949
|
})) {
|
|
23950
|
-
return
|
|
23950
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
23951
23951
|
}
|
|
23952
23952
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23953
23953
|
return el === name;
|
|
@@ -23966,9 +23966,9 @@ function indent(str, spaces) {
|
|
|
23966
23966
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23967
23967
|
return el.startsWith(name);
|
|
23968
23968
|
})) {
|
|
23969
|
-
return
|
|
23969
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
|
|
23970
23970
|
}
|
|
23971
|
-
return
|
|
23971
|
+
return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
|
|
23972
23972
|
v: nextMatch1
|
|
23973
23973
|
};
|
|
23974
23974
|
};
|
|
@@ -27857,7 +27857,8 @@ var _globalInstance___DIGIPAIR_CONFIG__;
|
|
|
27857
27857
|
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
|
27858
27858
|
LIBRARIES: {},
|
|
27859
27859
|
BASE_URL: 'https://cdn.jsdelivr.net/npm',
|
|
27860
|
-
ALIAS: []
|
|
27860
|
+
ALIAS: [],
|
|
27861
|
+
LOGGER: (level, path, message, context, data)=>{}
|
|
27861
27862
|
};
|
|
27862
27863
|
const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
|
|
27863
27864
|
const isPinsSettings = (value)=>{
|
|
@@ -27898,6 +27899,7 @@ const applyTemplate = (value, context)=>{
|
|
|
27898
27899
|
};
|
|
27899
27900
|
const executePins = async (settingsOrigin, context = {})=>{
|
|
27900
27901
|
var _settings_conditions, _settings_conditions1;
|
|
27902
|
+
_config.LOGGER('INFO', context.__PATH__, 'execute:start', context);
|
|
27901
27903
|
let settings = preparePinsSettings(settingsOrigin, context);
|
|
27902
27904
|
const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
|
|
27903
27905
|
const config = context.config || {};
|
|
@@ -27945,6 +27947,7 @@ const executePins = async (settingsOrigin, context = {})=>{
|
|
|
27945
27947
|
}
|
|
27946
27948
|
results.push(itemResult);
|
|
27947
27949
|
}
|
|
27950
|
+
_config.LOGGER('INFO', context.__PATH__, 'execute:end', context, results);
|
|
27948
27951
|
return results;
|
|
27949
27952
|
}
|
|
27950
27953
|
if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
|
|
@@ -27957,7 +27960,7 @@ const executePins = async (settingsOrigin, context = {})=>{
|
|
|
27957
27960
|
}
|
|
27958
27961
|
return await pins(settings.properties, settings.pins, context);
|
|
27959
27962
|
};
|
|
27960
|
-
const executePinsList = async (pinsSettingsList, context)=>{
|
|
27963
|
+
const executePinsList = async (pinsSettingsList, context, path = 'root')=>{
|
|
27961
27964
|
let previous = {};
|
|
27962
27965
|
for(let i = 0; i < pinsSettingsList.length; i++){
|
|
27963
27966
|
const settings = pinsSettingsList[i];
|
|
@@ -27967,7 +27970,8 @@ const executePinsList = async (pinsSettingsList, context)=>{
|
|
|
27967
27970
|
parent: {
|
|
27968
27971
|
previous: context.previous,
|
|
27969
27972
|
parent: context.parent
|
|
27970
|
-
}
|
|
27973
|
+
},
|
|
27974
|
+
__PATH__: `${path}[${i}]`
|
|
27971
27975
|
}));
|
|
27972
27976
|
} catch (error) {
|
|
27973
27977
|
if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
|
|
@@ -28393,10 +28397,10 @@ let NotificationService = class NotificationService {
|
|
|
28393
28397
|
async confirm(params, _pinsSettingsList, context) {
|
|
28394
28398
|
const { message, ok = [], ko = [] } = params;
|
|
28395
28399
|
if (!window.confirm(message)) {
|
|
28396
|
-
await executePinsList(ko, context);
|
|
28400
|
+
await executePinsList(ko, context, `${context.__PATH__}.ko`);
|
|
28397
28401
|
return false;
|
|
28398
28402
|
}
|
|
28399
|
-
await executePinsList(ok, context);
|
|
28403
|
+
await executePinsList(ok, context, `${context.__PATH__}.ok`);
|
|
28400
28404
|
return true;
|
|
28401
28405
|
}
|
|
28402
28406
|
async alert(params, _pinsSettingsList, _context) {
|
package/index.esm.js
CHANGED
|
@@ -23899,14 +23899,14 @@ function indent(str, spaces) {
|
|
|
23899
23899
|
var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
|
|
23900
23900
|
// match is required
|
|
23901
23901
|
if (!match) {
|
|
23902
|
-
return
|
|
23902
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
23903
23903
|
v: nextMatch1
|
|
23904
23904
|
};
|
|
23905
23905
|
}
|
|
23906
23906
|
var token = match.token, offset = match.offset;
|
|
23907
23907
|
i1 += offset;
|
|
23908
23908
|
if (token === " ") {
|
|
23909
|
-
return
|
|
23909
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
23910
23910
|
}
|
|
23911
23911
|
tokens1 = _to_consumable_array$1(tokens1).concat([
|
|
23912
23912
|
token
|
|
@@ -23925,7 +23925,7 @@ function indent(str, spaces) {
|
|
|
23925
23925
|
if (contextKeys.some(function(el) {
|
|
23926
23926
|
return el.startsWith(name);
|
|
23927
23927
|
})) {
|
|
23928
|
-
return
|
|
23928
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
23929
23929
|
}
|
|
23930
23930
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23931
23931
|
return el === name;
|
|
@@ -23944,9 +23944,9 @@ function indent(str, spaces) {
|
|
|
23944
23944
|
if (dateTimeIdentifiers.some(function(el) {
|
|
23945
23945
|
return el.startsWith(name);
|
|
23946
23946
|
})) {
|
|
23947
|
-
return
|
|
23947
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, "continue";
|
|
23948
23948
|
}
|
|
23949
|
-
return
|
|
23949
|
+
return nextMatch = nextMatch1, i = i1, tokens = tokens1, {
|
|
23950
23950
|
v: nextMatch1
|
|
23951
23951
|
};
|
|
23952
23952
|
};
|
|
@@ -27835,7 +27835,8 @@ var _globalInstance___DIGIPAIR_CONFIG__;
|
|
|
27835
27835
|
const _config = globalInstance.__DIGIPAIR_CONFIG__ = (_globalInstance___DIGIPAIR_CONFIG__ = globalInstance.__DIGIPAIR_CONFIG__) != null ? _globalInstance___DIGIPAIR_CONFIG__ : {
|
|
27836
27836
|
LIBRARIES: {},
|
|
27837
27837
|
BASE_URL: 'https://cdn.jsdelivr.net/npm',
|
|
27838
|
-
ALIAS: []
|
|
27838
|
+
ALIAS: [],
|
|
27839
|
+
LOGGER: (level, path, message, context, data)=>{}
|
|
27839
27840
|
};
|
|
27840
27841
|
const isRemoteVersion = /^https?:\/\/[^\s/$.?#].[^\s]*$/;
|
|
27841
27842
|
const isPinsSettings = (value)=>{
|
|
@@ -27876,6 +27877,7 @@ const applyTemplate = (value, context)=>{
|
|
|
27876
27877
|
};
|
|
27877
27878
|
const executePins = async (settingsOrigin, context = {})=>{
|
|
27878
27879
|
var _settings_conditions, _settings_conditions1;
|
|
27880
|
+
_config.LOGGER('INFO', context.__PATH__, 'execute:start', context);
|
|
27879
27881
|
let settings = preparePinsSettings(settingsOrigin, context);
|
|
27880
27882
|
const alias = _config.ALIAS.find((alias)=>settings.library.split(':')[0] === alias.name);
|
|
27881
27883
|
const config = context.config || {};
|
|
@@ -27923,6 +27925,7 @@ const executePins = async (settingsOrigin, context = {})=>{
|
|
|
27923
27925
|
}
|
|
27924
27926
|
results.push(itemResult);
|
|
27925
27927
|
}
|
|
27928
|
+
_config.LOGGER('INFO', context.__PATH__, 'execute:end', context, results);
|
|
27926
27929
|
return results;
|
|
27927
27930
|
}
|
|
27928
27931
|
if (typeof ((_settings_conditions1 = settings.conditions) == null ? void 0 : _settings_conditions1.if) !== 'undefined' && !settings.conditions.if) {
|
|
@@ -27935,7 +27938,7 @@ const executePins = async (settingsOrigin, context = {})=>{
|
|
|
27935
27938
|
}
|
|
27936
27939
|
return await pins(settings.properties, settings.pins, context);
|
|
27937
27940
|
};
|
|
27938
|
-
const executePinsList = async (pinsSettingsList, context)=>{
|
|
27941
|
+
const executePinsList = async (pinsSettingsList, context, path = 'root')=>{
|
|
27939
27942
|
let previous = {};
|
|
27940
27943
|
for(let i = 0; i < pinsSettingsList.length; i++){
|
|
27941
27944
|
const settings = pinsSettingsList[i];
|
|
@@ -27945,7 +27948,8 @@ const executePinsList = async (pinsSettingsList, context)=>{
|
|
|
27945
27948
|
parent: {
|
|
27946
27949
|
previous: context.previous,
|
|
27947
27950
|
parent: context.parent
|
|
27948
|
-
}
|
|
27951
|
+
},
|
|
27952
|
+
__PATH__: `${path}[${i}]`
|
|
27949
27953
|
}));
|
|
27950
27954
|
} catch (error) {
|
|
27951
27955
|
if (error === 'DIGIPAIR_CONDITIONS_IF_FALSE') {
|
|
@@ -28371,10 +28375,10 @@ let NotificationService = class NotificationService {
|
|
|
28371
28375
|
async confirm(params, _pinsSettingsList, context) {
|
|
28372
28376
|
const { message, ok = [], ko = [] } = params;
|
|
28373
28377
|
if (!window.confirm(message)) {
|
|
28374
|
-
await executePinsList(ko, context);
|
|
28378
|
+
await executePinsList(ko, context, `${context.__PATH__}.ko`);
|
|
28375
28379
|
return false;
|
|
28376
28380
|
}
|
|
28377
|
-
await executePinsList(ok, context);
|
|
28381
|
+
await executePinsList(ok, context, `${context.__PATH__}.ok`);
|
|
28378
28382
|
return true;
|
|
28379
28383
|
}
|
|
28380
28384
|
async alert(params, _pinsSettingsList, _context) {
|
|
@@ -2,9 +2,10 @@ import { PinsSettings } from './pins-settings.interface';
|
|
|
2
2
|
type CONFIG_KEY = 'BASE_URL' | 'LIBRARIES' | 'ALIAS';
|
|
3
3
|
export declare const config: {
|
|
4
4
|
set: (key: CONFIG_KEY, value: any) => void;
|
|
5
|
+
log: (level: string, path: string, message: string, context: any, data?: any) => any;
|
|
5
6
|
};
|
|
6
7
|
export declare const applyTemplate: (value: any, context: any) => any;
|
|
7
|
-
export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
|
|
8
|
+
export declare const executePinsList: (pinsSettingsList: PinsSettings[], context: any, path?: string) => Promise<any>;
|
|
8
9
|
export declare const generateElementFromPins: (pinsSettings: PinsSettings, parent: Element, context: any, document?: Document, options?: {
|
|
9
10
|
import: boolean;
|
|
10
11
|
}) => Promise<Element | void>;
|