@clevercloud/components
Advanced tools
Comparing version 6.4.0 to 6.5.1
@@ -11,2 +11,19 @@ --- | ||
## 6.5.1 (2021-05-07) | ||
* Fix: the new pricing components where not correctly packaged | ||
## 6.5.0 (2021-05-07) | ||
* `<cc-button>`: Add a circle form when in hide-text with an image | ||
* New component: | ||
* `<cc-pricing-table>` | ||
* `<cc-pricing-product>` (with smart definition for add-ons and runtimes) | ||
### For devs | ||
* i18n: simplify formatter system and add JSDoc | ||
* i18n: remove country flags (it makes no sense for a language) | ||
* Update deps | ||
## 6.4.0 (2021-04-21) | ||
@@ -13,0 +30,0 @@ |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as i}from"lit-element";import{dispatchCustomEvent as o}from"../lib/events.js";import{i18n as n}from"../lib/i18n.js";import"../atoms/cc-input-text.js";import"../atoms/cc-loader.js";import"../molecules/cc-block-section.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";class c extends t{static get properties(){return{addon:{type:Object},error:{type:String},saving:{type:Boolean},_name:{type:String,attribute:!1},_skeleton:{type:Boolean,attribute:!1},_tags:{type:Array,attribute:!1}}}constructor(){super(),this._skeleton=!1,this.addon=null,this.error=!1,this.saving=!1}set addon(t){this._skeleton=null==t,this._name=this._skeleton?"":t.name,this._tags=this._skeleton?[]:t.tags}_onNameInput({detail:t}){this._name=t}_onNameSubmit(){o(this,"update-name",{name:this._name})}_onTagsInput({detail:t}){this._tags=t}_onTagsSubmit(){o(this,"update-tags",{tags:this._tags})}_onDeleteSubmit(){o(this,"delete-addon")}_onDismissError(){this.error=!1}render(){const t=!1!==this.error||this.saving,i="loading"===this.error;return e`<cc-block><div slot=title>${n("cc-addon-admin.admin")}</div>${i?"":e`<cc-block-section><div slot=title>${n("cc-addon-admin.addon-name")}</div><div slot=info></div><div class=one-line-form><cc-input-text ?skeleton=${this._skeleton} ?disabled=${t} .value=${this._name} @cc-input-text:input=${this._onNameInput} @cc-input-text:requestimplicitsubmit=${this._onNameSubmit}></cc-input-text><cc-button primary ?skeleton=${this._skeleton} ?disabled=${t} @cc-button:click=${this._onNameSubmit}>${n("cc-addon-admin.update")}</cc-button></div></cc-block-section><cc-block-section><div slot=title>${n("cc-addon-admin.tags")}</div><div slot=info>${n("cc-addon-admin.tags-description")}</div><div class=one-line-form><cc-input-text ?skeleton=${this._skeleton} ?disabled=${t} .tags=${this._tags} placeholder=${n("cc-addon-admin.tags-empty")} @cc-input-text:tags=${this._onTagsInput} @cc-input-text:requestimplicitsubmit=${this._onTagsSubmit}></cc-input-text><cc-button primary ?skeleton=${this._skeleton} ?disabled=${t} @cc-button:click=${this._onTagsSubmit}>${n("cc-addon-admin.tags-update")}</cc-button></div></cc-block-section><cc-block-section><div slot=title class=danger>${n("cc-addon-admin.danger-zone")}</div><div slot=info>${n("cc-addon-admin.delete-description")}</div><div><cc-button danger ?skeleton=${this._skeleton} ?disabled=${t} @cc-button:click=${this._onDeleteSubmit}>${n("cc-addon-admin.delete")}</cc-button></div></cc-block-section>`} ${i?e`<cc-error>${n("cc-addon-admin.error-loading")}</cc-error>`:""} ${this.saving?e`<cc-loader slot=overlay></cc-loader>`:""} ${"saving"===this.error?e`<div slot=overlay><cc-error mode=confirm @cc-error:ok=${this._onDismissError}>${n("cc-addon-admin.error-saving")}</cc-error></div>`:""}</cc-block>`}static get styles(){return[i`:host{display:block}.one-line-form{display:flex}.one-line-form cc-input-text{flex:1 1 10rem;margin-right:.5rem}`]}}window.customElements.define("cc-addon-admin",c);export{c as CcAddonAdmin}; | ||
import"../atoms/cc-input-text.js";import"../atoms/cc-loader.js";import"../molecules/cc-block-section.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import{LitElement as t,html as e,css as i}from"lit-element";import{dispatchCustomEvent as o}from"../lib/events.js";import{i18n as n}from"../lib/i18n.js";class c extends t{static get properties(){return{addon:{type:Object},error:{type:String},saving:{type:Boolean},_name:{type:String,attribute:!1},_skeleton:{type:Boolean,attribute:!1},_tags:{type:Array,attribute:!1}}}constructor(){super(),this._skeleton=!1,this.addon=null,this.error=!1,this.saving=!1}set addon(t){this._skeleton=null==t,this._name=this._skeleton?"":t.name,this._tags=this._skeleton?[]:t.tags}_onNameInput({detail:t}){this._name=t}_onNameSubmit(){o(this,"update-name",{name:this._name})}_onTagsInput({detail:t}){this._tags=t}_onTagsSubmit(){o(this,"update-tags",{tags:this._tags})}_onDeleteSubmit(){o(this,"delete-addon")}_onDismissError(){this.error=!1}render(){const t=!1!==this.error||this.saving,i="loading"===this.error;return e`<cc-block><div slot=title>${n("cc-addon-admin.admin")}</div>${i?"":e`<cc-block-section><div slot=title>${n("cc-addon-admin.addon-name")}</div><div slot=info></div><div class=one-line-form><cc-input-text ?skeleton=${this._skeleton} ?disabled=${t} .value=${this._name} @cc-input-text:input=${this._onNameInput} @cc-input-text:requestimplicitsubmit=${this._onNameSubmit}></cc-input-text><cc-button primary ?skeleton=${this._skeleton} ?disabled=${t} @cc-button:click=${this._onNameSubmit}>${n("cc-addon-admin.update")}</cc-button></div></cc-block-section><cc-block-section><div slot=title>${n("cc-addon-admin.tags")}</div><div slot=info>${n("cc-addon-admin.tags-description")}</div><div class=one-line-form><cc-input-text ?skeleton=${this._skeleton} ?disabled=${t} .tags=${this._tags} placeholder=${n("cc-addon-admin.tags-empty")} @cc-input-text:tags=${this._onTagsInput} @cc-input-text:requestimplicitsubmit=${this._onTagsSubmit}></cc-input-text><cc-button primary ?skeleton=${this._skeleton} ?disabled=${t} @cc-button:click=${this._onTagsSubmit}>${n("cc-addon-admin.tags-update")}</cc-button></div></cc-block-section><cc-block-section><div slot=title class=danger>${n("cc-addon-admin.danger-zone")}</div><div slot=info>${n("cc-addon-admin.delete-description")}</div><div><cc-button danger ?skeleton=${this._skeleton} ?disabled=${t} @cc-button:click=${this._onDeleteSubmit}>${n("cc-addon-admin.delete")}</cc-button></div></cc-block-section>`} ${i?e`<cc-error>${n("cc-addon-admin.error-loading")}</cc-error>`:""} ${this.saving?e`<cc-loader slot=overlay></cc-loader>`:""} ${"saving"===this.error?e`<div slot=overlay><cc-error mode=confirm @cc-error:ok=${this._onDismissError}>${n("cc-addon-admin.error-saving")}</cc-error></div>`:""}</cc-block>`}static get styles(){return[i`:host{display:block}.one-line-form{display:flex}.one-line-form cc-input-text{flex:1 1 10rem;margin-right:.5rem}`]}}window.customElements.define("cc-addon-admin",c);export{c as CcAddonAdmin}; | ||
//# sourceMappingURL=cc-addon-admin.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as c}from"lit-element";import{classMap as s}from"lit-html/directives/class-map.js";import{i18n as i}from"../lib/i18n.js";import{skeletonStyles as o}from"../styles/skeleton.js";import"../atoms/cc-input-text.js";import"../molecules/cc-block-section.js";import{ccLink as a,linkStyles as r}from"../templates/cc-link.js";import"../atoms/cc-button.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import{fakeString as l}from"../lib/fake-strings.js";const d=new URL(new URL("../assets/backup.svg",import.meta.url).href,import.meta.url).href,n=new URL(new URL("../assets/close.svg",import.meta.url).href,import.meta.url).href,u={providerId:"",passwordForCommand:"",list:new Array(5).fill({createdAt:new Date,expiresAt:new Date})};class p extends e{static get properties(){return{backups:{type:Object},error:{type:Boolean},_overlay:{type:String,attribute:!1},_selectedBackup:{type:Object,attribute:!1}}}constructor(){super(),this.error=!1,this._overlay=null,this._selectedBackup=null}_getDescription(e){switch(e){case"es-addon":return i("cc-addon-backups.description.es-addon");case"es-addon-old":return i("cc-addon-backups.description.es-addon-old");default:return l(150)}}_getBackupText({createdAt:e,expiresAt:t}){return null!=t?i("cc-addon-backups.text",{createdAt:e,expiresAt:t}):i("cc-addon-backups.text.user-defined-retention",{createdAt:e})}_getBackupLink(e){switch(e){case"es-addon":return i("cc-addon-backups.link.es-addon");case"es-addon-old":return i("cc-addon-backups.link.es-addon-old");default:return l(18)}}_displaySectionWithService(e){switch(e){case"es-addon":return!0;case"es-addon-old":default:return!1}}_getRestoreWithServiceTitle(e){switch(e){case"es-addon":return i("cc-addon-backups.restore.with-service.title.es-addon");default:return l(20)}}_getRestoreWithServiceDescription(e,t){switch(e){case"es-addon":return i("cc-addon-backups.restore.with-service.description.es-addon",{href:t});default:return l(80)}}_getManualRestoreDescription(e){switch(e){case"es-addon":case"es-addon-old":return i("cc-addon-backups.restore.manual.description.es-addon");default:return l(70)}}_getDeleteWithServiceTitle(e){switch(e){case"es-addon":return i("cc-addon-backups.delete.with-service.title.es-addon");default:return l(20)}}_getDeleteWithServiceDescription(e,t){switch(e){case"es-addon":return i("cc-addon-backups.delete.with-service.description.es-addon",{href:t});default:return l(80)}}_getManualDeleteDescription(e){switch(e){case"es-addon":case"es-addon-old":return i("cc-addon-backups.delete.manual.description.es-addon");default:return l(70)}}_onOpenOverlay(e,t,c){this._overlay=t,this._selectedBackup=c,this._overlayTarget=e.target,this.updateComplete.then((()=>{this.shadowRoot.querySelector(".overlay cc-button").focus(),this.shadowRoot.querySelector(".overlay").scrollIntoView({behavior:"smooth",block:"center"})}))}_onCloseOverlay(){this._overlay=null,this._selectedBackup=null,this.updateComplete.then((()=>{this._overlayTarget.focus(),this._overlayTarget.scrollIntoView({behavior:"smooth",block:"center"}),this._overlayTarget=null}))}render(){const e=null==this.backups,{providerId:c,list:o,passwordForCommand:r}=e?u:this.backups,l=!this.error&&o.length>0,p=!this.error&&0===o.length;return t`<cc-block><div slot=title>${i("cc-addon-backups.title")}</div>${l?t`<div><span class=${s({skeleton:e})}>${this._getDescription(c)}</span></div><div class=backup-list>${o.map((o=>t`<div class=backup><span class=backup-icon><img src=${d} alt=""></span><span class=backup-text><span class="${s({skeleton:e})} backup-text-details">${this._getBackupText(o)}</span><br>${a(null==this._overlay?o.url:null,this._getBackupLink(c),e)}<cc-button link ?disabled=${null!=this._overlay} ?skeleton=${e} @cc-button:click=${e=>this._onOpenOverlay(e,"restore",o)}>${i("cc-addon-backups.restore.btn")}</cc-button><cc-button link ?disabled=${null!=this._overlay} ?skeleton=${e} @cc-button:click=${e=>this._onOpenOverlay(e,"delete",o)}>${i("cc-addon-backups.delete.btn")}</cc-button></span></div>`))}</div>`:""} ${p?t`<div class=cc-block_empty-msg>${i("cc-addon-backups.empty")}</div>`:""} ${this.error?t`<cc-error>${i("cc-addon-backups.loading-error")}</cc-error>`:""} ${"restore"===this._overlay?t`<div slot=overlay><cc-block class=overlay><div slot=title>${i("cc-addon-backups.restore",this._selectedBackup)}</div><cc-button slot=button image=${n} hide-text @cc-button:click=${this._onCloseOverlay}>${i("cc-addon-backups.close-btn")}</cc-button>${this._displaySectionWithService(c)?t`<cc-block-section><div slot=title>${this._getRestoreWithServiceTitle(c)}</div><div>${this._getRestoreWithServiceDescription(c,this._selectedBackup.url)}</div></cc-block-section>`:""}<cc-block-section><div slot=title>${i("cc-addon-backups.restore.manual.title")}</div><div>${this._getManualRestoreDescription(c)}</div><cc-input-text readonly=readonly clipboard value=${this._selectedBackup.restoreCommand}></cc-input-text><div>${i("cc-addon-backups.command-password")}</div><cc-input-text readonly=readonly clipboard secret value=${r}></cc-input-text></cc-block-section></cc-block></div>`:""} ${"delete"===this._overlay?t`<div slot=overlay><cc-block class=overlay><div slot=title>${i("cc-addon-backups.delete",this._selectedBackup)}</div><cc-button slot=button image=${n} hide-text @cc-button:click=${this._onCloseOverlay}>${i("cc-addon-backups.close-btn")}</cc-button>${this._displaySectionWithService(c)?t`<cc-block-section><div slot=title>${this._getDeleteWithServiceTitle(c)}</div><div>${this._getDeleteWithServiceDescription(c,this._selectedBackup.url)}</div></cc-block-section>`:""}<cc-block-section><div slot=title>${i("cc-addon-backups.delete.manual.title")}</div><div>${this._getManualDeleteDescription(c)}</div><cc-input-text readonly=readonly clipboard value=${this._selectedBackup.deleteCommand}></cc-input-text><div>${i("cc-addon-backups.command-password")}</div><cc-input-text readonly=readonly clipboard secret value=${r}></cc-input-text></cc-block-section></cc-block></div>`:""}</cc-block>`}static get styles(){return[o,r,c`:host{display:grid;grid-gap:1rem;line-height:1.5}.backup-list{display:grid;grid-gap:1.5rem}.backup{display:flex;line-height:1.5rem}.backup-icon,.backup-text{margin-right:.5rem}.backup-icon{flex:0 0 auto;height:1.5rem;width:1.5rem}.backup-icon img{display:block;height:100%;width:100%}.backup-text{color:#555}.backup-text-details:not(.skeleton) strong{color:#000}[title]{cursor:help}.skeleton{background-color:#bbb}.overlay{box-shadow:0 0 1rem #aaa;margin:2rem;max-width:80%}.cc-link,cc-button[link]{margin-right:.5rem;vertical-align:baseline}`]}}window.customElements.define("cc-addon-backups",p);export{p as CcAddonBackups}; | ||
import"../atoms/cc-button.js";import"../atoms/cc-input-text.js";import"../molecules/cc-block-section.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import{LitElement as e,html as t,css as c}from"lit-element";import{classMap as s}from"lit-html/directives/class-map.js";import{fakeString as i}from"../lib/fake-strings.js";import{i18n as o}from"../lib/i18n.js";import{skeletonStyles as a}from"../styles/skeleton.js";import{ccLink as r,linkStyles as l}from"../templates/cc-link.js";const d=new URL(new URL("../assets/backup.svg",import.meta.url).href,import.meta.url).href,n=new URL(new URL("../assets/close.svg",import.meta.url).href,import.meta.url).href,u={providerId:"",passwordForCommand:"",list:new Array(5).fill({createdAt:new Date,expiresAt:new Date})};class p extends e{static get properties(){return{backups:{type:Object},error:{type:Boolean},_overlay:{type:String,attribute:!1},_selectedBackup:{type:Object,attribute:!1}}}constructor(){super(),this.error=!1,this._overlay=null,this._selectedBackup=null}_getDescription(e){switch(e){case"es-addon":return o("cc-addon-backups.description.es-addon");case"es-addon-old":return o("cc-addon-backups.description.es-addon-old");default:return i(150)}}_getBackupText({createdAt:e,expiresAt:t}){return null!=t?o("cc-addon-backups.text",{createdAt:e,expiresAt:t}):o("cc-addon-backups.text.user-defined-retention",{createdAt:e})}_getBackupLink(e){switch(e){case"es-addon":return o("cc-addon-backups.link.es-addon");case"es-addon-old":return o("cc-addon-backups.link.es-addon-old");default:return i(18)}}_displaySectionWithService(e){switch(e){case"es-addon":return!0;case"es-addon-old":default:return!1}}_getRestoreWithServiceTitle(e){switch(e){case"es-addon":return o("cc-addon-backups.restore.with-service.title.es-addon");default:return i(20)}}_getRestoreWithServiceDescription(e,t){switch(e){case"es-addon":return o("cc-addon-backups.restore.with-service.description.es-addon",{href:t});default:return i(80)}}_getManualRestoreDescription(e){switch(e){case"es-addon":case"es-addon-old":return o("cc-addon-backups.restore.manual.description.es-addon");default:return i(70)}}_getDeleteWithServiceTitle(e){switch(e){case"es-addon":return o("cc-addon-backups.delete.with-service.title.es-addon");default:return i(20)}}_getDeleteWithServiceDescription(e,t){switch(e){case"es-addon":return o("cc-addon-backups.delete.with-service.description.es-addon",{href:t});default:return i(80)}}_getManualDeleteDescription(e){switch(e){case"es-addon":case"es-addon-old":return o("cc-addon-backups.delete.manual.description.es-addon");default:return i(70)}}_onOpenOverlay(e,t,c){this._overlay=t,this._selectedBackup=c,this._overlayTarget=e.target,this.updateComplete.then((()=>{this.shadowRoot.querySelector(".overlay cc-button").focus(),this.shadowRoot.querySelector(".overlay").scrollIntoView({behavior:"smooth",block:"center"})}))}_onCloseOverlay(){this._overlay=null,this._selectedBackup=null,this.updateComplete.then((()=>{this._overlayTarget.focus(),this._overlayTarget.scrollIntoView({behavior:"smooth",block:"center"}),this._overlayTarget=null}))}render(){const e=null==this.backups,{providerId:c,list:i,passwordForCommand:a}=e?u:this.backups,l=!this.error&&i.length>0,p=!this.error&&0===i.length;return t`<cc-block><div slot=title>${o("cc-addon-backups.title")}</div>${l?t`<div><span class=${s({skeleton:e})}>${this._getDescription(c)}</span></div><div class=backup-list>${i.map((i=>t`<div class=backup><span class=backup-icon><img src=${d} alt=""></span><span class=backup-text><span class="${s({skeleton:e})} backup-text-details">${this._getBackupText(i)}</span><br>${r(null==this._overlay?i.url:null,this._getBackupLink(c),e)}<cc-button link ?disabled=${null!=this._overlay} ?skeleton=${e} @cc-button:click=${e=>this._onOpenOverlay(e,"restore",i)}>${o("cc-addon-backups.restore.btn")}</cc-button><cc-button link ?disabled=${null!=this._overlay} ?skeleton=${e} @cc-button:click=${e=>this._onOpenOverlay(e,"delete",i)}>${o("cc-addon-backups.delete.btn")}</cc-button></span></div>`))}</div>`:""} ${p?t`<div class=cc-block_empty-msg>${o("cc-addon-backups.empty")}</div>`:""} ${this.error?t`<cc-error>${o("cc-addon-backups.loading-error")}</cc-error>`:""} ${"restore"===this._overlay?t`<div slot=overlay><cc-block class=overlay><div slot=title>${o("cc-addon-backups.restore",this._selectedBackup)}</div><cc-button slot=button image=${n} hide-text @cc-button:click=${this._onCloseOverlay}>${o("cc-addon-backups.close-btn")}</cc-button>${this._displaySectionWithService(c)?t`<cc-block-section><div slot=title>${this._getRestoreWithServiceTitle(c)}</div><div>${this._getRestoreWithServiceDescription(c,this._selectedBackup.url)}</div></cc-block-section>`:""}<cc-block-section><div slot=title>${o("cc-addon-backups.restore.manual.title")}</div><div>${this._getManualRestoreDescription(c)}</div><cc-input-text readonly=readonly clipboard value=${this._selectedBackup.restoreCommand}></cc-input-text><div>${o("cc-addon-backups.command-password")}</div><cc-input-text readonly=readonly clipboard secret value=${a}></cc-input-text></cc-block-section></cc-block></div>`:""} ${"delete"===this._overlay?t`<div slot=overlay><cc-block class=overlay><div slot=title>${o("cc-addon-backups.delete",this._selectedBackup)}</div><cc-button slot=button image=${n} hide-text @cc-button:click=${this._onCloseOverlay}>${o("cc-addon-backups.close-btn")}</cc-button>${this._displaySectionWithService(c)?t`<cc-block-section><div slot=title>${this._getDeleteWithServiceTitle(c)}</div><div>${this._getDeleteWithServiceDescription(c,this._selectedBackup.url)}</div></cc-block-section>`:""}<cc-block-section><div slot=title>${o("cc-addon-backups.delete.manual.title")}</div><div>${this._getManualDeleteDescription(c)}</div><cc-input-text readonly=readonly clipboard value=${this._selectedBackup.deleteCommand}></cc-input-text><div>${o("cc-addon-backups.command-password")}</div><cc-input-text readonly=readonly clipboard secret value=${a}></cc-input-text></cc-block-section></cc-block></div>`:""}</cc-block>`}static get styles(){return[a,l,c`:host{display:grid;grid-gap:1rem;line-height:1.5}.backup-list{display:grid;grid-gap:1.5rem}.backup{display:flex;line-height:1.5rem}.backup-icon,.backup-text{margin-right:.5rem}.backup-icon{flex:0 0 auto;height:1.5rem;width:1.5rem}.backup-icon img{display:block;height:100%;width:100%}.backup-text{color:#555}.backup-text-details:not(.skeleton) strong{color:#000}[title]{cursor:help}.skeleton{background-color:#bbb}.overlay{box-shadow:0 0 1rem #aaa;margin:2rem;max-width:80%}.cc-link,cc-button[link]{margin-right:.5rem;vertical-align:baseline}`]}}window.customElements.define("cc-addon-backups",p);export{p as CcAddonBackups}; | ||
//# sourceMappingURL=cc-addon-backups.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as r}from"lit-element";import{ifDefined as c}from"lit-html/directives/if-defined.js";import{i18n as s}from"../lib/i18n.js";import{skeletonStyles as i}from"../styles/skeleton.js";import"../atoms/cc-input-text.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";class a extends e{static get properties(){return{credentials:{type:Array},error:{type:Boolean},icon:{type:String},name:{type:String},toggleState:{type:Boolean,attribute:"toggle-state"},type:{type:String}}}constructor(){super(),this.error=!1,this.toggleState="off"}_getDescription(e){switch(e){case"apm":return s("cc-addon-credentials.description.apm");case"elasticsearch":return s("cc-addon-credentials.description.elasticsearch");case"kibana":return s("cc-addon-credentials.description.kibana");case"pulsar":return s("cc-addon-credentials.description.pulsar");default:return""}}_getFieldName(e){switch(e){case"auth-token":return s("cc-addon-credentials.field.auth-token");case"host":return s("cc-addon-credentials.field.host");case"password":return s("cc-addon-credentials.field.password");case"url":return s("cc-addon-credentials.field.url");case"user":return s("cc-addon-credentials.field.user");default:return""}}render(){return t`<cc-block icon=${this.icon} state=${this.toggleState}><div slot=title>${s("cc-addon-credentials.title",{name:this.name})}</div>${this.error?"":t`<div>${this._getDescription(this.type)}</div>${null!=this.credentials?t`<cc-flex-gap class=credential-list>${this.credentials.map((({type:e,secret:r,value:s})=>t`<cc-input-text readonly=readonly clipboard ?secret=${r} ?skeleton=${null==s} value=${c(s)} label=${this._getFieldName(e)}></cc-input-text>`))}</cc-flex-gap>`:""}`} ${this.error?t`<cc-error>${s("cc-addon-credentials.loading-error")}</cc-error>`:""}</cc-block>`}static get styles(){return[i,r`:host{display:block}.credential-list{--cc-gap:1rem}cc-input-text{flex:1 0 18rem}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-addon-credentials",a);export{a as CcAddonCredentials}; | ||
import"../atoms/cc-input-text.js";import"../atoms/cc-flex-gap.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import{LitElement as e,html as t,css as r}from"lit-element";import{ifDefined as c}from"lit-html/directives/if-defined.js";import{i18n as s}from"../lib/i18n.js";import{skeletonStyles as i}from"../styles/skeleton.js";class a extends e{static get properties(){return{credentials:{type:Array},error:{type:Boolean},icon:{type:String},name:{type:String},toggleState:{type:Boolean,attribute:"toggle-state"},type:{type:String}}}constructor(){super(),this.error=!1,this.toggleState="off"}_getDescription(e){switch(e){case"apm":return s("cc-addon-credentials.description.apm");case"elasticsearch":return s("cc-addon-credentials.description.elasticsearch");case"kibana":return s("cc-addon-credentials.description.kibana");case"pulsar":return s("cc-addon-credentials.description.pulsar");default:return""}}_getFieldName(e){switch(e){case"auth-token":return s("cc-addon-credentials.field.auth-token");case"host":return s("cc-addon-credentials.field.host");case"password":return s("cc-addon-credentials.field.password");case"url":return s("cc-addon-credentials.field.url");case"user":return s("cc-addon-credentials.field.user");default:return""}}render(){return t`<cc-block icon=${this.icon} state=${this.toggleState}><div slot=title>${s("cc-addon-credentials.title",{name:this.name})}</div>${this.error?"":t`<div>${this._getDescription(this.type)}</div>${null!=this.credentials?t`<cc-flex-gap class=credential-list>${this.credentials.map((({type:e,secret:r,value:s})=>t`<cc-input-text readonly=readonly clipboard ?secret=${r} ?skeleton=${null==s} value=${c(s)} label=${this._getFieldName(e)}></cc-input-text>`))}</cc-flex-gap>`:""}`} ${this.error?t`<cc-error>${s("cc-addon-credentials.loading-error")}</cc-error>`:""}</cc-block>`}static get styles(){return[i,r`:host{display:block}.credential-list{--cc-gap:1rem}cc-input-text{flex:1 0 18rem}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-addon-credentials",a);export{a as CcAddonCredentials}; | ||
//# sourceMappingURL=cc-addon-credentials.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as e}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import"../molecules/cc-error.js";import"./cc-addon-option-form.js";import{ccAddonEncryptionAtRestOption as n}from"../templates/cc-addon-encryption-at-rest-option.js";class a extends t{static get properties(){return{options:{type:Array,attribute:"options"}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){e(this,"submit",t)}_getApmOption({enabled:t,flavor:i}){return{title:"APM",logo:"https://static-assets.cellar.services.clever-cloud.com/logos/elasticsearch-apm.svg",description:o`<div class=option-details>${s("cc-addon-elasticsearch-options.description.apm")}</div><cc-error class=option-warning>${s("cc-addon-elasticsearch-options.warning.apm")} ${null!=i?o`${s("cc-addon-elasticsearch-options.warning.apm.details",i)}`:""}</cc-error>`,enabled:t,name:"apm"}}_getKibanaOption({enabled:t,flavor:i}){return{title:"Kibana",logo:"https://static-assets.cellar.services.clever-cloud.com/logos/elasticsearch-kibana.svg",description:o`<div class=option-details>${s("cc-addon-elasticsearch-options.description.kibana")}</div><cc-error class=option-warning>${s("cc-addon-elasticsearch-options.warning.kibana")} ${null!=i?o`${s("cc-addon-elasticsearch-options.warning.kibana.details",i)}`:""}</cc-error>`,enabled:t,name:"kibana"}}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"apm":return this._getApmOption(t);case"kibana":return this._getKibanaOption(t);case"encryption":return n(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=s("cc-addon-elasticsearch-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${s("cc-addon-elasticsearch-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-elasticsearch-options",a);export{a as CcAddonElasticsearchOptions}; | ||
import"./cc-addon-option-form.js";import"../molecules/cc-error.js";import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as e}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{ccAddonEncryptionAtRestOption as n}from"../templates/cc-addon-encryption-at-rest-option.js";class a extends t{static get properties(){return{options:{type:Array,attribute:"options"}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){e(this,"submit",t)}_getApmOption({enabled:t,flavor:i}){return{title:"APM",logo:"https://static-assets.cellar.services.clever-cloud.com/logos/elasticsearch-apm.svg",description:o`<div class=option-details>${s("cc-addon-elasticsearch-options.description.apm")}</div><cc-error class=option-warning>${s("cc-addon-elasticsearch-options.warning.apm")} ${null!=i?o`${s("cc-addon-elasticsearch-options.warning.apm.details",i)}`:""}</cc-error>`,enabled:t,name:"apm"}}_getKibanaOption({enabled:t,flavor:i}){return{title:"Kibana",logo:"https://static-assets.cellar.services.clever-cloud.com/logos/elasticsearch-kibana.svg",description:o`<div class=option-details>${s("cc-addon-elasticsearch-options.description.kibana")}</div><cc-error class=option-warning>${s("cc-addon-elasticsearch-options.warning.kibana")} ${null!=i?o`${s("cc-addon-elasticsearch-options.warning.kibana.details",i)}`:""}</cc-error>`,enabled:t,name:"kibana"}}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"apm":return this._getApmOption(t);case"kibana":return this._getKibanaOption(t);case"encryption":return n(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=s("cc-addon-elasticsearch-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${s("cc-addon-elasticsearch-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-elasticsearch-options",a);export{a as CcAddonElasticsearchOptions}; | ||
//# sourceMappingURL=cc-addon-elasticsearch-options.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as r,css as a}from"lit-element";import{classMap as t}from"lit-html/directives/class-map.js";import{i18n as o}from"../lib/i18n.js";import{skeletonStyles as s}from"../styles/skeleton.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";const c=new URL(new URL("../assets/cpu.svg",import.meta.url).href,import.meta.url).href,i=new URL(new URL("../assets/disk.svg",import.meta.url).href,import.meta.url).href,n=new URL(new URL("../assets/ram.svg",import.meta.url).href,import.meta.url).href,l={cpus:c,vcpus:c,disk:i,memory:n,ram:n},u=["cpus","vcpus","memory","disk"],d=[{name:"??????",value:"????????"},{name:"????",value:"??"},{name:"?????",value:"????"},{name:"???????",value:"????????"}];class m extends e{static get properties(){return{error:{type:Boolean},features:{type:Array}}}constructor(){super(),this.error=!1}_getFeatureName(e,r){return"disk"===e?o("cc-addon-features.feature-name.disk"):"nodes"===e?o("cc-addon-features.feature-name.nodes"):"memory"===e?o("cc-addon-features.feature-name.memory"):r}_getFeatureValue(e,r){return"dedicated"===e?o("cc-addon-features.feature-value.dedicated"):"no"===e?o("cc-addon-features.feature-value.no"):"yes"===e?o("cc-addon-features.feature-value.yes"):r}_sortFeatures(e){const r=e.slice(0);return r.sort(((e,r)=>{const a=u.indexOf(e.name.toLowerCase())+1||u.length+1,t=u.indexOf(r.name.toLowerCase())+1||u.length+1;return String(a).localeCompare(String(t),void 0,{numeric:!0})})),r}render(){const e=null==this.features,a=(e?d:this.features).map((e=>{const r=e.name.toLowerCase(),a=e.value.toLowerCase();return{...e,icon:l[r],name:this._getFeatureName(r,e.name),value:this._getFeatureValue(a,e.value)}})),s=this._sortFeatures(a);return r`<cc-block><div slot=title>${o("cc-addon-features.title")}</div>${this.error?"":r`<div>${o("cc-addon-features.details")}</div><cc-flex-gap class=feature-list>${s.map((a=>r`<div class="${t({skeleton:e})} feature">${null!=a.icon?r`<div class=feature-icon><img class=feature-icon_img src=${a.icon} alt=""></div>`:""}<div class=feature-name>${a.name}</div><div class=feature-value>${a.value}</div></div>`))}</cc-flex-gap>`} ${this.error?r`<cc-error>${o("cc-addon-features.loading-error")}</cc-error>`:""}</cc-block>`}static get styles(){return[s,a`:host{display:block}.feature-list{--bdw:2px;--cc-gap:1rem;--color:#496D93;--padding:0.6rem}.feature{background-color:var(--color);border:var(--bdw) solid var(--color);border-radius:calc(2 * var(--bdw));display:flex;flex-wrap:wrap}.feature-icon{margin:calc(var(--padding)/ 2) 0 calc(var(--padding)/ 2) var(--padding);position:relative;width:1.3rem}.feature-icon_img{display:block;height:100%;left:0;object-fit:contain;object-position:center center;position:absolute;top:0;width:100%}.feature-name,.feature-value{box-sizing:border-box;flex:1 1 auto;font-weight:700;padding:calc(var(--padding)/ 2) var(--padding);text-align:center}.feature-name{color:#fff}.skeleton .feature-name{color:var(--color)}.feature-value{background-color:#fff;border-radius:var(--bdw);color:var(--color)}.skeleton .feature-value{color:#fff}`]}}window.customElements.define("cc-addon-features",m);export{m as CcAddonFeatures}; | ||
import"../atoms/cc-flex-gap.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import{LitElement as e,html as r,css as a}from"lit-element";import{classMap as t}from"lit-html/directives/class-map.js";import{i18n as o}from"../lib/i18n.js";import{skeletonStyles as s}from"../styles/skeleton.js";const c=new URL(new URL("../assets/cpu.svg",import.meta.url).href,import.meta.url).href,i=new URL(new URL("../assets/disk.svg",import.meta.url).href,import.meta.url).href,n=new URL(new URL("../assets/ram.svg",import.meta.url).href,import.meta.url).href,l={cpus:c,vcpus:c,disk:i,memory:n,ram:n},u=["cpus","vcpus","memory","disk"],d=[{name:"??????",value:"????????"},{name:"????",value:"??"},{name:"?????",value:"????"},{name:"???????",value:"????????"}];class m extends e{static get properties(){return{error:{type:Boolean},features:{type:Array}}}constructor(){super(),this.error=!1}_getFeatureName(e,r){return"disk"===e?o("cc-addon-features.feature-name.disk"):"nodes"===e?o("cc-addon-features.feature-name.nodes"):"memory"===e?o("cc-addon-features.feature-name.memory"):r}_getFeatureValue(e,r){return"dedicated"===e?o("cc-addon-features.feature-value.dedicated"):"no"===e?o("cc-addon-features.feature-value.no"):"yes"===e?o("cc-addon-features.feature-value.yes"):r}_sortFeatures(e){const r=e.slice(0);return r.sort(((e,r)=>{const a=u.indexOf(e.name.toLowerCase())+1||u.length+1,t=u.indexOf(r.name.toLowerCase())+1||u.length+1;return String(a).localeCompare(String(t),void 0,{numeric:!0})})),r}render(){const e=null==this.features,a=(e?d:this.features).map((e=>{const r=e.name.toLowerCase(),a=e.value.toLowerCase();return{...e,icon:l[r],name:this._getFeatureName(r,e.name),value:this._getFeatureValue(a,e.value)}})),s=this._sortFeatures(a);return r`<cc-block><div slot=title>${o("cc-addon-features.title")}</div>${this.error?"":r`<div>${o("cc-addon-features.details")}</div><cc-flex-gap class=feature-list>${s.map((a=>r`<div class="${t({skeleton:e})} feature">${null!=a.icon?r`<div class=feature-icon><img class=feature-icon_img src=${a.icon} alt=""></div>`:""}<div class=feature-name>${a.name}</div><div class=feature-value>${a.value}</div></div>`))}</cc-flex-gap>`} ${this.error?r`<cc-error>${o("cc-addon-features.loading-error")}</cc-error>`:""}</cc-block>`}static get styles(){return[s,a`:host{display:block}.feature-list{--bdw:2px;--cc-gap:1rem;--color:#496D93;--padding:0.6rem}.feature{background-color:var(--color);border:var(--bdw) solid var(--color);border-radius:calc(2 * var(--bdw));display:flex;flex-wrap:wrap}.feature-icon{margin:calc(var(--padding)/ 2) 0 calc(var(--padding)/ 2) var(--padding);position:relative;width:1.3rem}.feature-icon_img{display:block;height:100%;left:0;object-fit:contain;object-position:center center;position:absolute;top:0;width:100%}.feature-name,.feature-value{box-sizing:border-box;flex:1 1 auto;font-weight:700;padding:calc(var(--padding)/ 2) var(--padding);text-align:center}.feature-name{color:#fff}.skeleton .feature-name{color:var(--color)}.feature-value{background-color:#fff;border-radius:var(--bdw);color:var(--color)}.skeleton .feature-value{color:#fff}`]}}window.customElements.define("cc-addon-features",m);export{m as CcAddonFeatures}; | ||
//# sourceMappingURL=cc-addon-features.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import"../molecules/cc-error.js";import"./cc-addon-option-form.js";import{ccAddonEncryptionAtRestOption as e}from"../templates/cc-addon-encryption-at-rest-option.js";class r extends t{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){n(this,"submit",t)}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"encryption":return e(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=s("cc-addon-jenkins-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${s("cc-addon-jenkins-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-jenkins-options",r);export{r as CcAddonJenkinsOptions}; | ||
import"./cc-addon-option-form.js";import"../molecules/cc-error.js";import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{ccAddonEncryptionAtRestOption as e}from"../templates/cc-addon-encryption-at-rest-option.js";class r extends t{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){n(this,"submit",t)}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"encryption":return e(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=s("cc-addon-jenkins-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${s("cc-addon-jenkins-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-jenkins-options",r);export{r as CcAddonJenkinsOptions}; | ||
//# sourceMappingURL=cc-addon-jenkins-options.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as i,css as t}from"lit-element";import{ifDefined as c}from"lit-html/directives/if-defined.js";import{i18n as s}from"../lib/i18n.js";import{skeletonStyles as n}from"../styles/skeleton.js";import{ccLink as r,linkStyles as o}from"../templates/cc-link.js";import"../atoms/cc-img.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";import"../zones/cc-zone.js";const a=[{name:"??????????????????",link:"",instance:{variant:{}}},{name:"???????????????????????",link:"",instance:{variant:{}}},{name:"????????????????????",link:"",instance:{variant:{}}}];class l extends e{static get properties(){return{applications:{type:Array},error:{type:Boolean}}}constructor(){super(),this.error=!1}render(){const e=null==this.applications,t=e?a:this.applications,n=!this.error&&t.length>0,o=!this.error&&0===t.length;return i`<cc-block><div slot=title>${s("cc-addon-linked-apps.title")}</div>${n?i`<div>${s("cc-addon-linked-apps.details")}</div>${t.map((t=>i`<div class=application><cc-img class=logo ?skeleton=${e} src=${c(t.instance.variant.logo)} title=${c(t.instance.variant.name)}></cc-img><cc-flex-gap class=details><span class=name>${r(t.link,t.name,e)}</span><cc-zone mode=small .zone=${t.zone}></cc-zone></cc-flex-gap></div>`))}`:""} ${o?i`<div class=cc-block_empty-msg>${s("cc-addon-linked-apps.no-linked-applications")}</div>`:""} ${this.error?i`<cc-error>${s("cc-addon-linked-apps.loading-error")}</cc-error>`:""}</cc-block>`}static get styles(){return[n,o,t`:host{display:block}.application{align-items:flex-start;display:flex;line-height:1.6rem}.logo{border-radius:.25rem;flex:0 0 auto;height:1.6rem;width:1.6rem}.details{--cc-align-items:center;--cc-gap:0.5rem;margin-left:.5rem}.name.skeleton{background-color:#bbb}[title]{cursor:help}`]}}window.customElements.define("cc-addon-linked-apps",l);export{l as CcAddonLinkedApps}; | ||
import"../atoms/cc-flex-gap.js";import"../atoms/cc-img.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"../zones/cc-zone.js";import{LitElement as e,html as i,css as t}from"lit-element";import{ifDefined as c}from"lit-html/directives/if-defined.js";import{i18n as s}from"../lib/i18n.js";import{skeletonStyles as n}from"../styles/skeleton.js";import{ccLink as r,linkStyles as o}from"../templates/cc-link.js";const a=[{name:"??????????????????",link:"",instance:{variant:{}}},{name:"???????????????????????",link:"",instance:{variant:{}}},{name:"????????????????????",link:"",instance:{variant:{}}}];class l extends e{static get properties(){return{applications:{type:Array},error:{type:Boolean}}}constructor(){super(),this.error=!1}render(){const e=null==this.applications,t=e?a:this.applications,n=!this.error&&t.length>0,o=!this.error&&0===t.length;return i`<cc-block><div slot=title>${s("cc-addon-linked-apps.title")}</div>${n?i`<div>${s("cc-addon-linked-apps.details")}</div>${t.map((t=>i`<div class=application><cc-img class=logo ?skeleton=${e} src=${c(t.instance.variant.logo)} title=${c(t.instance.variant.name)}></cc-img><cc-flex-gap class=details><span class=name>${r(t.link,t.name,e)}</span><cc-zone mode=small .zone=${t.zone}></cc-zone></cc-flex-gap></div>`))}`:""} ${o?i`<div class=cc-block_empty-msg>${s("cc-addon-linked-apps.no-linked-applications")}</div>`:""} ${this.error?i`<cc-error>${s("cc-addon-linked-apps.loading-error")}</cc-error>`:""}</cc-block>`}static get styles(){return[n,o,t`:host{display:block}.application{align-items:flex-start;display:flex;line-height:1.6rem}.logo{border-radius:.25rem;flex:0 0 auto;height:1.6rem;width:1.6rem}.details{--cc-align-items:center;--cc-gap:0.5rem;margin-left:.5rem}.name.skeleton{background-color:#bbb}[title]{cursor:help}`]}}window.customElements.define("cc-addon-linked-apps",l);export{l as CcAddonLinkedApps}; | ||
//# sourceMappingURL=cc-addon-linked-apps.js.map |
@@ -1,2 +0,2 @@ | ||
import"./cc-addon-linked-apps.js";import{merge as n,combineLatest as i}from"rxjs/dist/esm/index.js";import{LastPromise as e,unsubscribeWithSignal as o}from"../lib/observables.js";import{defineComponent as r}from"../lib/smart-manager.js";import"../smart/cc-smart-container.js";import{getLinkedApplications as a}from"@clevercloud/client/esm/api/v2/addon.js";import{getAllZones as s}from"@clevercloud/client/esm/api/v4/product.js";import{ONE_DAY as t}from"@clevercloud/client/esm/with-cache.js";import{sendToApi as c}from"../lib/send-to-api.js";r({selector:"cc-addon-linked-apps",params:{apiConfig:{type:Object},ownerId:{type:String},addonId:{type:String}},onConnect(r,p,l,d){const m=new e,u=new e,f=n(m.error$,u.error$),g=i(m.value$,u.value$);o(d,[f.subscribe(console.error),f.subscribe((()=>p.error=!0)),g.subscribe((([n,i])=>{p.applications=i.map((i=>{const e=n.find((n=>n.name===i.zoneName));return{...i,zone:e}}))})),l.subscribe((({apiConfig:n,ownerId:i,addonId:e})=>{p.error=!1,p.applications=null,null!=n&&null!=i&&null!=e&&(m.push((i=>function({apiConfig:n,signal:i}){return s().then(c({apiConfig:n,signal:i,cacheDelay:t}))}({apiConfig:n,signal:i}))),u.push((o=>function({apiConfig:n,signal:i,ownerId:e,addonId:o}){return a({id:e,addonId:o}).then(c({apiConfig:n,signal:i})).then((n=>n.map((n=>{const{name:i,instance:o,zone:r}=n;return{name:i,link:function(n,i){return n.startsWith("orga_")?`/organisations/${n}/applications/${i}`:`/users/me/applications/${i}`}(e,n.id),instance:o,zoneName:r}}))))}({apiConfig:n,signal:o,ownerId:i,addonId:e}))))}))])}}); | ||
import"./cc-addon-linked-apps.js";import"../smart/cc-smart-container.js";import{getLinkedApplications as n}from"@clevercloud/client/esm/api/v2/addon.js";import{getAllZones as i}from"@clevercloud/client/esm/api/v4/product.js";import{ONE_DAY as o}from"@clevercloud/client/esm/with-cache.js";import{LastPromise as e,unsubscribeWithSignal as r}from"../lib/observables.js";import{sendToApi as a}from"../lib/send-to-api.js";import{defineComponent as s}from"../lib/smart-manager.js";import{merge as t,combineLatest as c}from"rxjs";s({selector:"cc-addon-linked-apps",params:{apiConfig:{type:Object},ownerId:{type:String},addonId:{type:String}},onConnect(s,p,l,d){const m=new e,u=new e,f=t(m.error$,u.error$),g=c(m.value$,u.value$);r(d,[f.subscribe(console.error),f.subscribe((()=>p.error=!0)),g.subscribe((([n,i])=>{p.applications=i.map((i=>{const o=n.find((n=>n.name===i.zoneName));return{...i,zone:o}}))})),l.subscribe((({apiConfig:e,ownerId:r,addonId:s})=>{p.error=!1,p.applications=null,null!=e&&null!=r&&null!=s&&(m.push((n=>function({apiConfig:n,signal:e}){return i().then(a({apiConfig:n,signal:e,cacheDelay:o}))}({apiConfig:e,signal:n}))),u.push((i=>function({apiConfig:i,signal:o,ownerId:e,addonId:r}){return n({id:e,addonId:r}).then(a({apiConfig:i,signal:o})).then((n=>n.map((n=>{const{name:i,instance:o,zone:r}=n;return{name:i,link:function(n,i){return n.startsWith("orga_")?`/organisations/${n}/applications/${i}`:`/users/me/applications/${i}`}(e,n.id),instance:o,zoneName:r}}))))}({apiConfig:e,signal:i,ownerId:r,addonId:s}))))}))])}}); | ||
//# sourceMappingURL=cc-addon-linked-apps.smart.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as o,html as t,css as i}from"lit-element";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as r}from"../lib/i18n.js";import"../molecules/cc-error.js";import"./cc-addon-option-form.js";import{ccAddonEncryptionAtRestOption as s}from"../templates/cc-addon-encryption-at-rest-option.js";class e extends o{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:o}){n(this,"submit",o)}_getFormOptions(){return this.options.map((o=>{switch(o.name){case"encryption":return s(o);default:return null}})).filter((o=>null!=o))}render(){const o=this._getFormOptions(),i=r("cc-addon-mongodb-options.title");return t`<cc-addon-option-form title=${i} .options=${o} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${r("cc-addon-mongodb-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-mongodb-options",e);export{e as CcAddonMongodbOptions}; | ||
import"./cc-addon-option-form.js";import"../molecules/cc-error.js";import{LitElement as o,html as t,css as i}from"lit-element";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as r}from"../lib/i18n.js";import{ccAddonEncryptionAtRestOption as s}from"../templates/cc-addon-encryption-at-rest-option.js";class e extends o{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:o}){n(this,"submit",o)}_getFormOptions(){return this.options.map((o=>{switch(o.name){case"encryption":return s(o);default:return null}})).filter((o=>null!=o))}render(){const o=this._getFormOptions(),i=r("cc-addon-mongodb-options.title");return t`<cc-addon-option-form title=${i} .options=${o} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${r("cc-addon-mongodb-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-mongodb-options",e);export{e as CcAddonMongodbOptions}; | ||
//# sourceMappingURL=cc-addon-mongodb-options.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import"../molecules/cc-error.js";import"./cc-addon-option-form.js";import{ccAddonEncryptionAtRestOption as r}from"../templates/cc-addon-encryption-at-rest-option.js";class e extends t{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){n(this,"submit",t)}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"encryption":return r(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=s("cc-addon-mysql-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${s("cc-addon-mysql-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-mysql-options",e);export{e as CcAddonMysqlOptions}; | ||
import"./cc-addon-option-form.js";import"../molecules/cc-error.js";import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{ccAddonEncryptionAtRestOption as r}from"../templates/cc-addon-encryption-at-rest-option.js";class e extends t{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){n(this,"submit",t)}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"encryption":return r(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=s("cc-addon-mysql-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${s("cc-addon-mysql-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-mysql-options",e);export{e as CcAddonMysqlOptions}; | ||
//# sourceMappingURL=cc-addon-mysql-options.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as e}from"../lib/i18n.js";import{linkStyles as s}from"../templates/cc-link.js";import"../atoms/cc-button.js";import"../molecules/cc-block.js";import"./cc-addon-option.js";class c extends t{static get properties(){return{title:{type:String},options:{type:Array}}}constructor(){super(),this._optionsStates={}}_onSubmit(){this.options.forEach((t=>{null==this._optionsStates[t.name]&&(this._optionsStates[t.name]=t.enabled||!1)})),n(this,"submit",this._optionsStates)}_onOptionToggle({detail:t},o){this._optionsStates[o]=t}render(){return o`<cc-block><div slot=title>${this.title}</div><slot name=description></slot>${this.options.map((t=>{const i=t.enabled||!1;return o`<cc-addon-option title=${t.title} logo=${t.logo} ?enabled=${i} @cc-addon-option:input=${o=>this._onOptionToggle(o,t.name)}>${t.description}</cc-addon-option>`}))}<div class=button-bar><cc-button primary @cc-button:click=${this._onSubmit}>${e("cc-addon-option-form.confirm")}</cc-button></div></cc-block>`}static get styles(){return[s,i`:host{display:block}.button-bar{display:grid;justify-content:flex-end}[name=description]{line-height:1.5}`]}}window.customElements.define("cc-addon-option-form",c);export{c as CcAddonOptionForm}; | ||
import"./cc-addon-option.js";import"../atoms/cc-button.js";import"../molecules/cc-block.js";import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as e}from"../lib/i18n.js";import{linkStyles as s}from"../templates/cc-link.js";class c extends t{static get properties(){return{title:{type:String},options:{type:Array}}}constructor(){super(),this._optionsStates={}}_onSubmit(){this.options.forEach((t=>{null==this._optionsStates[t.name]&&(this._optionsStates[t.name]=t.enabled||!1)})),n(this,"submit",this._optionsStates)}_onOptionToggle({detail:t},o){this._optionsStates[o]=t}render(){return o`<cc-block><div slot=title>${this.title}</div><slot name=description></slot>${this.options.map((t=>{const i=t.enabled||!1;return o`<cc-addon-option title=${t.title} logo=${t.logo} ?enabled=${i} @cc-addon-option:input=${o=>this._onOptionToggle(o,t.name)}>${t.description}</cc-addon-option>`}))}<div class=button-bar><cc-button primary @cc-button:click=${this._onSubmit}>${e("cc-addon-option-form.confirm")}</cc-button></div></cc-block>`}static get styles(){return[s,i`:host{display:block}.button-bar{display:grid;justify-content:flex-end}[name=description]{line-height:1.5}`]}}window.customElements.define("cc-addon-option-form",c);export{c as CcAddonOptionForm}; | ||
//# sourceMappingURL=cc-addon-option-form.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as o}from"lit-element";import{dispatchCustomEvent as i}from"../lib/events.js";import{i18n as l}from"../lib/i18n.js";import"../atoms/cc-img.js";import"../atoms/cc-toggle.js";class n extends e{static get properties(){return{title:{type:String},logo:{type:String},enabled:{type:Boolean,reflect:!0}}}constructor(){super(),this.title=null,this.logo=null,this.enabled=!1}_onToggleOption(){this.enabled=!this.enabled,i(this,"input",this.enabled)}render(){const e=[{label:l("cc-addon-option.disabled"),value:!1},{label:l("cc-addon-option.enabled"),value:!0}];return t`<cc-img class=logo src=${this.logo}></cc-img><div class=option-main><div class=option-name>${this.title}</div><slot class=option-details></slot><cc-toggle .choices=${e} .value=${this.enabled} @cc-toggle:input=${this._onToggleOption}></cc-toggle></div>`}static get styles(){return[o`:host{border-radius:.25rem;display:grid;grid-gap:1rem;grid-template-columns:min-content 1fr;padding:1rem}::slotted(.option-warning){color:#555;font-style:italic}.option-main{display:grid;grid-gap:.5rem}.option-name{font-weight:700;line-height:1.6;min-height:1.6rem}:host(:not([enabled])){background-color:#f8f8f8;border:2px solid #f8f8f8}:host([enabled]){border:2px solid #30ab61}.logo{border-radius:.25rem;height:1.6rem;width:1.6rem}cc-toggle{justify-self:end;margin-top:.5rem}:host([enabled]) cc-toggle{--cc-toggle-color:hsl(144, 56%, 43%)}.option-details{line-height:1.5}`]}}window.customElements.define("cc-addon-option",n);export{n as CcAddonOption}; | ||
import"../atoms/cc-img.js";import"../atoms/cc-toggle.js";import{LitElement as e,html as t,css as o}from"lit-element";import{dispatchCustomEvent as i}from"../lib/events.js";import{i18n as l}from"../lib/i18n.js";class n extends e{static get properties(){return{title:{type:String},logo:{type:String},enabled:{type:Boolean,reflect:!0}}}constructor(){super(),this.title=null,this.logo=null,this.enabled=!1}_onToggleOption(){this.enabled=!this.enabled,i(this,"input",this.enabled)}render(){const e=[{label:l("cc-addon-option.disabled"),value:!1},{label:l("cc-addon-option.enabled"),value:!0}];return t`<cc-img class=logo src=${this.logo}></cc-img><div class=option-main><div class=option-name>${this.title}</div><slot class=option-details></slot><cc-toggle .choices=${e} .value=${this.enabled} @cc-toggle:input=${this._onToggleOption}></cc-toggle></div>`}static get styles(){return[o`:host{border-radius:.25rem;display:grid;grid-gap:1rem;grid-template-columns:min-content 1fr;padding:1rem}::slotted(.option-warning){color:#555;font-style:italic}.option-main{display:grid;grid-gap:.5rem}.option-name{font-weight:700;line-height:1.6;min-height:1.6rem}:host(:not([enabled])){background-color:#f8f8f8;border:2px solid #f8f8f8}:host([enabled]){border:2px solid #30ab61}.logo{border-radius:.25rem;height:1.6rem;width:1.6rem}cc-toggle{justify-self:end;margin-top:.5rem}:host([enabled]) cc-toggle{--cc-toggle-color:hsl(144, 56%, 43%)}.option-details{line-height:1.5}`]}}window.customElements.define("cc-addon-option",n);export{n as CcAddonOption}; | ||
//# sourceMappingURL=cc-addon-option.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as s}from"../lib/events.js";import{i18n as r}from"../lib/i18n.js";import"../molecules/cc-error.js";import"./cc-addon-option-form.js";import{ccAddonEncryptionAtRestOption as n}from"../templates/cc-addon-encryption-at-rest-option.js";class e extends t{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){s(this,"submit",t)}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"encryption":return n(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=r("cc-addon-postgresql-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${r("cc-addon-postgresql-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-postgresql-options",e);export{e as CcAddonPostgresqlOptions}; | ||
import"./cc-addon-option-form.js";import"../molecules/cc-error.js";import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as s}from"../lib/events.js";import{i18n as r}from"../lib/i18n.js";import{ccAddonEncryptionAtRestOption as n}from"../templates/cc-addon-encryption-at-rest-option.js";class e extends t{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){s(this,"submit",t)}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"encryption":return n(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=r("cc-addon-postgresql-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${r("cc-addon-postgresql-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-postgresql-options",e);export{e as CcAddonPostgresqlOptions}; | ||
//# sourceMappingURL=cc-addon-postgresql-options.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as n}from"../lib/i18n.js";import"../molecules/cc-error.js";import"./cc-addon-option-form.js";import{ccAddonEncryptionAtRestOption as s}from"../templates/cc-addon-encryption-at-rest-option.js";class e extends t{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){r(this,"submit",t)}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"encryption":return s(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=n("cc-addon-redis-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${n("cc-addon-redis-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-redis-options",e);export{e as CcAddonRedisOptions}; | ||
import"./cc-addon-option-form.js";import"../molecules/cc-error.js";import{LitElement as t,html as o,css as i}from"lit-element";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as n}from"../lib/i18n.js";import{ccAddonEncryptionAtRestOption as s}from"../templates/cc-addon-encryption-at-rest-option.js";class e extends t{static get properties(){return{options:{type:Array}}}constructor(){super(),this.options=[]}_onFormOptionsSubmit({detail:t}){r(this,"submit",t)}_getFormOptions(){return this.options.map((t=>{switch(t.name){case"encryption":return s(t);default:return null}})).filter((t=>null!=t))}render(){const t=this._getFormOptions(),i=n("cc-addon-redis-options.title");return o`<cc-addon-option-form title=${i} .options=${t} @cc-addon-option-form:submit=${this._onFormOptionsSubmit}><div slot=description>${n("cc-addon-redis-options.description")}</div></cc-addon-option-form>`}static get styles(){return[i`:host{display:block}`]}}window.customElements.define("cc-addon-redis-options",e);export{e as CcAddonRedisOptions}; | ||
//# sourceMappingURL=cc-addon-redis-options.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as r,css as c}from"lit-element";import{classMap as s}from"lit-html/directives/class-map.js";import{i18n as t}from"../lib/i18n.js";import{skeletonStyles as i}from"../styles/skeleton.js";import{ccLink as a,linkStyles as l}from"../templates/cc-link.js";import"../atoms/cc-img.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";const o=new URL(new URL("../assets/info.svg",import.meta.url).href,import.meta.url).href;class n extends e{static get properties(){return{links:{type:Array,attribute:"links"},error:{type:Boolean,attribute:"error"}}}constructor(){super(),this.error=!1}render(){const e=this.links||[],c=e.find((({type:e})=>"elasticsearch"===e)),i=e.find((({type:e})=>"kibana"===e)),l=e.find((({type:e})=>"apm"===e));return r`<div class=info-ribbon>${t("cc-elasticsearch-info.info")}</div>${this.error?"":r`<div class=info-text>${t("cc-elasticsearch-info.text")}</div><cc-flex-gap class=link-list>${a("https://www.clever-cloud.com/doc/addons/elastic/",r`<cc-img src=${o}></cc-img><span>${t("cc-elasticsearch-info.link.doc")}</span>`)} ${null!=c?r`${a(c.href,r`<cc-img src=${"https://static-assets.cellar.services.clever-cloud.com/logos/elastic.svg"}></cc-img><span class=${s({skeleton:null==c.href})}>${t("cc-elasticsearch-info.link.elasticsearch")}</span>`)}`:""} ${null!=i?r`${a(i.href,r`<cc-img src=${"https://static-assets.cellar.services.clever-cloud.com/logos/elasticsearch-kibana.svg"}></cc-img><span class=${s({skeleton:null==i.href})}>${t("cc-elasticsearch-info.link.kibana")}</span>`)}`:""} ${null!=l?r`${a(l.href,r`<cc-img src=${"https://static-assets.cellar.services.clever-cloud.com/logos/elasticsearch-apm.svg"}></cc-img><span class=${s({skeleton:null==l.href})}>${t("cc-elasticsearch-info.link.apm")}</span>`)}`:""}</cc-flex-gap>`} ${this.error?r`<cc-error>${t("cc-elasticsearch-info.error")}</cc-error>`:""}`}static get styles(){return[i,l,c`:host{--cc-gap:1rem;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:grid;grid-gap:var(--cc-gap);overflow:hidden;padding:var(--cc-gap);padding-left:4rem;position:relative}.cc-link{align-items:center;display:flex}cc-img{border-radius:.25rem;flex:0 0 auto;height:1.5rem;margin-right:.5rem;width:1.5rem}.info-ribbon{--height:1.5rem;--width:8rem;--r:-45deg;--translate:1.6rem;background:#3a3871;color:#fff;font-size:.9rem;font-weight:700;height:var(--height);left:calc(var(--width)/ -2);line-height:var(--height);position:absolute;text-align:center;top:calc(var(--height)/ -2);transform:rotate(var(--r)) translateY(var(--translate));width:var(--width);z-index:2}.skeleton{background-color:#bbb}cc-error{text-align:center}`]}}window.customElements.define("cc-elasticsearch-info",n);export{n as CcElasticsearchInfo}; | ||
import"../atoms/cc-img.js";import"../atoms/cc-flex-gap.js";import"../molecules/cc-error.js";import{LitElement as e,html as r,css as c}from"lit-element";import{classMap as s}from"lit-html/directives/class-map.js";import{i18n as t}from"../lib/i18n.js";import{skeletonStyles as i}from"../styles/skeleton.js";import{ccLink as a,linkStyles as l}from"../templates/cc-link.js";const o=new URL(new URL("../assets/info.svg",import.meta.url).href,import.meta.url).href;class n extends e{static get properties(){return{links:{type:Array,attribute:"links"},error:{type:Boolean,attribute:"error"}}}constructor(){super(),this.error=!1}render(){const e=this.links||[],c=e.find((({type:e})=>"elasticsearch"===e)),i=e.find((({type:e})=>"kibana"===e)),l=e.find((({type:e})=>"apm"===e));return r`<div class=info-ribbon>${t("cc-elasticsearch-info.info")}</div>${this.error?"":r`<div class=info-text>${t("cc-elasticsearch-info.text")}</div><cc-flex-gap class=link-list>${a("https://www.clever-cloud.com/doc/addons/elastic/",r`<cc-img src=${o}></cc-img><span>${t("cc-elasticsearch-info.link.doc")}</span>`)} ${null!=c?r`${a(c.href,r`<cc-img src=${"https://static-assets.cellar.services.clever-cloud.com/logos/elastic.svg"}></cc-img><span class=${s({skeleton:null==c.href})}>${t("cc-elasticsearch-info.link.elasticsearch")}</span>`)}`:""} ${null!=i?r`${a(i.href,r`<cc-img src=${"https://static-assets.cellar.services.clever-cloud.com/logos/elasticsearch-kibana.svg"}></cc-img><span class=${s({skeleton:null==i.href})}>${t("cc-elasticsearch-info.link.kibana")}</span>`)}`:""} ${null!=l?r`${a(l.href,r`<cc-img src=${"https://static-assets.cellar.services.clever-cloud.com/logos/elasticsearch-apm.svg"}></cc-img><span class=${s({skeleton:null==l.href})}>${t("cc-elasticsearch-info.link.apm")}</span>`)}`:""}</cc-flex-gap>`} ${this.error?r`<cc-error>${t("cc-elasticsearch-info.error")}</cc-error>`:""}`}static get styles(){return[i,l,c`:host{--cc-gap:1rem;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:grid;grid-gap:var(--cc-gap);overflow:hidden;padding:var(--cc-gap);padding-left:4rem;position:relative}.cc-link{align-items:center;display:flex}cc-img{border-radius:.25rem;flex:0 0 auto;height:1.5rem;margin-right:.5rem;width:1.5rem}.info-ribbon{--height:1.5rem;--width:8rem;--r:-45deg;--translate:1.6rem;background:#3a3871;color:#fff;font-size:.9rem;font-weight:700;height:var(--height);left:calc(var(--width)/ -2);line-height:var(--height);position:absolute;text-align:center;top:calc(var(--height)/ -2);transform:rotate(var(--r)) translateY(var(--translate));width:var(--width);z-index:2}.skeleton{background-color:#bbb}cc-error{text-align:center}`]}}window.customElements.define("cc-elasticsearch-info",n);export{n as CcElasticsearchInfo}; | ||
//# sourceMappingURL=cc-elasticsearch-info.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as i,css as r}from"lit-element";import{classMap as t}from"lit-html/directives/class-map.js";import{ifDefined as o}from"lit-html/directives/if-defined.js";import{i18n as c}from"../lib/i18n.js";import{skeletonStyles as s}from"../styles/skeleton.js";import"../atoms/cc-input-text.js";import"../atoms/cc-img.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";const a={name:"??????????????????????????",provider:{},plan:{name:"?????????"},creationDate:0};class d extends e{static get properties(){return{addon:{type:Object},error:{type:Boolean},version:{type:String}}}constructor(){super(),this.error=!1}render(){const e=null==this.addon,r=e?a:this.addon,s=null==this.version,d=s?"????????":this.version,n=c("cc-header-addon.creation-date.short",{date:r.creationDate}),l=e?void 0:c("cc-header-addon.creation-date.full",{date:r.creationDate});return i`${this.error?"":i`<cc-flex-gap class=main><cc-img class=logo src=${o(r.provider.logoUrl)} ?skeleton=${e} text=${r.provider.name} title=${o(r.provider.name)}></cc-img><div class=details><div class=name><span class=${t({skeleton:e})}>${r.name}</span></div><cc-input-text readonly=readonly clipboard value=${o(r.id)} ?skeleton=${e}></cc-input-text></div><cc-flex-gap class=description><div class=description-item><div class=description-label>${c("cc-header-addon.plan")}</div><div class=${t({skeleton:e})}>${r.plan.name}</div></div><div class=description-item><div class=description-label>${c("cc-header-addon.version")}</div><div class=${t({skeleton:s})}>${d}</div></div><div class=description-item><div class=description-label>${c("cc-header-addon.creation-date")}</div><div class=${t({skeleton:e})} title=${o(l)}>${n}</div></div></cc-flex-gap></cc-flex-gap>`} ${this.error?i`<cc-error>${c("cc-header-addon.error")}</cc-error>`:""}`}static get styles(){return[s,r`:host{--cc-gap:1rem;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:block}.main{padding:var(--cc-gap)}.logo{border-radius:.25rem;height:3.25rem;width:3.25rem}.details{flex:1 1 0}.description-label,.name{margin-bottom:.35rem}.name{font-size:1.1rem;font-weight:700;min-width:12rem}.description{align-self:center}.description-item{flex:1 1 auto}.description-label{font-weight:700}cc-error{padding:var(--cc-gap);text-align:center}[title]{cursor:help}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-header-addon",d);export{d as CcHeaderAddon}; | ||
import"../atoms/cc-img.js";import"../atoms/cc-input-text.js";import"../atoms/cc-flex-gap.js";import"../molecules/cc-error.js";import{LitElement as e,html as i,css as r}from"lit-element";import{classMap as t}from"lit-html/directives/class-map.js";import{ifDefined as o}from"lit-html/directives/if-defined.js";import{i18n as c}from"../lib/i18n.js";import{skeletonStyles as s}from"../styles/skeleton.js";const a={name:"??????????????????????????",provider:{},plan:{name:"?????????"},creationDate:0};class d extends e{static get properties(){return{addon:{type:Object},error:{type:Boolean},version:{type:String}}}constructor(){super(),this.error=!1}render(){const e=null==this.addon,r=e?a:this.addon,s=null==this.version,d=s?"????????":this.version,n=c("cc-header-addon.creation-date.short",{date:r.creationDate}),l=e?void 0:c("cc-header-addon.creation-date.full",{date:r.creationDate});return i`${this.error?"":i`<cc-flex-gap class=main><cc-img class=logo src=${o(r.provider.logoUrl)} ?skeleton=${e} text=${r.provider.name} title=${o(r.provider.name)}></cc-img><div class=details><div class=name><span class=${t({skeleton:e})}>${r.name}</span></div><cc-input-text readonly=readonly clipboard value=${o(r.id)} ?skeleton=${e}></cc-input-text></div><cc-flex-gap class=description><div class=description-item><div class=description-label>${c("cc-header-addon.plan")}</div><div class=${t({skeleton:e})}>${r.plan.name}</div></div><div class=description-item><div class=description-label>${c("cc-header-addon.version")}</div><div class=${t({skeleton:s})}>${d}</div></div><div class=description-item><div class=description-label>${c("cc-header-addon.creation-date")}</div><div class=${t({skeleton:e})} title=${o(l)}>${n}</div></div></cc-flex-gap></cc-flex-gap>`} ${this.error?i`<cc-error>${c("cc-header-addon.error")}</cc-error>`:""}`}static get styles(){return[s,r`:host{--cc-gap:1rem;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:block}.main{padding:var(--cc-gap)}.logo{border-radius:.25rem;height:3.25rem;width:3.25rem}.details{flex:1 1 0}.description-label,.name{margin-bottom:.35rem}.name{font-size:1.1rem;font-weight:700;min-width:12rem}.description{align-self:center}.description-item{flex:1 1 auto}.description-label{font-weight:700}cc-error{padding:var(--cc-gap);text-align:center}[title]{cursor:help}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-header-addon",d);export{d as CcHeaderAddon}; | ||
//# sourceMappingURL=cc-header-addon.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as i}from"lit-element";import{classMap as n}from"lit-html/directives/class-map.js";import{ifDefined as o}from"lit-html/directives/if-defined.js";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{skeletonStyles as l}from"../styles/skeleton.js";import{linkStyles as a}from"../templates/cc-link.js";class c extends e{static get properties(){return{danger:{type:Boolean},delay:{type:Number},disabled:{type:Boolean,reflect:!0},hideText:{type:Boolean,attribute:"hide-text"},image:{type:String},link:{type:Boolean,reflect:!0},outlined:{type:Boolean},primary:{type:Boolean},skeleton:{type:Boolean},success:{type:Boolean},waiting:{type:Boolean},warning:{type:Boolean},_cancelMode:{type:Boolean,attribute:!1}}}constructor(){super(),this.danger=!1,this.disabled=!1,this.link=!1,this.hideText=!1,this.outlined=!1,this.primary=!1,this.skeleton=!1,this.success=!1,this.waiting=!1,this.warning=!1,this._cancelMode=!1}focus(){this.shadowRoot.querySelector("button").focus()}_cancelClick(){clearTimeout(this._timeoutId),this._cancelMode=!1}_onClick(e){if(e.stopPropagation(),null==this.delay||0===this.delay||this.link)return r(this,"click");this._cancelMode?this._cancelClick():(this._cancelMode=!0,this._timeoutId=setTimeout((()=>{r(this,"click"),this._cancelMode=!1}),1e3*this.delay))}update(e){e.has("disabled")&&!0===this.disabled&&this._cancelClick(),super.update(e)}render(){const e={primary:this.primary&&!this.success&&!this.warning&&!this.danger&&!this.link,success:!this.primary&&this.success&&!this.warning&&!this.danger&&!this.link,warning:!this.primary&&!this.success&&this.warning&&!this.danger&&!this.link,danger:!this.primary&&!this.success&&!this.warning&&this.danger&&!this.link,skeleton:this.skeleton,"img-only":null!=this.image&&this.hideText,"txt-only":null==this.image,btn:!this.link,"cc-link":this.link},i=null==this.delay||this.link?null:this.delay,r=this.waiting&&!this.link;e.simple=!(e.primary||e.success||e.warning||e.danger||this.link),e.outlined=(this.outlined||e.simple)&&!this.link;const l=null!=this.image&&this.hideText?this.textContent||"":void 0;return t`<button type=button class=${n(e)} .disabled=${this.disabled||this.skeleton||this.waiting} @click=${this._onClick} title=${o(l)} aria-label=${o(l)}><div class="${n({"cancel-mode":this._cancelMode})} text-wrapper">${null!=this.image?t`<img src=${this.image} alt="">`:""}<div class=text-normal><slot></slot></div>${null!=i?t`<div class=text-cancel>${s("cc-button.cancel")}</div>`:""}</div>${null!=i?t`<progress class="${n({active:this._cancelMode})} delay" style=--delay:${i}s></progress>`:""} ${r?t`<progress class=waiting></progress>`:""}</button>`}static get styles(){return[l,a,i`:host{box-sizing:border-box;display:inline-block;vertical-align:middle}button{background:#fff;border:none;display:block;font-family:inherit;font-size:unset;margin:0;padding:0}.btn{border:1px solid #000;border-radius:.15rem;cursor:pointer;font-size:14px;font-weight:700;min-height:2rem;overflow:hidden;padding:0 .5rem;position:relative;text-transform:uppercase;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:100%;background-color:var(--btn-color);border-color:var(--btn-color);color:#fff;box-shadow:0 0 0 0 rgba(255,255,255,0);transition:box-shadow 75ms ease-in-out}.primary{--btn-color:hsl(213, 55%, 62%)}.success{--btn-color:hsl(144, 56%, 43%)}.warning{--btn-color:hsl(35, 84%, 37%)}.danger{--btn-color:hsl(351, 70%, 47%)}.outlined{background-color:#fff;color:var(--btn-color)}.simple{--btn-color:hsl(210, 23%, 26%);border-color:#aaa}.img-only{height:1.75rem;min-height:0;padding:0;width:1.75rem}.btn:enabled:focus{box-shadow:0 0 0 .2em rgba(50,115,220,.25);outline:0}.btn:enabled:hover{box-shadow:0 1px 3px #888}.btn:enabled:active{box-shadow:none;outline:0}button:disabled{cursor:inherit;opacity:.5}.skeleton{background-color:#bbb;border-color:#777;color:transparent}.skeleton img{visibility:hidden}.text-wrapper{align-items:center;display:grid;grid-gap:.5rem;grid-template-columns:min-content 1fr;height:100%;justify-content:center;width:100%}.txt-only .text-wrapper{grid-gap:0;grid-template-columns:1fr}.img-only .text-wrapper{grid-gap:0;grid-template-columns:min-content}img{display:block;height:1.25rem;width:1.25rem;grid-column:1/2}.img-only .text-normal{display:none}.text-cancel,.text-normal,img{grid-row:1/2}.text-normal{grid-column:-1/-2}.text-cancel{grid-column:1/-1}.text-wrapper.cancel-mode .text-normal,.text-wrapper.cancel-mode img,.text-wrapper:not(.cancel-mode) .text-cancel{visibility:hidden}progress,progress::-webkit-progress-bar{background-color:#fff}.outlined progress,.outlined progress::-webkit-progress-bar{background-color:var(--btn-color)}progress::-moz-progress-bar,progress::-webkit-progress-value{background-color:transparent}progress.delay{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;bottom:0;height:.2rem;left:0;position:absolute;width:0}progress.delay.active{transition:width var(--delay) linear;width:100%}@keyframes waiting{from{left:-52%}to{left:52%}}progress.waiting{--width:25%;animation:1s ease-in-out infinite alternate waiting;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;bottom:0;height:.2rem;margin-left:calc(50% - calc(var(--width)/ 2));position:absolute;width:var(--width)}button::-moz-focus-inner{border:0}.cc-link{cursor:pointer;text-decoration:underline}`]}}window.customElements.define("cc-button",c);export{c as CcButton}; | ||
import{LitElement as e,html as t,css as i}from"lit-element";import{classMap as n}from"lit-html/directives/class-map.js";import{ifDefined as o}from"lit-html/directives/if-defined.js";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{skeletonStyles as l}from"../styles/skeleton.js";import{linkStyles as a}from"../templates/cc-link.js";class c extends e{static get properties(){return{circle:{type:Boolean},danger:{type:Boolean},delay:{type:Number},disabled:{type:Boolean,reflect:!0},hideText:{type:Boolean,attribute:"hide-text"},image:{type:String},link:{type:Boolean,reflect:!0},outlined:{type:Boolean},primary:{type:Boolean},skeleton:{type:Boolean},success:{type:Boolean},waiting:{type:Boolean},warning:{type:Boolean},_cancelMode:{type:Boolean,attribute:!1}}}constructor(){super(),this.circle=!1,this.danger=!1,this.disabled=!1,this.link=!1,this.hideText=!1,this.outlined=!1,this.primary=!1,this.skeleton=!1,this.success=!1,this.waiting=!1,this.warning=!1,this._cancelMode=!1}focus(){this.shadowRoot.querySelector("button").focus()}_cancelClick(){clearTimeout(this._timeoutId),this._cancelMode=!1}_onClick(e){if(e.stopPropagation(),null==this.delay||0===this.delay||this.link)return r(this,"click");this._cancelMode?this._cancelClick():(this._cancelMode=!0,this._timeoutId=setTimeout((()=>{r(this,"click"),this._cancelMode=!1}),1e3*this.delay))}update(e){e.has("disabled")&&!0===this.disabled&&this._cancelClick(),super.update(e)}render(){const e={primary:this.primary&&!this.success&&!this.warning&&!this.danger&&!this.link,success:!this.primary&&this.success&&!this.warning&&!this.danger&&!this.link,warning:!this.primary&&!this.success&&this.warning&&!this.danger&&!this.link,danger:!this.primary&&!this.success&&!this.warning&&this.danger&&!this.link,skeleton:this.skeleton,"img-only":null!=this.image&&this.hideText,"txt-only":null==this.image,btn:!this.link,"cc-link":this.link},i=null==this.delay||this.link?null:this.delay,r=this.waiting&&!this.link;e.simple=!(e.primary||e.success||e.warning||e.danger||this.link),e.outlined=(this.outlined||e.simple)&&!this.link,e.circle=this.circle&&this.hideText&&this.image;const l=null!=this.image&&this.hideText?this.textContent||"":void 0;return t`<button type=button class=${n(e)} .disabled=${this.disabled||this.skeleton||this.waiting} @click=${this._onClick} title=${o(l)} aria-label=${o(l)}><div class="${n({"cancel-mode":this._cancelMode})} text-wrapper">${null!=this.image?t`<img src=${this.image} alt="">`:""}<div class=text-normal><slot></slot></div>${null!=i?t`<div class=text-cancel>${s("cc-button.cancel")}</div>`:""}</div>${null!=i?t`<progress class="${n({active:this._cancelMode})} delay" style=--delay:${i}s></progress>`:""} ${r?t`<progress class=waiting></progress>`:""}</button>`}static get styles(){return[l,a,i`:host{box-sizing:border-box;display:inline-block;vertical-align:middle}button{background:#fff;border:none;display:block;font-family:inherit;font-size:unset;margin:0;padding:0}.btn{border:1px solid #000;border-radius:.15rem;cursor:pointer;font-size:14px;font-weight:700;min-height:2rem;overflow:hidden;padding:0 .5rem;position:relative;text-transform:uppercase;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:100%;background-color:var(--btn-color);border-color:var(--btn-color);color:#fff;box-shadow:0 0 0 0 rgba(255,255,255,0);transition:box-shadow 75ms ease-in-out}.primary{--btn-color:hsl(213, 55%, 62%)}.success{--btn-color:hsl(144, 56%, 43%)}.warning{--btn-color:hsl(35, 84%, 37%)}.danger{--btn-color:hsl(351, 70%, 47%)}.outlined{background-color:#fff;color:var(--btn-color)}.circle{border-radius:50%}.simple{--btn-color:hsl(210, 23%, 26%);border-color:#aaa}.img-only{height:1.75rem;min-height:0;padding:0;width:1.75rem}.btn:enabled:focus{box-shadow:0 0 0 .2em rgba(50,115,220,.25);outline:0}.btn:enabled:hover{box-shadow:0 1px 3px #888}.btn:enabled:active{box-shadow:none;outline:0}button:disabled{cursor:inherit;opacity:.5}.skeleton{background-color:#bbb;border-color:#777;color:transparent}.skeleton img{visibility:hidden}.text-wrapper{align-items:center;display:grid;grid-gap:.5rem;grid-template-columns:min-content 1fr;height:100%;justify-content:center;width:100%}.txt-only .text-wrapper{grid-gap:0;grid-template-columns:1fr}.img-only .text-wrapper{grid-gap:0;grid-template-columns:min-content}img{display:block;height:1.25rem;width:1.25rem;grid-column:1/2}.img-only .text-normal{display:none}.text-cancel,.text-normal,img{grid-row:1/2}.text-normal{grid-column:-1/-2}.text-cancel{grid-column:1/-1}.text-wrapper.cancel-mode .text-normal,.text-wrapper.cancel-mode img,.text-wrapper:not(.cancel-mode) .text-cancel{visibility:hidden}progress,progress::-webkit-progress-bar{background-color:#fff}.outlined progress,.outlined progress::-webkit-progress-bar{background-color:var(--btn-color)}progress::-moz-progress-bar,progress::-webkit-progress-value{background-color:transparent}progress.delay{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;bottom:0;height:.2rem;left:0;position:absolute;width:0}progress.delay.active{transition:width var(--delay) linear;width:100%}@keyframes waiting{from{left:-52%}to{left:52%}}progress.waiting{--width:25%;animation:1s ease-in-out infinite alternate waiting;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;bottom:0;height:.2rem;margin-left:calc(50% - calc(var(--width)/ 2));position:absolute;width:var(--width)}button::-moz-focus-inner{border:0}.cc-link{cursor:pointer;text-decoration:underline}`]}}window.customElements.define("cc-button",c);export{c as CcButton}; | ||
//# sourceMappingURL=cc-button.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as l,css as t}from"lit-element";import{classMap as i}from"lit-html/directives/class-map.js";import{ifDefined as o}from"lit-html/directives/if-defined.js";import{dispatchCustomEvent as r}from"../lib/events.js";import{repeat as a}from"lit-html/directives/repeat.js";class s extends e{static get properties(){return{choices:{type:Array},disabled:{type:Boolean},hideText:{type:Boolean,attribute:"hide-text"},legend:{type:String},multipleValues:{type:Array,attribute:"multiple-values",reflect:!0},subtle:{type:Boolean},value:{type:String,reflect:!0}}}constructor(){super(),this.disabled=!1,this.hideText=!1,this.subtle=!1,this._uniqueName=Math.random().toString(36).slice(2)}_onChange(e){if(null==this.multipleValues)this.value=e.target.value,r(this,"input",this.value);else{const l=this.choices.filter((({value:l})=>l===e.target.value?e.target.checked:this.multipleValues.includes(l))).map((({value:e})=>e));this.multipleValues=l,r(this,"input-multiple",l)}}render(){const e={disabled:this.disabled,enabled:!this.disabled,"display-normal":!this.subtle,"display-subtle":this.subtle,"mode-single":null==this.multipleValues,"mode-multiple":null!=this.multipleValues},t=null==this.multipleValues?"radio":"checkbox",r=e=>null!=this.multipleValues?this.multipleValues.includes(e):this.value===e;return l`<fieldset><legend>${this.legend}</legend><div class="${i(e)} toggle-group">${a(this.choices,(({value:e})=>e),(({label:e,image:i,value:a})=>l`<input type=${t} name=${this._uniqueName} .value=${a} id=${a} ?disabled=${this.disabled} .checked=${r(a)} @change=${this._onChange} aria-label=${o(null!=i&&this.hideText?e:void 0)}> <label for=${a} title=${o(null!=i&&this.hideText?e:void 0)}>${null!=i?l`<img src=${i} alt="">`:""} ${null!=i&&this.hideText?"":l`<span>${e}</span>`}</label>`))}</div></fieldset>`}static get styles(){return[t`:host{--cc-toggle-color:#334252;--cc-toggle-img-filter:none;--cc-toggle-img-filter-selected:none;display:flex;flex-direction:column}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;line-height:inherit;max-width:100%;padding:0 0 .35rem;white-space:normal;width:100%}.toggle-group{background-color:#fff;border-radius:.15rem;box-sizing:border-box;display:flex;height:2rem;line-height:1.25;overflow:visible}input{-moz-appearance:none;-webkit-appearance:none;appearance:none;border:0;display:block;height:0;margin:0;outline:0;width:0}label{--space:2px;align-items:center;border-color:var(--cc-toggle-color);border-style:solid;color:var(--color-txt);cursor:pointer;display:grid;font-size:14px;font-weight:700;grid-auto-flow:column;grid-gap:.5rem;padding:0 .5rem;position:relative;text-transform:uppercase;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;border-width:1px 0;--color-bg:#fff;--color-txt:#666}label:first-of-type{border-left-width:1px;border-radius:.15rem 0 0 .15rem}label:last-of-type{border-radius:0 .15rem .15rem 0;border-right-width:1px}label:not(:first-of-type){margin-left:calc(var(--space) * -1)}label::before{background-color:var(--color-bg);border-radius:.15rem;bottom:var(--space);content:'';display:block;left:var(--space);position:absolute;right:var(--space);top:var(--space);z-index:0}.display-subtle label::after{background-color:var(--color-subtle-border);bottom:0;content:'';display:block;height:var(--space);left:.25rem;position:absolute;right:.25rem;z-index:0}label img,label span{z-index:0}img{display:block;height:1.25rem;width:1.25rem;filter:var(--cc-toggle-img-filter)}.toggle-group.disabled{opacity:.5}.disabled label{cursor:default}.display-normal input:not(:checked):enabled:hover+label,.display-subtle input:enabled:hover+label{--color-bg:#ededed}.toggle-group.mode-multiple.enabled:not(:hover) input:enabled:focus+label,.toggle-group.mode-single.enabled:not(:hover):focus-within{box-shadow:0 0 0 .2em rgba(50,115,220,.25);outline:0}.toggle-group.mode-multiple.enabled:not(:hover) input:enabled:focus+label{z-index:1}input:enabled:active+label::before{transform:scale(.95)}input:checked+label img{filter:var(--cc-toggle-img-filter-selected)}.display-normal input:checked+label{--color-bg:var(--cc-toggle-color);--color-txt:#fff}.display-subtle input:checked+label{--color-txt:var(--cc-toggle-color);--color-subtle-border:var(--cc-toggle-color)}`]}}window.customElements.define("cc-toggle",s);export{s as CcToggle}; | ||
import{LitElement as e,html as l,css as t}from"lit-element";import{classMap as i}from"lit-html/directives/class-map.js";import{ifDefined as o}from"lit-html/directives/if-defined.js";import{repeat as r}from"lit-html/directives/repeat.js";import{dispatchCustomEvent as a}from"../lib/events.js";class s extends e{static get properties(){return{choices:{type:Array},disabled:{type:Boolean},hideText:{type:Boolean,attribute:"hide-text"},legend:{type:String},multipleValues:{type:Array,attribute:"multiple-values",reflect:!0},subtle:{type:Boolean},value:{type:String,reflect:!0}}}constructor(){super(),this.disabled=!1,this.hideText=!1,this.subtle=!1,this._uniqueName=Math.random().toString(36).slice(2)}_onChange(e){if(null==this.multipleValues)this.value=e.target.value,a(this,"input",this.value);else{const l=this.choices.filter((({value:l})=>l===e.target.value?e.target.checked:this.multipleValues.includes(l))).map((({value:e})=>e));this.multipleValues=l,a(this,"input-multiple",l)}}render(){const e={disabled:this.disabled,enabled:!this.disabled,"display-normal":!this.subtle,"display-subtle":this.subtle,"mode-single":null==this.multipleValues,"mode-multiple":null!=this.multipleValues},t=null==this.multipleValues?"radio":"checkbox",a=e=>null!=this.multipleValues?this.multipleValues.includes(e):this.value===e;return l`<fieldset><legend>${this.legend}</legend><div class="${i(e)} toggle-group">${r(this.choices,(({value:e})=>e),(({label:e,image:i,value:r})=>l`<input type=${t} name=${this._uniqueName} .value=${r} id=${r} ?disabled=${this.disabled} .checked=${a(r)} @change=${this._onChange} aria-label=${o(null!=i&&this.hideText?e:void 0)}> <label for=${r} title=${o(null!=i&&this.hideText?e:void 0)}>${null!=i?l`<img src=${i} alt="">`:""} ${null!=i&&this.hideText?"":l`<span>${e}</span>`}</label>`))}</div></fieldset>`}static get styles(){return[t`:host{--cc-toggle-color:#334252;--cc-toggle-img-filter:none;--cc-toggle-img-filter-selected:none;display:flex;flex-direction:column}fieldset{border:0;margin:0;min-width:0;padding:0}legend{color:inherit;display:block;line-height:inherit;max-width:100%;padding:0 0 .35rem;white-space:normal;width:100%}.toggle-group{background-color:#fff;border-radius:.15rem;box-sizing:border-box;display:flex;height:2rem;line-height:1.25;overflow:visible}input{-moz-appearance:none;-webkit-appearance:none;appearance:none;border:0;display:block;height:0;margin:0;outline:0;width:0}label{--space:2px;align-items:center;border-color:var(--cc-toggle-color);border-style:solid;color:var(--color-txt);cursor:pointer;display:grid;font-size:14px;font-weight:700;grid-auto-flow:column;grid-gap:.5rem;padding:0 .5rem;position:relative;text-transform:uppercase;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;border-width:1px 0;--color-bg:#fff;--color-txt:#666}label:first-of-type{border-left-width:1px;border-radius:.15rem 0 0 .15rem}label:last-of-type{border-radius:0 .15rem .15rem 0;border-right-width:1px}label:not(:first-of-type){margin-left:calc(var(--space) * -1)}label::before{background-color:var(--color-bg);border-radius:.15rem;bottom:var(--space);content:'';display:block;left:var(--space);position:absolute;right:var(--space);top:var(--space);z-index:0}.display-subtle label::after{background-color:var(--color-subtle-border);bottom:0;content:'';display:block;height:var(--space);left:.25rem;position:absolute;right:.25rem;z-index:0}label img,label span{z-index:0}img{display:block;height:1.25rem;width:1.25rem;filter:var(--cc-toggle-img-filter)}.toggle-group.disabled{opacity:.5}.disabled label{cursor:default}.display-normal input:not(:checked):enabled:hover+label,.display-subtle input:enabled:hover+label{--color-bg:#ededed}.toggle-group.mode-multiple.enabled:not(:hover) input:enabled:focus+label,.toggle-group.mode-single.enabled:not(:hover):focus-within{box-shadow:0 0 0 .2em rgba(50,115,220,.25);outline:0}.toggle-group.mode-multiple.enabled:not(:hover) input:enabled:focus+label{z-index:1}input:enabled:active+label::before{transform:scale(.95)}input:checked+label img{filter:var(--cc-toggle-img-filter-selected)}.display-normal input:checked+label{--color-bg:var(--cc-toggle-color);--color-txt:#fff}.display-subtle input:checked+label{--color-txt:var(--cc-toggle-color);--color-subtle-border:var(--cc-toggle-color)}`]}}window.customElements.define("cc-toggle",s);export{s as CcToggle}; | ||
//# sourceMappingURL=cc-toggle.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as a}from"lit-element";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as i}from"../lib/i18n.js";import{defaultThemeStyles as c}from"../styles/default-theme.js";import"../atoms/cc-input-text.js";import"../atoms/cc-button.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";import{validateName as s}from"@clevercloud/client/esm/utils/env-vars.js";class l extends e{static get properties(){return{disabled:{type:Boolean},variablesNames:{type:Array,attribute:"variables-names"},_variableName:{type:String,attribute:!1},_variableValue:{type:String,attribute:!1}}}constructor(){super(),this.disabled=!1,this.variablesNames=[],this.reset()}reset(){this._variableName="",this._variableValue=""}_onNameInput({detail:e}){this._variableName=e}_onValueInput({detail:e}){this._variableValue=e}_onSubmit(){r(this,"create",{name:this._variableName,value:this._variableValue}),this.reset(),this.shadowRoot.querySelector("cc-input-text.name").focus()}_onRequestSubmit(e,t){e.stopPropagation(),t||this._onSubmit()}render(){const e=!s(this._variableName),a=this.variablesNames.includes(this._variableName),r=e||a;return t`<cc-flex-gap><cc-input-text class=name name=name value=${this._variableName} ?disabled=${this.disabled} placeholder=${i("cc-env-var-create.name.placeholder")} @cc-input-text:input=${this._onNameInput} @cc-input-text:requestimplicitsubmit=${e=>this._onRequestSubmit(e,r)}></cc-input-text><cc-flex-gap class=input-btn><cc-input-text class=value name=value value=${this._variableValue} multi ?disabled=${this.disabled} placeholder=${i("cc-env-var-create.value.placeholder")} @cc-input-text:input=${this._onValueInput} @cc-input-text:requestimplicitsubmit=${e=>this._onRequestSubmit(e,r)}></cc-input-text><cc-button primary ?disabled=${r||this.disabled} @cc-button:click=${this._onSubmit}>${i("cc-env-var-create.create-button")}</cc-button></cc-flex-gap></cc-flex-gap>${e&&""!==this._variableName?t`<cc-error>${i("cc-env-var-create.errors.invalid-name",{name:this._variableName})}</cc-error>`:""} ${a?t`<cc-error>${i("cc-env-var-create.errors.already-defined-name",{name:this._variableName})}</cc-error>`:""}`}static get styles(){return[c,a`:host{--cc-gap:0.5rem;display:block}.name{flex:1 1 15rem}.input-btn{flex:2 1 27rem}.value{flex:100 1 20rem}cc-button{align-self:flex-start;flex:1 1 6rem;white-space:nowrap}cc-error{margin:.5rem 0}cc-error code{background-color:#f3f3f3;border-radius:.25rem;font-family:var(--cc-ff-monospace);padding:.15rem .3rem}`]}}window.customElements.define("cc-env-var-create",l);export{l as CcEnvVarCreate}; | ||
import"../atoms/cc-button.js";import"../atoms/cc-flex-gap.js";import"../atoms/cc-input-text.js";import"../molecules/cc-error.js";import{validateName as e}from"@clevercloud/client/esm/utils/env-vars.js";import{LitElement as t,html as a,css as r}from"lit-element";import{dispatchCustomEvent as i}from"../lib/events.js";import{i18n as c}from"../lib/i18n.js";import{defaultThemeStyles as s}from"../styles/default-theme.js";class l extends t{static get properties(){return{disabled:{type:Boolean},variablesNames:{type:Array,attribute:"variables-names"},_variableName:{type:String,attribute:!1},_variableValue:{type:String,attribute:!1}}}constructor(){super(),this.disabled=!1,this.variablesNames=[],this.reset()}reset(){this._variableName="",this._variableValue=""}_onNameInput({detail:e}){this._variableName=e}_onValueInput({detail:e}){this._variableValue=e}_onSubmit(){i(this,"create",{name:this._variableName,value:this._variableValue}),this.reset(),this.shadowRoot.querySelector("cc-input-text.name").focus()}_onRequestSubmit(e,t){e.stopPropagation(),t||this._onSubmit()}render(){const t=!e(this._variableName),r=this.variablesNames.includes(this._variableName),i=t||r;return a`<cc-flex-gap><cc-input-text class=name name=name value=${this._variableName} ?disabled=${this.disabled} placeholder=${c("cc-env-var-create.name.placeholder")} @cc-input-text:input=${this._onNameInput} @cc-input-text:requestimplicitsubmit=${e=>this._onRequestSubmit(e,i)}></cc-input-text><cc-flex-gap class=input-btn><cc-input-text class=value name=value value=${this._variableValue} multi ?disabled=${this.disabled} placeholder=${c("cc-env-var-create.value.placeholder")} @cc-input-text:input=${this._onValueInput} @cc-input-text:requestimplicitsubmit=${e=>this._onRequestSubmit(e,i)}></cc-input-text><cc-button primary ?disabled=${i||this.disabled} @cc-button:click=${this._onSubmit}>${c("cc-env-var-create.create-button")}</cc-button></cc-flex-gap></cc-flex-gap>${t&&""!==this._variableName?a`<cc-error>${c("cc-env-var-create.errors.invalid-name",{name:this._variableName})}</cc-error>`:""} ${r?a`<cc-error>${c("cc-env-var-create.errors.already-defined-name",{name:this._variableName})}</cc-error>`:""}`}static get styles(){return[s,r`:host{--cc-gap:0.5rem;display:block}.name{flex:1 1 15rem}.input-btn{flex:2 1 27rem}.value{flex:100 1 20rem}cc-button{align-self:flex-start;flex:1 1 6rem;white-space:nowrap}cc-error{margin:.5rem 0}cc-error code{background-color:#f3f3f3;border-radius:.25rem;font-family:var(--cc-ff-monospace);padding:.15rem .3rem}`]}}window.customElements.define("cc-env-var-create",l);export{l as CcEnvVarCreate}; | ||
//# sourceMappingURL=cc-env-var-create.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as r,css as t}from"lit-element";import{dispatchCustomEvent as s}from"../lib/events.js";import{i18n as i}from"../lib/i18n.js";import{defaultThemeStyles as o}from"../styles/default-theme.js";import"../atoms/cc-input-text.js";import"../molecules/cc-error.js";import{ERROR_TYPES as a,parseRaw as n,toNameEqualsValueString as l}from"@clevercloud/client/esm/utils/env-vars.js";const c=[{name:"VARIABLE_ONE",value:""},{name:"VARIABLE_FOOBAR",value:""},{name:"VARIABLE_PORT",value:""}];class d extends e{static get properties(){return{disabled:{type:Boolean},readonly:{type:Boolean},variables:{type:Array},_variablesAsText:{type:Array,attribute:!1},_errors:{type:Array,attribute:!1},_skeleton:{type:Boolean,attribute:!1}}}constructor(){super(),this._skeleton=!1,this.variables=null,this.disabled=!1,this.readonly=!1}_setErrors(e){this._errors=e.map((({type:e,name:r,pos:t})=>e===a.INVALID_NAME?{line:t.line,msg:i("cc-env-var-editor-expert.errors.invalid-name",{name:r})}:e===a.DUPLICATED_NAME?{line:t.line,msg:i("cc-env-var-editor-expert.errors.duplicated-name",{name:r})}:e===a.INVALID_LINE?{line:t.line,msg:i("cc-env-var-editor-expert.errors.invalid-line")}:e===a.INVALID_VALUE?{line:t.line,msg:i("cc-env-var-editor-expert.errors.invalid-value")}:{line:"?",msg:i("cc-env-var-editor-expert.errors.unknown")}))}_onInput({detail:e}){const{variables:r,errors:t}=n(e);this._setErrors(t),0===t.length&&s(this,"change",r)}update(e){if(e.has("variables")){this._skeleton=null==this.variables;const e=(this._skeleton?c:this.variables).filter((({isDeleted:e})=>!e));this._variablesAsText=l(e),this._setErrors([])}super.update(e)}render(){const e=this.readonly?i("cc-env-var-editor-expert.placeholder-readonly"):i("cc-env-var-editor-expert.placeholder");return r`<cc-input-text multi clipboard value=${this._variablesAsText} placeholder=${e} ?disabled=${this.disabled} ?readonly=${this.readonly} ?skeleton=${this._skeleton} @cc-input-text:input=${this._onInput}></cc-input-text>${this._errors.length>0?r`<div class=error-list>${this._errors.map((({line:e,msg:t})=>r`<cc-error><strong>${i("cc-env-var-editor-expert.errors.line")} ${e}:</strong> ${t}</cc-error>`))}</div>`:""}`}static get styles(){return[o,t`:host{display:block}:host([hidden]){display:none}.error-list{display:grid;grid-gap:.75rem;margin-top:1rem}cc-error code{background-color:#f3f3f3;border-radius:.25rem;font-family:var(--cc-ff-monospace);padding:.15rem .3rem}`]}}window.customElements.define("cc-env-var-editor-expert",d);export{d as CcEnvVarEditorExpert}; | ||
import"../atoms/cc-input-text.js";import"../molecules/cc-error.js";import{ERROR_TYPES as e,parseRaw as r,toNameEqualsValueString as t}from"@clevercloud/client/esm/utils/env-vars.js";import{LitElement as s,html as i,css as o}from"lit-element";import{dispatchCustomEvent as a}from"../lib/events.js";import{i18n as n}from"../lib/i18n.js";import{defaultThemeStyles as l}from"../styles/default-theme.js";const c=[{name:"VARIABLE_ONE",value:""},{name:"VARIABLE_FOOBAR",value:""},{name:"VARIABLE_PORT",value:""}];class d extends s{static get properties(){return{disabled:{type:Boolean},readonly:{type:Boolean},variables:{type:Array},_variablesAsText:{type:Array,attribute:!1},_errors:{type:Array,attribute:!1},_skeleton:{type:Boolean,attribute:!1}}}constructor(){super(),this._skeleton=!1,this.variables=null,this.disabled=!1,this.readonly=!1}_setErrors(r){this._errors=r.map((({type:r,name:t,pos:s})=>r===e.INVALID_NAME?{line:s.line,msg:n("cc-env-var-editor-expert.errors.invalid-name",{name:t})}:r===e.DUPLICATED_NAME?{line:s.line,msg:n("cc-env-var-editor-expert.errors.duplicated-name",{name:t})}:r===e.INVALID_LINE?{line:s.line,msg:n("cc-env-var-editor-expert.errors.invalid-line")}:r===e.INVALID_VALUE?{line:s.line,msg:n("cc-env-var-editor-expert.errors.invalid-value")}:{line:"?",msg:n("cc-env-var-editor-expert.errors.unknown")}))}_onInput({detail:e}){const{variables:t,errors:s}=r(e);this._setErrors(s),0===s.length&&a(this,"change",t)}update(e){if(e.has("variables")){this._skeleton=null==this.variables;const e=(this._skeleton?c:this.variables).filter((({isDeleted:e})=>!e));this._variablesAsText=t(e),this._setErrors([])}super.update(e)}render(){const e=this.readonly?n("cc-env-var-editor-expert.placeholder-readonly"):n("cc-env-var-editor-expert.placeholder");return i`<cc-input-text multi clipboard value=${this._variablesAsText} placeholder=${e} ?disabled=${this.disabled} ?readonly=${this.readonly} ?skeleton=${this._skeleton} @cc-input-text:input=${this._onInput}></cc-input-text>${this._errors.length>0?i`<div class=error-list>${this._errors.map((({line:e,msg:r})=>i`<cc-error><strong>${n("cc-env-var-editor-expert.errors.line")} ${e}:</strong> ${r}</cc-error>`))}</div>`:""}`}static get styles(){return[l,o`:host{display:block}:host([hidden]){display:none}.error-list{display:grid;grid-gap:.75rem;margin-top:1rem}cc-error code{background-color:#f3f3f3;border-radius:.25rem;font-family:var(--cc-ff-monospace);padding:.15rem .3rem}`]}}window.customElements.define("cc-env-var-editor-expert",d);export{d as CcEnvVarEditorExpert}; | ||
//# sourceMappingURL=cc-env-var-editor-expert.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as a,css as t}from"lit-element";import{dispatchCustomEvent as i}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{repeat as n}from"lit-html/directives/repeat.js";import"./cc-env-var-create.js";import"./cc-env-var-input.js";const r=[{name:"VARIABLE_ONE",value:""},{name:"VARIABLE_FOOBAR",value:""},{name:"VARIABLE_PORT",value:""}];class l extends e{static get properties(){return{disabled:{type:Boolean},readonly:{type:Boolean},variables:{type:Array}}}constructor(){super(),this.disabled=!1,this.readonly=!1}_onCreate({detail:e}){this.variables=[...this.variables,e],i(this,"change",this.variables)}_onInput({detail:e}){this.variables=this.variables.map((a=>a.name===e.name?{...a,value:e.value}:a)),i(this,"change",this.variables)}_onDelete({detail:e}){this.variables=this.variables.filter((a=>a.name!==e.name||!a.isNew)).map((a=>a.name===e.name?{...a,isDeleted:!0}:a)),i(this,"change",this.variables)}_onKeep({detail:e}){this.variables=this.variables.map((a=>a.name===e.name?{...a,isDeleted:!1}:a)),i(this,"change",this.variables)}render(){const e=null==this.variables,t=e?r:this.variables,i=t.map((({name:e})=>e));return a`${this.readonly?"":a`<cc-env-var-create ?disabled=${e||this.disabled} .variablesNames=${i} @cc-env-var-create:create=${this._onCreate}></cc-env-var-create>`}<div class=message ?hidden=${null!=t&&0!==t.length}>${s("cc-env-var-editor-simple.empty-data")}</div>${n(t,(({name:e})=>e),(({name:t,value:i,isNew:s,isEdited:n,isDeleted:r})=>a`<cc-env-var-input name=${t} value=${i} ?new=${s} ?edited=${n} ?deleted=${r} ?skeleton=${e} ?disabled=${this.disabled} ?readonly=${this.readonly} @cc-env-var-input:input=${this._onInput} @cc-env-var-input:delete=${this._onDelete} @cc-env-var-input:keep=${this._onKeep}></cc-env-var-input>`))}`}static get styles(){return t`:host{display:grid;grid-gap:.5rem}:host([hidden]){display:none}cc-env-var-create{margin-bottom:1rem}.message{color:#555;font-style:italic;margin:.2rem}`}}window.customElements.define("cc-env-var-editor-simple",l);export{l as CcEnvVarEditorSimple}; | ||
import"./cc-env-var-create.js";import"./cc-env-var-input.js";import{LitElement as e,html as a,css as t}from"lit-element";import{repeat as i}from"lit-html/directives/repeat.js";import{dispatchCustomEvent as s}from"../lib/events.js";import{i18n as n}from"../lib/i18n.js";const r=[{name:"VARIABLE_ONE",value:""},{name:"VARIABLE_FOOBAR",value:""},{name:"VARIABLE_PORT",value:""}];class l extends e{static get properties(){return{disabled:{type:Boolean},readonly:{type:Boolean},variables:{type:Array}}}constructor(){super(),this.disabled=!1,this.readonly=!1}_onCreate({detail:e}){this.variables=[...this.variables,e],s(this,"change",this.variables)}_onInput({detail:e}){this.variables=this.variables.map((a=>a.name===e.name?{...a,value:e.value}:a)),s(this,"change",this.variables)}_onDelete({detail:e}){this.variables=this.variables.filter((a=>a.name!==e.name||!a.isNew)).map((a=>a.name===e.name?{...a,isDeleted:!0}:a)),s(this,"change",this.variables)}_onKeep({detail:e}){this.variables=this.variables.map((a=>a.name===e.name?{...a,isDeleted:!1}:a)),s(this,"change",this.variables)}render(){const e=null==this.variables,t=e?r:this.variables,s=t.map((({name:e})=>e));return a`${this.readonly?"":a`<cc-env-var-create ?disabled=${e||this.disabled} .variablesNames=${s} @cc-env-var-create:create=${this._onCreate}></cc-env-var-create>`}<div class=message ?hidden=${null!=t&&0!==t.length}>${n("cc-env-var-editor-simple.empty-data")}</div>${i(t,(({name:e})=>e),(({name:t,value:i,isNew:s,isEdited:n,isDeleted:r})=>a`<cc-env-var-input name=${t} value=${i} ?new=${s} ?edited=${n} ?deleted=${r} ?skeleton=${e} ?disabled=${this.disabled} ?readonly=${this.readonly} @cc-env-var-input:input=${this._onInput} @cc-env-var-input:delete=${this._onDelete} @cc-env-var-input:keep=${this._onKeep}></cc-env-var-input>`))}`}static get styles(){return t`:host{display:grid;grid-gap:.5rem}:host([hidden]){display:none}cc-env-var-create{margin-bottom:1rem}.message{color:#555;font-style:italic;margin:.2rem}`}}window.customElements.define("cc-env-var-editor-simple",l);export{l as CcEnvVarEditorSimple}; | ||
//# sourceMappingURL=cc-env-var-editor-simple.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as r}from"lit-element";import{classMap as i}from"lit-html/directives/class-map.js";import{dispatchCustomEvent as a}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import"../atoms/cc-loader.js";import{linkStyles as n}from"../templates/cc-link.js";import"../atoms/cc-button.js";import"../atoms/cc-expand.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";import"../atoms/cc-toggle.js";import"./cc-env-var-editor-expert.js";import"./cc-env-var-editor-simple.js";class o extends e{static get properties(){return{appName:{type:String,attribute:"app-name"},context:{type:String},error:{type:String,reflect:!0},heading:{type:String,reflect:!0},readonly:{type:Boolean,reflect:!0},restartApp:{type:Boolean,attribute:"restart-app"},saving:{type:Boolean,reflect:!0},variables:{type:Array},_currentVariables:{type:Array,attribute:!1},_description:{type:String,attribute:!1},_expertVariables:{type:Array,attribute:!1},_mode:{type:String,attribute:!1},_isPristine:{type:Boolean,attribute:!1}}}constructor(){super(),this.appName="?",this.readonly=!1,this.restartApp=!1,this.saving=!1,this._mode="SIMPLE",this._description=""}_getModes(){return[{label:s("cc-env-var-form.mode.simple"),value:"SIMPLE"},{label:s("cc-env-var-form.mode.expert"),value:"EXPERT"}]}_getErrorMessage(){return"loading"===this.error?s("cc-env-var-form.error.loading"):"saving"===this.error?s("cc-env-var-form.error.saving"):s("cc-env-var-form.error.unknown")}_onChange({detail:e}){const t=this._initVariables.filter((t=>{const r=e.find((e=>e.name===t.name));return(null==r||r.isDeleted)&&!t.isNew})).map((e=>({...e,isDeleted:!0}))),r=e.filter((e=>null==this._initVariables.find((t=>t.name===e.name)))).map((e=>({...e,isNew:!0}))),i=e.filter((e=>{const i=t.find((t=>t.name===e.name)),a=r.find((t=>t.name===e.name));return!i&&!a})).map((e=>{const t=this._initVariables.find((t=>t.name===e.name)).value!==e.value;return{...e,isEdited:t}})),a=[...t,...r,...i];this._isPristine=!a.some((({isDeleted:e,isNew:t,isEdited:r})=>e||t||r)),this._currentVariables=a.sort(((e,t)=>e.name.localeCompare(t.name)))}_onToggleMode({detail:e}){"EXPERT"===e&&(this._expertVariables=this._currentVariables),this._mode=e}_onResetForm(){this.variables=this._initVariables}_onUpdateForm(){const e=this._currentVariables.filter((({isDeleted:e})=>!e)).map((({name:e,value:t})=>({name:e,value:t})));a(this,"submit",e)}_onRequestSubmit(e,t){e.stopPropagation(),t||this._onUpdateForm()}update(e){(e.has("context")||e.has("appName"))&&("env-var"===this.context&&(this.heading=s("cc-env-var-form.heading.env-var"),this._description=s("cc-env-var-form.description.env-var",{appName:this.appName})),"env-var-simple"===this.context&&(this.heading=s("cc-env-var-form.heading.env-var")),"env-var-addon"===this.context&&(this.heading=s("cc-env-var-form.heading.env-var"),this.readonly=!0),"exposed-config"===this.context&&(this.heading=s("cc-env-var-form.heading.exposed-config"),this._description=s("cc-env-var-form.description.exposed-config",{appName:this.appName}))),e.has("variables")&&(this._initVariables=this.variables,this._isPristine=!0,null==this.variables?(this._currentVariables=null,this._expertVariables=null):(this._currentVariables=this.variables.sort(((e,t)=>e.name.localeCompare(t.name))),this._expertVariables=this.variables.sort(((e,t)=>e.name.localeCompare(t.name))))),super.update(e)}render(){const e=this.saving||null!=this.error,r=null==this._currentVariables||this._isPristine||e,n=this.saving||null!=this.error;return t`<div class=header>${null!=this.heading?t`<div class=heading>${this.heading}</div>`:""}<cc-toggle class="${i({hasOverlay:n})} mode-switcher" value=${this._mode} .choices=${this._getModes()} ?disabled=${e} @cc-toggle:input=${this._onToggleMode}></cc-toggle></div><slot class=description>${this._description}</slot><div class=overlay-container><cc-expand class=${i({hasOverlay:n})}><cc-env-var-editor-simple ?hidden=${"SIMPLE"!==this._mode} .variables=${this._currentVariables} ?disabled=${e} ?readonly=${this.readonly} @cc-env-var-editor-simple:change=${this._onChange} @cc-input-text:requestimplicitsubmit=${e=>this._onRequestSubmit(e,r)}></cc-env-var-editor-simple><cc-env-var-editor-expert ?hidden=${"EXPERT"!==this._mode} .variables=${this._expertVariables} ?disabled=${e} ?readonly=${this.readonly} @cc-env-var-editor-expert:change=${this._onChange} @cc-input-text:requestimplicitsubmit=${e=>this._onRequestSubmit(e,r)}></cc-env-var-editor-expert></cc-expand>${"loading"===this.error?t`<div class=error-container><cc-error mode=info>${this._getErrorMessage()}</cc-error></div>`:""} ${"saving"===this.error?t`<div class=error-container><cc-error mode=confirm @cc-error:ok=${()=>a(this,"dismissed-error")}>${this._getErrorMessage()}</cc-error></div>`:""} ${this.saving?t`<cc-loader class=saving-loader></cc-loader>`:""}</div>${this.readonly?"":t`<cc-flex-gap class=button-bar><cc-button ?disabled=${r} @cc-button:click=${this._onResetForm}>${s("cc-env-var-form.reset")}</cc-button><div class=spacer></div>${this.restartApp?t`<cc-button @cc-button:click=${()=>a(this,"restart-app")}>${s("cc-env-var-form.restart-app")}</cc-button>`:""}<cc-button success ?disabled=${r} @cc-button:click=${this._onUpdateForm}>${s("cc-env-var-form.update")}</cc-button></cc-flex-gap>`}`}static get styles(){return[n,r`:host{background:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:block;padding:1rem}.header{align-items:flex-start;display:flex;justify-content:center;margin-bottom:.5rem}.heading{color:#3a3871;flex:1 1 0;font-size:1.2rem;font-weight:700}.description{color:#555;display:block;font-style:italic;line-height:1.5;margin-bottom:1rem}.hasOverlay{--cc-skeleton-state:paused;filter:blur(.3rem)}.overlay-container{position:relative}cc-expand{margin:-.25rem;padding:.25rem}.error-container{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.saving-loader{height:100%;left:0;position:absolute;top:0;width:100%}.button-bar{--cc-gap:1rem;margin-top:1.5rem}.spacer{flex:1 1 0}`]}}window.customElements.define("cc-env-var-form",o);export{o as CcEnvVarForm}; | ||
import"../atoms/cc-button.js";import"../atoms/cc-expand.js";import"../atoms/cc-loader.js";import"../atoms/cc-toggle.js";import"../atoms/cc-flex-gap.js";import"../molecules/cc-error.js";import"./cc-env-var-editor-expert.js";import"./cc-env-var-editor-simple.js";import{LitElement as e,html as t,css as r}from"lit-element";import{classMap as i}from"lit-html/directives/class-map.js";import{dispatchCustomEvent as a}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{linkStyles as n}from"../templates/cc-link.js";class o extends e{static get properties(){return{appName:{type:String,attribute:"app-name"},context:{type:String},error:{type:String,reflect:!0},heading:{type:String,reflect:!0},readonly:{type:Boolean,reflect:!0},restartApp:{type:Boolean,attribute:"restart-app"},saving:{type:Boolean,reflect:!0},variables:{type:Array},_currentVariables:{type:Array,attribute:!1},_description:{type:String,attribute:!1},_expertVariables:{type:Array,attribute:!1},_mode:{type:String,attribute:!1},_isPristine:{type:Boolean,attribute:!1}}}constructor(){super(),this.appName="?",this.readonly=!1,this.restartApp=!1,this.saving=!1,this._mode="SIMPLE",this._description=""}_getModes(){return[{label:s("cc-env-var-form.mode.simple"),value:"SIMPLE"},{label:s("cc-env-var-form.mode.expert"),value:"EXPERT"}]}_getErrorMessage(){return"loading"===this.error?s("cc-env-var-form.error.loading"):"saving"===this.error?s("cc-env-var-form.error.saving"):s("cc-env-var-form.error.unknown")}_onChange({detail:e}){const t=this._initVariables.filter((t=>{const r=e.find((e=>e.name===t.name));return(null==r||r.isDeleted)&&!t.isNew})).map((e=>({...e,isDeleted:!0}))),r=e.filter((e=>null==this._initVariables.find((t=>t.name===e.name)))).map((e=>({...e,isNew:!0}))),i=e.filter((e=>{const i=t.find((t=>t.name===e.name)),a=r.find((t=>t.name===e.name));return!i&&!a})).map((e=>{const t=this._initVariables.find((t=>t.name===e.name)).value!==e.value;return{...e,isEdited:t}})),a=[...t,...r,...i];this._isPristine=!a.some((({isDeleted:e,isNew:t,isEdited:r})=>e||t||r)),this._currentVariables=a.sort(((e,t)=>e.name.localeCompare(t.name)))}_onToggleMode({detail:e}){"EXPERT"===e&&(this._expertVariables=this._currentVariables),this._mode=e}_onResetForm(){this.variables=this._initVariables}_onUpdateForm(){const e=this._currentVariables.filter((({isDeleted:e})=>!e)).map((({name:e,value:t})=>({name:e,value:t})));a(this,"submit",e)}_onRequestSubmit(e,t){e.stopPropagation(),t||this._onUpdateForm()}update(e){(e.has("context")||e.has("appName"))&&("env-var"===this.context&&(this.heading=s("cc-env-var-form.heading.env-var"),this._description=s("cc-env-var-form.description.env-var",{appName:this.appName})),"env-var-simple"===this.context&&(this.heading=s("cc-env-var-form.heading.env-var")),"env-var-addon"===this.context&&(this.heading=s("cc-env-var-form.heading.env-var"),this.readonly=!0),"exposed-config"===this.context&&(this.heading=s("cc-env-var-form.heading.exposed-config"),this._description=s("cc-env-var-form.description.exposed-config",{appName:this.appName}))),e.has("variables")&&(this._initVariables=this.variables,this._isPristine=!0,null==this.variables?(this._currentVariables=null,this._expertVariables=null):(this._currentVariables=this.variables.sort(((e,t)=>e.name.localeCompare(t.name))),this._expertVariables=this.variables.sort(((e,t)=>e.name.localeCompare(t.name))))),super.update(e)}render(){const e=this.saving||null!=this.error,r=null==this._currentVariables||this._isPristine||e,n=this.saving||null!=this.error;return t`<div class=header>${null!=this.heading?t`<div class=heading>${this.heading}</div>`:""}<cc-toggle class="${i({hasOverlay:n})} mode-switcher" value=${this._mode} .choices=${this._getModes()} ?disabled=${e} @cc-toggle:input=${this._onToggleMode}></cc-toggle></div><slot class=description>${this._description}</slot><div class=overlay-container><cc-expand class=${i({hasOverlay:n})}><cc-env-var-editor-simple ?hidden=${"SIMPLE"!==this._mode} .variables=${this._currentVariables} ?disabled=${e} ?readonly=${this.readonly} @cc-env-var-editor-simple:change=${this._onChange} @cc-input-text:requestimplicitsubmit=${e=>this._onRequestSubmit(e,r)}></cc-env-var-editor-simple><cc-env-var-editor-expert ?hidden=${"EXPERT"!==this._mode} .variables=${this._expertVariables} ?disabled=${e} ?readonly=${this.readonly} @cc-env-var-editor-expert:change=${this._onChange} @cc-input-text:requestimplicitsubmit=${e=>this._onRequestSubmit(e,r)}></cc-env-var-editor-expert></cc-expand>${"loading"===this.error?t`<div class=error-container><cc-error mode=info>${this._getErrorMessage()}</cc-error></div>`:""} ${"saving"===this.error?t`<div class=error-container><cc-error mode=confirm @cc-error:ok=${()=>a(this,"dismissed-error")}>${this._getErrorMessage()}</cc-error></div>`:""} ${this.saving?t`<cc-loader class=saving-loader></cc-loader>`:""}</div>${this.readonly?"":t`<cc-flex-gap class=button-bar><cc-button ?disabled=${r} @cc-button:click=${this._onResetForm}>${s("cc-env-var-form.reset")}</cc-button><div class=spacer></div>${this.restartApp?t`<cc-button @cc-button:click=${()=>a(this,"restart-app")}>${s("cc-env-var-form.restart-app")}</cc-button>`:""}<cc-button success ?disabled=${r} @cc-button:click=${this._onUpdateForm}>${s("cc-env-var-form.update")}</cc-button></cc-flex-gap>`}`}static get styles(){return[n,r`:host{background:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:block;padding:1rem}.header{align-items:flex-start;display:flex;justify-content:center;margin-bottom:.5rem}.heading{color:#3a3871;flex:1 1 0;font-size:1.2rem;font-weight:700}.description{color:#555;display:block;font-style:italic;line-height:1.5;margin-bottom:1rem}.hasOverlay{--cc-skeleton-state:paused;filter:blur(.3rem)}.overlay-container{position:relative}cc-expand{margin:-.25rem;padding:.25rem}.error-container{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%}.saving-loader{height:100%;left:0;position:absolute;top:0;width:100%}.button-bar{--cc-gap:1rem;margin-top:1.5rem}.spacer{flex:1 1 0}`]}}window.customElements.define("cc-env-var-form",o);export{o as CcEnvVarForm}; | ||
//# sourceMappingURL=cc-env-var-form.js.map |
@@ -1,2 +0,2 @@ | ||
import"./cc-env-var-form.js";import{LastPromise as r,unsubscribeWithSignal as n}from"../lib/observables.js";import{defineComponent as o}from"../lib/smart-manager.js";import"../smart/cc-smart-container.js";import{getAllEnvVars as e}from"@clevercloud/client/esm/api/v2/addon.js";import{sendToApi as i}from"../lib/send-to-api.js";o({selector:'cc-env-var-form[context="env-var-addon"]',params:{apiConfig:{type:Object},ownerId:{type:String},addonId:{type:String}},onConnect(o,a,s,d){const t=new r;n(d,[t.error$.subscribe((()=>a.error="loading")),t.value$.subscribe((r=>a.variables=r)),s.subscribe((({apiConfig:r,ownerId:n,addonId:o})=>{a.error=null,a.variables=null,null!=r&&null!=n&&null!=o&&t.push((a=>function({apiConfig:r,signal:n,ownerId:o,addonId:a}){return e({id:o,addonId:a}).then(i({apiConfig:r,signal:n}))}({apiConfig:r,signal:a,ownerId:n,addonId:o})))}))])}}); | ||
import"./cc-env-var-form.js";import"../smart/cc-smart-container.js";import{getAllEnvVars as r}from"@clevercloud/client/esm/api/v2/addon.js";import{LastPromise as n,unsubscribeWithSignal as o}from"../lib/observables.js";import{sendToApi as e}from"../lib/send-to-api.js";import{defineComponent as i}from"../lib/smart-manager.js";i({selector:'cc-env-var-form[context="env-var-addon"]',params:{apiConfig:{type:Object},ownerId:{type:String},addonId:{type:String}},onConnect(i,a,s,d){const t=new n;o(d,[t.error$.subscribe((()=>a.error="loading")),t.value$.subscribe((r=>a.variables=r)),s.subscribe((({apiConfig:n,ownerId:o,addonId:i})=>{a.error=null,a.variables=null,null!=n&&null!=o&&null!=i&&t.push((a=>function({apiConfig:n,signal:o,ownerId:i,addonId:a}){return r({id:i,addonId:a}).then(e({apiConfig:n,signal:o}))}({apiConfig:n,signal:a,ownerId:o,addonId:i})))}))])}}); | ||
//# sourceMappingURL=cc-env-var-form.smart-env-var-addon.js.map |
@@ -1,2 +0,2 @@ | ||
import{toNameValueObject as r}from"@clevercloud/client/esm/utils/env-vars.js";import"./cc-env-var-form.js";import{merge as i}from"rxjs/dist/esm/index.js";import{withLatestFrom as e}from"rxjs/dist/esm/operators/index.js";import{LastPromise as n,fromCustomEvent as a,unsubscribeWithSignal as s}from"../lib/observables.js";import{addErrorType as o}from"../lib/utils.js";import{defineComponent as p}from"../lib/smart-manager.js";import"../smart/cc-smart-container.js";import{sendToApi as t}from"../lib/send-to-api.js";import{updateAllExposedEnvVars as l,getAllExposedEnvVars as c}from"@clevercloud/client/esm/api/v2/application.js";import{fetchApp as m}from"../lib/api-helpers.js";p({selector:'cc-env-var-form[context="exposed-config"]',params:{apiConfig:{type:Object},ownerId:{type:String},appId:{type:String}},onConnect(p,d,g,u){const v=new n,b=new n,f=i(v.error$,b.error$),I=a(d,"cc-env-var-form:submit").pipe(e(g)),j=a(d,"cc-env-var-form:dismissed-error");s(u,[f.subscribe((r=>{d.error=r.type,d.saving=!1})),v.value$.subscribe((r=>d.appName=r.name)),b.value$.subscribe((r=>{d.variables=r,d.saving=!1})),I.subscribe((([i,{apiConfig:e,ownerId:n,appId:a}])=>{d.error=null,d.saving=!0,b.push((()=>function({apiConfig:i,signal:e,ownerId:n,appId:a,variables:s}){const o=r(s);return l({id:n,appId:a},o).then(t({apiConfig:i,signal:e}))}({apiConfig:e,ownerId:n,appId:a,variables:i}).then((()=>i)).catch(o("saving"))))})),j.subscribe((()=>{d.error=null,d.saving=!1})),g.subscribe((({apiConfig:r,ownerId:i,appId:e})=>{d.error=null,d.saving=!1,d.variables=null,null!=r&&null!=i&&null!=e&&(v.push((n=>m({apiConfig:r,signal:n,ownerId:i,appId:e}).catch(o("loading")))),b.push((n=>function({apiConfig:r,signal:i,ownerId:e,appId:n}){return c({id:e,appId:n}).then(t({apiConfig:r,signal:i})).then((r=>Object.entries(r).map((([r,i])=>({name:r,value:i})))))}({apiConfig:r,signal:n,ownerId:i,appId:e}).catch(o("saving")))))}))])}}); | ||
import"./cc-env-var-form.js";import"../smart/cc-smart-container.js";import{updateAllExposedEnvVars as r,getAllExposedEnvVars as i}from"@clevercloud/client/esm/api/v2/application.js";import{toNameValueObject as e}from"@clevercloud/client/esm/utils/env-vars.js";import{fetchApp as n}from"../lib/api-helpers.js";import{LastPromise as a,fromCustomEvent as o,unsubscribeWithSignal as s}from"../lib/observables.js";import{sendToApi as p}from"../lib/send-to-api.js";import{defineComponent as t}from"../lib/smart-manager.js";import{addErrorType as l}from"../lib/utils.js";import{merge as c}from"rxjs";import{withLatestFrom as m}from"rxjs/operators";t({selector:'cc-env-var-form[context="exposed-config"]',params:{apiConfig:{type:Object},ownerId:{type:String},appId:{type:String}},onConnect(t,g,u,v){const d=new a,b=new a,f=c(d.error$,b.error$),I=o(g,"cc-env-var-form:submit").pipe(m(u)),j=o(g,"cc-env-var-form:dismissed-error");s(v,[f.subscribe((r=>{g.error=r.type,g.saving=!1})),d.value$.subscribe((r=>g.appName=r.name)),b.value$.subscribe((r=>{g.variables=r,g.saving=!1})),I.subscribe((([i,{apiConfig:n,ownerId:a,appId:o}])=>{g.error=null,g.saving=!0,b.push((()=>function({apiConfig:i,signal:n,ownerId:a,appId:o,variables:s}){const t=e(s);return r({id:a,appId:o},t).then(p({apiConfig:i,signal:n}))}({apiConfig:n,ownerId:a,appId:o,variables:i}).then((()=>i)).catch(l("saving"))))})),j.subscribe((()=>{g.error=null,g.saving=!1})),u.subscribe((({apiConfig:r,ownerId:e,appId:a})=>{g.error=null,g.saving=!1,g.variables=null,null!=r&&null!=e&&null!=a&&(d.push((i=>n({apiConfig:r,signal:i,ownerId:e,appId:a}).catch(l("loading")))),b.push((n=>function({apiConfig:r,signal:e,ownerId:n,appId:a}){return i({id:n,appId:a}).then(p({apiConfig:r,signal:e})).then((r=>Object.entries(r).map((([r,i])=>({name:r,value:i})))))}({apiConfig:r,signal:n,ownerId:e,appId:a}).catch(l("saving")))))}))])}}); | ||
//# sourceMappingURL=cc-env-var-form.smart-exposed-config.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as s}from"lit-element";import{classMap as l}from"lit-html/directives/class-map.js";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as i}from"../lib/i18n.js";import{defaultThemeStyles as a}from"../styles/default-theme.js";import{skeletonStyles as o}from"../styles/skeleton.js";import"../atoms/cc-input-text.js";import"../atoms/cc-button.js";import"../atoms/cc-flex-gap.js";class r extends e{static get properties(){return{deleted:{type:Boolean},disabled:{type:Boolean},edited:{type:Boolean},name:{type:String},new:{type:Boolean},readonly:{type:Boolean},skeleton:{type:Boolean},value:{type:String}}}constructor(){super(),this.deleted=!1,this.disabled=!1,this.edited=!1,this.new=!1,this.readonly=!1,this.skeleton=!1,this.value=""}_onInput({detail:e}){this.value=e,n(this,"input",{name:this.name,value:this.value})}_onDelete(){n(this,"delete",{name:this.name})}_onKeep(){n(this,"keep",{name:this.name})}render(){return t`<cc-flex-gap><span class="${l({deleted:this.deleted})} name"><span class=${l({skeleton:this.skeleton})}>${this.name}</span></span><cc-flex-gap class=input-btn><cc-input-text class=value name=${this.name} value=${this.value} multi clipboard ?disabled=${this.deleted||this.disabled} ?skeleton=${this.skeleton} ?readonly=${this.readonly} placeholder=${i("cc-env-var-input.value-placeholder")} @cc-input-text:input=${this._onInput}></cc-input-text>${this.readonly?"":t`<cc-button ?skeleton=${this.skeleton} ?disabled=${this.disabled} ?danger=${!this.deleted} ?outlined=${!this.deleted} @cc-button:click=${this.deleted?this._onKeep:this._onDelete}>${this.deleted?i("cc-env-var-input.keep-button"):i("cc-env-var-input.delete-button")}</cc-button>`}</cc-flex-gap></cc-flex-gap>`}static get styles(){return[a,o,s`:host{--cc-gap:0.5rem;display:block}.name{background-color:#fff;box-sizing:border-box;display:inline-block;flex:1 1 15rem;font-family:var(--cc-ff-monospace);font-size:14px;line-height:1.4rem;padding-top:.3rem;word-break:break-all}.name.deleted{text-decoration:line-through}.skeleton{background-color:#bbb}.input-btn{flex:2 1 27rem}.value{align-self:self-start;flex:100 1 20rem}cc-button{align-self:flex-start;flex:1 1 6rem;white-space:nowrap}`]}}window.customElements.define("cc-env-var-input",r);export{r as CcEnvVarInput}; | ||
import"../atoms/cc-button.js";import"../atoms/cc-flex-gap.js";import"../atoms/cc-input-text.js";import{LitElement as e,html as t,css as s}from"lit-element";import{classMap as l}from"lit-html/directives/class-map.js";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as i}from"../lib/i18n.js";import{defaultThemeStyles as a}from"../styles/default-theme.js";import{skeletonStyles as o}from"../styles/skeleton.js";class r extends e{static get properties(){return{deleted:{type:Boolean},disabled:{type:Boolean},edited:{type:Boolean},name:{type:String},new:{type:Boolean},readonly:{type:Boolean},skeleton:{type:Boolean},value:{type:String}}}constructor(){super(),this.deleted=!1,this.disabled=!1,this.edited=!1,this.new=!1,this.readonly=!1,this.skeleton=!1,this.value=""}_onInput({detail:e}){this.value=e,n(this,"input",{name:this.name,value:this.value})}_onDelete(){n(this,"delete",{name:this.name})}_onKeep(){n(this,"keep",{name:this.name})}render(){return t`<cc-flex-gap><span class="${l({deleted:this.deleted})} name"><span class=${l({skeleton:this.skeleton})}>${this.name}</span></span><cc-flex-gap class=input-btn><cc-input-text class=value name=${this.name} value=${this.value} multi clipboard ?disabled=${this.deleted||this.disabled} ?skeleton=${this.skeleton} ?readonly=${this.readonly} placeholder=${i("cc-env-var-input.value-placeholder")} @cc-input-text:input=${this._onInput}></cc-input-text>${this.readonly?"":t`<cc-button ?skeleton=${this.skeleton} ?disabled=${this.disabled} ?danger=${!this.deleted} ?outlined=${!this.deleted} @cc-button:click=${this.deleted?this._onKeep:this._onDelete}>${this.deleted?i("cc-env-var-input.keep-button"):i("cc-env-var-input.delete-button")}</cc-button>`}</cc-flex-gap></cc-flex-gap>`}static get styles(){return[a,o,s`:host{--cc-gap:0.5rem;display:block}.name{background-color:#fff;box-sizing:border-box;display:inline-block;flex:1 1 15rem;font-family:var(--cc-ff-monospace);font-size:14px;line-height:1.4rem;padding-top:.3rem;word-break:break-all}.name.deleted{text-decoration:line-through}.skeleton{background-color:#bbb}.input-btn{flex:2 1 27rem}.value{align-self:self-start;flex:100 1 20rem}cc-button{align-self:flex-start;flex:1 1 6rem;white-space:nowrap}`]}}window.customElements.define("cc-env-var-input",r);export{r as CcEnvVarInput}; | ||
//# sourceMappingURL=cc-env-var-input.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as r,css as s}from"lit-element";import{ifDefined as i}from"lit-html/directives/if-defined.js";import{i18n as t}from"../lib/i18n.js";import"../atoms/cc-loader.js";import"../molecules/cc-error.js";import"./cc-env-var-form.js";class a extends e{static get properties(){return{appName:{type:String,attribute:"app-name"},error:{type:Boolean},services:{type:Array},type:{type:String}}}constructor(){super(),this.error=!1}_getLoadingMessage(){const e={appName:this.appName};switch(this.type){case"addon":return t("cc-env-var-linked-services.loading.addon",e);case"app":return t("cc-env-var-linked-services.loading.app",e);default:return""}}_getServiceHeading(e){switch(this.type){case"addon":return t("cc-env-var-linked-services.heading.addon",{name:e});case"app":return t("cc-env-var-linked-services.heading.app",{name:e});default:return""}}_getServiceDescription(e){const r={serviceName:e,appName:this.appName};switch(this.type){case"addon":return t("cc-env-var-linked-services.description.addon",r);case"app":return t("cc-env-var-linked-services.description.app",r);default:return""}}_getEmptyMessage(){const e={appName:this.appName};switch(this.type){case"addon":return t("cc-env-var-linked-services.empty.addon",e);case"app":return t("cc-env-var-linked-services.empty.app",e);default:return""}}_getErrorMessage(){const e={appName:this.appName};switch(this.type){case"addon":return t("cc-env-var-linked-services.error.addon",e);case"app":return t("cc-env-var-linked-services.error.app",e);default:return""}}render(){return r`${null!=this.services||this.error?"":r`<div class=loading><cc-loader></cc-loader><span>${this._getLoadingMessage()}</span></div>`} ${null!=this.services&&!this.error&&this.services.length>0?r`<div class=service-list>${this.services.map((e=>r`<cc-env-var-form readonly=readonly .variables=${e.variables} heading=${this._getServiceHeading(e.name)} error=${i(e.error)}>${this._getServiceDescription(e.name)}</cc-env-var-form>`))}</div>`:""} ${null==this.services||this.error||0!==this.services.length?"":r`<div class=empty-msg>${this._getEmptyMessage()}</div>`} ${this.error?r`<div class=error><cc-error>${this._getErrorMessage()}</cc-error></div>`:""}`}static get styles(){return[s`:host{display:block}.empty-msg,.error,.loading{background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-sizing:border-box;padding:1rem}.loading{display:flex}cc-loader{height:1.5rem;margin-right:1rem;width:1.5rem}.service-list{display:grid;grid-gap:1rem}.empty-msg{color:#555;font-style:italic}`]}}window.customElements.define("cc-env-var-linked-services",a);export{a as CcEnvVarLinkedServices}; | ||
import"../atoms/cc-loader.js";import"../molecules/cc-error.js";import"./cc-env-var-form.js";import{LitElement as e,html as r,css as s}from"lit-element";import{ifDefined as i}from"lit-html/directives/if-defined.js";import{i18n as t}from"../lib/i18n.js";class a extends e{static get properties(){return{appName:{type:String,attribute:"app-name"},error:{type:Boolean},services:{type:Array},type:{type:String}}}constructor(){super(),this.error=!1}_getLoadingMessage(){const e={appName:this.appName};switch(this.type){case"addon":return t("cc-env-var-linked-services.loading.addon",e);case"app":return t("cc-env-var-linked-services.loading.app",e);default:return""}}_getServiceHeading(e){switch(this.type){case"addon":return t("cc-env-var-linked-services.heading.addon",{name:e});case"app":return t("cc-env-var-linked-services.heading.app",{name:e});default:return""}}_getServiceDescription(e){const r={serviceName:e,appName:this.appName};switch(this.type){case"addon":return t("cc-env-var-linked-services.description.addon",r);case"app":return t("cc-env-var-linked-services.description.app",r);default:return""}}_getEmptyMessage(){const e={appName:this.appName};switch(this.type){case"addon":return t("cc-env-var-linked-services.empty.addon",e);case"app":return t("cc-env-var-linked-services.empty.app",e);default:return""}}_getErrorMessage(){const e={appName:this.appName};switch(this.type){case"addon":return t("cc-env-var-linked-services.error.addon",e);case"app":return t("cc-env-var-linked-services.error.app",e);default:return""}}render(){return r`${null!=this.services||this.error?"":r`<div class=loading><cc-loader></cc-loader><span>${this._getLoadingMessage()}</span></div>`} ${null!=this.services&&!this.error&&this.services.length>0?r`<div class=service-list>${this.services.map((e=>r`<cc-env-var-form readonly=readonly .variables=${e.variables} heading=${this._getServiceHeading(e.name)} error=${i(e.error)}>${this._getServiceDescription(e.name)}</cc-env-var-form>`))}</div>`:""} ${null==this.services||this.error||0!==this.services.length?"":r`<div class=empty-msg>${this._getEmptyMessage()}</div>`} ${this.error?r`<div class=error><cc-error>${this._getErrorMessage()}</cc-error></div>`:""}`}static get styles(){return[s`:host{display:block}.empty-msg,.error,.loading{background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-sizing:border-box;padding:1rem}.loading{display:flex}cc-loader{height:1.5rem;margin-right:1rem;width:1.5rem}.service-list{display:grid;grid-gap:1rem}.empty-msg{color:#555;font-style:italic}`]}}window.customElements.define("cc-env-var-linked-services",a);export{a as CcEnvVarLinkedServices}; | ||
//# sourceMappingURL=cc-env-var-linked-services.js.map |
@@ -1,2 +0,2 @@ | ||
import"./lib/i18n.js";import"./atoms/cc-input-text.js";import"./atoms/cc-loader.js";import"./molecules/cc-block-section.js";import"./atoms/cc-button.js";import"./atoms/cc-expand.js";import"./atoms/cc-img.js";import"./molecules/cc-block.js";import"./molecules/cc-error.js";import"./addon/cc-addon-admin.js";import"./addon/cc-addon-backups.js";import"./atoms/cc-flex-gap.js";import"./addon/cc-addon-credentials.js";import"./atoms/cc-toggle.js";import"./addon/cc-addon-option.js";import"./addon/cc-addon-option-form.js";import"./addon/cc-addon-elasticsearch-options.js";import"./addon/cc-addon-features.js";import"./zones/cc-zone.js";import"./addon/cc-addon-linked-apps.js";import"./addon/cc-addon-mongodb-options.js";import"./addon/cc-addon-mysql-options.js";import"./addon/cc-addon-postgresql-options.js";import"./addon/cc-elasticsearch-info.js";import"./addon/cc-header-addon.js";import"./atoms/cc-beta.js";import"./atoms/cc-datetime-relative.js";import"./env-var/cc-env-var-create.js";import"./env-var/cc-env-var-editor-expert.js";import"./env-var/cc-env-var-input.js";import"./env-var/cc-env-var-editor-simple.js";import"./env-var/cc-env-var-form.js";import"./env-var/cc-env-var-linked-services.js";import"./maps/cc-map-marker-dot.js";import"./maps/cc-map.js";import"./maps/cc-logsmap.js";import"./maps/cc-map-marker-server.js";import"./overview/cc-header-app.js";import"./overview/cc-header-orga.js";import"./overview/cc-overview.js";import"./overview/cc-tile-consumption.js";import"./overview/cc-tile-deployments.js";import"./overview/cc-tile-instances.js";import"./overview/cc-tile-requests.js";import"./overview/cc-tile-scalability.js";import"./overview/cc-tile-status-codes.js";import"./saas/cc-heptapod-info.js";import"./tcp-redirections/cc-tcp-redirection.js";import"./tcp-redirections/cc-tcp-redirection-form.js";import"./lib/i18n-sanitize.js";import"./zones/cc-zone-input.js"; | ||
import"./addon/cc-addon-admin.js";import"./addon/cc-addon-backups.js";import"./addon/cc-addon-credentials.js";import"./addon/cc-addon-elasticsearch-options.js";import"./addon/cc-addon-features.js";import"./addon/cc-addon-linked-apps.js";import"./addon/cc-addon-mongodb-options.js";import"./addon/cc-addon-mysql-options.js";import"./addon/cc-addon-option-form.js";import"./addon/cc-addon-option.js";import"./addon/cc-addon-postgresql-options.js";import"./addon/cc-elasticsearch-info.js";import"./addon/cc-header-addon.js";import"./atoms/cc-beta.js";import"./atoms/cc-button.js";import"./atoms/cc-datetime-relative.js";import"./atoms/cc-expand.js";import"./atoms/cc-flex-gap.js";import"./atoms/cc-img.js";import"./atoms/cc-input-text.js";import"./atoms/cc-loader.js";import"./atoms/cc-toggle.js";import"./env-var/cc-env-var-create.js";import"./env-var/cc-env-var-editor-expert.js";import"./env-var/cc-env-var-editor-simple.js";import"./env-var/cc-env-var-form.js";import"./env-var/cc-env-var-input.js";import"./env-var/cc-env-var-linked-services.js";import"./lib/i18n.js";import"./maps/cc-logsmap.js";import"./maps/cc-map-marker-dot.js";import"./maps/cc-map-marker-server.js";import"./maps/cc-map.js";import"./molecules/cc-block-section.js";import"./molecules/cc-block.js";import"./molecules/cc-error.js";import"./overview/cc-header-app.js";import"./overview/cc-header-orga.js";import"./overview/cc-overview.js";import"./overview/cc-tile-consumption.js";import"./overview/cc-tile-deployments.js";import"./overview/cc-tile-instances.js";import"./overview/cc-tile-requests.js";import"./overview/cc-tile-scalability.js";import"./overview/cc-tile-status-codes.js";import"./saas/cc-heptapod-info.js";import"./tcp-redirections/cc-tcp-redirection-form.js";import"./tcp-redirections/cc-tcp-redirection.js";import"./lib/i18n-sanitize.js";import"./zones/cc-zone-input.js";import"./zones/cc-zone.js"; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as i,css as c}from"lit-element";import{i18n as t}from"../lib/i18n.js";import"../molecules/cc-block-section.js";import"../atoms/cc-button.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"../atoms/cc-toggle.js";import{unique as o,sortBy as l}from"../lib/utils.js";import{PENDING_STATUSES as s,PROCESSING_STATUS as n,PROCESSED_STATUSES as r}from"./cc-invoice-table.js";function a(e){const i=new Date(e).getUTCFullYear();return String(i)}class v extends e{static get properties(){return{error:{type:Boolean},invoices:{type:Array},_yearFilter:{type:Number}}}constructor(){super(),this.error=!1}_onYearFilterValue({detail:e}){this._yearFilter=e}render(){const e=null==this.invoices,c=e?[]:this.invoices.filter((e=>s.includes(e.status))),v=e?[]:this.invoices.filter((e=>e.status===n)),u=e?[]:this.invoices.filter((e=>r.includes(e.status))),m=u.map((e=>a(e.emissionDate))).reduce(...o).map((e=>String(e))),g=m.map((e=>({label:e,value:e}))).sort(l("label")),p=null==this._yearFilter?function(e){const i=e.map((e=>Number(e))),c=Math.max(...i);return String(c)}(m):this._yearFilter,b=u.filter((e=>a(e.emissionDate)===p));return i`<cc-block><div slot=title>${t("cc-invoice-list.title")}</div>${this.error?"":i`<cc-block-section><div slot=title>${t("cc-invoice-list.pending")}</div>${e||c.length>0?i`<cc-invoice-table .invoices=${e?null:c}></cc-invoice-table>`:""} ${e||0!==c.length?"":i`<em>${t("cc-invoice-list.pending.no-invoices")}</em>`}</cc-block-section>${!e&&v.length>0?i`<cc-block-section><div slot=title>${t("cc-invoice-list.processing")}</div><cc-invoice-table .invoices=${e?null:v}></cc-invoice-table></cc-block-section>`:""}<cc-block-section><div slot=title>${t("cc-invoice-list.processed")}</div>${!e&&b.length>0&&g.length>1?i`<cc-toggle legend=${t("cc-invoice-list.year")} .choices=${g} value=${p} @cc-toggle:input=${this._onYearFilterValue}></cc-toggle>`:""} ${e||b.length>0?i`<cc-invoice-table .invoices=${e?null:b}></cc-invoice-table>`:""} ${e||0!==b.length?"":i`<em>${t("cc-invoice-list.processed.no-invoices")}</em>`}</cc-block-section>`} ${this.error?i`<cc-error>${t("cc-invoice-list.error")}</cc-error>`:""}</cc-block>`}static get styles(){return[c`:host{display:block}cc-toggle{justify-self:start}`]}}window.customElements.define("cc-invoice-list",v);export{v as CcInvoiceList}; | ||
import{LitElement as e,html as i,css as c}from"lit-element";import"../atoms/cc-button.js";import"../atoms/cc-toggle.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"../molecules/cc-block-section.js";import{i18n as t}from"../lib/i18n.js";import{unique as o,sortBy as l}from"../lib/utils.js";import{PENDING_STATUSES as s,PROCESSING_STATUS as n,PROCESSED_STATUSES as r}from"./cc-invoice-table.js";function a(e){const i=new Date(e).getUTCFullYear();return String(i)}class v extends e{static get properties(){return{error:{type:Boolean},invoices:{type:Array},_yearFilter:{type:Number}}}constructor(){super(),this.error=!1}_onYearFilterValue({detail:e}){this._yearFilter=e}render(){const e=null==this.invoices,c=e?[]:this.invoices.filter((e=>s.includes(e.status))),v=e?[]:this.invoices.filter((e=>e.status===n)),u=e?[]:this.invoices.filter((e=>r.includes(e.status))),m=u.map((e=>a(e.emissionDate))).reduce(...o).map((e=>String(e))),g=m.map((e=>({label:e,value:e}))).sort(l("label")),p=null==this._yearFilter?function(e){const i=e.map((e=>Number(e))),c=Math.max(...i);return String(c)}(m):this._yearFilter,b=u.filter((e=>a(e.emissionDate)===p));return i`<cc-block><div slot=title>${t("cc-invoice-list.title")}</div>${this.error?"":i`<cc-block-section><div slot=title>${t("cc-invoice-list.pending")}</div>${e||c.length>0?i`<cc-invoice-table .invoices=${e?null:c}></cc-invoice-table>`:""} ${e||0!==c.length?"":i`<em>${t("cc-invoice-list.pending.no-invoices")}</em>`}</cc-block-section>${!e&&v.length>0?i`<cc-block-section><div slot=title>${t("cc-invoice-list.processing")}</div><cc-invoice-table .invoices=${e?null:v}></cc-invoice-table></cc-block-section>`:""}<cc-block-section><div slot=title>${t("cc-invoice-list.processed")}</div>${!e&&b.length>0&&g.length>1?i`<cc-toggle legend=${t("cc-invoice-list.year")} .choices=${g} value=${p} @cc-toggle:input=${this._onYearFilterValue}></cc-toggle>`:""} ${e||b.length>0?i`<cc-invoice-table .invoices=${e?null:b}></cc-invoice-table>`:""} ${e||0!==b.length?"":i`<em>${t("cc-invoice-list.processed.no-invoices")}</em>`}</cc-block-section>`} ${this.error?i`<cc-error>${t("cc-invoice-list.error")}</cc-error>`:""}</cc-block>`}static get styles(){return[c`:host{display:block}cc-toggle{justify-self:start}`]}}window.customElements.define("cc-invoice-list",v);export{v as CcInvoiceList}; | ||
//# sourceMappingURL=cc-invoice-list.js.map |
@@ -1,2 +0,2 @@ | ||
import{LastPromise as r,unsubscribeWithSignal as i}from"../lib/observables.js";import{defineComponent as e}from"../lib/smart-manager.js";import"../smart/cc-smart-container.js";import{fetchAllInvoices as o}from"../lib/api-helpers.js";import"./cc-invoice-list.js";e({selector:"cc-invoice-list",params:{apiConfig:{type:Object},ownerId:{type:String}},onConnect(e,s,n,c){const t=new r;i(c,[t.error$.subscribe(console.error),t.error$.subscribe((()=>s.error=!0)),t.value$.subscribe((r=>s.invoices=r)),n.subscribe((({apiConfig:r,ownerId:i})=>{null!=r&&null!=i&&t.push((e=>o({apiConfig:r,signal:e,ownerId:i})))}))])}}); | ||
import"./cc-invoice-list.js";import"../smart/cc-smart-container.js";import{fetchAllInvoices as r}from"../lib/api-helpers.js";import{LastPromise as i,unsubscribeWithSignal as e}from"../lib/observables.js";import{defineComponent as o}from"../lib/smart-manager.js";o({selector:"cc-invoice-list",params:{apiConfig:{type:Object},ownerId:{type:String}},onConnect(o,s,n,c){const t=new i;e(c,[t.error$.subscribe(console.error),t.error$.subscribe((()=>s.error=!0)),t.value$.subscribe((r=>s.invoices=r)),n.subscribe((({apiConfig:i,ownerId:e})=>{null!=i&&null!=e&&t.push((o=>r({apiConfig:i,signal:o,ownerId:e})))}))])}}); | ||
//# sourceMappingURL=cc-invoice-list.smart.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as i}from"lit-element";import{classMap as o}from"lit-html/directives/class-map.js";import{i18n as n}from"../lib/i18n.js";import{defaultThemeStyles as r}from"../styles/default-theme.js";import{skeletonStyles as s}from"../styles/skeleton.js";import{ccLink as c,linkStyles as a}from"../templates/cc-link.js";import"../atoms/cc-img.js";import"../atoms/cc-flex-gap.js";import{withResizeObserver as l}from"../mixins/with-resize-observer.js";import{sortBy as m}from"../lib/utils.js";const d=new URL(new URL("../assets/file.svg",import.meta.url).href,import.meta.url).href,p=["PENDING","PAYMENTHELD"],u="PROCESSING",b=["PAID","CANCELED","REFUNDED"],h=[{emissionDate:"2020-01-01",number:"????????????",type:"INVOICE",status:"PENDING",total:{currency:"EUR",amount:10}},{emissionDate:"2020-02-01",number:"????????????",type:"INVOICE",status:"PENDING",total:{currency:"EUR",amount:200}},{emissionDate:"2020-03-01",number:"????????????",type:"INVOICE",status:"PENDING",total:{currency:"EUR",amount:3e3}}];class v extends(l(t)){static get properties(){return{invoices:{type:Array},_width:{type:Number}}}onResize({width:t}){this._width=t}_renderBig(t,i){return e`<table><tr><th>${n("cc-invoice-table.date.emission")}</th><th>${n("cc-invoice-table.number")}</th><th class=number>${n("cc-invoice-table.total.label")}</th><th></th></tr>${i.map((i=>e`<tr><td><span class=${o({skeleton:t})}>${n("cc-invoice-table.date.value",{date:i.emissionDate})}</span></td><td><span class=${o({skeleton:t})}>${i.number}</span></td><td class=number><code class=${o({skeleton:t,"credit-note":"CREDITNOTE"===i.type})}>${n("cc-invoice-table.total.value",{amount:i.total.amount})}</code></td><td>${this._renderLinks(t,i)}</td></tr>`))}</table>`}_renderSmall(t,i){return e`<div class=invoice-list>${i.map((i=>e`<div class=invoice><cc-img class=invoice-icon src=${d}></cc-img><div class="${o({skeleton:t})} invoice-text">${n("cc-invoice-table.text",{number:i.number,date:i.emissionDate,amount:i.total.amount})}<br>${this._renderLinks(t,i)}</div></div>`))}</div>`}_renderLinks(t,i){return e`<cc-flex-gap class=links>${c(i.downloadUrl,n("cc-invoice-table.open-pdf"),t)} ${p.includes(i.status)?e`${c(i.paymentUrl,n("cc-invoice-table.pay"),t)}`:""}</cc-flex-gap>`}render(){const t=this._width>700,e=null==this.invoices,i=(e?h:this.invoices).map((t=>{const e="CREDITNOTE"===t.type?-1:1;return{...t,total:{...t.total,amount:t.total.amount*e}}})).sort(m("emissionDate",!0));return t?this._renderBig(e,i):this._renderSmall(e,i)}static get styles(){return[r,s,a,i`:host{display:block}code{font-family:var(--cc-ff-monospace);font-size:1rem}.credit-note{font-style:italic}.cc-link{white-space:nowrap}.links{--cc-gap:1rem;--cc-align-items:center}.invoice-list{display:grid;gap:1.5rem}.invoice{display:flex;line-height:1.5rem}.invoice-icon,.invoice-text{margin-right:.5rem}.invoice-icon{flex:0 0 auto;height:1.5rem;width:1.5rem}.invoice-text{color:#555}.invoice-text code,.invoice-text strong{color:#000;font-weight:700;white-space:nowrap}.invoice-list .skeleton code,.invoice-list .skeleton strong{background-color:#bbb;color:transparent}table{border-collapse:collapse;border-radius:5px;overflow:hidden}td,th{padding:.5rem 1rem;text-align:left}th{background-color:#eee}td{background-color:#fafafa}tr:not(:last-child) td{border-bottom:1px solid #ddd}.number{text-align:right}td.number{min-width:13ch}tr:hover td{background-color:#f5f5f5}table .skeleton{background-color:#bbb}`]}}window.customElements.define("cc-invoice-table",v);export{v as CcInvoiceTable,p as PENDING_STATUSES,b as PROCESSED_STATUSES,u as PROCESSING_STATUS}; | ||
import{LitElement as t,html as e,css as i}from"lit-element";import"../atoms/cc-flex-gap.js";import"../atoms/cc-img.js";import{classMap as o}from"lit-html/directives/class-map.js";import{i18n as n}from"../lib/i18n.js";import{sortBy as r}from"../lib/utils.js";import{withResizeObserver as s}from"../mixins/with-resize-observer.js";import{defaultThemeStyles as c}from"../styles/default-theme.js";import{skeletonStyles as a}from"../styles/skeleton.js";import{ccLink as l,linkStyles as m}from"../templates/cc-link.js";const d=new URL(new URL("../assets/file.svg",import.meta.url).href,import.meta.url).href,p=["PENDING","PAYMENTHELD"],u="PROCESSING",b=["PAID","CANCELED","REFUNDED"],h=[{emissionDate:"2020-01-01",number:"????????????",type:"INVOICE",status:"PENDING",total:{currency:"EUR",amount:10}},{emissionDate:"2020-02-01",number:"????????????",type:"INVOICE",status:"PENDING",total:{currency:"EUR",amount:200}},{emissionDate:"2020-03-01",number:"????????????",type:"INVOICE",status:"PENDING",total:{currency:"EUR",amount:3e3}}];class v extends(s(t)){static get properties(){return{invoices:{type:Array},_width:{type:Number}}}onResize({width:t}){this._width=t}_renderBig(t,i){return e`<table><tr><th>${n("cc-invoice-table.date.emission")}</th><th>${n("cc-invoice-table.number")}</th><th class=number>${n("cc-invoice-table.total.label")}</th><th></th></tr>${i.map((i=>e`<tr><td><span class=${o({skeleton:t})}>${n("cc-invoice-table.date.value",{date:i.emissionDate})}</span></td><td><span class=${o({skeleton:t})}>${i.number}</span></td><td class=number><code class=${o({skeleton:t,"credit-note":"CREDITNOTE"===i.type})}>${n("cc-invoice-table.total.value",{amount:i.total.amount})}</code></td><td>${this._renderLinks(t,i)}</td></tr>`))}</table>`}_renderSmall(t,i){return e`<div class=invoice-list>${i.map((i=>e`<div class=invoice><cc-img class=invoice-icon src=${d}></cc-img><div class="${o({skeleton:t})} invoice-text">${n("cc-invoice-table.text",{number:i.number,date:i.emissionDate,amount:i.total.amount})}<br>${this._renderLinks(t,i)}</div></div>`))}</div>`}_renderLinks(t,i){return e`<cc-flex-gap class=links>${l(i.downloadUrl,n("cc-invoice-table.open-pdf"),t)} ${p.includes(i.status)?e`${l(i.paymentUrl,n("cc-invoice-table.pay"),t)}`:""}</cc-flex-gap>`}render(){const t=this._width>700,e=null==this.invoices,i=(e?h:this.invoices).map((t=>{const e="CREDITNOTE"===t.type?-1:1;return{...t,total:{...t.total,amount:t.total.amount*e}}})).sort(r("emissionDate",!0));return t?this._renderBig(e,i):this._renderSmall(e,i)}static get styles(){return[c,a,m,i`:host{display:block}code{font-family:var(--cc-ff-monospace);font-size:1rem}.credit-note{font-style:italic}.cc-link{white-space:nowrap}.links{--cc-gap:1rem;--cc-align-items:center}.invoice-list{display:grid;gap:1.5rem}.invoice{display:flex;line-height:1.5rem}.invoice-icon,.invoice-text{margin-right:.5rem}.invoice-icon{flex:0 0 auto;height:1.5rem;width:1.5rem}.invoice-text{color:#555}.invoice-text code,.invoice-text strong{color:#000;font-weight:700;white-space:nowrap}.invoice-list .skeleton code,.invoice-list .skeleton strong{background-color:#bbb;color:transparent}table{border-collapse:collapse;border-radius:5px;overflow:hidden}td,th{padding:.5rem 1rem;text-align:left}th{background-color:#eee}td{background-color:#fafafa}tr:not(:last-child) td{border-bottom:1px solid #ddd}.number{text-align:right}td.number{min-width:13ch}tr:hover td{background-color:#f5f5f5}table .skeleton{background-color:#bbb}`]}}window.customElements.define("cc-invoice-table",v);export{v as CcInvoiceTable,p as PENDING_STATUSES,b as PROCESSED_STATUSES,u as PROCESSING_STATUS}; | ||
//# sourceMappingURL=cc-invoice-table.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as r}from"lit-element";import{classMap as o}from"lit-html/directives/class-map.js";import{i18n as i}from"../lib/i18n.js";import{skeletonStyles as s}from"../styles/skeleton.js";import{ccLink as c,linkStyles as l}from"../templates/cc-link.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"../atoms/cc-html-frame.js";import{unsafeHTML as m}from"lit-html/directives/unsafe-html.js";const n=new URL(new URL("../assets/file.svg",import.meta.url).href,import.meta.url).href,a={emissionDate:"2020-01-01",number:"????????????",type:"INVOICE",status:"PENDING",total:{currency:"EUR",amount:10}};class p extends e{static get properties(){return{error:{type:Boolean},invoice:{type:Object},number:{type:String}}}constructor(){super(),this.error=!1}render(){const e=null==this.invoice,r=e?a:this.invoice,s=this.number||a.number,l=r.emissionDate,p=r.total.amount;return t`<cc-block icon=${n} class=${o({"has-errors":this.error})}><div slot=title>${i("cc-invoice.title")} ${s}</div>${this.error?"":t`<div slot=button>${c(r.downloadUrl,i("cc-invoice.download-pdf"),e)}</div><div class=info><em class=${o({skeleton:e})}>${i("cc-invoice.info",{date:l,amount:p})}</em></div><cc-html-frame class=frame ?loading=${e}>${e?"":t`<template>${m(this.invoice.invoiceHtml)}</template>`}</cc-html-frame>`} ${this.error?t`<cc-error>${i("cc-invoice.error")}</cc-error>`:""}</cc-block>`}static get styles(){return[l,s,r`:host{display:block}[slot=button]{align-self:start;margin-left:1rem}.has-errors{--cc-skeleton-state:paused}.skeleton{background-color:#bbb}.frame,.info{justify-self:center}.frame{box-shadow:0 0 .5rem #ccc;height:31cm;max-width:22cm;width:100%}`]}}window.customElements.define("cc-invoice",p);export{p as CcInvoice}; | ||
import{LitElement as e,html as t,css as r}from"lit-element";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"../atoms/cc-html-frame.js";import{classMap as o}from"lit-html/directives/class-map.js";import{unsafeHTML as i}from"lit-html/directives/unsafe-html.js";import{i18n as s}from"../lib/i18n.js";import{skeletonStyles as c}from"../styles/skeleton.js";import{ccLink as l,linkStyles as m}from"../templates/cc-link.js";const n=new URL(new URL("../assets/file.svg",import.meta.url).href,import.meta.url).href,a={emissionDate:"2020-01-01",number:"????????????",type:"INVOICE",status:"PENDING",total:{currency:"EUR",amount:10}};class p extends e{static get properties(){return{error:{type:Boolean},invoice:{type:Object},number:{type:String}}}constructor(){super(),this.error=!1}render(){const e=null==this.invoice,r=e?a:this.invoice,c=this.number||a.number,m=r.emissionDate,p=r.total.amount;return t`<cc-block icon=${n} class=${o({"has-errors":this.error})}><div slot=title>${s("cc-invoice.title")} ${c}</div>${this.error?"":t`<div slot=button>${l(r.downloadUrl,s("cc-invoice.download-pdf"),e)}</div><div class=info><em class=${o({skeleton:e})}>${s("cc-invoice.info",{date:m,amount:p})}</em></div><cc-html-frame class=frame ?loading=${e}>${e?"":t`<template>${i(this.invoice.invoiceHtml)}</template>`}</cc-html-frame>`} ${this.error?t`<cc-error>${s("cc-invoice.error")}</cc-error>`:""}</cc-block>`}static get styles(){return[m,c,r`:host{display:block}[slot=button]{align-self:start;margin-left:1rem}.has-errors{--cc-skeleton-state:paused}.skeleton{background-color:#bbb}.frame,.info{justify-self:center}.frame{box-shadow:0 0 .5rem #ccc;height:31cm;max-width:22cm;width:100%}`]}}window.customElements.define("cc-invoice",p);export{p as CcInvoice}; | ||
//# sourceMappingURL=cc-invoice.js.map |
@@ -1,2 +0,2 @@ | ||
import{merge as r,combineLatest as i}from"rxjs/dist/esm/index.js";import{map as e}from"rxjs/dist/esm/operators/index.js";import{LastPromise as o,unsubscribeWithSignal as n}from"../lib/observables.js";import{defineComponent as s}from"../lib/smart-manager.js";import"../smart/cc-smart-container.js";import{fetchInvoice as c,fetchInvoiceHtml as m}from"../lib/api-helpers.js";import"./cc-invoice.js";s({selector:"cc-invoice",params:{apiConfig:{type:Object},ownerId:{type:String},invoiceNumber:{type:String}},onConnect(s,t,p,l){const a=new o,b=new o,u=r(a.error$,b.error$),v=i(a.value$,b.value$).pipe(e((([r,i])=>({...r,invoiceHtml:i}))));n(l,[u.subscribe(console.error),u.subscribe((()=>t.error=!0)),v.subscribe((r=>t.invoice=r)),p.subscribe((({apiConfig:r,ownerId:i,invoiceNumber:e})=>{null!=r&&null!=i&&null!=e&&(t.number=e,t.invoice=null,a.push((o=>c({apiConfig:r,signal:o,ownerId:i,invoiceNumber:e}))),b.push((o=>m({apiConfig:r,signal:o,ownerId:i,invoiceNumber:e}))))}))])}}); | ||
import"./cc-invoice.js";import"../smart/cc-smart-container.js";import{fetchInvoice as r,fetchInvoiceHtml as i}from"../lib/api-helpers.js";import{LastPromise as e,unsubscribeWithSignal as o}from"../lib/observables.js";import{defineComponent as n}from"../lib/smart-manager.js";import{merge as s,combineLatest as c}from"rxjs";import{map as m}from"rxjs/operators";n({selector:"cc-invoice",params:{apiConfig:{type:Object},ownerId:{type:String},invoiceNumber:{type:String}},onConnect(n,p,t,l){const a=new e,b=new e,u=s(a.error$,b.error$),v=c(a.value$,b.value$).pipe(m((([r,i])=>({...r,invoiceHtml:i}))));o(l,[u.subscribe(console.error),u.subscribe((()=>p.error=!0)),v.subscribe((r=>p.invoice=r)),t.subscribe((({apiConfig:e,ownerId:o,invoiceNumber:n})=>{null!=e&&null!=o&&null!=n&&(p.number=n,p.invoice=null,a.push((i=>r({apiConfig:e,signal:i,ownerId:o,invoiceNumber:n}))),b.push((r=>i({apiConfig:e,signal:r,ownerId:o,invoiceNumber:n}))))}))])}}); | ||
//# sourceMappingURL=cc-invoice.smart.js.map |
@@ -1,2 +0,2 @@ | ||
import{asyncMap as n}from"./utils.js";import{addOauthHeader as i}from"@clevercloud/client/esm/oauth.browser.js";import{prefixUrl as e}from"@clevercloud/client/esm/prefix-url.js";import{sendToApi as t}from"./send-to-api.js";import{get as o}from"@clevercloud/client/esm/api/v2/application.js";import{getAllInvoices as r,getInvoice as a}from"@clevercloud/client/esm/api/v4/billing.js";function s({apiConfig:n,signal:i,ownerId:e,appId:r}){return o({id:e,appId:r}).then(t({apiConfig:n,signal:i}))}async function u({apiConfig:n,signal:i,ownerId:e,invoiceNumber:o}){return a({id:e,invoiceNumber:o,type:""}).then(t({apiConfig:n,signal:i})).then((i=>m(n,e,i)))}async function c({apiConfig:n,signal:i,ownerId:e,invoiceNumber:o}){return a({id:e,invoiceNumber:o,type:".html"}).then(t({apiConfig:n,signal:i}))}async function l({apiConfig:i,signal:e,ownerId:o}){return r({id:o,since:"2010-08-01T00:00:00.000Z"}).then(t({apiConfig:i,signal:e})).then((e=>n(e,(async n=>m(i,o,n)))))}async function m(n,i,e){return{number:e.invoice_number,emissionDate:e.emission_date,type:e.type||"INVOICE",status:e.status,total:{amount:e.total_tax.amount+e.total_tax_excluded.amount,currency:e.total_tax_excluded.currency},downloadUrl:await p(n,i,e.invoice_number),paymentUrl:d(i,e.invoice_number)}}function p(n,t,o){return a({id:t,invoiceNumber:o,type:".pdf"}).then(e(n.API_HOST)).then(i(n)).then((n=>{const i=new URL(n.url);return i.searchParams.set("authorization",btoa(n.headers.Authorization)),i.toString()}))}function d(n,i){return null==n||n.startsWith("user_")?`/users/me/invoices/${i}`:`/organisations/${n}/invoices/${i}`}export{l as fetchAllInvoices,s as fetchApp,u as fetchInvoice,c as fetchInvoiceHtml}; | ||
import{get as n}from"@clevercloud/client/esm/api/v2/application.js";import{getAllInvoices as e,getInvoice as i}from"@clevercloud/client/esm/api/v4/billing.js";import{addOauthHeader as t}from"@clevercloud/client/esm/oauth.browser.js";import{pickNonNull as o}from"@clevercloud/client/esm/pick-non-null.js";import{prefixUrl as r}from"@clevercloud/client/esm/prefix-url.js";import{ONE_DAY as a}from"@clevercloud/client/esm/with-cache.js";import{sendToApi as c}from"./send-to-api.js";import{asyncMap as s}from"./utils.js";function u({apiConfig:e,signal:i,ownerId:t,appId:o}){return n({id:t,appId:o}).then(c({apiConfig:e,signal:i}))}async function l({apiConfig:n,signal:e,ownerId:t,invoiceNumber:o}){return i({id:t,invoiceNumber:o,type:""}).then(c({apiConfig:n,signal:e})).then((e=>d(n,t,e)))}async function m({apiConfig:n,signal:e,ownerId:t,invoiceNumber:o}){return i({id:t,invoiceNumber:o,type:".html"}).then(c({apiConfig:n,signal:e}))}async function p({apiConfig:n,signal:i,ownerId:t}){return e({id:t,since:"2010-08-01T00:00:00.000Z"}).then(c({apiConfig:n,signal:i})).then((e=>s(e,(async e=>d(n,t,e)))))}async function d(n,e,i){return{number:i.invoice_number,emissionDate:i.emission_date,type:i.type||"INVOICE",status:i.status,total:{amount:i.total_tax.amount+i.total_tax_excluded.amount,currency:i.total_tax_excluded.currency},downloadUrl:await f(n,e,i.invoice_number),paymentUrl:g(e,i.invoice_number)}}function f(n,e,o){return i({id:e,invoiceNumber:o,type:".pdf"}).then(r(n.API_HOST)).then(t(n)).then((n=>{const e=new URL(n.url);return e.searchParams.set("authorization",btoa(n.headers.Authorization)),e.toString()}))}function g(n,e){return null==n||n.startsWith("user_")?`/users/me/invoices/${e}`:`/organisations/${n}/invoices/${e}`}function h(n){return Promise.resolve({method:"get",url:"/v4/billing/price-system",headers:{Accept:"application/json"},queryParams:o(n,["zone_id"])})}function v({signal:n,zoneId:e}){return h({zone_id:e}).then(c({signal:n,cacheDelay:a}))}const y={EUR:1,USD:1.1802,AUD:1.5548,BGN:1.9558,BRL:6.696,CAD:1.4849,CHF:1.1045,CNY:7.722,CZK:26.233,DKK:7.436,GBP:.86068,HKD:9.17,HRK:7.5748,HUF:364.78,IDR:17024.39,ILS:3.9091,INR:85.7605,ISK:149.8,JPY:128.75,KRW:1340.88,MXN:24.6616,MYR:4.8937,NOK:10.1653,NZD:1.6948,PHP:57.335,PLN:4.6399,RON:4.8865,RUB:90.0115,SEK:10.1935,SGD:1.5899,THB:36.746,TRY:9.4313,ZAR:17.6852};async function C({currencyCode:n}){return{code:n,changeRate:y[n]}}export{p as fetchAllInvoices,u as fetchApp,C as fetchCurrency,l as fetchInvoice,m as fetchInvoiceHtml,v as fetchPriceSystem,h as getPriceSystem}; | ||
//# sourceMappingURL=api-helpers.js.map |
@@ -1,2 +0,2 @@ | ||
const n=[{unit:"year",duration:315576e5},{unit:"month",duration:26298e5},{unit:"week",duration:6048e5},{unit:"day",duration:864e5},{unit:"hour",duration:36e5},{unit:"minute",duration:6e4},{unit:"second",duration:1e3}];function t(t,e,r){const o="RelativeTimeFormat"in Intl?(n,e)=>new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(-n,e):e;return function(t){const e=new Date(t).getTime(),u=(new Date).getTime()-e;for(const{unit:t,duration:e}of n){const n=u/e,r=Math.round(n);if(n>=1)return o(r,t)}return r}}function e(n){const t=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",timeZoneName:"short"});return n=>{const e=new Date(n);return t.format(e)}}function r(n){const t=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"});return n=>{const e=new Date(n);return t.format(e)}}function o(n){const t=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"});return n=>{const e=new Date(n);return t.format(e)}}function u(n){const t=new Intl.DateTimeFormat(n,{hour:"numeric"});return n=>{const e=new Date(n);return t.format(e)}}export{e as prepareFormatDate,o as prepareFormatDateOnly,r as prepareFormatDatetime,t as prepareFormatDistanceToNow,u as prepareFormatHours}; | ||
const n=[{unit:"year",duration:315576e5},{unit:"month",duration:26298e5},{unit:"week",duration:6048e5},{unit:"day",duration:864e5},{unit:"hour",duration:36e5},{unit:"minute",duration:6e4},{unit:"second",duration:1e3}];function t(t,e,r){const o="RelativeTimeFormat"in Intl?(n,e)=>new Intl.RelativeTimeFormat(t,{numeric:"auto"}).format(-n,e):e;return function(t){const e=new Date(t).getTime(),i=(new Date).getTime()-e;for(const{unit:t,duration:e}of n){const n=i/e,r=Math.round(n);if(n>=1)return o(r,t)}return r}}function e(n,t){const e=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",timeZoneName:"short"}),r=new Date(t);return e.format(r)}function r(n,t){const e=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric"}),r=new Date(t);return e.format(r)}function o(n,t){const e=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"}),r=new Date(t);return e.format(r)}function i(n,t){const e=new Intl.DateTimeFormat(n,{hour:"numeric"}),r=new Date(t);return e.format(r)}export{e as formatDate,o as formatDateOnly,r as formatDatetime,i as formatHours,t as prepareFormatDistanceToNow}; | ||
//# sourceMappingURL=i18n-date.js.map |
@@ -1,2 +0,2 @@ | ||
function e(e){return({code:r,name:t})=>{try{return new Intl.DisplayNames([e],{type:"region"}).of(r.toUpperCase())}catch(e){return t}}}export{e as prepareCountryName}; | ||
function e(e,t,r){try{return new Intl.DisplayNames([e],{type:"region"}).of(t.toUpperCase())}catch(e){return r}}export{e as getCountryName}; | ||
//# sourceMappingURL=i18n-display.js.map |
@@ -1,2 +0,2 @@ | ||
const t=["","k","M","G","T","P"];function n(n){const i=new Intl.NumberFormat(n,{minimumFractionDigits:0,maximumFractionDigits:1});return n=>{const r=n>1?Math.floor(Math.log10(n)/3):0,m=n/1e3**r;return i.format(m)+t[r]}}const i=["","Ki","Mi","Gi","Ti","Pi"];function r(t,n,r){return(m,o=0)=>{if(m<1024)return new Intl.NumberFormat(t).format(m)+r+n;const a=new Intl.NumberFormat(t,{minimumFractionDigits:o,maximumFractionDigits:o}),e=i.findIndex(((t,n)=>m<1024**(n+1)||n===i.length-1)),u=m/1024**e,c=Math.trunc(u*10**o)/10**o,s=a.format(c),f=i[e];return s+r+f+n}}export{r as prepareNumberBytesFormatter,n as prepareNumberUnitFormatter}; | ||
function t(t,n){return new Intl.NumberFormat(t).format(n)}function n(t,n,r={}){const{currency:i="EUR"}=r,{maximumFractionDigits:m=2}=r;return new Intl.NumberFormat(t,{style:"currency",currency:i,maximumFractionDigits:m}).format(n).replace("$US","$")}function r(t,n){return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}).format(n)}const i=["","k","M","G","T","P"];function m(t){const n=new Intl.NumberFormat(t,{minimumFractionDigits:0,maximumFractionDigits:1});return t=>{const r=t>1?Math.floor(Math.log10(t)/3):0,m=t/1e3**r;return n.format(m)+i[r]}}const o=["","Ki","Mi","Gi","Ti","Pi"];function e(t,n,r){return(i,m=0,e=o.length-1)=>{if(i<1024)return new Intl.NumberFormat(t).format(i)+r+n;const u=new Intl.NumberFormat(t,{minimumFractionDigits:m,maximumFractionDigits:m}),a=o.slice(0,e+1).findIndex(((t,n)=>i<1024**(n+1)||n===e)),c=i/1024**a,s=Math.trunc(c*10**m)/10**m,f=u.format(s),F=o[a];return f+r+F+n}}export{n as formatCurrency,t as formatNumber,r as formatPercent,e as prepareNumberBytesFormatter,m as prepareNumberUnitFormatter}; | ||
//# sourceMappingURL=i18n-number.js.map |
@@ -1,2 +0,2 @@ | ||
import{fromEvent as e,Subject as t,Observable as r}from"rxjs/dist/esm/index.js";export{Observable,Subject,combineLatest,fromEvent,interval,merge,of}from"rxjs/dist/esm/index.js";import{map as s,switchMap as n,share as o,filter as i}from"rxjs/dist/esm/operators/index.js";export{delay,distinctUntilChanged,filter,map,multicast,sample,scan,share,switchMap,withLatestFrom}from"rxjs/dist/esm/operators/index.js";function a(e,t){e.addEventListener("abort",(()=>{t.forEach((e=>e.unsubscribe()))}),{once:!0})}function l(...t){return e(...t).pipe(s((e=>e.detail)))}class c{constructor(e){this._source$=new t,this.value$=new t,this.error$=new t;const a=this._source$.pipe(n((t=>{const s=new window.AbortController;null!=e&&e.addEventListener("abort",(()=>s.abort()),{once:!0});const n=t(s.signal);return new r((e=>(n.then((t=>e.next([null,t]))).catch((t=>e.next([t]))).finally((()=>e.complete())),()=>s.abort())))})),o());a.pipe(i((([e])=>null==e)),s((([e,t])=>t))).subscribe(this.value$),a.pipe(i((([e])=>null!=e)),s((([e])=>e))).subscribe(this.error$)}push(e){(this.value$.observers.length>0||this.error$.observers.length>0)&&this._source$.next(e)}}export{c as LastPromise,l as fromCustomEvent,a as unsubscribeWithSignal}; | ||
import{fromEvent as e,Subject as r,Observable as t}from"rxjs";export{Observable,Subject,combineLatest,fromEvent,interval,merge,of}from"rxjs";import{map as s,switchMap as o,share as n,filter as i}from"rxjs/operators";export{delay,distinctUntilChanged,filter,map,multicast,sample,scan,share,switchMap,withLatestFrom}from"rxjs/operators";function a(e,r){e.addEventListener("abort",(()=>{r.forEach((e=>e.unsubscribe()))}),{once:!0})}function l(...r){return e(...r).pipe(s((e=>e.detail)))}class c{constructor(e){this._source$=new r,this.value$=new r,this.error$=new r;const a=this._source$.pipe(o((r=>{const s=new window.AbortController;null!=e&&e.addEventListener("abort",(()=>s.abort()),{once:!0});const o=r(s.signal);return new t((e=>(o.then((r=>e.next([null,r]))).catch((r=>e.next([r]))).finally((()=>e.complete())),()=>s.abort())))})),n());a.pipe(i((([e])=>null==e)),s((([e,r])=>r))).subscribe(this.value$),a.pipe(i((([e])=>null!=e)),s((([e])=>e))).subscribe(this.error$)}push(e){(this.value$.observers.length>0||this.error$.observers.length>0)&&this._source$.next(e)}}export{c as LastPromise,l as fromCustomEvent,a as unsubscribeWithSignal}; | ||
//# sourceMappingURL=observables.js.map |
@@ -1,2 +0,2 @@ | ||
import{withCache as e}from"@clevercloud/client/esm/with-cache.js";import{addOauthHeader as t}from"@clevercloud/client/esm/oauth.browser.js";import{prefixUrl as r}from"@clevercloud/client/esm/prefix-url.js";import{request as o}from"@clevercloud/client/esm/request.fetch.js";import{withOptions as c}from"@clevercloud/client/esm/with-options.js";function i({apiConfig:i,signal:l,cacheDelay:n,timeout:s}){return m=>{const u={...i,...m};return e(u,n,(()=>{const{API_HOST:e,...n}=i;return Promise.resolve(m).then(r(e)).then(t(n)).then(c({signal:l,timeout:s})).then(o)}))}}export{i as sendToApi}; | ||
import{addOauthHeader as e}from"@clevercloud/client/esm/oauth.browser.js";import{prefixUrl as t}from"@clevercloud/client/esm/prefix-url.js";import{request as o}from"@clevercloud/client/esm/request.fetch.js";import{withCache as r}from"@clevercloud/client/esm/with-cache.js";import{withOptions as c}from"@clevercloud/client/esm/with-options.js";function i({apiConfig:i={},signal:l,cacheDelay:n,timeout:s}){return m=>{const u={...i,...m};return r(u,n,(()=>{const{API_HOST:r="https://api.clever-cloud.com",...n}=i;return Promise.resolve(m).then(t(r)).then(e(n)).then(c({signal:l,timeout:s})).then(o)}))}}export{i as sendToApi}; | ||
//# sourceMappingURL=send-to-api.js.map |
@@ -1,2 +0,2 @@ | ||
import{Subject as e}from"rxjs/dist/esm/index.js";import"rxjs/dist/esm/operators/index.js";import{objectEquals as t}from"./utils.js";const n=Symbol("COMPONENTS"),o=Symbol("CURRENT_CONTEXT"),r=Symbol("LAST_CONTEXT"),c=Symbol("META");let l={};const s=new Set,i=new Set;function a(e,t){e[n]=new Map,s.add(e);const r=new MutationObserver((()=>u()));r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0}),t.addEventListener("abort",(()=>{r.disconnect(),s.delete(e),e[n].forEach(((t,n)=>{t.forEach((t=>m(e,n,t)))})),delete e[n],delete e[o]}),{once:!0})}function f(e,t){i.add(e),u(),null!=t&&t.addEventListener("abort",(()=>{i.delete(e),s.forEach((t=>{(t[n].get(e)||[]).forEach((n=>m(t,e,n))),t[n].delete(e)}))}),{once:!0})}function u(){const a=[],f=[],u=[];s.forEach((e=>{i.forEach((t=>{const o=Array.from(e.querySelectorAll(t.selector)).filter((t=>{return n="cc-smart-container",t.parentElement.closest(n)===e;var n})),r=e[n].get(t)||[];e[n].set(t,o),o.filter((e=>!r.includes(e))).forEach((n=>f.push([e,t,n]))),o.filter((e=>r.includes(e))).forEach((n=>u.push([e,t,n]))),r.filter((e=>!o.includes(e))).forEach((n=>a.push([e,t,n])))}))})),a.forEach((([e,t,n])=>m(e,t,n))),f.forEach((([t,n,o])=>function(t,n,o){const l=new e,s=new AbortController;null==o[c]&&(o[c]=new Map);o[c].set(n,{context$:l,disconnectionController:s}),o[r]={},n.onConnect(t,o,l,s.signal)}(t,n,o))),[...f,...u].forEach((([e,n,s])=>function(e,n,s){const i=function(e,t){if(null==e)return{};if(null==t)return e;const n=Object.keys(t).map((t=>[t,e[t]])).filter((([e,t])=>void 0!==t));return Object.fromEntries(n)}({...l,...e[o]},n.params);if(t(s[r],i))return;s[r]=i,s[c].get(n).context$.next(i)}(e,n,s)))}function d(e,t){e[o]=t,u()}function E(e){l=e,u()}function m(e,t,n){n[c].get(t).disconnectionController.abort(),n[c].delete(t),delete n[r]}export{f as defineComponent,a as observeContainer,d as updateContext,E as updateRootContext}; | ||
import{Subject as e}from"rxjs";import"rxjs/operators";import{objectEquals as t}from"./utils.js";const n=Symbol("COMPONENTS"),o=Symbol("CURRENT_CONTEXT"),r=Symbol("LAST_CONTEXT"),c=Symbol("META");let l={};const i=new Set,s=new Set;function a(e,t){e[n]=new Map,i.add(e);const r=new MutationObserver((()=>u()));r.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0}),t.addEventListener("abort",(()=>{r.disconnect(),i.delete(e),e[n].forEach(((t,n)=>{t.forEach((t=>h(e,n,t)))})),delete e[n],delete e[o]}),{once:!0})}function f(e,t){s.add(e),u(),null!=t&&t.addEventListener("abort",(()=>{s.delete(e),i.forEach((t=>{(t[n].get(e)||[]).forEach((n=>h(t,e,n))),t[n].delete(e)}))}),{once:!0})}function u(){const a=[],f=[],u=[];i.forEach((e=>{s.forEach((t=>{const o=Array.from(e.querySelectorAll(t.selector)).filter((t=>{return n="cc-smart-container",t.parentElement.closest(n)===e;var n})),r=e[n].get(t)||[];e[n].set(t,o),o.filter((e=>!r.includes(e))).forEach((n=>f.push([e,t,n]))),o.filter((e=>r.includes(e))).forEach((n=>u.push([e,t,n]))),r.filter((e=>!o.includes(e))).forEach((n=>a.push([e,t,n])))}))})),a.forEach((([e,t,n])=>h(e,t,n))),f.forEach((([t,n,o])=>function(t,n,o){const l=new e,i=new AbortController;null==o[c]&&(o[c]=new Map);o[c].set(n,{context$:l,disconnectionController:i}),o[r]={},n.onConnect(t,o,l,i.signal)}(t,n,o))),[...f,...u].forEach((([e,n,i])=>function(e,n,i){const s=function(e,t){if(null==e)return{};if(null==t)return e;const n=Object.keys(t).map((t=>[t,e[t]])).filter((([e,t])=>void 0!==t));return Object.fromEntries(n)}({...l,...e[o]},n.params);if(t(i[r],s))return;i[r]=s,i[c].get(n).context$.next(s)}(e,n,i)))}function d(e,t){e[o]=t,u()}function E(e){l=e,u()}function h(e,t,n){n[c].get(t).disconnectionController.abort(),n[c].delete(t),delete n[r]}export{f as defineComponent,a as observeContainer,d as updateContext,E as updateRootContext}; | ||
//# sourceMappingURL=smart-manager.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as o}from"lit-element";import{dispatchCustomEvent as i}from"../lib/events.js";import{i18n as a}from"../lib/i18n.js";import"../atoms/cc-toggle.js";import"./cc-map-marker-dot.js";import"./cc-map.js";class s extends t{static get properties(){return{appName:{type:String,attribute:"app-name"},centerLat:{type:Number,attribute:"center-lat"},centerLon:{type:Number,attribute:"center-lon"},error:{type:Boolean,reflect:!0},heatmapPoints:{type:Array,attribute:"heatmap-points"},loading:{type:Boolean,reflect:!0},mode:{type:String},orgaName:{type:String,attribute:"orga-name"},viewZoom:{type:Number,attribute:"view-zoom"},_points:{type:Array}}}constructor(){super(),this.centerLat=48.9,this.centerLon=2.4,this.error=!1,this.loading=!1,this.mode="points",this.viewZoom=2,this._points=[],this._pointsByCoords={}}addPoints(t,e={}){const{spreadDuration:o=!1}=e,i=!1!==o?Math.floor(o/t.length):0;t.forEach(((t,e)=>{setTimeout((()=>this._addPoint(t)),i*e)}))}_addPoint({lat:t,lon:e,count:o=1,delay:i=1e3,tooltip:a}){const s=[t,e].join(","),r={lat:t,lon:e,count:o,tooltip:a};null==this._pointsByCoords[s]&&(this._pointsByCoords[s]=[]),this._pointsByCoords[s].push(r),this._updatePoints(),setTimeout((()=>{this._pointsByCoords[s]=this._pointsByCoords[s].filter((t=>t!==r)),0===this._pointsByCoords[s].length&&delete this._pointsByCoords[s],this._updatePoints()}),i)}_updatePoints(){this._points=Object.entries(this._pointsByCoords).map((([t,e])=>{const{lat:o,lon:i}=e[0],a=e.map((t=>t.count)).reduce(((t,e)=>t+e),0),s=e.filter((t=>null!=t.tooltip&&""!==t.tooltip)).map((t=>t.tooltip)),r=Array.from(new Set(s));r.length>=3&&(r.length=3,r[2]=r[2]+"...");return{lat:o,lon:i,marker:{tag:"cc-map-marker-dot",count:a},tooltip:r.length>0?r.join("<br>"):null}}))}_getModes(){return[{label:a("cc-logsmap.mode.points"),value:"points"},{label:a("cc-logsmap.mode.heatmap"),value:"heatmap"}]}_getLegend(){return"points"===this.mode?null==this.appName?a("cc-logsmap.legend.points",{orgaName:this.orgaName}):a("cc-logsmap.legend.points.app",{appName:this.appName}):null==this.appName?a("cc-logsmap.legend.heatmap",{orgaName:this.orgaName}):a("cc-logsmap.legend.heatmap.app",{appName:this.appName})}render(){return e`<cc-toggle .choices=${this._getModes()} value=${this.mode} @cc-toggle:input=${this._onModeChange}></cc-toggle><cc-map center-lat=${this.centerLat} center-lon=${this.centerLon} view-zoom=${this.viewZoom} mode=${this.mode} ?loading=${this.loading} ?error=${this.error} .heatmapPoints=${this.heatmapPoints} .points=${this._points}>${this._getLegend()}</cc-map>`}_onModeChange({detail:t}){this.mode=t,i(this,"mode",this.mode)}static get styles(){return o`:host{border:1px solid #ccc;border-radius:.25rem;display:block;height:15rem;overflow:hidden;position:relative;width:20rem}cc-toggle{left:.5rem;position:absolute;top:.5rem;z-index:2}cc-map{height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}cc-map[view-zoom="1"]{--cc-map-marker-dot-size:6px}cc-map[view-zoom="2"]{--cc-map-marker-dot-size:8px}cc-map[view-zoom="3"]{--cc-map-marker-dot-size:10px}cc-map[view-zoom="4"]{--cc-map-marker-dot-size:12px}cc-map[view-zoom="5"]{--cc-map-marker-dot-size:14px}cc-map[view-zoom="6"]{--cc-map-marker-dot-size:16px}`}}window.customElements.define("cc-logsmap",s);export{s as CcLogsMap}; | ||
import"../atoms/cc-toggle.js";import"./cc-map-marker-dot.js";import"./cc-map.js";import{LitElement as t,html as e,css as o}from"lit-element";import{dispatchCustomEvent as i}from"../lib/events.js";import{i18n as a}from"../lib/i18n.js";class s extends t{static get properties(){return{appName:{type:String,attribute:"app-name"},centerLat:{type:Number,attribute:"center-lat"},centerLon:{type:Number,attribute:"center-lon"},error:{type:Boolean,reflect:!0},heatmapPoints:{type:Array,attribute:"heatmap-points"},loading:{type:Boolean,reflect:!0},mode:{type:String},orgaName:{type:String,attribute:"orga-name"},viewZoom:{type:Number,attribute:"view-zoom"},_points:{type:Array}}}constructor(){super(),this.centerLat=48.9,this.centerLon=2.4,this.error=!1,this.loading=!1,this.mode="points",this.viewZoom=2,this._points=[],this._pointsByCoords={}}addPoints(t,e={}){const{spreadDuration:o=!1}=e,i=!1!==o?Math.floor(o/t.length):0;t.forEach(((t,e)=>{setTimeout((()=>this._addPoint(t)),i*e)}))}_addPoint({lat:t,lon:e,count:o=1,delay:i=1e3,tooltip:a}){const s=[t,e].join(","),r={lat:t,lon:e,count:o,tooltip:a};null==this._pointsByCoords[s]&&(this._pointsByCoords[s]=[]),this._pointsByCoords[s].push(r),this._updatePoints(),setTimeout((()=>{this._pointsByCoords[s]=this._pointsByCoords[s].filter((t=>t!==r)),0===this._pointsByCoords[s].length&&delete this._pointsByCoords[s],this._updatePoints()}),i)}_updatePoints(){this._points=Object.entries(this._pointsByCoords).map((([t,e])=>{const{lat:o,lon:i}=e[0],a=e.map((t=>t.count)).reduce(((t,e)=>t+e),0),s=e.filter((t=>null!=t.tooltip&&""!==t.tooltip)).map((t=>t.tooltip)),r=Array.from(new Set(s));r.length>=3&&(r.length=3,r[2]=r[2]+"...");return{lat:o,lon:i,marker:{tag:"cc-map-marker-dot",count:a},tooltip:r.length>0?r.join("<br>"):null}}))}_getModes(){return[{label:a("cc-logsmap.mode.points"),value:"points"},{label:a("cc-logsmap.mode.heatmap"),value:"heatmap"}]}_getLegend(){return"points"===this.mode?null==this.appName?a("cc-logsmap.legend.points",{orgaName:this.orgaName}):a("cc-logsmap.legend.points.app",{appName:this.appName}):null==this.appName?a("cc-logsmap.legend.heatmap",{orgaName:this.orgaName}):a("cc-logsmap.legend.heatmap.app",{appName:this.appName})}render(){return e`<cc-toggle .choices=${this._getModes()} value=${this.mode} @cc-toggle:input=${this._onModeChange}></cc-toggle><cc-map center-lat=${this.centerLat} center-lon=${this.centerLon} view-zoom=${this.viewZoom} mode=${this.mode} ?loading=${this.loading} ?error=${this.error} .heatmapPoints=${this.heatmapPoints} .points=${this._points}>${this._getLegend()}</cc-map>`}_onModeChange({detail:t}){this.mode=t,i(this,"mode",this.mode)}static get styles(){return o`:host{border:1px solid #ccc;border-radius:.25rem;display:block;height:15rem;overflow:hidden;position:relative;width:20rem}cc-toggle{left:.5rem;position:absolute;top:.5rem;z-index:2}cc-map{height:100%;left:0;position:absolute;top:0;width:100%;z-index:1}cc-map[view-zoom="1"]{--cc-map-marker-dot-size:6px}cc-map[view-zoom="2"]{--cc-map-marker-dot-size:8px}cc-map[view-zoom="3"]{--cc-map-marker-dot-size:10px}cc-map[view-zoom="4"]{--cc-map-marker-dot-size:12px}cc-map[view-zoom="5"]{--cc-map-marker-dot-size:14px}cc-map[view-zoom="6"]{--cc-map-marker-dot-size:16px}`}}window.customElements.define("cc-logsmap",s);export{s as CcLogsMap}; | ||
//# sourceMappingURL=cc-logsmap.js.map |
@@ -1,2 +0,2 @@ | ||
import{html as t,css as e,LitElement as o}from"lit-element";import{classMap as i}from"lit-html/directives/class-map.js";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as a}from"../lib/i18n.js";import"../atoms/cc-loader.js";import"../molecules/cc-error.js";import n from"leaflet";import"leaflet.heat";import{WORLD_GEOJSON as s}from"../assets/world-110m.geo.js";import{withResizeObserver as l}from"../mixins/with-resize-observer.js";import{leafletStyles as c}from"../styles/leaflet.js";class m extends(l(o)){static get properties(){return{centerLat:{type:Number,attribute:"center-lat"},centerLon:{type:Number,attribute:"center-lon"},error:{type:Boolean,reflect:!0},heatmapPoints:{type:Array,attribute:"heatmap-points"},loading:{type:Boolean,reflect:!0},mode:{type:String},points:{type:Array},viewZoom:{type:Number,attribute:"view-zoom",reflect:!0}}}constructor(){super(),this.centerLat=48.9,this.centerLon=2.4,this.error=!1,this.loading=!1,this.mode="points",this.viewZoom=2,this._pointsCache={}}_resetCurrentLayer(){const[t,e]="heatmap"===this.mode?[this._heatLayer,this._pointsLayer]:[this._pointsLayer,this._heatLayer];this._map.removeLayer(e),this._map.addLayer(t)}_updateHeatmap(t){if(!Array.isArray(t))return;const e=t.map((({count:t})=>t)),o=t.length>0?Math.max(...e):1,i=t.map((({lat:t,lon:e,count:o})=>[t,e,o])),r={blur:7,max:o,minOpacity:.3,radius:8};this._heatLayer.clearLayers().addLayer(n.heatLayer(i,r))}_updatePoints(t){if(!Array.isArray(t))return;const e=new Set(Object.keys(this._pointsCache));for(const o of t){const t=[o.lat,o.lon,o.marker.tag].join(",");null==this._pointsCache[t]&&this._createMarker(t,o),this._updateMarker(t,o),e.delete(t)}for(const t of e.values())this._deleteMarker(t)}_createMarker(t,e){const o=document.createElement(e.marker.tag),i=n.divIcon({html:o,iconSize:o.size,iconAnchor:o.anchor,tooltipAnchor:o.tooltip,className:"cc-map-marker"}),a=n.marker([e.lat,e.lon],{icon:i,zIndexOffset:e.zIndexOffset}).addTo(this._pointsLayer);a.on("click",(()=>r(this,"marker-click",e))).on("mouseover",(()=>r(this,"marker-enter",e))).on("mouseout",(()=>r(this,"marker-leave",e))),this._pointsCache[t]={point:e,marker:a,iconElement:o}}_updateMarker(t,e){this._pointsCache[t].point=e;const{point:o,marker:i,iconElement:r}=this._pointsCache[t];for(const t in o.marker)"tag"!==t&&(r[t]=o.marker[t]);if(i.setZIndexOffset(o.zIndexOffset),null==o.tooltip)i.unbindTooltip();else if(null==i.getTooltip()&&i.bindTooltip("",{direction:"top",opacity:1}),null==o.tooltip.tag)i.setTooltipContent(o.tooltip);else{const t=i.getTooltip().getContent(),e=(null!=t&&null!=t.tagName?t.tagName.toLowerCase():null)!==o.tooltip.tag?document.createElement(o.tooltip.tag):t;for(const t in o.tooltip)"tag"!==t&&(e[t]=o.tooltip[t]);this.appendChild(e),this.removeChild(e),i.setTooltipContent(e)}}_deleteMarker(t){const{marker:e}=this._pointsCache[t];this._pointsLayer.removeLayer(e),delete this._pointsCache[t]}panInside(t,e){this._map.panInside([t,e],{padding:[50,50]})}onResize(){this._map.invalidateSize()}firstUpdated(){this._map=n.map(this.renderRoot.getElementById("cc-map-container"),{attributionControl:!1,doubleClickZoom:!0,dragging:!0,keyboard:!0,maxBounds:[[-84,-180],[90,180]],maxBoundsViscosity:1,maxZoom:6,minZoom:1,zoomControl:!0}).setView([this.centerLat,this.centerLon],this.viewZoom),this._map.on("zoomanim",(t=>{this.viewZoom=t.zoom})),this._map.zoomControl.setPosition("bottomright"),n.geoJSON(s,{style:{className:"map-country"},pane:"tilePane"}).addTo(this._map),this._pointsLayer=n.layerGroup(),this._heatLayer=n.layerGroup(),this._resetCurrentLayer()}updated(t){(t.has("centerLat")||t.has("centerLon"))&&this._map.setView([this.centerLat,this.centerLon]),t.has("viewZoom")&&this._map.setZoom(this.viewZoom),t.has("mode")&&this._resetCurrentLayer(),t.has("heatmapPoints")&&this._updateHeatmap(this.heatmapPoints),t.has("points")&&this._updatePoints(this.points),super.updated(t)}render(){const e=!this.error&&"heatmap"===this.mode&&null!=this.heatmapPoints&&0===this.heatmapPoints.length,o=this.loading?"loading":"info";return t`<div id=cc-map-container class=${i({"no-data":e})}></div><div class="${i({"no-data":e})} legend"><slot></slot></div>${this.loading&&!this.error?t`<cc-loader class=loader></cc-loader>`:""} ${this.error||e?t`<div class=msg-container>${this.error?t`<cc-error mode=${o}>${a("cc-map.error")}</cc-error>`:""} ${e?t`<div class=msg>${a("cc-map.no-points")}</div>`:""}</div>`:""}`}static get styles(){return[c,e`:host{display:flex;flex-direction:column;height:15rem;position:relative;width:20rem}#cc-map-container{flex:1 1 0;width:100%}:host([error]) .leaflet-control-container,:host([loading]) .leaflet-control-container{display:none}#cc-map-container.no-data,.legend.no-data,:host([error]) #cc-map-container,:host([error]) .legend,:host([loading]) #cc-map-container,:host([loading]) .legend{filter:blur(.1rem)}.leaflet-container{background-color:#aadaff;z-index:1}.map-country{fill:#f5f5f5;fill-opacity:1;stroke:#ddd;stroke-width:1}:host(:not(:empty)) .legend{background-color:#f1f5ff;box-shadow:inset 0 6px 6px -6px #a4b1c9;box-sizing:border-box;color:#2e2e2e;font-size:.9rem;font-style:italic;padding:.4rem 1rem}.loader{height:100%;left:0;position:absolute;top:0;width:100%;z-index:2000}.msg-container{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:2000}.msg,cc-error{max-width:80%}.msg{align-items:center;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-shadow:0 0 1rem #aaa;display:flex;justify-content:center;padding:1rem}.cc-map-marker{align-items:center;display:flex;justify-content:center}`]}}window.customElements.define("cc-map",m);export{m as CcMap}; | ||
import"../atoms/cc-loader.js";import"../molecules/cc-error.js";import t from"leaflet";import"leaflet.heat";import{html as e,css as o,LitElement as i}from"lit-element";import{classMap as r}from"lit-html/directives/class-map.js";import{WORLD_GEOJSON as a}from"../assets/world-110m.geo.js";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{withResizeObserver as l}from"../mixins/with-resize-observer.js";import{leafletStyles as c}from"../styles/leaflet.js";class m extends(l(i)){static get properties(){return{centerLat:{type:Number,attribute:"center-lat"},centerLon:{type:Number,attribute:"center-lon"},error:{type:Boolean,reflect:!0},heatmapPoints:{type:Array,attribute:"heatmap-points"},loading:{type:Boolean,reflect:!0},mode:{type:String},points:{type:Array},viewZoom:{type:Number,attribute:"view-zoom",reflect:!0}}}constructor(){super(),this.centerLat=48.9,this.centerLon=2.4,this.error=!1,this.loading=!1,this.mode="points",this.viewZoom=2,this._pointsCache={}}_resetCurrentLayer(){const[t,e]="heatmap"===this.mode?[this._heatLayer,this._pointsLayer]:[this._pointsLayer,this._heatLayer];this._map.removeLayer(e),this._map.addLayer(t)}_updateHeatmap(e){if(!Array.isArray(e))return;const o=e.map((({count:t})=>t)),i=e.length>0?Math.max(...o):1,r=e.map((({lat:t,lon:e,count:o})=>[t,e,o])),a={blur:7,max:i,minOpacity:.3,radius:8};this._heatLayer.clearLayers().addLayer(t.heatLayer(r,a))}_updatePoints(t){if(!Array.isArray(t))return;const e=new Set(Object.keys(this._pointsCache));for(const o of t){const t=[o.lat,o.lon,o.marker.tag].join(",");null==this._pointsCache[t]&&this._createMarker(t,o),this._updateMarker(t,o),e.delete(t)}for(const t of e.values())this._deleteMarker(t)}_createMarker(e,o){const i=document.createElement(o.marker.tag),r=t.divIcon({html:i,iconSize:i.size,iconAnchor:i.anchor,tooltipAnchor:i.tooltip,className:"cc-map-marker"}),a=t.marker([o.lat,o.lon],{icon:r,zIndexOffset:o.zIndexOffset}).addTo(this._pointsLayer);a.on("click",(()=>n(this,"marker-click",o))).on("mouseover",(()=>n(this,"marker-enter",o))).on("mouseout",(()=>n(this,"marker-leave",o))),this._pointsCache[e]={point:o,marker:a,iconElement:i}}_updateMarker(t,e){this._pointsCache[t].point=e;const{point:o,marker:i,iconElement:r}=this._pointsCache[t];for(const t in o.marker)"tag"!==t&&(r[t]=o.marker[t]);if(i.setZIndexOffset(o.zIndexOffset),null==o.tooltip)i.unbindTooltip();else if(null==i.getTooltip()&&i.bindTooltip("",{direction:"top",opacity:1}),null==o.tooltip.tag)i.setTooltipContent(o.tooltip);else{const t=i.getTooltip().getContent(),e=(null!=t&&null!=t.tagName?t.tagName.toLowerCase():null)!==o.tooltip.tag?document.createElement(o.tooltip.tag):t;for(const t in o.tooltip)"tag"!==t&&(e[t]=o.tooltip[t]);this.appendChild(e),this.removeChild(e),i.setTooltipContent(e)}}_deleteMarker(t){const{marker:e}=this._pointsCache[t];this._pointsLayer.removeLayer(e),delete this._pointsCache[t]}panInside(t,e){this._map.panInside([t,e],{padding:[50,50]})}onResize(){this._map.invalidateSize()}firstUpdated(){this._map=t.map(this.renderRoot.getElementById("cc-map-container"),{attributionControl:!1,doubleClickZoom:!0,dragging:!0,keyboard:!0,maxBounds:[[-84,-180],[90,180]],maxBoundsViscosity:1,maxZoom:6,minZoom:1,zoomControl:!0}).setView([this.centerLat,this.centerLon],this.viewZoom),this._map.on("zoomanim",(t=>{this.viewZoom=t.zoom})),this._map.zoomControl.setPosition("bottomright"),t.geoJSON(a,{style:{className:"map-country"},pane:"tilePane"}).addTo(this._map),this._pointsLayer=t.layerGroup(),this._heatLayer=t.layerGroup(),this._resetCurrentLayer()}updated(t){(t.has("centerLat")||t.has("centerLon"))&&this._map.setView([this.centerLat,this.centerLon]),t.has("viewZoom")&&this._map.setZoom(this.viewZoom),t.has("mode")&&this._resetCurrentLayer(),t.has("heatmapPoints")&&this._updateHeatmap(this.heatmapPoints),t.has("points")&&this._updatePoints(this.points),super.updated(t)}render(){const t=!this.error&&"heatmap"===this.mode&&null!=this.heatmapPoints&&0===this.heatmapPoints.length,o=this.loading?"loading":"info";return e`<div id=cc-map-container class=${r({"no-data":t})}></div><div class="${r({"no-data":t})} legend"><slot></slot></div>${this.loading&&!this.error?e`<cc-loader class=loader></cc-loader>`:""} ${this.error||t?e`<div class=msg-container>${this.error?e`<cc-error mode=${o}>${s("cc-map.error")}</cc-error>`:""} ${t?e`<div class=msg>${s("cc-map.no-points")}</div>`:""}</div>`:""}`}static get styles(){return[c,o`:host{display:flex;flex-direction:column;height:15rem;position:relative;width:20rem}#cc-map-container{flex:1 1 0;width:100%}:host([error]) .leaflet-control-container,:host([loading]) .leaflet-control-container{display:none}#cc-map-container.no-data,.legend.no-data,:host([error]) #cc-map-container,:host([error]) .legend,:host([loading]) #cc-map-container,:host([loading]) .legend{filter:blur(.1rem)}.leaflet-container{background-color:#aadaff;z-index:1}.map-country{fill:#f5f5f5;fill-opacity:1;stroke:#ddd;stroke-width:1}:host(:not(:empty)) .legend{background-color:#f1f5ff;box-shadow:inset 0 6px 6px -6px #a4b1c9;box-sizing:border-box;color:#2e2e2e;font-size:.9rem;font-style:italic;padding:.4rem 1rem}.loader{height:100%;left:0;position:absolute;top:0;width:100%;z-index:2000}.msg-container{align-items:center;display:flex;height:100%;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:2000}.msg,cc-error{max-width:80%}.msg{align-items:center;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-shadow:0 0 1rem #aaa;display:flex;justify-content:center;padding:1rem}.cc-map-marker{align-items:center;display:flex;justify-content:center}`]}}window.customElements.define("cc-map",m);export{m as CcMap}; | ||
//# sourceMappingURL=cc-map.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as o}from"lit-element";import{classMap as s}from"lit-html/directives/class-map.js";import{i18n as r}from"../lib/i18n.js";import"../atoms/cc-button.js";import"../atoms/cc-expand.js";import"../atoms/cc-img.js";const i=new URL(new URL("../assets/down.svg",import.meta.url).href,import.meta.url).href,a=new URL(new URL("../assets/up.svg",import.meta.url).href,import.meta.url).href;class l extends t{static get properties(){return{icon:{type:String},state:{type:String,reflect:!0},_overlay:{type:Boolean,attribute:!1}}}constructor(){super(),this.state="off",this._overlay=!1}_clickToggle(){"close"===this.state?this.state="open":"open"===this.state&&(this.state="close")}render(){const t="open"===this.state||"close"===this.state,o="close"!==this.state;return e`<div class=head @click=${this._clickToggle}>${null!=this.icon?e`<cc-img src=${this.icon}></cc-img>`:""}<slot name=title></slot>${t?e`<cc-button image=${o?a:i} hide-text @cc-button:click=${this._clickToggle}>${"close"===this.state?r("cc-block.toggle.close"):r("cc-block.toggle.open")}</cc-button>`:""}<slot name=button></slot></div><cc-expand class="${s({"main-wrapper--overlay":this._overlay})} main-wrapper">${!t||o?e`<div class=main><slot></slot></div>`:""}</cc-expand><slot name=overlay></slot>`}firstUpdated(){const t=this.shadowRoot.querySelector('slot[name="overlay"]');t.addEventListener("slotchange",(e=>{const o=this._overlay;this._overlay=t.assignedNodes().length>0,this.requestUpdate("_overlay",o)}))}static get styles(){return[o`:host{background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-sizing:border-box;display:grid;overflow:hidden}.head{align-items:center;display:flex;padding:1rem}:host([state=close]) .head:hover,:host([state=open]) .head:hover{background-color:#fafafa;cursor:pointer}cc-img{align-self:flex-start;border-radius:.25rem;height:1.5rem;margin-right:1rem;width:1.5rem}::slotted([slot=title]){color:#3a3871;flex:1 1 0;font-size:1.2rem;font-weight:700}.main{display:grid;grid-gap:1rem;padding:.5rem 1rem 1rem}.main-wrapper--overlay{filter:blur(.3rem);opacity:.35}.main-wrapper,::slotted([slot=overlay]){grid-area:2/1/auto/auto}::slotted([slot=overlay]){align-content:center;display:grid;justify-items:center;z-index:10}::slotted(.cc-block_empty-msg){color:#555;font-style:italic}`]}}window.customElements.define("cc-block",l);export{l as CcBlock}; | ||
import"../atoms/cc-button.js";import"../atoms/cc-expand.js";import"../atoms/cc-img.js";import{LitElement as t,html as e,css as o}from"lit-element";import{classMap as s}from"lit-html/directives/class-map.js";import{i18n as r}from"../lib/i18n.js";const i=new URL(new URL("../assets/down.svg",import.meta.url).href,import.meta.url).href,a=new URL(new URL("../assets/up.svg",import.meta.url).href,import.meta.url).href;class l extends t{static get properties(){return{icon:{type:String},state:{type:String,reflect:!0},_overlay:{type:Boolean,attribute:!1}}}constructor(){super(),this.state="off",this._overlay=!1}_clickToggle(){"close"===this.state?this.state="open":"open"===this.state&&(this.state="close")}render(){const t="open"===this.state||"close"===this.state,o="close"!==this.state;return e`<div class=head @click=${this._clickToggle}>${null!=this.icon?e`<cc-img src=${this.icon}></cc-img>`:""}<slot name=title></slot>${t?e`<cc-button image=${o?a:i} hide-text @cc-button:click=${this._clickToggle}>${"close"===this.state?r("cc-block.toggle.close"):r("cc-block.toggle.open")}</cc-button>`:""}<slot name=button></slot></div><cc-expand class="${s({"main-wrapper--overlay":this._overlay})} main-wrapper">${!t||o?e`<div class=main><slot></slot></div>`:""}</cc-expand><slot name=overlay></slot>`}firstUpdated(){const t=this.shadowRoot.querySelector('slot[name="overlay"]');t.addEventListener("slotchange",(e=>{const o=this._overlay;this._overlay=t.assignedNodes().length>0,this.requestUpdate("_overlay",o)}))}static get styles(){return[o`:host{background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-sizing:border-box;display:grid;overflow:hidden}.head{align-items:center;display:flex;padding:1rem}:host([state=close]) .head:hover,:host([state=open]) .head:hover{background-color:#fafafa;cursor:pointer}cc-img{align-self:flex-start;border-radius:.25rem;height:1.5rem;margin-right:1rem;width:1.5rem}::slotted([slot=title]){color:#3a3871;flex:1 1 0;font-size:1.2rem;font-weight:700}.main{display:grid;grid-gap:1rem;padding:.5rem 1rem 1rem}.main-wrapper--overlay{filter:blur(.3rem);opacity:.35}.main-wrapper,::slotted([slot=overlay]){grid-area:2/1/auto/auto}::slotted([slot=overlay]){align-content:center;display:grid;justify-items:center;z-index:10}::slotted(.cc-block_empty-msg){color:#555;font-style:italic}`]}}window.customElements.define("cc-block",l);export{l as CcBlock}; | ||
//# sourceMappingURL=cc-block.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as o}from"lit-element";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as i}from"../lib/i18n.js";import"../atoms/cc-loader.js";import"../atoms/cc-button.js";const c=new URL(new URL("../assets/warning.svg",import.meta.url).href,import.meta.url).href;class n extends t{static get properties(){return{mode:{type:String,reflect:!0}}}constructor(){super(),this.mode="inline"}_onOkClick(){r(this,"ok")}render(){return e`${"loading"===this.mode?e`<cc-loader></cc-loader>`:""}<div><img src=${c} alt=""><slot></slot></div>${"confirm"===this.mode?e`<cc-button @cc-button:click=${this._onOkClick}>${i("cc-error.ok")}</cc-button>`:""}`}static get styles(){return[o`:host{display:block}:host([mode=confirm]),:host([mode=info]),:host([mode=loading]){align-items:center;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-shadow:0 0 1rem #aaa;display:grid;grid-gap:1rem;justify-content:center;justify-items:center;padding:1rem}:host([mode=loading]){grid-template-columns:min-content auto}cc-loader{height:1.5rem;width:1.5rem}img{display:inline-block;height:1rem;margin-right:.4rem;margin-top:.1rem;vertical-align:text-top;width:1rem}cc-button{display:block}`]}}window.customElements.define("cc-error",n);export{n as CcError}; | ||
import"../atoms/cc-button.js";import"../atoms/cc-loader.js";import{LitElement as t,html as e,css as o}from"lit-element";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as i}from"../lib/i18n.js";const c=new URL(new URL("../assets/warning.svg",import.meta.url).href,import.meta.url).href;class n extends t{static get properties(){return{mode:{type:String,reflect:!0}}}constructor(){super(),this.mode="inline"}_onOkClick(){r(this,"ok")}render(){return e`${"loading"===this.mode?e`<cc-loader></cc-loader>`:""}<div><img src=${c} alt=""><slot></slot></div>${"confirm"===this.mode?e`<cc-button @cc-button:click=${this._onOkClick}>${i("cc-error.ok")}</cc-button>`:""}`}static get styles(){return[o`:host{display:block}:host([mode=confirm]),:host([mode=info]),:host([mode=loading]){align-items:center;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-shadow:0 0 1rem #aaa;display:grid;grid-gap:1rem;justify-content:center;justify-items:center;padding:1rem}:host([mode=loading]){grid-template-columns:min-content auto}cc-loader{height:1.5rem;width:1.5rem}img{display:inline-block;height:1rem;margin-right:.4rem;margin-top:.1rem;vertical-align:text-top;width:1rem}cc-button{display:block}`]}}window.customElements.define("cc-error",n);export{n as CcError}; | ||
//# sourceMappingURL=cc-error.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as a}from"lit-html/directives/class-map.js";import{ifDefined as i}from"lit-html/directives/if-defined.js";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as n}from"../lib/i18n.js";import{skeletonStyles as c}from"../styles/skeleton.js";import{ccLink as o,linkStyles as l}from"../templates/cc-link.js";import"../atoms/cc-button.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";import"../zones/cc-zone.js";import{waitingStyles as m}from"../styles/waiting.js";const p=new URL(new URL("../assets/git.svg",import.meta.url).href,import.meta.url).href,d=new URL(new URL("../assets/restart-failed.svg",import.meta.url).href,import.meta.url).href,g=new URL(new URL("../assets/restarting-with-downtime.svg",import.meta.url).href,import.meta.url).href,u=new URL(new URL("../assets/restarting.svg",import.meta.url).href,import.meta.url).href,h=new URL(new URL("../assets/running.svg",import.meta.url).href,import.meta.url).href,f=new URL(new URL("../assets/start-failed.svg",import.meta.url).href,import.meta.url).href,b=new URL(new URL("../assets/starting.svg",import.meta.url).href,import.meta.url).href,$=new URL(new URL("../assets/stopped.svg",import.meta.url).href,import.meta.url).href,w=new URL(new URL("../assets/unknown.svg",import.meta.url).href,import.meta.url).href,_={git:p,running:h,starting:b},U={"restart-failed":d,restarting:u,"restarting-with-downtime":g,running:h,"start-failed":f,starting:b,stopped:$},v={name:"??????????????????????????",commit:"????????????????????????????????????????"};class k extends t{static get properties(){return{app:{type:Object},disableButtons:{type:Boolean,attribute:"disable-buttons",reflect:!0},error:{type:Boolean,reflect:!0},runningCommit:{type:String,attribute:"running-commit"},startingCommit:{type:String,attribute:"starting-commit"},status:{type:String},zone:{type:Object},_lastUserAction:{type:String,attribute:!1}}}constructor(){super(),this.disableButtons=!1,this.error=!1}_getCommitTitle(t,e){if(null!=e)return"git"===t?n("cc-header-app.commits.git",{commit:e}):"running"===t?n("cc-header-app.commits.running",{commit:e}):"starting"===t?n("cc-header-app.commits.starting",{commit:e}):void 0}_getStatusMsg(t){return"restart-failed"===t?n("cc-header-app.state-msg.app-is-running")+" "+n("cc-header-app.state-msg.last-deploy-failed"):"restarting"===t||"restarting-with-downtime"===t?n("cc-header-app.state-msg.app-is-restarting"):"running"===t?n("cc-header-app.state-msg.app-is-running"):"start-failed"===t?n("cc-header-app.state-msg.app-is-stopped")+" "+n("cc-header-app.state-msg.last-deploy-failed"):n("starting"===t?"cc-header-app.state-msg.app-is-starting":"stopped"===t?"cc-header-app.state-msg.app-is-stopped":"cc-header-app.state-msg.unknown-state")}_getLastUserActionMsg(){return"start"===this._lastUserAction?n("cc-header-app.user-action-msg.app-will-start"):"restart"===this._lastUserAction?n("cc-header-app.user-action-msg.deploy-will-begin"):"cancel"===this._lastUserAction?n("cc-header-app.user-action-msg.deploy-cancelled"):"stop"===this._lastUserAction?n("cc-header-app.user-action-msg.app-will-stop"):void 0}_onStart(t){this._lastUserAction="start",r(this,"start",t)}_onRestart(t){this._lastUserAction="restart",r(this,"restart",t)}_onCancel(){this._lastUserAction="cancel",r(this,"cancel")}_onStop(){this._lastUserAction="stop",r(this,"stop")}_renderCommit(t,s,r){return null==t&&"git"!==s?"":e`<span class="${a({"cc-waiting":"starting"===s})} commit" title=${i(r?void 0:this._getCommitTitle(s,t))} data-type=${s}><img class=commit_img src=${_[s]} alt=""> ${null!=t?e`<span class=${a({skeleton:r})}>${t.slice(0,8)}<span class=commit_rest>${t.slice(8)}</span></span>`:""} ${null==t?e`<span>${n("cc-header-app.commits.no-commits")}</span>`:""}</span>`}update(t){t.has("status")&&(this._lastUserAction=t.get("status")!==this.status?null:this._lastUserAction),super.update(t)}render(){if(this.error)return e`<cc-error>${n("cc-header-app.error")}</cc-error>`;const t=null==this.app,{name:s,commit:r,variantName:c,variantLogo:l,lastDeploymentLogsUrl:m}=t?v:this.app,p=null==this.status,d=p?"unknown":this.status,g=["restarting","restarting-with-downtime","starting"].includes(d),u=["restart-failed","restarting","running"].includes(d),h=null!=this._lastUserAction||this.disableButtons,f=["start-failed","stopped","unknown"].includes(d),b=["start-failed","stopped"].includes(d),$=p||["restart-failed","running","unknown"].includes(d),_="start"!==this._lastUserAction&&"stop"!==this._lastUserAction,k=["restart-failed","restarting","restarting-with-downtime","starting","start-failed"].includes(d),y=this.disableButtons?n("cc-header-app.disable-buttons"):void 0;return e`<cc-flex-gap class=main><div class="${a({skeleton:t})} flavor-logo" title=${i(c)}><img class=flavor-logo_img src=${i(l)} alt=""></div><div class=details><div class=name><span class=${a({skeleton:t})}>${s}</span></div><cc-flex-gap class=commits>${this._renderCommit(r,"git",t)} ${u?this._renderCommit(this.runningCommit,"running",t):""} ${g?this._renderCommit(this.startingCommit,"starting",t):""}</cc-flex-gap></div><cc-flex-gap class=buttons>${b?e`<cc-button title=${i(y)} ?disabled=${h} @cc-button:click=${()=>this._onStart("normal")}>${n("cc-header-app.action.start")}</cc-button><cc-button title=${i(y)} ?disabled=${h} @cc-button:click=${()=>this._onStart("rebuild")}>${n("cc-header-app.action.start-rebuild")}</cc-button><cc-button title=${i(y)} ?disabled=${h} @cc-button:click=${()=>this._onStart("last-commit")}>${n("cc-header-app.action.start-last-commit")}</cc-button>`:""} ${$?e`<cc-button title=${i(y)} ?skeleton=${p} ?disabled=${h} @cc-button:click=${()=>this._onRestart("normal")}>${n("cc-header-app.action.restart")}</cc-button><cc-button title=${i(y)} ?skeleton=${p} ?disabled=${h} @cc-button:click=${()=>this._onRestart("rebuild")}>${n("cc-header-app.action.restart-rebuild")}</cc-button><cc-button title=${i(y)} ?skeleton=${p} ?disabled=${h} @cc-button:click=${()=>this._onRestart("last-commit")}>${n("cc-header-app.action.restart-last-commit")}</cc-button>`:""} ${g?e`<cc-button warning outlined title=${i(y)} ?disabled=${h} @cc-button:click=${this._onCancel}>${n("cc-header-app.action.cancel-deployment")}</cc-button>`:""}<cc-button danger outlined delay=3 title=${i(y)} ?skeleton=${p} ?disabled=${h||f} @cc-button:click=${this._onStop}>${n("cc-header-app.action.stop")}</cc-button></cc-flex-gap></cc-flex-gap><cc-flex-gap class="${a({"cc-waiting":g})} messages">${_?e`<img class=status-icon src=${U[d]||w} alt=""> <span class=${a({skeleton:p})}>${this._getStatusMsg(d)} </span>${k?o(m,n("cc-header-app.read-logs")):""}`:""} ${null!=this._lastUserAction?e`${this._getLastUserActionMsg()}`:""} ${null!=this.zone?e`<span class=spacer></span><cc-zone .zone=${this.zone} mode=small-infra></cc-zone>`:""}</cc-flex-gap>`}static get styles(){return[c,l,m,s`:host{--cc-gap:1rem;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:block}cc-error{padding:var(--cc-gap);text-align:center}.main{padding:var(--cc-gap)}.flavor-logo{align-self:flex-start;border-radius:.25rem;height:3.25rem;overflow:hidden;width:3.25rem}.flavor-logo_img{display:block;height:100%;width:100%}.skeleton .flavor-logo_img{opacity:0}.details{display:flex;flex:1 1 0;flex-direction:column;justify-content:space-between}.name{font-size:1.1rem;font-weight:700;min-width:12rem}.commit{align-items:flex-start;display:flex}.commit[data-type=git]{color:#5d5d5d}.commit[data-type=running]{color:#2faa60}.commit[data-type=starting]{color:#2b96fd}.commit_img{height:1.1rem;margin-right:.2rem;overflow:hidden;width:1.1rem}.commit_rest{font-size:0}.buttons{align-self:center}cc-button{flex:1 1 auto;min-width:0}:host([disable-buttons]) cc-button{cursor:not-allowed}.messages{--cc-gap:0.5rem;--cc-align-items:center;align-items:center;background-color:#f1f5ff;box-shadow:inset 0 6px 6px -6px #a4b1c9;box-sizing:border-box;color:#2e2e2e;font-size:.9rem;font-style:italic;padding:.4rem 1rem}.status-icon{height:1.25rem;min-width:1.25rem}.spacer{flex:1 1 0}cc-zone{font-style:normal;white-space:nowrap}[title]{cursor:help}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-header-app",k);export{k as CcHeaderApp}; | ||
import"../atoms/cc-button.js";import"../atoms/cc-flex-gap.js";import"../molecules/cc-error.js";import"../zones/cc-zone.js";import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as a}from"lit-html/directives/class-map.js";import{ifDefined as i}from"lit-html/directives/if-defined.js";import{dispatchCustomEvent as r}from"../lib/events.js";import{i18n as n}from"../lib/i18n.js";import{skeletonStyles as c}from"../styles/skeleton.js";import{waitingStyles as o}from"../styles/waiting.js";import{ccLink as l,linkStyles as m}from"../templates/cc-link.js";const p=new URL(new URL("../assets/git.svg",import.meta.url).href,import.meta.url).href,d=new URL(new URL("../assets/restart-failed.svg",import.meta.url).href,import.meta.url).href,g=new URL(new URL("../assets/restarting-with-downtime.svg",import.meta.url).href,import.meta.url).href,u=new URL(new URL("../assets/restarting.svg",import.meta.url).href,import.meta.url).href,h=new URL(new URL("../assets/running.svg",import.meta.url).href,import.meta.url).href,f=new URL(new URL("../assets/start-failed.svg",import.meta.url).href,import.meta.url).href,b=new URL(new URL("../assets/starting.svg",import.meta.url).href,import.meta.url).href,$=new URL(new URL("../assets/stopped.svg",import.meta.url).href,import.meta.url).href,w=new URL(new URL("../assets/unknown.svg",import.meta.url).href,import.meta.url).href,_={git:p,running:h,starting:b},U={"restart-failed":d,restarting:u,"restarting-with-downtime":g,running:h,"start-failed":f,starting:b,stopped:$},v={name:"??????????????????????????",commit:"????????????????????????????????????????"};class k extends t{static get properties(){return{app:{type:Object},disableButtons:{type:Boolean,attribute:"disable-buttons",reflect:!0},error:{type:Boolean,reflect:!0},runningCommit:{type:String,attribute:"running-commit"},startingCommit:{type:String,attribute:"starting-commit"},status:{type:String},zone:{type:Object},_lastUserAction:{type:String,attribute:!1}}}constructor(){super(),this.disableButtons=!1,this.error=!1}_getCommitTitle(t,e){if(null!=e)return"git"===t?n("cc-header-app.commits.git",{commit:e}):"running"===t?n("cc-header-app.commits.running",{commit:e}):"starting"===t?n("cc-header-app.commits.starting",{commit:e}):void 0}_getStatusMsg(t){return"restart-failed"===t?n("cc-header-app.state-msg.app-is-running")+" "+n("cc-header-app.state-msg.last-deploy-failed"):"restarting"===t||"restarting-with-downtime"===t?n("cc-header-app.state-msg.app-is-restarting"):"running"===t?n("cc-header-app.state-msg.app-is-running"):"start-failed"===t?n("cc-header-app.state-msg.app-is-stopped")+" "+n("cc-header-app.state-msg.last-deploy-failed"):n("starting"===t?"cc-header-app.state-msg.app-is-starting":"stopped"===t?"cc-header-app.state-msg.app-is-stopped":"cc-header-app.state-msg.unknown-state")}_getLastUserActionMsg(){return"start"===this._lastUserAction?n("cc-header-app.user-action-msg.app-will-start"):"restart"===this._lastUserAction?n("cc-header-app.user-action-msg.deploy-will-begin"):"cancel"===this._lastUserAction?n("cc-header-app.user-action-msg.deploy-cancelled"):"stop"===this._lastUserAction?n("cc-header-app.user-action-msg.app-will-stop"):void 0}_onStart(t){this._lastUserAction="start",r(this,"start",t)}_onRestart(t){this._lastUserAction="restart",r(this,"restart",t)}_onCancel(){this._lastUserAction="cancel",r(this,"cancel")}_onStop(){this._lastUserAction="stop",r(this,"stop")}_renderCommit(t,s,r){return null==t&&"git"!==s?"":e`<span class="${a({"cc-waiting":"starting"===s})} commit" title=${i(r?void 0:this._getCommitTitle(s,t))} data-type=${s}><img class=commit_img src=${_[s]} alt=""> ${null!=t?e`<span class=${a({skeleton:r})}>${t.slice(0,8)}<span class=commit_rest>${t.slice(8)}</span></span>`:""} ${null==t?e`<span>${n("cc-header-app.commits.no-commits")}</span>`:""}</span>`}update(t){t.has("status")&&(this._lastUserAction=t.get("status")!==this.status?null:this._lastUserAction),super.update(t)}render(){if(this.error)return e`<cc-error>${n("cc-header-app.error")}</cc-error>`;const t=null==this.app,{name:s,commit:r,variantName:c,variantLogo:o,lastDeploymentLogsUrl:m}=t?v:this.app,p=null==this.status,d=p?"unknown":this.status,g=["restarting","restarting-with-downtime","starting"].includes(d),u=["restart-failed","restarting","running"].includes(d),h=null!=this._lastUserAction||this.disableButtons,f=["start-failed","stopped","unknown"].includes(d),b=["start-failed","stopped"].includes(d),$=p||["restart-failed","running","unknown"].includes(d),_="start"!==this._lastUserAction&&"stop"!==this._lastUserAction,k=["restart-failed","restarting","restarting-with-downtime","starting","start-failed"].includes(d),y=this.disableButtons?n("cc-header-app.disable-buttons"):void 0;return e`<cc-flex-gap class=main><div class="${a({skeleton:t})} flavor-logo" title=${i(c)}><img class=flavor-logo_img src=${i(o)} alt=""></div><div class=details><div class=name><span class=${a({skeleton:t})}>${s}</span></div><cc-flex-gap class=commits>${this._renderCommit(r,"git",t)} ${u?this._renderCommit(this.runningCommit,"running",t):""} ${g?this._renderCommit(this.startingCommit,"starting",t):""}</cc-flex-gap></div><cc-flex-gap class=buttons>${b?e`<cc-button title=${i(y)} ?disabled=${h} @cc-button:click=${()=>this._onStart("normal")}>${n("cc-header-app.action.start")}</cc-button><cc-button title=${i(y)} ?disabled=${h} @cc-button:click=${()=>this._onStart("rebuild")}>${n("cc-header-app.action.start-rebuild")}</cc-button><cc-button title=${i(y)} ?disabled=${h} @cc-button:click=${()=>this._onStart("last-commit")}>${n("cc-header-app.action.start-last-commit")}</cc-button>`:""} ${$?e`<cc-button title=${i(y)} ?skeleton=${p} ?disabled=${h} @cc-button:click=${()=>this._onRestart("normal")}>${n("cc-header-app.action.restart")}</cc-button><cc-button title=${i(y)} ?skeleton=${p} ?disabled=${h} @cc-button:click=${()=>this._onRestart("rebuild")}>${n("cc-header-app.action.restart-rebuild")}</cc-button><cc-button title=${i(y)} ?skeleton=${p} ?disabled=${h} @cc-button:click=${()=>this._onRestart("last-commit")}>${n("cc-header-app.action.restart-last-commit")}</cc-button>`:""} ${g?e`<cc-button warning outlined title=${i(y)} ?disabled=${h} @cc-button:click=${this._onCancel}>${n("cc-header-app.action.cancel-deployment")}</cc-button>`:""}<cc-button danger outlined delay=3 title=${i(y)} ?skeleton=${p} ?disabled=${h||f} @cc-button:click=${this._onStop}>${n("cc-header-app.action.stop")}</cc-button></cc-flex-gap></cc-flex-gap><cc-flex-gap class="${a({"cc-waiting":g})} messages">${_?e`<img class=status-icon src=${U[d]||w} alt=""> <span class=${a({skeleton:p})}>${this._getStatusMsg(d)} </span>${k?l(m,n("cc-header-app.read-logs")):""}`:""} ${null!=this._lastUserAction?e`${this._getLastUserActionMsg()}`:""} ${null!=this.zone?e`<span class=spacer></span><cc-zone .zone=${this.zone} mode=small-infra></cc-zone>`:""}</cc-flex-gap>`}static get styles(){return[c,m,o,s`:host{--cc-gap:1rem;background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:block}cc-error{padding:var(--cc-gap);text-align:center}.main{padding:var(--cc-gap)}.flavor-logo{align-self:flex-start;border-radius:.25rem;height:3.25rem;overflow:hidden;width:3.25rem}.flavor-logo_img{display:block;height:100%;width:100%}.skeleton .flavor-logo_img{opacity:0}.details{display:flex;flex:1 1 0;flex-direction:column;justify-content:space-between}.name{font-size:1.1rem;font-weight:700;min-width:12rem}.commit{align-items:flex-start;display:flex}.commit[data-type=git]{color:#5d5d5d}.commit[data-type=running]{color:#2faa60}.commit[data-type=starting]{color:#2b96fd}.commit_img{height:1.1rem;margin-right:.2rem;overflow:hidden;width:1.1rem}.commit_rest{font-size:0}.buttons{align-self:center}cc-button{flex:1 1 auto;min-width:0}:host([disable-buttons]) cc-button{cursor:not-allowed}.messages{--cc-gap:0.5rem;--cc-align-items:center;align-items:center;background-color:#f1f5ff;box-shadow:inset 0 6px 6px -6px #a4b1c9;box-sizing:border-box;color:#2e2e2e;font-size:.9rem;font-style:italic;padding:.4rem 1rem}.status-icon{height:1.25rem;min-width:1.25rem}.spacer{flex:1 1 0}cc-zone{font-style:normal;white-space:nowrap}[title]{cursor:help}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-header-app",k);export{k as CcHeaderApp}; | ||
//# sourceMappingURL=cc-header-app.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as r,css as t}from"lit-element";import{classMap as o}from"lit-html/directives/class-map.js";import{ifDefined as i}from"lit-html/directives/if-defined.js";import{i18n as s}from"../lib/i18n.js";import{skeletonStyles as a}from"../styles/skeleton.js";import"../atoms/cc-img.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";const l=new URL(new URL("../assets/badge-white.svg",import.meta.url).href,import.meta.url).href,n=new URL(new URL("../assets/phone.svg",import.meta.url).href,import.meta.url).href,c={name:"??????????????????????????"};class m extends e{static get properties(){return{error:{type:Boolean,reflect:!0},orga:{type:Object}}}constructor(){super(),this.error=!1}render(){const e=null==this.orga,t=e?c:this.orga,a=e?"":this.orga.name.split(" ").slice(0,2).map((e=>e[0].toUpperCase())).join("");return r`<cc-flex-gap class="${o({enterprise:t.cleverEnterprise})} wrapper">${this.error?r`<cc-error>${s("cc-header-orga.error")}</cc-error>`:""} ${this.error?"":r`<cc-img class=logo ?skeleton=${e} src=${i(t.avatar)} text=${a}></cc-img><div class=details><div class="${o({skeleton:e})} name">${t.name}</div>${t.cleverEnterprise?r`<div class=spacer></div><div class=badge><img class=badge_img src=${l} alt=""> Clever Cloud Enterprise</div>`:""}</div><div class=spacer></div>${null!=t.emergencyNumber?r`<div class=hotline><div class=hotline_label>${s("cc-header-orga.hotline")}</div><a class=hotline_number href=tel:${t.emergencyNumber}><img class=hotline_number_img src=${n} alt=""> ${t.emergencyNumber}</a></div>`:""}`}</cc-flex-gap>`}static get styles(){return[a,t`:host{--cc-gap:1rem;display:block}.wrapper{background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:block;overflow:hidden;padding:var(--cc-gap)}.wrapper.enterprise{border-color:#1ea2f1;border-width:2px}.logo{border-radius:.25rem;height:3.25rem;width:3.25rem}.details,.hotline{align-items:flex-start;display:flex;flex-direction:column}.details{justify-content:center}.hotline{justify-content:space-between}.name{font-size:1.1rem;font-weight:700;min-width:12rem}.badge,.hotline_number{align-items:center;border-radius:.15rem;display:flex;font-size:.8rem;font-weight:700;padding:.2rem .4rem}.badge{background:#1ea2f1;color:#fff}.hotline_number{border:1px solid #1ea2f1;color:#1ea2f1;cursor:pointer}.badge_img,.hotline_number_img{height:.9rem;margin-right:.4rem;overflow:hidden;width:.9rem}.hotline_number:focus{box-shadow:0 0 0 .2em rgba(50,115,220,.25);outline:0}.hotline_number:hover{box-shadow:0 1px 3px #888}.hotline_number:active{box-shadow:none;outline:0}.hotline_number::-moz-focus-inner{border:0}.spacer{flex:1 1 0}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-header-orga",m);export{m as CcHeaderOrga}; | ||
import"../atoms/cc-img.js";import"../atoms/cc-flex-gap.js";import"../molecules/cc-error.js";import{LitElement as e,html as r,css as t}from"lit-element";import{classMap as o}from"lit-html/directives/class-map.js";import{ifDefined as i}from"lit-html/directives/if-defined.js";import{i18n as s}from"../lib/i18n.js";import{skeletonStyles as a}from"../styles/skeleton.js";const l=new URL(new URL("../assets/badge-white.svg",import.meta.url).href,import.meta.url).href,n=new URL(new URL("../assets/phone.svg",import.meta.url).href,import.meta.url).href,c={name:"??????????????????????????"};class m extends e{static get properties(){return{error:{type:Boolean,reflect:!0},orga:{type:Object}}}constructor(){super(),this.error=!1}render(){const e=null==this.orga,t=e?c:this.orga,a=e?"":this.orga.name.split(" ").slice(0,2).map((e=>e[0].toUpperCase())).join("");return r`<cc-flex-gap class="${o({enterprise:t.cleverEnterprise})} wrapper">${this.error?r`<cc-error>${s("cc-header-orga.error")}</cc-error>`:""} ${this.error?"":r`<cc-img class=logo ?skeleton=${e} src=${i(t.avatar)} text=${a}></cc-img><div class=details><div class="${o({skeleton:e})} name">${t.name}</div>${t.cleverEnterprise?r`<div class=spacer></div><div class=badge><img class=badge_img src=${l} alt=""> Clever Cloud Enterprise</div>`:""}</div><div class=spacer></div>${null!=t.emergencyNumber?r`<div class=hotline><div class=hotline_label>${s("cc-header-orga.hotline")}</div><a class=hotline_number href=tel:${t.emergencyNumber}><img class=hotline_number_img src=${n} alt=""> ${t.emergencyNumber}</a></div>`:""}`}</cc-flex-gap>`}static get styles(){return[a,t`:host{--cc-gap:1rem;display:block}.wrapper{background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;display:block;overflow:hidden;padding:var(--cc-gap)}.wrapper.enterprise{border-color:#1ea2f1;border-width:2px}.logo{border-radius:.25rem;height:3.25rem;width:3.25rem}.details,.hotline{align-items:flex-start;display:flex;flex-direction:column}.details{justify-content:center}.hotline{justify-content:space-between}.name{font-size:1.1rem;font-weight:700;min-width:12rem}.badge,.hotline_number{align-items:center;border-radius:.15rem;display:flex;font-size:.8rem;font-weight:700;padding:.2rem .4rem}.badge{background:#1ea2f1;color:#fff}.hotline_number{border:1px solid #1ea2f1;color:#1ea2f1;cursor:pointer}.badge_img,.hotline_number_img{height:.9rem;margin-right:.4rem;overflow:hidden;width:.9rem}.hotline_number:focus{box-shadow:0 0 0 .2em rgba(50,115,220,.25);outline:0}.hotline_number:hover{box-shadow:0 1px 3px #888}.hotline_number:active{box-shadow:none;outline:0}.hotline_number::-moz-focus-inner{border:0}.spacer{flex:1 1 0}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-header-orga",m);export{m as CcHeaderOrga}; | ||
//# sourceMappingURL=cc-header-orga.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as s,html as t,css as e}from"lit-element";import{classMap as o}from"lit-html/directives/class-map.js";import{i18n as r}from"../lib/i18n.js";import{skeletonStyles as n}from"../styles/skeleton.js";import"../molecules/cc-error.js";import{tileStyles as i}from"../styles/info-tiles.js";const c={yesterday:.7,last30Days:14.6};class l extends s{static get properties(){return{consumption:{type:Object},error:{type:Boolean,reflect:!0}}}constructor(){super(),this.error=!1}render(){const s=null==this.consumption,{yesterday:e,last30Days:n}=s?c:this.consumption;return t`<div class=tile_title>${r("cc-tile-consumption.title")}</div>${this.error?"":t`<div class=tile_body><div class=line><span>${r("cc-tile-consumption.yesterday")}</span> <span class=separator></span> <span class="${o({skeleton:s})} value">${r("cc-tile-consumption.amount",{amount:e})}</span></div><div class=line><span>${r("cc-tile-consumption.last-30-days")}</span> <span class=separator></span> <span class="${o({skeleton:s})} value">${r("cc-tile-consumption.amount",{amount:n})}</span></div></div>`} ${this.error?t`<cc-error class=tile_message>${r("cc-tile-consumption.error")}</cc-error>`:""}`}static get styles(){return[i,n,e`.line{align-items:center;display:flex;padding:.5rem 0;width:100%}.separator{border-top:1px dotted #8c8c8c;flex:1 1 0;margin:0 10px}.value{font-weight:700}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-tile-consumption",l);export{l as CcTileConsumption}; | ||
import"../molecules/cc-error.js";import{LitElement as s,html as t,css as e}from"lit-element";import{classMap as o}from"lit-html/directives/class-map.js";import{i18n as r}from"../lib/i18n.js";import{tileStyles as n}from"../styles/info-tiles.js";import{skeletonStyles as i}from"../styles/skeleton.js";const c={yesterday:.7,last30Days:14.6};class l extends s{static get properties(){return{consumption:{type:Object},error:{type:Boolean,reflect:!0}}}constructor(){super(),this.error=!1}render(){const s=null==this.consumption,{yesterday:e,last30Days:n}=s?c:this.consumption;return t`<div class=tile_title>${r("cc-tile-consumption.title")}</div>${this.error?"":t`<div class=tile_body><div class=line><span>${r("cc-tile-consumption.yesterday")}</span> <span class=separator></span> <span class="${o({skeleton:s})} value">${r("cc-tile-consumption.amount",{amount:e})}</span></div><div class=line><span>${r("cc-tile-consumption.last-30-days")}</span> <span class=separator></span> <span class="${o({skeleton:s})} value">${r("cc-tile-consumption.amount",{amount:n})}</span></div></div>`} ${this.error?t`<cc-error class=tile_message>${r("cc-tile-consumption.error")}</cc-error>`:""}`}static get styles(){return[n,i,e`.line{align-items:center;display:flex;padding:.5rem 0;width:100%}.separator{border-top:1px dotted #8c8c8c;flex:1 1 0;margin:0 10px}.value{font-weight:700}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-tile-consumption",l);export{l as CcTileConsumption}; | ||
//# sourceMappingURL=cc-tile-consumption.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as l}from"lit-html/directives/class-map.js";import{i18n as a}from"../lib/i18n.js";import{skeletonStyles as r}from"../styles/skeleton.js";import{ccLink as o,linkStyles as i}from"../templates/cc-link.js";import"../molecules/cc-error.js";import"../atoms/cc-datetime-relative.js";import{tileStyles as c}from"../styles/info-tiles.js";const d=[{state:"???????",date:"??????????"},{state:"??????",date:"???????????"}];class n extends t{static get properties(){return{deployments:{type:Array},error:{type:Boolean,reflect:!0}}}constructor(){super(),this.error=!1}_getStateLabel(t,e){return"OK"===t?a("UNDEPLOY"===e?"cc-tile-deployments.state.stopped":"cc-tile-deployments.state.started"):"FAIL"===t?a("cc-tile-deployments.state.failed"):"CANCELLED"===t?a("cc-tile-deployments.state.cancelled"):t}render(){const t=null==this.deployments,s=t?d:this.deployments,r=!this.error&&s.length>0,i=!this.error&&0===s.length;return e`<div class=tile_title>${a("cc-tile-deployments.title")}</div>${r?e`<div class=tile_body>${s.map((s=>e`<div class=state data-state=${s.state}><span class=${l({skeleton:t})}>${this._getStateLabel(s.state,s.action)}</span></div><div class=date>${t?e`<span class=skeleton>${s.date}</span>`:""} ${t?"":e`<cc-datetime-relative datetime=${s.date}></cc-datetime-relative>`}</div><div>${o(s.logsUrl,"logs",t)}</div>`))}</div>`:""} ${i?e`<div class=tile_message>${a("cc-tile-deployments.empty")}</div>`:""} ${this.error?e`<cc-error class=tile_message>${a("cc-tile-deployments.error")}</cc-error>`:""}`}static get styles(){return[c,r,i,s`.tile_body{align-items:start;grid-gap:1rem;grid-template-columns:auto auto auto;justify-content:space-between}.state{color:#fff;font-weight:700}.state[data-state=CANCELLED]{color:#b06d0f}.state[data-state=FAIL]{color:#cc0028}.state[data-state=OK]{color:#2faa60}[title]{cursor:help}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-tile-deployments",n);export{n as CcTileDeployments}; | ||
import"../atoms/cc-datetime-relative.js";import"../molecules/cc-error.js";import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as l}from"lit-html/directives/class-map.js";import{i18n as a}from"../lib/i18n.js";import{tileStyles as r}from"../styles/info-tiles.js";import{skeletonStyles as o}from"../styles/skeleton.js";import{ccLink as i,linkStyles as c}from"../templates/cc-link.js";const d=[{state:"???????",date:"??????????"},{state:"??????",date:"???????????"}];class n extends t{static get properties(){return{deployments:{type:Array},error:{type:Boolean,reflect:!0}}}constructor(){super(),this.error=!1}_getStateLabel(t,e){return"OK"===t?a("UNDEPLOY"===e?"cc-tile-deployments.state.stopped":"cc-tile-deployments.state.started"):"FAIL"===t?a("cc-tile-deployments.state.failed"):"CANCELLED"===t?a("cc-tile-deployments.state.cancelled"):t}render(){const t=null==this.deployments,s=t?d:this.deployments,r=!this.error&&s.length>0,o=!this.error&&0===s.length;return e`<div class=tile_title>${a("cc-tile-deployments.title")}</div>${r?e`<div class=tile_body>${s.map((s=>e`<div class=state data-state=${s.state}><span class=${l({skeleton:t})}>${this._getStateLabel(s.state,s.action)}</span></div><div class=date>${t?e`<span class=skeleton>${s.date}</span>`:""} ${t?"":e`<cc-datetime-relative datetime=${s.date}></cc-datetime-relative>`}</div><div>${i(s.logsUrl,"logs",t)}</div>`))}</div>`:""} ${o?e`<div class=tile_message>${a("cc-tile-deployments.empty")}</div>`:""} ${this.error?e`<cc-error class=tile_message>${a("cc-tile-deployments.error")}</cc-error>`:""}`}static get styles(){return[r,o,c,s`.tile_body{align-items:start;grid-gap:1rem;grid-template-columns:auto auto auto;justify-content:space-between}.state{color:#fff;font-weight:700}.state[data-state=CANCELLED]{color:#b06d0f}.state[data-state=FAIL]{color:#cc0028}.state[data-state=OK]{color:#2faa60}[title]{cursor:help}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-tile-deployments",n);export{n as CcTileDeployments}; | ||
//# sourceMappingURL=cc-tile-deployments.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as n}from"lit-html/directives/class-map.js";import{i18n as i}from"../lib/i18n.js";import"../atoms/cc-loader.js";import"../atoms/cc-expand.js";import"../molecules/cc-error.js";import{waitingStyles as r}from"../styles/waiting.js";import{tileStyles as a,instanceDetailsStyles as o}from"../styles/info-tiles.js";import{animate as c,QUICK_SHRINK as l}from"../lib/animate.js";const u={running:new URL(new URL("../assets/running.svg",import.meta.url).href,import.meta.url).href,deploying:new URL(new URL("../assets/starting.svg",import.meta.url).href,import.meta.url).href},p={running:[],deploying:[]};class d extends t{static get properties(){return{error:{type:Boolean,reflect:!0},instances:{type:Object}}}constructor(){super(),this.error=!1}_getStatusLabel(t){return"running"===t?i("cc-tile-instances.status.running"):"deploying"===t?i("cc-tile-instances.status.deploying"):void 0}_renderInstances(t,s){return t.length?e`<div class="${n({"cc-waiting":"deploying"===s})} instances" data-type=${s}><img class=instances_status-img src=${u[s]} alt=""> <span class=instances_status>${this._getStatusLabel(s)}</span> ${t.map((({flavorName:t,count:s})=>e`<span class=size-label>${t}<span class=count-bubble>${s}</span></span>`))}</div>`:""}render(){const t=null==this.instances,s=t&&!this.error,n=t?p:this.instances,r=n.running.map((t=>t.count)).reduce(((t,e)=>t+e),0),a=n.deploying.map((t=>t.count)).reduce(((t,e)=>t+e),0),o=!t&&!this.error&&0===r&&0===a;return this._lastRunningCount!==r&&this.updateComplete.then((()=>{c(this.shadowRoot,".instances[data-type=running] .count-bubble",...l),this._lastRunningCount=r})),this._lastDeployingCount!==a&&this.updateComplete.then((()=>{c(this.shadowRoot,".instances[data-type=deploying] .count-bubble",...l),this._lastDeployingCount=a})),e`<div class=tile_title>${i("cc-tile-instances.title")}</div>${this.error||o?"":e`<div class=tile_body><cc-expand>${this._renderInstances(n.running,"running")} ${this._renderInstances(n.deploying,"deploying")}</cc-expand>${s?e`<cc-loader></cc-loader>`:""}</div>`} ${o?e`<div class=tile_message>${i("cc-tile-instances.empty")}</div>`:""} ${this.error?e`<cc-error class=tile_message>${i("cc-tile-instances.error")}</cc-error>`:""}`}static get styles(){return[a,o,r,s`cc-expand{width:100%}.instances{align-items:center;display:flex;width:100%}.instances[data-type=running]{--status-color:#2faa60}.instances[data-type=deploying]{--status-color:#2b96fd}.instances_status-img{height:1.75rem;width:1.75rem}.instances_status{color:var(--status-color);flex:1 1 0;font-size:1.2rem;margin-left:.25rem}.size-label{margin:var(--bubble-r);position:relative}.count-bubble{background-color:var(--status-color);bottom:calc(var(--bubble-d)/ -2);position:absolute;right:calc(var(--bubble-d)/ -2)}`]}}window.customElements.define("cc-tile-instances",d);export{d as CcTileInstances}; | ||
import"../atoms/cc-expand.js";import"../atoms/cc-loader.js";import"../molecules/cc-error.js";import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as n}from"lit-html/directives/class-map.js";import{animate as i,QUICK_SHRINK as r}from"../lib/animate.js";import{i18n as a}from"../lib/i18n.js";import{tileStyles as o,instanceDetailsStyles as c}from"../styles/info-tiles.js";import{waitingStyles as l}from"../styles/waiting.js";const u={running:new URL(new URL("../assets/running.svg",import.meta.url).href,import.meta.url).href,deploying:new URL(new URL("../assets/starting.svg",import.meta.url).href,import.meta.url).href},p={running:[],deploying:[]};class d extends t{static get properties(){return{error:{type:Boolean,reflect:!0},instances:{type:Object}}}constructor(){super(),this.error=!1}_getStatusLabel(t){return"running"===t?a("cc-tile-instances.status.running"):"deploying"===t?a("cc-tile-instances.status.deploying"):void 0}_renderInstances(t,s){return t.length?e`<div class="${n({"cc-waiting":"deploying"===s})} instances" data-type=${s}><img class=instances_status-img src=${u[s]} alt=""> <span class=instances_status>${this._getStatusLabel(s)}</span> ${t.map((({flavorName:t,count:s})=>e`<span class=size-label>${t}<span class=count-bubble>${s}</span></span>`))}</div>`:""}render(){const t=null==this.instances,s=t&&!this.error,n=t?p:this.instances,o=n.running.map((t=>t.count)).reduce(((t,e)=>t+e),0),c=n.deploying.map((t=>t.count)).reduce(((t,e)=>t+e),0),l=!t&&!this.error&&0===o&&0===c;return this._lastRunningCount!==o&&this.updateComplete.then((()=>{i(this.shadowRoot,".instances[data-type=running] .count-bubble",...r),this._lastRunningCount=o})),this._lastDeployingCount!==c&&this.updateComplete.then((()=>{i(this.shadowRoot,".instances[data-type=deploying] .count-bubble",...r),this._lastDeployingCount=c})),e`<div class=tile_title>${a("cc-tile-instances.title")}</div>${this.error||l?"":e`<div class=tile_body><cc-expand>${this._renderInstances(n.running,"running")} ${this._renderInstances(n.deploying,"deploying")}</cc-expand>${s?e`<cc-loader></cc-loader>`:""}</div>`} ${l?e`<div class=tile_message>${a("cc-tile-instances.empty")}</div>`:""} ${this.error?e`<cc-error class=tile_message>${a("cc-tile-instances.error")}</cc-error>`:""}`}static get styles(){return[o,c,l,s`cc-expand{width:100%}.instances{align-items:center;display:flex;width:100%}.instances[data-type=running]{--status-color:#2faa60}.instances[data-type=deploying]{--status-color:#2b96fd}.instances_status-img{height:1.75rem;width:1.75rem}.instances_status{color:var(--status-color);flex:1 1 0;font-size:1.2rem;margin-left:.25rem}.size-label{margin:var(--bubble-r);position:relative}.count-bubble{background-color:var(--status-color);bottom:calc(var(--bubble-d)/ -2);position:absolute;right:calc(var(--bubble-d)/ -2)}`]}}window.customElements.define("cc-tile-instances",d);export{d as CcTileInstances}; | ||
//# sourceMappingURL=cc-tile-instances.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as i}from"lit-html/directives/class-map.js";import{i18n as r}from"../lib/i18n.js";import{skeletonStyles as o}from"../styles/skeleton.js";import"../atoms/cc-button.js";import"../molecules/cc-error.js";import{withResizeObserver as a}from"../mixins/with-resize-observer.js";import{tileStyles as l}from"../styles/info-tiles.js";import n from"chart.js";import c from"chartjs-plugin-datalabels";const d=new URL(new URL("../assets/close.svg",import.meta.url).href,import.meta.url).href,h=new URL(new URL("../assets/info.svg",import.meta.url).href,import.meta.url).href,u=Array.from(new Array(24)).map((()=>[0,0,1]));class p extends(a(t)){static get properties(){return{data:{type:Object},error:{type:Boolean,reflect:!0},_skeleton:{type:Boolean,attribute:!1},_empty:{type:Boolean,attribute:!1},_docs:{type:Boolean,attribute:!1},_barCount:{type:Number,attribute:!1}}}constructor(){super(),this.error=0,this._barCount=6,this._data=null,this._docs=!1}onResize({width:t}){t<380&&(this._barCount=6),t>=380&&t<540&&(this._barCount=8),t>=540&&(this._barCount=12),this._refreshChart(),this.requestUpdate()}_onToggleDocs(){this._docs=!this._docs}async _refreshChart(){this._skeleton=null==this.data;const t=this._skeleton?u:this.data;if(this._empty=0===t.length,this._empty)return;const e=24/this._barCount;this._groupedData=Array.from(new Array(this._barCount)).map(((s,i)=>{const r=i*e,o=(i+1)*e;return[t[r][0],t[o-1][1],t.slice(r,o).map((t=>t[2])).reduce(((t,e)=>t+e),0)]})),this._groupedValues=this._groupedData.map((([t,e,s])=>s)),this._xLabels=this._skeleton?this._groupedData.map((()=>"??")):this._groupedData.map((([t],e)=>r("cc-tile-requests.date-hours",{date:t})));const s=this._skeleton?"#bbb":"#30ab61";await this.updateComplete;const i=Math.ceil(1.3*Math.max(...this._groupedValues));this._chart.options.scales.yAxes[0].ticks.suggestedMax=i,this._chart.options.tooltips.enabled=!this._skeleton;const o=this._groupedValues.reduce(((t,e)=>t+e),0);this._chart.options.title.text=this._skeleton?"...":r("cc-tile-requests.requests-nb.total",{totalRequests:o}),this._chart.data={labels:this._xLabels,datasets:[{backgroundColor:s,data:this._groupedValues}]},this._chart.options.animation.duration=this._skeleton?0:300,this._chart.update(),this._chart.resize()}firstUpdated(){this._ctx=this.renderRoot.getElementById("chart"),this._chart=new n(this._ctx,{plugins:[c],type:"bar",options:{responsive:!1,maintainAspectRatio:!1,title:{display:!0,position:"bottom",padding:0,fontStyle:"italic"},legend:{display:!1},plugins:{datalabels:{anchor:"end",offset:0,align:"end",formatter:(t,e)=>this._skeleton?"?":r("cc-tile-requests.requests-count",{requestCount:t})}},scales:{xAxes:[{gridLines:{drawOnChartArea:!1,drawTicks:!1},ticks:{padding:10,fontSize:12}}],yAxes:[{display:!1,ticks:{beginAtZero:!0}}]},tooltips:{backgroundColor:"#000",displayColors:!1,callbacks:{title:(t,e)=>{const[s,i]=this._groupedData[t[0].index];return r("cc-tile-requests.date-tooltip",{from:s,to:i})},label:(t,e)=>{const s=24/this._barCount;return r("cc-tile-requests.requests-nb",{value:this._groupedValues[t.index],windowHours:s})}}},animation:{duration:0}}})}updated(t){t.has("data")&&this._refreshChart(),super.updated(t)}render(){const t=!this.error&&!this._empty&&!this._docs,s=this.error&&!this._docs,o=this._empty&&!this._docs,a=this._docs;return e`<div class="tile_title tile_title--image">${r("cc-tile-requests.title")}<cc-button class=docs-toggle image=${a?d:h} hide-text @cc-button:click=${this._onToggleDocs}>${this._docs?r("cc-tile-requests.close-btn"):r("cc-tile-requests.about-btn")}</cc-button></div><div class="${i({"tile--hidden":!t})} tile_body"><div class="${i({skeleton:this._skeleton})} chart-container"><canvas id=chart></canvas></div></div><div class="${i({"tile--hidden":!o})} tile_message">${r("cc-tile-requests.empty")}</div><cc-error class="${i({"tile--hidden":!s})} tile_message">${r("cc-tile-requests.error")}</cc-error><div class="${i({"tile--hidden":!a})} tile_docs"><p>${r("cc-tile-requests.docs.msg",{windowHours:24/this._barCount})}</p></div>`}static get styles(){return[l,o,s`.tile_title{align-items:center;display:flex;justify-content:space-between}.docs-toggle{margin:0 0 0 1rem}.chart-container{height:100%;min-width:0;position:absolute;width:100%}.tile_body,.tile_docs,.tile_message{grid-area:2/1/2/1}.tile--hidden{visibility:hidden}.tile_body{min-height:140px;position:relative}.tile_docs{align-self:center;font-size:.9rem;font-style:italic}.tile_docs_link{color:#2b96fd;text-decoration:underline}`]}}window.customElements.define("cc-tile-requests",p);export{p as CcTileRequests}; | ||
import"../atoms/cc-button.js";import"../molecules/cc-error.js";import t from"chart.js";import e from"chartjs-plugin-datalabels";import{LitElement as s,html as i,css as r}from"lit-element";import{classMap as o}from"lit-html/directives/class-map.js";import{i18n as a}from"../lib/i18n.js";import{withResizeObserver as l}from"../mixins/with-resize-observer.js";import{tileStyles as n}from"../styles/info-tiles.js";import{skeletonStyles as c}from"../styles/skeleton.js";const d=new URL(new URL("../assets/close.svg",import.meta.url).href,import.meta.url).href,h=new URL(new URL("../assets/info.svg",import.meta.url).href,import.meta.url).href,u=Array.from(new Array(24)).map((()=>[0,0,1]));class p extends(l(s)){static get properties(){return{data:{type:Object},error:{type:Boolean,reflect:!0},_skeleton:{type:Boolean,attribute:!1},_empty:{type:Boolean,attribute:!1},_docs:{type:Boolean,attribute:!1},_barCount:{type:Number,attribute:!1}}}constructor(){super(),this.error=0,this._barCount=6,this._data=null,this._docs=!1}onResize({width:t}){t<380&&(this._barCount=6),t>=380&&t<540&&(this._barCount=8),t>=540&&(this._barCount=12),this._refreshChart(),this.requestUpdate()}_onToggleDocs(){this._docs=!this._docs}async _refreshChart(){this._skeleton=null==this.data;const t=this._skeleton?u:this.data;if(this._empty=0===t.length,this._empty)return;const e=24/this._barCount;this._groupedData=Array.from(new Array(this._barCount)).map(((s,i)=>{const r=i*e,o=(i+1)*e;return[t[r][0],t[o-1][1],t.slice(r,o).map((t=>t[2])).reduce(((t,e)=>t+e),0)]})),this._groupedValues=this._groupedData.map((([t,e,s])=>s)),this._xLabels=this._skeleton?this._groupedData.map((()=>"??")):this._groupedData.map((([t],e)=>a("cc-tile-requests.date-hours",{date:t})));const s=this._skeleton?"#bbb":"#30ab61";await this.updateComplete;const i=Math.ceil(1.3*Math.max(...this._groupedValues));this._chart.options.scales.yAxes[0].ticks.suggestedMax=i,this._chart.options.tooltips.enabled=!this._skeleton;const r=this._groupedValues.reduce(((t,e)=>t+e),0);this._chart.options.title.text=this._skeleton?"...":a("cc-tile-requests.requests-nb.total",{totalRequests:r}),this._chart.data={labels:this._xLabels,datasets:[{backgroundColor:s,data:this._groupedValues}]},this._chart.options.animation.duration=this._skeleton?0:300,this._chart.update(),this._chart.resize()}firstUpdated(){this._ctx=this.renderRoot.getElementById("chart"),this._chart=new t(this._ctx,{plugins:[e],type:"bar",options:{responsive:!1,maintainAspectRatio:!1,title:{display:!0,position:"bottom",padding:0,fontStyle:"italic"},legend:{display:!1},plugins:{datalabels:{anchor:"end",offset:0,align:"end",formatter:(t,e)=>this._skeleton?"?":a("cc-tile-requests.requests-count",{requestCount:t})}},scales:{xAxes:[{gridLines:{drawOnChartArea:!1,drawTicks:!1},ticks:{padding:10,fontSize:12}}],yAxes:[{display:!1,ticks:{beginAtZero:!0}}]},tooltips:{backgroundColor:"#000",displayColors:!1,callbacks:{title:(t,e)=>{const[s,i]=this._groupedData[t[0].index];return a("cc-tile-requests.date-tooltip",{from:s,to:i})},label:(t,e)=>{const s=24/this._barCount;return a("cc-tile-requests.requests-nb",{value:this._groupedValues[t.index],windowHours:s})}}},animation:{duration:0}}})}updated(t){t.has("data")&&this._refreshChart(),super.updated(t)}render(){const t=!this.error&&!this._empty&&!this._docs,e=this.error&&!this._docs,s=this._empty&&!this._docs,r=this._docs;return i`<div class="tile_title tile_title--image">${a("cc-tile-requests.title")}<cc-button class=docs-toggle image=${r?d:h} hide-text @cc-button:click=${this._onToggleDocs}>${this._docs?a("cc-tile-requests.close-btn"):a("cc-tile-requests.about-btn")}</cc-button></div><div class="${o({"tile--hidden":!t})} tile_body"><div class="${o({skeleton:this._skeleton})} chart-container"><canvas id=chart></canvas></div></div><div class="${o({"tile--hidden":!s})} tile_message">${a("cc-tile-requests.empty")}</div><cc-error class="${o({"tile--hidden":!e})} tile_message">${a("cc-tile-requests.error")}</cc-error><div class="${o({"tile--hidden":!r})} tile_docs"><p>${a("cc-tile-requests.docs.msg",{windowHours:24/this._barCount})}</p></div>`}static get styles(){return[n,c,r`.tile_title{align-items:center;display:flex;justify-content:space-between}.docs-toggle{margin:0 0 0 1rem}.chart-container{height:100%;min-width:0;position:absolute;width:100%}.tile_body,.tile_docs,.tile_message{grid-area:2/1/2/1}.tile--hidden{visibility:hidden}.tile_body{min-height:140px;position:relative}.tile_docs{align-self:center;font-size:.9rem;font-style:italic}.tile_docs_link{color:#2b96fd;text-decoration:underline}`]}}window.customElements.define("cc-tile-requests",p);export{p as CcTileRequests}; | ||
//# sourceMappingURL=cc-tile-requests.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as i,css as t}from"lit-element";import{classMap as l}from"lit-html/directives/class-map.js";import{ifDefined as s}from"lit-html/directives/if-defined.js";import{i18n as a}from"../lib/i18n.js";import{skeletonStyles as r}from"../styles/skeleton.js";import"../molecules/cc-error.js";import{tileStyles as c,instanceDetailsStyles as o}from"../styles/info-tiles.js";const n={minFlavor:{name:"??"},maxFlavor:{name:"?"},minInstances:0,maxInstances:0};class m extends e{static get properties(){return{error:{type:Boolean,reflect:!0},scalability:{type:Object}}}_getFlavorDetails(e){if(null!=e.cpus)return a("cc-tile-scalability.flavor-info",{...e})}_formatFlavorName(e){return e.replace(/^ML_/,"")}render(){const e=null==this.scalability,{minFlavor:t,maxFlavor:r,minInstances:c,maxInstances:o}=e?n:this.scalability;return i`<div class=tile_title>${a("cc-tile-scalability.title")}</div>${this.error?"":i`<div class=tile_body><div class=label>${a("cc-tile-scalability.size")}</div><div class=info><div class="${l({skeleton:e})} size-label" title=${s(this._getFlavorDetails(t))}>${this._formatFlavorName(t.name)}</div><div class=separator></div><div class="${l({skeleton:e})} size-label" title=${s(this._getFlavorDetails(r))}>${this._formatFlavorName(r.name)}</div></div><div class=label>${a("cc-tile-scalability.number")}</div><div class=info><div class="${l({skeleton:e})} count-bubble">${c}</div><div class=separator></div><div class="${l({skeleton:e})} count-bubble">${o}</div></div></div>`} ${this.error?i`<cc-error class=tile_message>${a("cc-tile-scalability.error")}</cc-error>`:""}`}static get styles(){return[c,o,r,t`.tile_body{align-items:center;grid-column-gap:2rem;grid-row-gap:1rem;grid-template-columns:auto 1fr}.info{align-items:center;display:flex;justify-content:center;width:100%}.separator{border-top:1px dashed #8c8c8c;flex:1 1 0;width:1.5rem}[title]{cursor:help}`]}}window.customElements.define("cc-tile-scalability",m);export{m as CcTileScalability}; | ||
import"../molecules/cc-error.js";import{LitElement as e,html as i,css as t}from"lit-element";import{classMap as l}from"lit-html/directives/class-map.js";import{ifDefined as s}from"lit-html/directives/if-defined.js";import{i18n as a}from"../lib/i18n.js";import{tileStyles as r,instanceDetailsStyles as c}from"../styles/info-tiles.js";import{skeletonStyles as o}from"../styles/skeleton.js";const n={minFlavor:{name:"??"},maxFlavor:{name:"?"},minInstances:0,maxInstances:0};class m extends e{static get properties(){return{error:{type:Boolean,reflect:!0},scalability:{type:Object}}}_getFlavorDetails(e){if(null!=e.cpus)return a("cc-tile-scalability.flavor-info",{...e})}_formatFlavorName(e){return e.replace(/^ML_/,"")}render(){const e=null==this.scalability,{minFlavor:t,maxFlavor:r,minInstances:c,maxInstances:o}=e?n:this.scalability;return i`<div class=tile_title>${a("cc-tile-scalability.title")}</div>${this.error?"":i`<div class=tile_body><div class=label>${a("cc-tile-scalability.size")}</div><div class=info><div class="${l({skeleton:e})} size-label" title=${s(this._getFlavorDetails(t))}>${this._formatFlavorName(t.name)}</div><div class=separator></div><div class="${l({skeleton:e})} size-label" title=${s(this._getFlavorDetails(r))}>${this._formatFlavorName(r.name)}</div></div><div class=label>${a("cc-tile-scalability.number")}</div><div class=info><div class="${l({skeleton:e})} count-bubble">${c}</div><div class=separator></div><div class="${l({skeleton:e})} count-bubble">${o}</div></div></div>`} ${this.error?i`<cc-error class=tile_message>${a("cc-tile-scalability.error")}</cc-error>`:""}`}static get styles(){return[r,c,o,t`.tile_body{align-items:center;grid-column-gap:2rem;grid-row-gap:1rem;grid-template-columns:auto 1fr}.info{align-items:center;display:flex;justify-content:center;width:100%}.separator{border-top:1px dashed #8c8c8c;flex:1 1 0;width:1.5rem}[title]{cursor:help}`]}}window.customElements.define("cc-tile-scalability",m);export{m as CcTileScalability}; | ||
//# sourceMappingURL=cc-tile-scalability.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as i}from"lit-html/directives/class-map.js";import{i18n as o}from"../lib/i18n.js";import{skeletonStyles as a}from"../styles/skeleton.js";import{linkStyles as l}from"../templates/cc-link.js";import"../atoms/cc-button.js";import"../molecules/cc-error.js";import{tileStyles as c}from"../styles/info-tiles.js";import r from"chart.js";import{cache as n}from"lit-html/directives/cache.js";import d from"statuses";const h=new URL(new URL("../assets/close.svg",import.meta.url).href,import.meta.url).href,u=new URL(new URL("../assets/info.svg",import.meta.url).href,import.meta.url).href;const m={1:"#bbb",2:"#30ab61",3:"#365bd3",4:"#ff9f40",5:"#cf3942"},p={200:1};class _ extends t{static get properties(){return{error:{type:Boolean,reflect:!0},statusCodes:{type:Object,attribute:"status-codes"},_skeleton:{type:Boolean,attribute:!1},_empty:{type:Boolean,attribute:!1},_docs:{type:Boolean,attribute:!1}}}constructor(){super(),this.error=null,this.statusCodes=null,this._docs=!1}_onToggleDocs(){this._docs=!this._docs}firstUpdated(){this._ctx=this.renderRoot.getElementById("chart"),this._chart=new r(this._ctx,{type:"doughnut",options:{responsive:!0,maintainAspectRatio:!1,legend:{onClick:function(t,e){const s=this.chart.getDatasetMeta(0);this.chart.data.labels.forEach(((i,o)=>{const a=i===e.text;var l,c;l=t.shiftKey,c=a,Number(l)^Number(c)&&(s.data[o].hidden=!s.data[o].hidden)})),this.chart.update()},onHover:t=>{this._ctx.style.cursor="pointer"},onLeave:t=>{this._ctx.style.cursor=null},position:"right",labels:{fontFamily:"monospace",usePointStyle:!0,filter:(t,e)=>t.text!==e.labels[t.index-1]}},plugins:{datalabels:{display:!1}},tooltips:{backgroundColor:"#000",displayColors:!1,callbacks:{title:(t,e)=>{const s=this._labels[t[0].index];return`HTTP ${s}: ${d.message[s]}`},label:(t,e)=>{const s=e.datasets[t.datasetIndex].data,i=s.reduce(((t,e)=>t+e),0),a=s[t.index];return o("cc-tile-status-codes.tooltip",{value:a,percent:a/i})}}},animation:{duration:0}}})}updated(t){if(t.has("statusCodes")){this._skeleton=null==this.statusCodes;const t=this._skeleton?p:this.statusCodes;this._empty=0===Object.keys(t).length,this._labels=Object.keys(t),this._chartLabels=this._skeleton?this._labels.map((()=>"???")):this._labels.map((t=>t[0]+"xx")),this._data=Object.values(t),this._backgroundColor=this._skeleton?this._labels.map((()=>"#bbb")):this._labels.map((t=>m[t[0]])),this.updateComplete.then((()=>{this._chart.options.animation.duration=this._skeleton?0:300,this._chart.options.tooltips.enabled=!this._skeleton,this._chart.data={labels:this._chartLabels,datasets:[{data:this._data,backgroundColor:this._backgroundColor}]},this._chart.update()}))}super.updated(t)}render(){const t=!this.error&&!this._empty&&!this._docs,s=this.error&&!this._docs,a=this._empty&&!this._docs,l=this._docs;return e`<div class="tile_title tile_title--image">${o("cc-tile-status-codes.title")}<cc-button class=docs-toggle image=${l?h:u} hide-text @cc-button:click=${this._onToggleDocs}>${this._docs?o("cc-tile-status-codes.close-btn"):o("cc-tile-status-codes.about-btn")}</cc-button></div>${n(t?e`<div class=tile_body><div class="${i({skeleton:this._skeleton})} chart-container"><canvas id=chart></canvas></div></div>`:"")} ${a?e`<div class=tile_message>${o("cc-tile-status-codes.empty")}</div>`:""} ${s?e`<cc-error class=tile_message>${o("cc-tile-status-codes.error")}</cc-error>`:""}<div class="${i({"tile_docs--hidden":!l})} tile_docs"><p>${o("cc-tile-status-codes.docs.msg")}</p><p>${o("cc-tile-status-codes.docs.link")}</p></div>`}static get styles(){return[c,a,l,s`.tile_title{align-items:center;display:flex;justify-content:space-between}.docs-toggle{margin:0 0 0 1rem}.tile_body{position:relative}.chart-container{height:100%;min-width:0;position:absolute;width:100%}.tile_body,.tile_docs,.tile_message{grid-area:2/1/2/1}.tile_docs{align-self:center;font-size:.9rem;font-style:italic}.tile_docs.tile_docs--hidden{visibility:hidden}.tile_docs_link{color:#2b96fd;text-decoration:underline}`]}}window.customElements.define("cc-tile-status-codes",_);export{_ as CcTileStatusCodes}; | ||
import"../atoms/cc-button.js";import"../molecules/cc-error.js";import t from"chart.js";import{LitElement as e,html as s,css as i}from"lit-element";import{cache as o}from"lit-html/directives/cache.js";import{classMap as a}from"lit-html/directives/class-map.js";import l from"statuses";import{i18n as c}from"../lib/i18n.js";import{tileStyles as r}from"../styles/info-tiles.js";import{skeletonStyles as n}from"../styles/skeleton.js";import{linkStyles as d}from"../templates/cc-link.js";const h=new URL(new URL("../assets/close.svg",import.meta.url).href,import.meta.url).href,u=new URL(new URL("../assets/info.svg",import.meta.url).href,import.meta.url).href;const m={1:"#bbb",2:"#30ab61",3:"#365bd3",4:"#ff9f40",5:"#cf3942"},p={200:1};class _ extends e{static get properties(){return{error:{type:Boolean,reflect:!0},statusCodes:{type:Object,attribute:"status-codes"},_skeleton:{type:Boolean,attribute:!1},_empty:{type:Boolean,attribute:!1},_docs:{type:Boolean,attribute:!1}}}constructor(){super(),this.error=null,this.statusCodes=null,this._docs=!1}_onToggleDocs(){this._docs=!this._docs}firstUpdated(){this._ctx=this.renderRoot.getElementById("chart"),this._chart=new t(this._ctx,{type:"doughnut",options:{responsive:!0,maintainAspectRatio:!1,legend:{onClick:function(t,e){const s=this.chart.getDatasetMeta(0);this.chart.data.labels.forEach(((i,o)=>{const a=i===e.text;var l,c;l=t.shiftKey,c=a,Number(l)^Number(c)&&(s.data[o].hidden=!s.data[o].hidden)})),this.chart.update()},onHover:t=>{this._ctx.style.cursor="pointer"},onLeave:t=>{this._ctx.style.cursor=null},position:"right",labels:{fontFamily:"monospace",usePointStyle:!0,filter:(t,e)=>t.text!==e.labels[t.index-1]}},plugins:{datalabels:{display:!1}},tooltips:{backgroundColor:"#000",displayColors:!1,callbacks:{title:(t,e)=>{const s=this._labels[t[0].index];return`HTTP ${s}: ${l.message[s]}`},label:(t,e)=>{const s=e.datasets[t.datasetIndex].data,i=s.reduce(((t,e)=>t+e),0),o=s[t.index];return c("cc-tile-status-codes.tooltip",{value:o,percent:o/i})}}},animation:{duration:0}}})}updated(t){if(t.has("statusCodes")){this._skeleton=null==this.statusCodes;const t=this._skeleton?p:this.statusCodes;this._empty=0===Object.keys(t).length,this._labels=Object.keys(t),this._chartLabels=this._skeleton?this._labels.map((()=>"???")):this._labels.map((t=>t[0]+"xx")),this._data=Object.values(t),this._backgroundColor=this._skeleton?this._labels.map((()=>"#bbb")):this._labels.map((t=>m[t[0]])),this.updateComplete.then((()=>{this._chart.options.animation.duration=this._skeleton?0:300,this._chart.options.tooltips.enabled=!this._skeleton,this._chart.data={labels:this._chartLabels,datasets:[{data:this._data,backgroundColor:this._backgroundColor}]},this._chart.update()}))}super.updated(t)}render(){const t=!this.error&&!this._empty&&!this._docs,e=this.error&&!this._docs,i=this._empty&&!this._docs,l=this._docs;return s`<div class="tile_title tile_title--image">${c("cc-tile-status-codes.title")}<cc-button class=docs-toggle image=${l?h:u} hide-text @cc-button:click=${this._onToggleDocs}>${this._docs?c("cc-tile-status-codes.close-btn"):c("cc-tile-status-codes.about-btn")}</cc-button></div>${o(t?s`<div class=tile_body><div class="${a({skeleton:this._skeleton})} chart-container"><canvas id=chart></canvas></div></div>`:"")} ${i?s`<div class=tile_message>${c("cc-tile-status-codes.empty")}</div>`:""} ${e?s`<cc-error class=tile_message>${c("cc-tile-status-codes.error")}</cc-error>`:""}<div class="${a({"tile_docs--hidden":!l})} tile_docs"><p>${c("cc-tile-status-codes.docs.msg")}</p><p>${c("cc-tile-status-codes.docs.link")}</p></div>`}static get styles(){return[r,n,d,i`.tile_title{align-items:center;display:flex;justify-content:space-between}.docs-toggle{margin:0 0 0 1rem}.tile_body{position:relative}.chart-container{height:100%;min-width:0;position:absolute;width:100%}.tile_body,.tile_docs,.tile_message{grid-area:2/1/2/1}.tile_docs{align-self:center;font-size:.9rem;font-style:italic}.tile_docs.tile_docs--hidden{visibility:hidden}.tile_docs_link{color:#2b96fd;text-decoration:underline}`]}}window.customElements.define("cc-tile-status-codes",_);export{_ as CcTileStatusCodes}; | ||
//# sourceMappingURL=cc-tile-status-codes.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as i,html as e,css as t}from"lit-element";import{classMap as s}from"lit-html/directives/class-map.js";import{i18n as c}from"../lib/i18n.js";import{skeletonStyles as o}from"../styles/skeleton.js";import{ccLink as r,linkStyles as l}from"../templates/cc-link.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"../atoms/cc-flex-gap.js";const p={privateActiveUsers:15,publicActiveUsers:120,storage:698980762,price:17.5};class a extends i{static get properties(){return{error:{type:Boolean,reflect:!0},statistics:{type:Object}}}constructor(){super(),this.error=!1,this.statistics=null}render(){const i=null==this.statistics,t=i?p:this.statistics,o="not-used"===this.statistics;return e`<cc-block><div slot=title>Heptapod</div><div class=header><img class=header-logo src=${"https://static-assets.cellar.services.clever-cloud.com/logos/heptapod.svg"} alt="heptapod logo" title="heptapod logo"><div class=header-content><div>Heptapod</div><div>${r("https://heptapod.host","https://heptapod.host")}</div></div></div><div class=description>${c("cc-heptapod-info.description")}</div>${this.error||o?"":e`<cc-flex-gap class=pricing><div class=pricing-item><div class="${s({skeleton:i})} pricing-item-value">${t.privateActiveUsers}</div><div>${c("cc-heptapod-info.private-active-users-description")}</div></div><div class=pricing-item><div class="${s({skeleton:i})} pricing-item-value">${t.publicActiveUsers}</div><div>${c("cc-heptapod-info.public-active-users-description")}</div></div><div class=pricing-item><div class="${s({skeleton:i})} pricing-item-value">${c("cc-heptapod-info.storage-bytes",t)}</div><div>${c("cc-heptapod-info.storage-description")}</div></div><div class=pricing-item><div class="${s({skeleton:i})} pricing-item-value">${c("cc-heptapod-info.price-value",t)}</div><div>${c("cc-heptapod-info.price-description")}</div></div></cc-flex-gap>`} ${!this.error&&o?e`<div class=no-statistics>${c("cc-heptapod-info.not-in-use")}</div>`:""} ${this.error?e`<cc-error>${c("cc-heptapod-info.error-loading")}</cc-error>`:""}</cc-block>`}static get styles(){return[o,l,t`:host{display:block}.description,.header,.pricing{line-height:1.5}.header{display:flex}.header-logo{height:3.25rem;width:3.25rem}.header-content{display:flex;flex-direction:column;justify-content:center;margin-left:1rem}.pricing{--cc-gap:1rem}.pricing-item{flex:1 1 auto;text-align:center}.pricing-item-value{display:inline-block;font-weight:700}.no-statistics{color:#555;font-style:italic;margin:.2rem}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-heptapod-info",a);export{a as CcHeptapodInfo}; | ||
import"../atoms/cc-flex-gap.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import{LitElement as i,html as e,css as t}from"lit-element";import{classMap as s}from"lit-html/directives/class-map.js";import{i18n as c}from"../lib/i18n.js";import{skeletonStyles as o}from"../styles/skeleton.js";import{ccLink as r,linkStyles as l}from"../templates/cc-link.js";const p={privateActiveUsers:15,publicActiveUsers:120,storage:698980762,price:17.5};class a extends i{static get properties(){return{error:{type:Boolean,reflect:!0},statistics:{type:Object}}}constructor(){super(),this.error=!1,this.statistics=null}render(){const i=null==this.statistics,t=i?p:this.statistics,o="not-used"===this.statistics;return e`<cc-block><div slot=title>Heptapod</div><div class=header><img class=header-logo src=${"https://static-assets.cellar.services.clever-cloud.com/logos/heptapod.svg"} alt="heptapod logo" title="heptapod logo"><div class=header-content><div>Heptapod</div><div>${r("https://heptapod.host","https://heptapod.host")}</div></div></div><div class=description>${c("cc-heptapod-info.description")}</div>${this.error||o?"":e`<cc-flex-gap class=pricing><div class=pricing-item><div class="${s({skeleton:i})} pricing-item-value">${t.privateActiveUsers}</div><div>${c("cc-heptapod-info.private-active-users-description")}</div></div><div class=pricing-item><div class="${s({skeleton:i})} pricing-item-value">${t.publicActiveUsers}</div><div>${c("cc-heptapod-info.public-active-users-description")}</div></div><div class=pricing-item><div class="${s({skeleton:i})} pricing-item-value">${c("cc-heptapod-info.storage-bytes",t)}</div><div>${c("cc-heptapod-info.storage-description")}</div></div><div class=pricing-item><div class="${s({skeleton:i})} pricing-item-value">${c("cc-heptapod-info.price-value",t)}</div><div>${c("cc-heptapod-info.price-description")}</div></div></cc-flex-gap>`} ${!this.error&&o?e`<div class=no-statistics>${c("cc-heptapod-info.not-in-use")}</div>`:""} ${this.error?e`<cc-error>${c("cc-heptapod-info.error-loading")}</cc-error>`:""}</cc-block>`}static get styles(){return[o,l,t`:host{display:block}.description,.header,.pricing{line-height:1.5}.header{display:flex}.header-logo{height:3.25rem;width:3.25rem}.header-content{display:flex;flex-direction:column;justify-content:center;margin-left:1rem}.pricing{--cc-gap:1rem}.pricing-item{flex:1 1 auto;text-align:center}.pricing-item-value{display:inline-block;font-weight:700}.no-statistics{color:#555;font-style:italic;margin:.2rem}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-heptapod-info",a);export{a as CcHeptapodInfo}; | ||
//# sourceMappingURL=cc-heptapod-info.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as r,html as e,css as t}from"lit-element";import{i18n as c}from"../lib/i18n.js";import{defaultThemeStyles as i}from"../styles/default-theme.js";import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"./cc-tcp-redirection.js";const o=[{namespace:"default",sourcePort:1234},{namespace:"cleverapps"}];class s extends r{static get properties(){return{context:{type:String},error:{type:Boolean},redirections:{type:Array}}}constructor(){super(),this.error=!1,this.context="user"}_getRedirectionCount(){if("admin"===this.context&&null!=this.redirections){const r=this.redirections.filter((({sourcePort:r})=>null!=r)).length;if(r>=1)return e`<span class=count>${r}</span>`}return""}render(){const r=null==this.redirections,t=r?o:this.redirections,i="admin"===this.context?"close":"off";return e`<cc-block state=${i}><div slot=title>${c("cc-tcp-redirection-form.title")}${this._getRedirectionCount()}</div>${"user"===this.context?e`<div class=description>${c("cc-tcp-redirection-form.description")}</div>`:""} ${!this.error&&t.length>0?e`${t.map((t=>e`<cc-tcp-redirection namespace=${t.namespace} .sourcePort=${t.sourcePort} ?skeleton=${r} ?waiting=${t.waiting} ?private=${t.private} ?error=${t.error}></cc-tcp-redirection>`))}`:""} ${this.error||0!==t.length?"":e`<div class=cc-block_empty-msg>${c("cc-tcp-redirection-form.empty")}</div>`} ${this.error?e`<cc-error>${c("cc-tcp-redirection-form.error")}</cc-error>`:""}</cc-block>`}static get styles(){return[i,t`:host{display:block}.count{background-color:#3a3871;border-radius:10rem;color:#fff;font-size:.8rem;margin-left:.5rem;padding:.1rem .5rem;vertical-align:middle}.description{line-height:1.6}.description p{margin:0 0 1rem}.description code{background-color:#f3f3f3;border-radius:.25rem;font-family:var(--cc-ff-monospace);padding:.15rem .3rem}`]}}window.customElements.define("cc-tcp-redirection-form",s);export{s as CcTcpRedirectionForm}; | ||
import"../molecules/cc-block.js";import"../molecules/cc-error.js";import"./cc-tcp-redirection.js";import{LitElement as r,html as e,css as t}from"lit-element";import{i18n as c}from"../lib/i18n.js";import{defaultThemeStyles as i}from"../styles/default-theme.js";const o=[{namespace:"default",sourcePort:1234},{namespace:"cleverapps"}];class s extends r{static get properties(){return{context:{type:String},error:{type:Boolean},redirections:{type:Array}}}constructor(){super(),this.error=!1,this.context="user"}_getRedirectionCount(){if("admin"===this.context&&null!=this.redirections){const r=this.redirections.filter((({sourcePort:r})=>null!=r)).length;if(r>=1)return e`<span class=count>${r}</span>`}return""}render(){const r=null==this.redirections,t=r?o:this.redirections,i="admin"===this.context?"close":"off";return e`<cc-block state=${i}><div slot=title>${c("cc-tcp-redirection-form.title")}${this._getRedirectionCount()}</div>${"user"===this.context?e`<div class=description>${c("cc-tcp-redirection-form.description")}</div>`:""} ${!this.error&&t.length>0?e`${t.map((t=>e`<cc-tcp-redirection namespace=${t.namespace} .sourcePort=${t.sourcePort} ?skeleton=${r} ?waiting=${t.waiting} ?private=${t.private} ?error=${t.error}></cc-tcp-redirection>`))}`:""} ${this.error||0!==t.length?"":e`<div class=cc-block_empty-msg>${c("cc-tcp-redirection-form.empty")}</div>`} ${this.error?e`<cc-error>${c("cc-tcp-redirection-form.error")}</cc-error>`:""}</cc-block>`}static get styles(){return[i,t`:host{display:block}.count{background-color:#3a3871;border-radius:10rem;color:#fff;font-size:.8rem;margin-left:.5rem;padding:.1rem .5rem;vertical-align:middle}.description{line-height:1.6}.description p{margin:0 0 1rem}.description code{background-color:#f3f3f3;border-radius:.25rem;font-family:var(--cc-ff-monospace);padding:.15rem .3rem}`]}}window.customElements.define("cc-tcp-redirection-form",s);export{s as CcTcpRedirectionForm}; | ||
//# sourceMappingURL=cc-tcp-redirection-form.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as r}from"lit-element";import{classMap as i}from"lit-html/directives/class-map.js";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{defaultThemeStyles as o}from"../styles/default-theme.js";import{skeletonStyles as c}from"../styles/skeleton.js";import"../atoms/cc-loader.js";import"../atoms/cc-button.js";import"../atoms/cc-flex-gap.js";import{waitingStyles as a}from"../styles/waiting.js";const d=new URL(new URL("../assets/warning.svg",import.meta.url).href,import.meta.url).href,l=new URL(new URL("../assets/redirection-off.svg",import.meta.url).href,import.meta.url).href,p=new URL(new URL("../assets/redirection-on.svg",import.meta.url).href,import.meta.url).href;class m extends e{static get properties(){return{error:{type:Boolean},namespace:{type:String},private:{type:Boolean},skeleton:{type:Boolean},sourcePort:{type:Number,attribute:"source-port"},waiting:{type:Boolean}}}constructor(){super(),this.error=!1,this.private=!1,this.skeleton=!1,this.waiting=!1}_getButtonText(){return this.error?s("cc-tcp-redirection.retry-button"):this._isRedirectionDefined()?s("cc-tcp-redirection.delete-button"):s("cc-tcp-redirection.create-button")}_getHelpText(){const{namespace:e,sourcePort:t}=this;return this.error?this._isRedirectionDefined()?s("cc-tcp-redirection.error.redirection-defined",{namespace:e,sourcePort:t}):s("cc-tcp-redirection.error.redirection-not-defined",{namespace:e}):this._isRedirectionDefined()?s("cc-tcp-redirection.redirection-defined",{namespace:e,sourcePort:t}):s("cc-tcp-redirection.redirection-not-defined",{namespace:e})}_getHelpTextAddendum(){if(this.error)return null;if(this.private)return s("cc-tcp-redirection.namespace-private");switch(this.namespace){case"default":return s("cc-tcp-redirection.namespace-additionaldescription-default");case"cleverapps":return s("cc-tcp-redirection.namespace-additionaldescription-cleverapps");default:return null}}_getIconUrl(){return this.error?d:this._isRedirectionDefined()?p:l}_isRedirectionDefined(){return null!=this.sourcePort}_onCreate(){n(this,"create",{namespace:this.namespace})}_onDelete(){n(this,"delete",{namespace:this.namespace,sourcePort:this.sourcePort})}render(){return t`<cc-flex-gap class=wrapper><div class="${i({skeleton:this.skeleton})} icon">${this.waiting||this.skeleton?"":t`<img src=${this._getIconUrl()} alt="">`} ${this.waiting?t`<cc-loader></cc-loader>`:""}</div><cc-flex-gap class="${i({"cc-waiting":this.waiting})} text-button"><div class=text-wrapper><span class="${i({skeleton:this.skeleton})} text">${this._getHelpText()}</span> ${null!=this._getHelpTextAddendum()?t`<br><span class="${i({skeleton:this.skeleton})} text-addendum">${this._getHelpTextAddendum()}</span>`:""}</div><cc-button outlined ?skeleton=${this.skeleton} ?waiting=${this.waiting} ?danger=${this._isRedirectionDefined()} delay=${this._isRedirectionDefined()?3:0} ?primary=${!this._isRedirectionDefined()} @cc-button:click=${this._isRedirectionDefined()?this._onDelete:this._onCreate}>${this._getButtonText()}</cc-button></cc-flex-gap></cc-flex-gap>`}static get styles(){return[o,c,a,r`:host{display:block}.wrapper{--cc-gap:0.8rem}.icon{flex:0 0 auto;height:1.5rem;width:1.5rem}.icon img{display:block;height:100%;width:100%}.icon cc-loader{--cc-loader-color:#999}.text-button{flex:1 1 0}.text-wrapper{flex:1 1 30rem;line-height:1.6rem}.text strong{white-space:nowrap}.text:not(.skeleton) code{background-color:#f3f3f3;border-radius:.25rem;font-family:var(--cc-ff-monospace);padding:.15rem .3rem}.text-addendum:not(.skeleton){color:#555}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-tcp-redirection",m);export{m as CcTcpRedirection}; | ||
import"../atoms/cc-button.js";import"../atoms/cc-flex-gap.js";import{LitElement as e,html as t,css as r}from"lit-element";import{classMap as i}from"lit-html/directives/class-map.js";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import"../atoms/cc-loader.js";import{defaultThemeStyles as o}from"../styles/default-theme.js";import{skeletonStyles as c}from"../styles/skeleton.js";import{waitingStyles as a}from"../styles/waiting.js";const d=new URL(new URL("../assets/warning.svg",import.meta.url).href,import.meta.url).href,l=new URL(new URL("../assets/redirection-off.svg",import.meta.url).href,import.meta.url).href,p=new URL(new URL("../assets/redirection-on.svg",import.meta.url).href,import.meta.url).href;class m extends e{static get properties(){return{error:{type:Boolean},namespace:{type:String},private:{type:Boolean},skeleton:{type:Boolean},sourcePort:{type:Number,attribute:"source-port"},waiting:{type:Boolean}}}constructor(){super(),this.error=!1,this.private=!1,this.skeleton=!1,this.waiting=!1}_getButtonText(){return this.error?s("cc-tcp-redirection.retry-button"):this._isRedirectionDefined()?s("cc-tcp-redirection.delete-button"):s("cc-tcp-redirection.create-button")}_getHelpText(){const{namespace:e,sourcePort:t}=this;return this.error?this._isRedirectionDefined()?s("cc-tcp-redirection.error.redirection-defined",{namespace:e,sourcePort:t}):s("cc-tcp-redirection.error.redirection-not-defined",{namespace:e}):this._isRedirectionDefined()?s("cc-tcp-redirection.redirection-defined",{namespace:e,sourcePort:t}):s("cc-tcp-redirection.redirection-not-defined",{namespace:e})}_getHelpTextAddendum(){if(this.error)return null;if(this.private)return s("cc-tcp-redirection.namespace-private");switch(this.namespace){case"default":return s("cc-tcp-redirection.namespace-additionaldescription-default");case"cleverapps":return s("cc-tcp-redirection.namespace-additionaldescription-cleverapps");default:return null}}_getIconUrl(){return this.error?d:this._isRedirectionDefined()?p:l}_isRedirectionDefined(){return null!=this.sourcePort}_onCreate(){n(this,"create",{namespace:this.namespace})}_onDelete(){n(this,"delete",{namespace:this.namespace,sourcePort:this.sourcePort})}render(){return t`<cc-flex-gap class=wrapper><div class="${i({skeleton:this.skeleton})} icon">${this.waiting||this.skeleton?"":t`<img src=${this._getIconUrl()} alt="">`} ${this.waiting?t`<cc-loader></cc-loader>`:""}</div><cc-flex-gap class="${i({"cc-waiting":this.waiting})} text-button"><div class=text-wrapper><span class="${i({skeleton:this.skeleton})} text">${this._getHelpText()}</span> ${null!=this._getHelpTextAddendum()?t`<br><span class="${i({skeleton:this.skeleton})} text-addendum">${this._getHelpTextAddendum()}</span>`:""}</div><cc-button outlined ?skeleton=${this.skeleton} ?waiting=${this.waiting} ?danger=${this._isRedirectionDefined()} delay=${this._isRedirectionDefined()?3:0} ?primary=${!this._isRedirectionDefined()} @cc-button:click=${this._isRedirectionDefined()?this._onDelete:this._onCreate}>${this._getButtonText()}</cc-button></cc-flex-gap></cc-flex-gap>`}static get styles(){return[o,c,a,r`:host{display:block}.wrapper{--cc-gap:0.8rem}.icon{flex:0 0 auto;height:1.5rem;width:1.5rem}.icon img{display:block;height:100%;width:100%}.icon cc-loader{--cc-loader-color:#999}.text-button{flex:1 1 0}.text-wrapper{flex:1 1 30rem;line-height:1.6rem}.text strong{white-space:nowrap}.text:not(.skeleton) code{background-color:#f3f3f3;border-radius:.25rem;font-family:var(--cc-ff-monospace);padding:.15rem .3rem}.text-addendum:not(.skeleton){color:#555}.skeleton{background-color:#bbb}`]}}window.customElements.define("cc-tcp-redirection",m);export{m as CcTcpRedirection}; | ||
//# sourceMappingURL=cc-tcp-redirection.js.map |
@@ -1,2 +0,2 @@ | ||
import{html as e}from"lit-element";import{i18n as t}from"../lib/i18n.js";import"../molecules/cc-error.js";const r=new URL(new URL("../assets/encryption-at-rest.svg",import.meta.url).href,import.meta.url).href,o=({enabled:o,price:n})=>{const i=e`<div class=option-details>${t("cc-addon-encryption-at-rest-option.description")}</div><cc-error class=option-warning>${t("cc-addon-encryption-at-rest-option.warning",{percent:.1,price:n})}</cc-error>`;return{title:t("cc-addon-encryption-at-rest-option.title"),logo:r,description:i,enabled:o,name:"encryption"}};export{o as ccAddonEncryptionAtRestOption}; | ||
import"../molecules/cc-error.js";import{html as e}from"lit-element";import{i18n as t}from"../lib/i18n.js";const r=new URL(new URL("../assets/encryption-at-rest.svg",import.meta.url).href,import.meta.url).href,o=({enabled:o,price:n})=>{const i=e`<div class=option-details>${t("cc-addon-encryption-at-rest-option.description")}</div><cc-error class=option-warning>${t("cc-addon-encryption-at-rest-option.warning",{percent:.1,price:n})}</cc-error>`;return{title:t("cc-addon-encryption-at-rest-option.title"),logo:r,description:i,enabled:o,name:"encryption"}};export{o as ccAddonEncryptionAtRestOption}; | ||
//# sourceMappingURL=cc-addon-encryption-at-rest-option.js.map |
@@ -1,2 +0,2 @@ | ||
import{prepareFormatDistanceToNow as e,prepareFormatDate as t,prepareFormatDatetime as o,prepareFormatDateOnly as a,prepareFormatHours as n}from"../lib/i18n-date.js";import{prepareCountryName as i}from"../lib/i18n-display.js";import{prepareNumberUnitFormatter as c,prepareNumberBytesFormatter as r}from"../lib/i18n-number.js";import{sanitize as s}from"../lib/i18n-sanitize.js";const d="en";function l(e,t=e+"s"){return o=>1===o?e:t}const p=e("en",((e,t)=>`${e} ${l(t)(e)} ago`),"just now"),m=t("en"),u=o("en"),h=a("en"),g=n("en"),v=new Intl.NumberFormat("en",{style:"currency",currency:"EUR"}),f=new Intl.NumberFormat("en",{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}),b=new Intl.NumberFormat("en"),y=c("en"),w=r("en","B"," "),k=i("en");function $(e){return[`CPUs: ${e.cpus}`+(e.microservice?" (shared)":""),e.gpus>0?`GPUs: ${e.gpus}`:"",`RAM: ${w(1024*e.mem*1024)}`].filter((e=>e)).join("\n")}const T={LANGUAGE:"🇬🇧 English","cc-addon-backups.command-password":"This command will ask for your password, here it is:","cc-addon-backups.close-btn":"Close this panel","cc-addon-backups.delete":({createdAt:e})=>s`Delete the backup from <strong title="${m(e)}">${u(e)}</strong>`,"cc-addon-backups.delete.btn":"delete...","cc-addon-backups.delete.with-service.title.es-addon":"Delete with Kibana","cc-addon-backups.delete.with-service.description.es-addon":({href:e})=>s`You can delete this backup using Kibana by going to the <a href="${e}">backup repository</a>.`,"cc-addon-backups.delete.manual.title":"Delete manually","cc-addon-backups.delete.manual.description.es-addon":"You can delete this backup using cURL by executing this command:","cc-addon-backups.description.es-addon":"Backups are managed by Elasticsearch itself. You can define the retention period and backup frequency through Kibana's UI.","cc-addon-backups.description.es-addon-old":"Backups are managed by Elasticsearch itself. The version of your Elasticsearch does not allow to define a retention policy. Deleting a backup can be done manually through Elasticsearch's API.","cc-addon-backups.empty":"There are no backups yet.","cc-addon-backups.link.es-addon":"open in Kibana","cc-addon-backups.link.es-addon-old":"open in Elasticsearch","cc-addon-backups.loading-error":"Something went wrong while loading the backups.","cc-addon-backups.restore":({createdAt:e})=>s`Restore the backup from <strong title="${m(e)}">${u(e)}</strong>`,"cc-addon-backups.restore.btn":"restore...","cc-addon-backups.restore.with-service.title.es-addon":"Restore with Kibana","cc-addon-backups.restore.with-service.description.es-addon":({href:e})=>s`You can restore this backup using Kibana by going to the <a href="${e}">backup repository</a>.`,"cc-addon-backups.restore.manual.title":"Restore manually","cc-addon-backups.restore.manual.description.es-addon":"You can restore this backup using cURL by executing this command:","cc-addon-backups.text":({createdAt:e,expiresAt:t})=>s`Backup from <strong title="${m(e)}">${u(e)}</strong> (expires on <strong>${h(t)}</strong>)`,"cc-addon-backups.text.user-defined-retention":({createdAt:e})=>s`Backup from <strong title="${m(e)}">${u(e)}</strong> (expires after defined retention)`,"cc-addon-backups.title":"Backups","cc-addon-credentials.description.apm":"Use those credentials to connect an APM Server instance to your Elasticsearch cluster.","cc-addon-credentials.description.elasticsearch":"Use those credentials to connect to your Elasticsearch cluster.","cc-addon-credentials.description.kibana":"Use those credentials to connect a Kibana instance to your Elasticsearch cluster.","cc-addon-credentials.description.pulsar":"Use those information to connect your Pulsar add-on.","cc-addon-credentials.field.auth-token":"Authentication token","cc-addon-credentials.field.host":"Domain name","cc-addon-credentials.field.password":"Password","cc-addon-credentials.field.url":"URL","cc-addon-credentials.field.user":"User","cc-addon-credentials.loading-error":"Something went wrong while loading the credentials.","cc-addon-credentials.title":({name:e})=>`${e} credentials`,"cc-addon-elasticsearch-options.title":"Options for the Elastic Stack","cc-addon-elasticsearch-options.description":()=>s`This add-on is part of the Elastic Stack offer which includes two options. Both these options will be deployed as applications, managed and updated by Clever Cloud on your behalf. They will appear as regular applications that you can stop, scale up or down automatically like one of your own applications. As such, <strong>enabling these options will result in an increase in credits consumption</strong> as well.`,"cc-addon-elasticsearch-options.description.kibana":()=>s`Kibana is the admin UI for the Elastic Stack. It lets you visualize your Elasticsearch data and navigate the stack so you can do anything from tracking query load to understanding the way requests flow through your apps. Learn more in the <a href="https://www.elastic.co/guide/en/kibana/master/index.html">official Kibana documentation</a>.`,"cc-addon-elasticsearch-options.description.apm":()=>s`Elastic APM server is an application performance monitoring system built on the Elastic Stack. Deploying this will allow you to automatically send APM metrics from any applications linked to the Elasticsearch add-on instance, providing you add the Elastic APM agent to the application code. Learn more in the <a href="https://www.elastic.co/guide/en/apm/get-started/current/overview.html">official APM server documentation</a>.`,"cc-addon-elasticsearch-options.warning.kibana":"If you enable this option, we'll deploy and manage a Kibana application for you, this will lead to additional costs.","cc-addon-elasticsearch-options.warning.kibana.details":e=>s`By default, the app will start on a <strong title="${$(e)}">${e.name} instance</strong> which costs around <strong>${v.format(e.monthlyCost)} per month</strong>.`,"cc-addon-elasticsearch-options.warning.apm":"If you enable this option, we'll deploy and manage an Elastic APM server application for you, this will lead to additional costs.","cc-addon-elasticsearch-options.warning.apm.details":e=>s`By default, the app will start on a <strong title="${$(e)}">${e.name} instance</strong> which costs around <strong>${v.format(e.monthlyCost)} per month</strong>.`,"cc-addon-encryption-at-rest-option.description":()=>s`Encryption at rest encrypts the entire data disk of your add-on. It prevents reading the stored data in case of a physical access to the hard drive. More information in our <a href="https://www.clever-cloud.com/doc/administrate/encryption-at-rest/">documentation</a>.`,"cc-addon-encryption-at-rest-option.title":"Encryption at rest","cc-addon-encryption-at-rest-option.warning":({percent:e,price:t})=>s`This option is currently free. In the future, it will be billed ${f.format(e)} of the plan price, which amounts to <strong>${v.format(t)} per month</strong> here.`,"cc-addon-features.details":"Here's the list of all the features of your add-on. Features may evolve and your add-on would need a migration to match them all.","cc-addon-features.feature-name.disk":"Disk","cc-addon-features.feature-name.memory":"Memory","cc-addon-features.feature-name.nodes":"Nodes","cc-addon-features.feature-value.dedicated":"Dedicated","cc-addon-features.feature-value.no":"No","cc-addon-features.feature-value.yes":"Yes","cc-addon-features.loading-error":"Something went wrong while loading add-on features.","cc-addon-features.title":"Features","cc-addon-jenkins-options.description":"Choose the options you want for your Jenkins add-on.","cc-addon-jenkins-options.title":"Options for the Jenkins add-on","cc-addon-linked-apps.details":"Here's the list of applications linked to this add-on. The add-on exposes its environment variables to those linked applications.","cc-addon-linked-apps.loading-error":"Something went wrong while loading linked applications.","cc-addon-linked-apps.no-linked-applications":"No applications linked yet.","cc-addon-linked-apps.title":"Linked applications","cc-addon-mongodb-options.description":"Choose the options you want for your MongoDB add-on.","cc-addon-mongodb-options.title":"Options for the MongoDB add-on","cc-addon-mysql-options.description":"Choose the options you want for your MySQL add-on.","cc-addon-mysql-options.title":"Options for the MySQL add-on","cc-addon-option.enabled":"Enabled","cc-addon-option.disabled":"Disabled","cc-addon-option-form.confirm":"Confirm options","cc-addon-postgresql-options.description":"Choose the options you want for your PostgreSQL add-on.","cc-addon-postgresql-options.title":"Options for the PostgreSQL add-on","cc-addon-redis-options.description":"Choose the options you want for your Redis add-on.","cc-addon-redis-options.title":"Options for the Redis add-on","cc-beta.label":"beta","cc-block.toggle.open":"Open","cc-block.toggle.close":"Close","cc-button.cancel":"Click to cancel","cc-datetime-relative.distance":({date:e})=>p(e),"cc-datetime-relative.title":({date:e})=>m(e),"cc-elasticsearch-info.error":"Something went wrong while loading add-ons linked to this application.","cc-elasticsearch-info.info":"Info","cc-elasticsearch-info.link.apm":"Open APM","cc-elasticsearch-info.link.doc":"Read the documentation","cc-elasticsearch-info.link.elasticsearch":"Check out the Elasticsearch add-on","cc-elasticsearch-info.link.kibana":"Open Kibana","cc-elasticsearch-info.text":"This add-on is part of the Elastic Stack offer. You can find the documentation and linked services right below.","cc-error.ok":"OK","cc-header-addon.plan":"Plan","cc-header-addon.version":"Version","cc-header-addon.creation-date":"Creation date","cc-header-addon.creation-date.short":({date:e})=>h(e),"cc-header-addon.creation-date.full":({date:e})=>m(e),"cc-header-addon.error":"Something went wrong while loading add-on info.","cc-header-app.action.cancel-deployment":"Cancel deployment","cc-header-app.action.restart":"Restart","cc-header-app.action.restart-last-commit":"Restart last pushed commit","cc-header-app.action.restart-rebuild":"Re-build and restart","cc-header-app.action.start":"Start","cc-header-app.action.start-last-commit":"Start last pushed commit","cc-header-app.action.start-rebuild":"Re-build and start","cc-header-app.action.stop":"Stop app","cc-header-app.disable-buttons":"You are not authorized to perform those actions","cc-header-app.read-logs":"read logs here","cc-header-app.commits.no-commits":"no commits yet","cc-header-app.commits.git":({commit:e})=>`git repo version (HEAD): ${e}`,"cc-header-app.commits.running":({commit:e})=>`running version: ${e}`,"cc-header-app.commits.starting":({commit:e})=>`deploying version: ${e}`,"cc-header-app.state-msg.app-is-restarting":"Your application is restarting...","cc-header-app.state-msg.app-is-running":"Your application is running!","cc-header-app.state-msg.app-is-starting":"Your application is starting...","cc-header-app.state-msg.app-is-stopped":"Your application is currently stopped.","cc-header-app.state-msg.last-deploy-failed":"The last deployment failed,","cc-header-app.state-msg.unknown-state":"Unknown state, try to restart the application or contact our support if you have additional questions.","cc-header-app.user-action-msg.app-will-start":"Your application is about to start...","cc-header-app.user-action-msg.deploy-will-begin":"A new deployment is about to begin...","cc-header-app.user-action-msg.deploy-cancelled":"This deployment has been cancelled.","cc-header-app.user-action-msg.app-will-stop":"Your application is about to stop...","cc-header-app.error":"Something went wrong while loading app info.","cc-header-orga.hotline":"Hotline:","cc-header-orga.error":"Something went wrong while loading organization info.","cc-heptapod-info.private-active-users-description":"Private users","cc-heptapod-info.public-active-users-description":"Public users","cc-heptapod-info.storage-bytes":({storage:e})=>w(e,1),"cc-heptapod-info.storage-description":"Storage size","cc-heptapod-info.price-value":({price:e})=>`${v.format(e)} / month`,"cc-heptapod-info.price-description":"Estimated price","cc-heptapod-info.not-in-use":"You are not using this Heptapod service.","cc-heptapod-info.description":()=>s`This Heptapod instance hosts mercurial projects. Learn more on <a href="https://about.heptapod.host" rel="noreferrer noopener">https://about.heptapod.host</a>.`,"cc-heptapod-info.error-loading":"Something went wrong while loading usage info.","cc-invoice.download-pdf":"Download PDF","cc-invoice.error":"Something went wrong while loading the invoice.","cc-invoice.info":({date:e,amount:t})=>s`This invoice was issued on <strong>${h(e)}</strong> for a total amount of <strong>${v.format(t)}</strong>.`,"cc-invoice.title":"Invoice","cc-invoice-list.title":"Invoices","cc-invoice-list.error":"An error occured while loading invoices.","cc-invoice-list.pending":"Pending invoices","cc-invoice-list.pending.no-invoices":"No pending invoices at the moment.","cc-invoice-list.processed":"Paid invoices","cc-invoice-list.processed.no-invoices":"No paid invoices at the moment.","cc-invoice-list.processing":"Invoices awaiting payment validation","cc-invoice-list.year":"Year:","cc-invoice-table.date.emission":"Emission date","cc-invoice-table.date.value":({date:e})=>`${h(e)}`,"cc-invoice-table.number":"Number","cc-invoice-table.open-pdf":"Download PDF","cc-invoice-table.pay":"Pay","cc-invoice-table.text":({number:e,date:t,amount:o})=>s`Invoice <strong>${e}</strong> issued on <strong>${h(t)}</strong> for a total amount of <code>${v.format(o)}</code>`,"cc-invoice-table.total.label":"Total","cc-invoice-table.total.value":({amount:e})=>`${v.format(e)}`,"cc-addon-admin.addon-name":"Add-on name","cc-addon-admin.admin":"Administration","cc-addon-admin.delete":"Delete the add-on","cc-addon-admin.danger-zone":"Danger zone","cc-addon-admin.delete-description":()=>s`Deleting this add-on will make it immediately unavailable.<br>The virtual machine will be stopped in 24 hours.<br>Backups will be kept according to the retention policy.`,"cc-addon-admin.error-loading":"Something went wrong while loading add-on info.","cc-addon-admin.error-saving":"An error occurred when saving your modifications.","cc-addon-admin.tags":"Tags","cc-addon-admin.tags-description":"Tags allow you to classify your applications and add-ons to create categories","cc-addon-admin.tags-empty":"No defined tags","cc-addon-admin.tags-update":"Update tags","cc-addon-admin.update":"Update name","cc-tcp-redirection.create-button":"Create","cc-tcp-redirection.delete-button":"Delete","cc-tcp-redirection.retry-button":"Retry","cc-tcp-redirection.namespace-additionaldescription-cleverapps":()=>s`This namespace is used by all <em>cleverapps.io</em> domains (e.g. <em>my-app.cleverapps.io</em>).`,"cc-tcp-redirection.namespace-additionaldescription-default":()=>s`This namespace is used by all custom domains (e.g. <em>my-app.com</em>).`,"cc-tcp-redirection.namespace-private":"This is your private namespace.","cc-tcp-redirection.redirection-defined":({namespace:e,sourcePort:t})=>s`This application has a redirection from port <code>${t}</code> to port <code>4040</code> in the <strong>${e}</strong> namespace.`,"cc-tcp-redirection.redirection-not-defined":({namespace:e})=>s`You can create a redirection in the <strong>${e}</strong> namespace.`,"cc-tcp-redirection.error.redirection-defined":({namespace:e,sourcePort:t})=>s`An error occurred while deleting the redirection from port <code>${t}</code> to port <code>4040</code> in the <strong>${e}</strong> namespace.`,"cc-tcp-redirection.error.redirection-not-defined":({namespace:e})=>s`An error occured while creating a redirection in the <strong>${e}</strong> namespace.`,"cc-tcp-redirection-form.description":()=>s` | ||
import{formatDate as e,formatDatetime as t,formatDateOnly as a,formatHours as o,prepareFormatDistanceToNow as n}from"../lib/i18n-date.js";import{getCountryName as i}from"../lib/i18n-display.js";import{formatCurrency as c,formatPercent as r,formatNumber as s,prepareNumberUnitFormatter as d,prepareNumberBytesFormatter as l}from"../lib/i18n-number.js";import{sanitize as p}from"../lib/i18n-sanitize.js";const u="en";function h(e,t=e+"s"){return a=>1===a?e:t}const m=n("en",((e,t)=>`${e} ${h(t)(e)} ago`),"just now"),g=d("en"),v=l("en","B"," ");function b(e){return[`CPUs: ${e.cpus}`+(e.microservice?" (shared)":""),e.gpus>0?`GPUs: ${e.gpus}`:"",`RAM: ${v(1024*e.mem*1024)}`].filter((e=>e)).join("\n")}const f={LANGUAGE:"English","cc-addon-backups.command-password":"This command will ask for your password, here it is:","cc-addon-backups.close-btn":"Close this panel","cc-addon-backups.delete":({createdAt:a})=>p`Delete the backup from <strong title="${e("en",a)}">${t("en",a)}</strong>`,"cc-addon-backups.delete.btn":"delete...","cc-addon-backups.delete.with-service.title.es-addon":"Delete with Kibana","cc-addon-backups.delete.with-service.description.es-addon":({href:e})=>p`You can delete this backup using Kibana by going to the <a href="${e}">backup repository</a>.`,"cc-addon-backups.delete.manual.title":"Delete manually","cc-addon-backups.delete.manual.description.es-addon":"You can delete this backup using cURL by executing this command:","cc-addon-backups.description.es-addon":"Backups are managed by Elasticsearch itself. You can define the retention period and backup frequency through Kibana's UI.","cc-addon-backups.description.es-addon-old":"Backups are managed by Elasticsearch itself. The version of your Elasticsearch does not allow to define a retention policy. Deleting a backup can be done manually through Elasticsearch's API.","cc-addon-backups.empty":"There are no backups yet.","cc-addon-backups.link.es-addon":"open in Kibana","cc-addon-backups.link.es-addon-old":"open in Elasticsearch","cc-addon-backups.loading-error":"Something went wrong while loading the backups.","cc-addon-backups.restore":({createdAt:a})=>p`Restore the backup from <strong title="${e("en",a)}">${t("en",a)}</strong>`,"cc-addon-backups.restore.btn":"restore...","cc-addon-backups.restore.with-service.title.es-addon":"Restore with Kibana","cc-addon-backups.restore.with-service.description.es-addon":({href:e})=>p`You can restore this backup using Kibana by going to the <a href="${e}">backup repository</a>.`,"cc-addon-backups.restore.manual.title":"Restore manually","cc-addon-backups.restore.manual.description.es-addon":"You can restore this backup using cURL by executing this command:","cc-addon-backups.text":({createdAt:o,expiresAt:n})=>p`Backup from <strong title="${e("en",o)}">${t("en",o)}</strong> (expires on <strong>${a("en",n)}</strong>)`,"cc-addon-backups.text.user-defined-retention":({createdAt:a})=>p`Backup from <strong title="${e("en",a)}">${t("en",a)}</strong> (expires after defined retention)`,"cc-addon-backups.title":"Backups","cc-addon-credentials.description.apm":"Use those credentials to connect an APM Server instance to your Elasticsearch cluster.","cc-addon-credentials.description.elasticsearch":"Use those credentials to connect to your Elasticsearch cluster.","cc-addon-credentials.description.kibana":"Use those credentials to connect a Kibana instance to your Elasticsearch cluster.","cc-addon-credentials.description.pulsar":"Use those information to connect your Pulsar add-on.","cc-addon-credentials.field.auth-token":"Authentication token","cc-addon-credentials.field.host":"Domain name","cc-addon-credentials.field.password":"Password","cc-addon-credentials.field.url":"URL","cc-addon-credentials.field.user":"User","cc-addon-credentials.loading-error":"Something went wrong while loading the credentials.","cc-addon-credentials.title":({name:e})=>`${e} credentials`,"cc-addon-elasticsearch-options.title":"Options for the Elastic Stack","cc-addon-elasticsearch-options.description":()=>p`This add-on is part of the Elastic Stack offer which includes two options. Both these options will be deployed as applications, managed and updated by Clever Cloud on your behalf. They will appear as regular applications that you can stop, scale up or down automatically like one of your own applications. As such, <strong>enabling these options will result in an increase in credits consumption</strong> as well.`,"cc-addon-elasticsearch-options.description.kibana":()=>p`Kibana is the admin UI for the Elastic Stack. It lets you visualize your Elasticsearch data and navigate the stack so you can do anything from tracking query load to understanding the way requests flow through your apps. Learn more in the <a href="https://www.elastic.co/guide/en/kibana/master/index.html">official Kibana documentation</a>.`,"cc-addon-elasticsearch-options.description.apm":()=>p`Elastic APM server is an application performance monitoring system built on the Elastic Stack. Deploying this will allow you to automatically send APM metrics from any applications linked to the Elasticsearch add-on instance, providing you add the Elastic APM agent to the application code. Learn more in the <a href="https://www.elastic.co/guide/en/apm/get-started/current/overview.html">official APM server documentation</a>.`,"cc-addon-elasticsearch-options.warning.kibana":"If you enable this option, we'll deploy and manage a Kibana application for you, this will lead to additional costs.","cc-addon-elasticsearch-options.warning.kibana.details":e=>p`By default, the app will start on a <strong title="${b(e)}">${e.name} instance</strong> which costs around <strong>${c("en",e.monthlyCost)} per month</strong>.`,"cc-addon-elasticsearch-options.warning.apm":"If you enable this option, we'll deploy and manage an Elastic APM server application for you, this will lead to additional costs.","cc-addon-elasticsearch-options.warning.apm.details":e=>p`By default, the app will start on a <strong title="${b(e)}">${e.name} instance</strong> which costs around <strong>${c("en",e.monthlyCost)} per month</strong>.`,"cc-addon-encryption-at-rest-option.description":()=>p`Encryption at rest encrypts the entire data disk of your add-on. It prevents reading the stored data in case of a physical access to the hard drive. More information in our <a href="https://www.clever-cloud.com/doc/administrate/encryption-at-rest/">documentation</a>.`,"cc-addon-encryption-at-rest-option.title":"Encryption at rest","cc-addon-encryption-at-rest-option.warning":({percent:e,price:t})=>p`This option is currently free. In the future, it will be billed ${r("en",e)} of the plan price, which amounts to <strong>${c("en",t)} per month</strong> here.`,"cc-addon-features.details":"Here's the list of all the features of your add-on. Features may evolve and your add-on would need a migration to match them all.","cc-addon-features.feature-name.disk":"Disk","cc-addon-features.feature-name.memory":"Memory","cc-addon-features.feature-name.nodes":"Nodes","cc-addon-features.feature-value.dedicated":"Dedicated","cc-addon-features.feature-value.no":"No","cc-addon-features.feature-value.yes":"Yes","cc-addon-features.loading-error":"Something went wrong while loading add-on features.","cc-addon-features.title":"Features","cc-addon-jenkins-options.description":"Choose the options you want for your Jenkins add-on.","cc-addon-jenkins-options.title":"Options for the Jenkins add-on","cc-addon-linked-apps.details":"Here's the list of applications linked to this add-on. The add-on exposes its environment variables to those linked applications.","cc-addon-linked-apps.loading-error":"Something went wrong while loading linked applications.","cc-addon-linked-apps.no-linked-applications":"No applications linked yet.","cc-addon-linked-apps.title":"Linked applications","cc-addon-mongodb-options.description":"Choose the options you want for your MongoDB add-on.","cc-addon-mongodb-options.title":"Options for the MongoDB add-on","cc-addon-mysql-options.description":"Choose the options you want for your MySQL add-on.","cc-addon-mysql-options.title":"Options for the MySQL add-on","cc-addon-option.enabled":"Enabled","cc-addon-option.disabled":"Disabled","cc-addon-option-form.confirm":"Confirm options","cc-addon-postgresql-options.description":"Choose the options you want for your PostgreSQL add-on.","cc-addon-postgresql-options.title":"Options for the PostgreSQL add-on","cc-addon-redis-options.description":"Choose the options you want for your Redis add-on.","cc-addon-redis-options.title":"Options for the Redis add-on","cc-beta.label":"beta","cc-block.toggle.open":"Open","cc-block.toggle.close":"Close","cc-button.cancel":"Click to cancel","cc-datetime-relative.distance":({date:e})=>m(e),"cc-datetime-relative.title":({date:t})=>e("en",t),"cc-elasticsearch-info.error":"Something went wrong while loading add-ons linked to this application.","cc-elasticsearch-info.info":"Info","cc-elasticsearch-info.link.apm":"Open APM","cc-elasticsearch-info.link.doc":"Read the documentation","cc-elasticsearch-info.link.elasticsearch":"Check out the Elasticsearch add-on","cc-elasticsearch-info.link.kibana":"Open Kibana","cc-elasticsearch-info.text":"This add-on is part of the Elastic Stack offer. You can find the documentation and linked services right below.","cc-error.ok":"OK","cc-header-addon.plan":"Plan","cc-header-addon.version":"Version","cc-header-addon.creation-date":"Creation date","cc-header-addon.creation-date.short":({date:e})=>a("en",e),"cc-header-addon.creation-date.full":({date:t})=>e("en",t),"cc-header-addon.error":"Something went wrong while loading add-on info.","cc-header-app.action.cancel-deployment":"Cancel deployment","cc-header-app.action.restart":"Restart","cc-header-app.action.restart-last-commit":"Restart last pushed commit","cc-header-app.action.restart-rebuild":"Re-build and restart","cc-header-app.action.start":"Start","cc-header-app.action.start-last-commit":"Start last pushed commit","cc-header-app.action.start-rebuild":"Re-build and start","cc-header-app.action.stop":"Stop app","cc-header-app.disable-buttons":"You are not authorized to perform those actions","cc-header-app.read-logs":"read logs here","cc-header-app.commits.no-commits":"no commits yet","cc-header-app.commits.git":({commit:e})=>`git repo version (HEAD): ${e}`,"cc-header-app.commits.running":({commit:e})=>`running version: ${e}`,"cc-header-app.commits.starting":({commit:e})=>`deploying version: ${e}`,"cc-header-app.state-msg.app-is-restarting":"Your application is restarting...","cc-header-app.state-msg.app-is-running":"Your application is running!","cc-header-app.state-msg.app-is-starting":"Your application is starting...","cc-header-app.state-msg.app-is-stopped":"Your application is currently stopped.","cc-header-app.state-msg.last-deploy-failed":"The last deployment failed,","cc-header-app.state-msg.unknown-state":"Unknown state, try to restart the application or contact our support if you have additional questions.","cc-header-app.user-action-msg.app-will-start":"Your application is about to start...","cc-header-app.user-action-msg.deploy-will-begin":"A new deployment is about to begin...","cc-header-app.user-action-msg.deploy-cancelled":"This deployment has been cancelled.","cc-header-app.user-action-msg.app-will-stop":"Your application is about to stop...","cc-header-app.error":"Something went wrong while loading app info.","cc-header-orga.hotline":"Hotline:","cc-header-orga.error":"Something went wrong while loading organization info.","cc-heptapod-info.private-active-users-description":"Private users","cc-heptapod-info.public-active-users-description":"Public users","cc-heptapod-info.storage-bytes":({storage:e})=>v(e,1),"cc-heptapod-info.storage-description":"Storage size","cc-heptapod-info.price-value":({price:e})=>`${c("en",e)} / month`,"cc-heptapod-info.price-description":"Estimated price","cc-heptapod-info.not-in-use":"You are not using this Heptapod service.","cc-heptapod-info.description":()=>p`This Heptapod instance hosts mercurial projects. Learn more on <a href="https://about.heptapod.host" rel="noreferrer noopener">https://about.heptapod.host</a>.`,"cc-heptapod-info.error-loading":"Something went wrong while loading usage info.","cc-invoice.download-pdf":"Download PDF","cc-invoice.error":"Something went wrong while loading the invoice.","cc-invoice.info":({date:e,amount:t})=>p`This invoice was issued on <strong>${a("en",e)}</strong> for a total amount of <strong>${c("en",t)}</strong>.`,"cc-invoice.title":"Invoice","cc-invoice-list.title":"Invoices","cc-invoice-list.error":"An error occured while loading invoices.","cc-invoice-list.pending":"Pending invoices","cc-invoice-list.pending.no-invoices":"No pending invoices at the moment.","cc-invoice-list.processed":"Paid invoices","cc-invoice-list.processed.no-invoices":"No paid invoices at the moment.","cc-invoice-list.processing":"Invoices awaiting payment validation","cc-invoice-list.year":"Year:","cc-invoice-table.date.emission":"Emission date","cc-invoice-table.date.value":({date:e})=>`${a("en",e)}`,"cc-invoice-table.number":"Number","cc-invoice-table.open-pdf":"Download PDF","cc-invoice-table.pay":"Pay","cc-invoice-table.text":({number:e,date:t,amount:o})=>p`Invoice <strong>${e}</strong> issued on <strong>${a("en",t)}</strong> for a total amount of <code>${c("en",o)}</code>`,"cc-invoice-table.total.label":"Total","cc-invoice-table.total.value":({amount:e})=>`${c("en",e)}`,"cc-addon-admin.addon-name":"Add-on name","cc-addon-admin.admin":"Administration","cc-addon-admin.delete":"Delete the add-on","cc-addon-admin.danger-zone":"Danger zone","cc-addon-admin.delete-description":()=>p`Deleting this add-on will make it immediately unavailable.<br>The virtual machine will be stopped in 24 hours.<br>Backups will be kept according to the retention policy.`,"cc-addon-admin.error-loading":"Something went wrong while loading add-on info.","cc-addon-admin.error-saving":"An error occurred when saving your modifications.","cc-addon-admin.tags":"Tags","cc-addon-admin.tags-description":"Tags allow you to classify your applications and add-ons to create categories","cc-addon-admin.tags-empty":"No defined tags","cc-addon-admin.tags-update":"Update tags","cc-addon-admin.update":"Update name","cc-tcp-redirection.create-button":"Create","cc-tcp-redirection.delete-button":"Delete","cc-tcp-redirection.retry-button":"Retry","cc-tcp-redirection.namespace-additionaldescription-cleverapps":()=>p`This namespace is used by all <em>cleverapps.io</em> domains (e.g. <em>my-app.cleverapps.io</em>).`,"cc-tcp-redirection.namespace-additionaldescription-default":()=>p`This namespace is used by all custom domains (e.g. <em>my-app.com</em>).`,"cc-tcp-redirection.namespace-private":"This is your private namespace.","cc-tcp-redirection.redirection-defined":({namespace:e,sourcePort:t})=>p`This application has a redirection from port <code>${t}</code> to port <code>4040</code> in the <strong>${e}</strong> namespace.`,"cc-tcp-redirection.redirection-not-defined":({namespace:e})=>p`You can create a redirection in the <strong>${e}</strong> namespace.`,"cc-tcp-redirection.error.redirection-defined":({namespace:e,sourcePort:t})=>p`An error occurred while deleting the redirection from port <code>${t}</code> to port <code>4040</code> in the <strong>${e}</strong> namespace.`,"cc-tcp-redirection.error.redirection-not-defined":({namespace:e})=>p`An error occured while creating a redirection in the <strong>${e}</strong> namespace.`,"cc-tcp-redirection-form.description":()=>p` | ||
<p> | ||
@@ -9,3 +9,3 @@ A TCP redirection allows you to route external traffic to the <code>4040</code> port of the application via the load balancers.<br> | ||
</p> | ||
`,"cc-tcp-redirection-form.empty":"You do not have access to any namespaces.","cc-tcp-redirection-form.error":"An error occured while loading TCP redirections.","cc-tcp-redirection-form.title":"TCP Redirections","cc-tile-consumption.title":"Credits consumption","cc-tile-consumption.yesterday":"Yesterday","cc-tile-consumption.last-30-days":"Last 30 days","cc-tile-consumption.amount":({amount:e})=>v.format(e),"cc-tile-consumption.error":"Something went wrong while loading consumption info.","cc-tile-deployments.title":"Last deployments","cc-tile-deployments.state.failed":"Failed","cc-tile-deployments.state.started":"Started","cc-tile-deployments.state.cancelled":"Cancelled","cc-tile-deployments.state.stopped":"Stopped","cc-tile-deployments.empty":"No deployments yet.","cc-tile-deployments.error":"Something went wrong while loading deployments info.","cc-tile-instances.title":"Instances","cc-tile-instances.status.deploying":"Deploying","cc-tile-instances.status.running":"Running","cc-tile-instances.empty":"No instances. Your app is stopped.","cc-tile-instances.error":"Something went wrong while loading instances.","cc-tile-requests.title":"HTTP requests","cc-tile-requests.about-btn":"About this chart...","cc-tile-requests.close-btn":"Display chart","cc-tile-requests.date-hours":({date:e})=>g(e),"cc-tile-requests.date-tooltip":({from:e,to:t})=>`${h(e)}: from ${g(e)} to ${g(t)}`,"cc-tile-requests.requests-nb":({value:e,windowHours:t})=>{const o=l("request")(e),a=l("hour")(t);return`${b.format(e)} ${o} (in ${t} ${a})`},"cc-tile-requests.requests-nb.total":({totalRequests:e})=>{const t=l("request")(e);return`${y(e)} ${t} in 24 hours`},"cc-tile-requests.requests-count":({requestCount:e})=>y(e),"cc-tile-requests.empty":"No data to display for now.","cc-tile-requests.error":"Something went wrong while loading HTTP requests.","cc-tile-requests.docs.msg":({windowHours:e})=>{const t=l("hour")(e);return s`HTTP requests received in the last 24 hours. Each bar represents a time window of <strong>${e} ${t}</strong>.`},"cc-tile-scalability.title":"Scalability","cc-tile-scalability.size":"Size","cc-tile-scalability.number":"Number","cc-tile-scalability.flavor-info":e=>$(e),"cc-tile-scalability.error":"Something went wrong while loading scalability config.","cc-tile-status-codes.title":"HTTP response codes","cc-tile-status-codes.about-btn":"About this chart...","cc-tile-status-codes.close-btn":"Display chart","cc-tile-status-codes.tooltip":({value:e,percent:t})=>{const o=l("request")(e);return`${b.format(e)} ${o} (${f.format(t)})`},"cc-tile-status-codes.error":"Something went wrong while loading HTTP response codes.","cc-tile-status-codes.empty":"No data to display for now.","cc-tile-status-codes.docs.msg":"Repartition of HTTP response codes returned in the last 24 hours. Click on legend items to show/hide HTTP code categories.","cc-tile-status-codes.docs.link":()=>s`<a href="https://developer.mozilla.org/en/docs/Web/HTTP/Status">HTTP response status codes (MDN)</a>`,"cc-input-text.clipboard":"Copy to clipboard","cc-input-text.secret.show":"Show secret","cc-input-text.secret.hide":"Hide secret","cc-logsmap.mode.points":"Realtime","cc-logsmap.mode.heatmap":"Last 24h","cc-logsmap.legend.points":({orgaName:e})=>s`Realtime map of HTTP requests received by all apps from <strong>${e}</strong>.`,"cc-logsmap.legend.points.app":({appName:e})=>s`Realtime map of HTTP requests received by <strong>${e}</strong>.`,"cc-logsmap.legend.heatmap":({orgaName:e})=>s`Heatmap of HTTP requests received by all apps from <strong>${e}</strong> during the last 24 hours.`,"cc-logsmap.legend.heatmap.app":({appName:e})=>s`Heatmap of HTTP requests received by <strong>${e}</strong> during the last 24 hours.`,"cc-map.error":"Something went wrong while trying to fetch data for the map.","cc-map.no-points":"No data to display on the map right now.","cc-env-var-create.name.placeholder":"VARIABLE_NAME","cc-env-var-create.value.placeholder":"variable value","cc-env-var-create.create-button":"Add","cc-env-var-create.errors.invalid-name":({name:e})=>s`Name <code>${e}</code> is invalid`,"cc-env-var-create.errors.already-defined-name":({name:e})=>s`Name <code>${e}</code> is already defined`,"cc-env-var-editor-simple.empty-data":"There are no variables.","cc-env-var-editor-expert.placeholder":'VARIABLE_NAME="variable value"',"cc-env-var-editor-expert.placeholder-readonly":"There are no variables.","cc-env-var-editor-expert.errors.unknown":"Unknown Error","cc-env-var-editor-expert.errors.line":"line","cc-env-var-editor-expert.errors.invalid-name":({name:e})=>s`<code>${e}</code> is not a valid variable name`,"cc-env-var-editor-expert.errors.duplicated-name":({name:e})=>s`be careful, the name <code>${e}</code> is already defined`,"cc-env-var-editor-expert.errors.invalid-line":()=>s`this line is not valid, the correct pattern is: <code>NAME="VALUE"</code>`,"cc-env-var-editor-expert.errors.invalid-value":()=>s`the value is not valid, if you use quotes, you need to escape them like this: <code>\\"</code> or quote the whole value.`,"cc-env-var-linked-services.description.addon":({serviceName:e,appName:t})=>s`List of variables exposed by the add-on <strong>${e}</strong>.<br>Those variables will be injected as environment variables in the application <strong>${t}</strong>.`,"cc-env-var-linked-services.description.app":({serviceName:e,appName:t})=>s`Configuration exposed by the application <strong>${e}</strong>.<br>Those variables will be injected as environement variables in the application <strong>${t}</strong>.`,"cc-env-var-linked-services.empty.addon":({appName:e})=>s`No add-ons linked to <strong>${e}</strong>.`,"cc-env-var-linked-services.empty.app":({appName:e})=>s`No applications linked to <strong>${e}</strong>.`,"cc-env-var-linked-services.error.addon":({appName:e})=>s`Something went wrong while loading add-ons linked to <strong>${e}</strong>.`,"cc-env-var-linked-services.error.app":({appName:e})=>s`Something went wrong while loading applications linked to <strong>${e}</strong>.`,"cc-env-var-linked-services.heading.addon":({name:e})=>`Add-on: ${e}`,"cc-env-var-linked-services.heading.app":({name:e})=>`Application: ${e}`,"cc-env-var-linked-services.loading.addon":({appName:e})=>s`Loading variables exposed by add-ons linked to <strong>${e}</strong>...`,"cc-env-var-linked-services.loading.app":({appName:e})=>s`Loading configuration exposed by applications linked to <strong>${e}</strong>...`,"cc-env-var-form.mode.simple":"Simple","cc-env-var-form.mode.expert":"Expert","cc-env-var-form.reset":"Reset changes","cc-env-var-form.restart-app":"Restart the app to apply changes","cc-env-var-form.update":"Update changes","cc-env-var-form.error.loading":"Something went wrong while loading variables.","cc-env-var-form.error.saving":"Something went wrong while updating variables.","cc-env-var-form.error.unknown":"Something went wrong...","cc-env-var-form.heading.env-var":"Environment variables","cc-env-var-form.heading.exposed-config":"Exposed configuration","cc-env-var-form.description.env-var":({appName:e})=>s`List of environment variables that will be injected in the application <strong>${e}</strong>. <a href="http://doc.clever-cloud.com/admin-console/environment-variables/">Learn more</a>`,"cc-env-var-form.description.exposed-config":({appName:e})=>s`Configuration exposed to dependent applications.<br>Those variables won't be injected in the application <strong>${e}</strong>, they will be injected as environment variables in applications that have <strong>${e}</strong> in their service dependencies. <a href="https://www.clever-cloud.com/doc/admin-console/service-dependencies/">Learn more</a>`,"cc-env-var-input.delete-button":"Remove","cc-env-var-input.keep-button":"Keep","cc-env-var-input.value-placeholder":"variable value","cc-zone.country":({code:e,name:t})=>k({code:e,name:t}),"cc-zone-input.error":"Something went wrong while loading zones.","cc-zone-input.private-map-warning":"Private zones don't appear on the map."};export{d as lang,T as translations}; | ||
`,"cc-tcp-redirection-form.empty":"You do not have access to any namespaces.","cc-tcp-redirection-form.error":"An error occured while loading TCP redirections.","cc-tcp-redirection-form.title":"TCP Redirections","cc-tile-consumption.title":"Credits consumption","cc-tile-consumption.yesterday":"Yesterday","cc-tile-consumption.last-30-days":"Last 30 days","cc-tile-consumption.amount":({amount:e})=>c("en",e),"cc-tile-consumption.error":"Something went wrong while loading consumption info.","cc-tile-deployments.title":"Last deployments","cc-tile-deployments.state.failed":"Failed","cc-tile-deployments.state.started":"Started","cc-tile-deployments.state.cancelled":"Cancelled","cc-tile-deployments.state.stopped":"Stopped","cc-tile-deployments.empty":"No deployments yet.","cc-tile-deployments.error":"Something went wrong while loading deployments info.","cc-tile-instances.title":"Instances","cc-tile-instances.status.deploying":"Deploying","cc-tile-instances.status.running":"Running","cc-tile-instances.empty":"No instances. Your app is stopped.","cc-tile-instances.error":"Something went wrong while loading instances.","cc-tile-requests.title":"HTTP requests","cc-tile-requests.about-btn":"About this chart...","cc-tile-requests.close-btn":"Display chart","cc-tile-requests.date-hours":({date:e})=>o("en",e),"cc-tile-requests.date-tooltip":({from:e,to:t})=>`${a("en",e)}: from ${o("en",e)} to ${o("en",t)}`,"cc-tile-requests.requests-nb":({value:e,windowHours:t})=>{const a=h("request")(e),o=h("hour")(t);return`${s("en",e)} ${a} (in ${t} ${o})`},"cc-tile-requests.requests-nb.total":({totalRequests:e})=>{const t=h("request")(e);return`${g(e)} ${t} in 24 hours`},"cc-tile-requests.requests-count":({requestCount:e})=>g(e),"cc-tile-requests.empty":"No data to display for now.","cc-tile-requests.error":"Something went wrong while loading HTTP requests.","cc-tile-requests.docs.msg":({windowHours:e})=>{const t=h("hour")(e);return p`HTTP requests received in the last 24 hours. Each bar represents a time window of <strong>${e} ${t}</strong>.`},"cc-tile-scalability.title":"Scalability","cc-tile-scalability.size":"Size","cc-tile-scalability.number":"Number","cc-tile-scalability.flavor-info":e=>b(e),"cc-tile-scalability.error":"Something went wrong while loading scalability config.","cc-tile-status-codes.title":"HTTP response codes","cc-tile-status-codes.about-btn":"About this chart...","cc-tile-status-codes.close-btn":"Display chart","cc-tile-status-codes.tooltip":({value:e,percent:t})=>{const a=h("request")(e);return`${s("en",e)} ${a} (${r("en",t)})`},"cc-tile-status-codes.error":"Something went wrong while loading HTTP response codes.","cc-tile-status-codes.empty":"No data to display for now.","cc-tile-status-codes.docs.msg":"Repartition of HTTP response codes returned in the last 24 hours. Click on legend items to show/hide HTTP code categories.","cc-tile-status-codes.docs.link":()=>p`<a href="https://developer.mozilla.org/en/docs/Web/HTTP/Status">HTTP response status codes (MDN)</a>`,"cc-input-text.clipboard":"Copy to clipboard","cc-input-text.secret.show":"Show secret","cc-input-text.secret.hide":"Hide secret","cc-logsmap.mode.points":"Realtime","cc-logsmap.mode.heatmap":"Last 24h","cc-logsmap.legend.points":({orgaName:e})=>p`Realtime map of HTTP requests received by all apps from <strong>${e}</strong>.`,"cc-logsmap.legend.points.app":({appName:e})=>p`Realtime map of HTTP requests received by <strong>${e}</strong>.`,"cc-logsmap.legend.heatmap":({orgaName:e})=>p`Heatmap of HTTP requests received by all apps from <strong>${e}</strong> during the last 24 hours.`,"cc-logsmap.legend.heatmap.app":({appName:e})=>p`Heatmap of HTTP requests received by <strong>${e}</strong> during the last 24 hours.`,"cc-map.error":"Something went wrong while trying to fetch data for the map.","cc-map.no-points":"No data to display on the map right now.","cc-env-var-create.name.placeholder":"VARIABLE_NAME","cc-env-var-create.value.placeholder":"variable value","cc-env-var-create.create-button":"Add","cc-env-var-create.errors.invalid-name":({name:e})=>p`Name <code>${e}</code> is invalid`,"cc-env-var-create.errors.already-defined-name":({name:e})=>p`Name <code>${e}</code> is already defined`,"cc-env-var-editor-simple.empty-data":"There are no variables.","cc-env-var-editor-expert.placeholder":'VARIABLE_NAME="variable value"',"cc-env-var-editor-expert.placeholder-readonly":"There are no variables.","cc-env-var-editor-expert.errors.unknown":"Unknown Error","cc-env-var-editor-expert.errors.line":"line","cc-env-var-editor-expert.errors.invalid-name":({name:e})=>p`<code>${e}</code> is not a valid variable name`,"cc-env-var-editor-expert.errors.duplicated-name":({name:e})=>p`be careful, the name <code>${e}</code> is already defined`,"cc-env-var-editor-expert.errors.invalid-line":()=>p`this line is not valid, the correct pattern is: <code>NAME="VALUE"</code>`,"cc-env-var-editor-expert.errors.invalid-value":()=>p`the value is not valid, if you use quotes, you need to escape them like this: <code>\\"</code> or quote the whole value.`,"cc-env-var-linked-services.description.addon":({serviceName:e,appName:t})=>p`List of variables exposed by the add-on <strong>${e}</strong>.<br>Those variables will be injected as environment variables in the application <strong>${t}</strong>.`,"cc-env-var-linked-services.description.app":({serviceName:e,appName:t})=>p`Configuration exposed by the application <strong>${e}</strong>.<br>Those variables will be injected as environement variables in the application <strong>${t}</strong>.`,"cc-env-var-linked-services.empty.addon":({appName:e})=>p`No add-ons linked to <strong>${e}</strong>.`,"cc-env-var-linked-services.empty.app":({appName:e})=>p`No applications linked to <strong>${e}</strong>.`,"cc-env-var-linked-services.error.addon":({appName:e})=>p`Something went wrong while loading add-ons linked to <strong>${e}</strong>.`,"cc-env-var-linked-services.error.app":({appName:e})=>p`Something went wrong while loading applications linked to <strong>${e}</strong>.`,"cc-env-var-linked-services.heading.addon":({name:e})=>`Add-on: ${e}`,"cc-env-var-linked-services.heading.app":({name:e})=>`Application: ${e}`,"cc-env-var-linked-services.loading.addon":({appName:e})=>p`Loading variables exposed by add-ons linked to <strong>${e}</strong>...`,"cc-env-var-linked-services.loading.app":({appName:e})=>p`Loading configuration exposed by applications linked to <strong>${e}</strong>...`,"cc-env-var-form.mode.simple":"Simple","cc-env-var-form.mode.expert":"Expert","cc-env-var-form.reset":"Reset changes","cc-env-var-form.restart-app":"Restart the app to apply changes","cc-env-var-form.update":"Update changes","cc-env-var-form.error.loading":"Something went wrong while loading variables.","cc-env-var-form.error.saving":"Something went wrong while updating variables.","cc-env-var-form.error.unknown":"Something went wrong...","cc-env-var-form.heading.env-var":"Environment variables","cc-env-var-form.heading.exposed-config":"Exposed configuration","cc-env-var-form.description.env-var":({appName:e})=>p`List of environment variables that will be injected in the application <strong>${e}</strong>. <a href="http://doc.clever-cloud.com/admin-console/environment-variables/">Learn more</a>`,"cc-env-var-form.description.exposed-config":({appName:e})=>p`Configuration exposed to dependent applications.<br>Those variables won't be injected in the application <strong>${e}</strong>, they will be injected as environment variables in applications that have <strong>${e}</strong> in their service dependencies. <a href="https://www.clever-cloud.com/doc/admin-console/service-dependencies/">Learn more</a>`,"cc-env-var-input.delete-button":"Remove","cc-env-var-input.keep-button":"Keep","cc-env-var-input.value-placeholder":"variable value","cc-zone.country":({code:e,name:t})=>i("en",e,t),"cc-zone-input.error":"Something went wrong while loading zones.","cc-zone-input.private-map-warning":"Private zones don't appear on the map.","cc-pricing-table.add-button":"Add","cc-pricing-table.plan":"Plan","cc-pricing-table.price":({price:e,code:t})=>c("en",e,{currency:t}),"cc-pricing-table.price-name-daily":"Price (daily)","cc-pricing-table.price-name-monthly":()=>p`Price (30 days)`,"cc-pricing-table.feature.connection-limit":"Connection limit","cc-pricing-table.feature.cpu":"vCPUs","cc-pricing-table.feature.databases":"Databases","cc-pricing-table.feature.disk-size":"Disk size","cc-pricing-table.feature.gpu":"GPUs","cc-pricing-table.feature.has-logs":"Logs","cc-pricing-table.feature.has-metrics":"Metrics","cc-pricing-table.feature.max-db-size":"Max DB size","cc-pricing-table.feature.memory":"RAM","cc-pricing-table.feature.version":"Version","cc-pricing-table.type.boolean":({boolean:e})=>""+(e?"Yes":"No"),"cc-pricing-table.type.boolean-shared":({shared:e})=>""+(e?"Shared":"Dedicated"),"cc-pricing-table.type.bytes":({bytes:e})=>v(e,0,3),"cc-pricing-table.type.number":({number:e})=>s("en",e),"cc-pricing-table.type.number-cpu-runtime":({cpu:e,shared:t})=>t?p`<em title="Lower priority access to vCPU">${s("en",e)}<code>*</code></em>`:s("en",e),"cc-pricing-product.error":"An error occured while loading pricing details."};export{u as lang,f as translations}; | ||
//# sourceMappingURL=translations.en.js.map |
@@ -1,2 +0,2 @@ | ||
import{prepareFormatDistanceToNow as e,prepareFormatDate as a,prepareFormatDatetime as t,prepareFormatDateOnly as n,prepareFormatHours as r}from"../lib/i18n-date.js";import{prepareCountryName as s}from"../lib/i18n-display.js";import{prepareNumberUnitFormatter as c,prepareNumberBytesFormatter as o}from"../lib/i18n-number.js";import{sanitize as i}from"../lib/i18n-sanitize.js";const d="fr";function l(e,a=e+"s"){return t=>t<=1?e:a}const p={year:"année",month:"mois",week:"semaine",day:"jour",hour:"heure",minute:"minute",second:"seconde"},u=e("fr",((e,a)=>{const t=p[a];return`il y a ${e} ${t.endsWith("s")?l(t,t)(e):l(t)(e)}`}),"à l'instant"),m=a("fr"),v=t("fr"),g=n("fr"),f=r("fr"),h=new Intl.NumberFormat("fr",{style:"currency",currency:"EUR"}),b=new Intl.NumberFormat("fr",{style:"percent",minimumFractionDigits:1,maximumFractionDigits:1}),$=new Intl.NumberFormat("fr"),y=c("fr"),k=o("fr","o"," "),q=s("fr");function C(e){return[`CPUs : ${e.cpus}`+(e.microservice?" (partagé)":""),e.gpus>0?`GPUs : ${e.gpus}`:"",`RAM : ${k(1024*e.mem*1024)}`].filter((e=>e)).join("\n")}const z={LANGUAGE:"🇫🇷 Français","cc-addon-backups.command-password":"Cette commande vous demandera votre mot de passe, le voici :","cc-addon-backups.close-btn":"Fermer ce panneau","cc-addon-backups.delete":({createdAt:e})=>i`Supprimer la sauvegarde du <strong title="${m(e)}">${v(e)}</strong>`,"cc-addon-backups.delete.btn":"supprimer...","cc-addon-backups.delete.with-service.title.es-addon":"Suppression avec Kibana","cc-addon-backups.delete.with-service.description.es-addon":({href:e})=>i`Vous pouvez supprimer cette sauvegarde avec Kibana en vous rendant sur le <a href="${e}">dépôt de sauvegardes</a>.`,"cc-addon-backups.delete.manual.title":"Suppression manuelle","cc-addon-backups.delete.manual.description.es-addon":"Vous pouvez supprimer cette sauvegarde manuellement grâce à l'outil cURL en exécutant cette commande :","cc-addon-backups.description.es-addon":"Les sauvegardes sont gérées par Elasticsearch lui-même. Vous pouvez définir la rétention ainsi que la périodicité des sauvegardes dans l'interface de Kibana.","cc-addon-backups.description.es-addon-old":"Les sauvegardes sont gérées par Elasticsearch lui-même. La version de votre Elasticsearch ne permet pas de définir de politique de rétention. La suppression d'une sauvegarde se fait manuellement avec l'API d'Elasticsearch.","cc-addon-backups.empty":"Il n'y a aucune sauvegarde pour l'instant.","cc-addon-backups.link.es-addon":"ouvrir dans Kibana","cc-addon-backups.link.es-addon-old":"ouvrir dans Elasticsearch","cc-addon-backups.loading-error":"Une erreur est survenue pendant le chargement des sauvegardes.","cc-addon-backups.restore":({createdAt:e})=>i`Restaurer la sauvegarde du <strong title="${m(e)}">${v(e)}</strong>`,"cc-addon-backups.restore.btn":"restaurer...","cc-addon-backups.restore.with-service.title.es-addon":"Restauration avec Kibana","cc-addon-backups.restore.with-service.description.es-addon":({href:e})=>i`Vous pouvez restaurer cette sauvegarde avec Kibana en vous rendant sur le <a href="${e}">dépôt de sauvegardes</a>.`,"cc-addon-backups.restore.manual.title":"Restauration manuelle","cc-addon-backups.restore.manual.description.es-addon":"Vous pouvez restaurer cette sauvegarde manuellement grâce à l'outil cURL en exécutant cette commande :","cc-addon-backups.text":({createdAt:e,expiresAt:a})=>i`Sauvegarde du <strong title="${m(e)}">${v(e)}</strong> (expire le <strong>${g(a)}</strong>)`,"cc-addon-backups.text.user-defined-retention":({createdAt:e})=>i`Sauvegarde du <strong title="${m(e)}">${v(e)}</strong> (expire après la durée de rétention définie)`,"cc-addon-backups.title":"Sauvegardes","cc-addon-credentials.description.apm":"Utilisez ces identifiants pour connecter une instance d'APM Server à votre cluster Elasticsearch.","cc-addon-credentials.description.elasticsearch":"Utilisez ces identifiants pour vous connecter à votre cluster Elasticsearch.","cc-addon-credentials.description.kibana":"Utilisez ces identifiants pour connecter une instance de Kibana à votre cluster Elasticsearch.","cc-addon-credentials.description.pulsar":"Utilisez ces informations pour vous connecter à votre add-on Pulsar.","cc-addon-credentials.field.auth-token":"Token d'authentification","cc-addon-credentials.field.host":"Nom de domaine","cc-addon-credentials.field.password":"Mot de passe","cc-addon-credentials.field.url":"URL","cc-addon-credentials.field.user":"Utilisateur","cc-addon-credentials.loading-error":"Une erreur est survenue pendant le chargement des informations de connexion.","cc-addon-credentials.title":({name:e})=>`Identifiants ${e}`,"cc-addon-elasticsearch-options.title":"Options pour la Suite Elastic","cc-addon-elasticsearch-options.description":()=>i`Cet add-on fait partie de l'offre Suite Elastic qui inclue deux options. Ces options sont déployées comme des applications et seront gérées et mises à jour par Clever Cloud. Elles apparaîtront donc comme des applications habituelles que vous pouvez arrêter, supprimer, scaler comme n'importe quelle autre application. <strong>Activer ces options augmentera votre consommation de crédits.</strong>`,"cc-addon-elasticsearch-options.description.kibana":()=>i`Kibana est l'interface d'administration de la Suite Elastic. Kibana vous permet de visualiser vos données Elasticsearch et de naviguer dans la Suite Elastic. Vous voulez effectuer le suivi de la charge de travail liée à la recherche ou comprendre le flux des requêtes dans vos applications ? Kibana est là pour ça. Retrouvez plus de détails dans <a href="https://www.elastic.co/guide/en/kibana/master/index.html">la documentation officielle de Kibana</a>.`,"cc-addon-elasticsearch-options.description.apm":()=>i`Elastic APM est un serveur de monitoring de performance applicative pour la Suite Elastic. Déployer cette option permet d'envoyer automatiquement les métriques de toute application liée à cette instance d'add-on Elasticsearch, en supposant que vous utilisez bien l'agent Elastic APM dans les dépendances de vos applications. Retrouvez plus de détails dans <a href="https://www.elastic.co/guide/en/apm/get-started/current/overview.html">la documentation officielle de APM server</a>.`,"cc-addon-elasticsearch-options.warning.kibana":"Si vous activez cette option, nous allons déployer et gérer pour vous un Kibana, ce qui entraînera des coûts supplémentaires.","cc-addon-elasticsearch-options.warning.kibana.details":e=>i`Par défaut, l'app sera démarrée sur une <strong title="${C(e)}">instance ${e.name}</strong> qui coûte environ <strong>${h.format(e.monthlyCost)} par mois</strong>.`,"cc-addon-elasticsearch-options.warning.apm":"Si vous activez cette option, nous allons déployer et gérer pour vous un APM server, ce qui entraînera des coûts supplémentaires.","cc-addon-elasticsearch-options.warning.apm.details":e=>i`Par défaut, l'app sera démarrée sur une <strong title="${C(e)}">instance ${e.name}</strong> qui coûte environ <strong>${h.format(e.monthlyCost)} par mois</strong>. `,"cc-addon-encryption-at-rest-option.description":()=>i`Le chiffrement au repos chiffre l'intégralité du disque de données afin de ne pas y stocker d'informations en clair. Grâce à cette sécurité, l'accès physique au disque empêchera toute lecture des données stockées. Plus d'information dans notre <a href="https://www.clever-cloud.com/doc/administrate/encryption-at-rest/">documentation</a>.`,"cc-addon-encryption-at-rest-option.title":"Chiffrement au repos","cc-addon-encryption-at-rest-option.warning":({percent:e,price:a})=>i`Cette option est actuellement gratuite. Dans le futur, elle sera facturée ${b.format(e)} du prix du plan, ce qui dans ce cas fait <strong>${h.format(a)} par mois.</strong>`,"cc-addon-features.details":"Ci-dessous, les spécifications de votre add-on. Elles peuvent évoluer et une migration de l'add-on peut être nécessaire pour en bénéficier.","cc-addon-features.feature-name.disk":"Disque","cc-addon-features.feature-name.memory":"Mémoire","cc-addon-features.feature-name.nodes":"Nœuds","cc-addon-features.feature-value.dedicated":"Dédié","cc-addon-features.feature-value.no":"Non","cc-addon-features.feature-value.yes":"Oui","cc-addon-features.loading-error":"Une erreur est survenue pendant le chargement des spécifications de l'add-on","cc-addon-features.title":"Spécifications","cc-addon-jenkins-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on Jenkins.","cc-addon-jenkins-options.title":"Options pour l'add-on Jenkins","cc-addon-linked-apps.details":"Ci-dessous la liste des applications liées à l'add-on. L'add-on expose ses variables d'environnement aux applications qui lui sont liées.","cc-addon-linked-apps.loading-error":"Une erreur est survenue pendant le chargement des applications liées.","cc-addon-linked-apps.no-linked-applications":"Aucune application liée pour l'instant.","cc-addon-linked-apps.title":"Applications liées","cc-addon-mongodb-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on MongoDB.","cc-addon-mongodb-options.title":"Options pour l'add-on MongoDB","cc-addon-mysql-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on MySQL.","cc-addon-mysql-options.title":"Options pour l'add-on MySQL","cc-addon-option.enabled":"Activé","cc-addon-option.disabled":"Désactivé","cc-addon-option-form.confirm":"Confirmer les options","cc-addon-postgresql-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on PostgreSQL.","cc-addon-postgresql-options.title":"Options pour l'add-on PostgreSQL","cc-addon-redis-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on Redis.","cc-addon-redis-options.title":"Options pour l'add-on Redis","cc-beta.label":"bêta","cc-error.ok":"OK","cc-block.toggle.open":"Ouvrir","cc-block.toggle.close":"Fermer","cc-button.cancel":"Cliquez pour annuler","cc-datetime-relative.distance":({date:e})=>u(e),"cc-datetime-relative.title":({date:e})=>m(e),"cc-elasticsearch-info.error":"Une erreur est survenue pendant le chargement des liens des add-on liés à cette application.","cc-elasticsearch-info.info":"Info","cc-elasticsearch-info.link.apm":"Ouvrir APM","cc-elasticsearch-info.link.doc":"Lire la documentation","cc-elasticsearch-info.link.elasticsearch":"Voir l'add-on Elasticsearch","cc-elasticsearch-info.link.kibana":"Ouvrir Kibana","cc-elasticsearch-info.text":"Cet add-on fait partie de l'offre Suite Elastic. Vous pouvez retrouver la documentation ainsi que les différents services liés ci-dessous.","cc-header-addon.plan":"Plan","cc-header-addon.version":"Version","cc-header-addon.creation-date":"Date de création","cc-header-addon.creation-date.short":({date:e})=>g(e),"cc-header-addon.creation-date.full":({date:e})=>m(e),"cc-header-addon.error":"Une erreur est survenue pendant le chargement des informations de l'add-on.","cc-header-app.action.cancel-deployment":"Annuler le déploiement","cc-header-app.action.restart":"Redémarrer","cc-header-app.action.restart-last-commit":"Redémarrer le dernier commit poussé","cc-header-app.action.restart-rebuild":"Re-build et redémarrer","cc-header-app.action.start":"Démarrer","cc-header-app.action.start-last-commit":"Démarrer le dernier commit poussé","cc-header-app.action.start-rebuild":"Re-build et démarrer","cc-header-app.action.stop":"Arrêter l'application","cc-header-app.disable-buttons":"Vous n'êtes pas autorisé à réaliser ces actions","cc-header-app.read-logs":"voir les logs","cc-header-app.commits.no-commits":"pas encore de commit","cc-header-app.commits.git":({commit:e})=>`version du dépôt git (HEAD) : ${e}`,"cc-header-app.commits.running":({commit:e})=>`version en ligne : ${e}`,"cc-header-app.commits.starting":({commit:e})=>`version en cours de déploiement : ${e}`,"cc-header-app.state-msg.app-is-restarting":"L'application redémarre...","cc-header-app.state-msg.app-is-running":"Votre application est disponible !","cc-header-app.state-msg.app-is-starting":"L'application démarre...","cc-header-app.state-msg.app-is-stopped":"L'application est arrêtée.","cc-header-app.state-msg.last-deploy-failed":"Le dernier déploiement a échoué,","cc-header-app.state-msg.unknown-state":"État inconnu, essayez de redémarrer l'application ou de contacter notre support si vous avez des questions.","cc-header-app.user-action-msg.app-will-start":"L'application va bientôt démarrer...","cc-header-app.user-action-msg.deploy-will-begin":"Un déploiement va bientôt commencer...","cc-header-app.user-action-msg.deploy-cancelled":"Ce déploiement a été annulé.","cc-header-app.user-action-msg.app-will-stop":"L'application va s'arrêter...","cc-header-app.error":"Une erreur est survenue pendant le chargement des informations de l'application.","cc-header-orga.hotline":"Numéro d'urgence :","cc-header-orga.error":"Une erreur est survenue pendant le chargement des informations de l'organisation.","cc-heptapod-info.private-active-users-description":"Utilisateurs privés","cc-heptapod-info.public-active-users-description":"Utilisateurs publics","cc-heptapod-info.storage-bytes":({storage:e})=>k(e,1),"cc-heptapod-info.storage-description":"Stockage utilisé","cc-heptapod-info.price-value":({price:e})=>`${h.format(e)} / mois`,"cc-heptapod-info.price-description":"Prix estimé","cc-heptapod-info.not-in-use":"Vous n'utilisez pas ce service Heptapod.","cc-heptapod-info.description":()=>i`Cette instance Heptapod héberge des dépôts Mercurial. Plus d'informations sur <a href="https://about.heptapod.host" rel="noreferrer noopener">https://about.heptapod.host</a>.`,"cc-heptapod-info.error-loading":"Une erreur est survenue pendant le chargement des informations d'utilisation.","cc-invoice.download-pdf":"Télécharger le PDF","cc-invoice.error":"Une erreur est survenue pendant le chargement de la facture.","cc-invoice.info":({date:e,amount:a})=>i`Cette facture a été émise le <strong>${g(e)}</strong> pour un total de <strong>${h.format(a)}</strong>.`,"cc-invoice.title":"Facture","cc-invoice-list.error":"Une erreur est survenue pendant le chargement des factures.","cc-invoice-list.pending":"Factures en attente de paiement","cc-invoice-list.pending.no-invoices":"Il n'y a aucune facture en attente de paiement pour le moment.","cc-invoice-list.processed":"Factures réglées","cc-invoice-list.processed.no-invoices":"Il n'y a aucune facture réglée pour le moment.","cc-invoice-list.processing":"Factures dont le paiement est en cours de validation","cc-invoice-list.title":"Factures","cc-invoice-list.year":"Année :","cc-invoice-table.date.emission":"Date d'émission","cc-invoice-table.date.value":({date:e})=>`${g(e)}`,"cc-invoice-table.number":"Numéro","cc-invoice-table.open-pdf":"Télécharger le PDF","cc-invoice-table.pay":"Régler","cc-invoice-table.text":({number:e,date:a,amount:t})=>i`Facture <strong>${e}</strong> émise le <strong>${g(a)}</strong> pour un total de <code>${h.format(t)}</code>`,"cc-invoice-table.total.label":"Total","cc-invoice-table.total.value":({amount:e})=>`${h.format(e)}`,"cc-addon-admin.addon-name":"Nom de l'add-on","cc-addon-admin.admin":"Administration","cc-addon-admin.danger-zone":"Zone de danger","cc-addon-admin.delete":"Supprimer l'add-on","cc-addon-admin.delete-description":()=>i`La machine virtuelle sera arrêtée dans 24 heures.<br>Les backups seront gardés suivant la politique de rétention.<br>Supprimer cet add-on le rendra directement indisponible.`,"cc-addon-admin.error-loading":"Une erreur est survenue pendant le chargement des informations de l'add-on.","cc-addon-admin.error-saving":"Une erreur est survenue pendant la sauvegarde des modifications","cc-addon-admin.tags":"Tags","cc-addon-admin.tags-description":"Les tags vous permettent de classer vos applications et add-ons afin de les catégoriser","cc-addon-admin.tags-empty":"Pas de tags définis","cc-addon-admin.tags-update":"Mettre à jour les tags","cc-addon-admin.update":"Mettre à jour le nom","cc-tcp-redirection.create-button":"Créer","cc-tcp-redirection.delete-button":"Supprimer","cc-tcp-redirection.retry-button":"Réessayer","cc-tcp-redirection.namespace-additionaldescription-cleverapps":()=>i`Cet espace de nommage est utilisé par tous les noms de domaine <em>cleverapps.io</em> (p. ex. <em>mon-application.cleverapps.io</em>).`,"cc-tcp-redirection.namespace-additionaldescription-default":()=>i`Cet espace de nommage est utilisé par tous les noms de domaine personnalisés (p. ex. <em>mon-application.fr</em>).`,"cc-tcp-redirection.namespace-private":"Cet espace de nommage vous est dédié.","cc-tcp-redirection.redirection-defined":({namespace:e,sourcePort:a})=>i`Cette application a une redirection du port <code>${a}</code> vers le port <code>4040</code> dans l'espace de nommage <strong>${e}</strong>.`,"cc-tcp-redirection.redirection-not-defined":({namespace:e})=>i`Vous pouvez créer une redirection dans l'espace de nommage <strong>${e}</strong>.`,"cc-tcp-redirection.error.redirection-defined":({namespace:e,sourcePort:a})=>i`Une erreur est survenue pendant la suppression de la redirection du port <code>${a}</code> vers le port <code>4040</code> dans l'espace de nommage <strong>${e}</strong>.`,"cc-tcp-redirection.error.redirection-not-defined":({namespace:e})=>i`Une erreur est survenue pendant la création d'une redirection dans l'espace de nommage <strong>${e}</strong>.`,"cc-tcp-redirection-form.description":()=>i` | ||
import{formatDate as e,formatDatetime as r,formatDateOnly as a,formatHours as n,prepareFormatDistanceToNow as t}from"../lib/i18n-date.js";import{getCountryName as s}from"../lib/i18n-display.js";import{formatCurrency as c,formatPercent as i,formatNumber as o,prepareNumberUnitFormatter as d,prepareNumberBytesFormatter as l}from"../lib/i18n-number.js";import{sanitize as p}from"../lib/i18n-sanitize.js";const u="fr";function m(e,r=e+"s"){return a=>a<=1?e:r}const v={year:"année",month:"mois",week:"semaine",day:"jour",hour:"heure",minute:"minute",second:"seconde"},g=t("fr",((e,r)=>{const a=v[r];return`il y a ${e} ${a.endsWith("s")?m(a,a)(e):m(a)(e)}`}),"à l'instant"),f=d("fr"),h=l("fr","o"," ");function b(e){return[`CPUs : ${e.cpus}`+(e.microservice?" (partagé)":""),e.gpus>0?`GPUs : ${e.gpus}`:"",`RAM : ${h(1024*e.mem*1024)}`].filter((e=>e)).join("\n")}const y={LANGUAGE:"Français","cc-addon-backups.command-password":"Cette commande vous demandera votre mot de passe, le voici :","cc-addon-backups.close-btn":"Fermer ce panneau","cc-addon-backups.delete":({createdAt:a})=>p`Supprimer la sauvegarde du <strong title="${e("fr",a)}">${r("fr",a)}</strong>`,"cc-addon-backups.delete.btn":"supprimer...","cc-addon-backups.delete.with-service.title.es-addon":"Suppression avec Kibana","cc-addon-backups.delete.with-service.description.es-addon":({href:e})=>p`Vous pouvez supprimer cette sauvegarde avec Kibana en vous rendant sur le <a href="${e}">dépôt de sauvegardes</a>.`,"cc-addon-backups.delete.manual.title":"Suppression manuelle","cc-addon-backups.delete.manual.description.es-addon":"Vous pouvez supprimer cette sauvegarde manuellement grâce à l'outil cURL en exécutant cette commande :","cc-addon-backups.description.es-addon":"Les sauvegardes sont gérées par Elasticsearch lui-même. Vous pouvez définir la rétention ainsi que la périodicité des sauvegardes dans l'interface de Kibana.","cc-addon-backups.description.es-addon-old":"Les sauvegardes sont gérées par Elasticsearch lui-même. La version de votre Elasticsearch ne permet pas de définir de politique de rétention. La suppression d'une sauvegarde se fait manuellement avec l'API d'Elasticsearch.","cc-addon-backups.empty":"Il n'y a aucune sauvegarde pour l'instant.","cc-addon-backups.link.es-addon":"ouvrir dans Kibana","cc-addon-backups.link.es-addon-old":"ouvrir dans Elasticsearch","cc-addon-backups.loading-error":"Une erreur est survenue pendant le chargement des sauvegardes.","cc-addon-backups.restore":({createdAt:a})=>p`Restaurer la sauvegarde du <strong title="${e("fr",a)}">${r("fr",a)}</strong>`,"cc-addon-backups.restore.btn":"restaurer...","cc-addon-backups.restore.with-service.title.es-addon":"Restauration avec Kibana","cc-addon-backups.restore.with-service.description.es-addon":({href:e})=>p`Vous pouvez restaurer cette sauvegarde avec Kibana en vous rendant sur le <a href="${e}">dépôt de sauvegardes</a>.`,"cc-addon-backups.restore.manual.title":"Restauration manuelle","cc-addon-backups.restore.manual.description.es-addon":"Vous pouvez restaurer cette sauvegarde manuellement grâce à l'outil cURL en exécutant cette commande :","cc-addon-backups.text":({createdAt:n,expiresAt:t})=>p`Sauvegarde du <strong title="${e("fr",n)}">${r("fr",n)}</strong> (expire le <strong>${a("fr",t)}</strong>)`,"cc-addon-backups.text.user-defined-retention":({createdAt:a})=>p`Sauvegarde du <strong title="${e("fr",a)}">${r("fr",a)}</strong> (expire après la durée de rétention définie)`,"cc-addon-backups.title":"Sauvegardes","cc-addon-credentials.description.apm":"Utilisez ces identifiants pour connecter une instance d'APM Server à votre cluster Elasticsearch.","cc-addon-credentials.description.elasticsearch":"Utilisez ces identifiants pour vous connecter à votre cluster Elasticsearch.","cc-addon-credentials.description.kibana":"Utilisez ces identifiants pour connecter une instance de Kibana à votre cluster Elasticsearch.","cc-addon-credentials.description.pulsar":"Utilisez ces informations pour vous connecter à votre add-on Pulsar.","cc-addon-credentials.field.auth-token":"Token d'authentification","cc-addon-credentials.field.host":"Nom de domaine","cc-addon-credentials.field.password":"Mot de passe","cc-addon-credentials.field.url":"URL","cc-addon-credentials.field.user":"Utilisateur","cc-addon-credentials.loading-error":"Une erreur est survenue pendant le chargement des informations de connexion.","cc-addon-credentials.title":({name:e})=>`Identifiants ${e}`,"cc-addon-elasticsearch-options.title":"Options pour la Suite Elastic","cc-addon-elasticsearch-options.description":()=>p`Cet add-on fait partie de l'offre Suite Elastic qui inclue deux options. Ces options sont déployées comme des applications et seront gérées et mises à jour par Clever Cloud. Elles apparaîtront donc comme des applications habituelles que vous pouvez arrêter, supprimer, scaler comme n'importe quelle autre application. <strong>Activer ces options augmentera votre consommation de crédits.</strong>`,"cc-addon-elasticsearch-options.description.kibana":()=>p`Kibana est l'interface d'administration de la Suite Elastic. Kibana vous permet de visualiser vos données Elasticsearch et de naviguer dans la Suite Elastic. Vous voulez effectuer le suivi de la charge de travail liée à la recherche ou comprendre le flux des requêtes dans vos applications ? Kibana est là pour ça. Retrouvez plus de détails dans <a href="https://www.elastic.co/guide/en/kibana/master/index.html">la documentation officielle de Kibana</a>.`,"cc-addon-elasticsearch-options.description.apm":()=>p`Elastic APM est un serveur de monitoring de performance applicative pour la Suite Elastic. Déployer cette option permet d'envoyer automatiquement les métriques de toute application liée à cette instance d'add-on Elasticsearch, en supposant que vous utilisez bien l'agent Elastic APM dans les dépendances de vos applications. Retrouvez plus de détails dans <a href="https://www.elastic.co/guide/en/apm/get-started/current/overview.html">la documentation officielle de APM server</a>.`,"cc-addon-elasticsearch-options.warning.kibana":"Si vous activez cette option, nous allons déployer et gérer pour vous un Kibana, ce qui entraînera des coûts supplémentaires.","cc-addon-elasticsearch-options.warning.kibana.details":e=>p`Par défaut, l'app sera démarrée sur une <strong title="${b(e)}">instance ${e.name}</strong> qui coûte environ <strong>${c("fr",e.monthlyCost)} par mois</strong>.`,"cc-addon-elasticsearch-options.warning.apm":"Si vous activez cette option, nous allons déployer et gérer pour vous un APM server, ce qui entraînera des coûts supplémentaires.","cc-addon-elasticsearch-options.warning.apm.details":e=>p`Par défaut, l'app sera démarrée sur une <strong title="${b(e)}">instance ${e.name}</strong> qui coûte environ <strong>${c("fr",e.monthlyCost)} par mois</strong>. `,"cc-addon-encryption-at-rest-option.description":()=>p`Le chiffrement au repos chiffre l'intégralité du disque de données afin de ne pas y stocker d'informations en clair. Grâce à cette sécurité, l'accès physique au disque empêchera toute lecture des données stockées. Plus d'information dans notre <a href="https://www.clever-cloud.com/doc/administrate/encryption-at-rest/">documentation</a>.`,"cc-addon-encryption-at-rest-option.title":"Chiffrement au repos","cc-addon-encryption-at-rest-option.warning":({percent:e,price:r})=>p`Cette option est actuellement gratuite. Dans le futur, elle sera facturée ${i("fr",e)} du prix du plan, ce qui dans ce cas fait <strong>${c("fr",r)} par mois.</strong>`,"cc-addon-features.details":"Ci-dessous, les spécifications de votre add-on. Elles peuvent évoluer et une migration de l'add-on peut être nécessaire pour en bénéficier.","cc-addon-features.feature-name.disk":"Disque","cc-addon-features.feature-name.memory":"Mémoire","cc-addon-features.feature-name.nodes":"Nœuds","cc-addon-features.feature-value.dedicated":"Dédié","cc-addon-features.feature-value.no":"Non","cc-addon-features.feature-value.yes":"Oui","cc-addon-features.loading-error":"Une erreur est survenue pendant le chargement des spécifications de l'add-on","cc-addon-features.title":"Spécifications","cc-addon-jenkins-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on Jenkins.","cc-addon-jenkins-options.title":"Options pour l'add-on Jenkins","cc-addon-linked-apps.details":"Ci-dessous la liste des applications liées à l'add-on. L'add-on expose ses variables d'environnement aux applications qui lui sont liées.","cc-addon-linked-apps.loading-error":"Une erreur est survenue pendant le chargement des applications liées.","cc-addon-linked-apps.no-linked-applications":"Aucune application liée pour l'instant.","cc-addon-linked-apps.title":"Applications liées","cc-addon-mongodb-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on MongoDB.","cc-addon-mongodb-options.title":"Options pour l'add-on MongoDB","cc-addon-mysql-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on MySQL.","cc-addon-mysql-options.title":"Options pour l'add-on MySQL","cc-addon-option.enabled":"Activé","cc-addon-option.disabled":"Désactivé","cc-addon-option-form.confirm":"Confirmer les options","cc-addon-postgresql-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on PostgreSQL.","cc-addon-postgresql-options.title":"Options pour l'add-on PostgreSQL","cc-addon-redis-options.description":"Sélectionnez les options que vous souhaitez pour votre add-on Redis.","cc-addon-redis-options.title":"Options pour l'add-on Redis","cc-beta.label":"bêta","cc-error.ok":"OK","cc-block.toggle.open":"Ouvrir","cc-block.toggle.close":"Fermer","cc-button.cancel":"Cliquez pour annuler","cc-datetime-relative.distance":({date:e})=>g(e),"cc-datetime-relative.title":({date:r})=>e("fr",r),"cc-elasticsearch-info.error":"Une erreur est survenue pendant le chargement des liens des add-on liés à cette application.","cc-elasticsearch-info.info":"Info","cc-elasticsearch-info.link.apm":"Ouvrir APM","cc-elasticsearch-info.link.doc":"Lire la documentation","cc-elasticsearch-info.link.elasticsearch":"Voir l'add-on Elasticsearch","cc-elasticsearch-info.link.kibana":"Ouvrir Kibana","cc-elasticsearch-info.text":"Cet add-on fait partie de l'offre Suite Elastic. Vous pouvez retrouver la documentation ainsi que les différents services liés ci-dessous.","cc-header-addon.plan":"Plan","cc-header-addon.version":"Version","cc-header-addon.creation-date":"Date de création","cc-header-addon.creation-date.short":({date:e})=>a("fr",e),"cc-header-addon.creation-date.full":({date:r})=>e("fr",r),"cc-header-addon.error":"Une erreur est survenue pendant le chargement des informations de l'add-on.","cc-header-app.action.cancel-deployment":"Annuler le déploiement","cc-header-app.action.restart":"Redémarrer","cc-header-app.action.restart-last-commit":"Redémarrer le dernier commit poussé","cc-header-app.action.restart-rebuild":"Re-build et redémarrer","cc-header-app.action.start":"Démarrer","cc-header-app.action.start-last-commit":"Démarrer le dernier commit poussé","cc-header-app.action.start-rebuild":"Re-build et démarrer","cc-header-app.action.stop":"Arrêter l'application","cc-header-app.disable-buttons":"Vous n'êtes pas autorisé à réaliser ces actions","cc-header-app.read-logs":"voir les logs","cc-header-app.commits.no-commits":"pas encore de commit","cc-header-app.commits.git":({commit:e})=>`version du dépôt git (HEAD) : ${e}`,"cc-header-app.commits.running":({commit:e})=>`version en ligne : ${e}`,"cc-header-app.commits.starting":({commit:e})=>`version en cours de déploiement : ${e}`,"cc-header-app.state-msg.app-is-restarting":"L'application redémarre...","cc-header-app.state-msg.app-is-running":"Votre application est disponible !","cc-header-app.state-msg.app-is-starting":"L'application démarre...","cc-header-app.state-msg.app-is-stopped":"L'application est arrêtée.","cc-header-app.state-msg.last-deploy-failed":"Le dernier déploiement a échoué,","cc-header-app.state-msg.unknown-state":"État inconnu, essayez de redémarrer l'application ou de contacter notre support si vous avez des questions.","cc-header-app.user-action-msg.app-will-start":"L'application va bientôt démarrer...","cc-header-app.user-action-msg.deploy-will-begin":"Un déploiement va bientôt commencer...","cc-header-app.user-action-msg.deploy-cancelled":"Ce déploiement a été annulé.","cc-header-app.user-action-msg.app-will-stop":"L'application va s'arrêter...","cc-header-app.error":"Une erreur est survenue pendant le chargement des informations de l'application.","cc-header-orga.hotline":"Numéro d'urgence :","cc-header-orga.error":"Une erreur est survenue pendant le chargement des informations de l'organisation.","cc-heptapod-info.private-active-users-description":"Utilisateurs privés","cc-heptapod-info.public-active-users-description":"Utilisateurs publics","cc-heptapod-info.storage-bytes":({storage:e})=>h(e,1),"cc-heptapod-info.storage-description":"Stockage utilisé","cc-heptapod-info.price-value":({price:e})=>`${c("fr",e)} / mois`,"cc-heptapod-info.price-description":"Prix estimé","cc-heptapod-info.not-in-use":"Vous n'utilisez pas ce service Heptapod.","cc-heptapod-info.description":()=>p`Cette instance Heptapod héberge des dépôts Mercurial. Plus d'informations sur <a href="https://about.heptapod.host" rel="noreferrer noopener">https://about.heptapod.host</a>.`,"cc-heptapod-info.error-loading":"Une erreur est survenue pendant le chargement des informations d'utilisation.","cc-invoice.download-pdf":"Télécharger le PDF","cc-invoice.error":"Une erreur est survenue pendant le chargement de la facture.","cc-invoice.info":({date:e,amount:r})=>p`Cette facture a été émise le <strong>${a("fr",e)}</strong> pour un total de <strong>${c("fr",r)}</strong>.`,"cc-invoice.title":"Facture","cc-invoice-list.error":"Une erreur est survenue pendant le chargement des factures.","cc-invoice-list.pending":"Factures en attente de paiement","cc-invoice-list.pending.no-invoices":"Il n'y a aucune facture en attente de paiement pour le moment.","cc-invoice-list.processed":"Factures réglées","cc-invoice-list.processed.no-invoices":"Il n'y a aucune facture réglée pour le moment.","cc-invoice-list.processing":"Factures dont le paiement est en cours de validation","cc-invoice-list.title":"Factures","cc-invoice-list.year":"Année :","cc-invoice-table.date.emission":"Date d'émission","cc-invoice-table.date.value":({date:e})=>`${a("fr",e)}`,"cc-invoice-table.number":"Numéro","cc-invoice-table.open-pdf":"Télécharger le PDF","cc-invoice-table.pay":"Régler","cc-invoice-table.text":({number:e,date:r,amount:n})=>p`Facture <strong>${e}</strong> émise le <strong>${a("fr",r)}</strong> pour un total de <code>${c("fr",n)}</code>`,"cc-invoice-table.total.label":"Total","cc-invoice-table.total.value":({amount:e})=>`${c("fr",e)}`,"cc-addon-admin.addon-name":"Nom de l'add-on","cc-addon-admin.admin":"Administration","cc-addon-admin.danger-zone":"Zone de danger","cc-addon-admin.delete":"Supprimer l'add-on","cc-addon-admin.delete-description":()=>p`La machine virtuelle sera arrêtée dans 24 heures.<br>Les backups seront gardés suivant la politique de rétention.<br>Supprimer cet add-on le rendra directement indisponible.`,"cc-addon-admin.error-loading":"Une erreur est survenue pendant le chargement des informations de l'add-on.","cc-addon-admin.error-saving":"Une erreur est survenue pendant la sauvegarde des modifications","cc-addon-admin.tags":"Tags","cc-addon-admin.tags-description":"Les tags vous permettent de classer vos applications et add-ons afin de les catégoriser","cc-addon-admin.tags-empty":"Pas de tags définis","cc-addon-admin.tags-update":"Mettre à jour les tags","cc-addon-admin.update":"Mettre à jour le nom","cc-tcp-redirection.create-button":"Créer","cc-tcp-redirection.delete-button":"Supprimer","cc-tcp-redirection.retry-button":"Réessayer","cc-tcp-redirection.namespace-additionaldescription-cleverapps":()=>p`Cet espace de nommage est utilisé par tous les noms de domaine <em>cleverapps.io</em> (p. ex. <em>mon-application.cleverapps.io</em>).`,"cc-tcp-redirection.namespace-additionaldescription-default":()=>p`Cet espace de nommage est utilisé par tous les noms de domaine personnalisés (p. ex. <em>mon-application.fr</em>).`,"cc-tcp-redirection.namespace-private":"Cet espace de nommage vous est dédié.","cc-tcp-redirection.redirection-defined":({namespace:e,sourcePort:r})=>p`Cette application a une redirection du port <code>${r}</code> vers le port <code>4040</code> dans l'espace de nommage <strong>${e}</strong>.`,"cc-tcp-redirection.redirection-not-defined":({namespace:e})=>p`Vous pouvez créer une redirection dans l'espace de nommage <strong>${e}</strong>.`,"cc-tcp-redirection.error.redirection-defined":({namespace:e,sourcePort:r})=>p`Une erreur est survenue pendant la suppression de la redirection du port <code>${r}</code> vers le port <code>4040</code> dans l'espace de nommage <strong>${e}</strong>.`,"cc-tcp-redirection.error.redirection-not-defined":({namespace:e})=>p`Une erreur est survenue pendant la création d'une redirection dans l'espace de nommage <strong>${e}</strong>.`,"cc-tcp-redirection-form.description":()=>p` | ||
<p> | ||
@@ -9,3 +9,3 @@ Une redirection TCP permet d'obtenir un accès au port <code>4040</code> de l'application au travers des frontaux.<br> | ||
</p> | ||
`,"cc-tcp-redirection-form.empty":"Vous n'avez accès à aucun espace de nommage.","cc-tcp-redirection-form.error":"Une erreur est survenue pendant le chargement des redirections TCP.","cc-tcp-redirection-form.title":"Redirections TCP","cc-tile-consumption.title":"Consommation de crédits","cc-tile-consumption.yesterday":"Hier","cc-tile-consumption.last-30-days":"30 derniers jours","cc-tile-consumption.amount":({amount:e})=>h.format(e),"cc-tile-consumption.error":"Une erreur est survenue pendant le chargement de la consommation.","cc-tile-deployments.title":"Derniers déploiements","cc-tile-deployments.state.failed":"Échoué","cc-tile-deployments.state.started":"Démarré","cc-tile-deployments.state.cancelled":"Annulé","cc-tile-deployments.state.stopped":"Arrêté","cc-tile-deployments.empty":"Pas encore de déploiement.","cc-tile-deployments.error":"Une erreur est survenue pendant le chargement des déploiements.","cc-tile-instances.title":"Instances","cc-tile-instances.status.deploying":"Déploiement","cc-tile-instances.status.running":"En ligne","cc-tile-instances.empty":"Pas d'instance. L'application est arrêtée.","cc-tile-instances.error":"Une erreur est survenue pendant le chargement des instances.","cc-tile-requests.title":"Requêtes HTTP","cc-tile-requests.about-btn":"À propos de ce graphe...","cc-tile-requests.close-btn":"Afficher le graphe","cc-tile-requests.date-hours":({date:e})=>f(e),"cc-tile-requests.date-tooltip":({from:e,to:a})=>`${g(e)} : de ${f(e)} à ${f(a)}`,"cc-tile-requests.requests-nb":({value:e,windowHours:a})=>{const t=l("requête")(e),n=l("heure")(a);return`${$.format(e)} ${t} (en ${a} ${n})`},"cc-tile-requests.requests-nb.total":({totalRequests:e})=>{const a=l("requête")(e);return`${y(e)} ${a} sur 24 heures`},"cc-tile-requests.requests-count":({requestCount:e})=>y(e),"cc-tile-requests.empty":"Il n'y a pas de données à afficher pour l'instant.","cc-tile-requests.error":"Une erreur est survenue pendant le chargement des requêtes.","cc-tile-requests.docs.msg":({windowHours:e})=>{const a=l("heure")(e);return i`Requêtes HTTP reçues durant les dernières 24 heures. Chaque barre représente une fenêtre de temps de <strong>${e} ${a}</strong>.`},"cc-tile-scalability.title":"Scalabilité","cc-tile-scalability.size":"Taille","cc-tile-scalability.number":"Nombre","cc-tile-scalability.flavor-info":e=>C(e),"cc-tile-scalability.error":"Une erreur est survenue pendant le chargement de la configuration de scalabilité.","cc-tile-status-codes.title":"Codes de réponses HTTP","cc-tile-status-codes.about-btn":"À propos de ce graphe...","cc-tile-status-codes.close-btn":"Afficher le graphe","cc-tile-status-codes.tooltip":({value:e,percent:a})=>{const t=l("requête")(e);return`${$.format(e)} ${t} (${b.format(a)})`},"cc-tile-status-codes.error":"Une erreur est survenue pendant le chargement des codes de réponses HTTP.","cc-tile-status-codes.empty":"Il n'y a pas de données à afficher pour l'instant.","cc-tile-status-codes.docs.msg":"Répartition des codes de réponses HTTP envoyés durant les dernières 24 heures. Cliquez sur les éléments de légende pour cacher/montrer certaines catégories de codes.","cc-tile-status-codes.docs.link":()=>i`<a href="https://developer.mozilla.org/fr/docs/Web/HTTP/Status">Codes de réponses HTTP (MDN)</a>`,"cc-input-text.clipboard":"Copier dans le presse-papier","cc-input-text.secret.show":"Afficher le secret","cc-input-text.secret.hide":"Cacher le secret","cc-logsmap.mode.points":"En direct","cc-logsmap.mode.heatmap":"Dernières 24h","cc-logsmap.legend.points":({orgaName:e})=>i`Carte temps réel des requêtes HTTP reçues par toutes les applications de <strong>${e}</strong>.`,"cc-logsmap.legend.points.app":({appName:e})=>i`Carte temps réel des requêtes HTTP reçues par l'application <strong>${e}</strong>.`,"cc-logsmap.legend.heatmap":({orgaName:e})=>i`Carte de chaleur des requêtes HTTP reçues par les applications de <strong>${e}</strong> durant les dernières 24 heures.`,"cc-logsmap.legend.heatmap.app":({appName:e})=>i`Carte de chaleur des requêtes HTTP reçues par l'application <strong>${e}</strong> durant les dernières 24 heures.`,"cc-map.error":"Une erreur est survenue pendant le chargement des données de la carte.","cc-map.no-points":"Pas de données à afficher sur la carte en ce moment.","cc-env-var-create.name.placeholder":"NOM_DE_LA_VARIABLE","cc-env-var-create.value.placeholder":"valeur de la variable","cc-env-var-create.create-button":"Ajouter","cc-env-var-create.errors.invalid-name":({name:e})=>i`Le nom <code>${e}</code> n'est pas valide`,"cc-env-var-create.errors.already-defined-name":({name:e})=>i`Le nom <code>${e}</code> est déjà défini`,"cc-env-var-editor-simple.empty-data":"Il n'y a pas de variable.","cc-env-var-editor-expert.placeholder":'NOM_DE_LA_VARIABLE="valeur de la variable"',"cc-env-var-editor-expert.placeholder-readonly":"Il n'y a pas de variable.","cc-env-var-editor-expert.errors.unknown":"Erreur inconnue","cc-env-var-editor-expert.errors.line":"ligne","cc-env-var-editor-expert.errors.invalid-name":({name:e})=>i`Le nom <code>${e}</code> n'est pas valide`,"cc-env-var-editor-expert.errors.duplicated-name":({name:e})=>i`attention, le nom <code>${e}</code> est déjà défini`,"cc-env-var-editor-expert.errors.invalid-line":()=>i`cette ligne est invalide, le format correct est : <code>NOM="VALEUR"</code>`,"cc-env-var-editor-expert.errors.invalid-value":()=>i`la valeur est invalide, si vous utilisez des guillements, vous devez les échapper comme ceci : <code>\\"</code> ou alors mettre toute la valeur entre guillemets.`,"cc-env-var-linked-services.description.addon":({serviceName:e,appName:a})=>i`Liste des variables exposées par l'add-on <strong>${e}</strong>.<br>Ces variables seront injectées en tant que variables d'environnement dans l'application <strong>${a}</strong>.`,"cc-env-var-linked-services.description.app":({serviceName:e,appName:a})=>i`Configuration publiée par l'application <strong>${e}</strong>.<br>Ces variables seront injectées en tant que variables d'environnement dans l'application <strong>${a}</strong>.`,"cc-env-var-linked-services.empty.addon":({appName:e})=>i`Aucun add-on lié à <strong>${e}</strong>.`,"cc-env-var-linked-services.empty.app":({appName:e})=>i`Aucune application liée à <strong>${e}</strong>.`,"cc-env-var-linked-services.error.addon":({appName:e})=>i`Une erreur est survenue pendant le chargement des add-ons liés à <strong>${e}</strong>.`,"cc-env-var-linked-services.error.app":({appName:e})=>i`Une erreur est survenue pendant le chargement des applications liées à <strong>${e}</strong>.`,"cc-env-var-linked-services.heading.addon":({name:e})=>`Add-on : ${e}`,"cc-env-var-linked-services.heading.app":({name:e})=>`Application : ${e}`,"cc-env-var-linked-services.loading.addon":({appName:e})=>i`Chargement des variables exposées par les add-ons liés à <strong>${e}</strong>...`,"cc-env-var-linked-services.loading.app":({appName:e})=>i`Chargement de la configuration publiée par les applications liées à <strong>${e}</strong>...`,"cc-env-var-form.mode.simple":"Simple","cc-env-var-form.mode.expert":"Expert","cc-env-var-form.reset":"Annuler les changements","cc-env-var-form.restart-app":"Redémarrer l'app pour appliquer les changements","cc-env-var-form.update":"Mettre à jour les changements","cc-env-var-form.error.loading":"Une erreur est survenue pendant le chargement des variables.","cc-env-var-form.error.saving":"Une erreur est survenue pendant la mise à jour des variables.","cc-env-var-form.error.unknown":"Une erreur est survenue...","cc-env-var-form.heading.env-var":"Variables d'environnement","cc-env-var-form.heading.exposed-config":"Configuration publiée","cc-env-var-form.description.env-var":({appName:e})=>i`Liste des variables d'environnement qui seront injectées dans l'application <strong>${e}</strong>. <a href="http://doc.clever-cloud.com/admin-console/environment-variables/">En savoir plus</a>`,"cc-env-var-form.description.exposed-config":({appName:e})=>i`Configuration publiée pour les applications dépendantes.<br>Ces variables ne seront pas injectées dans l'application <strong>${e}</strong>, elles seront injectées en tant que variables d'environnement dans les applications qui ont <strong>${e}</strong> dans leurs services liés. <a href="https://www.clever-cloud.com/doc/admin-console/service-dependencies/">En savoir plus</a>`,"cc-env-var-input.delete-button":"Enlever","cc-env-var-input.keep-button":"Garder","cc-env-var-input.value-placeholder":"valeur de la variable","cc-zone.country":({code:e,name:a})=>q({code:e,name:a}),"cc-zone-input.error":"Une erreur est survenue pendant le chargement des zones.","cc-zone-input.private-map-warning":"Les zones privées n'apparaissent pas sur la carte."};export{d as lang,z as translations}; | ||
`,"cc-tcp-redirection-form.empty":"Vous n'avez accès à aucun espace de nommage.","cc-tcp-redirection-form.error":"Une erreur est survenue pendant le chargement des redirections TCP.","cc-tcp-redirection-form.title":"Redirections TCP","cc-tile-consumption.title":"Consommation de crédits","cc-tile-consumption.yesterday":"Hier","cc-tile-consumption.last-30-days":"30 derniers jours","cc-tile-consumption.amount":({amount:e})=>c("fr",e),"cc-tile-consumption.error":"Une erreur est survenue pendant le chargement de la consommation.","cc-tile-deployments.title":"Derniers déploiements","cc-tile-deployments.state.failed":"Échoué","cc-tile-deployments.state.started":"Démarré","cc-tile-deployments.state.cancelled":"Annulé","cc-tile-deployments.state.stopped":"Arrêté","cc-tile-deployments.empty":"Pas encore de déploiement.","cc-tile-deployments.error":"Une erreur est survenue pendant le chargement des déploiements.","cc-tile-instances.title":"Instances","cc-tile-instances.status.deploying":"Déploiement","cc-tile-instances.status.running":"En ligne","cc-tile-instances.empty":"Pas d'instance. L'application est arrêtée.","cc-tile-instances.error":"Une erreur est survenue pendant le chargement des instances.","cc-tile-requests.title":"Requêtes HTTP","cc-tile-requests.about-btn":"À propos de ce graphe...","cc-tile-requests.close-btn":"Afficher le graphe","cc-tile-requests.date-hours":({date:e})=>n("fr",e),"cc-tile-requests.date-tooltip":({from:e,to:r})=>`${a("fr",e)} : de ${n("fr",e)} à ${n("fr",r)}`,"cc-tile-requests.requests-nb":({value:e,windowHours:r})=>{const a=m("requête")(e),n=m("heure")(r);return`${o("fr",e)} ${a} (en ${r} ${n})`},"cc-tile-requests.requests-nb.total":({totalRequests:e})=>{const r=m("requête")(e);return`${f(e)} ${r} sur 24 heures`},"cc-tile-requests.requests-count":({requestCount:e})=>f(e),"cc-tile-requests.empty":"Il n'y a pas de données à afficher pour l'instant.","cc-tile-requests.error":"Une erreur est survenue pendant le chargement des requêtes.","cc-tile-requests.docs.msg":({windowHours:e})=>{const r=m("heure")(e);return p`Requêtes HTTP reçues durant les dernières 24 heures. Chaque barre représente une fenêtre de temps de <strong>${e} ${r}</strong>.`},"cc-tile-scalability.title":"Scalabilité","cc-tile-scalability.size":"Taille","cc-tile-scalability.number":"Nombre","cc-tile-scalability.flavor-info":e=>b(e),"cc-tile-scalability.error":"Une erreur est survenue pendant le chargement de la configuration de scalabilité.","cc-tile-status-codes.title":"Codes de réponses HTTP","cc-tile-status-codes.about-btn":"À propos de ce graphe...","cc-tile-status-codes.close-btn":"Afficher le graphe","cc-tile-status-codes.tooltip":({value:e,percent:r})=>{const a=m("requête")(e);return`${o("fr",e)} ${a} (${i("fr",r)})`},"cc-tile-status-codes.error":"Une erreur est survenue pendant le chargement des codes de réponses HTTP.","cc-tile-status-codes.empty":"Il n'y a pas de données à afficher pour l'instant.","cc-tile-status-codes.docs.msg":"Répartition des codes de réponses HTTP envoyés durant les dernières 24 heures. Cliquez sur les éléments de légende pour cacher/montrer certaines catégories de codes.","cc-tile-status-codes.docs.link":()=>p`<a href="https://developer.mozilla.org/fr/docs/Web/HTTP/Status">Codes de réponses HTTP (MDN)</a>`,"cc-input-text.clipboard":"Copier dans le presse-papier","cc-input-text.secret.show":"Afficher le secret","cc-input-text.secret.hide":"Cacher le secret","cc-logsmap.mode.points":"En direct","cc-logsmap.mode.heatmap":"Dernières 24h","cc-logsmap.legend.points":({orgaName:e})=>p`Carte temps réel des requêtes HTTP reçues par toutes les applications de <strong>${e}</strong>.`,"cc-logsmap.legend.points.app":({appName:e})=>p`Carte temps réel des requêtes HTTP reçues par l'application <strong>${e}</strong>.`,"cc-logsmap.legend.heatmap":({orgaName:e})=>p`Carte de chaleur des requêtes HTTP reçues par les applications de <strong>${e}</strong> durant les dernières 24 heures.`,"cc-logsmap.legend.heatmap.app":({appName:e})=>p`Carte de chaleur des requêtes HTTP reçues par l'application <strong>${e}</strong> durant les dernières 24 heures.`,"cc-map.error":"Une erreur est survenue pendant le chargement des données de la carte.","cc-map.no-points":"Pas de données à afficher sur la carte en ce moment.","cc-env-var-create.name.placeholder":"NOM_DE_LA_VARIABLE","cc-env-var-create.value.placeholder":"valeur de la variable","cc-env-var-create.create-button":"Ajouter","cc-env-var-create.errors.invalid-name":({name:e})=>p`Le nom <code>${e}</code> n'est pas valide`,"cc-env-var-create.errors.already-defined-name":({name:e})=>p`Le nom <code>${e}</code> est déjà défini`,"cc-env-var-editor-simple.empty-data":"Il n'y a pas de variable.","cc-env-var-editor-expert.placeholder":'NOM_DE_LA_VARIABLE="valeur de la variable"',"cc-env-var-editor-expert.placeholder-readonly":"Il n'y a pas de variable.","cc-env-var-editor-expert.errors.unknown":"Erreur inconnue","cc-env-var-editor-expert.errors.line":"ligne","cc-env-var-editor-expert.errors.invalid-name":({name:e})=>p`Le nom <code>${e}</code> n'est pas valide`,"cc-env-var-editor-expert.errors.duplicated-name":({name:e})=>p`attention, le nom <code>${e}</code> est déjà défini`,"cc-env-var-editor-expert.errors.invalid-line":()=>p`cette ligne est invalide, le format correct est : <code>NOM="VALEUR"</code>`,"cc-env-var-editor-expert.errors.invalid-value":()=>p`la valeur est invalide, si vous utilisez des guillements, vous devez les échapper comme ceci : <code>\\"</code> ou alors mettre toute la valeur entre guillemets.`,"cc-env-var-linked-services.description.addon":({serviceName:e,appName:r})=>p`Liste des variables exposées par l'add-on <strong>${e}</strong>.<br>Ces variables seront injectées en tant que variables d'environnement dans l'application <strong>${r}</strong>.`,"cc-env-var-linked-services.description.app":({serviceName:e,appName:r})=>p`Configuration publiée par l'application <strong>${e}</strong>.<br>Ces variables seront injectées en tant que variables d'environnement dans l'application <strong>${r}</strong>.`,"cc-env-var-linked-services.empty.addon":({appName:e})=>p`Aucun add-on lié à <strong>${e}</strong>.`,"cc-env-var-linked-services.empty.app":({appName:e})=>p`Aucune application liée à <strong>${e}</strong>.`,"cc-env-var-linked-services.error.addon":({appName:e})=>p`Une erreur est survenue pendant le chargement des add-ons liés à <strong>${e}</strong>.`,"cc-env-var-linked-services.error.app":({appName:e})=>p`Une erreur est survenue pendant le chargement des applications liées à <strong>${e}</strong>.`,"cc-env-var-linked-services.heading.addon":({name:e})=>`Add-on : ${e}`,"cc-env-var-linked-services.heading.app":({name:e})=>`Application : ${e}`,"cc-env-var-linked-services.loading.addon":({appName:e})=>p`Chargement des variables exposées par les add-ons liés à <strong>${e}</strong>...`,"cc-env-var-linked-services.loading.app":({appName:e})=>p`Chargement de la configuration publiée par les applications liées à <strong>${e}</strong>...`,"cc-env-var-form.mode.simple":"Simple","cc-env-var-form.mode.expert":"Expert","cc-env-var-form.reset":"Annuler les changements","cc-env-var-form.restart-app":"Redémarrer l'app pour appliquer les changements","cc-env-var-form.update":"Mettre à jour les changements","cc-env-var-form.error.loading":"Une erreur est survenue pendant le chargement des variables.","cc-env-var-form.error.saving":"Une erreur est survenue pendant la mise à jour des variables.","cc-env-var-form.error.unknown":"Une erreur est survenue...","cc-env-var-form.heading.env-var":"Variables d'environnement","cc-env-var-form.heading.exposed-config":"Configuration publiée","cc-env-var-form.description.env-var":({appName:e})=>p`Liste des variables d'environnement qui seront injectées dans l'application <strong>${e}</strong>. <a href="http://doc.clever-cloud.com/admin-console/environment-variables/">En savoir plus</a>`,"cc-env-var-form.description.exposed-config":({appName:e})=>p`Configuration publiée pour les applications dépendantes.<br>Ces variables ne seront pas injectées dans l'application <strong>${e}</strong>, elles seront injectées en tant que variables d'environnement dans les applications qui ont <strong>${e}</strong> dans leurs services liés. <a href="https://www.clever-cloud.com/doc/admin-console/service-dependencies/">En savoir plus</a>`,"cc-env-var-input.delete-button":"Enlever","cc-env-var-input.keep-button":"Garder","cc-env-var-input.value-placeholder":"valeur de la variable","cc-zone.country":({code:e,name:r})=>s("fr",e,r),"cc-zone-input.error":"Une erreur est survenue pendant le chargement des zones.","cc-zone-input.private-map-warning":"Les zones privées n'apparaissent pas sur la carte.","cc-pricing-table.add-button":"Ajouter","cc-pricing-table.plan":"Plan","cc-pricing-table.price":({price:e,code:r})=>c("fr",e,{currency:r}),"cc-pricing-table.price-name-daily":"Prix (jour)","cc-pricing-table.price-name-monthly":()=>p`Prix (30 jours)`,"cc-pricing-table.feature.connection-limit":"Limite de connexions","cc-pricing-table.feature.cpu":"vCPUs","cc-pricing-table.feature.databases":"Bases de données","cc-pricing-table.feature.disk-size":"Taille du disque","cc-pricing-table.feature.gpu":"GPUs","cc-pricing-table.feature.has-logs":"Logs","cc-pricing-table.feature.has-metrics":"Métriques","cc-pricing-table.feature.max-db-size":"Taille BDD max","cc-pricing-table.feature.memory":"RAM","cc-pricing-table.feature.version":"Version","cc-pricing-table.type.boolean":({boolean:e})=>""+(e?"Oui":"Non"),"cc-pricing-table.type.boolean-shared":({shared:e})=>""+(e?"Partagé":"Dédié"),"cc-pricing-table.type.bytes":({bytes:e})=>h(e,0,3),"cc-pricing-table.type.number":({number:e})=>o("fr",e),"cc-pricing-table.type.number-cpu-runtime":({cpu:e,shared:r})=>r?p`<em title="Accès au vCPU moins prioritaire">${o("fr",e)}<code>*</code></em>`:o("fr",e),"cc-pricing-product.error":"Une erreur est survenue pendant le chargement des prix."};export{u as lang,y as translations}; | ||
//# sourceMappingURL=translations.fr.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as e,html as t,css as r}from"lit-element";import{classMap as o}from"lit-html/directives/class-map.js";import{dispatchCustomEvent as i}from"../lib/events.js";import{i18n as s}from"../lib/i18n.js";import{repeat as n}from"lit-html/directives/repeat.js";import"./cc-zone.js";import{withResizeObserver as a}from"../mixins/with-resize-observer.js";import"../maps/cc-map.js";import"../maps/cc-map-marker-server.js";import{scrollChildIntoParent as l}from"../lib/dom.js";const c=new Array(6).fill(null);class d extends(a(e)){static get properties(){return{error:{type:Boolean,reflect:!0},selected:{type:String},zones:{type:Array},_centerLat:{type:Number},_centerLon:{type:Number},_hovered:{type:String},_legend:{type:String},_points:{type:Array}}}constructor(e){super(e),this.error=!1,this.breakpoints={width:[600]},this._legend="",this._points=[]}_updatePoints(){Array.isArray(this.zones)&&(this._points=this.zones.filter((e=>!e.tags.includes("scope:private"))).map((e=>({name:e.name,lat:e.lat,lon:e.lon,marker:{tag:"cc-map-marker-server",state:this._getState(e.name)},tooltip:{tag:"cc-zone",zone:e,mode:"small"},zIndexOffset:this._getZIndexOffset(e.name)}))),this._legend=this.zones.some((e=>e.tags.includes("scope:private")))?s("cc-zone-input.private-map-warning"):"")}_getState(e){return this.selected===e?"selected":this._hovered===e?"hovered":"default"}_getZIndexOffset(e){return this.selected===e?200:this._hovered===e?250:0}_sortZones(e){return[...e].sort(((e,t)=>{if(null==e||null==t)return 0;const r=e.tags.includes("infra:clever-cloud"),o=t.tags.includes("infra:clever-cloud");if(r!==o)return r?-1:1;const i=e.tags.includes("scope:private"),s=t.tags.includes("scope:private");if(r&&o){if(i!==s)return i?1:-1;if(i&&s)return(e.displayName||"").localeCompare(t.displayName||"")}return i!==s?i?-1:1:e.city.localeCompare(t.city)}))}_onSelect(e){this.selected=e,i(this,"input",this.selected)}_onListHover(e){this._hovered=e,this._updatePoints(),this._panMap()}_onMarkerHover(e){this._hovered=e,this._updatePoints(),this._scrollChildIntoParent(this._hovered||this.selected)}_panMap(){clearTimeout(this._panMapTimeout),this._panMapTimeout=setTimeout((()=>{if(null!=this._hovered){const e=this.zones.find((e=>e.name===this._hovered));this._map.panInside(e.lat,e.lon)}else if(null!=this.selected){const e=this.zones.find((e=>e.name===this.selected));this._map.panInside(e.lat,e.lon)}}),200)}_scrollChildIntoParent(e){const t=this.shadowRoot.querySelector(".zone-list-wrapper"),r=this.shadowRoot.querySelector(`input[id=${e}]`);l(t,r)}_renderZoneInput(e){return null==e?t`<div class=zone><div class=label><cc-zone></cc-zone></div></div>`:t`<div class=zone-choice><input type=radio name=zone .value=${e.name} id=${e.name} .checked=${e.name===this.selected} @change=${t=>this._onSelect(e.name)}> <label for=${e.name} class="${o({hovered:e.name===this._hovered})} label" @mouseenter=${()=>this._onListHover(e.name)} @mouseleave=${()=>this._onListHover()}><cc-zone .zone=${e}></cc-zone></label></div>`}firstUpdated(){this._map=this.shadowRoot.querySelector("cc-map")}updated(e){e.has("selected")&&(this._updatePoints(),this._scrollChildIntoParent(this.selected),this._panMap()),e.has("zones")&&this._updatePoints(),super.updated(e)}render(){const e=null==this.zones,r=e?c:this.zones;return t`<cc-map view-zoom=1 center-lat=35 .points=${this._points} ?loading=${e&&!this.error} @cc-map:marker-click=${e=>this._onSelect(e.detail.name)} @cc-map:marker-enter=${e=>this._onMarkerHover(e.detail.name)} @cc-map:marker-leave=${e=>this._onMarkerHover()}>${this._legend}</cc-map><div class=zone-list-wrapper>${this.error?t`<cc-error>${s("cc-zone-input.error")}</cc-error>`:""} ${this.error?"":t`<div class=zone-list>${n(r,(e=>null!=e?e.name:""),(e=>this._renderZoneInput(e)))}</div>`}</div>`}static get styles(){return[r`:host{background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-sizing:border-box;display:flex;overflow:hidden}.zone-list-wrapper,cc-map{flex-grow:1}cc-map{border-right:1px solid #bcc2d1;flex-basis:0;height:100%;width:100%}:host([error]) cc-map,:host([w-lt-600]) cc-map{display:none}.zone-list-wrapper{box-sizing:border-box;height:100%;overflow:auto}:host(:not([error])[w-gte-600]) .zone-list-wrapper{flex-basis:24rem;max-width:24rem}:host([error]) .zone-list-wrapper{display:flex;padding:1rem}:host([error]) cc-error{margin:auto}.zone-list{margin:.5rem}.zone-list:not(:hover):focus-within{border-radius:.25rem;box-shadow:0 0 0 .2em rgba(50,115,220,.25);outline:0}.zone-choice{display:grid;overflow:hidden}.label,input{grid-area:1/1/2/2}input{-moz-appearance:none;-webkit-appearance:none;appearance:none;border:0;box-sizing:border-box;display:block;margin:-.5rem;outline:0}.label{border:2px solid var(--bd-color,transparent);border-radius:.25rem;box-sizing:border-box;display:block;padding:.5rem}label{cursor:pointer}input:checked+.label{--bd-color:#2b96fd}input:hover+.label,label.hovered{background:#f3f3f3}cc-zone{width:100%}`]}}window.customElements.define("cc-zone-input",d);export{d as CcZoneInput}; | ||
import"./cc-zone.js";import"../maps/cc-map.js";import"../maps/cc-map-marker-server.js";import{LitElement as e,html as t,css as r}from"lit-element";import{classMap as o}from"lit-html/directives/class-map.js";import{repeat as i}from"lit-html/directives/repeat.js";import{scrollChildIntoParent as s}from"../lib/dom.js";import{dispatchCustomEvent as n}from"../lib/events.js";import{i18n as a}from"../lib/i18n.js";import{withResizeObserver as l}from"../mixins/with-resize-observer.js";const c=new Array(6).fill(null);class d extends(l(e)){static get properties(){return{error:{type:Boolean,reflect:!0},selected:{type:String},zones:{type:Array},_centerLat:{type:Number},_centerLon:{type:Number},_hovered:{type:String},_legend:{type:String},_points:{type:Array}}}constructor(e){super(e),this.error=!1,this.breakpoints={width:[600]},this._legend="",this._points=[]}_updatePoints(){Array.isArray(this.zones)&&(this._points=this.zones.filter((e=>!e.tags.includes("scope:private"))).map((e=>({name:e.name,lat:e.lat,lon:e.lon,marker:{tag:"cc-map-marker-server",state:this._getState(e.name)},tooltip:{tag:"cc-zone",zone:e,mode:"small"},zIndexOffset:this._getZIndexOffset(e.name)}))),this._legend=this.zones.some((e=>e.tags.includes("scope:private")))?a("cc-zone-input.private-map-warning"):"")}_getState(e){return this.selected===e?"selected":this._hovered===e?"hovered":"default"}_getZIndexOffset(e){return this.selected===e?200:this._hovered===e?250:0}_sortZones(e){return[...e].sort(((e,t)=>{if(null==e||null==t)return 0;const r=e.tags.includes("infra:clever-cloud"),o=t.tags.includes("infra:clever-cloud");if(r!==o)return r?-1:1;const i=e.tags.includes("scope:private"),s=t.tags.includes("scope:private");if(r&&o){if(i!==s)return i?1:-1;if(i&&s)return(e.displayName||"").localeCompare(t.displayName||"")}return i!==s?i?-1:1:e.city.localeCompare(t.city)}))}_onSelect(e){this.selected=e,n(this,"input",this.selected)}_onListHover(e){this._hovered=e,this._updatePoints(),this._panMap()}_onMarkerHover(e){this._hovered=e,this._updatePoints(),this._scrollChildIntoParent(this._hovered||this.selected)}_panMap(){clearTimeout(this._panMapTimeout),this._panMapTimeout=setTimeout((()=>{if(null!=this._hovered){const e=this.zones.find((e=>e.name===this._hovered));this._map.panInside(e.lat,e.lon)}else if(null!=this.selected){const e=this.zones.find((e=>e.name===this.selected));this._map.panInside(e.lat,e.lon)}}),200)}_scrollChildIntoParent(e){const t=this.shadowRoot.querySelector(".zone-list-wrapper"),r=this.shadowRoot.querySelector(`input[id=${e}]`);s(t,r)}_renderZoneInput(e){return null==e?t`<div class=zone><div class=label><cc-zone></cc-zone></div></div>`:t`<div class=zone-choice><input type=radio name=zone .value=${e.name} id=${e.name} .checked=${e.name===this.selected} @change=${t=>this._onSelect(e.name)}> <label for=${e.name} class="${o({hovered:e.name===this._hovered})} label" @mouseenter=${()=>this._onListHover(e.name)} @mouseleave=${()=>this._onListHover()}><cc-zone .zone=${e}></cc-zone></label></div>`}firstUpdated(){this._map=this.shadowRoot.querySelector("cc-map")}updated(e){e.has("selected")&&(this._updatePoints(),this._scrollChildIntoParent(this.selected),this._panMap()),e.has("zones")&&this._updatePoints(),super.updated(e)}render(){const e=null==this.zones,r=e?c:this.zones;return t`<cc-map view-zoom=1 center-lat=35 .points=${this._points} ?loading=${e&&!this.error} @cc-map:marker-click=${e=>this._onSelect(e.detail.name)} @cc-map:marker-enter=${e=>this._onMarkerHover(e.detail.name)} @cc-map:marker-leave=${e=>this._onMarkerHover()}>${this._legend}</cc-map><div class=zone-list-wrapper>${this.error?t`<cc-error>${a("cc-zone-input.error")}</cc-error>`:""} ${this.error?"":t`<div class=zone-list>${i(r,(e=>null!=e?e.name:""),(e=>this._renderZoneInput(e)))}</div>`}</div>`}static get styles(){return[r`:host{background-color:#fff;border:1px solid #bcc2d1;border-radius:.25rem;box-sizing:border-box;display:flex;overflow:hidden}.zone-list-wrapper,cc-map{flex-grow:1}cc-map{border-right:1px solid #bcc2d1;flex-basis:0;height:100%;width:100%}:host([error]) cc-map,:host([w-lt-600]) cc-map{display:none}.zone-list-wrapper{box-sizing:border-box;height:100%;overflow:auto}:host(:not([error])[w-gte-600]) .zone-list-wrapper{flex-basis:24rem;max-width:24rem}:host([error]) .zone-list-wrapper{display:flex;padding:1rem}:host([error]) cc-error{margin:auto}.zone-list{margin:.5rem}.zone-list:not(:hover):focus-within{border-radius:.25rem;box-shadow:0 0 0 .2em rgba(50,115,220,.25);outline:0}.zone-choice{display:grid;overflow:hidden}.label,input{grid-area:1/1/2/2}input{-moz-appearance:none;-webkit-appearance:none;appearance:none;border:0;box-sizing:border-box;display:block;margin:-.5rem;outline:0}.label{border:2px solid var(--bd-color,transparent);border-radius:.25rem;box-sizing:border-box;display:block;padding:.5rem}label{cursor:pointer}input:checked+.label{--bd-color:#2b96fd}input:hover+.label,label.hovered{background:#f3f3f3}cc-zone{width:100%}`]}}window.customElements.define("cc-zone-input",d);export{d as CcZoneInput}; | ||
//# sourceMappingURL=cc-zone-input.js.map |
@@ -1,2 +0,2 @@ | ||
import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as l}from"lit-html/directives/class-map.js";import{ifDefined as i}from"lit-html/directives/if-defined.js";import{i18n as r}from"../lib/i18n.js";import{defaultThemeStyles as a}from"../styles/default-theme.js";import{skeletonStyles as o}from"../styles/skeleton.js";import"../atoms/cc-img.js";import"../atoms/cc-flex-gap.js";import{getFlagUrl as n,getInfraProviderLogoUrl as m}from"../lib/remote-assets.js";const c={name:"name",country:"????????????",city:"??????????",tags:["????????","????????????"]};class d extends t{static get properties(){return{mode:{type:String,reflect:!0},zone:{type:Object}}}constructor(){super(),this.mode="default"}static getText(t){const{title:e,subtitle:s}=d._getTextParts(t);return[e,s].filter((t=>null!=t)).join(", ")}static _getTextParts(t){return t.tags.includes("scope:private")&&null!=t.displayName?{title:t.displayName}:{title:t.city,subtitle:r("cc-zone.country",{code:t.countryCode,name:t.country})}}render(){const t=null==this.zone,s=t?c:this.zone,{title:r,subtitle:a}=d._getTextParts(s),o=s.tags.find((t=>t.startsWith("infra:"))),g=null!=o?o.split(":")[1]:null;return e`<cc-img class=flag ?skeleton=${t} src=${i(n(s.countryCode))} text=${i(s.countryCode)}></cc-img><div class=wrapper-details-logo><div class=wrapper-details><div class=details><span class="${l({skeleton:t})} title">${r}</span> <span class="${l({skeleton:t})} subtitle">${a}</span></div>${null!=g?e`<cc-img class=infra-logo src=${i(m(g))} text=${i(g)}></cc-img>`:""}</div><cc-flex-gap class=tag-list>${s.tags.map((s=>e`<span class="${l({skeleton:t})} tag">${s}</span>`))}</cc-flex-gap></div>`}static get styles(){return[a,o,s`:host{--lh:1.5rem;display:flex}:host([mode=small-infra]),:host([mode=small]){--lh:1rem;font-size:.8rem!important}.flag{border-radius:.15rem;box-shadow:0 0 3px #ccc;display:inline-block;height:var(--lh);margin-right:1rem;width:2rem}:host([mode=small-infra]) .flag,:host([mode=small]) .flag{margin-right:.5rem;width:1.33rem}.wrapper-details-logo{flex:1 1 0;min-height:var(--lh)}.wrapper-details{display:flex}.details{align-self:center;flex:1 1 0;line-height:var(--lh)}.title{font-weight:700}.subtitle{color:#555}.infra-logo{--cc-img-fit:contain;height:var(--lh);margin-left:.5rem;width:4rem}:host([mode=small-infra]) .tag-list,:host([mode=small]) .infra-logo,:host([mode=small]) .tag-list{display:none}.tag-list{--cc-gap:0.5rem}.tag{background-color:rgba(50,50,255,.15);border-radius:.25rem;box-sizing:border-box;font-family:var(--cc-ff-monospace);font-size:.8rem;margin-top:.5rem;padding:.1rem .3rem}.skeleton{color:transparent!important}.skeleton:not(.tag){background-color:#bbb}`]}}window.customElements.define("cc-zone",d);export{d as CcZone}; | ||
import"../atoms/cc-flex-gap.js";import"../atoms/cc-img.js";import{LitElement as t,html as e,css as s}from"lit-element";import{classMap as l}from"lit-html/directives/class-map.js";import{ifDefined as i}from"lit-html/directives/if-defined.js";import{i18n as r}from"../lib/i18n.js";import{getFlagUrl as a,getInfraProviderLogoUrl as o}from"../lib/remote-assets.js";import{defaultThemeStyles as n}from"../styles/default-theme.js";import{skeletonStyles as m}from"../styles/skeleton.js";const c={name:"name",country:"????????????",city:"??????????",tags:["????????","????????????"]};class d extends t{static get properties(){return{mode:{type:String,reflect:!0},zone:{type:Object}}}constructor(){super(),this.mode="default"}static getText(t){const{title:e,subtitle:s}=d._getTextParts(t);return[e,s].filter((t=>null!=t)).join(", ")}static _getTextParts(t){return t.tags.includes("scope:private")&&null!=t.displayName?{title:t.displayName}:{title:t.city,subtitle:r("cc-zone.country",{code:t.countryCode,name:t.country})}}render(){const t=null==this.zone,s=t?c:this.zone,{title:r,subtitle:n}=d._getTextParts(s),m=s.tags.find((t=>t.startsWith("infra:"))),g=null!=m?m.split(":")[1]:null;return e`<cc-img class=flag ?skeleton=${t} src=${i(a(s.countryCode))} text=${i(s.countryCode)}></cc-img><div class=wrapper-details-logo><div class=wrapper-details><div class=details><span class="${l({skeleton:t})} title">${r}</span> <span class="${l({skeleton:t})} subtitle">${n}</span></div>${null!=g?e`<cc-img class=infra-logo src=${i(o(g))} text=${i(g)}></cc-img>`:""}</div><cc-flex-gap class=tag-list>${s.tags.map((s=>e`<span class="${l({skeleton:t})} tag">${s}</span>`))}</cc-flex-gap></div>`}static get styles(){return[n,m,s`:host{--lh:1.5rem;display:flex}:host([mode=small-infra]),:host([mode=small]){--lh:1rem;font-size:.8rem!important}.flag{border-radius:.15rem;box-shadow:0 0 3px #ccc;display:inline-block;height:var(--lh);margin-right:1rem;width:2rem}:host([mode=small-infra]) .flag,:host([mode=small]) .flag{margin-right:.5rem;width:1.33rem}.wrapper-details-logo{flex:1 1 0;min-height:var(--lh)}.wrapper-details{display:flex}.details{align-self:center;flex:1 1 0;line-height:var(--lh)}.title{font-weight:700}.subtitle{color:#555}.infra-logo{--cc-img-fit:contain;height:var(--lh);margin-left:.5rem;width:4rem}:host([mode=small-infra]) .tag-list,:host([mode=small]) .infra-logo,:host([mode=small]) .tag-list{display:none}.tag-list{--cc-gap:0.5rem}.tag{background-color:rgba(50,50,255,.15);border-radius:.25rem;box-sizing:border-box;font-family:var(--cc-ff-monospace);font-size:.8rem;margin-top:.5rem;padding:.1rem .3rem}.skeleton{color:transparent!important}.skeleton:not(.tag){background-color:#bbb}`]}}window.customElements.define("cc-zone",d);export{d as CcZone}; | ||
//# sourceMappingURL=cc-zone.js.map |
{ | ||
"name": "@clevercloud/components", | ||
"version": "6.4.0", | ||
"version": "6.5.1", | ||
"description": "This is a Work In Progress to introduce Web Components in our Clever Cloud Web based UIs.", | ||
@@ -49,35 +49,33 @@ "license": "Apache-2.0", | ||
"clipboard-copy": "^4.0.1", | ||
"highlight.js": "^10.4.1", | ||
"leaflet": "^1.7.1", | ||
"leaflet.heat": "^0.2.0", | ||
"lit-element": "^2.4.0", | ||
"lit-html": "^1.3.0", | ||
"lit-element": "^2.5.1", | ||
"lit-html": "^1.4.1", | ||
"resize-observer-polyfill": "^1.5.1", | ||
"rxjs": "7.0.0-beta.12", | ||
"statuses": "^2.0.0" | ||
"rxjs": "7.0.0", | ||
"statuses": "^2.0.1" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.12.10", | ||
"@babel/core": "^7.14.0", | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/plugin-syntax-import-meta": "^7.10.4", | ||
"@babel/preset-react": "^7.12.10", | ||
"@babel/preset-react": "^7.13.13", | ||
"@bundled-es-modules/chai": "^4.2.2", | ||
"@open-wc/dev-server-hmr": "^0.1.0", | ||
"@rollup/plugin-alias": "^3.1.1", | ||
"@rollup/plugin-commonjs": "^17.0.0", | ||
"@open-wc/dev-server-hmr": "^0.1.1", | ||
"@rollup/plugin-alias": "^3.1.2", | ||
"@rollup/plugin-commonjs": "^18.1.0", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^11.0.0", | ||
"@web/dev-server": "^0.1.3", | ||
"@web/dev-server-rollup": "^0.3.1", | ||
"@web/dev-server-storybook": "^0.3.2", | ||
"@web/rollup-plugin-import-meta-assets": "^1.0.4", | ||
"@web/test-runner": "^0.11.7", | ||
"@web/test-runner-mocha": "^0.6.0", | ||
"aws-sdk": "^2.808.0", | ||
"@rollup/plugin-node-resolve": "^13.0.0", | ||
"@web/dev-server": "^0.1.17", | ||
"@web/dev-server-rollup": "^0.3.3", | ||
"@web/dev-server-storybook": "^0.3.5", | ||
"@web/rollup-plugin-import-meta-assets": "^1.0.6", | ||
"@web/test-runner": "^0.13.4", | ||
"@web/test-runner-mocha": "^0.7.2", | ||
"aws-sdk": "^2.902.0", | ||
"babel-loader": "^8.2.2", | ||
"babel-plugin-inline-svg": "^1.2.0", | ||
"babel-plugin-template-html-minifier": "^4.1.0", | ||
"copy-webpack-plugin": "^5.1.1", | ||
"dependency-graph": "^0.9.0", | ||
"eslint": "^7.15.0", | ||
"dependency-graph": "^0.11.0", | ||
"eslint": "^7.25.0", | ||
"eslint-config-standard": "^16.0.2", | ||
@@ -87,14 +85,15 @@ "eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-promise": "^5.1.0", | ||
"eslint-plugin-simple-import-sort": "^7.0.0", | ||
"eslint-plugin-standard": "^5.0.0", | ||
"github-markdown-css": "^4.0.0", | ||
"glob": "^7.1.6", | ||
"hanbi": "^0.4.1", | ||
"glob": "^7.1.7", | ||
"hanbi": "^1.0.1", | ||
"highlight.js": "^10.7.2", | ||
"i18n-extract": "^0.6.7", | ||
"js-yaml": "^3.14.1", | ||
"js-yaml": "^4.1.0", | ||
"lit-analyzer": "^1.1.10", | ||
"mime-types": "^2.1.27", | ||
"mime-types": "^2.1.30", | ||
"node-static": "^0.7.11", | ||
"postcss": "^8.2.1", | ||
"postcss": "^8.2.14", | ||
"postcss-sorting": "^6.0.0", | ||
@@ -105,10 +104,10 @@ "remark-frontmatter": "^3.0.0", | ||
"remark-parse": "^9.0.0", | ||
"rollup": "^2.34.2", | ||
"rollup": "^2.47.0", | ||
"rollup-plugin-babel": "^4.4.0", | ||
"rollup-plugin-clear": "^2.0.7", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-visualizer": "^4.2.0", | ||
"rollup-plugin-visualizer": "^5.5.0", | ||
"superagent": "^6.1.0", | ||
"svgo": "^1.3.2", | ||
"unified": "^9.2.0", | ||
"unified": "^9.2.1", | ||
"web-component-analyzer": "^1.1.6" | ||
@@ -115,0 +114,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1631829
11
224
1678
1
+ Addedrxjs@7.0.0(transitive)
- Removedhighlight.js@^10.4.1
- Removedhighlight.js@10.7.3(transitive)
- Removedrxjs@7.0.0-beta.12(transitive)
Updatedlit-element@^2.5.1
Updatedlit-html@^1.4.1
Updatedrxjs@7.0.0
Updatedstatuses@^2.0.1