@maggioli-design-system/mds-table-row 4.7.1 → 4.8.1
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-6df370d5.js → index-19c36c53.js} +56 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mds-table-row.cjs.entry.js +22 -3
- package/dist/cjs/mds-table-row.cjs.js +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/components/mds-table-row/mds-table-row.css +45 -2
- package/dist/collection/components/mds-table-row/mds-table-row.js +39 -1
- package/dist/collection/dictionary/file-extensions.js +114 -56
- package/dist/collection/dictionary/text.js +60 -1
- package/dist/components/mds-table-row.js +23 -3
- package/dist/documentation.json +22 -1
- package/dist/esm/{index-6aef85b9.js → index-a948f479.js} +56 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mds-table-row.entry.js +22 -3
- package/dist/esm/mds-table-row.js +3 -3
- package/dist/esm-es5/index-a948f479.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-5ab8c209.system.entry.js +1 -0
- package/dist/mds-table-row/p-98955251.system.js +1 -0
- package/dist/mds-table-row/p-bfa177c6.system.js +2 -0
- package/dist/mds-table-row/p-d906e5c7.entry.js +1 -0
- package/dist/mds-table-row/p-faec61cc.js +2 -0
- package/dist/stats.json +92 -43
- package/dist/types/common/aria.d.ts +3 -1
- package/dist/types/common/device.d.ts +2 -0
- package/dist/types/components/mds-table-row/mds-table-row.d.ts +7 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/dictionary/text.d.ts +3 -1
- package/dist/types/type/text.d.ts +2 -0
- package/documentation.json +38 -6
- package/package.json +2 -2
- package/readme.md +17 -3
- package/src/common/aria.ts +22 -2
- package/src/common/device.ts +9 -0
- package/src/common/keyboard-manager.ts +2 -2
- package/src/components/mds-table-row/css/mds-table-row-actions.css +38 -0
- package/src/components/mds-table-row/css/mds-table-row-pref-animation.css +4 -2
- package/src/components/mds-table-row/mds-table-row.css +4 -0
- package/src/components/mds-table-row/mds-table-row.tsx +37 -1
- package/src/components/mds-table-row/readme.md +4 -3
- package/src/components.d.ts +2 -0
- package/src/dictionary/file-extensions.ts +115 -56
- package/src/dictionary/text.ts +64 -0
- package/src/fixtures/icons.json +8 -0
- package/src/fixtures/iconsauce.json +5 -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/type/text.ts +59 -0
- package/www/build/mds-table-row.esm.js +1 -1
- package/www/build/mds-table-row.js +1 -1
- package/www/build/p-5ab8c209.system.entry.js +1 -0
- package/www/build/p-98955251.system.js +1 -0
- package/www/build/p-bfa177c6.system.js +2 -0
- package/www/build/p-d906e5c7.entry.js +1 -0
- package/www/build/p-faec61cc.js +2 -0
- package/dist/esm-es5/index-6aef85b9.js +0 -1
- package/dist/mds-table-row/p-6fd17720.js +0 -2
- package/dist/mds-table-row/p-81af01a5.entry.js +0 -1
- package/dist/mds-table-row/p-93ae789e.system.js +0 -2
- package/dist/mds-table-row/p-a349d802.system.js +0 -1
- package/dist/mds-table-row/p-fa157b43.system.entry.js +0 -1
- package/www/build/p-6fd17720.js +0 -2
- package/www/build/p-81af01a5.entry.js +0 -1
- package/www/build/p-93ae789e.system.js +0 -2
- package/www/build/p-a349d802.system.js +0 -1
- package/www/build/p-fa157b43.system.entry.js +0 -1
|
@@ -21,7 +21,7 @@ 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:
|
|
24
|
+
const BUILD = /* mds-table-row */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, 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: true, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
27
|
Stencil Client Platform v4.22.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -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);
|
|
@@ -411,7 +418,34 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
411
418
|
if (oldValue !== newValue) {
|
|
412
419
|
let isProp = isMemberInElement(elm, memberName);
|
|
413
420
|
memberName.toLowerCase();
|
|
414
|
-
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 === "style") {
|
|
428
|
+
{
|
|
429
|
+
for (const prop in oldValue) {
|
|
430
|
+
if (!newValue || newValue[prop] == null) {
|
|
431
|
+
if (prop.includes("-")) {
|
|
432
|
+
elm.style.removeProperty(prop);
|
|
433
|
+
} else {
|
|
434
|
+
elm.style[prop] = "";
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
for (const prop in newValue) {
|
|
440
|
+
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
441
|
+
if (prop.includes("-")) {
|
|
442
|
+
elm.style.setProperty(prop, newValue[prop]);
|
|
443
|
+
} else {
|
|
444
|
+
elm.style[prop] = newValue[prop];
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
} else if (memberName === "key") ; else {
|
|
415
449
|
const isComplex = isComplexType(newValue);
|
|
416
450
|
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
417
451
|
try {
|
|
@@ -447,6 +481,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
447
481
|
}
|
|
448
482
|
}
|
|
449
483
|
};
|
|
484
|
+
var parseClassListRegex = /\s/;
|
|
485
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
450
486
|
|
|
451
487
|
// src/runtime/vdom/update-element.ts
|
|
452
488
|
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
@@ -484,7 +520,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
484
520
|
let i2 = 0;
|
|
485
521
|
let elm;
|
|
486
522
|
let childNode;
|
|
487
|
-
{
|
|
523
|
+
if (newVNode2.$text$ !== null) {
|
|
524
|
+
elm = newVNode2.$elm$ = doc.createTextNode(newVNode2.$text$);
|
|
525
|
+
} else {
|
|
488
526
|
elm = newVNode2.$elm$ = doc.createElement(
|
|
489
527
|
!useNativeShadowDom && BUILD.slotRelocation && newVNode2.$flags$ & 2 /* isSlotFallback */ ? "slot-fb" : newVNode2.$tag$
|
|
490
528
|
);
|
|
@@ -633,7 +671,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
633
671
|
const oldChildren = oldVNode.$children$;
|
|
634
672
|
const newChildren = newVNode2.$children$;
|
|
635
673
|
const tag = newVNode2.$tag$;
|
|
636
|
-
|
|
674
|
+
const text = newVNode2.$text$;
|
|
675
|
+
if (text === null) {
|
|
637
676
|
{
|
|
638
677
|
if (tag === "slot" && !useNativeShadowDom) ; else {
|
|
639
678
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
@@ -642,6 +681,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
642
681
|
if (oldChildren !== null && newChildren !== null) {
|
|
643
682
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
644
683
|
} else if (newChildren !== null) {
|
|
684
|
+
if (oldVNode.$text$ !== null) {
|
|
685
|
+
elm.textContent = "";
|
|
686
|
+
}
|
|
645
687
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
646
688
|
} else if (
|
|
647
689
|
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
@@ -649,6 +691,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
649
691
|
) {
|
|
650
692
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
651
693
|
}
|
|
694
|
+
} else if (oldVNode.$text$ !== text) {
|
|
695
|
+
elm.data = text;
|
|
652
696
|
}
|
|
653
697
|
};
|
|
654
698
|
var insertBefore = (parent, newNode, reference) => {
|
|
@@ -721,6 +765,9 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
721
765
|
hostRef.$queuedListeners$ = void 0;
|
|
722
766
|
}
|
|
723
767
|
}
|
|
768
|
+
{
|
|
769
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
770
|
+
}
|
|
724
771
|
}
|
|
725
772
|
endSchedule();
|
|
726
773
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -785,12 +832,16 @@ var postUpdateComponent = (hostRef) => {
|
|
|
785
832
|
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
786
833
|
const elm = hostRef.$hostElement$;
|
|
787
834
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
835
|
+
const instance = hostRef.$lazyInstance$ ;
|
|
788
836
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
789
837
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
790
838
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
791
839
|
{
|
|
792
840
|
addHydratedFlag(elm);
|
|
793
841
|
}
|
|
842
|
+
{
|
|
843
|
+
safeCall(instance, "componentDidLoad");
|
|
844
|
+
}
|
|
794
845
|
endPostUpdate();
|
|
795
846
|
{
|
|
796
847
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1203,6 +1254,7 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
|
1203
1254
|
|
|
1204
1255
|
exports.Host = Host;
|
|
1205
1256
|
exports.bootstrapLazy = bootstrapLazy;
|
|
1257
|
+
exports.getElement = getElement;
|
|
1206
1258
|
exports.h = h;
|
|
1207
1259
|
exports.promiseResolve = promiseResolve;
|
|
1208
1260
|
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-19c36c53.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,41 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-19c36c53.js');
|
|
6
6
|
|
|
7
|
-
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 -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 -webkit-transition-property: color;\n transition-property: color;\n\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";
|
|
7
|
+
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: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.actions-view {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n inset: 0;\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 display: -ms-inline-flexbox;\n display: inline-flex;\n gap: var(--mds-table-row-actions-gap);\n inset: 0;\n margin-right: 100%;\n padding-right: 0;\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, padding-right, -webkit-transform;\n transition-property: background-color, padding-right, -webkit-transform;\n transition-property: transform, background-color, padding-right;\n transition-property: transform, background-color, padding-right, -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:host(:hover) .actions {\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n}\n\n:host([overlay-actions]:not([overlay-actions=\"false\"])) .actions {\n padding-right: var(--mds-table-cell-padding);\n -webkit-transform: translateX(100%);\n transform: translateX(100%);\n}\n\n:host([overlay-actions]:not([overlay-actions=\"false\"]):hover) .actions {\n -webkit-transform: translateX(0);\n transform: translateX(0);\n}\n\n@container style(--magma-pref-animation: reduce) {\n :host,\n .actions {\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 .actions {\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n }\n}\n\n";
|
|
8
8
|
const MdsTableRowStyle0 = mdsTableRowCss;
|
|
9
9
|
|
|
10
10
|
const MdsTableRow = class {
|
|
11
11
|
constructor(hostRef) {
|
|
12
12
|
index.registerInstance(this, hostRef);
|
|
13
13
|
this.interactive = undefined;
|
|
14
|
+
this.overlayActions = undefined;
|
|
14
15
|
}
|
|
15
16
|
tableInteractiveHandler(event) {
|
|
16
17
|
this.interactive = event.detail;
|
|
17
18
|
}
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
this.hasActions = this.host.querySelector('[slot="action"]') !== null;
|
|
21
|
+
}
|
|
22
|
+
componentDidLoad() {
|
|
23
|
+
var _a;
|
|
24
|
+
if (this.hasActions) {
|
|
25
|
+
this.actions = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.actions');
|
|
26
|
+
this.sizerWidth = `${this.actions.offsetWidth.toString()}px`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
18
29
|
render() {
|
|
19
|
-
return (index.h(index.Host, { key: '
|
|
30
|
+
return (index.h(index.Host, { key: '44d102599e90a2abb4cf32ea398d6c3f194e6177', role: "row" }, index.h("slot", { key: '3bc595925a4dafac49d206692fae394754b10d70' }), this.hasActions &&
|
|
31
|
+
index.h("mds-table-cell", { key: '8b1a1b0e32db91cc03988de856fea521d25b8424', class: "actions-cell" }, index.h("div", { key: '5867330d68358f30429123a85027b72def045933', class: "actions-sizer", style: {
|
|
32
|
+
minHeight: '1px',
|
|
33
|
+
maxWidth: this.sizerWidth,
|
|
34
|
+
minWidth: this.sizerWidth,
|
|
35
|
+
} }), index.h("div", { key: '15d6e37bb432b0671e8a5fa447a17fde060e2d60', class: "actions-view" }, index.h("div", { key: '63cf3b620e6c428ce7cb318e07fb35cec631b0c3', class: "actions", style: {
|
|
36
|
+
marginRight: `calc(${this.sizerWidth} + var(--mds-table-cell-padding))`,
|
|
37
|
+
} }, index.h("slot", { key: '0a479f584fd1ed0c927b39006de79747c7e3ed87', name: "action" }))))));
|
|
20
38
|
}
|
|
39
|
+
get host() { return index.getElement(this); }
|
|
21
40
|
};
|
|
22
41
|
MdsTableRow.style = MdsTableRowStyle0;
|
|
23
42
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-19c36c53.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -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
|
};
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
--mds-table-row-color-hover: var(--mds-table-color-hover, rgb(var(--tone-neutral-02)));
|
|
6
6
|
--mds-table-row-color: var(--mds-table-color, rgb(var(--tone-neutral-03)));
|
|
7
|
+
--mds-table-row-actions-gap: var(--mds-table-actions-gap, 1rem);
|
|
7
8
|
transition-duration: 200ms;
|
|
8
9
|
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
9
10
|
|
|
10
11
|
color: var(--mds-table-row-color);
|
|
11
12
|
display: table-row;
|
|
13
|
+
position: relative;
|
|
12
14
|
transition-property: color;
|
|
13
15
|
|
|
14
16
|
}
|
|
@@ -40,8 +42,48 @@
|
|
|
40
42
|
--mds-table-cell-background: var(--mds-table-body-background-hover);
|
|
41
43
|
}
|
|
42
44
|
|
|
45
|
+
.actions-view {
|
|
46
|
+
align-items: center;
|
|
47
|
+
display: flex;
|
|
48
|
+
inset: 0;
|
|
49
|
+
justify-content: end;
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
position: absolute;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.actions {
|
|
55
|
+
align-items: center;
|
|
56
|
+
background-color: var(--mds-table-cell-background);
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
gap: var(--mds-table-row-actions-gap);
|
|
59
|
+
inset: 0;
|
|
60
|
+
margin-right: 100%;
|
|
61
|
+
padding-right: 0;
|
|
62
|
+
pointer-events: auto;
|
|
63
|
+
position: sticky;
|
|
64
|
+
right: 0;
|
|
65
|
+
transform: translateX(100%);
|
|
66
|
+
transition-duration: 500ms;
|
|
67
|
+
transition-property: transform, background-color, padding-right;
|
|
68
|
+
transition-timing-function: cubic-bezier(0.19, 1, 0.22, 1);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host(:hover) .actions {
|
|
72
|
+
transform: translateX(100%);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
:host([overlay-actions]:not([overlay-actions="false"])) .actions {
|
|
76
|
+
padding-right: var(--mds-table-cell-padding);
|
|
77
|
+
transform: translateX(100%);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
:host([overlay-actions]:not([overlay-actions="false"]):hover) .actions {
|
|
81
|
+
transform: translateX(0);
|
|
82
|
+
}
|
|
83
|
+
|
|
43
84
|
@container style(--magma-pref-animation: reduce) {
|
|
44
|
-
:host
|
|
85
|
+
:host,
|
|
86
|
+
.actions {
|
|
45
87
|
transition-duration: 0s;
|
|
46
88
|
}
|
|
47
89
|
}
|
|
@@ -49,7 +91,8 @@
|
|
|
49
91
|
@container style(--magma-pref-animation: system) {
|
|
50
92
|
|
|
51
93
|
@media (prefers-reduced-motion) {
|
|
52
|
-
:host
|
|
94
|
+
:host,
|
|
95
|
+
.actions {
|
|
53
96
|
transition-duration: 0s;
|
|
54
97
|
}
|
|
55
98
|
}
|
|
@@ -1,16 +1,36 @@
|
|
|
1
1
|
import { Host, h } from "@stencil/core";
|
|
2
|
+
// import { isMobileDevice } from '@common/device'
|
|
3
|
+
// import clsx from 'clsx'
|
|
2
4
|
/**
|
|
3
5
|
* @slot default - Put `mds-table-cell` element/s.
|
|
4
6
|
*/
|
|
5
7
|
export class MdsTableRow {
|
|
6
8
|
constructor() {
|
|
7
9
|
this.interactive = undefined;
|
|
10
|
+
this.overlayActions = undefined;
|
|
8
11
|
}
|
|
9
12
|
tableInteractiveHandler(event) {
|
|
10
13
|
this.interactive = event.detail;
|
|
11
14
|
}
|
|
15
|
+
componentWillLoad() {
|
|
16
|
+
this.hasActions = this.host.querySelector('[slot="action"]') !== null;
|
|
17
|
+
}
|
|
18
|
+
componentDidLoad() {
|
|
19
|
+
var _a;
|
|
20
|
+
if (this.hasActions) {
|
|
21
|
+
this.actions = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.actions');
|
|
22
|
+
this.sizerWidth = `${this.actions.offsetWidth.toString()}px`;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
12
25
|
render() {
|
|
13
|
-
return (h(Host, { key: '
|
|
26
|
+
return (h(Host, { key: '44d102599e90a2abb4cf32ea398d6c3f194e6177', role: "row" }, h("slot", { key: '3bc595925a4dafac49d206692fae394754b10d70' }), this.hasActions &&
|
|
27
|
+
h("mds-table-cell", { key: '8b1a1b0e32db91cc03988de856fea521d25b8424', class: "actions-cell" }, h("div", { key: '5867330d68358f30429123a85027b72def045933', class: "actions-sizer", style: {
|
|
28
|
+
minHeight: '1px',
|
|
29
|
+
maxWidth: this.sizerWidth,
|
|
30
|
+
minWidth: this.sizerWidth,
|
|
31
|
+
} }), h("div", { key: '15d6e37bb432b0671e8a5fa447a17fde060e2d60', class: "actions-view" }, h("div", { key: '63cf3b620e6c428ce7cb318e07fb35cec631b0c3', class: "actions", style: {
|
|
32
|
+
marginRight: `calc(${this.sizerWidth} + var(--mds-table-cell-padding))`,
|
|
33
|
+
} }, h("slot", { key: '0a479f584fd1ed0c927b39006de79747c7e3ed87', name: "action" }))))));
|
|
14
34
|
}
|
|
15
35
|
static get is() { return "mds-table-row"; }
|
|
16
36
|
static get encapsulation() { return "shadow"; }
|
|
@@ -42,9 +62,27 @@ export class MdsTableRow {
|
|
|
42
62
|
},
|
|
43
63
|
"attribute": "interactive",
|
|
44
64
|
"reflect": true
|
|
65
|
+
},
|
|
66
|
+
"overlayActions": {
|
|
67
|
+
"type": "boolean",
|
|
68
|
+
"mutable": true,
|
|
69
|
+
"complexType": {
|
|
70
|
+
"original": "boolean",
|
|
71
|
+
"resolved": "boolean",
|
|
72
|
+
"references": {}
|
|
73
|
+
},
|
|
74
|
+
"required": false,
|
|
75
|
+
"optional": false,
|
|
76
|
+
"docs": {
|
|
77
|
+
"tags": [],
|
|
78
|
+
"text": ""
|
|
79
|
+
},
|
|
80
|
+
"attribute": "overlay-actions",
|
|
81
|
+
"reflect": true
|
|
45
82
|
}
|
|
46
83
|
};
|
|
47
84
|
}
|
|
85
|
+
static get elementRef() { return "host"; }
|
|
48
86
|
static get listeners() {
|
|
49
87
|
return [{
|
|
50
88
|
"name": "mdsTableInteractiveChange",
|
|
@@ -1,61 +1,119 @@
|
|
|
1
1
|
const fileExtensionsDictionary = {
|
|
2
|
-
'7z': { format: 'archive', description: '
|
|
3
|
-
ace: { format: 'archive', description: '
|
|
4
|
-
ai: { format: 'vector', description: '
|
|
5
|
-
dart: { format: 'code', description: '
|
|
6
|
-
db: { format: 'data', description: '
|
|
7
|
-
default: { format: 'attachment', description: '
|
|
8
|
-
dmg: { format: 'executable', description: '
|
|
9
|
-
doc: { format: 'text', description: '
|
|
10
|
-
docm: { format: 'text', description: '
|
|
11
|
-
docx: { format: 'text', description: '
|
|
12
|
-
eml: { format: 'email', description: '
|
|
13
|
-
eps: { format: 'vector', description: '
|
|
14
|
-
exe: { format: 'executable', description: '
|
|
15
|
-
flac: { format: 'audio', description: '
|
|
16
|
-
gif: { format: 'image', description: '
|
|
17
|
-
htm: { format: 'markup', description: '
|
|
18
|
-
heic: { format: 'image', description: '
|
|
19
|
-
html: { format: 'markup', description: '
|
|
20
|
-
jpe: { format: 'image', description: '
|
|
21
|
-
jpeg: { format: 'image', description: '
|
|
22
|
-
jpg: { format: 'image', description: '
|
|
23
|
-
js: { format: 'code', description: '
|
|
24
|
-
json: { format: 'data', description: '
|
|
25
|
-
jsx: { format: 'code', description: '
|
|
26
|
-
m2v: { format: 'video', description: '
|
|
27
|
-
mp2: { format: 'audio', description: '
|
|
28
|
-
mp3: { format: 'audio', description: '
|
|
29
|
-
mp4: { format: 'video', description: '
|
|
30
|
-
mp4v: { format: 'video', description: '
|
|
31
|
-
mpeg: { format: 'video', description: '
|
|
32
|
-
mpg4: { format: 'video', description: '
|
|
33
|
-
mpg: { format: 'video', description: '
|
|
34
|
-
mpga: { format: 'audio', description: '
|
|
35
|
-
odp: { format: 'slide', description: '
|
|
36
|
-
ods: { format: 'spreadsheet', description: '
|
|
37
|
-
odt: { format: 'text', description: '
|
|
38
|
-
pdf: { format: 'document', description: '
|
|
39
|
-
php: { format: 'code', description: '
|
|
40
|
-
png: { format: 'image', description: '
|
|
41
|
-
ppt: { format: 'slide', description: '
|
|
42
|
-
rar: { format: 'archive', description: '
|
|
43
|
-
rtf: { format: 'text', description: '
|
|
44
|
-
sass: { format: 'code', description: '
|
|
45
|
-
shtml: { format: 'markup', description: '
|
|
46
|
-
svg: { format: 'vector', description: '
|
|
47
|
-
tar: { format: 'archive', description: '
|
|
48
|
-
tiff: { format: 'image', description: '
|
|
49
|
-
ts: { format: 'code', description: '
|
|
50
|
-
tsx: { format: 'code', description: '
|
|
51
|
-
txt: { format: 'text', description: '
|
|
52
|
-
wav: { format: 'audio', description: '
|
|
53
|
-
webp: { format: 'image', description: '
|
|
54
|
-
xar: { format: 'archive', description: '
|
|
55
|
-
xls: { format: 'spreadsheet', description: '
|
|
56
|
-
xlsx: { format: 'spreadsheet', description: '
|
|
57
|
-
zip: { format: 'archive', description: '
|
|
2
|
+
'7z': { format: 'archive', description: 'compressedArchive' },
|
|
3
|
+
ace: { format: 'archive', description: 'compressedArchive' },
|
|
4
|
+
ai: { format: 'vector', description: 'fileAI' },
|
|
5
|
+
dart: { format: 'code', description: 'dart' },
|
|
6
|
+
db: { format: 'data', description: 'fileDB' },
|
|
7
|
+
default: { format: 'attachment', description: 'unknown' },
|
|
8
|
+
dmg: { format: 'executable', description: 'appleDiskImage' },
|
|
9
|
+
doc: { format: 'text', description: 'documentMS' },
|
|
10
|
+
docm: { format: 'text', description: 'documentMS' },
|
|
11
|
+
docx: { format: 'text', description: 'compressedDocumentMS' },
|
|
12
|
+
eml: { format: 'email', description: 'email' },
|
|
13
|
+
eps: { format: 'vector', description: 'fileEPS' },
|
|
14
|
+
exe: { format: 'executable', description: 'fileEXE' },
|
|
15
|
+
flac: { format: 'audio', description: 'uncompressedAudio' },
|
|
16
|
+
gif: { format: 'image', description: 'compressedImage', preview: true },
|
|
17
|
+
htm: { format: 'markup', description: 'documentWeb' },
|
|
18
|
+
heic: { format: 'image', description: 'imageHEFF' },
|
|
19
|
+
html: { format: 'markup', description: 'documentWeb' },
|
|
20
|
+
jpe: { format: 'image', description: 'compressedImage', preview: true },
|
|
21
|
+
jpeg: { format: 'image', description: 'compressedImage', preview: true },
|
|
22
|
+
jpg: { format: 'image', description: 'compressedImage', preview: true },
|
|
23
|
+
js: { format: 'code', description: 'fileJS' },
|
|
24
|
+
json: { format: 'data', description: 'fileJSON' },
|
|
25
|
+
jsx: { format: 'code', description: 'fileJS' },
|
|
26
|
+
m2v: { format: 'video', description: 'videoSD' },
|
|
27
|
+
mp2: { format: 'audio', description: 'compressedAudio' },
|
|
28
|
+
mp3: { format: 'audio', description: 'compressedAudio' },
|
|
29
|
+
mp4: { format: 'video', description: 'videoHD' },
|
|
30
|
+
mp4v: { format: 'video', description: 'videoHD' },
|
|
31
|
+
mpeg: { format: 'video', description: 'videoSD' },
|
|
32
|
+
mpg4: { format: 'video', description: 'videoSD' },
|
|
33
|
+
mpg: { format: 'video', description: 'videoSD' },
|
|
34
|
+
mpga: { format: 'audio', description: 'compressedAudio' },
|
|
35
|
+
odp: { format: 'slide', description: 'slideLO' },
|
|
36
|
+
ods: { format: 'spreadsheet', description: 'spreadsheetLO' },
|
|
37
|
+
odt: { format: 'text', description: 'documentLO' },
|
|
38
|
+
pdf: { format: 'document', description: 'documentAdobe' },
|
|
39
|
+
php: { format: 'code', description: 'filePHP' },
|
|
40
|
+
png: { format: 'image', description: 'imagePNG', preview: true },
|
|
41
|
+
ppt: { format: 'slide', description: 'slidePowerPoint' },
|
|
42
|
+
rar: { format: 'archive', description: 'compressedArchive' },
|
|
43
|
+
rtf: { format: 'text', description: 'documentRTF' },
|
|
44
|
+
sass: { format: 'code', description: 'fileSASS' },
|
|
45
|
+
shtml: { format: 'markup', description: 'documentWeb' },
|
|
46
|
+
svg: { format: 'vector', description: 'imageSVG', preview: true },
|
|
47
|
+
tar: { format: 'archive', description: 'uncompressedArchive' },
|
|
48
|
+
tiff: { format: 'image', description: 'imageTIFF' },
|
|
49
|
+
ts: { format: 'code', description: 'fileTS' },
|
|
50
|
+
tsx: { format: 'code', description: 'fileTSX' },
|
|
51
|
+
txt: { format: 'text', description: 'documentTXT' },
|
|
52
|
+
wav: { format: 'audio', description: 'uncompressedAudio' },
|
|
53
|
+
webp: { format: 'image', description: 'imageWEBP', preview: true },
|
|
54
|
+
xar: { format: 'archive', description: 'compressedArchive' },
|
|
55
|
+
xls: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
56
|
+
xlsx: { format: 'spreadsheet', description: 'spreadsheetMS' },
|
|
57
|
+
zip: { format: 'archive', description: 'compressedArchive' },
|
|
58
58
|
};
|
|
59
|
+
// const fileExtensionsDictionary: FileExtenstion = {
|
|
60
|
+
// '7z': { format: 'archive', description: 'Archivio compresso' },
|
|
61
|
+
// ace: { format: 'archive', description: 'Archivio compresso' },
|
|
62
|
+
// ai: { format: 'vector', description: 'Vettoriale Adobe Illustrator' },
|
|
63
|
+
// dart: { format: 'code', description: 'Dart' },
|
|
64
|
+
// db: { format: 'data', description: 'File di database' },
|
|
65
|
+
// default: { format: 'attachment', description: 'Formato sconosciuto' },
|
|
66
|
+
// dmg: { format: 'executable', description: 'Apple Disk Image' },
|
|
67
|
+
// doc: { format: 'text', description: 'Documento Microsoft Word' },
|
|
68
|
+
// docm: { format: 'text', description: 'Documento Microsoft Word' },
|
|
69
|
+
// docx: { format: 'text', description: 'Documento Microsoft Word Compresso' },
|
|
70
|
+
// eml: { format: 'email', description: 'E-mail di posta elettronica' },
|
|
71
|
+
// eps: { format: 'vector', description: 'Vettoriale Corel Draw' },
|
|
72
|
+
// exe: { format: 'executable', description: 'File eseguibile Windows' },
|
|
73
|
+
// flac: { format: 'audio', description: 'Audio non compresso' },
|
|
74
|
+
// gif: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
75
|
+
// htm: { format: 'markup', description: 'Pagina web' },
|
|
76
|
+
// heic: { format: 'image', description: 'High Efficiency Image File Format' },
|
|
77
|
+
// html: { format: 'markup', description: 'Pagina web' },
|
|
78
|
+
// jpe: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
79
|
+
// jpeg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
80
|
+
// jpg: { format: 'image', description: 'Immagine compressa', preview: true },
|
|
81
|
+
// js: { format: 'code', description: 'JavaScript' },
|
|
82
|
+
// json: { format: 'data', description: 'JavaScript Object Notation' },
|
|
83
|
+
// jsx: { format: 'code', description: 'JavaScript' },
|
|
84
|
+
// m2v: { format: 'video', description: 'Filmato SD' },
|
|
85
|
+
// mp2: { format: 'audio', description: 'Audio compresso' },
|
|
86
|
+
// mp3: { format: 'audio', description: 'Audio compresso' },
|
|
87
|
+
// mp4: { format: 'video', description: 'Filmato HD' },
|
|
88
|
+
// mp4v: { format: 'video', description: 'Filmato HD' },
|
|
89
|
+
// mpeg: { format: 'video', description: 'Filmato SD' },
|
|
90
|
+
// mpg4: { format: 'video', description: 'Filmato SD' },
|
|
91
|
+
// mpg: { format: 'video', description: 'Filmato SD' },
|
|
92
|
+
// mpga: { format: 'audio', description: 'Audio compresso' },
|
|
93
|
+
// odp: { format: 'slide', description: 'Slide di presentazione LibreOffice' },
|
|
94
|
+
// ods: { format: 'spreadsheet', description: 'Foglio di calcolo LibreOffice' },
|
|
95
|
+
// odt: { format: 'text', description: 'File di testo LibreOffice' },
|
|
96
|
+
// pdf: { format: 'document', description: 'Documento Adobe' },
|
|
97
|
+
// php: { format: 'code', description: 'Hypertext Preprocessor' },
|
|
98
|
+
// png: { format: 'image', description: 'Immagine Portable Network Graphics', preview: true },
|
|
99
|
+
// ppt: { format: 'slide', description: 'Slide di presentazione PowerPoint' },
|
|
100
|
+
// rar: { format: 'archive', description: 'Archivio compresso' },
|
|
101
|
+
// rtf: { format: 'text', description: 'Documento di testo Rich Text Format' },
|
|
102
|
+
// sass: { format: 'code', description: 'Syntactically Awesome StyleSheets' },
|
|
103
|
+
// shtml: { format: 'markup', description: 'Pagina web' },
|
|
104
|
+
// svg: { format: 'vector', description: 'Scalable Vector Graphics', preview: true },
|
|
105
|
+
// tar: { format: 'archive', description: 'Archivio non compresso' },
|
|
106
|
+
// tiff: { format: 'image', description: 'Tag Image File Format' },
|
|
107
|
+
// ts: { format: 'code', description: 'TypeScript' },
|
|
108
|
+
// tsx: { format: 'code', description: 'TypeScript Extended Syntax' },
|
|
109
|
+
// txt: { format: 'text', description: 'Documento di testo non formattato' },
|
|
110
|
+
// wav: { format: 'audio', description: 'Audio non compresso' },
|
|
111
|
+
// webp: { format: 'image', description: 'Immagine Web Picture', preview: true },
|
|
112
|
+
// xar: { format: 'archive', description: 'Archivio compresso' },
|
|
113
|
+
// xls: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
114
|
+
// xlsx: { format: 'spreadsheet', description: 'Foglio di calcolo Office' },
|
|
115
|
+
// zip: { format: 'archive', description: 'Archivio compresso' },
|
|
116
|
+
// }
|
|
59
117
|
const genericMimeToExt = new Map([
|
|
60
118
|
['image', ['.png', '.jpg', '.jpeg', '.tiff', '.webp', '.jpe', '.gif', '.heic']],
|
|
61
119
|
['audio', ['.mp2', '.mp3', '.mpga', '.wav', '.flac']],
|