@saasquatch/mint-components 2.4.1-5 → 2.4.1-7
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/sqm-widget-verification-controller.cjs.entry.js +20 -7
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +22 -9
- package/dist/esm/sqm-widget-verification-controller.entry.js +20 -7
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-783135d3.system.entry.js +1 -0
- package/dist/mint-components/p-bfb00685.system.js +1 -1
- package/dist/mint-components/p-d180893e.entry.js +1 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification-controller.d.ts +1 -1
- package/dist/types/components.d.ts +2 -2
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-27daf264.entry.js +0 -1
- package/dist/mint-components/p-e6de31a7.system.entry.js +0 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasquatch/mint-components",
|
|
3
3
|
"title": "Mint Components",
|
|
4
|
-
"version": "2.4.1-
|
|
4
|
+
"version": "2.4.1-7",
|
|
5
5
|
"description": "A minimal design library with components for referral and loyalty experiences. Built with Shoelace components by Saasquatch.",
|
|
6
6
|
"icon": "https://res.cloudinary.com/saasquatch/image/upload/v1652219900/squatch-assets/For_Mint.svg",
|
|
7
7
|
"raisins": "docs/raisins.json",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,c as i}from"./p-083180bf.js";import{b as r,n as s,k as n,f as o}from"./p-a7fc1e02.js";import{I as a,b as d,i as c}from"./p-8a6531d2.js";import{V as l}from"./p-4f9dc974.js";const f=r("sq:widget-verification"),p=class{constructor(t){e(this,t),this.stateController="{}",s(this)}disconnectedCallback(){}render(){var e;const[r,s]=a({namespace:l,initialValue:!1}),p=JSON.parse(this.stateController),v=c()&&(null===(e=p["sqm-widget-verification-controller"])||void 0===e?void 0:e.isAuth),[u,m]=n(void 0),[b,x]=n(void 0),h=d((()=>{const e=v||r,t=b.querySelectorAll("template"),i=Array.from(t).find((t=>t.slot===(e?"verified":"not-verified")));if(i){const e=i.innerHTML||i.firstElementChild.outerHTML;e===u.innerHTML?f("don't rerender"):i&&(u.innerHTML=e)}const s=Array.from(b.children).filter((e=>"RAISINS-PLOP-TARGET"===e.tagName));if(s.length){const t=s.filter((e=>"verified"===e.slot)),i=s.filter((e=>"not-verified"===e.slot));i.forEach(((t,r)=>{e?t.style.display="none":(r===i.length-1&&(t.style.bottom="0px",t.style.left="0px",t.style.right="0px",t.style.position="absolute"),t.style.height="25px")})),t.forEach(((i,r)=>{e?(r===t.length-1&&(i.style.bottom="0px",i.style.left="0px",i.style.right="0px",i.style.position="absolute"),i.style.height="25px"):i.style.display="none"}))}}),[u,b,r,v]);return o((()=>{if(u&&b)return h(),function({parent:e,callback:t}){const i=new MutationObserver(s),r=new MutationObserver(t);function s(e){var t;null===(t=e.addedNodes)||void 0===t||t.forEach((e=>{r.observe(e.content,{childList:!0,attributes:!0,subtree:!0})}))}return i.observe(e,{childList:!0,subtree:!1}),s({addedNodes:e.querySelectorAll("template")}),()=>{i.disconnect(),r.disconnect()}}({parent:b,callback:h});f("DOM not ready:")}),[b,u,r,v]),t(i,null,t("div",{ref:x,style:{display:"contents"}},t("slot",{name:"not-verified"}),t("slot",{name:"verified"})),t("div",{ref:m},t("slot",{name:"shown"})))}};export{p as sqm_widget_verification_controller}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-641f968d.system.js","./p-b6504987.system.js","./p-2190dc73.system.js","./p-4691e9d5.system.js"],(function(e){"use strict";var t,n,r,i,o,s,l,a,f,u,c;return{setters:[function(e){t=e.r;n=e.h;r=e.c},function(e){i=e.b;o=e.n;s=e.k;l=e.f},function(e){a=e.I;f=e.b;u=e.i},function(e){c=e.V}],execute:function(){var d=i("sq:widget-verification");function v(e){var t=e.parent,n=e.callback;var r=new MutationObserver(o);var i=new MutationObserver(n);r.observe(t,{childList:true,subtree:false});o({addedNodes:t.querySelectorAll("template")});function o(e){var t;(t=e.addedNodes)===null||t===void 0?void 0:t.forEach((function(e){i.observe(e.content,{childList:true,attributes:true,subtree:true})}))}return function(){r.disconnect();i.disconnect()}}var y=e("sqm_widget_verification_controller",function(){function e(e){t(this,e);this.stateController="{}";o(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e;var t=a({namespace:c,initialValue:false}),i=t[0],o=t[1];var y=JSON.parse(this.stateController);var p=u()&&((e=y["sqm-widget-verification-controller"])===null||e===void 0?void 0:e.isAuth);var h=s(undefined),m=h[0],b=h[1];var g=s(undefined),x=g[0],A=g[1];var L=f((function(){var e=p||i;var t=x.querySelectorAll("template");var n=Array.from(t).find((function(t){return t.slot===(e?"verified":"not-verified")}));if(n){var r=n.innerHTML||n.firstElementChild.outerHTML;if(r===m.innerHTML){d("don't rerender")}else if(n){m.innerHTML=r}}var o=Array.from(x.children).filter((function(e){return e.tagName==="RAISINS-PLOP-TARGET"}));if(o.length){var s=o.filter((function(e){return e.slot==="verified"}));var l=o.filter((function(e){return e.slot==="not-verified"}));l.forEach((function(t,n){if(e){t.style.display="none";return}if(n===l.length-1){t.style.bottom="0px";t.style.left="0px";t.style.right="0px";t.style.position="absolute"}t.style.height="25px"}));s.forEach((function(t,n){if(!e){t.style.display="none";return}if(n===s.length-1){t.style.bottom="0px";t.style.left="0px";t.style.right="0px";t.style.position="absolute"}t.style.height="25px"}))}}),[m,x,i,p]);l((function(){if(!m||!x){d("DOM not ready:");return}L();return v({parent:x,callback:L})}),[x,m,i,p]);return n(r,null,n("div",{ref:A,style:{display:"contents"}},n("slot",{name:"not-verified"}),n("slot",{name:"verified"})),n("div",{ref:b},n("slot",{name:"shown"})))};return e}())}}}));
|