@everymatrix/bonus-elevate-levels 1.56.3 → 1.58.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/bonus-elevate-levels/bonus-elevate-levels.esm.js +1 -1
- package/dist/bonus-elevate-levels/{p-fc075aca.entry.js → p-8ff47f97.entry.js} +1 -1
- package/dist/cjs/bonus-elevate-levels_5.cjs.entry.js +10 -8
- package/dist/collection/components/bonus-elevate-levels/bonus-elevate-levels.stories.js +46 -0
- package/dist/esm/bonus-elevate-levels_5.entry.js +10 -8
- package/dist/storybook/main.js +47 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/stencil.config.dev.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/storybook/main.d.ts +3 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/storybook/preview.d.ts +70 -0
- package/dist/types/components/bonus-elevate-levels/bonus-elevate-levels.stories.d.ts +5 -0
- package/package.json +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/packages/stencil/bonus-elevate-levels/stencil.config.dev.d.ts +0 -2
- /package/dist/types/{Users/maria.bumbar/Desktop → builds/emfe-widgets}/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/{Users/maria.bumbar/Desktop → builds/emfe-widgets}/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/{Users/maria.bumbar/Desktop → builds/emfe-widgets}/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/{Users/maria.bumbar/Desktop → builds/emfe-widgets}/widgets-monorepo/packages/stencil/bonus-elevate-levels/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as l}from"./p-204cc9f6.js";export{s as setNonce}from"./p-204cc9f6.js";import{g as t}from"./p-e1255160.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((async e=>(await t(),l([["p-
|
|
1
|
+
import{p as e,b as l}from"./p-204cc9f6.js";export{s as setNonce}from"./p-204cc9f6.js";import{g as t}from"./p-e1255160.js";(()=>{const l=import.meta.url,t={};return""!==l&&(t.resourcesUrl=new URL(".",l).href),e(t)})().then((async e=>(await t(),l([["p-8ff47f97",[[1,"bonus-elevate-levels",{clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],endpoint:[513],language:[513],translationUrl:[513,"translation-url"],selectedLevelId:[1537,"selected-level-id"],showDefault:[4,"show-default"],elevateLevelParamProxy:[32],elevateLevels:[32],currentLevel:[32],errorMessage:[32]},[[0,"selectedLevelChanged","selectedLevelChangedHandler"],[2,"elevateLevelsDataChange","elevateLevelsDataChangeHandler"]],{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}],[0,"elevate-level-list",{levels:[16],language:[1],selectedLevelId:[1537,"selected-level-id"],isShowSliderButton:[32],touchPosStart:[32],touchPosEnd:[32],offset:[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[9,"resize","handleResize"]],{selectedLevelId:["levelsChangedHandler"]}],[0,"elevate-level-presentation",{elevateLevel:[16]}],[0,"elevate-levels-data",{scopeParams:[1544,"scope-params"]}],[4,"general-styling-wrapper",{clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],targetTranslations:[16]}]]]],e))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as t,c as i,H as s,g as l}from"./p-204cc9f6.js";const o=["ro","en","fr","hr","tr"],n={en:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},fr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},hr:{level:"Razina",seeAll:"Vidi sve",privilegesFor:"Privilegije za",termsAndConditions:"Uvjeti i odredbe",noLevelsSet:"There is no level set",points:"Points"},ro:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},tr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"}},a=(e,t)=>{const i=t;return n[void 0!==i&&(o.includes(i)||n[i])?i:"en"][e]},r=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.endpoint=void 0,this.language="en",this.translationUrl="",this.selectedLevelId=void 0,this.showDefault=void 0,this.elevateLevelParamProxy=void 0,this.elevateLevels=[],this.currentLevel=void 0,this.errorMessage=void 0}selectedLevelChangedHandler(e){e.detail&&(this.currentLevel=Object.assign({},e.detail.level))}selectedLevelIdChangedHandler(){if(this.selectedLevelId&&this.elevateLevels){const e=this.elevateLevels.filter((e=>e.id==this.selectedLevelId))[0];this.currentLevel=Object.assign({},e)}}onSessionOrEndpointChange(){this.elevateLevelParamProxy=Object.assign(Object.assign({},this.elevateLevelParamProxy),{endpoint:this.endpoint,language:this.language})}elevateLevelsDataChangeHandler(e){e.detail&&(e.detail.currentLevel&&(this.currentLevel=Object.assign({},e.detail.currentLevel)),e.detail.elevateLevels&&(this.elevateLevels=[...e.detail.elevateLevels]),e.detail.clearError&&(this.errorMessage=null),e.detail.errorMessage&&e.detail.errorMessage.errorWhenLoadElevateLevels&&(this.errorMessage=a("loadElevateLevelErrorMessage",this.language)))}onTCClick(){window.postMessage({type:"termAndConditionClicked"},window.location.href)}componentWillLoad(){this.elevateLevelParamProxy={endpoint:this.endpoint,language:this.language,selectedLevelId:this.selectedLevelId,showDefault:this.showDefault}}render(){return t("div",{key:"327b5cd6a3bc756ce0696a0f2a4081f35bad7316",class:"ElevateLevelContent"},t("elevate-levels-data",{key:"cf1ab9a55cdaf9eba688bd524cb4a83d63563e77",scopeParams:this.elevateLevelParamProxy}),t("div",{key:"9c85b9a805712db07c7c99ac2db843062997f667",class:"LevelContent"},this.elevateLevels?t("elevate-level-list",{language:this.language,selectedLevelId:this.selectedLevelId,levels:this.elevateLevels}):a("noLevelsSet",this.language),this.currentLevel&&t("elevate-level-presentation",{key:"0fecb2a451caeef4512dc6f2af4fd3406610cc72",elevateLevel:this.currentLevel})),this.errorMessage&&t("div",{key:"ef746907148df80338fd2300322cd8eea9342f51"},this.errorMessage),t("general-styling-wrapper",{key:"e3d82ef1b7e5986354e18d875f9e3c547ff8adba",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl}))}static get watchers(){return{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var h;r.style=":host{display:block}.ElevateLevelContent{padding:20px;position:relative}.ElevateLevelContent .Privileges{padding-bottom:30px}.ElevateLevelContent .tc{position:absolute;right:10px;bottom:10px;text-align:right;display:none}",function(e){e[e.slideToRight=1]="slideToRight",e[e.slideToLeft=-1]="slideToLeft"}(h||(h={}));const d=class{constructor(t){var s;e(this,t),this.selectedLevelChanged=i(this,"selectedLevelChanged",7),this.minOffset=0,this.isMobile=!!((s=window.navigator.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.levels=void 0,this.language=void 0,this.selectedLevelId=void 0,this.isShowSliderButton=!1,this.touchPosStart=void 0,this.touchPosEnd=void 0,this.offset=0}onLevelClicked(e){this.selectedLevelChanged.emit({level:e}),this.selectedLevelId=e.id}levelsChangedHandler(){this.initOffsetOfLevelItems()}initOffsetOfLevelItems(){if(!this.levels||0==this.levels.length||!this.selectedLevelId)return;const e=this.levels.findIndex((e=>this.selectedLevelId==e.id));if(this.onLevelClicked(this.levels[-1==e?0:e]),this.levels.length<=this.moveCountForOneTouch)return;let t=Math.floor((-1==e?1:e+1)/this.moveCountForOneTouch)*this.moveCountForOneTouch*this.childElementWidth*-1;this.offset=t<=this.minOffset?this.minOffset:t>=0?0:t}onTouchStart(e){this.touchPosStart={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}}onTouchMove(e){this.touchPosEnd={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};const t=this.touchPosEnd.clientX-this.touchPosStart.clientX,i=this.touchPosEnd.clientY-this.touchPosStart.clientY;Math.abs(t)>Math.abs(i)&&this.slideTo(t>0?h.slideToRight:h.slideToLeft)}slideTo(e){let t=this.levelsElement.offsetLeft+this.childElementWidth*this.moveCountForOneTouch*e;if(t%this.childElementWidth!=0){const i=Math.floor(t/this.childElementWidth)*this.childElementWidth,s=Math.ceil(t/this.childElementWidth)*this.childElementWidth;t=e==h.slideToRight?i:s}this.offset=t<this.minOffset?this.minOffset:t>=0?0:t}initLevelSlider(){var e;if(!(null===(e=this.levelsElement)||void 0===e?void 0:e.firstElementChild))return void console.log("Widget[elevate-level-list] DOM is not ready.");this.isShowSliderButton=!this.isMobile&&this.levelsElement.clientWidth>this.levelsElement.parentElement.clientWidth,this.minOffset=this.levelsElement.parentElement.clientWidth-this.levelsElement.clientWidth,this.childElementWidth=this.levelsElement.firstElementChild.clientWidth,this.moveCountForOneTouch=Math.ceil(this.levelsElement.parentElement.clientWidth/this.childElementWidth)-1;const t=this.levelsElement.childElementCount;this.childElementWidth+=(this.levelsElement.clientWidth-this.childElementWidth*t)/(t-1)}debounce(e,t){{let i;return()=>{clearTimeout(i),i=setTimeout((()=>{e()}),t)}}}handleResize(){this.debounce(this.initLevelSlider.bind(this),200)()}componentDidRender(){this.host.componentOnReady().then((()=>{this.initLevelSlider()}))}render(){return t(s,{key:"d88d3434af89a0f8fd20a97735121fdf297905ab"},this.levels&&[t("div",{key:"cff36ba584e2474a65a1b95545b00937ecd06c8c",class:`SliderButton LeftButton ${0==this.offset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(h.slideToRight)},t("svg",{key:"640b4dd9b26b4097d15623f3e9c6b14b9a60b37e",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"0a50ffc9319ad33ed61e4696c37a0bfe6090518c","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{key:"314c5b4c5bbc0d50041a66fdf474441ea418345a",class:"LevelItemsWrapper"},t("div",{key:"ff1fb084aeb20319c36a3420e9eb8693ea81b144",style:{left:`${this.offset}px`},class:"LevelItems "+(this.isMobile?"Mobile":""),id:"levelItems",ref:e=>{this.levelsElement=e}},this.levels.map(((e,i)=>t("div",{class:"Item "+(this.selectedLevelId==e.id?"Active":""),onClick:this.onLevelClicked.bind(this,e)},t("img",{alt:`Presentation Icon for ${e.presentation.displayName}`,class:"LevelImg",src:e.presentation.asset}),t("span",{class:"LevelName",title:e.presentation.displayName},e.presentation.displayName),t("span",{class:"LevelPoints"},0==i?"":">",e.firstEntryPoints," ",a("points",this.language))))))),t("div",{key:"8dae638ca436c7e747a0f737028588ee5d040edd",class:`SliderButton RightButton ${this.offset<=this.minOffset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(h.slideToLeft)},t("svg",{key:"bba16b49668567aaa41beedd9ea461d256c6812d",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"36a0b6f3ffe8b50ebea9a4ec1c01e3341c440949","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))])}get host(){return l(this)}static get watchers(){return{selectedLevelId:["levelsChangedHandler"]}}};d.style="elevate-level-list{display:flex;flex-direction:row}.LevelItemsWrapper{display:flex;flex:1;margin-top:10px;min-height:30px;transition-property:all;position:relative;height:138px;overflow-x:hidden}.Mobile.LevelItems{overflow-x:hidden}.LevelItems{overflow-x:auto;display:flex;flex-direction:row;gap:10px;left:0;position:absolute;transition:left 0.5s ease-in-out}.LevelItems .Item:hover,.LevelItems .Item.Active{background-color:var(--emw--color-gray-50, rgb(244, 244, 244));box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.25)}.LevelItems .Item{width:86px;height:125px;border-radius:15px;text-align:center;display:flex;flex-direction:column;cursor:pointer}.LevelItems .Item .LevelName{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.LevelItems .Item .LevelPoints{color:var(--emw--color-gray-100, rgb(118, 113, 113));font-size:10px}.LevelItems .Item .LevelImg{width:65px;height:68px;margin:11px auto}.SliderButton{display:flex;width:29px;align-items:center;cursor:pointer}.SliderButton.Disabled svg{stroke:var(--emw--color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";const c=class{constructor(t){e(this,t),this.elevateLevel=void 0}render(){return t(s,{key:"16d128717e716f7ca7d3bb77fc3a2e67209318b6"},t("div",{key:"658657abdfc64844bd2af40562efe40385e1735a",class:"Row Desc"},t("h3",{key:"ec5871c2f810c8c120bf99510717381175bc1ef4"},this.elevateLevel.presentation.displayName),t("p",{key:"865915c6eea90295238fb47eaa91c8f968199ca5"},t("span",{key:"2b90c6c5d6957b73fc4a0f53d53da0ca023a4f0a",class:"TxtDesc",innerHTML:this.elevateLevel.presentation.description}))))}};c.style=":host{display:block}.PriviliegeList{padding-inline-start:5px}.PriviliegeList li{display:flex}.PriviliegeList li .Img{width:80px}.PriviliegeList li .Img img{width:60px;margin:10px}.PriviliegeList li .Content h4{text-transform:capitalize;margin-block-start:10px}";var v,f,p,b={exports:{}};v=b,f=b.exports,p=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==p)return p;throw new Error("unable to locate global object")}(),v.exports=f=p.fetch,p.fetch&&(f.default=p.fetch.bind(p)),f.Headers=p.Headers,f.Request=p.Request,f.Response=p.Response;const g=b.exports,m=class{constructor(t){e(this,t),this.elevateLevelsDataChange=i(this,"elevateLevelsDataChange",7),this.scopeParams=void 0}async componentWillRender(){if(!this.scopeParams.endpoint)return;let e=new URL(`${this.scopeParams.endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);await g(e.href).then((e=>e.json())).then((e=>{const t=e.data.sort(((e,t)=>e.firstEntryPoints<t.firstEntryPoints?-1:1));let i=this.scopeParams.selectedLevelId;if(!i&&this.scopeParams.showDefault&&t.length>0&&(i=t[0].id),i){const e=t.filter((e=>e.id==i))[0];this.elevateLevelsDataChange.emit({currentLevel:e})}this.elevateLevelsDataChange.emit({clearError:!0}),this.elevateLevelsDataChange.emit({elevateLevels:t})})).catch((e=>{this.elevateLevelsDataChange.emit({errorMessage:{type:"errorWhenLoadElevateLevels",err:e}}),console.error(e)}))}};m.style=":host{display:block}";const u=class{constructor(t){e(this,t),this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const s=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]?i[e]:{};for(let s in t[e])i[e][s]=t[e][s]})),e(!0)}))})));e.push(s)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},t("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return l(this)}};u.style=":host{display:block}";export{r as bonus_elevate_levels,d as elevate_level_list,c as elevate_level_presentation,m as elevate_levels_data,u as general_styling_wrapper}
|
|
1
|
+
import{r as e,h as t,c as i,H as s,g as l}from"./p-204cc9f6.js";const o=["ro","en","fr","hr","tr"],n={en:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},fr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},hr:{level:"Razina",seeAll:"Vidi sve",privilegesFor:"Privilegije za",termsAndConditions:"Uvjeti i odredbe",noLevelsSet:"There is no level set",points:"Points"},ro:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"},tr:{level:"level",seeAll:"See All",termsAndConditions:"Terms & Conditions",loadElevateLevelErrorMessage:"Error when load elevate levels",noLevelsSet:"There is no level set",points:"Points"}},a=(e,t)=>{const i=t;return n[void 0!==i&&(o.includes(i)||n[i])?i:"en"][e]},r=class{constructor(t){e(this,t),this.clientStyling="",this.clientStylingUrl="",this.endpoint=void 0,this.language="en",this.translationUrl="",this.selectedLevelId=void 0,this.showDefault=void 0,this.elevateLevelParamProxy=void 0,this.elevateLevels=[],this.currentLevel=void 0,this.errorMessage=void 0}selectedLevelChangedHandler(e){e.detail&&(this.currentLevel=Object.assign({},e.detail.level))}selectedLevelIdChangedHandler(){if(this.selectedLevelId&&this.elevateLevels){const e=this.elevateLevels.filter((e=>e.id==this.selectedLevelId))[0];this.currentLevel=Object.assign({},e)}}onSessionOrEndpointChange(){this.elevateLevelParamProxy=Object.assign(Object.assign({},this.elevateLevelParamProxy),{endpoint:this.endpoint,language:this.language})}elevateLevelsDataChangeHandler(e){e.detail&&(e.detail.currentLevel&&(this.currentLevel=Object.assign({},e.detail.currentLevel)),e.detail.elevateLevels&&(this.elevateLevels=[...e.detail.elevateLevels]),e.detail.clearError&&(this.errorMessage=null),e.detail.errorMessage&&e.detail.errorMessage.errorWhenLoadElevateLevels&&(this.errorMessage=a("loadElevateLevelErrorMessage",this.language)))}onTCClick(){window.postMessage({type:"termAndConditionClicked"},window.location.href)}componentWillLoad(){this.elevateLevelParamProxy={endpoint:this.endpoint,language:this.language,selectedLevelId:this.selectedLevelId,showDefault:this.showDefault}}render(){return t("div",{key:"327b5cd6a3bc756ce0696a0f2a4081f35bad7316",class:"ElevateLevelContent"},t("elevate-levels-data",{key:"cf1ab9a55cdaf9eba688bd524cb4a83d63563e77",scopeParams:this.elevateLevelParamProxy}),t("div",{key:"9c85b9a805712db07c7c99ac2db843062997f667",class:"LevelContent"},this.elevateLevels?t("elevate-level-list",{language:this.language,selectedLevelId:this.selectedLevelId,levels:this.elevateLevels}):a("noLevelsSet",this.language),this.currentLevel&&t("elevate-level-presentation",{key:"0fecb2a451caeef4512dc6f2af4fd3406610cc72",elevateLevel:this.currentLevel})),this.errorMessage&&t("div",{key:"ef746907148df80338fd2300322cd8eea9342f51"},this.errorMessage),t("general-styling-wrapper",{key:"e3d82ef1b7e5986354e18d875f9e3c547ff8adba",clientStyling:this.clientStyling,clientStylingUrl:this.clientStylingUrl,targetTranslations:n,translationUrl:this.translationUrl}))}static get watchers(){return{selectedLevelId:["selectedLevelIdChangedHandler"],elevateLevels:["selectedLevelIdChangedHandler"],endpoint:["onSessionOrEndpointChange"],language:["onSessionOrEndpointChange"]}}};var d;r.style=":host{display:block}.ElevateLevelContent{padding:20px;position:relative}.ElevateLevelContent .Privileges{padding-bottom:30px}.ElevateLevelContent .tc{position:absolute;right:10px;bottom:10px;text-align:right;display:none}",function(e){e[e.slideToRight=1]="slideToRight",e[e.slideToLeft=-1]="slideToLeft"}(d||(d={}));const h=class{constructor(t){var s;e(this,t),this.selectedLevelChanged=i(this,"selectedLevelChanged",7),this.minOffset=0,this.isMobile=!!((s=window.navigator.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.levels=void 0,this.language=void 0,this.selectedLevelId=void 0,this.isShowSliderButton=!1,this.touchPosStart=void 0,this.touchPosEnd=void 0,this.offset=0}onLevelClicked(e){this.selectedLevelChanged.emit({level:e}),this.selectedLevelId=e.id}levelsChangedHandler(){this.initOffsetOfLevelItems()}initOffsetOfLevelItems(){if(!this.levels||0==this.levels.length||!this.selectedLevelId)return;const e=this.levels.findIndex((e=>this.selectedLevelId==e.id));if(this.onLevelClicked(this.levels[-1==e?0:e]),this.levels.length<=this.moveCountForOneTouch)return;let t=Math.floor((-1==e?1:e+1)/this.moveCountForOneTouch)*this.moveCountForOneTouch*this.childElementWidth*-1;this.offset=t<=this.minOffset?this.minOffset:t>=0?0:t}onTouchStart(e){this.touchPosStart={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY}}onTouchMove(e){this.touchPosEnd={clientX:e.touches[0].clientX,clientY:e.touches[0].clientY};const t=this.touchPosEnd.clientX-this.touchPosStart.clientX,i=this.touchPosEnd.clientY-this.touchPosStart.clientY;Math.abs(t)>Math.abs(i)&&this.slideTo(t>0?d.slideToRight:d.slideToLeft)}slideTo(e){let t=this.levelsElement.offsetLeft+this.childElementWidth*this.moveCountForOneTouch*e;if(t%this.childElementWidth!=0){const i=Math.floor(t/this.childElementWidth)*this.childElementWidth,s=Math.ceil(t/this.childElementWidth)*this.childElementWidth;t=e==d.slideToRight?i:s}this.offset=t<this.minOffset?this.minOffset:t>=0?0:t}initLevelSlider(){var e;if(!(null===(e=this.levelsElement)||void 0===e?void 0:e.firstElementChild))return void console.log("Widget[elevate-level-list] DOM is not ready.");this.isShowSliderButton=!this.isMobile&&this.levelsElement.clientWidth>this.levelsElement.parentElement.clientWidth,this.minOffset=this.levelsElement.parentElement.clientWidth-this.levelsElement.clientWidth,this.childElementWidth=this.levelsElement.firstElementChild.clientWidth,this.moveCountForOneTouch=Math.ceil(this.levelsElement.parentElement.clientWidth/this.childElementWidth)-1;const t=this.levelsElement.childElementCount;this.childElementWidth+=(this.levelsElement.clientWidth-this.childElementWidth*t)/(t-1)}debounce(e,t){{let i;return()=>{clearTimeout(i),i=setTimeout((()=>{e()}),t)}}}handleResize(){this.debounce(this.initLevelSlider.bind(this),200)()}componentDidRender(){this.host.componentOnReady().then((()=>{this.initLevelSlider()}))}render(){return t(s,{key:"d88d3434af89a0f8fd20a97735121fdf297905ab"},this.levels&&[t("div",{key:"cff36ba584e2474a65a1b95545b00937ecd06c8c",class:`SliderButton LeftButton ${0==this.offset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(d.slideToRight)},t("svg",{key:"640b4dd9b26b4097d15623f3e9c6b14b9a60b37e",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"0a50ffc9319ad33ed61e4696c37a0bfe6090518c","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"}))),t("div",{key:"314c5b4c5bbc0d50041a66fdf474441ea418345a",class:"LevelItemsWrapper"},t("div",{key:"ff1fb084aeb20319c36a3420e9eb8693ea81b144",style:{left:`${this.offset}px`},class:"LevelItems "+(this.isMobile?"Mobile":""),id:"levelItems",ref:e=>{this.levelsElement=e}},this.levels.map(((e,i)=>t("div",{class:"Item "+(this.selectedLevelId==e.id?"Active":""),onClick:this.onLevelClicked.bind(this,e)},t("img",{alt:`Presentation Icon for ${e.presentation.displayName}`,class:"LevelImg",src:e.presentation.asset}),t("span",{class:"LevelName",title:e.presentation.displayName},e.presentation.displayName),t("span",{class:"LevelPoints"},0==i?"":">",e.firstEntryPoints," ",a("points",this.language))))))),t("div",{key:"8dae638ca436c7e747a0f737028588ee5d040edd",class:`SliderButton RightButton ${this.offset<=this.minOffset?"Disabled":""} ${this.isShowSliderButton?"":"Hidden"}`,onClick:()=>this.slideTo(d.slideToLeft)},t("svg",{key:"bba16b49668567aaa41beedd9ea461d256c6812d",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},t("path",{key:"36a0b6f3ffe8b50ebea9a4ec1c01e3341c440949","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})))])}get host(){return l(this)}static get watchers(){return{selectedLevelId:["levelsChangedHandler"]}}};h.style="elevate-level-list{display:flex;flex-direction:row}.LevelItemsWrapper{display:flex;flex:1;margin-top:10px;min-height:30px;transition-property:all;position:relative;height:138px;overflow-x:hidden}.Mobile.LevelItems{overflow-x:hidden}.LevelItems{overflow-x:auto;display:flex;flex-direction:row;gap:10px;left:0;position:absolute;transition:left 0.5s ease-in-out}.LevelItems .Item:hover,.LevelItems .Item.Active{background-color:var(--emw--color-gray-50, rgb(244, 244, 244));box-shadow:0px 4px 13px 0px rgba(0, 0, 0, 0.25)}.LevelItems .Item{width:86px;height:125px;border-radius:15px;text-align:center;display:flex;flex-direction:column;cursor:pointer}.LevelItems .Item .LevelName{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.LevelItems .Item .LevelPoints{color:var(--emw--color-gray-100, rgb(118, 113, 113));font-size:10px}.LevelItems .Item .LevelImg{width:65px;height:68px;margin:11px auto}.SliderButton{display:flex;width:29px;align-items:center;cursor:pointer}.SliderButton.Disabled svg{stroke:var(--emw--color-gray-50, #cbc5c5)}.SliderButton.Hidden{display:none}";const c=class{constructor(t){e(this,t),this.elevateLevel=void 0}render(){return t(s,{key:"16d128717e716f7ca7d3bb77fc3a2e67209318b6"},t("div",{key:"658657abdfc64844bd2af40562efe40385e1735a",class:"Row Desc"},t("h3",{key:"ec5871c2f810c8c120bf99510717381175bc1ef4"},this.elevateLevel.presentation.displayName),t("p",{key:"865915c6eea90295238fb47eaa91c8f968199ca5"},t("span",{key:"2b90c6c5d6957b73fc4a0f53d53da0ca023a4f0a",class:"TxtDesc",innerHTML:this.elevateLevel.presentation.description}))))}};c.style=":host{display:block}.PriviliegeList{padding-inline-start:5px}.PriviliegeList li{display:flex}.PriviliegeList li .Img{width:80px}.PriviliegeList li .Img img{width:60px;margin:10px}.PriviliegeList li .Content h4{text-transform:capitalize;margin-block-start:10px}";var v,f,p,b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},g={exports:{}};v=g,f=g.exports,p=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==b)return b;throw new Error("unable to locate global object")}(),v.exports=f=p.fetch,p.fetch&&(f.default=p.fetch.bind(p)),f.Headers=p.Headers,f.Request=p.Request,f.Response=p.Response;const u=g.exports,m=class{constructor(t){e(this,t),this.elevateLevelsDataChange=i(this,"elevateLevelsDataChange",7),this.scopeParams=void 0}async componentWillRender(){if(!this.scopeParams.endpoint)return;let e=new URL(`${this.scopeParams.endpoint}/v1/elevate/levels?language=${this.scopeParams.language}`);await u(e.href).then((e=>e.json())).then((e=>{const t=e.data.sort(((e,t)=>e.firstEntryPoints<t.firstEntryPoints?-1:1));let i=this.scopeParams.selectedLevelId;if(!i&&this.scopeParams.showDefault&&t.length>0&&(i=t[0].id),i){const e=t.filter((e=>e.id==i))[0];this.elevateLevelsDataChange.emit({currentLevel:e})}this.elevateLevelsDataChange.emit({clearError:!0}),this.elevateLevelsDataChange.emit({elevateLevels:t})})).catch((e=>{this.elevateLevelsDataChange.emit({errorMessage:{type:"errorWhenLoadElevateLevels",err:e}}),console.error(e)}))}};m.style=":host{display:block}";const w=class{constructor(t){e(this,t),this.stylingAppends=!1,this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.el.prepend(e)},this.setClientStylingURL=()=>{let e=new URL(this.clientStylingUrl),t=document.createElement("style");fetch(e.href).then((e=>e.text())).then((e=>{t.innerHTML=e,setTimeout((()=>{this.el.prepend(t)}),1)})).catch((e=>{console.log("error ",e)}))},this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.targetTranslations=void 0}componentDidRender(){this.stylingAppends||(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.stylingAppends=!0)}async componentWillLoad(){const e=[];if(this.translationUrl){const s=(t=this.translationUrl,i=this.targetTranslations,new Promise((e=>{fetch(t).then((e=>e.json())).then((t=>{Object.keys(t).forEach((e=>{i[e]=i[e]?i[e]:{};for(let s in t[e])i[e][s]=t[e][s]})),e(!0)}))})));e.push(s)}var t,i;return await Promise.all(e)}render(){return t("div",{key:"4d3414408c7662f88331dbe655966237f74d6958",class:"StyleShell"},t("slot",{key:"1d004644d84602c4314bdf5dfc26b55b160f57df",name:"mainContent"}))}get el(){return l(this)}};w.style=":host{display:block}";export{r as bonus_elevate_levels,h as elevate_level_list,c as elevate_level_presentation,m as elevate_levels_data,w as general_styling_wrapper}
|
|
@@ -273,6 +273,8 @@ const ElevateLevelPresentation = class {
|
|
|
273
273
|
};
|
|
274
274
|
ElevateLevelPresentation.style = ElevateLevelPresentationStyle0;
|
|
275
275
|
|
|
276
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
277
|
+
|
|
276
278
|
var browser = {exports: {}};
|
|
277
279
|
|
|
278
280
|
(function (module, exports) {
|
|
@@ -284,22 +286,22 @@ var getGlobal = function () {
|
|
|
284
286
|
// However, this causes CSP violations in Chrome apps.
|
|
285
287
|
if (typeof self !== 'undefined') { return self; }
|
|
286
288
|
if (typeof window !== 'undefined') { return window; }
|
|
287
|
-
if (typeof
|
|
289
|
+
if (typeof commonjsGlobal !== 'undefined') { return commonjsGlobal; }
|
|
288
290
|
throw new Error('unable to locate global object');
|
|
289
291
|
};
|
|
290
292
|
|
|
291
|
-
var
|
|
293
|
+
var globalObject = getGlobal();
|
|
292
294
|
|
|
293
|
-
module.exports = exports =
|
|
295
|
+
module.exports = exports = globalObject.fetch;
|
|
294
296
|
|
|
295
297
|
// Needed for TypeScript and Webpack.
|
|
296
|
-
if (
|
|
297
|
-
exports.default =
|
|
298
|
+
if (globalObject.fetch) {
|
|
299
|
+
exports.default = globalObject.fetch.bind(globalObject);
|
|
298
300
|
}
|
|
299
301
|
|
|
300
|
-
exports.Headers =
|
|
301
|
-
exports.Request =
|
|
302
|
-
exports.Response =
|
|
302
|
+
exports.Headers = globalObject.Headers;
|
|
303
|
+
exports.Request = globalObject.Request;
|
|
304
|
+
exports.Response = globalObject.Response;
|
|
303
305
|
}(browser, browser.exports));
|
|
304
306
|
|
|
305
307
|
const fetch$1 = browser.exports;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import "@everymatrix/bonus-elevate-levels";
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Bonus/Components/bonus-elevate-levels',
|
|
5
|
+
component: 'bonus-elevate-levels',
|
|
6
|
+
args: {
|
|
7
|
+
clientStyling: "",
|
|
8
|
+
clientStylingUrl: "",
|
|
9
|
+
endpoint: "",
|
|
10
|
+
language: "en",
|
|
11
|
+
translationUrl: "",
|
|
12
|
+
selectedLevelId: "",
|
|
13
|
+
showDefault: "",
|
|
14
|
+
},
|
|
15
|
+
argTypes: {
|
|
16
|
+
clientStyling: { control: 'text', description: '' },
|
|
17
|
+
clientStylingUrl: { control: 'text', description: '' },
|
|
18
|
+
endpoint: { control: 'text', description: '' },
|
|
19
|
+
language: { control: 'text', description: '' },
|
|
20
|
+
translationUrl: { control: 'text', description: '' },
|
|
21
|
+
selectedLevelId: { control: 'text', description: '' },
|
|
22
|
+
showDefault: { control: 'text', description: '' },
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
const Template = (args) => {
|
|
27
|
+
return html `<bonus-elevate-levels
|
|
28
|
+
clientStyling="${args.clientStyling}"
|
|
29
|
+
clientStylingUrl="${args.clientStylingUrl}"
|
|
30
|
+
endpoint="${args.endpoint}"
|
|
31
|
+
language="${args.language}"
|
|
32
|
+
translationUrl="${args.translationUrl}"
|
|
33
|
+
selectedLevelId="${args.selectedLevelId}"
|
|
34
|
+
showDefault="${args.showDefault}"
|
|
35
|
+
></bonus-elevate-levels>`;
|
|
36
|
+
};
|
|
37
|
+
export const Default = Template.bind({});
|
|
38
|
+
Default.args = {
|
|
39
|
+
clientStyling: "",
|
|
40
|
+
clientStylingUrl: "",
|
|
41
|
+
endpoint: "",
|
|
42
|
+
language: "en",
|
|
43
|
+
translationUrl: "",
|
|
44
|
+
selectedLevelId: "",
|
|
45
|
+
showDefault: "",
|
|
46
|
+
};
|
|
@@ -269,6 +269,8 @@ const ElevateLevelPresentation = class {
|
|
|
269
269
|
};
|
|
270
270
|
ElevateLevelPresentation.style = ElevateLevelPresentationStyle0;
|
|
271
271
|
|
|
272
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
273
|
+
|
|
272
274
|
var browser = {exports: {}};
|
|
273
275
|
|
|
274
276
|
(function (module, exports) {
|
|
@@ -280,22 +282,22 @@ var getGlobal = function () {
|
|
|
280
282
|
// However, this causes CSP violations in Chrome apps.
|
|
281
283
|
if (typeof self !== 'undefined') { return self; }
|
|
282
284
|
if (typeof window !== 'undefined') { return window; }
|
|
283
|
-
if (typeof
|
|
285
|
+
if (typeof commonjsGlobal !== 'undefined') { return commonjsGlobal; }
|
|
284
286
|
throw new Error('unable to locate global object');
|
|
285
287
|
};
|
|
286
288
|
|
|
287
|
-
var
|
|
289
|
+
var globalObject = getGlobal();
|
|
288
290
|
|
|
289
|
-
module.exports = exports =
|
|
291
|
+
module.exports = exports = globalObject.fetch;
|
|
290
292
|
|
|
291
293
|
// Needed for TypeScript and Webpack.
|
|
292
|
-
if (
|
|
293
|
-
exports.default =
|
|
294
|
+
if (globalObject.fetch) {
|
|
295
|
+
exports.default = globalObject.fetch.bind(globalObject);
|
|
294
296
|
}
|
|
295
297
|
|
|
296
|
-
exports.Headers =
|
|
297
|
-
exports.Request =
|
|
298
|
-
exports.Response =
|
|
298
|
+
exports.Headers = globalObject.Headers;
|
|
299
|
+
exports.Request = globalObject.Request;
|
|
300
|
+
exports.Response = globalObject.Response;
|
|
299
301
|
}(browser, browser.exports));
|
|
300
302
|
|
|
301
303
|
const fetch$1 = browser.exports;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import { getStoryFiles, detectUsedPackages, parseTsConfig, exec, filterParsedPathsByUsedPackages } from "../../../../libs/common/src/storybook/storybook-utils";
|
|
3
|
+
const config = {
|
|
4
|
+
stories: ['../**/*.@(mdx|stories.@(js|ts|tsx))'],
|
|
5
|
+
addons: [
|
|
6
|
+
'@storybook/addon-essentials',
|
|
7
|
+
'@storybook/addon-interactions',
|
|
8
|
+
'storybook-dark-mode'
|
|
9
|
+
],
|
|
10
|
+
docs: {
|
|
11
|
+
defaultName: 'Documentation',
|
|
12
|
+
autodocs: 'tag'
|
|
13
|
+
},
|
|
14
|
+
framework: {
|
|
15
|
+
name: '@storybook/web-components-vite',
|
|
16
|
+
options: {}
|
|
17
|
+
},
|
|
18
|
+
// Async viteFinal to build dependent packages before finalizing configuration.
|
|
19
|
+
viteFinal: async (config) => {
|
|
20
|
+
const storyFiles = getStoryFiles(path.resolve(__dirname, '../'));
|
|
21
|
+
const usedPackages = detectUsedPackages(storyFiles);
|
|
22
|
+
const buildPromises = usedPackages.map(async (pkg) => {
|
|
23
|
+
try {
|
|
24
|
+
console.log(`Building package ${pkg}...`);
|
|
25
|
+
const { stdout, stderr } = await exec(`nx run ${pkg}:build`);
|
|
26
|
+
console.log(`Built package ${pkg}: ${stdout}`);
|
|
27
|
+
if (stderr) {
|
|
28
|
+
console.error(`Build warning/error for package ${pkg}: ${stderr}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
console.error(`Error building package ${pkg}:`, error);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
await Promise.all(buildPromises);
|
|
36
|
+
const parsedPaths = parseTsConfig() || {};
|
|
37
|
+
const filteredParsedPaths = filterParsedPathsByUsedPackages(parsedPaths, usedPackages);
|
|
38
|
+
return Object.assign(Object.assign({}, config), { resolve: {
|
|
39
|
+
alias: Object.assign({}, filteredParsedPaths)
|
|
40
|
+
}, define: {
|
|
41
|
+
process: {
|
|
42
|
+
env: {}
|
|
43
|
+
}
|
|
44
|
+
} });
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export default config;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { themes } from "@storybook/theming";
|
|
2
|
+
export const parameters = {
|
|
3
|
+
darkMode: {
|
|
4
|
+
dark: Object.assign(Object.assign({}, themes.dark), { appBg: 'black' }),
|
|
5
|
+
light: Object.assign(Object.assign({}, themes.normal), { appBg: 'green' }),
|
|
6
|
+
current: 'light',
|
|
7
|
+
stylePreview: true
|
|
8
|
+
}
|
|
9
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { exec as execCallback } from 'child_process';
|
|
3
|
+
export declare const exec: typeof execCallback.__promisify__;
|
|
4
|
+
/**
|
|
5
|
+
* Recursively retrieves all story files (.stories.ts/.stories.tsx) in a directory.
|
|
6
|
+
* @param dir The directory to search.
|
|
7
|
+
* @returns Array of story file paths.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getStoryFiles: (dir: string) => string[];
|
|
10
|
+
/**
|
|
11
|
+
* Detects which internal packages are used in the provided story files.
|
|
12
|
+
* It looks at every import that starts with the given package alias prefix,
|
|
13
|
+
* then extracts the package name (the segment immediately following the prefix).
|
|
14
|
+
*
|
|
15
|
+
* @param stories Array of story file paths.
|
|
16
|
+
* @returns Array of unique package names (e.g. ['foo', 'bar']).
|
|
17
|
+
*/
|
|
18
|
+
export declare const detectUsedPackages: (stories: string[]) => string[];
|
|
19
|
+
/**
|
|
20
|
+
* Extracts all import paths from a file using the TypeScript compiler API.
|
|
21
|
+
* @param filePath The file path to parse.
|
|
22
|
+
* @returns Array of import strings.
|
|
23
|
+
*/
|
|
24
|
+
export declare const extractImports: (filePath: string) => string[];
|
|
25
|
+
/**
|
|
26
|
+
* Parses the tsconfig paths and resolves them to absolute paths.
|
|
27
|
+
* @param tsconfigPath The path to the tsconfig file.
|
|
28
|
+
* @returns An object mapping alias keys to absolute paths.
|
|
29
|
+
*/
|
|
30
|
+
export declare const parseTsConfig: () => Record<string, string> | null;
|
|
31
|
+
/**
|
|
32
|
+
* Filters the parsed tsconfig alias mapping to only include keys that correspond
|
|
33
|
+
* to the used packages.
|
|
34
|
+
*
|
|
35
|
+
* @param parsedPaths The full alias mapping from tsconfig.
|
|
36
|
+
* @param usedPackages Array of package names that are used (e.g. ['foo', 'bar']).
|
|
37
|
+
* @returns Filtered alias mapping.
|
|
38
|
+
*/
|
|
39
|
+
export declare const filterParsedPathsByUsedPackages: (parsedPaths: Record<string, string>, usedPackages: string[]) => Record<string, string>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const parameters: {
|
|
2
|
+
darkMode: {
|
|
3
|
+
dark: {
|
|
4
|
+
appBg: string;
|
|
5
|
+
base: "light" | "dark";
|
|
6
|
+
colorPrimary: string;
|
|
7
|
+
colorSecondary: string;
|
|
8
|
+
appContentBg: string;
|
|
9
|
+
appPreviewBg: string;
|
|
10
|
+
appBorderColor: string;
|
|
11
|
+
appBorderRadius: number;
|
|
12
|
+
fontBase: string;
|
|
13
|
+
fontCode: string;
|
|
14
|
+
textColor: string;
|
|
15
|
+
textInverseColor: string;
|
|
16
|
+
textMutedColor: string;
|
|
17
|
+
barTextColor: string;
|
|
18
|
+
barHoverColor: string;
|
|
19
|
+
barSelectedColor: string;
|
|
20
|
+
barBg: string;
|
|
21
|
+
buttonBg: string;
|
|
22
|
+
buttonBorder: string;
|
|
23
|
+
booleanBg: string;
|
|
24
|
+
booleanSelectedBg: string;
|
|
25
|
+
inputBg: string;
|
|
26
|
+
inputBorder: string;
|
|
27
|
+
inputTextColor: string;
|
|
28
|
+
inputBorderRadius: number;
|
|
29
|
+
brandTitle?: string;
|
|
30
|
+
brandUrl?: string;
|
|
31
|
+
brandImage?: string;
|
|
32
|
+
brandTarget?: string;
|
|
33
|
+
gridCellSize?: number;
|
|
34
|
+
};
|
|
35
|
+
light: {
|
|
36
|
+
appBg: string;
|
|
37
|
+
base: "light" | "dark";
|
|
38
|
+
colorPrimary: string;
|
|
39
|
+
colorSecondary: string;
|
|
40
|
+
appContentBg: string;
|
|
41
|
+
appPreviewBg: string;
|
|
42
|
+
appBorderColor: string;
|
|
43
|
+
appBorderRadius: number;
|
|
44
|
+
fontBase: string;
|
|
45
|
+
fontCode: string;
|
|
46
|
+
textColor: string;
|
|
47
|
+
textInverseColor: string;
|
|
48
|
+
textMutedColor: string;
|
|
49
|
+
barTextColor: string;
|
|
50
|
+
barHoverColor: string;
|
|
51
|
+
barSelectedColor: string;
|
|
52
|
+
barBg: string;
|
|
53
|
+
buttonBg: string;
|
|
54
|
+
buttonBorder: string;
|
|
55
|
+
booleanBg: string;
|
|
56
|
+
booleanSelectedBg: string;
|
|
57
|
+
inputBg: string;
|
|
58
|
+
inputBorder: string;
|
|
59
|
+
inputTextColor: string;
|
|
60
|
+
inputBorderRadius: number;
|
|
61
|
+
brandTitle?: string;
|
|
62
|
+
brandUrl?: string;
|
|
63
|
+
brandImage?: string;
|
|
64
|
+
brandTarget?: string;
|
|
65
|
+
gridCellSize?: number;
|
|
66
|
+
};
|
|
67
|
+
current: string;
|
|
68
|
+
stylePreview: boolean;
|
|
69
|
+
};
|
|
70
|
+
};
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|