@everymatrix/pam-consent-modal 0.1.3 → 0.2.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.
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'pam-consent-modal';
2
- const BUILD = /* pam-consent-modal */ { 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: true, element: false, event: false, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, 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: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: false, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
2
+ const BUILD = /* pam-consent-modal */ { 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: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, 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: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -49,10 +49,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
49
49
  }
50
50
  switch(bundleId) {
51
51
 
52
- case 'pam-consent-modal':
52
+ case 'pam-consent-item_2':
53
53
  return import(
54
54
  /* webpackMode: "lazy" */
55
- './pam-consent-modal.entry.js').then(processMod, consoleError);
55
+ './pam-consent-item_2.entry.js').then(processMod, consoleError);
56
56
  }
57
57
  }
58
58
  return import(
@@ -227,6 +227,7 @@ var uniqueTime = (key, measureText) => {
227
227
  };
228
228
  var h = (nodeName, vnodeData, ...children) => {
229
229
  let child = null;
230
+ let key = null;
230
231
  let simple = false;
231
232
  let lastSimple = false;
232
233
  const vNodeChildren = [];
@@ -250,6 +251,9 @@ var h = (nodeName, vnodeData, ...children) => {
250
251
  };
251
252
  walk(children);
252
253
  if (vnodeData) {
254
+ if (vnodeData.key) {
255
+ key = vnodeData.key;
256
+ }
253
257
  {
254
258
  const classData = vnodeData.className || vnodeData.class;
255
259
  if (classData) {
@@ -262,6 +266,9 @@ var h = (nodeName, vnodeData, ...children) => {
262
266
  if (vNodeChildren.length > 0) {
263
267
  vnode.$children$ = vNodeChildren;
264
268
  }
269
+ {
270
+ vnode.$key$ = key;
271
+ }
265
272
  return vnode;
266
273
  };
267
274
  var newVNode = (tag, text) => {
@@ -275,6 +282,9 @@ var newVNode = (tag, text) => {
275
282
  {
276
283
  vnode.$attrs$ = null;
277
284
  }
285
+ {
286
+ vnode.$key$ = null;
287
+ }
278
288
  return vnode;
279
289
  };
280
290
  var Host = {};
@@ -291,6 +301,22 @@ var parsePropertyValue = (propValue, propType) => {
291
301
  }
292
302
  return propValue;
293
303
  };
304
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
305
+
306
+ // src/runtime/event-emitter.ts
307
+ var createEvent = (ref, name, flags) => {
308
+ const elm = getElement(ref);
309
+ return {
310
+ emit: (detail) => {
311
+ return emitEvent(elm, name, {
312
+ bubbles: !!(flags & 4 /* Bubbles */),
313
+ composed: !!(flags & 2 /* Composed */),
314
+ cancelable: !!(flags & 1 /* Cancellable */),
315
+ detail
316
+ });
317
+ }
318
+ };
319
+ };
294
320
  var emitEvent = (elm, name, opts) => {
295
321
  const ev = plt.ce(name, opts);
296
322
  elm.dispatchEvent(ev);
@@ -372,7 +398,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
372
398
  const newClasses = parseClassList(newValue);
373
399
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
374
400
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
375
- } else if (memberName === "ref") {
401
+ } else if (memberName === "key") ; else if (memberName === "ref") {
376
402
  if (newValue) {
377
403
  newValue(elm);
378
404
  }
@@ -536,6 +562,8 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
536
562
  var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
537
563
  let oldStartIdx = 0;
538
564
  let newStartIdx = 0;
565
+ let idxInOld = 0;
566
+ let i2 = 0;
539
567
  let oldEndIdx = oldCh.length - 1;
540
568
  let oldStartVnode = oldCh[0];
541
569
  let oldEndVnode = oldCh[oldEndIdx];
@@ -543,6 +571,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
543
571
  let newStartVnode = newCh[0];
544
572
  let newEndVnode = newCh[newEndIdx];
545
573
  let node;
574
+ let elmToMove;
546
575
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
547
576
  if (oldStartVnode == null) {
548
577
  oldStartVnode = oldCh[++oldStartIdx];
@@ -571,7 +600,26 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
571
600
  oldEndVnode = oldCh[--oldEndIdx];
572
601
  newStartVnode = newCh[++newStartIdx];
573
602
  } else {
603
+ idxInOld = -1;
574
604
  {
605
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
606
+ if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
607
+ idxInOld = i2;
608
+ break;
609
+ }
610
+ }
611
+ }
612
+ if (idxInOld >= 0) {
613
+ elmToMove = oldCh[idxInOld];
614
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
615
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
616
+ } else {
617
+ patch(elmToMove, newStartVnode, isInitialRender);
618
+ oldCh[idxInOld] = void 0;
619
+ node = elmToMove.$elm$;
620
+ }
621
+ newStartVnode = newCh[++newStartIdx];
622
+ } else {
575
623
  node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
576
624
  newStartVnode = newCh[++newStartIdx];
577
625
  }
@@ -597,6 +645,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
597
645
  };
598
646
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
599
647
  if (leftVNode.$tag$ === rightVNode.$tag$) {
648
+ if (!isInitialRender) {
649
+ return leftVNode.$key$ === rightVNode.$key$;
650
+ }
600
651
  return true;
601
652
  }
602
653
  return false;
@@ -1222,4 +1273,4 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1222
1273
  // src/runtime/nonce.ts
1223
1274
  var setNonce = (nonce) => plt.$nonce$ = nonce;
1224
1275
 
1225
- export { bootstrapLazy as b, h, promiseResolve as p, registerInstance as r, setNonce as s };
1276
+ export { bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r, setNonce as s };
package/dist/esm/index.js CHANGED
@@ -1,3 +1,2 @@
1
- export { P as PamConsentModal } from './pam-consent-modal-058df025.js';
2
- import './index-25acbfb0.js';
3
- import '@everymatrix/pam-consent-item';
1
+ export { P as PamConsentModal } from './pam-consent-modal-be38f983.js';
2
+ import './index-f4cffab8.js';
@@ -1,11 +1,11 @@
1
- import { b as bootstrapLazy } from './index-25acbfb0.js';
2
- export { s as setNonce } from './index-25acbfb0.js';
1
+ import { b as bootstrapLazy } from './index-f4cffab8.js';
2
+ export { s as setNonce } from './index-f4cffab8.js';
3
3
  import { g as globalScripts } from './app-globals-0f993ce5.js';
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["pam-consent-modal",[[1,"pam-consent-modal",{"endpoint":[513],"session":[513],"userId":[513,"user-id"],"language":[1537],"includeSubmitButton":[516,"include-submit-button"],"includeRejectButton":[516,"include-reject-button"],"includeRejectText":[516,"include-reject-text"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"isLoading":[32],"isValid":[32],"isQueryFired":[32],"receivedQueryResponses":[32],"mandatoryConsentsChecked":[32],"mandatoryConsentsCount":[32],"userConsentTagCodes":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"receivedQueryResponses":["handleQueryResponse"]}]]]], options);
8
+ return bootstrapLazy([["pam-consent-item_2",[[1,"pam-consent-modal",{"endpoint":[513],"session":[513],"userId":[513,"user-id"],"language":[1537],"includeSubmitButton":[516,"include-submit-button"],"includeRejectButton":[516,"include-reject-button"],"includeRejectText":[516,"include-reject-text"],"translationUrl":[513,"translation-url"],"clientStyling":[1537,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"mbSource":[513,"mb-source"],"isLoading":[32],"isValid":[32],"isQueryFired":[32],"receivedQueryResponses":[32],"mandatoryConsentsChecked":[32],"mandatoryConsentsCount":[32],"userConsentTagCodes":[32]},[[0,"userLegislationConsent","userLegislationConsentHandler"]],{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"],"receivedQueryResponses":["handleQueryResponse"]}],[1,"pam-consent-item",{"language":[1537],"queried":[516],"group":[513],"consentTypes":[513,"consent-types"],"mandatory":[513],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"mbSource":[513,"mb-source"]},null,{"clientStyling":["handleClientStylingChange"],"clientStylingUrl":["handleClientStylingUrlChange"],"mbSource":["handleMbSourceChange"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };