@3t-transform/threeteeui 0.2.78 → 0.2.80
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/cjs/{domsanitiser.options-1dfa7205.js → domsanitiser.options-32e670aa.js} +115 -75
- package/dist/cjs/tttx-dialog-box.cjs.entry.js +1 -1
- package/dist/cjs/tttx-form.cjs.entry.js +1 -1
- package/dist/cjs/tttx-list.cjs.entry.js +1 -1
- package/dist/cjs/tttx-multiselect-box.cjs.entry.js +1 -1
- package/dist/cjs/tttx-select-box.cjs.entry.js +1 -1
- package/dist/cjs/tttx-tabs.cjs.entry.js +1 -1
- package/dist/cjs/tttx-textarea.cjs.entry.js +1 -1
- package/dist/cjs/tttx-tree-view.cjs.entry.js +1 -1
- package/dist/collection/components/molecules/tttx-textarea/tttx-textarea.css +20 -11
- package/dist/components/domsanitiser.options.js +115 -75
- package/dist/components/tttx-textarea.js +1 -1
- package/dist/esm/{domsanitiser.options-97a33389.js → domsanitiser.options-68752a19.js} +115 -75
- package/dist/esm/tttx-dialog-box.entry.js +1 -1
- package/dist/esm/tttx-form.entry.js +1 -1
- package/dist/esm/tttx-list.entry.js +1 -1
- package/dist/esm/tttx-multiselect-box.entry.js +1 -1
- package/dist/esm/tttx-select-box.entry.js +1 -1
- package/dist/esm/tttx-tabs.entry.js +1 -1
- package/dist/esm/tttx-textarea.entry.js +1 -1
- package/dist/esm/tttx-tree-view.entry.js +1 -1
- package/dist/tttx/{p-f34bface.entry.js → p-02da8327.entry.js} +1 -1
- package/dist/tttx/{p-b30a1025.entry.js → p-1c3ab606.entry.js} +1 -1
- package/dist/tttx/{p-5f1f699d.entry.js → p-4a967804.entry.js} +1 -1
- package/dist/tttx/p-55831705.entry.js +1 -0
- package/dist/tttx/{p-75c31e23.entry.js → p-6e23f980.entry.js} +1 -1
- package/dist/tttx/p-88ee2406.js +3 -0
- package/dist/tttx/{p-129df5a2.entry.js → p-9556a164.entry.js} +1 -1
- package/dist/tttx/{p-887f56cb.entry.js → p-a3b446f8.entry.js} +1 -1
- package/dist/tttx/{p-67c342d7.entry.js → p-f4594fe2.entry.js} +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/package.json +1 -1
- package/dist/tttx/p-5ed38d61.js +0 -3
- package/dist/tttx/p-9c3f730f.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-9943807e.js';
|
|
2
2
|
|
|
3
3
|
var purify = createCommonjsModule(function (module, exports) {
|
|
4
|
-
/*! @license DOMPurify 3.0.
|
|
4
|
+
/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */
|
|
5
5
|
|
|
6
6
|
(function (global, factory) {
|
|
7
7
|
module.exports = factory() ;
|
|
@@ -24,12 +24,6 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
24
24
|
construct
|
|
25
25
|
} = typeof Reflect !== 'undefined' && Reflect;
|
|
26
26
|
|
|
27
|
-
if (!apply) {
|
|
28
|
-
apply = function apply(fun, thisValue, args) {
|
|
29
|
-
return fun.apply(thisValue, args);
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
27
|
if (!freeze) {
|
|
34
28
|
freeze = function freeze(x) {
|
|
35
29
|
return x;
|
|
@@ -42,6 +36,12 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
42
36
|
};
|
|
43
37
|
}
|
|
44
38
|
|
|
39
|
+
if (!apply) {
|
|
40
|
+
apply = function apply(fun, thisValue, args) {
|
|
41
|
+
return fun.apply(thisValue, args);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
45
|
if (!construct) {
|
|
46
46
|
construct = function construct(Func, args) {
|
|
47
47
|
return new Func(...args);
|
|
@@ -59,6 +59,13 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
59
59
|
const stringTrim = unapply(String.prototype.trim);
|
|
60
60
|
const regExpTest = unapply(RegExp.prototype.test);
|
|
61
61
|
const typeErrorCreate = unconstruct(TypeError);
|
|
62
|
+
/**
|
|
63
|
+
* Creates a new function that calls the given function with a specified thisArg and arguments.
|
|
64
|
+
*
|
|
65
|
+
* @param {Function} func - The function to be wrapped and called.
|
|
66
|
+
* @returns {Function} A new function that calls the given function with a specified thisArg and arguments.
|
|
67
|
+
*/
|
|
68
|
+
|
|
62
69
|
function unapply(func) {
|
|
63
70
|
return function (thisArg) {
|
|
64
71
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
@@ -68,6 +75,14 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
68
75
|
return apply(func, thisArg, args);
|
|
69
76
|
};
|
|
70
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates a new function that constructs an instance of the given constructor function with the provided arguments.
|
|
80
|
+
*
|
|
81
|
+
* @param {Function} func - The constructor function to be wrapped and called.
|
|
82
|
+
* @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
|
|
71
86
|
function unconstruct(func) {
|
|
72
87
|
return function () {
|
|
73
88
|
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
@@ -77,12 +92,18 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
77
92
|
return construct(func, args);
|
|
78
93
|
};
|
|
79
94
|
}
|
|
80
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Add properties to a lookup table
|
|
97
|
+
*
|
|
98
|
+
* @param {Object} set - The set to which elements will be added.
|
|
99
|
+
* @param {Array} array - The array containing elements to be added to the set.
|
|
100
|
+
* @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.
|
|
101
|
+
* @returns {Object} The modified set with added elements.
|
|
102
|
+
*/
|
|
81
103
|
|
|
82
|
-
function addToSet(set, array, transformCaseFunc) {
|
|
83
|
-
var _transformCaseFunc;
|
|
84
104
|
|
|
85
|
-
|
|
105
|
+
function addToSet(set, array) {
|
|
106
|
+
let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;
|
|
86
107
|
|
|
87
108
|
if (setPrototypeOf) {
|
|
88
109
|
// Make 'in' and truthy checks like Boolean(set.constructor)
|
|
@@ -114,19 +135,32 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
114
135
|
|
|
115
136
|
return set;
|
|
116
137
|
}
|
|
117
|
-
|
|
138
|
+
/**
|
|
139
|
+
* Shallow clone an object
|
|
140
|
+
*
|
|
141
|
+
* @param {Object} object - The object to be cloned.
|
|
142
|
+
* @returns {Object} A new object that copies the original.
|
|
143
|
+
*/
|
|
144
|
+
|
|
118
145
|
|
|
119
146
|
function clone(object) {
|
|
120
147
|
const newObject = create(null);
|
|
121
148
|
|
|
122
149
|
for (const [property, value] of entries(object)) {
|
|
123
|
-
|
|
150
|
+
if (getOwnPropertyDescriptor(object, property) !== undefined) {
|
|
151
|
+
newObject[property] = value;
|
|
152
|
+
}
|
|
124
153
|
}
|
|
125
154
|
|
|
126
155
|
return newObject;
|
|
127
156
|
}
|
|
128
|
-
|
|
129
|
-
* or getter and behaves accordingly.
|
|
157
|
+
/**
|
|
158
|
+
* This method automatically checks if the prop is function or getter and behaves accordingly.
|
|
159
|
+
*
|
|
160
|
+
* @param {Object} object - The object to look up the getter function in its prototype chain.
|
|
161
|
+
* @param {String} prop - The property name for which to find the getter function.
|
|
162
|
+
* @returns {Function} The getter function found in the prototype chain or a fallback function.
|
|
163
|
+
*/
|
|
130
164
|
|
|
131
165
|
function lookupGetter(object, prop) {
|
|
132
166
|
while (object !== null) {
|
|
@@ -201,7 +235,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
201
235
|
DOCTYPE_NAME: DOCTYPE_NAME
|
|
202
236
|
});
|
|
203
237
|
|
|
204
|
-
const getGlobal = ()
|
|
238
|
+
const getGlobal = function getGlobal() {
|
|
239
|
+
return typeof window === 'undefined' ? null : window;
|
|
240
|
+
};
|
|
205
241
|
/**
|
|
206
242
|
* Creates a no-op policy for internal use only.
|
|
207
243
|
* Don't export this function outside this module!
|
|
@@ -259,7 +295,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
259
295
|
*/
|
|
260
296
|
|
|
261
297
|
|
|
262
|
-
DOMPurify.version = '3.0.
|
|
298
|
+
DOMPurify.version = '3.0.6';
|
|
263
299
|
/**
|
|
264
300
|
* Array of elements that DOMPurify removed during sanitation.
|
|
265
301
|
* Empty if nothing was removed.
|
|
@@ -274,11 +310,11 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
274
310
|
return DOMPurify;
|
|
275
311
|
}
|
|
276
312
|
|
|
277
|
-
const originalDocument = window.document;
|
|
278
|
-
const currentScript = originalDocument.currentScript;
|
|
279
313
|
let {
|
|
280
314
|
document
|
|
281
315
|
} = window;
|
|
316
|
+
const originalDocument = document;
|
|
317
|
+
const currentScript = originalDocument.currentScript;
|
|
282
318
|
const {
|
|
283
319
|
DocumentFragment,
|
|
284
320
|
HTMLTemplateElement,
|
|
@@ -358,7 +394,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
358
394
|
* @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.
|
|
359
395
|
*/
|
|
360
396
|
|
|
361
|
-
let CUSTOM_ELEMENT_HANDLING = Object.seal(
|
|
397
|
+
let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
|
|
362
398
|
tagNameCheck: {
|
|
363
399
|
writable: true,
|
|
364
400
|
configurable: false,
|
|
@@ -482,10 +518,10 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
482
518
|
const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);
|
|
483
519
|
/* Parsing of strict XHTML documents */
|
|
484
520
|
|
|
485
|
-
let PARSER_MEDIA_TYPE;
|
|
521
|
+
let PARSER_MEDIA_TYPE = null;
|
|
486
522
|
const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];
|
|
487
523
|
const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';
|
|
488
|
-
let transformCaseFunc;
|
|
524
|
+
let transformCaseFunc = null;
|
|
489
525
|
/* Keep a reference to config to pass to hooks */
|
|
490
526
|
|
|
491
527
|
let CONFIG = null;
|
|
@@ -506,7 +542,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
506
542
|
// eslint-disable-next-line complexity
|
|
507
543
|
|
|
508
544
|
|
|
509
|
-
const _parseConfig = function _parseConfig(
|
|
545
|
+
const _parseConfig = function _parseConfig() {
|
|
546
|
+
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
547
|
+
|
|
510
548
|
if (CONFIG && CONFIG === cfg) {
|
|
511
549
|
return;
|
|
512
550
|
}
|
|
@@ -725,8 +763,6 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
725
763
|
const ALL_MATHML_TAGS = addToSet({}, mathMl$1);
|
|
726
764
|
addToSet(ALL_MATHML_TAGS, mathMlDisallowed);
|
|
727
765
|
/**
|
|
728
|
-
*
|
|
729
|
-
*
|
|
730
766
|
* @param {Element} element a DOM element whose namespace is being checked
|
|
731
767
|
* @returns {boolean} Return false if the element has a
|
|
732
768
|
* namespace that a spec-compliant parser would never
|
|
@@ -882,8 +918,8 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
882
918
|
|
|
883
919
|
const _initDocument = function _initDocument(dirty) {
|
|
884
920
|
/* Create a HTML document */
|
|
885
|
-
let doc;
|
|
886
|
-
let leadingWhitespace;
|
|
921
|
+
let doc = null;
|
|
922
|
+
let leadingWhitespace = null;
|
|
887
923
|
|
|
888
924
|
if (FORCE_BODY) {
|
|
889
925
|
dirty = '<remove></remove>' + dirty;
|
|
@@ -936,16 +972,16 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
936
972
|
return WHOLE_DOCUMENT ? doc.documentElement : body;
|
|
937
973
|
};
|
|
938
974
|
/**
|
|
939
|
-
*
|
|
975
|
+
* Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
|
|
940
976
|
*
|
|
941
|
-
* @param {
|
|
942
|
-
* @return {
|
|
977
|
+
* @param {Node} root The root element or node to start traversing on.
|
|
978
|
+
* @return {NodeIterator} The created NodeIterator
|
|
943
979
|
*/
|
|
944
980
|
|
|
945
981
|
|
|
946
|
-
const
|
|
982
|
+
const _createNodeIterator = function _createNodeIterator(root) {
|
|
947
983
|
return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise
|
|
948
|
-
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null
|
|
984
|
+
NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null);
|
|
949
985
|
};
|
|
950
986
|
/**
|
|
951
987
|
* _isClobbered
|
|
@@ -959,15 +995,15 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
959
995
|
return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');
|
|
960
996
|
};
|
|
961
997
|
/**
|
|
962
|
-
*
|
|
998
|
+
* Checks whether the given object is a DOM node.
|
|
963
999
|
*
|
|
964
|
-
* @param {Node}
|
|
1000
|
+
* @param {Node} object object to check whether it's a DOM node
|
|
965
1001
|
* @return {Boolean} true is object is a DOM node
|
|
966
1002
|
*/
|
|
967
1003
|
|
|
968
1004
|
|
|
969
1005
|
const _isNode = function _isNode(object) {
|
|
970
|
-
return typeof Node === '
|
|
1006
|
+
return typeof Node === 'function' && object instanceof Node;
|
|
971
1007
|
};
|
|
972
1008
|
/**
|
|
973
1009
|
* _executeHook
|
|
@@ -1001,7 +1037,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1001
1037
|
|
|
1002
1038
|
|
|
1003
1039
|
const _sanitizeElements = function _sanitizeElements(currentNode) {
|
|
1004
|
-
let content;
|
|
1040
|
+
let content = null;
|
|
1005
1041
|
/* Execute a hook if present */
|
|
1006
1042
|
|
|
1007
1043
|
_executeHook('beforeSanitizeElements', currentNode, null);
|
|
@@ -1026,7 +1062,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1026
1062
|
/* Detect mXSS attempts abusing namespace confusion */
|
|
1027
1063
|
|
|
1028
1064
|
|
|
1029
|
-
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) &&
|
|
1065
|
+
if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\w]/g, currentNode.innerHTML) && regExpTest(/<[/\w]/g, currentNode.textContent)) {
|
|
1030
1066
|
_forceRemove(currentNode);
|
|
1031
1067
|
|
|
1032
1068
|
return true;
|
|
@@ -1036,9 +1072,14 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1036
1072
|
|
|
1037
1073
|
if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
|
|
1038
1074
|
/* Check if we have a custom element to handle */
|
|
1039
|
-
if (!FORBID_TAGS[tagName] &&
|
|
1040
|
-
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName))
|
|
1041
|
-
|
|
1075
|
+
if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {
|
|
1076
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {
|
|
1077
|
+
return false;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {
|
|
1081
|
+
return false;
|
|
1082
|
+
}
|
|
1042
1083
|
}
|
|
1043
1084
|
/* Keep content except for bad-listed elements */
|
|
1044
1085
|
|
|
@@ -1082,9 +1123,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1082
1123
|
if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {
|
|
1083
1124
|
/* Get the element's text content */
|
|
1084
1125
|
content = currentNode.textContent;
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1126
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
|
1127
|
+
content = stringReplace(content, expr, ' ');
|
|
1128
|
+
});
|
|
1088
1129
|
|
|
1089
1130
|
if (currentNode.textContent !== content) {
|
|
1090
1131
|
arrayPush(DOMPurify.removed, {
|
|
@@ -1126,7 +1167,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1126
1167
|
if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND
|
|
1127
1168
|
// b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1128
1169
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
1129
|
-
|
|
1170
|
+
_isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
1130
1171
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
1131
1172
|
lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {
|
|
1132
1173
|
return false;
|
|
@@ -1140,14 +1181,16 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1140
1181
|
return true;
|
|
1141
1182
|
};
|
|
1142
1183
|
/**
|
|
1143
|
-
*
|
|
1184
|
+
* _isBasicCustomElement
|
|
1144
1185
|
* checks if at least one dash is included in tagName, and it's not the first char
|
|
1145
1186
|
* for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
|
|
1187
|
+
*
|
|
1146
1188
|
* @param {string} tagName name of the tag of the node to sanitize
|
|
1189
|
+
* @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
|
|
1147
1190
|
*/
|
|
1148
1191
|
|
|
1149
1192
|
|
|
1150
|
-
const
|
|
1193
|
+
const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
|
|
1151
1194
|
return tagName.indexOf('-') > 0;
|
|
1152
1195
|
};
|
|
1153
1196
|
/**
|
|
@@ -1163,12 +1206,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1163
1206
|
|
|
1164
1207
|
|
|
1165
1208
|
const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {
|
|
1166
|
-
let attr;
|
|
1167
|
-
let value;
|
|
1168
|
-
let lcName;
|
|
1169
|
-
let l;
|
|
1170
1209
|
/* Execute a hook if present */
|
|
1171
|
-
|
|
1172
1210
|
_executeHook('beforeSanitizeAttributes', currentNode, null);
|
|
1173
1211
|
|
|
1174
1212
|
const {
|
|
@@ -1186,17 +1224,18 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1186
1224
|
keepAttr: true,
|
|
1187
1225
|
allowedAttributes: ALLOWED_ATTR
|
|
1188
1226
|
};
|
|
1189
|
-
l = attributes.length;
|
|
1227
|
+
let l = attributes.length;
|
|
1190
1228
|
/* Go backwards over all attributes; safely remove bad ones */
|
|
1191
1229
|
|
|
1192
1230
|
while (l--) {
|
|
1193
|
-
attr = attributes[l];
|
|
1231
|
+
const attr = attributes[l];
|
|
1194
1232
|
const {
|
|
1195
1233
|
name,
|
|
1196
|
-
namespaceURI
|
|
1234
|
+
namespaceURI,
|
|
1235
|
+
value: attrValue
|
|
1197
1236
|
} = attr;
|
|
1198
|
-
|
|
1199
|
-
|
|
1237
|
+
const lcName = transformCaseFunc(name);
|
|
1238
|
+
let value = name === 'value' ? attrValue : stringTrim(attrValue);
|
|
1200
1239
|
/* Execute a hook if present */
|
|
1201
1240
|
|
|
1202
1241
|
hookEvent.attrName = lcName;
|
|
@@ -1234,9 +1273,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1234
1273
|
|
|
1235
1274
|
|
|
1236
1275
|
if (SAFE_FOR_TEMPLATES) {
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1276
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
|
1277
|
+
value = stringReplace(value, expr, ' ');
|
|
1278
|
+
});
|
|
1240
1279
|
}
|
|
1241
1280
|
/* Is `value` valid for this attribute? */
|
|
1242
1281
|
|
|
@@ -1305,9 +1344,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1305
1344
|
|
|
1306
1345
|
|
|
1307
1346
|
const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {
|
|
1308
|
-
let shadowNode;
|
|
1347
|
+
let shadowNode = null;
|
|
1309
1348
|
|
|
1310
|
-
const shadowIterator =
|
|
1349
|
+
const shadowIterator = _createNodeIterator(fragment);
|
|
1311
1350
|
/* Execute a hook if present */
|
|
1312
1351
|
|
|
1313
1352
|
|
|
@@ -1343,17 +1382,17 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1343
1382
|
* Public method providing core sanitation functionality
|
|
1344
1383
|
*
|
|
1345
1384
|
* @param {String|Node} dirty string or DOM node
|
|
1346
|
-
* @param {Object}
|
|
1385
|
+
* @param {Object} cfg object
|
|
1347
1386
|
*/
|
|
1348
1387
|
// eslint-disable-next-line complexity
|
|
1349
1388
|
|
|
1350
1389
|
|
|
1351
1390
|
DOMPurify.sanitize = function (dirty) {
|
|
1352
1391
|
let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
1353
|
-
let body;
|
|
1354
|
-
let importedNode;
|
|
1355
|
-
let currentNode;
|
|
1356
|
-
let returnNode;
|
|
1392
|
+
let body = null;
|
|
1393
|
+
let importedNode = null;
|
|
1394
|
+
let currentNode = null;
|
|
1395
|
+
let returnNode = null;
|
|
1357
1396
|
/* Make sure we have a string to sanitize.
|
|
1358
1397
|
DO NOT return early, as this will return the wrong type if
|
|
1359
1398
|
the user has requested a DOM object rather than a string */
|
|
@@ -1448,7 +1487,7 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1448
1487
|
/* Get node iterator */
|
|
1449
1488
|
|
|
1450
1489
|
|
|
1451
|
-
const nodeIterator =
|
|
1490
|
+
const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);
|
|
1452
1491
|
/* Now start iterating over the created document */
|
|
1453
1492
|
|
|
1454
1493
|
|
|
@@ -1513,9 +1552,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1513
1552
|
|
|
1514
1553
|
|
|
1515
1554
|
if (SAFE_FOR_TEMPLATES) {
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1555
|
+
arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {
|
|
1556
|
+
serializedHTML = stringReplace(serializedHTML, expr, ' ');
|
|
1557
|
+
});
|
|
1519
1558
|
}
|
|
1520
1559
|
|
|
1521
1560
|
return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;
|
|
@@ -1528,7 +1567,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1528
1567
|
*/
|
|
1529
1568
|
|
|
1530
1569
|
|
|
1531
|
-
DOMPurify.setConfig = function (
|
|
1570
|
+
DOMPurify.setConfig = function () {
|
|
1571
|
+
let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1572
|
+
|
|
1532
1573
|
_parseConfig(cfg);
|
|
1533
1574
|
|
|
1534
1575
|
SET_CONFIG = true;
|
|
@@ -1549,9 +1590,9 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1549
1590
|
* Uses last set config, if any. Otherwise, uses config defaults.
|
|
1550
1591
|
* isValidAttribute
|
|
1551
1592
|
*
|
|
1552
|
-
* @param {
|
|
1553
|
-
* @param {
|
|
1554
|
-
* @param {
|
|
1593
|
+
* @param {String} tag Tag name of containing element.
|
|
1594
|
+
* @param {String} attr Attribute name.
|
|
1595
|
+
* @param {String} value Attribute value.
|
|
1555
1596
|
* @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.
|
|
1556
1597
|
*/
|
|
1557
1598
|
|
|
@@ -1614,7 +1655,6 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1614
1655
|
/**
|
|
1615
1656
|
* RemoveAllHooks
|
|
1616
1657
|
* Public method to remove all DOMPurify hooks
|
|
1617
|
-
*
|
|
1618
1658
|
*/
|
|
1619
1659
|
|
|
1620
1660
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-6a372ea6.js';
|
|
2
|
-
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-
|
|
2
|
+
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-68752a19.js';
|
|
3
3
|
import './_commonjsHelpers-9943807e.js';
|
|
4
4
|
|
|
5
5
|
const tttxDialogBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}h3{margin-block-start:0em;margin-block-end:0em}.dialog-box{background-color:#ffffff;border:1px solid #d5d5d5;border-radius:4px;box-shadow:0px 1px 5px #1111114d;padding:0}.overflow-visible{overflow:visible}.overflow-hidden{overflow:hidden}dialog::backdrop{background-color:#75757580}.dialog-box.small{width:400px;min-height:200px}.dialog-box.regular{width:600px;min-height:200px}.dialog-box.large{width:900px;min-height:200px}.dialog-box.mobile{max-width:424px;width:calc(100vw - 20px)}.dialog-box-clickable{cursor:pointer}.contents{display:flex;flex-direction:column;min-height:inherit}.dialog-box-padding{padding:8px 16px}.dialog-box-align-right{margin-left:auto;display:flex}.dialog-box-header-box{border-bottom:1px solid #d5d5d5;display:flex;flex-direction:row;height:36px}.dialog-box-header{display:flex;align-items:center;width:100%}.dialog-box-title{font-size:18;font-weight:500;font-family:\"Roboto\", serif}.dialog-box-icon{padding-right:8px;width:24px;height:24px}.dialog-box-icon-close{margin-left:auto;padding-top:3px;width:24px;height:24px}.dialog-box-content{font-size:16;font-weight:400;font-family:\"Roboto\", serif}.dialog-box-body{text-overflow:ellipsis}.dialog-box-body-box{padding:16px}.dialog-box-footer-box{display:flex;flex-direction:row;margin-top:auto;border-top:1px solid #d5d5d5;height:36px}.dialog-box-footer{display:flex;align-items:center;width:100%}.dialog-box-spacing-button{margin-right:8px}.dialog-box-header-box.info{border-bottom:1px solid #1479c6}.dialog-box-header-box.success{border-bottom:1px solid #a2bb31}.dialog-box-header-box.warning{border-bottom:1px solid #f59500}.dialog-box-header-box.critical{border-bottom:1px solid #dc0000}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-6a372ea6.js';
|
|
2
|
-
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-
|
|
2
|
+
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-68752a19.js';
|
|
3
3
|
import './_commonjsHelpers-9943807e.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-6a372ea6.js';
|
|
2
|
-
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-
|
|
2
|
+
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-68752a19.js';
|
|
3
3
|
import './_commonjsHelpers-9943807e.js';
|
|
4
4
|
|
|
5
5
|
const tttxListCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.material-symbols-rounded{font-family:\"Material Symbols Rounded\", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}:host{display:flex;flex-direction:column}.list{margin:0;padding:0}li{display:flex;align-items:flex-start}li.item{list-style:none;margin:0;padding:8px;border-bottom:1px solid #d5d5d5;min-height:36px}li.item:first-of-type{border-top:1px solid #d5d5d5}li.item.clickable:hover{cursor:pointer}li.item.toggleable:hover{cursor:pointer}li.item.active{background-color:rgba(17, 17, 17, 0.1)}li.item.active:hover{background-color:rgba(17, 17, 17, 0.15)}li.item.selected{background-color:#ebfbfc}li.item.selected:hover{background-color:#e0f8f9}li.item.selected.active{background-color:#ccf3f6}li.item.selected.active:hover{background-color:#bff0f3}li.item .icons{display:flex;justify-content:flex-end;flex-grow:1;align-items:center;height:36px}li.item .icons tttx-icon:hover{cursor:pointer}li.item .icons *{display:flex}li.item:hover{background-color:rgba(17, 17, 17, 0.05)}.align-right{margin-left:auto}.item-content{display:flex;align-items:center;flex-grow:2;min-height:36px}.checkbox{padding:6px;margin-left:-8px}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-6a372ea6.js';
|
|
2
|
-
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-
|
|
2
|
+
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-68752a19.js';
|
|
3
3
|
import './_commonjsHelpers-9943807e.js';
|
|
4
4
|
|
|
5
5
|
const tttxMultiselectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}.label{font-size:16px;font-style:normal;font-weight:500;line-height:normal}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{display:grid;position:relative;display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border-radius:4px;background-color:white}.dropdown-selector{grid-row:1;align-items:center;gap:8px;padding:6px 8px 6px 16px;cursor:pointer;border:1px solid #d5d5d5}.dropdown-selector-chevron{margin-left:auto;height:24px}.dropdown-selector-chevron>tttx-icon{cursor:pointer}.dropdown-selector-html-content{display:flex;gap:8px;flex-wrap:wrap}.dropdown-body-container{grid-row:2;position:relative}.dropdown-body{position:absolute;display:flex;position:absolute;flex-direction:column;box-shadow:0px 1px 5px #1111114D;padding-bottom:8px;border:1px solid #d5d5d5;width:100%}.dropdown-options-list{display:flex;flex-direction:column;overflow-y:auto;scrollbar-gutter:stable;max-height:288px}.dropdown-option{padding:6px 8px 6px 16px;cursor:pointer;display:flex;gap:8px}.dropdown-option .checkbox-icon{height:24px}.dropdown-option .plaintext-option{line-height:24px}.dropdown-option:hover{background-color:#1111110d}.dropdown-option:active,.dropdown-option.selected{background-color:#ebfbfc}.placeholder{color:#9e9e9e}.searchbox{padding:8px 16px 8px 16px;height:52px;box-sizing:border-box}.searchbox tttx-standalone-input{margin-top:-4px}.hidden{display:none}.footer{display:flex;gap:8px;flex-direction:row-reverse;padding:8px 16px 0 16px;border-top:1px solid #d5d5d5}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-6a372ea6.js';
|
|
2
|
-
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-
|
|
2
|
+
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-68752a19.js';
|
|
3
3
|
import './_commonjsHelpers-9943807e.js';
|
|
4
4
|
|
|
5
5
|
const tttxSelectBoxCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}:host{display:flex;gap:4px}.label{font-size:16px;font-style:normal;font-weight:500;line-height:normal}:host(.inline) .label{padding-top:8px}:host(.block){flex-direction:column}.dropdown-container{position:relative;display:flex;flex-direction:column;width:100%}.dropdown-container:focus-visible{outline:none}.dropdown-container:focus .dropdown-selector{border:1px solid #1479c6}.dropdown-selector,.dropdown-body{display:flex;border-radius:4px;background-color:white}.dropdown-selector{align-items:center;gap:8px;padding:8px 8px 8px 16px;cursor:pointer;border:1px solid #d5d5d5}.dropdown-selector-chevron{margin-left:auto;height:24px}.dropdown-selector-chevron>tttx-icon{cursor:pointer}.dropdown-body{display:flex;position:absolute;flex-direction:column;top:inherit;margin-top:45px;box-shadow:0px 1px 5px #1111114D;padding-bottom:8px;border:1px solid #d5d5d5;z-index:1000}.dropdown-body.search{max-height:410px}.dropdown-options-list{display:flex;flex-direction:column;overflow-y:auto;max-height:368px}.dropdown-option{padding:8px 8px 8px 16px;cursor:pointer}.dropdown-option:hover{background-color:#1111110d}.dropdown-option:active,.dropdown-option.selected{background-color:#ebfbfc}.placeholder{color:#757575}.searchbox{padding:8px 16px 0 16px}.searchbox tttx-standalone-input{margin-top:-4px}.hidden{display:none}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-6a372ea6.js';
|
|
2
|
-
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-
|
|
2
|
+
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-68752a19.js';
|
|
3
3
|
import './_commonjsHelpers-9943807e.js';
|
|
4
4
|
|
|
5
5
|
const tttxTabsCss = ".material-symbols-rounded.sc-tttx-tabs{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.sc-tttx-tabs-h{display:block}.tab-bar.sc-tttx-tabs{display:flex;height:52px}.tab-bar.sc-tttx-tabs>.left-navigation.sc-tttx-tabs,.tab-bar.sc-tttx-tabs>.right-navigation.sc-tttx-tabs{padding:14px 8px;cursor:pointer}.tab-bar.sc-tttx-tabs>.left-navigation.sc-tttx-tabs>*.sc-tttx-tabs,.tab-bar.sc-tttx-tabs>.right-navigation.sc-tttx-tabs>*.sc-tttx-tabs{height:24px;width:24px;cursor:pointer}.tab-bar.sc-tttx-tabs>.tabs-container.sc-tttx-tabs{display:flex;border-bottom:1px solid #d5d5d5}.tab-bar.sc-tttx-tabs>.tabs-container.wide.sc-tttx-tabs{flex-grow:1}.tab-bar.sc-tttx-tabs>.tabs-container.sc-tttx-tabs>*[role=tab].sc-tttx-tabs{padding:18px 16px;line-height:16px;font-size:14px;font-weight:500;text-transform:uppercase;user-select:none;color:#757575;cursor:pointer}.tab-bar.sc-tttx-tabs>.tabs-container.sc-tttx-tabs>*[role=tab].sc-tttx-tabs:hover{background-color:rgba(17, 17, 17, 0.05)}.tab-bar.sc-tttx-tabs>.tabs-container.sc-tttx-tabs>*[role=tab][aria-selected].sc-tttx-tabs{color:#212121;cursor:default;border-bottom:3px solid #1579c6}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-6a372ea6.js';
|
|
2
2
|
|
|
3
|
-
const tttxTextareaCss = ".material-symbols-rounded.sc-tttx-textarea{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.sc-tttx-textarea-h{display:block}.textarea-container.sc-tttx-textarea{position:relative}textarea.sc-tttx-textarea{font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;padding:9px 16px;font-size:16px;line-height:19px;border:1px solid #d5d5d5;border-radius:4px;margin-top:8px;resize:none}textarea.no-label.sc-tttx-textarea{margin-top:0}textarea.sc-tttx-textarea~.errorBubble.sc-tttx-textarea{font-size:14px;line-height:16px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}textarea.sc-tttx-textarea~.errorBubble.sc-tttx-textarea:not(.visible){display:none}textarea.sc-tttx-textarea~.errorBubble.sc-tttx-textarea span.sc-tttx-textarea{color:#dc0000;font-size:16px;margin-right:4px}.secondarylabel.sc-tttx-textarea{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}.optional.sc-tttx-textarea{color:#757575;font-weight:normal}";
|
|
3
|
+
const tttxTextareaCss = ".material-symbols-rounded.sc-tttx-textarea{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.sc-tttx-textarea-h{display:block}label.sc-tttx-textarea{font-weight:500;font-size:16px;line-height:19px;color:#212121}label.sc-tttx-textarea .textarea-container.sc-tttx-textarea{position:relative}label.sc-tttx-textarea .textarea-container.sc-tttx-textarea textarea.sc-tttx-textarea{font-family:\"Roboto\", serif;box-sizing:border-box;width:100%;padding:9px 16px;font-size:16px;line-height:19px;border:1px solid #d5d5d5;border-radius:4px;margin-top:8px;resize:none}label.sc-tttx-textarea .textarea-container.sc-tttx-textarea textarea.no-label.sc-tttx-textarea{margin-top:0}label.sc-tttx-textarea .textarea-container.sc-tttx-textarea textarea.sc-tttx-textarea~.errorBubble.sc-tttx-textarea{font-size:14px;line-height:16px;font-weight:normal;width:100%;font-family:\"Roboto\", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}label.sc-tttx-textarea .textarea-container.sc-tttx-textarea textarea.sc-tttx-textarea~.errorBubble.sc-tttx-textarea:not(.visible){display:none}label.sc-tttx-textarea .textarea-container.sc-tttx-textarea textarea.sc-tttx-textarea~.errorBubble.sc-tttx-textarea span.sc-tttx-textarea{color:#dc0000;font-size:16px;margin-right:4px}label.sc-tttx-textarea .textarea-container.sc-tttx-textarea textarea.sc-tttx-textarea:focus{border-color:#1479c6}label.sc-tttx-textarea .textarea-container.sc-tttx-textarea textarea.sc-tttx-textarea:focus-visible{outline:none}label.sc-tttx-textarea .secondarylabel.sc-tttx-textarea{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}label.sc-tttx-textarea .optional.sc-tttx-textarea{color:#757575;font-weight:normal}";
|
|
4
4
|
|
|
5
5
|
const TttxTextarea = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-6a372ea6.js';
|
|
2
|
-
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-
|
|
2
|
+
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-68752a19.js';
|
|
3
3
|
import './_commonjsHelpers-9943807e.js';
|
|
4
4
|
|
|
5
5
|
const tttxTreeViewCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}.tree-view-element{margin-left:-50px}.inline-tree-item{display:flex;align-items:center}.element{display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;width:100%}.element-row{min-height:36px;font-family:\"Roboto\", serif;font-size:16px;padding:8px 0px;border-bottom:1px solid #d5d5d5}.rowHover{cursor:pointer}li{list-style-type:none}.toggleNode{padding-right:3px}.padding-icon{padding:6px 6px;height:24px;width:24px;display:flex;align-items:center;justify-content:center}.treeNode{font-weight:500}.treeLeaf{font-weight:400}.right-buttons-container{margin-left:auto;display:flex}.borderless:active{outline-style:none}@media (hover: hover){.rowHover:hover{background-color:rgba(17, 17, 17, 0.05)}}";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as i,h as t,g as d}from"./p-3f1b6013.js";import{p as e,d as l}from"./p-
|
|
1
|
+
import{r as o,c as i,h as t,g as d}from"./p-3f1b6013.js";import{p as e,d as l}from"./p-88ee2406.js";import"./p-112455b1.js";const s=class{constructor(t){o(this,t),this.closeButtonClick=i(this,"closeButtonClick",6),this.buttonClick=i(this,"buttonClick",7),this.data=void 0,this.size="regular",this.open=!1,this.allowOverflow=!1,this.elementSize=void 0}handleResize(){this.elementSize=window.innerWidth<698?"mobile":this.size}componentDidRender(){this.dialog()&&(this.open?this.dialog().open||this.dialog().showModal():this.dialog().close())}onCloseClickHandler(){this.open=!1,this.closeButtonClick.emit({close:!0})}onButtonClickHandler(o){this.buttonClick.emit({buttonNumber:o,buttonClicked:!0})}dialog(){return this.el.shadowRoot.querySelector("dialog")}renderHeader(o){const i=o.title,d=!!o.hasClose;return t("div",{class:"dialog-box-header"},!!o.hasIcon&&t("tttx-icon",{class:"dialog-box-icon",icon:o.iconName,color:o.iconColor}),t("h3",{class:"dialog-box-title"},i),d&&t("div",{class:"dialog-box-align-right close-button",onClick:()=>this.onCloseClickHandler()},t("tttx-icon",{class:"dialog-box-icon-close dialog-box-clickable",icon:"close",color:"black"})))}renderContent(o){if(o.isCustomHtml){const i=e.sanitize(o.customHtml,l);return t("div",{class:"dialog-box-body "+(this.allowOverflow?"":"overflow-hidden")},t("div",{innerHTML:i}))}return t("div",{class:"dialog-box-body "+(this.allowOverflow?"":"overflow-hidden")},t("span",{class:"dialog-box-content"},o.contentText))}renderFooter(o){const i=o.buttons,d=i.length>0,e=i.length>1,l="mobile"===this.elementSize;return t("div",{class:"dialog-box-footer"},t("div",{class:"dialog-box-align-right"},3==i.length&&t("tttx-button",{class:"dialog-box-spacing-button",onClick:()=>this.onButtonClickHandler(3),design:i[2].type,notext:l,icon:i[2].icon},!l&&i[2].name),e&&t("tttx-button",{class:"dialog-box-spacing-button",onClick:()=>this.onButtonClickHandler(2),design:i[1].type,icon:i[1].icon},i[1].name),d&&t("tttx-button",{onClick:()=>this.onButtonClickHandler(1),design:i[0].type,icon:i[0].icon},i[0].name)))}componentWillLoad(){this.elementSize=window.innerWidth<698?"mobile":this.size}render(){if(this.data)return this._data="string"==typeof this.data?JSON.parse(this.data):this.data,t("dialog",{class:`dialog-box ${this.allowOverflow?"overflow-visible":""} ${this.elementSize}`},t("div",{class:"contents"},t("div",{class:`dialog-box-padding dialog-box-header-box ${this._data.type||""}`},this.renderHeader(this._data.header)),t("div",{class:"dialog-box-padding dialog-box-body-box"},this.renderContent(this._data.body)),t("div",{class:"dialog-box-padding dialog-box-footer-box"},this.renderFooter(this._data.footer))))}get el(){return d(this)}};s.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}h3{margin-block-start:0em;margin-block-end:0em}.dialog-box{background-color:#ffffff;border:1px solid #d5d5d5;border-radius:4px;box-shadow:0px 1px 5px #1111114d;padding:0}.overflow-visible{overflow:visible}.overflow-hidden{overflow:hidden}dialog::backdrop{background-color:#75757580}.dialog-box.small{width:400px;min-height:200px}.dialog-box.regular{width:600px;min-height:200px}.dialog-box.large{width:900px;min-height:200px}.dialog-box.mobile{max-width:424px;width:calc(100vw - 20px)}.dialog-box-clickable{cursor:pointer}.contents{display:flex;flex-direction:column;min-height:inherit}.dialog-box-padding{padding:8px 16px}.dialog-box-align-right{margin-left:auto;display:flex}.dialog-box-header-box{border-bottom:1px solid #d5d5d5;display:flex;flex-direction:row;height:36px}.dialog-box-header{display:flex;align-items:center;width:100%}.dialog-box-title{font-size:18;font-weight:500;font-family:"Roboto", serif}.dialog-box-icon{padding-right:8px;width:24px;height:24px}.dialog-box-icon-close{margin-left:auto;padding-top:3px;width:24px;height:24px}.dialog-box-content{font-size:16;font-weight:400;font-family:"Roboto", serif}.dialog-box-body{text-overflow:ellipsis}.dialog-box-body-box{padding:16px}.dialog-box-footer-box{display:flex;flex-direction:row;margin-top:auto;border-top:1px solid #d5d5d5;height:36px}.dialog-box-footer{display:flex;align-items:center;width:100%}.dialog-box-spacing-button{margin-right:8px}.dialog-box-header-box.info{border-bottom:1px solid #1479c6}.dialog-box-header-box.success{border-bottom:1px solid #a2bb31}.dialog-box-header-box.warning{border-bottom:1px solid #f59500}.dialog-box-header-box.critical{border-bottom:1px solid #dc0000}';export{s as tttx_dialog_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as o,H as i}from"./p-3f1b6013.js";import{p as n,d as r}from"./p-5ed38d61.js";import"./p-112455b1.js";function a(e,t,o,i){let n;if(n=void 0!==i?i.querySelector(".errorBubble"):"label"===e.parentElement.nodeName.toLowerCase()?e.parentElement.querySelector(".errorBubble"):e.parentElement.parentElement.querySelector(".errorBubble"),t){e.classList.add("invalid"),n.classList.add("visible");const t=document.createElement("span");t.className="material-symbols-rounded",t.textContent="warning",n.innerHTML="",n.append(t),n.append(o)}else n.classList.remove("visible"),e.classList.remove("invalid"),n.innerHTML=""}const l=class{constructor(o){e(this,o),this.dataSubmitted=t(this,"dataSubmitted",7),this.dataChanged=t(this,"dataChanged",7),this.template=document.createElement("template"),this.formschema=void 0,this.data=void 0}onFormSchemaChange(e){if(!this.data&&this.form&&this._formSchema){const e=new FormData(this.form);this._data=Object.fromEntries(Object.keys(this._formSchema.properties).map((t=>[t,e.get(t)])))}this._formSchema="string"==typeof e?JSON.parse(e):e}onDataChange(e){this._data="string"==typeof e?JSON.parse(e):e}fieldChanged(e){this.dataChanged.emit({name:e.target.name,value:e.target.value})}async submit(){this.submitButton.click()}doSubmit(e){e.preventDefault();const t=new FormData(e.target);this.dataSubmitted.emit(t)}componentWillLoad(){this.onFormSchemaChange(this.formschema),this.data&&this.onDataChange(this.data)}componentWillRender(){this.template=document.createElement("template"),this.populateFormFromSchema()}createSelect(e,t){var o;const i=document.createElement("select");return i.setAttribute("name",e),t.options.forEach((e=>{this.appendOption(i,e)})),(null===(o=this._data)||void 0===o?void 0:o[e])&&i.classList.remove("placeholder"),i}appendOption(e,t){const o=document.createElement("option");o.setAttribute("value",t.value),t.placeholder&&(o.setAttribute("disabled",""),o.setAttribute("selected",""),o.setAttribute("hidden",""),e.classList.add("placeholder")),t.label&&(o.innerHTML=n.sanitize(t.label,r)),e.appendChild(o)}createInput(e,t){var o;const i=document.createElement("input");return i.name=e,i.type=t.type,i.placeholder=null!==(o=t.placeholder)&&void 0!==o?o:"",i.autocomplete="off",i.autocapitalize="off",t.readonly&&(i.readOnly=!0),i}applyValidation(e,t){var o,i;t.required&&(e.setAttribute("required",""),e.setAttribute("data-required",null!==(o=t.required.message)&&void 0!==o?o:"")),t.pattern&&(e.setAttribute("pattern",t.pattern.pattern),e.setAttribute("data-pattern",null!==(i=t.pattern.message)&&void 0!==i?i:"")),t.badInput&&e.setAttribute("data-badinput",t.badInput.message),t.minmax&&(e.setAttribute("min",t.minmax.min),e.setAttribute("max",t.minmax.max),e.setAttribute("data-range",t.minmax.message)),t.maxlength&&e.setAttribute("maxlength",t.maxlength)}createErrorBubble(){const e=document.createElement("div");return e.className="errorBubble",e}appendCheckboxInput(e,t,o){if(e.label){const e=document.createElement("br");o.appendChild(e)}if(o.appendChild(t),!e.inlineLabel)return;const i=document.createElement("span");i.className="inlineLabel",i.textContent=e.inlineLabel,o.appendChild(i)}createLabel(e,t,o){const i=document.createElement("div");i.className="outer-container inputBlock";const n=document.createElement("label");if(n.innerText=e.label,!e.validation){const e=document.createElement("span");e.className="optional",e.innerHTML=" (optional)",n.appendChild(e)}return e.readonly&&n.classList.add("readonly"),"checkbox"===e.type?this.appendCheckboxInput(e,t,n):i.appendChild(t),"checkbox"!==e.type&&n.appendChild(i),n.appendChild(o),n}populateFormFromSchema(){if(!this._formSchema)return;const e=this._formSchema.properties;Object.keys(e).forEach((t=>{const o=e[t].form,i="select"===o.type?this.createSelect(t,o):this.createInput(t,o);o.validation&&this.applyValidation(i,o.validation);const n=this.createErrorBubble(),r=this.createLabel(o,i,n);this.template.content.append(r)}))}componentDidRender(){if(!this._formSchema)return;const e=this.template.content.cloneNode(!0),t=this._formSchema.properties;Object.keys(t).forEach((o=>{var i,n;const r=e.querySelector(`[name=${o}]`);if(r.oninvalid=this.validityCheckWrapper.bind(this),r.onblur=this.validityCheckWrapper.bind(this),r.onkeyup=this.fieldChanged.bind(this),r.onchange=this.fieldChanged.bind(this),void 0!==(null===(i=this._data)||void 0===i?void 0:i[o])&&null!==this._data[o]&&(r.value=this._data[o]),null===(n=t[o].form.validation)||void 0===n?void 0:n.invalid){const e=t[o].form.validation.invalid.message;r.setCustomValidity(e),a(r,!0,e)}"select"===t[o].form.type&&r.classList.contains("placeholder")&&r.addEventListener("change",(()=>{r.classList.remove("placeholder")}))})),this.fieldset.replaceChildren(e)}validityCheckWrapper(e){const{target:t,hasError:o,errorMessage:i}=function(e){var t,o,i,n;e.preventDefault();const r=e.target;let a=!0,l="";switch(!0){case r.validity.valueMissing:l=null!==(t=r.dataset.required)&&void 0!==t?t:"This field is required";break;case r.validity.patternMismatch:l=null!==(o=r.dataset.pattern)&&void 0!==o?o:"Incorrect format";break;case r.validity.badInput:l=null!==(i=r.dataset.badinput)&&void 0!==i?i:"Wrong input type";break;case r.validity.rangeOverflow||r.validity.rangeUnderflow:l=null!==(n=r.dataset.range)&&void 0!==n?n:"Invalid value";break;case r.validity.customError:l=r.validationMessage;break;default:a=!1}return{target:r,hasError:a,errorMessage:l}}(e);a(t,o,i)}render(){return o(i,null,o("form",{ref:e=>this.form=e,onSubmit:this.doSubmit.bind(this)},o("fieldset",{ref:e=>this.fieldset=e}),o("input",{type:"submit",ref:e=>this.submitButton=e,style:{display:"none"}})))}static get watchers(){return{formschema:["onFormSchemaChange"],data:["onDataChange"]}}};l.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}label{font-weight:500;font-size:16px;line-height:19px;color:#212121}label .optional{color:#757575;font-weight:normal}label .outer-container{position:relative}label .outer-container .left-icons,label .outer-container .right-icons{display:flex;position:absolute;height:24px;gap:8px}label .outer-container .left-icons tttx-icon,label .outer-container .right-icons tttx-icon{height:24px;width:24px}label .outer-container .left-icons{left:8px}label .outer-container .right-icons{right:8px}label .outer-container input{color:#212121;box-sizing:border-box;border:1px solid #d5d5d5;border-radius:4px;padding:0;padding-left:16px;padding-right:16px;margin-top:4px;}label .outer-container input.has-input-icon{padding-left:40px}label .outer-container input.has-input-icon.has-left-icon{padding-left:72px}label .outer-container input.has-left-icon{padding-left:40px}label .outer-container input.has-right-icon{padding-right:40px}label .outer-container input.invalid{border:1px solid #dc0000}label .outer-container input:not([type=submit]){font-family:"Roboto", serif;width:100%;height:36px;font-size:16px;line-height:19px}label .outer-container input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}label .outer-container input[readonly]{cursor:default;pointer-events:none;user-select:none;color:gray}label .outer-container input:focus{border-color:#1479c6}label .outer-container input:focus-visible{outline:none}label .outer-container.inputBlock{display:flex;align-items:center;line-height:21px}label .outer-container.inputBlock .left-icons,label .outer-container.inputBlock .right-icons{margin-top:4px}label .outer-container.inputBlock.readonly{pointer-events:none;user-select:none;color:gray}label .outer-container.inputInline{display:flex;white-space:nowrap;align-items:center;margin:0}label .outer-container.inputInline input{margin-top:0}label .secondarylabel{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}label .errorBubble{position:relative;font-size:14px;line-height:16px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}label .errorBubble:not(.visible){display:none}label .errorBubble span{color:#dc0000;font-size:16px;margin-right:4px}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:500}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.borderless-circle{background:transparent;border:none;color:#212121;border-radius:50%}.borderless-circle:active{border:none}.borderless-circle:focus{border-color:transparent}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless-circle:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:block}fieldset{margin:0;padding:0;border:none}label{display:block;position:relative;margin-bottom:16px}.inlineLabel{font-weight:400;display:inline-block;vertical-align:top;padding-top:4px}input[type=checkbox]{width:18px;height:18px}input~label{font-weight:400}select{font-family:"Roboto", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}.placeholder{color:#9e9e9e}.placeholder option{color:initial}select.invalid:invalid{border:1px solid #dc0000}select~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}select~.errorBubble:not(.visible){visibility:hidden}select~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}select.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}select:focus{border-color:#1479c6}select:focus-visible{outline:none}.button{padding:0 16px}.footer{display:flex;gap:16px;flex-direction:row-reverse}';export{l as tttx_form}
|
|
1
|
+
import{r as e,c as t,h as o,H as i}from"./p-3f1b6013.js";import{p as n,d as r}from"./p-88ee2406.js";import"./p-112455b1.js";function a(e,t,o,i){let n;if(n=void 0!==i?i.querySelector(".errorBubble"):"label"===e.parentElement.nodeName.toLowerCase()?e.parentElement.querySelector(".errorBubble"):e.parentElement.parentElement.querySelector(".errorBubble"),t){e.classList.add("invalid"),n.classList.add("visible");const t=document.createElement("span");t.className="material-symbols-rounded",t.textContent="warning",n.innerHTML="",n.append(t),n.append(o)}else n.classList.remove("visible"),e.classList.remove("invalid"),n.innerHTML=""}const l=class{constructor(o){e(this,o),this.dataSubmitted=t(this,"dataSubmitted",7),this.dataChanged=t(this,"dataChanged",7),this.template=document.createElement("template"),this.formschema=void 0,this.data=void 0}onFormSchemaChange(e){if(!this.data&&this.form&&this._formSchema){const e=new FormData(this.form);this._data=Object.fromEntries(Object.keys(this._formSchema.properties).map((t=>[t,e.get(t)])))}this._formSchema="string"==typeof e?JSON.parse(e):e}onDataChange(e){this._data="string"==typeof e?JSON.parse(e):e}fieldChanged(e){this.dataChanged.emit({name:e.target.name,value:e.target.value})}async submit(){this.submitButton.click()}doSubmit(e){e.preventDefault();const t=new FormData(e.target);this.dataSubmitted.emit(t)}componentWillLoad(){this.onFormSchemaChange(this.formschema),this.data&&this.onDataChange(this.data)}componentWillRender(){this.template=document.createElement("template"),this.populateFormFromSchema()}createSelect(e,t){var o;const i=document.createElement("select");return i.setAttribute("name",e),t.options.forEach((e=>{this.appendOption(i,e)})),(null===(o=this._data)||void 0===o?void 0:o[e])&&i.classList.remove("placeholder"),i}appendOption(e,t){const o=document.createElement("option");o.setAttribute("value",t.value),t.placeholder&&(o.setAttribute("disabled",""),o.setAttribute("selected",""),o.setAttribute("hidden",""),e.classList.add("placeholder")),t.label&&(o.innerHTML=n.sanitize(t.label,r)),e.appendChild(o)}createInput(e,t){var o;const i=document.createElement("input");return i.name=e,i.type=t.type,i.placeholder=null!==(o=t.placeholder)&&void 0!==o?o:"",i.autocomplete="off",i.autocapitalize="off",t.readonly&&(i.readOnly=!0),i}applyValidation(e,t){var o,i;t.required&&(e.setAttribute("required",""),e.setAttribute("data-required",null!==(o=t.required.message)&&void 0!==o?o:"")),t.pattern&&(e.setAttribute("pattern",t.pattern.pattern),e.setAttribute("data-pattern",null!==(i=t.pattern.message)&&void 0!==i?i:"")),t.badInput&&e.setAttribute("data-badinput",t.badInput.message),t.minmax&&(e.setAttribute("min",t.minmax.min),e.setAttribute("max",t.minmax.max),e.setAttribute("data-range",t.minmax.message)),t.maxlength&&e.setAttribute("maxlength",t.maxlength)}createErrorBubble(){const e=document.createElement("div");return e.className="errorBubble",e}appendCheckboxInput(e,t,o){if(e.label){const e=document.createElement("br");o.appendChild(e)}if(o.appendChild(t),!e.inlineLabel)return;const i=document.createElement("span");i.className="inlineLabel",i.textContent=e.inlineLabel,o.appendChild(i)}createLabel(e,t,o){const i=document.createElement("div");i.className="outer-container inputBlock";const n=document.createElement("label");if(n.innerText=e.label,!e.validation){const e=document.createElement("span");e.className="optional",e.innerHTML=" (optional)",n.appendChild(e)}return e.readonly&&n.classList.add("readonly"),"checkbox"===e.type?this.appendCheckboxInput(e,t,n):i.appendChild(t),"checkbox"!==e.type&&n.appendChild(i),n.appendChild(o),n}populateFormFromSchema(){if(!this._formSchema)return;const e=this._formSchema.properties;Object.keys(e).forEach((t=>{const o=e[t].form,i="select"===o.type?this.createSelect(t,o):this.createInput(t,o);o.validation&&this.applyValidation(i,o.validation);const n=this.createErrorBubble(),r=this.createLabel(o,i,n);this.template.content.append(r)}))}componentDidRender(){if(!this._formSchema)return;const e=this.template.content.cloneNode(!0),t=this._formSchema.properties;Object.keys(t).forEach((o=>{var i,n;const r=e.querySelector(`[name=${o}]`);if(r.oninvalid=this.validityCheckWrapper.bind(this),r.onblur=this.validityCheckWrapper.bind(this),r.onkeyup=this.fieldChanged.bind(this),r.onchange=this.fieldChanged.bind(this),void 0!==(null===(i=this._data)||void 0===i?void 0:i[o])&&null!==this._data[o]&&(r.value=this._data[o]),null===(n=t[o].form.validation)||void 0===n?void 0:n.invalid){const e=t[o].form.validation.invalid.message;r.setCustomValidity(e),a(r,!0,e)}"select"===t[o].form.type&&r.classList.contains("placeholder")&&r.addEventListener("change",(()=>{r.classList.remove("placeholder")}))})),this.fieldset.replaceChildren(e)}validityCheckWrapper(e){const{target:t,hasError:o,errorMessage:i}=function(e){var t,o,i,n;e.preventDefault();const r=e.target;let a=!0,l="";switch(!0){case r.validity.valueMissing:l=null!==(t=r.dataset.required)&&void 0!==t?t:"This field is required";break;case r.validity.patternMismatch:l=null!==(o=r.dataset.pattern)&&void 0!==o?o:"Incorrect format";break;case r.validity.badInput:l=null!==(i=r.dataset.badinput)&&void 0!==i?i:"Wrong input type";break;case r.validity.rangeOverflow||r.validity.rangeUnderflow:l=null!==(n=r.dataset.range)&&void 0!==n?n:"Invalid value";break;case r.validity.customError:l=r.validationMessage;break;default:a=!1}return{target:r,hasError:a,errorMessage:l}}(e);a(t,o,i)}render(){return o(i,null,o("form",{ref:e=>this.form=e,onSubmit:this.doSubmit.bind(this)},o("fieldset",{ref:e=>this.fieldset=e}),o("input",{type:"submit",ref:e=>this.submitButton=e,style:{display:"none"}})))}static get watchers(){return{formschema:["onFormSchemaChange"],data:["onDataChange"]}}};l.style='.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}.material-symbols-rounded{font-variation-settings:"FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24}label{font-weight:500;font-size:16px;line-height:19px;color:#212121}label .optional{color:#757575;font-weight:normal}label .outer-container{position:relative}label .outer-container .left-icons,label .outer-container .right-icons{display:flex;position:absolute;height:24px;gap:8px}label .outer-container .left-icons tttx-icon,label .outer-container .right-icons tttx-icon{height:24px;width:24px}label .outer-container .left-icons{left:8px}label .outer-container .right-icons{right:8px}label .outer-container input{color:#212121;box-sizing:border-box;border:1px solid #d5d5d5;border-radius:4px;padding:0;padding-left:16px;padding-right:16px;margin-top:4px;}label .outer-container input.has-input-icon{padding-left:40px}label .outer-container input.has-input-icon.has-left-icon{padding-left:72px}label .outer-container input.has-left-icon{padding-left:40px}label .outer-container input.has-right-icon{padding-right:40px}label .outer-container input.invalid{border:1px solid #dc0000}label .outer-container input:not([type=submit]){font-family:"Roboto", serif;width:100%;height:36px;font-size:16px;line-height:19px}label .outer-container input[type=date]{background:white;display:block;min-width:calc(100% - 18px);line-height:37px}label .outer-container input[readonly]{cursor:default;pointer-events:none;user-select:none;color:gray}label .outer-container input:focus{border-color:#1479c6}label .outer-container input:focus-visible{outline:none}label .outer-container.inputBlock{display:flex;align-items:center;line-height:21px}label .outer-container.inputBlock .left-icons,label .outer-container.inputBlock .right-icons{margin-top:4px}label .outer-container.inputBlock.readonly{pointer-events:none;user-select:none;color:gray}label .outer-container.inputInline{display:flex;white-space:nowrap;align-items:center;margin:0}label .outer-container.inputInline input{margin-top:0}label .secondarylabel{color:#757575;font-size:14px;line-height:16px;font-weight:normal;display:flex;margin-top:4px}label .errorBubble{position:relative;font-size:14px;line-height:16px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center;margin-top:4px}label .errorBubble:not(.visible){display:none}label .errorBubble span{color:#dc0000;font-size:16px;margin-right:4px}.material-symbols-rounded{font-family:"Material Symbols Rounded", sans-serif;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;color:#9e9e9e}button{cursor:pointer}.button{font-family:Roboto, serif;box-sizing:border-box;height:36px;min-width:36px;padding:0;margin:0;background:transparent;color:#212121;border:1px solid #c8c8c8;border-radius:4px;text-transform:uppercase;display:flex;justify-content:left;align-items:center;font-size:14px;font-weight:500}.button-content{display:block;padding:0 16px}.icon-left,.icon-right{margin-top:4px}.iconleft{padding-left:8px}.iconleft .button-content{padding-left:4px}.iconright{padding-right:8px}.iconright .button-content{padding-right:4px}.notext{padding:0 6px}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #d5d5d5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:active{background:#1464a2;border:1px solid #1464a2}.borderless{background:transparent;border:none;color:#212121}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.borderless-circle{background:transparent;border:none;color:#212121;border-radius:50%}.borderless-circle:active{border:none}.borderless-circle:focus{border-color:transparent}.danger{background:#dc0000;border:1px solid #dc0000;color:white}.danger:active{background:#b00000;border:1px solid #b00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}@media (hover: hover){.button:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #d5d5d5}.primary:hover{background:#146eb3;border:1px solid #146eb3}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless-circle:hover{background:rgba(17, 17, 17, 0.1);border:none}.danger:hover{background:#c60000;border:1px solid #c60000}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}}:host{display:block}fieldset{margin:0;padding:0;border:none}label{display:block;position:relative;margin-bottom:16px}.inlineLabel{font-weight:400;display:inline-block;vertical-align:top;padding-top:4px}input[type=checkbox]{width:18px;height:18px}input~label{font-weight:400}select{font-family:"Roboto", serif;box-sizing:border-box;width:100%;height:36px;padding:0 16px;font-size:16px;border:1px solid #d5d5d5;border-radius:4px;margin-top:4px}.placeholder{color:#9e9e9e}.placeholder option{color:initial}select.invalid:invalid{border:1px solid #dc0000}select~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;display:flex;align-content:center;align-items:center;justify-items:center}select~.errorBubble:not(.visible){visibility:hidden}select~.errorBubble span{color:#dc0000;font-size:16px;margin-right:4px;height:16px}select.invalid:invalid~.errorBubble{position:relative;font-size:14px;font-weight:normal;width:100%;font-family:"Roboto", sans-serif;color:#dc0000;visibility:visible}select:focus{border-color:#1479c6}select:focus-visible{outline:none}.button{padding:0 16px}.footer{display:flex;gap:16px;flex-direction:row-reverse}';export{l as tttx_form}
|