@saasquatch/mint-components 2.4.1-7 → 2.4.1-9
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 +2 -14
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-controller.js +4 -16
- package/dist/esm/sqm-widget-verification-controller.entry.js +2 -14
- 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-03d9362e.system.entry.js +1 -0
- package/dist/mint-components/p-0f1aaee1.entry.js +1 -0
- package/dist/mint-components/p-bfb00685.system.js +1 -1
- 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-783135d3.system.entry.js +0 -1
- package/dist/mint-components/p-d180893e.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-9",
|
|
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
|
-
System.register(["./p-641f968d.system.js","./p-b6504987.system.js","./p-2190dc73.system.js","./p-4691e9d5.system.js"],(function(e){"use strict";var t,r,n,i,o,l,s,a,f,u,c;return{setters:[function(e){t=e.r;r=e.h;n=e.c},function(e){i=e.b;o=e.n;l=e.k;s=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,r=e.callback;var n=new MutationObserver(o);var i=new MutationObserver(r);n.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(){n.disconnect();i.disconnect()}}var y=e("sqm_widget_verification_controller",function(){function e(e){t(this,e);this.stateController='{"sqm-widget-verification-controller":{"isAuth":true}}';o(this)}e.prototype.disconnectedCallback=function(){};e.prototype.render=function(){var e=a({namespace:c,initialValue:false}),t=e[0],i=e[1];var o=JSON.parse(this.stateController);var y=(o===null||o===void 0?void 0:o["sqm-widget-verification-controller"])||o||{};var h=u()&&(y===null||y===void 0?void 0:y.isAuth);var p=Object.keys(o||{}).filter((function(e){return e!=="sqm-widget-verification-controller"}));var m=l(undefined),b=m[0],g=m[1];var x=l(undefined),A=x[0],k=x[1];var q=f((function(){var e=A.querySelectorAll("template");var r;var n=function(t){var n=Array.from(e).find((function(e){return e.content.querySelector(t)}));if(n){r=n.slot==="verified";return"break"}};for(var i=0,o=p;i<o.length;i++){var l=o[i];var s=n(l);if(s==="break")break}var a=r!==null&&r!==void 0?r:h||t;var f=Array.from(e).find((function(e){return e.slot===(a?"verified":"not-verified")}));if(f){var u=f.innerHTML||f.firstElementChild.outerHTML;if(u===b.innerHTML){d("don't rerender")}else if(f){b.innerHTML=u}}var c=Array.from(A.children).filter((function(e){return e.tagName==="RAISINS-PLOP-TARGET"}));if(c.length){var v=c.filter((function(e){return e.slot==="verified"}));var y=c.filter((function(e){return e.slot==="not-verified"}));y.forEach((function(e,t){if(a){e.style.display="none";return}if(t===y.length-1){e.style.bottom="0px";e.style.left="0px";e.style.right="0px";e.style.position="absolute"}e.style.height="25px"}));v.forEach((function(e,t){if(!a){e.style.display="none";return}if(t===v.length-1){e.style.bottom="0px";e.style.left="0px";e.style.right="0px";e.style.position="absolute"}e.style.height="25px"}))}}),[b,A,t,h,this.stateController]);s((function(){if(!b||!A){d("DOM not ready:");return}q();return v({parent:A,callback:q})}),[A,b,t,h,this.stateController]);return r(n,null,r("div",{ref:k,style:{display:"contents"}},r("slot",{name:"not-verified"}),r("slot",{name:"verified"})),r("div",{ref:g},r("slot",{name:"shown"})))};return e}())}}}));
|
|
@@ -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 c,i as l}from"./p-8a6531d2.js";import{V as d}from"./p-4f9dc974.js";const f=r("sq:widget-verification"),p=class{constructor(t){e(this,t),this.stateController='{"sqm-widget-verification-controller":{"isAuth":true}}',s(this)}disconnectedCallback(){}render(){const[e,r]=a({namespace:d,initialValue:!1}),s=JSON.parse(this.stateController),p=(null==s?void 0:s["sqm-widget-verification-controller"])||s||{},u=l()&&(null==p?void 0:p.isAuth),v=Object.keys(s||{}).filter((e=>"sqm-widget-verification-controller"!==e)),[m,b]=n(void 0),[h,x]=n(void 0),w=c((()=>{const t=h.querySelectorAll("template");let i;for(const e of v){const r=Array.from(t).find((t=>t.content.querySelector(e)));if(r){i="verified"===r.slot;break}}const r=null!=i?i:u||e,s=Array.from(t).find((e=>e.slot===(r?"verified":"not-verified")));if(s){const e=s.innerHTML||s.firstElementChild.outerHTML;e===m.innerHTML?f("don't rerender"):s&&(m.innerHTML=e)}const n=Array.from(h.children).filter((e=>"RAISINS-PLOP-TARGET"===e.tagName));if(n.length){const e=n.filter((e=>"verified"===e.slot)),t=n.filter((e=>"not-verified"===e.slot));t.forEach(((e,i)=>{r?e.style.display="none":(i===t.length-1&&(e.style.bottom="0px",e.style.left="0px",e.style.right="0px",e.style.position="absolute"),e.style.height="25px")})),e.forEach(((t,i)=>{r?(i===e.length-1&&(t.style.bottom="0px",t.style.left="0px",t.style.right="0px",t.style.position="absolute"),t.style.height="25px"):t.style.display="none"}))}}),[m,h,e,u,this.stateController]);return o((()=>{if(m&&h)return w(),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:h,callback:w});f("DOM not ready:")}),[h,m,e,u,this.stateController]),t(i,null,t("div",{ref:x,style:{display:"contents"}},t("slot",{name:"not-verified"}),t("slot",{name:"verified"})),t("div",{ref:b},t("slot",{name:"shown"})))}};export{p as sqm_widget_verification_controller}
|