@maggioli-design-system/mds-table-row 4.7.0 → 4.8.0
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/{index-97006570.js → index-6ff13374.js} +45 -7
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-table-row.cjs.entry.js +17 -3
- package/dist/cjs/mds-table-row.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/common/aria.js +17 -1
- package/dist/collection/common/device.js +6 -0
- package/dist/collection/common/keyboard-manager.js +2 -2
- package/dist/collection/common/locale.js +17 -5
- package/dist/collection/components/mds-table-row/mds-table-row.css +57 -252
- package/dist/collection/components/mds-table-row/mds-table-row.js +26 -1
- package/dist/collection/dictionary/button.js +1 -0
- package/dist/collection/dictionary/file-extensions.js +114 -56
- package/dist/collection/dictionary/text.js +60 -1
- package/dist/collection/dictionary/variant.js +10 -1
- package/dist/collection/type/variant-file-format.js +0 -34
- package/dist/components/mds-table-row.js +18 -3
- package/dist/documentation.json +24 -3
- package/dist/esm/{index-ac4b33c0.js → index-0a14d3b4.js} +45 -8
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mds-table-row.entry.js +17 -3
- package/dist/esm/mds-table-row.js +4 -4
- package/dist/esm-es5/index-0a14d3b4.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-table-row.entry.js +1 -1
- package/dist/esm-es5/mds-table-row.js +1 -1
- package/dist/mds-table-row/mds-table-row.esm.js +1 -1
- package/dist/mds-table-row/mds-table-row.js +1 -1
- package/dist/mds-table-row/p-25a5e94e.system.js +1 -0
- package/dist/mds-table-row/p-33796315.entry.js +1 -0
- package/dist/mds-table-row/p-580bb30b.system.js +2 -0
- package/dist/mds-table-row/p-60aa058b.js +2 -0
- package/dist/mds-table-row/p-cca5599e.system.entry.js +1 -0
- package/dist/stats.json +84 -43
- package/dist/types/common/aria.d.ts +3 -1
- package/dist/types/common/date.d.ts +1 -1
- package/dist/types/common/device.d.ts +2 -0
- package/dist/types/common/file.d.ts +3 -4
- package/dist/types/common/locale.d.ts +3 -1
- package/dist/types/components/mds-table-row/mds-table-row.d.ts +4 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/dictionary/file-extensions.d.ts +2 -1
- package/dist/types/dictionary/text.d.ts +3 -1
- package/dist/types/dictionary/variant.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +6 -0
- package/dist/types/type/autocomplete.d.ts +1 -1
- package/dist/types/type/button.d.ts +1 -1
- package/dist/types/type/header-bar.d.ts +2 -0
- package/dist/types/type/input.d.ts +3 -0
- package/dist/types/type/text.d.ts +2 -0
- package/dist/types/type/variant-file-format.d.ts +4 -4
- package/dist/types/type/variant.d.ts +2 -1
- package/documentation.json +65 -34
- package/package.json +5 -5
- package/readme.md +5 -4
- package/src/common/aria.ts +22 -2
- package/src/common/device.ts +9 -0
- package/src/common/file.ts +2 -3
- package/src/common/keyboard-manager.ts +2 -2
- package/src/common/locale.ts +20 -6
- package/src/common/unit.ts +1 -1
- package/src/components/mds-table-row/.gitlab-ci.yml +5 -10
- package/src/components/mds-table-row/mds-table-row.css +60 -0
- package/src/components/mds-table-row/mds-table-row.tsx +19 -1
- package/src/components/mds-table-row/readme.md +4 -3
- package/src/components.d.ts +2 -0
- package/src/dictionary/button.ts +1 -0
- package/src/dictionary/file-extensions.ts +118 -57
- package/src/dictionary/text.ts +64 -0
- package/src/dictionary/variant.ts +11 -0
- package/src/fixtures/icons.json +20 -2
- package/src/fixtures/iconsauce.json +12 -0
- package/src/meta/file-format/locale.el.json +39 -0
- package/src/meta/file-format/locale.en.json +39 -0
- package/src/meta/file-format/locale.es.json +39 -0
- package/src/meta/file-format/locale.it.json +39 -0
- package/src/tailwind/components.css +1 -1
- package/src/type/autocomplete.ts +0 -1
- package/src/type/button.ts +1 -0
- package/src/type/header-bar.ts +11 -0
- package/src/type/input.ts +4 -0
- package/src/type/text.ts +59 -0
- package/src/type/variant-file-format.ts +20 -37
- package/src/type/variant.ts +9 -1
- package/www/build/mds-table-row.esm.js +1 -1
- package/www/build/mds-table-row.js +1 -1
- package/www/build/p-25a5e94e.system.js +1 -0
- package/www/build/p-33796315.entry.js +1 -0
- package/www/build/p-580bb30b.system.js +2 -0
- package/www/build/p-60aa058b.js +2 -0
- package/www/build/p-cca5599e.system.entry.js +1 -0
- package/dist/collection/type/language.js +0 -1
- package/dist/esm-es5/index-ac4b33c0.js +0 -1
- package/dist/mds-table-row/p-0a6d4960.js +0 -2
- package/dist/mds-table-row/p-11e2454f.system.js +0 -1
- package/dist/mds-table-row/p-bc92b059.system.js +0 -2
- package/dist/mds-table-row/p-cb00bcd8.entry.js +0 -1
- package/dist/mds-table-row/p-e2d6387e.system.entry.js +0 -1
- package/dist/types/interface/input-value.d.ts +0 -4
- package/dist/types/type/language.d.ts +0 -2
- package/src/interface/input-value.ts +0 -5
- package/src/type/language.ts +0 -8
- package/www/build/p-0a6d4960.js +0 -2
- package/www/build/p-11e2454f.system.js +0 -1
- package/www/build/p-bc92b059.system.js +0 -2
- package/www/build/p-cb00bcd8.entry.js +0 -1
- package/www/build/p-e2d6387e.system.entry.js +0 -1
- /package/dist/collection/{interface/input-value.js → type/header-bar.js} +0 -0
|
@@ -21,10 +21,10 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'mds-table-row';
|
|
24
|
-
const BUILD = /* mds-table-row */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad:
|
|
24
|
+
const BUILD = /* mds-table-row */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: true, hydratedClass: false, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: false, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: false, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.22.2 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
@@ -274,6 +274,12 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
274
274
|
if (vnodeData.key) {
|
|
275
275
|
key = vnodeData.key;
|
|
276
276
|
}
|
|
277
|
+
{
|
|
278
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
279
|
+
if (classData) {
|
|
280
|
+
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
281
|
+
}
|
|
282
|
+
}
|
|
277
283
|
}
|
|
278
284
|
const vnode = newVNode(nodeName, null);
|
|
279
285
|
vnode.$attrs$ = vnodeData;
|
|
@@ -312,6 +318,7 @@ var parsePropertyValue = (propValue, propType) => {
|
|
|
312
318
|
}
|
|
313
319
|
return propValue;
|
|
314
320
|
};
|
|
321
|
+
var getElement = (ref) => getHostRef(ref).$hostElement$ ;
|
|
315
322
|
var emitEvent = (elm, name, opts) => {
|
|
316
323
|
const ev = plt.ce(name, opts);
|
|
317
324
|
elm.dispatchEvent(ev);
|
|
@@ -356,10 +363,21 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
356
363
|
if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {
|
|
357
364
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
358
365
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
359
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling :
|
|
366
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
360
367
|
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
361
368
|
} else if ("host" in styleContainerNode) {
|
|
362
|
-
|
|
369
|
+
if (supportsConstructableStylesheets) {
|
|
370
|
+
const stylesheet = new CSSStyleSheet();
|
|
371
|
+
stylesheet.replaceSync(style);
|
|
372
|
+
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
373
|
+
} else {
|
|
374
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
375
|
+
if (existingStyleContainer) {
|
|
376
|
+
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
377
|
+
} else {
|
|
378
|
+
styleContainerNode.prepend(styleElm);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
363
381
|
} else {
|
|
364
382
|
styleContainerNode.append(styleElm);
|
|
365
383
|
}
|
|
@@ -400,7 +418,13 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
400
418
|
if (oldValue !== newValue) {
|
|
401
419
|
let isProp = isMemberInElement(elm, memberName);
|
|
402
420
|
memberName.toLowerCase();
|
|
403
|
-
if (memberName === "
|
|
421
|
+
if (memberName === "class") {
|
|
422
|
+
const classList = elm.classList;
|
|
423
|
+
const oldClasses = parseClassList(oldValue);
|
|
424
|
+
const newClasses = parseClassList(newValue);
|
|
425
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
426
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
427
|
+
} else if (memberName === "key") ; else {
|
|
404
428
|
const isComplex = isComplexType(newValue);
|
|
405
429
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
406
430
|
try {
|
|
@@ -436,6 +460,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
436
460
|
}
|
|
437
461
|
}
|
|
438
462
|
};
|
|
463
|
+
var parseClassListRegex = /\s/;
|
|
464
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
439
465
|
|
|
440
466
|
// src/runtime/vdom/update-element.ts
|
|
441
467
|
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
@@ -473,7 +499,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
473
499
|
let i2 = 0;
|
|
474
500
|
let elm;
|
|
475
501
|
let childNode;
|
|
476
|
-
{
|
|
502
|
+
if (newVNode2.$text$ !== null) {
|
|
503
|
+
elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
|
|
504
|
+
} else {
|
|
477
505
|
elm = newVNode2.$elm$ = doc.createElement(
|
|
478
506
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
479
507
|
);
|
|
@@ -622,7 +650,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
622
650
|
const oldChildren = oldVNode.$children$;
|
|
623
651
|
const newChildren = newVNode2.$children$;
|
|
624
652
|
const tag = newVNode2.$tag$;
|
|
625
|
-
|
|
653
|
+
const text = newVNode2.$text$;
|
|
654
|
+
if (text === null) {
|
|
626
655
|
{
|
|
627
656
|
if (tag === "slot" && !useNativeShadowDom) ; else {
|
|
628
657
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
@@ -631,6 +660,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
631
660
|
if (oldChildren !== null && newChildren !== null) {
|
|
632
661
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
633
662
|
} else if (newChildren !== null) {
|
|
663
|
+
if (oldVNode.$text$ !== null) {
|
|
664
|
+
elm.textContent = "";
|
|
665
|
+
}
|
|
634
666
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
635
667
|
} else if (
|
|
636
668
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
@@ -638,6 +670,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
638
670
|
) {
|
|
639
671
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
640
672
|
}
|
|
673
|
+
} else if (oldVNode.$text$ !== text) {
|
|
674
|
+
elm.data = text;
|
|
641
675
|
}
|
|
642
676
|
};
|
|
643
677
|
var insertBefore = (parent, newNode, reference) => {
|
|
@@ -710,6 +744,9 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
710
744
|
hostRef.$queuedListeners$ = void 0;
|
|
711
745
|
}
|
|
712
746
|
}
|
|
747
|
+
{
|
|
748
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
749
|
+
}
|
|
713
750
|
}
|
|
714
751
|
endSchedule();
|
|
715
752
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -1192,6 +1229,7 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
|
1192
1229
|
|
|
1193
1230
|
exports.Host = Host;
|
|
1194
1231
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1232
|
+
exports.getElement = getElement;
|
|
1195
1233
|
exports.h = h;
|
|
1196
1234
|
exports.promiseResolve = promiseResolve;
|
|
1197
1235
|
exports.registerInstance = registerInstance;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-6ff13374.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
9
9
|
if (typeof window === 'undefined') return undefined;
|
|
10
10
|
await appGlobals.globalScripts();
|
|
11
|
-
return index.bootstrapLazy([["mds-table-row.cjs",[[1,"mds-table-row",{"interactive":[1540]},[[4,"mdsTableInteractiveChange","tableInteractiveHandler"]]]]]], options);
|
|
11
|
+
return index.bootstrapLazy([["mds-table-row.cjs",[[1,"mds-table-row",{"interactive":[1540],"overlayActions":[1540,"overlay-actions"]},[[4,"mdsTableInteractiveChange","tableInteractiveHandler"]]]]]], options);
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
exports.setNonce = index.setNonce;
|
|
@@ -2,22 +2,36 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-6ff13374.js');
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const isMobileDevice = () => {
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
10
|
+
return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
14
|
+
|
|
15
|
+
const mdsTableRowCss = "@tailwind utilities;\n\n:host {\n\n --mds-table-row-color-hover: var(--mds-table-color-hover, rgb(var(--tone-neutral-02)));\n --mds-table-row-color: var(--mds-table-color, rgb(var(--tone-neutral-03)));\n --mds-table-row-actions-gap: var(--mds-table-actions-gap, 1rem);\n -webkit-transition-duration: 200ms;\n transition-duration: 200ms;\n -webkit-transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n\n color: var(--mds-table-row-color);\n display: table-row;\n position: relative;\n -webkit-transition-property: color;\n transition-property: color;\n\n}\n\n.actions-wrapper {\n inset: 0;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: end;\n justify-content: end;\n pointer-events: none;\n position: absolute;\n}\n\n.actions {\n -ms-flex-align: center;\n align-items: center;\n background-color: var(--mds-table-cell-background);\n border-bottom-color: transparent;\n border-bottom-style: solid;\n border-bottom-width: var(--mds-table-border-width);\n border-top-color: var(--mds-table-border-color);\n border-top-style: solid;\n border-top-width: var(--mds-table-border-width);\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n gap: var(--mds-table-row-actions-gap);\n height: 100%;\n margin-top: calc(var(--mds-table-border-width) * -1);\n padding: var(--mds-table-cell-padding);\n pointer-events: auto;\n position: -webkit-sticky;\n position: sticky;\n right: 0;\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n -webkit-transition-duration: 500ms;\n transition-duration: 500ms;\n -webkit-transition-property: background-color, -webkit-transform;\n transition-property: background-color, -webkit-transform;\n transition-property: transform, background-color;\n transition-property: transform, background-color, -webkit-transform;\n -webkit-transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);\n}\n\n.actions-wrapper--mobile {\n position: relative;\n}\n\n.actions-wrapper--mobile .actions {\n position: static;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host(:hover) .actions {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n:host([overlay-actions]:not([overlay-actions=\"false\"])) .actions-wrapper:not(.actions-wrapper--mobile) .actions {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n}\n\n:host([interactive]:not([interactive=\"false\"])) .actions {\n --mds-table-cell-background: var(--mds-table-body-background);\n}\n\n:host([interactive]:not([interactive=\"false\"]):hover) .actions {\n --mds-table-cell-background: var(--mds-table-cell-background-hover);\n}\n\n:host([sorted][interactive]:not([interactive=\"false\"])) ::slotted(mds-table-cell[sorted]) {\n\n --mds-table-cell-background: var(--mds-table-cell-background-hover);\n}\n\n:host([sorted][interactive]:not([interactive=\"false\"])) ::slotted(mds-table-cell:not([sorted])) {\n\n --mds-table-cell-background: var(--mds-table-body-background-hover);\n}\n\n:host([interactive]:not([interactive=\"false\"]):hover) {\n\n --mds-table-cell-background: var(--mds-table-cell-background-hover);\n --mds-table-row-color: var(--mds-table-row-color-hover);\n}\n\n\n:host([sorted][interactive]:not([interactive=\"false\"]):hover) ::slotted(mds-table-cell:not([sorted])) {\n\n --mds-table-cell-background: var(--mds-table-cell-background-hover);\n}\n\n:host([sorted]:not([interactive])) ::slotted(mds-table-cell:not([sorted])) {\n\n --mds-table-cell-background: var(--mds-table-body-background-hover);\n}\n\n@container style(--magma-pref-animation: reduce) {\n :host {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n\n@container style(--magma-pref-animation: system) {\n\n @media (prefers-reduced-motion) {\n :host {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n";
|
|
8
16
|
const MdsTableRowStyle0 = mdsTableRowCss;
|
|
9
17
|
|
|
10
18
|
const MdsTableRow = class {
|
|
11
19
|
constructor(hostRef) {
|
|
12
20
|
index.registerInstance(this, hostRef);
|
|
13
21
|
this.interactive = undefined;
|
|
22
|
+
this.overlayActions = undefined;
|
|
14
23
|
}
|
|
15
24
|
tableInteractiveHandler(event) {
|
|
16
25
|
this.interactive = event.detail;
|
|
17
26
|
}
|
|
27
|
+
componentWillLoad() {
|
|
28
|
+
this.actions = this.host.querySelector('[slot="action"]') !== null;
|
|
29
|
+
}
|
|
18
30
|
render() {
|
|
19
|
-
return (index.h(index.Host, { key: '
|
|
31
|
+
return (index.h(index.Host, { key: '7402ca1cfdaf3e7846dbf29fad4771617c4f0aee', role: "row" }, index.h("slot", { key: '6671fe1e06369e2486157747c41921266553636c' }), this.actions
|
|
32
|
+
&& index.h("div", { key: 'e58f247b2f1f6c4263c85615209356f212fa727a', class: clsx('actions-wrapper', isMobileDevice() && 'actions-wrapper--mobile'), role: "cell" }, index.h("div", { key: '1f952cd70074ee64cbef3b96c562cf4d76efd8e7', class: "actions" }, index.h("slot", { key: '7d9eaf9364cd8626a300bddba7c6c9bd449ae773', name: "action" })))));
|
|
20
33
|
}
|
|
34
|
+
get host() { return index.getElement(this); }
|
|
21
35
|
};
|
|
22
36
|
MdsTableRow.style = MdsTableRowStyle0;
|
|
23
37
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-6ff13374.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.22.2 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-table-row.cjs.js', document.baseURI).href));
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["mds-table-row.cjs",[[1,"mds-table-row",{"interactive":[1540]},[[4,"mdsTableInteractiveChange","tableInteractiveHandler"]]]]]], options);
|
|
22
|
+
return index.bootstrapLazy([["mds-table-row.cjs",[[1,"mds-table-row",{"interactive":[1540],"overlayActions":[1540,"overlay-actions"]},[[4,"mdsTableInteractiveChange","tableInteractiveHandler"]]]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -18,6 +18,22 @@ const setAttributeIfEmpty = (element, attribute, value) => {
|
|
|
18
18
|
element.setAttribute(attribute, value);
|
|
19
19
|
return value;
|
|
20
20
|
};
|
|
21
|
+
const removeAttributesIf = (element, attribute, valueCheck = 'true', cleanAttributes) => {
|
|
22
|
+
if (ifAttribute(element, attribute, valueCheck)) {
|
|
23
|
+
const attributesList = Array.isArray(cleanAttributes) ? cleanAttributes : [cleanAttributes];
|
|
24
|
+
attributesList.forEach(attributeToRemove => {
|
|
25
|
+
element.removeAttribute(attributeToRemove);
|
|
26
|
+
});
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return false;
|
|
30
|
+
};
|
|
31
|
+
const ifAttribute = (element, attribute, valueCheck = 'true') => {
|
|
32
|
+
if (element.hasAttribute(attribute) && element.getAttribute(attribute) === valueCheck) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
};
|
|
21
37
|
const hashValue = (value) => `${value}-${hash(value)}`;
|
|
22
38
|
const hashRandomValue = (value) => {
|
|
23
39
|
const randomValue = randomInt(1000000);
|
|
@@ -26,4 +42,4 @@ const hashRandomValue = (value) => {
|
|
|
26
42
|
}
|
|
27
43
|
return hash(randomValue.toString());
|
|
28
44
|
};
|
|
29
|
-
export {
|
|
45
|
+
export { hashRandomValue, hashValue, removeAttributesIf, setAttributeIfEmpty, ifAttribute, unslugName, };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const isMobileDevice = () => {
|
|
2
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3
|
+
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
|
|
4
|
+
return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(userAgent);
|
|
5
|
+
};
|
|
6
|
+
export { isMobileDevice, };
|
|
@@ -31,13 +31,13 @@ export class KeyboardManager {
|
|
|
31
31
|
};
|
|
32
32
|
this.attachEscapeBehavior = (callback) => {
|
|
33
33
|
this.escapeCallback = callback;
|
|
34
|
-
if (window !== undefined) {
|
|
34
|
+
if (typeof window !== 'undefined') {
|
|
35
35
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
this.detachEscapeBehavior = () => {
|
|
39
39
|
this.escapeCallback = () => { return; };
|
|
40
|
-
if (window !== undefined) {
|
|
40
|
+
if (typeof window !== 'undefined') {
|
|
41
41
|
window.removeEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
42
42
|
}
|
|
43
43
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { render } from "mustache";
|
|
2
2
|
export class Locale {
|
|
3
3
|
constructor(configData) {
|
|
4
4
|
this.rollbackLanguage = 'en';
|
|
5
5
|
this.set = (configData) => {
|
|
6
6
|
this.config = configData;
|
|
7
7
|
};
|
|
8
|
-
this.lang = (
|
|
9
|
-
this.
|
|
8
|
+
this.lang = (el) => {
|
|
9
|
+
this.element = el;
|
|
10
|
+
this.closestElement = this.element.closest('[lang]');
|
|
10
11
|
if (this.closestElement) {
|
|
11
12
|
if (this.closestElement.lang) {
|
|
12
13
|
this.language = this.closestElement.lang;
|
|
@@ -16,6 +17,18 @@ export class Locale {
|
|
|
16
17
|
this.language = this.rollbackLanguage;
|
|
17
18
|
return this.language;
|
|
18
19
|
};
|
|
20
|
+
this.update = (doc) => {
|
|
21
|
+
const context = doc !== null && doc !== void 0 ? doc : this.element.shadowRoot;
|
|
22
|
+
context && context.querySelectorAll('*').forEach(el => {
|
|
23
|
+
if (el.tagName.toLowerCase().startsWith('mds-')) {
|
|
24
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
25
|
+
if (el && 'updateLang' in el) {
|
|
26
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
+
el.updateLang();
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
};
|
|
19
32
|
this.pluralize = (tag, context) => {
|
|
20
33
|
const languagePhrase = this.config[this.language] ? this.config[this.language][tag] : this.config[this.rollbackLanguage][tag];
|
|
21
34
|
const phrases = [];
|
|
@@ -38,8 +51,7 @@ export class Locale {
|
|
|
38
51
|
}
|
|
39
52
|
}
|
|
40
53
|
}
|
|
41
|
-
|
|
42
|
-
return template(context);
|
|
54
|
+
return render(translatePhrase, context);
|
|
43
55
|
};
|
|
44
56
|
this.get = (tag, context) => {
|
|
45
57
|
if (context) {
|