@3t-transform/threeteeui 0.1.43 → 0.1.45
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/_commonjsHelpers-537d719a.js +20 -0
- package/dist/cjs/{domsanitiser.options-975e3317.js → domsanitiser.options-b2d88e35.js} +16 -30
- package/dist/cjs/{index-457ca775.js → index-1a35850c.js} +62 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/tttx-button.cjs.entry.js +24 -24
- package/dist/cjs/tttx-dialog-box.cjs.entry.js +81 -0
- package/dist/cjs/tttx-filter.cjs.entry.js +177 -177
- package/dist/cjs/tttx-form.cjs.entry.js +459 -458
- package/dist/cjs/tttx-icon.cjs.entry.js +11 -11
- package/dist/cjs/tttx-keyvalue-block.cjs.entry.js +59 -59
- package/dist/cjs/tttx-list.cjs.entry.js +33 -32
- package/dist/cjs/tttx-loading-spinner.cjs.entry.js +16 -16
- package/dist/cjs/tttx-qrcode.cjs.entry.js +37 -0
- package/dist/cjs/tttx-sorter.cjs.entry.js +102 -102
- package/dist/cjs/tttx-standalone-input.cjs.entry.js +79 -79
- package/dist/cjs/tttx-toolbar.cjs.entry.js +10 -10
- package/dist/cjs/tttx.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/atoms/tttx-button/tttx-button.js +110 -110
- package/dist/collection/components/atoms/tttx-button/tttx-button.stories.js +14 -14
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.js +62 -62
- package/dist/collection/components/atoms/tttx-icon/tttx-icon.stories.js +22 -22
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.js +109 -109
- package/dist/collection/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.js +38 -38
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.js +67 -67
- package/dist/collection/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.js +17 -17
- package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.css +0 -0
- package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.js +74 -0
- package/dist/collection/components/atoms/tttx-qrcode/tttx-qrcode.stories.js +22 -0
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.css +146 -0
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.js +172 -0
- package/dist/collection/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.js +380 -0
- package/dist/collection/components/molecules/tttx-filter/tttx-filter.js +369 -369
- package/dist/collection/components/molecules/tttx-filter/tttx-filter.stories.js +72 -72
- package/dist/collection/components/molecules/tttx-form/lib/setErrorState.js +37 -37
- package/dist/collection/components/molecules/tttx-form/lib/validityCheck.js +61 -61
- package/dist/collection/components/molecules/tttx-form/tttx-form.js +479 -479
- package/dist/collection/components/molecules/tttx-form/tttx-form.stories.js +272 -272
- package/dist/collection/components/molecules/tttx-list/tttx-list.js +105 -105
- package/dist/collection/components/molecules/tttx-list/tttx-list.stories.js +43 -43
- package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.js +224 -224
- package/dist/collection/components/molecules/tttx-sorter/tttx-sorter.stories.js +42 -42
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.js +759 -759
- package/dist/collection/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.js +172 -172
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.js +44 -44
- package/dist/collection/components/molecules/tttx-toolbar/tttx-toolbar.stories.js +14 -14
- package/dist/collection/components/palette.stories.js +7 -7
- package/dist/collection/docs/gettingstarted-developer.stories.js +5 -5
- package/dist/collection/icons.js +2838 -2838
- package/dist/collection/index.js +1 -1
- package/dist/collection/shared/domsanitiser.options.js +14 -14
- package/dist/components/_commonjsHelpers.js +17 -0
- package/dist/components/domsanitiser.options.js +13 -27
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/components/tttx-button.js +1 -54
- package/dist/components/tttx-button2.js +56 -0
- package/dist/components/tttx-dialog-box.d.ts +11 -0
- package/dist/components/tttx-dialog-box.js +110 -0
- package/dist/components/tttx-filter.js +210 -210
- package/dist/components/tttx-form.js +475 -475
- package/dist/components/tttx-icon2.js +28 -28
- package/dist/components/tttx-keyvalue-block.js +76 -76
- package/dist/components/tttx-list.js +53 -53
- package/dist/components/tttx-loading-spinner.js +33 -33
- package/dist/components/tttx-qrcode.d.ts +11 -0
- package/dist/components/tttx-qrcode.js +53 -0
- package/dist/components/tttx-sorter.js +130 -130
- package/dist/components/tttx-standalone-input.js +130 -130
- package/dist/components/tttx-toolbar.js +26 -26
- package/dist/esm/_commonjsHelpers-9943807e.js +17 -0
- package/dist/esm/{domsanitiser.options-3c7ded83.js → domsanitiser.options-81611f82.js} +13 -27
- package/dist/esm/{index-d784fb3e.js → index-a848bfb4.js} +62 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/esm/tttx-button.entry.js +24 -24
- package/dist/esm/tttx-dialog-box.entry.js +77 -0
- package/dist/esm/tttx-filter.entry.js +177 -177
- package/dist/esm/tttx-form.entry.js +459 -458
- package/dist/esm/tttx-icon.entry.js +11 -11
- package/dist/esm/tttx-keyvalue-block.entry.js +59 -59
- package/dist/esm/tttx-list.entry.js +33 -32
- package/dist/esm/tttx-loading-spinner.entry.js +16 -16
- package/dist/esm/tttx-qrcode.entry.js +33 -0
- package/dist/esm/tttx-sorter.entry.js +102 -102
- package/dist/esm/tttx-standalone-input.entry.js +79 -79
- package/dist/esm/tttx-toolbar.entry.js +10 -10
- package/dist/esm/tttx.js +3 -3
- package/dist/tttx/p-0b25ac9c.js +3 -0
- package/dist/tttx/p-112455b1.js +1 -0
- package/dist/tttx/{p-b720c4ad.entry.js → p-120a0732.entry.js} +1 -1
- package/dist/tttx/p-2d130f82.entry.js +1 -0
- package/dist/tttx/{p-aaf02902.entry.js → p-42349ae5.entry.js} +1 -1
- package/dist/tttx/{p-92cade7f.entry.js → p-623b9147.entry.js} +1 -1
- package/dist/tttx/{p-cac26a1b.entry.js → p-7428fc97.entry.js} +1 -1
- package/dist/tttx/{p-ab6ce9f6.entry.js → p-77fb8e0f.entry.js} +1 -1
- package/dist/tttx/p-83563ce9.entry.js +1 -0
- package/dist/tttx/p-a092cd71.entry.js +1 -0
- package/dist/tttx/p-ab4652a8.js +2 -0
- package/dist/tttx/p-af7ff3b3.entry.js +1 -0
- package/dist/tttx/{p-563605b2.entry.js → p-d0ca435d.entry.js} +1 -1
- package/dist/tttx/{p-798a098a.entry.js → p-d2b0ec0a.entry.js} +1 -1
- package/dist/tttx/{p-ec253eea.entry.js → p-e1efb888.entry.js} +1 -1
- package/dist/tttx/tttx.esm.js +1 -1
- package/dist/types/components/atoms/tttx-button/tttx-button.d.ts +10 -10
- package/dist/types/components/atoms/tttx-button/tttx-button.stories.d.ts +10 -10
- package/dist/types/components/atoms/tttx-icon/tttx-icon.d.ts +5 -5
- package/dist/types/components/atoms/tttx-icon/tttx-icon.stories.d.ts +20 -20
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.d.ts +7 -7
- package/dist/types/components/atoms/tttx-keyvalue-block/tttx-keyvalue-block.stories.d.ts +9 -9
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.d.ts +6 -6
- package/dist/types/components/atoms/tttx-loading-spinner/tttx-loading-spinner.stories.d.ts +17 -17
- package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.d.ts +6 -0
- package/dist/types/components/atoms/tttx-qrcode/tttx-qrcode.stories.d.ts +23 -0
- package/dist/types/components/molecules/tttx-dialog-box/interfaces.d.ts +25 -0
- package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.d.ts +18 -0
- package/dist/types/components/molecules/tttx-dialog-box/tttx-dialog-box.stories.d.ts +23 -0
- package/dist/types/components/molecules/tttx-filter/tttx-filter.d.ts +41 -41
- package/dist/types/components/molecules/tttx-form/lib/setErrorState.d.ts +13 -13
- package/dist/types/components/molecules/tttx-form/lib/validityCheck.d.ts +17 -17
- package/dist/types/components/molecules/tttx-form/tttx-form.d.ts +133 -133
- package/dist/types/components/molecules/tttx-list/tttx-list.d.ts +11 -11
- package/dist/types/components/molecules/tttx-sorter/tttx-sorter.d.ts +19 -19
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.d.ts +69 -69
- package/dist/types/components/molecules/tttx-standalone-input/tttx-standalone-input.stories.d.ts +143 -143
- package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.d.ts +4 -4
- package/dist/types/components/molecules/tttx-toolbar/tttx-toolbar.stories.d.ts +13 -13
- package/dist/types/components/palette.stories.d.ts +6 -6
- package/dist/types/components.d.ts +41 -0
- package/dist/types/docs/gettingstarted-developer.stories.d.ts +5 -5
- package/dist/types/icons.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/shared/domsanitiser.options.d.ts +10 -10
- package/package.json +7 -5
- package/readme.md +19 -7
- package/dist/tttx/p-0ebffdfc.js +0 -2
- package/dist/tttx/p-1db3704e.entry.js +0 -1
- package/dist/tttx/p-350ddb03.js +0 -3
- package/dist/tttx/p-f702df4f.entry.js +0 -1
- package/dist/types/components/molecules/tttx-filter/tttx-filter.stories.d.ts +0 -70
- package/dist/types/components/molecules/tttx-form/tttx-form.stories.d.ts +0 -278
- package/dist/types/components/molecules/tttx-list/tttx-list.stories.d.ts +0 -14
- package/dist/types/components/molecules/tttx-sorter/tttx-sorter.stories.d.ts +0 -30
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function createCommonjsModule(fn, basedir, module) {
|
|
4
|
-
return module = {
|
|
5
|
-
path: basedir,
|
|
6
|
-
exports: {},
|
|
7
|
-
require: function (path, base) {
|
|
8
|
-
return commonjsRequire();
|
|
9
|
-
}
|
|
10
|
-
}, fn(module, module.exports), module.exports;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function commonjsRequire () {
|
|
14
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
15
|
-
}
|
|
1
|
+
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-9943807e.js';
|
|
16
2
|
|
|
17
3
|
var purify = createCommonjsModule(function (module, exports) {
|
|
18
4
|
/*! @license DOMPurify 3.0.3 | (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.3/LICENSE */
|
|
@@ -1647,18 +1633,18 @@ var purify = createCommonjsModule(function (module, exports) {
|
|
|
1647
1633
|
//# sourceMappingURL=purify.js.map
|
|
1648
1634
|
});
|
|
1649
1635
|
|
|
1650
|
-
function tagRegXp(tagName) {
|
|
1651
|
-
return RegExp(/^tttx-/).exec(tagName);
|
|
1652
|
-
}
|
|
1653
|
-
function attributeNameCheck() {
|
|
1654
|
-
return true;
|
|
1655
|
-
}
|
|
1656
|
-
const domSanitiserOptions = {
|
|
1657
|
-
CUSTOM_ELEMENT_HANDLING: {
|
|
1658
|
-
tagNameCheck: tagRegXp,
|
|
1659
|
-
attributeNameCheck: attributeNameCheck,
|
|
1660
|
-
allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
|
|
1661
|
-
}
|
|
1636
|
+
function tagRegXp(tagName) {
|
|
1637
|
+
return RegExp(/^tttx-/).exec(tagName);
|
|
1638
|
+
}
|
|
1639
|
+
function attributeNameCheck() {
|
|
1640
|
+
return true;
|
|
1641
|
+
}
|
|
1642
|
+
const domSanitiserOptions = {
|
|
1643
|
+
CUSTOM_ELEMENT_HANDLING: {
|
|
1644
|
+
tagNameCheck: tagRegXp,
|
|
1645
|
+
attributeNameCheck: attributeNameCheck,
|
|
1646
|
+
allowCustomizedBuiltInElements: false, // customized built-ins are not allowed
|
|
1647
|
+
}
|
|
1662
1648
|
};
|
|
1663
1649
|
|
|
1664
1650
|
export { domSanitiserOptions as d, purify as p };
|
|
@@ -182,6 +182,10 @@ const parsePropertyValue = (propValue, propType) => {
|
|
|
182
182
|
// but we'll cheat here and say that the string "false" is the boolean false
|
|
183
183
|
return propValue === 'false' ? false : propValue === '' || !!propValue;
|
|
184
184
|
}
|
|
185
|
+
if (propType & 2 /* MEMBER_FLAGS.Number */) {
|
|
186
|
+
// force it to be a number
|
|
187
|
+
return parseFloat(propValue);
|
|
188
|
+
}
|
|
185
189
|
if (propType & 1 /* MEMBER_FLAGS.String */) {
|
|
186
190
|
// could have been passed as a number or boolean
|
|
187
191
|
// but we still want it as a string
|
|
@@ -896,6 +900,13 @@ const dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
896
900
|
const instance = hostRef.$lazyInstance$ ;
|
|
897
901
|
let promise;
|
|
898
902
|
if (isInitialLoad) {
|
|
903
|
+
{
|
|
904
|
+
hostRef.$flags$ |= 256 /* HOST_FLAGS.isListenReady */;
|
|
905
|
+
if (hostRef.$queuedListeners$) {
|
|
906
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
907
|
+
hostRef.$queuedListeners$ = null;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
899
910
|
{
|
|
900
911
|
promise = safeCall(instance, 'componentWillLoad');
|
|
901
912
|
}
|
|
@@ -1306,12 +1317,24 @@ const connectedCallback = (elm) => {
|
|
|
1306
1317
|
initializeComponent(elm, hostRef, cmpMeta);
|
|
1307
1318
|
}
|
|
1308
1319
|
}
|
|
1320
|
+
else {
|
|
1321
|
+
// not the first time this has connected
|
|
1322
|
+
// reattach any event listeners to the host
|
|
1323
|
+
// since they would have been removed when disconnected
|
|
1324
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1325
|
+
}
|
|
1309
1326
|
endConnected();
|
|
1310
1327
|
}
|
|
1311
1328
|
};
|
|
1312
1329
|
const disconnectedCallback = (elm) => {
|
|
1313
1330
|
if ((plt.$flags$ & 1 /* PLATFORM_FLAGS.isTmpDisconnected */) === 0) {
|
|
1314
|
-
getHostRef(elm);
|
|
1331
|
+
const hostRef = getHostRef(elm);
|
|
1332
|
+
{
|
|
1333
|
+
if (hostRef.$rmListeners$) {
|
|
1334
|
+
hostRef.$rmListeners$.map((rmListener) => rmListener());
|
|
1335
|
+
hostRef.$rmListeners$ = undefined;
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1315
1338
|
}
|
|
1316
1339
|
};
|
|
1317
1340
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
@@ -1339,6 +1362,9 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1339
1362
|
{
|
|
1340
1363
|
cmpMeta.$members$ = compactMeta[2];
|
|
1341
1364
|
}
|
|
1365
|
+
{
|
|
1366
|
+
cmpMeta.$listeners$ = compactMeta[3];
|
|
1367
|
+
}
|
|
1342
1368
|
{
|
|
1343
1369
|
cmpMeta.$watchers$ = {};
|
|
1344
1370
|
}
|
|
@@ -1414,6 +1440,40 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1414
1440
|
// Fallback appLoad event
|
|
1415
1441
|
endBootstrap();
|
|
1416
1442
|
};
|
|
1443
|
+
const addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
|
|
1444
|
+
if (listeners) {
|
|
1445
|
+
listeners.map(([flags, name, method]) => {
|
|
1446
|
+
const target = getHostListenerTarget(elm, flags) ;
|
|
1447
|
+
const handler = hostListenerProxy(hostRef, method);
|
|
1448
|
+
const opts = hostListenerOpts(flags);
|
|
1449
|
+
plt.ael(target, name, handler, opts);
|
|
1450
|
+
(hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
|
|
1451
|
+
});
|
|
1452
|
+
}
|
|
1453
|
+
};
|
|
1454
|
+
const hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1455
|
+
try {
|
|
1456
|
+
{
|
|
1457
|
+
if (hostRef.$flags$ & 256 /* HOST_FLAGS.isListenReady */) {
|
|
1458
|
+
// instance is ready, let's call it's member method for this event
|
|
1459
|
+
hostRef.$lazyInstance$[methodName](ev);
|
|
1460
|
+
}
|
|
1461
|
+
else {
|
|
1462
|
+
(hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
catch (e) {
|
|
1467
|
+
consoleError(e);
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
const getHostListenerTarget = (elm, flags) => {
|
|
1471
|
+
if (flags & 8 /* LISTENER_FLAGS.TargetWindow */)
|
|
1472
|
+
return win;
|
|
1473
|
+
return elm;
|
|
1474
|
+
};
|
|
1475
|
+
// prettier-ignore
|
|
1476
|
+
const hostListenerOpts = (flags) => (flags & 2 /* LISTENER_FLAGS.Capture */) !== 0;
|
|
1417
1477
|
/**
|
|
1418
1478
|
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1419
1479
|
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
@@ -1439,6 +1499,7 @@ const registerHost = (elm, cmpMeta) => {
|
|
|
1439
1499
|
elm['s-p'] = [];
|
|
1440
1500
|
elm['s-rc'] = [];
|
|
1441
1501
|
}
|
|
1502
|
+
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1442
1503
|
return hostRefs.set(elm, hostRef);
|
|
1443
1504
|
};
|
|
1444
1505
|
const isMemberInElement = (elm, memberName) => memberName in elm;
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-a848bfb4.js';
|
|
2
|
+
export { s as setNonce } from './index-a848bfb4.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Esm v2.22.3 | MIT Licensed | https://stenciljs.com
|
|
@@ -11,7 +11,7 @@ const patchEsm = () => {
|
|
|
11
11
|
const defineCustomElements = (win, options) => {
|
|
12
12
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
13
13
|
return patchEsm().then(() => {
|
|
14
|
-
return bootstrapLazy([["tttx-
|
|
14
|
+
return bootstrapLazy([["tttx-dialog-box",[[1,"tttx-dialog-box",{"data":[1025],"size":[1],"elementSize":[32]},[[9,"resize","handleResize"]]]]],["tttx-filter",[[1,"tttx-filter",{"filterKey":[1,"filter-key"],"filterOptions":[1,"filter-options"],"showSelectAll":[4,"show-select-all"],"showSearchField":[4,"show-search-field"],"showOptionIcons":[4,"show-option-icons"],"filterButtonStyle":[1,"filter-button-style"],"filterHeader":[1,"filter-header"],"defaultFilterOptions":[1,"default-filter-options"],"showPopover":[32],"displayedFilterSettings":[32],"selectedFilters":[32],"filterSearchTerm":[32],"allSelected":[32]}]]],["tttx-list",[[1,"tttx-list",{"data":[1025],"name":[1]}]]],["tttx-sorter",[[1,"tttx-sorter",{"sorterKey":[1,"sorter-key"],"defaultSortDirection":[1,"default-sort-direction"],"fieldOptionsData":[1,"field-options-data"],"defaultOption":[1,"default-option"],"selectedField":[32],"sortDirection":[32],"dropdownExpand":[32],"dropdownOptions":[32]}]]],["tttx-standalone-input",[[2,"tttx-standalone-input",{"label":[1],"secondarylabel":[1],"showerrormsg":[4],"showerrorbubble":[4],"errormsg":[1],"iconleft":[1],"iconleftcolor":[1],"iconright":[1],"iconrightcolor":[1],"inputicon":[1],"inputiconcolor":[1],"inline":[4],"inputautocapitalize":[1],"inputautofocus":[4],"inputkeyhint":[1],"inputindex":[8],"inputtitle":[1],"autocomplete":[1],"checked":[4],"disabled":[4],"max":[8],"maxlength":[8],"min":[8],"minlength":[8],"name":[1],"pattern":[1],"placeholder":[1],"readonly":[8],"required":[4],"step":[8],"type":[1],"value":[1032]}]]],["tttx-form",[[1,"tttx-form",{"formschema":[1032],"data":[1032],"submit":[64]}]]],["tttx-keyvalue-block",[[1,"tttx-keyvalue-block",{"keyvalues":[8],"horizontal":[4]}]]],["tttx-loading-spinner",[[1,"tttx-loading-spinner",{"loadingMessage":[1028,"loading-message"],"size":[1025]}]]],["tttx-qrcode",[[0,"tttx-qrcode",{"link":[1025],"size":[1026]}]]],["tttx-toolbar",[[1,"tttx-toolbar",{"border":[4]}]]],["tttx-icon",[[1,"tttx-icon",{"icon":[1],"color":[1]}]]],["tttx-button",[[1,"tttx-button",{"notext":[4],"icon":[1],"iconposition":[1],"design":[1]}]]]], options);
|
|
15
15
|
});
|
|
16
16
|
};
|
|
17
17
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-a848bfb4.js';
|
|
2
2
|
|
|
3
3
|
const tttxButtonCss = ".material-symbols-rounded{font-variation-settings:\"FILL\" 1, \"wght\" 400, \"GRAD\" 0, \"opsz\" 24}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:400}.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:hover{background:rgba(17, 17, 17, 0.1);border:1px solid #D5D5D5}.button:active{background:rgba(17, 17, 17, 0.2);border:1px solid #D5D5D5}.primary{background:#1479c6;border:1px solid #1479c6;color:white}.primary:hover{background:#146EB3;border:1px solid #146EB3}.primary:active{background:#1464A2;border:1px solid #1464A2}.borderless{background:transparent;border:none;color:#212121}.borderless:hover{background:rgba(17, 17, 17, 0.1);border:none}.borderless:active{background:rgba(17, 17, 17, 0.2);border:none}.danger{background:#DC0000;border:1px solid #DC0000;color:white}.danger:hover{background:#C60000;border:1px solid #C60000}.danger:active{background:#B00000;border:1px solid #B00000}.disabled{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:hover{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}.disabled:active{background:#aeaeae;border:none;color:#4c4c4c;cursor:not-allowed}:host{display:inline-block}tttx-icon{cursor:inherit}.spacingleft{margin-left:8px}";
|
|
4
4
|
|
|
5
|
-
const TttxButton = class {
|
|
6
|
-
constructor(hostRef) {
|
|
7
|
-
registerInstance(this, hostRef);
|
|
8
|
-
this._iconcolor = 'black';
|
|
9
|
-
this.notext = undefined;
|
|
10
|
-
this.icon = undefined;
|
|
11
|
-
this.iconposition = 'left';
|
|
12
|
-
this.design = 'default';
|
|
13
|
-
}
|
|
14
|
-
componentWillLoad() {
|
|
15
|
-
this._design = this.design;
|
|
16
|
-
const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
|
|
17
|
-
if (!designs.includes(this.design)) {
|
|
18
|
-
this._design = 'default';
|
|
19
|
-
}
|
|
20
|
-
if (this._design === 'primary' || this._design === 'danger') {
|
|
21
|
-
this._iconcolor = 'white';
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
|
|
26
|
-
}
|
|
27
|
-
};
|
|
5
|
+
const TttxButton = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this._iconcolor = 'black';
|
|
9
|
+
this.notext = undefined;
|
|
10
|
+
this.icon = undefined;
|
|
11
|
+
this.iconposition = 'left';
|
|
12
|
+
this.design = 'default';
|
|
13
|
+
}
|
|
14
|
+
componentWillLoad() {
|
|
15
|
+
this._design = this.design;
|
|
16
|
+
const designs = ['primary', 'default', 'disabled', 'danger', 'borderless'];
|
|
17
|
+
if (!designs.includes(this.design)) {
|
|
18
|
+
this._design = 'default';
|
|
19
|
+
}
|
|
20
|
+
if (this._design === 'primary' || this._design === 'danger') {
|
|
21
|
+
this._iconcolor = 'white';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
render() {
|
|
25
|
+
return (h(Host, null, h("button", { class: `button ${this._design} ${this.icon ? 'withicon' : ''} ${this.icon && this.iconposition ? 'icon' + this.iconposition : ''} ${this.notext ? 'notext' : ''}` }, this.icon && this.iconposition === 'left' && (h("div", { class: "icon-left" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))), !this.notext && h("div", { class: "button-content" }, h("slot", null)), this.icon && this.iconposition === 'right' && (h("div", { class: "icon-right" }, h("tttx-icon", { icon: this.icon, color: this._iconcolor }))))));
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
28
|
TttxButton.style = tttxButtonCss;
|
|
29
29
|
|
|
30
30
|
export { TttxButton as tttx_button };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-a848bfb4.js';
|
|
2
|
+
import { p as purify, d as domSanitiserOptions } from './domsanitiser.options-81611f82.js';
|
|
3
|
+
import './_commonjsHelpers-9943807e.js';
|
|
4
|
+
|
|
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;display:flex;flex-direction:column;border:1px solid #d5d5d5;border-radius:4px;box-shadow:0px 1px 5px #1111114d}.dialog-box.small{width:400px;min-height:200px;max-height:500px}.dialog-box.regular{width:600px;min-height:200px;max-height:500px}.dialog-box.large{width:900px;min-height:200px;max-height:500px}.dialog-box.mobile{max-width:424px;max-height:510px}.dialog-box-clickable{cursor:pointer}.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:600;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-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}";
|
|
6
|
+
|
|
7
|
+
const TttxDialogBox = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.closeButtonClick = createEvent(this, "closeButtonClick", 6);
|
|
11
|
+
this.buttonClick = createEvent(this, "buttonClick", 7);
|
|
12
|
+
this.data = undefined;
|
|
13
|
+
this.size = 'regular';
|
|
14
|
+
this.elementSize = undefined;
|
|
15
|
+
}
|
|
16
|
+
handleResize() {
|
|
17
|
+
if (window.innerWidth < 698) {
|
|
18
|
+
this.elementSize = 'mobile';
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
this.elementSize = this.size;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
onCloseClickHandler() {
|
|
25
|
+
this.closeButtonClick.emit({ close: true });
|
|
26
|
+
}
|
|
27
|
+
onButtonClickHandler(index) {
|
|
28
|
+
this.buttonClick.emit({ buttonNumber: index, buttonClicked: true });
|
|
29
|
+
}
|
|
30
|
+
renderHeader(header) {
|
|
31
|
+
const title = header.title;
|
|
32
|
+
const iconName = header.iconName;
|
|
33
|
+
const iconColor = header.iconColor;
|
|
34
|
+
const iconEnabled = header.hasIcon ? true : false;
|
|
35
|
+
const closeEnabled = header.hasClose ? true : false;
|
|
36
|
+
return (h("div", { class: "dialog-box-header" }, iconEnabled && h("tttx-icon", { class: "dialog-box-icon", icon: iconName, color: iconColor }), h("h3", { class: "dialog-box-title" }, title), closeEnabled && (h("div", { class: "dialog-box-align-right close-button", onClick: () => this.onCloseClickHandler() }, h("tttx-icon", { class: "dialog-box-icon-close dialog-box-clickable", icon: "close", color: "black" })))));
|
|
37
|
+
}
|
|
38
|
+
renderContent(content) {
|
|
39
|
+
if (content.isCustomHtml) {
|
|
40
|
+
const cleanHTML = purify.sanitize(content.customHtml, domSanitiserOptions);
|
|
41
|
+
return (h("div", { class: "dialog-box-body" }, h("div", { innerHTML: cleanHTML })));
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return (h("div", { class: "dialog-box-body" }, h("span", { class: "dialog-box-content" }, content.contentText)));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
renderFooter(footer) {
|
|
48
|
+
const button = footer.buttons;
|
|
49
|
+
const button1Enabled = button.length > 0;
|
|
50
|
+
const button2Enabled = button.length > 1;
|
|
51
|
+
const button3Enabled = button.length == 3;
|
|
52
|
+
const isMobile = this.elementSize === 'mobile';
|
|
53
|
+
return (h("div", { class: "dialog-box-footer" }, h("div", { class: "dialog-box-align-right" }, button3Enabled && (h("tttx-button", { class: "dialog-box-spacing-button", onClick: () => this.onButtonClickHandler(3), design: button[2].type, notext: isMobile, icon: button[2].icon }, !isMobile && button[2].name)), button2Enabled && (h("tttx-button", { class: "dialog-box-spacing-button", onClick: () => this.onButtonClickHandler(2), design: button[1].type, icon: button[1].icon }, button[1].name)), button1Enabled && (h("tttx-button", { onClick: () => this.onButtonClickHandler(1), design: button[0].type, icon: button[0].icon }, button[0].name)))));
|
|
54
|
+
}
|
|
55
|
+
componentWillLoad() {
|
|
56
|
+
if (window.innerWidth < 698) {
|
|
57
|
+
this.elementSize = 'mobile';
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.elementSize = this.size;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
render() {
|
|
64
|
+
if (!this.data)
|
|
65
|
+
return;
|
|
66
|
+
if (typeof this.data === 'string') {
|
|
67
|
+
this._data = JSON.parse(this.data);
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this._data = this.data;
|
|
71
|
+
}
|
|
72
|
+
return (h("div", { class: `dialog-box ${this.elementSize}` }, h("div", { class: `dialog-box-padding dialog-box-header-box ${this._data.type || ''}` }, this.renderHeader(this._data.header)), h("div", { class: "dialog-box-padding dialog-box-body-box" }, this.renderContent(this._data.body)), h("div", { class: "dialog-box-padding dialog-box-footer-box" }, this.renderFooter(this._data.footer))));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
TttxDialogBox.style = tttxDialogBoxCss;
|
|
76
|
+
|
|
77
|
+
export { TttxDialogBox as tttx_dialog_box };
|