@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.
@@ -21,7 +21,7 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'pam-consent-modal';
24
- 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 };
24
+ 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 };
25
25
 
26
26
  /*
27
27
  Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
@@ -71,10 +71,10 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
71
71
  }
72
72
  switch(bundleId) {
73
73
 
74
- case 'pam-consent-modal.cjs':
74
+ case 'pam-consent-item_2.cjs':
75
75
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
76
76
  /* webpackMode: "lazy" */
77
- './pam-consent-modal.cjs.entry.js')); }).then(processMod, consoleError);
77
+ './pam-consent-item_2.cjs.entry.js')); }).then(processMod, consoleError);
78
78
  }
79
79
  }
80
80
  return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
@@ -249,6 +249,7 @@ var uniqueTime = (key, measureText) => {
249
249
  };
250
250
  var h = (nodeName, vnodeData, ...children) => {
251
251
  let child = null;
252
+ let key = null;
252
253
  let simple = false;
253
254
  let lastSimple = false;
254
255
  const vNodeChildren = [];
@@ -272,6 +273,9 @@ var h = (nodeName, vnodeData, ...children) => {
272
273
  };
273
274
  walk(children);
274
275
  if (vnodeData) {
276
+ if (vnodeData.key) {
277
+ key = vnodeData.key;
278
+ }
275
279
  {
276
280
  const classData = vnodeData.className || vnodeData.class;
277
281
  if (classData) {
@@ -284,6 +288,9 @@ var h = (nodeName, vnodeData, ...children) => {
284
288
  if (vNodeChildren.length > 0) {
285
289
  vnode.$children$ = vNodeChildren;
286
290
  }
291
+ {
292
+ vnode.$key$ = key;
293
+ }
287
294
  return vnode;
288
295
  };
289
296
  var newVNode = (tag, text) => {
@@ -297,6 +304,9 @@ var newVNode = (tag, text) => {
297
304
  {
298
305
  vnode.$attrs$ = null;
299
306
  }
307
+ {
308
+ vnode.$key$ = null;
309
+ }
300
310
  return vnode;
301
311
  };
302
312
  var Host = {};
@@ -313,6 +323,22 @@ var parsePropertyValue = (propValue, propType) => {
313
323
  }
314
324
  return propValue;
315
325
  };
326
+ var getElement = (ref) => getHostRef(ref).$hostElement$ ;
327
+
328
+ // src/runtime/event-emitter.ts
329
+ var createEvent = (ref, name, flags) => {
330
+ const elm = getElement(ref);
331
+ return {
332
+ emit: (detail) => {
333
+ return emitEvent(elm, name, {
334
+ bubbles: !!(flags & 4 /* Bubbles */),
335
+ composed: !!(flags & 2 /* Composed */),
336
+ cancelable: !!(flags & 1 /* Cancellable */),
337
+ detail
338
+ });
339
+ }
340
+ };
341
+ };
316
342
  var emitEvent = (elm, name, opts) => {
317
343
  const ev = plt.ce(name, opts);
318
344
  elm.dispatchEvent(ev);
@@ -394,7 +420,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
394
420
  const newClasses = parseClassList(newValue);
395
421
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
396
422
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
397
- } else if (memberName === "ref") {
423
+ } else if (memberName === "key") ; else if (memberName === "ref") {
398
424
  if (newValue) {
399
425
  newValue(elm);
400
426
  }
@@ -558,6 +584,8 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
558
584
  var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
559
585
  let oldStartIdx = 0;
560
586
  let newStartIdx = 0;
587
+ let idxInOld = 0;
588
+ let i2 = 0;
561
589
  let oldEndIdx = oldCh.length - 1;
562
590
  let oldStartVnode = oldCh[0];
563
591
  let oldEndVnode = oldCh[oldEndIdx];
@@ -565,6 +593,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
565
593
  let newStartVnode = newCh[0];
566
594
  let newEndVnode = newCh[newEndIdx];
567
595
  let node;
596
+ let elmToMove;
568
597
  while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {
569
598
  if (oldStartVnode == null) {
570
599
  oldStartVnode = oldCh[++oldStartIdx];
@@ -593,7 +622,26 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
593
622
  oldEndVnode = oldCh[--oldEndIdx];
594
623
  newStartVnode = newCh[++newStartIdx];
595
624
  } else {
625
+ idxInOld = -1;
596
626
  {
627
+ for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {
628
+ if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
629
+ idxInOld = i2;
630
+ break;
631
+ }
632
+ }
633
+ }
634
+ if (idxInOld >= 0) {
635
+ elmToMove = oldCh[idxInOld];
636
+ if (elmToMove.$tag$ !== newStartVnode.$tag$) {
637
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
638
+ } else {
639
+ patch(elmToMove, newStartVnode, isInitialRender);
640
+ oldCh[idxInOld] = void 0;
641
+ node = elmToMove.$elm$;
642
+ }
643
+ newStartVnode = newCh[++newStartIdx];
644
+ } else {
597
645
  node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
598
646
  newStartVnode = newCh[++newStartIdx];
599
647
  }
@@ -619,6 +667,9 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
619
667
  };
620
668
  var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
621
669
  if (leftVNode.$tag$ === rightVNode.$tag$) {
670
+ if (!isInitialRender) {
671
+ return leftVNode.$key$ === rightVNode.$key$;
672
+ }
622
673
  return true;
623
674
  }
624
675
  return false;
@@ -1245,6 +1296,7 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1245
1296
  var setNonce = (nonce) => plt.$nonce$ = nonce;
1246
1297
 
1247
1298
  exports.bootstrapLazy = bootstrapLazy;
1299
+ exports.createEvent = createEvent;
1248
1300
  exports.h = h;
1249
1301
  exports.promiseResolve = promiseResolve;
1250
1302
  exports.registerInstance = registerInstance;
@@ -2,9 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const pamConsentModal = require('./pam-consent-modal-247cbbaa.js');
6
- require('./index-b2aa2011.js');
7
- require('@everymatrix/pam-consent-item');
5
+ const pamConsentModal = require('./pam-consent-modal-bc9246fa.js');
6
+ require('./index-9dbdce4a.js');
8
7
 
9
8
 
10
9
 
@@ -2,13 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-b2aa2011.js');
5
+ const index = require('./index-9dbdce4a.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([["pam-consent-modal.cjs",[[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);
11
+ return index.bootstrapLazy([["pam-consent-item_2.cjs",[[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);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;