@digipair/skill-web-editor 0.8.13 → 0.8.14
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 +0 -2
- package/index.cjs2.js +27 -537
- package/index.esm.js +1 -1
- package/index.esm2.js +28 -536
- package/libs/skill-web-editor/src/index.d.ts +0 -1
- package/libs/skill-web-editor/src/lib/editor.element.d.ts +2 -3
- package/libs/skill-web-editor/src/lib/skill-web-editor.d.ts +1 -3
- package/package.json +1 -1
package/index.esm2.js
CHANGED
|
@@ -82,7 +82,7 @@ var n$3 = /*#__PURE__*/ function() {
|
|
|
82
82
|
]);
|
|
83
83
|
return n;
|
|
84
84
|
}();
|
|
85
|
-
var r$
|
|
85
|
+
var r$4 = function(t) {
|
|
86
86
|
return new n$3("string" == typeof t ? t : t + "", void 0, s$2);
|
|
87
87
|
}, S$1 = function(s, o) {
|
|
88
88
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
@@ -134,7 +134,7 @@ var r$5 = function(t) {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
return r$
|
|
137
|
+
return r$4(e);
|
|
138
138
|
}(t) : t;
|
|
139
139
|
};
|
|
140
140
|
|
|
@@ -456,7 +456,7 @@ var _Symbol, _a, _a1;
|
|
|
456
456
|
* @license
|
|
457
457
|
* Copyright 2017 Google LLC
|
|
458
458
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
459
|
-
*/ var i$1 = Object.is, e$1 = Object.defineProperty, r$
|
|
459
|
+
*/ var i$1 = Object.is, e$1 = Object.defineProperty, r$3 = Object.getOwnPropertyDescriptor, h$1 = Object.getOwnPropertyNames, o$2 = Object.getOwnPropertySymbols, n$2 = Object.getPrototypeOf, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = function(t, s) {
|
|
460
460
|
return t;
|
|
461
461
|
}, u$1 = {
|
|
462
462
|
toAttribute: function toAttribute(t, s) {
|
|
@@ -858,7 +858,7 @@ var b = /*#__PURE__*/ function(HTMLElement1) {
|
|
|
858
858
|
key: "getPropertyDescriptor",
|
|
859
859
|
value: function getPropertyDescriptor(t, s, i) {
|
|
860
860
|
var _r;
|
|
861
|
-
var _ref = (_r = r$
|
|
861
|
+
var _ref = (_r = r$3(this.prototype, t)) !== null && _r !== void 0 ? _r : {
|
|
862
862
|
get: function get() {
|
|
863
863
|
return this[s];
|
|
864
864
|
},
|
|
@@ -1169,8 +1169,8 @@ var t$1 = globalThis, i = t$1.trustedTypes, s$1 = i ? i.createPolicy("lit-html",
|
|
|
1169
1169
|
createHTML: function(t) {
|
|
1170
1170
|
return t;
|
|
1171
1171
|
}
|
|
1172
|
-
}) : void 0, e = "$lit$", h = "lit$".concat((Math.random() + "").slice(9), "$"), o$1 = "?" + h, n$1 = "<".concat(o$1, ">"), r$
|
|
1173
|
-
return r$
|
|
1172
|
+
}) : void 0, e = "$lit$", h = "lit$".concat((Math.random() + "").slice(9), "$"), o$1 = "?" + h, n$1 = "<".concat(o$1, ">"), r$2 = document, l = function() {
|
|
1173
|
+
return r$2.createComment("");
|
|
1174
1174
|
}, c = function(t) {
|
|
1175
1175
|
return null === t || "object" != typeof t && "function" != typeof t;
|
|
1176
1176
|
}, a = Array.isArray, u = function(t) {
|
|
@@ -1186,7 +1186,7 @@ var t$1 = globalThis, i = t$1.trustedTypes, s$1 = i ? i.createPolicy("lit-html",
|
|
|
1186
1186
|
values: s
|
|
1187
1187
|
};
|
|
1188
1188
|
};
|
|
1189
|
-
}, x = y(1), w = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), A = new WeakMap, E = r$
|
|
1189
|
+
}, x = y(1), w = Symbol.for("lit-noChange"), T = Symbol.for("lit-nothing"), A = new WeakMap, E = r$2.createTreeWalker(r$2, 129);
|
|
1190
1190
|
function C(t, i) {
|
|
1191
1191
|
if (!Array.isArray(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
1192
1192
|
return void 0 !== s$1 ? s$1.createHTML(i) : i;
|
|
@@ -1282,7 +1282,7 @@ var V = /*#__PURE__*/ function() {
|
|
|
1282
1282
|
{
|
|
1283
1283
|
key: "createElement",
|
|
1284
1284
|
value: function createElement(t, i) {
|
|
1285
|
-
var s = r$
|
|
1285
|
+
var s = r$2.createElement("template");
|
|
1286
1286
|
return s.innerHTML = t, s;
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
@@ -1321,7 +1321,7 @@ var S = /*#__PURE__*/ function() {
|
|
|
1321
1321
|
key: "u",
|
|
1322
1322
|
value: function u(t) {
|
|
1323
1323
|
var _t_creationScope;
|
|
1324
|
-
var _this__$AD = this._$AD, _this__$AD_el = _this__$AD.el, i = _this__$AD_el.content, s = _this__$AD.parts, e = ((_t_creationScope = t === null || t === void 0 ? void 0 : t.creationScope) !== null && _t_creationScope !== void 0 ? _t_creationScope : r$
|
|
1324
|
+
var _this__$AD = this._$AD, _this__$AD_el = _this__$AD.el, i = _this__$AD_el.content, s = _this__$AD.parts, e = ((_t_creationScope = t === null || t === void 0 ? void 0 : t.creationScope) !== null && _t_creationScope !== void 0 ? _t_creationScope : r$2).importNode(i, !0);
|
|
1325
1325
|
E.currentNode = e;
|
|
1326
1326
|
var h = E.nextNode(), o = 0, n = 0, l = s[0];
|
|
1327
1327
|
for(; void 0 !== l;){
|
|
@@ -1331,7 +1331,7 @@ var S = /*#__PURE__*/ function() {
|
|
|
1331
1331
|
}
|
|
1332
1332
|
o !== (l === null || l === void 0 ? void 0 : l.index) && (h = E.nextNode(), o++);
|
|
1333
1333
|
}
|
|
1334
|
-
return E.currentNode = r$
|
|
1334
|
+
return E.currentNode = r$2, e;
|
|
1335
1335
|
}
|
|
1336
1336
|
},
|
|
1337
1337
|
{
|
|
@@ -1420,7 +1420,7 @@ var M = /*#__PURE__*/ function() {
|
|
|
1420
1420
|
{
|
|
1421
1421
|
key: "_",
|
|
1422
1422
|
value: function _(t) {
|
|
1423
|
-
this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$
|
|
1423
|
+
this._$AH !== T && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$2.createTextNode(t)), this._$AH = t;
|
|
1424
1424
|
}
|
|
1425
1425
|
},
|
|
1426
1426
|
{
|
|
@@ -1813,8 +1813,8 @@ var _globalThis1;
|
|
|
1813
1813
|
s._$litElement$ = !0, s["finalized"] = !0, (_globalThis_litElementHydrateSupport = (_globalThis = globalThis).litElementHydrateSupport) === null || _globalThis_litElementHydrateSupport === void 0 ? void 0 : _globalThis_litElementHydrateSupport.call(_globalThis, {
|
|
1814
1814
|
LitElement: s
|
|
1815
1815
|
});
|
|
1816
|
-
var r$
|
|
1817
|
-
r$
|
|
1816
|
+
var r$1 = globalThis.litElementPolyfillSupport;
|
|
1817
|
+
r$1 === null || r$1 === void 0 ? void 0 : r$1({
|
|
1818
1818
|
LitElement: s
|
|
1819
1819
|
});
|
|
1820
1820
|
var _litElementVersions;
|
|
@@ -1832,7 +1832,7 @@ var _litElementVersions;
|
|
|
1832
1832
|
};
|
|
1833
1833
|
};
|
|
1834
1834
|
|
|
1835
|
-
function _define_property
|
|
1835
|
+
function _define_property(obj, key, value) {
|
|
1836
1836
|
if (key in obj) {
|
|
1837
1837
|
Object.defineProperty(obj, key, {
|
|
1838
1838
|
value: value,
|
|
@@ -1845,7 +1845,7 @@ function _define_property$1(obj, key, value) {
|
|
|
1845
1845
|
}
|
|
1846
1846
|
return obj;
|
|
1847
1847
|
}
|
|
1848
|
-
function _object_spread
|
|
1848
|
+
function _object_spread(target) {
|
|
1849
1849
|
for(var i = 1; i < arguments.length; i++){
|
|
1850
1850
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
1851
1851
|
var ownKeys = Object.keys(source);
|
|
@@ -1855,12 +1855,12 @@ function _object_spread$1(target) {
|
|
|
1855
1855
|
}));
|
|
1856
1856
|
}
|
|
1857
1857
|
ownKeys.forEach(function(key) {
|
|
1858
|
-
_define_property
|
|
1858
|
+
_define_property(target, key, source[key]);
|
|
1859
1859
|
});
|
|
1860
1860
|
}
|
|
1861
1861
|
return target;
|
|
1862
1862
|
}
|
|
1863
|
-
function ownKeys
|
|
1863
|
+
function ownKeys(object, enumerableOnly) {
|
|
1864
1864
|
var keys = Object.keys(object);
|
|
1865
1865
|
if (Object.getOwnPropertySymbols) {
|
|
1866
1866
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -1873,12 +1873,12 @@ function ownKeys$1(object, enumerableOnly) {
|
|
|
1873
1873
|
}
|
|
1874
1874
|
return keys;
|
|
1875
1875
|
}
|
|
1876
|
-
function _object_spread_props
|
|
1876
|
+
function _object_spread_props(target, source) {
|
|
1877
1877
|
source = source != null ? source : {};
|
|
1878
1878
|
if (Object.getOwnPropertyDescriptors) {
|
|
1879
1879
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1880
1880
|
} else {
|
|
1881
|
-
ownKeys
|
|
1881
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
1882
1882
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1883
1883
|
});
|
|
1884
1884
|
}
|
|
@@ -1894,7 +1894,7 @@ function _object_spread_props$1(target, source) {
|
|
|
1894
1894
|
converter: u$1,
|
|
1895
1895
|
reflect: !1,
|
|
1896
1896
|
hasChanged: f$1
|
|
1897
|
-
}, r
|
|
1897
|
+
}, r = function() {
|
|
1898
1898
|
var _$t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : o, _$e = arguments.length > 1 ? arguments[1] : void 0, r = arguments.length > 2 ? arguments[2] : void 0;
|
|
1899
1899
|
var n = r.kind, i = r.metadata;
|
|
1900
1900
|
var s = globalThis.litPropertyMetadata.get(i);
|
|
@@ -1921,447 +1921,15 @@ function _object_spread_props$1(target, source) {
|
|
|
1921
1921
|
};
|
|
1922
1922
|
function n(t) {
|
|
1923
1923
|
return function(e, o) {
|
|
1924
|
-
return "object" == typeof o ? r
|
|
1924
|
+
return "object" == typeof o ? r(t, e, o) : function(t, e, o) {
|
|
1925
1925
|
var r = e.hasOwnProperty(o);
|
|
1926
|
-
return e.constructor.createProperty(o, r ? _object_spread_props
|
|
1926
|
+
return e.constructor.createProperty(o, r ? _object_spread_props(_object_spread({}, t), {
|
|
1927
1927
|
wrapped: !0
|
|
1928
1928
|
}) : t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
|
|
1929
1929
|
}(t, e, o);
|
|
1930
1930
|
};
|
|
1931
1931
|
}
|
|
1932
1932
|
|
|
1933
|
-
function _define_property(obj, key, value) {
|
|
1934
|
-
if (key in obj) {
|
|
1935
|
-
Object.defineProperty(obj, key, {
|
|
1936
|
-
value: value,
|
|
1937
|
-
enumerable: true,
|
|
1938
|
-
configurable: true,
|
|
1939
|
-
writable: true
|
|
1940
|
-
});
|
|
1941
|
-
} else {
|
|
1942
|
-
obj[key] = value;
|
|
1943
|
-
}
|
|
1944
|
-
return obj;
|
|
1945
|
-
}
|
|
1946
|
-
function _object_spread(target) {
|
|
1947
|
-
for(var i = 1; i < arguments.length; i++){
|
|
1948
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
1949
|
-
var ownKeys = Object.keys(source);
|
|
1950
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1951
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1952
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1953
|
-
}));
|
|
1954
|
-
}
|
|
1955
|
-
ownKeys.forEach(function(key) {
|
|
1956
|
-
_define_property(target, key, source[key]);
|
|
1957
|
-
});
|
|
1958
|
-
}
|
|
1959
|
-
return target;
|
|
1960
|
-
}
|
|
1961
|
-
function ownKeys(object, enumerableOnly) {
|
|
1962
|
-
var keys = Object.keys(object);
|
|
1963
|
-
if (Object.getOwnPropertySymbols) {
|
|
1964
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
1965
|
-
if (enumerableOnly) {
|
|
1966
|
-
symbols = symbols.filter(function(sym) {
|
|
1967
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1968
|
-
});
|
|
1969
|
-
}
|
|
1970
|
-
keys.push.apply(keys, symbols);
|
|
1971
|
-
}
|
|
1972
|
-
return keys;
|
|
1973
|
-
}
|
|
1974
|
-
function _object_spread_props(target, source) {
|
|
1975
|
-
source = source != null ? source : {};
|
|
1976
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
1977
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1978
|
-
} else {
|
|
1979
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
1980
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1981
|
-
});
|
|
1982
|
-
}
|
|
1983
|
-
return target;
|
|
1984
|
-
}
|
|
1985
|
-
/**
|
|
1986
|
-
* @license
|
|
1987
|
-
* Copyright 2017 Google LLC
|
|
1988
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1989
|
-
*/ function r(r) {
|
|
1990
|
-
return n(_object_spread_props(_object_spread({}, r), {
|
|
1991
|
-
state: !0,
|
|
1992
|
-
attribute: !1
|
|
1993
|
-
}));
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
1997
|
-
|
|
1998
|
-
var toastify$1 = {
|
|
1999
|
-
exports: {}
|
|
2000
|
-
};
|
|
2001
|
-
|
|
2002
|
-
(function (module) {
|
|
2003
|
-
function _instanceof(left, right) {
|
|
2004
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
2005
|
-
return !!right[Symbol.hasInstance](left);
|
|
2006
|
-
} else {
|
|
2007
|
-
return left instanceof right;
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
/*!
|
|
2011
|
-
* Toastify js 1.12.0
|
|
2012
|
-
* https://github.com/apvarun/toastify-js
|
|
2013
|
-
* @license MIT licensed
|
|
2014
|
-
*
|
|
2015
|
-
* Copyright (C) 2018 Varun A P
|
|
2016
|
-
*/ (function(root, factory) {
|
|
2017
|
-
if (module.exports) {
|
|
2018
|
-
module.exports = factory();
|
|
2019
|
-
} else {
|
|
2020
|
-
root.Toastify = factory();
|
|
2021
|
-
}
|
|
2022
|
-
})(commonjsGlobal, function(global) {
|
|
2023
|
-
// Object initialization
|
|
2024
|
-
var Toastify = function Toastify1(options) {
|
|
2025
|
-
// Returning a new init object
|
|
2026
|
-
return new Toastify.lib.init(options);
|
|
2027
|
-
}, // Library version
|
|
2028
|
-
version = "1.12.0";
|
|
2029
|
-
// Set the default global options
|
|
2030
|
-
Toastify.defaults = {
|
|
2031
|
-
oldestFirst: true,
|
|
2032
|
-
text: "Toastify is awesome!",
|
|
2033
|
-
node: undefined,
|
|
2034
|
-
duration: 3000,
|
|
2035
|
-
selector: undefined,
|
|
2036
|
-
callback: function callback() {},
|
|
2037
|
-
destination: undefined,
|
|
2038
|
-
newWindow: false,
|
|
2039
|
-
close: false,
|
|
2040
|
-
gravity: "toastify-top",
|
|
2041
|
-
positionLeft: false,
|
|
2042
|
-
position: "",
|
|
2043
|
-
backgroundColor: "",
|
|
2044
|
-
avatar: "",
|
|
2045
|
-
className: "",
|
|
2046
|
-
stopOnFocus: true,
|
|
2047
|
-
onClick: function onClick() {},
|
|
2048
|
-
offset: {
|
|
2049
|
-
x: 0,
|
|
2050
|
-
y: 0
|
|
2051
|
-
},
|
|
2052
|
-
escapeMarkup: true,
|
|
2053
|
-
ariaLive: "polite",
|
|
2054
|
-
style: {
|
|
2055
|
-
background: ""
|
|
2056
|
-
}
|
|
2057
|
-
};
|
|
2058
|
-
// Defining the prototype of the object
|
|
2059
|
-
Toastify.lib = Toastify.prototype = {
|
|
2060
|
-
toastify: version,
|
|
2061
|
-
constructor: Toastify,
|
|
2062
|
-
// Initializing the object with required parameters
|
|
2063
|
-
init: function init(options) {
|
|
2064
|
-
// Verifying and validating the input object
|
|
2065
|
-
if (!options) {
|
|
2066
|
-
options = {};
|
|
2067
|
-
}
|
|
2068
|
-
// Creating the options object
|
|
2069
|
-
this.options = {};
|
|
2070
|
-
this.toastElement = null;
|
|
2071
|
-
// Validating the options
|
|
2072
|
-
this.options.text = options.text || Toastify.defaults.text; // Display message
|
|
2073
|
-
this.options.node = options.node || Toastify.defaults.node; // Display content as node
|
|
2074
|
-
this.options.duration = options.duration === 0 ? 0 : options.duration || Toastify.defaults.duration; // Display duration
|
|
2075
|
-
this.options.selector = options.selector || Toastify.defaults.selector; // Parent selector
|
|
2076
|
-
this.options.callback = options.callback || Toastify.defaults.callback; // Callback after display
|
|
2077
|
-
this.options.destination = options.destination || Toastify.defaults.destination; // On-click destination
|
|
2078
|
-
this.options.newWindow = options.newWindow || Toastify.defaults.newWindow; // Open destination in new window
|
|
2079
|
-
this.options.close = options.close || Toastify.defaults.close; // Show toast close icon
|
|
2080
|
-
this.options.gravity = options.gravity === "bottom" ? "toastify-bottom" : Toastify.defaults.gravity; // toast position - top or bottom
|
|
2081
|
-
this.options.positionLeft = options.positionLeft || Toastify.defaults.positionLeft; // toast position - left or right
|
|
2082
|
-
this.options.position = options.position || Toastify.defaults.position; // toast position - left or right
|
|
2083
|
-
this.options.backgroundColor = options.backgroundColor || Toastify.defaults.backgroundColor; // toast background color
|
|
2084
|
-
this.options.avatar = options.avatar || Toastify.defaults.avatar; // img element src - url or a path
|
|
2085
|
-
this.options.className = options.className || Toastify.defaults.className; // additional class names for the toast
|
|
2086
|
-
this.options.stopOnFocus = options.stopOnFocus === undefined ? Toastify.defaults.stopOnFocus : options.stopOnFocus; // stop timeout on focus
|
|
2087
|
-
this.options.onClick = options.onClick || Toastify.defaults.onClick; // Callback after click
|
|
2088
|
-
this.options.offset = options.offset || Toastify.defaults.offset; // toast offset
|
|
2089
|
-
this.options.escapeMarkup = options.escapeMarkup !== undefined ? options.escapeMarkup : Toastify.defaults.escapeMarkup;
|
|
2090
|
-
this.options.ariaLive = options.ariaLive || Toastify.defaults.ariaLive;
|
|
2091
|
-
this.options.style = options.style || Toastify.defaults.style;
|
|
2092
|
-
if (options.backgroundColor) {
|
|
2093
|
-
this.options.style.background = options.backgroundColor;
|
|
2094
|
-
}
|
|
2095
|
-
// Returning the current object for chaining functions
|
|
2096
|
-
return this;
|
|
2097
|
-
},
|
|
2098
|
-
// Building the DOM element
|
|
2099
|
-
buildToast: function buildToast() {
|
|
2100
|
-
// Validating if the options are defined
|
|
2101
|
-
if (!this.options) {
|
|
2102
|
-
throw "Toastify is not initialized";
|
|
2103
|
-
}
|
|
2104
|
-
// Creating the DOM object
|
|
2105
|
-
var divElement = document.createElement("div");
|
|
2106
|
-
divElement.className = "toastify on " + this.options.className;
|
|
2107
|
-
// Positioning toast to left or right or center
|
|
2108
|
-
if (!!this.options.position) {
|
|
2109
|
-
divElement.className += " toastify-" + this.options.position;
|
|
2110
|
-
} else {
|
|
2111
|
-
// To be depreciated in further versions
|
|
2112
|
-
if (this.options.positionLeft === true) {
|
|
2113
|
-
divElement.className += " toastify-left";
|
|
2114
|
-
console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.");
|
|
2115
|
-
} else {
|
|
2116
|
-
// Default position
|
|
2117
|
-
divElement.className += " toastify-right";
|
|
2118
|
-
}
|
|
2119
|
-
}
|
|
2120
|
-
// Assigning gravity of element
|
|
2121
|
-
divElement.className += " " + this.options.gravity;
|
|
2122
|
-
if (this.options.backgroundColor) {
|
|
2123
|
-
// This is being deprecated in favor of using the style HTML DOM property
|
|
2124
|
-
console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');
|
|
2125
|
-
}
|
|
2126
|
-
// Loop through our style object and apply styles to divElement
|
|
2127
|
-
for(var property in this.options.style){
|
|
2128
|
-
divElement.style[property] = this.options.style[property];
|
|
2129
|
-
}
|
|
2130
|
-
// Announce the toast to screen readers
|
|
2131
|
-
if (this.options.ariaLive) {
|
|
2132
|
-
divElement.setAttribute("aria-live", this.options.ariaLive);
|
|
2133
|
-
}
|
|
2134
|
-
// Adding the toast message/node
|
|
2135
|
-
if (this.options.node && this.options.node.nodeType === Node.ELEMENT_NODE) {
|
|
2136
|
-
// If we have a valid node, we insert it
|
|
2137
|
-
divElement.appendChild(this.options.node);
|
|
2138
|
-
} else {
|
|
2139
|
-
if (this.options.escapeMarkup) {
|
|
2140
|
-
divElement.innerText = this.options.text;
|
|
2141
|
-
} else {
|
|
2142
|
-
divElement.innerHTML = this.options.text;
|
|
2143
|
-
}
|
|
2144
|
-
if (this.options.avatar !== "") {
|
|
2145
|
-
var avatarElement = document.createElement("img");
|
|
2146
|
-
avatarElement.src = this.options.avatar;
|
|
2147
|
-
avatarElement.className = "toastify-avatar";
|
|
2148
|
-
if (this.options.position == "left" || this.options.positionLeft === true) {
|
|
2149
|
-
// Adding close icon on the left of content
|
|
2150
|
-
divElement.appendChild(avatarElement);
|
|
2151
|
-
} else {
|
|
2152
|
-
// Adding close icon on the right of content
|
|
2153
|
-
divElement.insertAdjacentElement("afterbegin", avatarElement);
|
|
2154
|
-
}
|
|
2155
|
-
}
|
|
2156
|
-
}
|
|
2157
|
-
// Adding a close icon to the toast
|
|
2158
|
-
if (this.options.close === true) {
|
|
2159
|
-
// Create a span for close element
|
|
2160
|
-
var closeElement = document.createElement("button");
|
|
2161
|
-
closeElement.type = "button";
|
|
2162
|
-
closeElement.setAttribute("aria-label", "Close");
|
|
2163
|
-
closeElement.className = "toast-close";
|
|
2164
|
-
closeElement.innerHTML = "✖";
|
|
2165
|
-
// Triggering the removal of toast from DOM on close click
|
|
2166
|
-
closeElement.addEventListener("click", (function(event) {
|
|
2167
|
-
event.stopPropagation();
|
|
2168
|
-
this.removeElement(this.toastElement);
|
|
2169
|
-
window.clearTimeout(this.toastElement.timeOutValue);
|
|
2170
|
-
}).bind(this));
|
|
2171
|
-
//Calculating screen width
|
|
2172
|
-
var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
|
|
2173
|
-
// Adding the close icon to the toast element
|
|
2174
|
-
// Display on the right if screen width is less than or equal to 360px
|
|
2175
|
-
if ((this.options.position == "left" || this.options.positionLeft === true) && width > 360) {
|
|
2176
|
-
// Adding close icon on the left of content
|
|
2177
|
-
divElement.insertAdjacentElement("afterbegin", closeElement);
|
|
2178
|
-
} else {
|
|
2179
|
-
// Adding close icon on the right of content
|
|
2180
|
-
divElement.appendChild(closeElement);
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
// Clear timeout while toast is focused
|
|
2184
|
-
if (this.options.stopOnFocus && this.options.duration > 0) {
|
|
2185
|
-
var self = this;
|
|
2186
|
-
// stop countdown
|
|
2187
|
-
divElement.addEventListener("mouseover", function(event) {
|
|
2188
|
-
window.clearTimeout(divElement.timeOutValue);
|
|
2189
|
-
});
|
|
2190
|
-
// add back the timeout
|
|
2191
|
-
divElement.addEventListener("mouseleave", function() {
|
|
2192
|
-
divElement.timeOutValue = window.setTimeout(function() {
|
|
2193
|
-
// Remove the toast from DOM
|
|
2194
|
-
self.removeElement(divElement);
|
|
2195
|
-
}, self.options.duration);
|
|
2196
|
-
});
|
|
2197
|
-
}
|
|
2198
|
-
// Adding an on-click destination path
|
|
2199
|
-
if (typeof this.options.destination !== "undefined") {
|
|
2200
|
-
divElement.addEventListener("click", (function(event) {
|
|
2201
|
-
event.stopPropagation();
|
|
2202
|
-
if (this.options.newWindow === true) {
|
|
2203
|
-
window.open(this.options.destination, "_blank");
|
|
2204
|
-
} else {
|
|
2205
|
-
window.location = this.options.destination;
|
|
2206
|
-
}
|
|
2207
|
-
}).bind(this));
|
|
2208
|
-
}
|
|
2209
|
-
if (typeof this.options.onClick === "function" && typeof this.options.destination === "undefined") {
|
|
2210
|
-
divElement.addEventListener("click", (function(event) {
|
|
2211
|
-
event.stopPropagation();
|
|
2212
|
-
this.options.onClick();
|
|
2213
|
-
}).bind(this));
|
|
2214
|
-
}
|
|
2215
|
-
// Adding offset
|
|
2216
|
-
if (typeof this.options.offset === "object") {
|
|
2217
|
-
var x = getAxisOffsetAValue("x", this.options);
|
|
2218
|
-
var y = getAxisOffsetAValue("y", this.options);
|
|
2219
|
-
var xOffset = this.options.position == "left" ? x : "-" + x;
|
|
2220
|
-
var yOffset = this.options.gravity == "toastify-top" ? y : "-" + y;
|
|
2221
|
-
divElement.style.transform = "translate(" + xOffset + "," + yOffset + ")";
|
|
2222
|
-
}
|
|
2223
|
-
// Returning the generated element
|
|
2224
|
-
return divElement;
|
|
2225
|
-
},
|
|
2226
|
-
// Displaying the toast
|
|
2227
|
-
showToast: function showToast() {
|
|
2228
|
-
// Creating the DOM object for the toast
|
|
2229
|
-
this.toastElement = this.buildToast();
|
|
2230
|
-
// Getting the root element to with the toast needs to be added
|
|
2231
|
-
var rootElement;
|
|
2232
|
-
if (typeof this.options.selector === "string") {
|
|
2233
|
-
rootElement = document.getElementById(this.options.selector);
|
|
2234
|
-
} else if (_instanceof(this.options.selector, HTMLElement) || typeof ShadowRoot !== "undefined" && _instanceof(this.options.selector, ShadowRoot)) {
|
|
2235
|
-
rootElement = this.options.selector;
|
|
2236
|
-
} else {
|
|
2237
|
-
rootElement = document.body;
|
|
2238
|
-
}
|
|
2239
|
-
// Validating if root element is present in DOM
|
|
2240
|
-
if (!rootElement) {
|
|
2241
|
-
throw "Root element is not defined";
|
|
2242
|
-
}
|
|
2243
|
-
// Adding the DOM element
|
|
2244
|
-
var elementToInsert = Toastify.defaults.oldestFirst ? rootElement.firstChild : rootElement.lastChild;
|
|
2245
|
-
rootElement.insertBefore(this.toastElement, elementToInsert);
|
|
2246
|
-
// Repositioning the toasts in case multiple toasts are present
|
|
2247
|
-
Toastify.reposition();
|
|
2248
|
-
if (this.options.duration > 0) {
|
|
2249
|
-
this.toastElement.timeOutValue = window.setTimeout((function() {
|
|
2250
|
-
// Remove the toast from DOM
|
|
2251
|
-
this.removeElement(this.toastElement);
|
|
2252
|
-
}).bind(this), this.options.duration); // Binding `this` for function invocation
|
|
2253
|
-
}
|
|
2254
|
-
// Supporting function chaining
|
|
2255
|
-
return this;
|
|
2256
|
-
},
|
|
2257
|
-
hideToast: function hideToast() {
|
|
2258
|
-
if (this.toastElement.timeOutValue) {
|
|
2259
|
-
clearTimeout(this.toastElement.timeOutValue);
|
|
2260
|
-
}
|
|
2261
|
-
this.removeElement(this.toastElement);
|
|
2262
|
-
},
|
|
2263
|
-
// Removing the element from the DOM
|
|
2264
|
-
removeElement: function removeElement(toastElement) {
|
|
2265
|
-
// Hiding the element
|
|
2266
|
-
// toastElement.classList.remove("on");
|
|
2267
|
-
toastElement.className = toastElement.className.replace(" on", "");
|
|
2268
|
-
// Removing the element from DOM after transition end
|
|
2269
|
-
window.setTimeout((function() {
|
|
2270
|
-
// remove options node if any
|
|
2271
|
-
if (this.options.node && this.options.node.parentNode) {
|
|
2272
|
-
this.options.node.parentNode.removeChild(this.options.node);
|
|
2273
|
-
}
|
|
2274
|
-
// Remove the element from the DOM, only when the parent node was not removed before.
|
|
2275
|
-
if (toastElement.parentNode) {
|
|
2276
|
-
toastElement.parentNode.removeChild(toastElement);
|
|
2277
|
-
}
|
|
2278
|
-
// Calling the callback function
|
|
2279
|
-
this.options.callback.call(toastElement);
|
|
2280
|
-
// Repositioning the toasts again
|
|
2281
|
-
Toastify.reposition();
|
|
2282
|
-
}).bind(this), 400); // Binding `this` for function invocation
|
|
2283
|
-
}
|
|
2284
|
-
};
|
|
2285
|
-
// Positioning the toasts on the DOM
|
|
2286
|
-
Toastify.reposition = function() {
|
|
2287
|
-
// Top margins with gravity
|
|
2288
|
-
var topLeftOffsetSize = {
|
|
2289
|
-
top: 15,
|
|
2290
|
-
bottom: 15
|
|
2291
|
-
};
|
|
2292
|
-
var topRightOffsetSize = {
|
|
2293
|
-
top: 15,
|
|
2294
|
-
bottom: 15
|
|
2295
|
-
};
|
|
2296
|
-
var offsetSize = {
|
|
2297
|
-
top: 15,
|
|
2298
|
-
bottom: 15
|
|
2299
|
-
};
|
|
2300
|
-
// Get all toast messages on the DOM
|
|
2301
|
-
var allToasts = document.getElementsByClassName("toastify");
|
|
2302
|
-
var classUsed;
|
|
2303
|
-
// Modifying the position of each toast element
|
|
2304
|
-
for(var i = 0; i < allToasts.length; i++){
|
|
2305
|
-
// Getting the applied gravity
|
|
2306
|
-
if (containsClass(allToasts[i], "toastify-top") === true) {
|
|
2307
|
-
classUsed = "toastify-top";
|
|
2308
|
-
} else {
|
|
2309
|
-
classUsed = "toastify-bottom";
|
|
2310
|
-
}
|
|
2311
|
-
var height = allToasts[i].offsetHeight;
|
|
2312
|
-
classUsed = classUsed.substr(9, classUsed.length - 1);
|
|
2313
|
-
// Spacing between toasts
|
|
2314
|
-
var offset = 15;
|
|
2315
|
-
var width = window.innerWidth > 0 ? window.innerWidth : screen.width;
|
|
2316
|
-
// Show toast in center if screen with less than or equal to 360px
|
|
2317
|
-
if (width <= 360) {
|
|
2318
|
-
// Setting the position
|
|
2319
|
-
allToasts[i].style[classUsed] = offsetSize[classUsed] + "px";
|
|
2320
|
-
offsetSize[classUsed] += height + offset;
|
|
2321
|
-
} else {
|
|
2322
|
-
if (containsClass(allToasts[i], "toastify-left") === true) {
|
|
2323
|
-
// Setting the position
|
|
2324
|
-
allToasts[i].style[classUsed] = topLeftOffsetSize[classUsed] + "px";
|
|
2325
|
-
topLeftOffsetSize[classUsed] += height + offset;
|
|
2326
|
-
} else {
|
|
2327
|
-
// Setting the position
|
|
2328
|
-
allToasts[i].style[classUsed] = topRightOffsetSize[classUsed] + "px";
|
|
2329
|
-
topRightOffsetSize[classUsed] += height + offset;
|
|
2330
|
-
}
|
|
2331
|
-
}
|
|
2332
|
-
}
|
|
2333
|
-
// Supporting function chaining
|
|
2334
|
-
return this;
|
|
2335
|
-
};
|
|
2336
|
-
// Helper function to get offset.
|
|
2337
|
-
function getAxisOffsetAValue(axis, options) {
|
|
2338
|
-
if (options.offset[axis]) {
|
|
2339
|
-
if (isNaN(options.offset[axis])) {
|
|
2340
|
-
return options.offset[axis];
|
|
2341
|
-
} else {
|
|
2342
|
-
return options.offset[axis] + "px";
|
|
2343
|
-
}
|
|
2344
|
-
}
|
|
2345
|
-
return "0px";
|
|
2346
|
-
}
|
|
2347
|
-
function containsClass(elem, yourClass) {
|
|
2348
|
-
if (!elem || typeof yourClass !== "string") {
|
|
2349
|
-
return false;
|
|
2350
|
-
} else if (elem.className && elem.className.trim().split(/\s+/gi).indexOf(yourClass) > -1) {
|
|
2351
|
-
return true;
|
|
2352
|
-
} else {
|
|
2353
|
-
return false;
|
|
2354
|
-
}
|
|
2355
|
-
}
|
|
2356
|
-
// Setting up the prototype for the init object
|
|
2357
|
-
Toastify.lib.init.prototype = Toastify.lib;
|
|
2358
|
-
// Returning the Toastify function to be assigned to the window object/module
|
|
2359
|
-
return Toastify;
|
|
2360
|
-
});
|
|
2361
|
-
}(toastify$1));
|
|
2362
|
-
|
|
2363
|
-
var toastify = toastify$1.exports;
|
|
2364
|
-
|
|
2365
1933
|
const blocksLegacy = [
|
|
2366
1934
|
{
|
|
2367
1935
|
type: 'object',
|
|
@@ -3074,7 +2642,6 @@ const schemas = {
|
|
|
3074
2642
|
'x-scene-blocks': {}
|
|
3075
2643
|
};
|
|
3076
2644
|
|
|
3077
|
-
const Toastify$1 = toastify;
|
|
3078
2645
|
const BASE_URL = 'https://cdn.jsdelivr.net/npm';
|
|
3079
2646
|
const BLOCKLY_VERSION = '10.4.3';
|
|
3080
2647
|
let jsonGenerator, generateBlocklyBlockFromLibraries, generateToolboxFromLibraries, initializeMutator;
|
|
@@ -3087,11 +2654,6 @@ class EditorElement extends s {
|
|
|
3087
2654
|
this.initialize();
|
|
3088
2655
|
}
|
|
3089
2656
|
async initialize() {
|
|
3090
|
-
const link = document.createElement('link');
|
|
3091
|
-
link.rel = 'stylesheet';
|
|
3092
|
-
link.href = `${BASE_URL}/toastify-js/src/toastify.min.css`;
|
|
3093
|
-
link.type = 'text/css';
|
|
3094
|
-
document.head.appendChild(link);
|
|
3095
2657
|
let script, promise;
|
|
3096
2658
|
script = document.createElement('script');
|
|
3097
2659
|
script.src = `${BASE_URL}/blockly@${BLOCKLY_VERSION}/blockly_compressed.js`;
|
|
@@ -3156,27 +2718,6 @@ class EditorElement extends s {
|
|
|
3156
2718
|
return false;
|
|
3157
2719
|
}
|
|
3158
2720
|
}
|
|
3159
|
-
async saveScene() {
|
|
3160
|
-
if (this.canSave == true) {
|
|
3161
|
-
this.dispatchEvent(new CustomEvent('save', {
|
|
3162
|
-
detail: {
|
|
3163
|
-
digipair: this.digipair.id,
|
|
3164
|
-
reasoning: this.reasoning.id,
|
|
3165
|
-
value: this.codeInWorkspace
|
|
3166
|
-
}
|
|
3167
|
-
}));
|
|
3168
|
-
} else {
|
|
3169
|
-
Toastify$1({
|
|
3170
|
-
text: 'Your scene cannot be saved, invalid format',
|
|
3171
|
-
position: 'center',
|
|
3172
|
-
style: {
|
|
3173
|
-
'font-family': '"Poppins", sans-serif',
|
|
3174
|
-
background: 'linear-gradient(90deg, rgba(121,9,9,1) 0%, rgba(203,62,62,1) 100%)'
|
|
3175
|
-
},
|
|
3176
|
-
duration: 3000
|
|
3177
|
-
}).showToast();
|
|
3178
|
-
}
|
|
3179
|
-
}
|
|
3180
2721
|
loadBlockly(scene) {
|
|
3181
2722
|
var _this_librariesToLoad_find_xsceneblocks_, _this_librariesToLoad_find_xsceneblocks, _this_librariesToLoad_find;
|
|
3182
2723
|
initializeMutator();
|
|
@@ -3301,29 +2842,6 @@ class EditorElement extends s {
|
|
|
3301
2842
|
fill: #fff;
|
|
3302
2843
|
}
|
|
3303
2844
|
</style>
|
|
3304
|
-
|
|
3305
|
-
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
|
|
3306
|
-
<div>
|
|
3307
|
-
<div style=${this.contentStyle} data-scene></div>
|
|
3308
|
-
<div
|
|
3309
|
-
style ="position: absolute;
|
|
3310
|
-
top: 24px;
|
|
3311
|
-
right: 24px;
|
|
3312
|
-
border-radius: 100%;
|
|
3313
|
-
color: #52DFDB;
|
|
3314
|
-
width: 56px;
|
|
3315
|
-
height: 56px;
|
|
3316
|
-
line-height: 56px;
|
|
3317
|
-
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
|
3318
|
-
transition: box-shadow 0.3s ease-in-out;
|
|
3319
|
-
text-align: center;
|
|
3320
|
-
font-weight: 500;
|
|
3321
|
-
background-color:${this.canSave ? '#242E3B' : '#5F5F5F'} ;
|
|
3322
|
-
cursor: pointer;"
|
|
3323
|
-
class="material-icons"
|
|
3324
|
-
aria-hidden="true"
|
|
3325
|
-
@click=${()=>this.saveScene()}>save</div>
|
|
3326
|
-
</div>
|
|
3327
2845
|
</div>
|
|
3328
2846
|
`;
|
|
3329
2847
|
}
|
|
@@ -3353,40 +2871,14 @@ __decorate([
|
|
|
3353
2871
|
n()
|
|
3354
2872
|
], EditorElement.prototype, "contentStyle", void 0);
|
|
3355
2873
|
__decorate([
|
|
3356
|
-
|
|
2874
|
+
n()
|
|
3357
2875
|
], EditorElement.prototype, "canSave", void 0);
|
|
2876
|
+
__decorate([
|
|
2877
|
+
n(),
|
|
2878
|
+
__metadata("design:type", Object)
|
|
2879
|
+
], EditorElement.prototype, "codeInWorkspace", void 0);
|
|
3358
2880
|
EditorElement = __decorate([
|
|
3359
2881
|
t('digipair-editor')
|
|
3360
2882
|
], EditorElement);
|
|
3361
2883
|
|
|
3362
|
-
|
|
3363
|
-
let EditorService = class EditorService {
|
|
3364
|
-
async information(params, _pinsSettingsList, _context) {
|
|
3365
|
-
const { message } = params;
|
|
3366
|
-
Toastify({
|
|
3367
|
-
text: message,
|
|
3368
|
-
position: 'center',
|
|
3369
|
-
style: {
|
|
3370
|
-
'font-family': '"Poppins", sans-serif',
|
|
3371
|
-
background: '#52DFDB'
|
|
3372
|
-
},
|
|
3373
|
-
duration: 3000
|
|
3374
|
-
}).showToast();
|
|
3375
|
-
}
|
|
3376
|
-
async error(params, _pinsSettingsList, _context) {
|
|
3377
|
-
const { message } = params;
|
|
3378
|
-
Toastify({
|
|
3379
|
-
text: message,
|
|
3380
|
-
position: 'center',
|
|
3381
|
-
style: {
|
|
3382
|
-
'font-family': '"Poppins", sans-serif',
|
|
3383
|
-
background: 'linear-gradient(90deg, rgba(121,9,9,1) 0%, rgba(203,62,62,1) 100%)'
|
|
3384
|
-
},
|
|
3385
|
-
duration: 3000
|
|
3386
|
-
}).showToast();
|
|
3387
|
-
}
|
|
3388
|
-
};
|
|
3389
|
-
const information = (params, pinsSettingsList, context)=>new EditorService().information(params, pinsSettingsList, context);
|
|
3390
|
-
const error = (params, pinsSettingsList, context)=>new EditorService().error(params, pinsSettingsList, context);
|
|
3391
|
-
|
|
3392
|
-
export { EditorElement as E, _extends as _, error as e, information as i };
|
|
2884
|
+
export { EditorElement as E, _extends as _ };
|