@maggioli-design-system/mds-table-row 4.8.0 → 5.0.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.
Files changed (84) hide show
  1. package/dist/cjs/{index-6ff13374.js → index-41069a63.js} +66 -71
  2. package/dist/cjs/loader.cjs.js +2 -2
  3. package/dist/cjs/mds-table-row.cjs.entry.js +905 -12
  4. package/dist/cjs/mds-table-row.cjs.js +2 -2
  5. package/dist/collection/common/slot.js +13 -0
  6. package/dist/collection/components/mds-table-row/mds-table-row.css +58 -59
  7. package/dist/collection/components/mds-table-row/mds-table-row.js +123 -20
  8. package/dist/collection/dictionary/animation.js +5 -0
  9. package/dist/collection/dictionary/file-extensions.js +6 -59
  10. package/dist/collection/fixtures/filenames.js +62 -1
  11. package/dist/collection/type/animation.js +1 -0
  12. package/dist/collection/type/variant-file-format.js +5 -0
  13. package/dist/components/mds-table-row.js +912 -14
  14. package/dist/documentation.json +108 -13
  15. package/dist/esm/{index-0a14d3b4.js → index-b3683315.js} +66 -71
  16. package/dist/esm/loader.js +3 -3
  17. package/dist/esm/mds-table-row.entry.js +905 -12
  18. package/dist/esm/mds-table-row.js +3 -3
  19. package/dist/esm-es5/index-b3683315.js +1 -0
  20. package/dist/esm-es5/loader.js +1 -1
  21. package/dist/esm-es5/mds-table-row.entry.js +6 -1
  22. package/dist/esm-es5/mds-table-row.js +1 -1
  23. package/dist/mds-table-row/mds-table-row.esm.js +1 -1
  24. package/dist/mds-table-row/mds-table-row.js +1 -1
  25. package/dist/mds-table-row/p-6e0586ed.system.entry.js +6 -0
  26. package/dist/mds-table-row/p-883b6082.entry.js +6 -0
  27. package/dist/mds-table-row/p-94f5e1a3.system.js +2 -0
  28. package/dist/mds-table-row/p-953317ff.js +2 -0
  29. package/dist/mds-table-row/p-ca6821e0.system.js +1 -0
  30. package/dist/stats.json +241 -68
  31. package/dist/types/common/slot.d.ts +2 -0
  32. package/dist/types/components/mds-table-row/mds-table-row.d.ts +12 -3
  33. package/dist/types/components.d.ts +8 -1
  34. package/dist/types/dictionary/animation.d.ts +2 -0
  35. package/dist/types/fixtures/filenames.d.ts +62 -1
  36. package/dist/types/type/animation.d.ts +1 -0
  37. package/dist/types/type/file-types.d.ts +1 -1
  38. package/dist/types/type/variant-file-format.d.ts +1 -1
  39. package/documentation.json +138 -21
  40. package/package.json +2 -2
  41. package/readme.md +37 -4
  42. package/src/common/slot.ts +15 -0
  43. package/src/components/mds-table-row/css/mds-table-row-actions.css +45 -0
  44. package/src/components/mds-table-row/css/mds-table-row-interactive.css +6 -0
  45. package/src/components/mds-table-row/css/mds-table-row-pref-animation.css +4 -2
  46. package/src/components/mds-table-row/css/mds-table-row-selected.css +5 -0
  47. package/src/components/mds-table-row/css/mds-table-row-sorted.css +11 -0
  48. package/src/components/mds-table-row/mds-table-row.css +12 -83
  49. package/src/components/mds-table-row/mds-table-row.tsx +63 -16
  50. package/src/components/mds-table-row/meta/locale.el.json +4 -0
  51. package/src/components/mds-table-row/meta/locale.en.json +4 -0
  52. package/src/components/mds-table-row/meta/locale.es.json +4 -0
  53. package/src/components/mds-table-row/meta/locale.it.json +4 -0
  54. package/src/components/mds-table-row/readme.md +20 -4
  55. package/src/components.d.ts +8 -1
  56. package/src/dictionary/animation.ts +8 -0
  57. package/src/dictionary/file-extensions.ts +6 -60
  58. package/src/fixtures/filenames.ts +63 -0
  59. package/src/fixtures/icons.json +1 -0
  60. package/src/meta/file-format/locale.el.json +26 -21
  61. package/src/meta/file-format/locale.en.json +26 -21
  62. package/src/meta/file-format/locale.es.json +26 -21
  63. package/src/meta/file-format/locale.it.json +26 -21
  64. package/src/type/animation.ts +3 -0
  65. package/src/type/file-types.ts +6 -0
  66. package/src/type/variant-file-format.ts +6 -0
  67. package/www/build/mds-table-row.esm.js +1 -1
  68. package/www/build/mds-table-row.js +1 -1
  69. package/www/build/p-6e0586ed.system.entry.js +6 -0
  70. package/www/build/p-883b6082.entry.js +6 -0
  71. package/www/build/p-94f5e1a3.system.js +2 -0
  72. package/www/build/p-953317ff.js +2 -0
  73. package/www/build/p-ca6821e0.system.js +1 -0
  74. package/dist/esm-es5/index-0a14d3b4.js +0 -1
  75. package/dist/mds-table-row/p-25a5e94e.system.js +0 -1
  76. package/dist/mds-table-row/p-33796315.entry.js +0 -1
  77. package/dist/mds-table-row/p-580bb30b.system.js +0 -2
  78. package/dist/mds-table-row/p-60aa058b.js +0 -2
  79. package/dist/mds-table-row/p-cca5599e.system.entry.js +0 -1
  80. package/www/build/p-25a5e94e.system.js +0 -1
  81. package/www/build/p-33796315.entry.js +0 -1
  82. package/www/build/p-580bb30b.system.js +0 -2
  83. package/www/build/p-60aa058b.js +0 -2
  84. package/www/build/p-cca5599e.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: 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 };
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: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, 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: true, 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: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, 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
@@ -41,6 +41,9 @@ var registerHost = (hostElement, cmpMeta) => {
41
41
  $cmpMeta$: cmpMeta,
42
42
  $instanceValues$: /* @__PURE__ */ new Map()
43
43
  };
44
+ {
45
+ hostRef.$onInstancePromise$ = new Promise((r) => hostRef.$onInstanceResolve$ = r);
46
+ }
44
47
  {
45
48
  hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
46
49
  hostElement["s-p"] = [];
@@ -106,22 +109,6 @@ var plt = {
106
109
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
107
110
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
108
111
  };
109
- var supportsListenerOptions = /* @__PURE__ */ (() => {
110
- let supportsListenerOptions2 = false;
111
- try {
112
- doc.addEventListener(
113
- "e",
114
- null,
115
- Object.defineProperty({}, "passive", {
116
- get() {
117
- supportsListenerOptions2 = true;
118
- }
119
- })
120
- );
121
- } catch (e) {
122
- }
123
- return supportsListenerOptions2;
124
- })();
125
112
  var promiseResolve = (v) => Promise.resolve(v);
126
113
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
127
114
  try {
@@ -417,14 +404,53 @@ var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
417
404
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
418
405
  if (oldValue !== newValue) {
419
406
  let isProp = isMemberInElement(elm, memberName);
420
- memberName.toLowerCase();
407
+ let ln = memberName.toLowerCase();
421
408
  if (memberName === "class") {
422
409
  const classList = elm.classList;
423
410
  const oldClasses = parseClassList(oldValue);
424
411
  const newClasses = parseClassList(newValue);
425
412
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
426
413
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
427
- } else if (memberName === "key") ; else {
414
+ } else if (memberName === "style") {
415
+ {
416
+ for (const prop in oldValue) {
417
+ if (!newValue || newValue[prop] == null) {
418
+ if (prop.includes("-")) {
419
+ elm.style.removeProperty(prop);
420
+ } else {
421
+ elm.style[prop] = "";
422
+ }
423
+ }
424
+ }
425
+ }
426
+ for (const prop in newValue) {
427
+ if (!oldValue || newValue[prop] !== oldValue[prop]) {
428
+ if (prop.includes("-")) {
429
+ elm.style.setProperty(prop, newValue[prop]);
430
+ } else {
431
+ elm.style[prop] = newValue[prop];
432
+ }
433
+ }
434
+ }
435
+ } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
436
+ if (memberName[2] === "-") {
437
+ memberName = memberName.slice(3);
438
+ } else if (isMemberInElement(win, ln)) {
439
+ memberName = ln.slice(2);
440
+ } else {
441
+ memberName = ln[2] + memberName.slice(3);
442
+ }
443
+ if (oldValue || newValue) {
444
+ const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
445
+ memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
446
+ if (oldValue) {
447
+ plt.rel(elm, memberName, oldValue, capture);
448
+ }
449
+ if (newValue) {
450
+ plt.ael(elm, memberName, newValue, capture);
451
+ }
452
+ }
453
+ } else {
428
454
  const isComplex = isComplexType(newValue);
429
455
  if ((isProp || isComplex && newValue !== null) && !isSvg) {
430
456
  try {
@@ -462,6 +488,8 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
462
488
  };
463
489
  var parseClassListRegex = /\s/;
464
490
  var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
491
+ var CAPTURE_EVENT_SUFFIX = "Capture";
492
+ var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
465
493
 
466
494
  // src/runtime/vdom/update-element.ts
467
495
  var updateElement = (oldVnode, newVnode, isSvgMode2) => {
@@ -737,13 +765,6 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
737
765
  }
738
766
  let maybePromise;
739
767
  if (isInitialLoad) {
740
- {
741
- hostRef.$flags$ |= 256 /* isListenReady */;
742
- if (hostRef.$queuedListeners$) {
743
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
744
- hostRef.$queuedListeners$ = void 0;
745
- }
746
- }
747
768
  {
748
769
  maybePromise = safeCall(instance, "componentWillLoad");
749
770
  }
@@ -811,12 +832,16 @@ var postUpdateComponent = (hostRef) => {
811
832
  const tagName = hostRef.$cmpMeta$.$tagName$;
812
833
  const elm = hostRef.$hostElement$;
813
834
  const endPostUpdate = createTime("postUpdate", tagName);
835
+ const instance = hostRef.$lazyInstance$ ;
814
836
  const ancestorComponent = hostRef.$ancestorComponent$;
815
837
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
816
838
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
817
839
  {
818
840
  addHydratedFlag(elm);
819
841
  }
842
+ {
843
+ safeCall(instance, "componentDidLoad");
844
+ }
820
845
  endPostUpdate();
821
846
  {
822
847
  hostRef.$onReadyResolve$(elm);
@@ -827,6 +852,9 @@ var postUpdateComponent = (hostRef) => {
827
852
  } else {
828
853
  endPostUpdate();
829
854
  }
855
+ {
856
+ hostRef.$onInstanceResolve$(elm);
857
+ }
830
858
  {
831
859
  if (hostRef.$onRenderResolve$) {
832
860
  hostRef.$onRenderResolve$();
@@ -902,6 +930,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
902
930
  configurable: true,
903
931
  enumerable: true
904
932
  });
933
+ } else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
934
+ Object.defineProperty(prototype, memberName, {
935
+ value(...args) {
936
+ var _a2;
937
+ const ref = getHostRef(this);
938
+ return (_a2 = ref == null ? void 0 : ref.$onInstancePromise$) == null ? void 0 : _a2.then(() => {
939
+ var _a3;
940
+ return (_a3 = ref.$lazyInstance$) == null ? void 0 : _a3[memberName](...args);
941
+ });
942
+ }
943
+ });
905
944
  }
906
945
  });
907
946
  if ((flags & 1 /* isElementConstructor */)) {
@@ -1046,7 +1085,6 @@ var connectedCallback = (elm) => {
1046
1085
  initializeComponent(elm, hostRef, cmpMeta);
1047
1086
  }
1048
1087
  } else {
1049
- addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1050
1088
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1051
1089
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1052
1090
  }
@@ -1059,12 +1097,6 @@ var disconnectInstance = (instance) => {
1059
1097
  var disconnectedCallback = async (elm) => {
1060
1098
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1061
1099
  const hostRef = getHostRef(elm);
1062
- {
1063
- if (hostRef.$rmListeners$) {
1064
- hostRef.$rmListeners$.map((rmListener) => rmListener());
1065
- hostRef.$rmListeners$ = void 0;
1066
- }
1067
- }
1068
1100
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1069
1101
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1070
1102
  }
@@ -1101,9 +1133,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1101
1133
  {
1102
1134
  cmpMeta.$members$ = compactMeta[2];
1103
1135
  }
1104
- {
1105
- cmpMeta.$listeners$ = compactMeta[3];
1106
- }
1107
1136
  {
1108
1137
  cmpMeta.$attrsToReflect$ = [];
1109
1138
  }
@@ -1132,10 +1161,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1132
1161
  }
1133
1162
  }
1134
1163
  connectedCallback() {
1135
- const hostRef = getHostRef(this);
1164
+ getHostRef(this);
1136
1165
  if (!this.hasRegisteredEventListeners) {
1137
1166
  this.hasRegisteredEventListeners = true;
1138
- addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1139
1167
  }
1140
1168
  if (appLoadFallback) {
1141
1169
  clearTimeout(appLoadFallback);
@@ -1190,39 +1218,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1190
1218
  }
1191
1219
  endBootstrap();
1192
1220
  };
1193
- var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1194
- if (listeners) {
1195
- listeners.map(([flags, name, method]) => {
1196
- const target = getHostListenerTarget(elm, flags) ;
1197
- const handler = hostListenerProxy(hostRef, method);
1198
- const opts = hostListenerOpts(flags);
1199
- plt.ael(target, name, handler, opts);
1200
- (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1201
- });
1202
- }
1203
- };
1204
- var hostListenerProxy = (hostRef, methodName) => (ev) => {
1205
- var _a;
1206
- try {
1207
- {
1208
- if (hostRef.$flags$ & 256 /* isListenReady */) {
1209
- (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1210
- } else {
1211
- (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1212
- }
1213
- }
1214
- } catch (e) {
1215
- consoleError(e);
1216
- }
1217
- };
1218
- var getHostListenerTarget = (elm, flags) => {
1219
- if (flags & 4 /* TargetDocument */) return doc;
1220
- return elm;
1221
- };
1222
- var hostListenerOpts = (flags) => supportsListenerOptions ? {
1223
- passive: (flags & 1 /* Passive */) !== 0,
1224
- capture: (flags & 2 /* Capture */) !== 0
1225
- } : (flags & 2 /* Capture */) !== 0;
1226
1221
 
1227
1222
  // src/runtime/nonce.ts
1228
1223
  var setNonce = (nonce) => plt.$nonce$ = nonce;
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-6ff13374.js');
5
+ const index = require('./index-41069a63.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],"overlayActions":[1540,"overlay-actions"]},[[4,"mdsTableInteractiveChange","tableInteractiveHandler"]]]]]], options);
11
+ return index.bootstrapLazy([["mds-table-row.cjs",[[1,"mds-table-row",{"interactive":[516],"overlayActions":[516,"overlay-actions"],"selectable":[516],"selected":[1540],"value":[520],"language":[32],"updateLang":[64]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;