@mgdis/mg-components 5.21.0 → 5.22.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/{components.utils-cd908d4e.js → components.utils-637c479d.js} +9 -5
- package/dist/cjs/components.utils-637c479d.js.map +1 -0
- package/dist/cjs/{index-8532b5e9.js → index-28bf9033.js} +25 -17
- package/dist/cjs/index-28bf9033.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mg-action-more_34.cjs.entry.js +195 -146
- package/dist/cjs/mg-action-more_34.cjs.entry.js.map +1 -1
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/cjs/mg-components.cjs.js.map +1 -1
- package/dist/cjs/mg-item-more.cjs.entry.js +2 -2
- package/dist/collection/assets/icons/index.js +91 -90
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +3 -1
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js +32 -11
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js +9 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +56 -44
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +6 -10
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +6 -10
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +6 -10
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +6 -10
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +6 -10
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +6 -10
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +6 -10
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js.map +1 -1
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +6 -10
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js.map +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js +1 -1
- package/dist/collection/components/molecules/mg-action-more/mg-action-more.js.map +1 -1
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +27 -10
- package/dist/collection/components/molecules/mg-popover/mg-popover.js.map +1 -1
- package/dist/collection/locales/en/messages.json +4 -2
- package/dist/collection/locales/fr/messages.json +4 -2
- package/dist/collection/utils/behaviors.utils.spec.js +1 -1
- package/dist/collection/utils/behaviors.utils.spec.js.map +1 -1
- package/dist/collection/utils/components.utils.spec.js +1 -1
- package/dist/collection/utils/components.utils.spec.js.map +1 -1
- package/dist/components/index2.js +8 -4
- package/dist/components/index2.js.map +1 -1
- package/dist/components/mg-action-more.js.map +1 -1
- package/dist/components/mg-icon2.js +92 -90
- package/dist/components/mg-icon2.js.map +1 -1
- package/dist/components/mg-input-checkbox-paginated.js +1 -1
- package/dist/components/mg-input-checkbox-paginated2.js +25 -12
- package/dist/components/mg-input-checkbox-paginated2.js.map +1 -1
- package/dist/components/mg-input-checkbox.js +50 -34
- package/dist/components/mg-input-checkbox.js.map +1 -1
- package/dist/components/mg-popover2.js +27 -10
- package/dist/components/mg-popover2.js.map +1 -1
- package/dist/components/mg-tooltip2.js +3 -1
- package/dist/components/mg-tooltip2.js.map +1 -1
- package/dist/esm/{components.utils-0d67c31c.js → components.utils-f7c073a0.js} +9 -5
- package/dist/esm/components.utils-f7c073a0.js.map +1 -0
- package/dist/esm/{index-f34a3a2c.js → index-93dafb06.js} +25 -17
- package/dist/esm/index-93dafb06.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/mg-action-more_34.entry.js +195 -146
- package/dist/esm/mg-action-more_34.entry.js.map +1 -1
- package/dist/esm/mg-components.js +4 -4
- package/dist/esm/mg-components.js.map +1 -1
- package/dist/esm/mg-item-more.entry.js +2 -2
- package/dist/mg-components/locales/en/messages.json +4 -2
- package/dist/mg-components/locales/fr/messages.json +4 -2
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/mg-components.esm.js.map +1 -1
- package/dist/mg-components/p-457dd62a.entry.js +2 -0
- package/dist/mg-components/p-457dd62a.entry.js.map +1 -0
- package/dist/mg-components/{p-ce356bc0.entry.js → p-4fa40a8f.entry.js} +2 -2
- package/dist/mg-components/p-721c4571.js +2 -0
- package/dist/mg-components/{p-af42d17b.js.map → p-721c4571.js.map} +1 -1
- package/dist/mg-components/p-8155d0e2.js +3 -0
- package/dist/mg-components/p-8155d0e2.js.map +1 -0
- package/dist/types/assets/icons/index.d.ts +1 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox-paginated/mg-input-checkbox-paginated.d.ts +4 -4
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.conf.d.ts +8 -0
- package/dist/types/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.d.ts +14 -12
- package/dist/types/components/molecules/mg-action-more/mg-action-more.d.ts +1 -1
- package/dist/types/components/molecules/mg-popover/mg-popover.d.ts +10 -0
- package/dist/types/components.d.ts +10 -2
- package/dist/types/locales/index.d.ts +4 -0
- package/package.json +6 -6
- package/dist/cjs/components.utils-cd908d4e.js.map +0 -1
- package/dist/cjs/index-8532b5e9.js.map +0 -1
- package/dist/esm/components.utils-0d67c31c.js.map +0 -1
- package/dist/esm/index-f34a3a2c.js.map +0 -1
- package/dist/mg-components/p-7444ff40.js +0 -3
- package/dist/mg-components/p-7444ff40.js.map +0 -1
- package/dist/mg-components/p-af42d17b.js +0 -2
- package/dist/mg-components/p-e591ba8f.entry.js +0 -2
- package/dist/mg-components/p-e591ba8f.entry.js.map +0 -1
- /package/dist/mg-components/{p-ce356bc0.entry.js.map → p-4fa40a8f.entry.js.map} +0 -0
|
@@ -858,8 +858,9 @@ const removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
858
858
|
* @param oldCh the old children of the parent node
|
|
859
859
|
* @param newVNode the new VNode which will replace the parent
|
|
860
860
|
* @param newCh the new children of the parent node
|
|
861
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
861
862
|
*/
|
|
862
|
-
const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
863
|
+
const updateChildren = (parentElm, oldCh, newVNode, newCh, isInitialRender = false) => {
|
|
863
864
|
let oldStartIdx = 0;
|
|
864
865
|
let newStartIdx = 0;
|
|
865
866
|
let idxInOld = 0;
|
|
@@ -886,24 +887,24 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
886
887
|
else if (newEndVnode == null) {
|
|
887
888
|
newEndVnode = newCh[--newEndIdx];
|
|
888
889
|
}
|
|
889
|
-
else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
890
|
+
else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
890
891
|
// if the start nodes are the same then we should patch the new VNode
|
|
891
892
|
// onto the old one, and increment our `newStartIdx` and `oldStartIdx`
|
|
892
893
|
// indices to reflect that. We don't need to move any DOM Nodes around
|
|
893
894
|
// since things are matched up in order.
|
|
894
|
-
patch(oldStartVnode, newStartVnode);
|
|
895
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
895
896
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
896
897
|
newStartVnode = newCh[++newStartIdx];
|
|
897
898
|
}
|
|
898
|
-
else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
899
|
+
else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
899
900
|
// likewise, if the end nodes are the same we patch new onto old and
|
|
900
901
|
// decrement our end indices, and also likewise in this case we don't
|
|
901
902
|
// need to move any DOM Nodes.
|
|
902
|
-
patch(oldEndVnode, newEndVnode);
|
|
903
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
903
904
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
904
905
|
newEndVnode = newCh[--newEndIdx];
|
|
905
906
|
}
|
|
906
|
-
else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
907
|
+
else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
907
908
|
// case: "Vnode moved right"
|
|
908
909
|
//
|
|
909
910
|
// We've found that the last node in our window on the new children is
|
|
@@ -921,7 +922,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
921
922
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
922
923
|
putBackInOriginalLocation(oldStartVnode.$elm$.parentNode, false);
|
|
923
924
|
}
|
|
924
|
-
patch(oldStartVnode, newEndVnode);
|
|
925
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
925
926
|
// We need to move the element for `oldStartVnode` into a position which
|
|
926
927
|
// will be appropriate for `newEndVnode`. For this we can use
|
|
927
928
|
// `.insertBefore` and `oldEndVnode.$elm$.nextSibling`. If there is a
|
|
@@ -943,7 +944,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
943
944
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
944
945
|
newEndVnode = newCh[--newEndIdx];
|
|
945
946
|
}
|
|
946
|
-
else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
947
|
+
else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
947
948
|
// case: "Vnode moved left"
|
|
948
949
|
//
|
|
949
950
|
// We've found that the first node in our window on the new children is
|
|
@@ -962,7 +963,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
962
963
|
if ((oldStartVnode.$tag$ === 'slot' || newEndVnode.$tag$ === 'slot')) {
|
|
963
964
|
putBackInOriginalLocation(oldEndVnode.$elm$.parentNode, false);
|
|
964
965
|
}
|
|
965
|
-
patch(oldEndVnode, newStartVnode);
|
|
966
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
966
967
|
// We've already checked above if `oldStartVnode` and `newStartVnode` are
|
|
967
968
|
// the same node, so since we're here we know that they are not. Thus we
|
|
968
969
|
// can move the element for `oldEndVnode` _before_ the element for
|
|
@@ -999,7 +1000,7 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
999
1000
|
node = createElm(oldCh && oldCh[newStartIdx], newVNode, idxInOld, parentElm);
|
|
1000
1001
|
}
|
|
1001
1002
|
else {
|
|
1002
|
-
patch(elmToMove, newStartVnode);
|
|
1003
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1003
1004
|
// invalidate the matching old node so that we won't try to update it
|
|
1004
1005
|
// again later on
|
|
1005
1006
|
oldCh[idxInOld] = undefined;
|
|
@@ -1050,19 +1051,25 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
1050
1051
|
*
|
|
1051
1052
|
* @param leftVNode the first VNode to check
|
|
1052
1053
|
* @param rightVNode the second VNode to check
|
|
1054
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
1053
1055
|
* @returns whether they're equal or not
|
|
1054
1056
|
*/
|
|
1055
|
-
const isSameVnode = (leftVNode, rightVNode) => {
|
|
1057
|
+
const isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1056
1058
|
// compare if two vnode to see if they're "technically" the same
|
|
1057
1059
|
// need to have the same element tag, and same key to be the same
|
|
1058
1060
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1059
1061
|
if (leftVNode.$tag$ === 'slot') {
|
|
1060
1062
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
1061
1063
|
}
|
|
1062
|
-
// this will be set if
|
|
1063
|
-
|
|
1064
|
+
// this will be set if JSX tags in the build have `key` attrs set on them
|
|
1065
|
+
// we only want to check this if we're not on the first render since on
|
|
1066
|
+
// first render `leftVNode.$key$` will always be `null`, so we can be led
|
|
1067
|
+
// astray and, for instance, accidentally delete a DOM node that we want to
|
|
1068
|
+
// keep around.
|
|
1069
|
+
if (!isInitialRender) {
|
|
1064
1070
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
1065
1071
|
}
|
|
1072
|
+
return true;
|
|
1066
1073
|
}
|
|
1067
1074
|
return false;
|
|
1068
1075
|
};
|
|
@@ -1081,8 +1088,9 @@ const parentReferenceNode = (node) => (node['s-ol'] ? node['s-ol'] : node).paren
|
|
|
1081
1088
|
*
|
|
1082
1089
|
* @param oldVNode an old VNode whose DOM element and children we want to update
|
|
1083
1090
|
* @param newVNode a new VNode representing an updated version of the old one
|
|
1091
|
+
* @param isInitialRender whether or not this is the first render of the vdom
|
|
1084
1092
|
*/
|
|
1085
|
-
const patch = (oldVNode, newVNode) => {
|
|
1093
|
+
const patch = (oldVNode, newVNode, isInitialRender = false) => {
|
|
1086
1094
|
const elm = (newVNode.$elm$ = oldVNode.$elm$);
|
|
1087
1095
|
const oldChildren = oldVNode.$children$;
|
|
1088
1096
|
const newChildren = newVNode.$children$;
|
|
@@ -1103,7 +1111,7 @@ const patch = (oldVNode, newVNode) => {
|
|
|
1103
1111
|
if (oldChildren !== null && newChildren !== null) {
|
|
1104
1112
|
// looks like there's child vnodes for both the old and new vnodes
|
|
1105
1113
|
// so we need to call `updateChildren` to reconcile them
|
|
1106
|
-
updateChildren(elm, oldChildren, newVNode, newChildren);
|
|
1114
|
+
updateChildren(elm, oldChildren, newVNode, newChildren, isInitialRender);
|
|
1107
1115
|
}
|
|
1108
1116
|
else if (newChildren !== null) {
|
|
1109
1117
|
// no old child vnodes, but there are new child vnodes to add
|
|
@@ -1383,7 +1391,7 @@ const renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1383
1391
|
checkSlotFallbackVisibility = false;
|
|
1384
1392
|
}
|
|
1385
1393
|
// synchronous patch
|
|
1386
|
-
patch(oldVNode, rootVnode);
|
|
1394
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1387
1395
|
{
|
|
1388
1396
|
// while we're moving nodes around existing nodes, temporarily disable
|
|
1389
1397
|
// the disconnectCallback from working
|
|
@@ -2449,4 +2457,4 @@ const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
|
2449
2457
|
|
|
2450
2458
|
export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
2451
2459
|
|
|
2452
|
-
//# sourceMappingURL=index-
|
|
2460
|
+
//# sourceMappingURL=index-93dafb06.js.map
|