@creaditor/newsletter-starterkit 1.0.41 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1317.creaditor.bundle.js +3 -3
- package/dist/1317.creaditor.bundle.js.gz +0 -0
- package/dist/1529.creaditor.bundle.js +16 -0
- package/dist/1529.creaditor.bundle.js.gz +0 -0
- package/dist/1565.creaditor.bundle.js +1016 -0
- package/dist/1565.creaditor.bundle.js.gz +0 -0
- package/dist/168.creaditor.bundle.js +5 -421
- package/dist/168.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js +1 -1
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/2234.creaditor.bundle.js +1 -1
- package/dist/2234.creaditor.bundle.js.gz +0 -0
- package/dist/2384.creaditor.bundle.js +1 -1
- package/dist/2384.creaditor.bundle.js.gz +0 -0
- package/dist/2438.creaditor.bundle.js +67 -0
- package/dist/2438.creaditor.bundle.js.gz +0 -0
- package/dist/2547.creaditor.bundle.js +6 -0
- package/dist/2547.creaditor.bundle.js.gz +0 -0
- package/dist/2706.creaditor.bundle.js +2 -2
- package/dist/2706.creaditor.bundle.js.gz +0 -0
- package/dist/271.creaditor.bundle.js +99 -0
- package/dist/271.creaditor.bundle.js.gz +0 -0
- package/dist/2834.creaditor.bundle.js +14 -0
- package/dist/2834.creaditor.bundle.js.LICENSE.txt +5 -0
- package/dist/2834.creaditor.bundle.js.gz +0 -0
- package/dist/3095.creaditor.bundle.js +161 -0
- package/dist/3095.creaditor.bundle.js.gz +0 -0
- package/dist/3521.creaditor.bundle.js +2 -2
- package/dist/3521.creaditor.bundle.js.gz +0 -0
- package/dist/3553.creaditor.bundle.js +1 -1
- package/dist/3553.creaditor.bundle.js.gz +0 -0
- package/dist/3606.creaditor.bundle.js +113 -0
- package/dist/3606.creaditor.bundle.js.gz +0 -0
- package/dist/3932.creaditor.bundle.js +30 -0
- package/dist/3932.creaditor.bundle.js.gz +0 -0
- package/dist/4186.creaditor.bundle.js +453 -0
- package/dist/4186.creaditor.bundle.js.LICENSE.txt +10 -0
- package/dist/4186.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/4186.creaditor.bundle.js.gz +0 -0
- package/dist/4288.creaditor.bundle.js +98 -0
- package/dist/4288.creaditor.bundle.js.gz +0 -0
- package/dist/453.creaditor.bundle.js +111 -11
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4569.creaditor.bundle.js +1043 -19
- package/dist/4569.creaditor.bundle.js.gz +0 -0
- package/dist/4819.creaditor.bundle.js +1 -1
- package/dist/4819.creaditor.bundle.js.gz +0 -0
- package/dist/5133.creaditor.bundle.js +60 -0
- package/dist/5133.creaditor.bundle.js.gz +0 -0
- package/dist/5501.creaditor.bundle.js +112 -0
- package/dist/5501.creaditor.bundle.js.gz +0 -0
- package/dist/5713.creaditor.bundle.js +2 -152
- package/dist/5713.creaditor.bundle.js.LICENSE.txt +0 -11
- package/dist/5713.creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/5713.creaditor.bundle.js.gz +0 -0
- package/dist/574.creaditor.bundle.js +4 -68
- package/dist/574.creaditor.bundle.js.gz +0 -0
- package/dist/5849.creaditor.bundle.js +1 -1
- package/dist/5849.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js +1 -1
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/6036.creaditor.bundle.js +34 -0
- package/dist/6036.creaditor.bundle.js.gz +0 -0
- package/dist/6151.creaditor.bundle.js +1 -0
- package/dist/6151.creaditor.bundle.js.gz +0 -0
- package/dist/638.creaditor.bundle.js +23 -0
- package/dist/638.creaditor.bundle.js.gz +0 -0
- package/dist/6442.creaditor.bundle.js +236 -0
- package/dist/6442.creaditor.bundle.js.gz +0 -0
- package/dist/7307.creaditor.bundle.js +186 -0
- package/dist/7307.creaditor.bundle.js.gz +0 -0
- package/dist/741.creaditor.bundle.js +234 -0
- package/dist/741.creaditor.bundle.js.gz +0 -0
- package/dist/7466.creaditor.bundle.js +1 -1
- package/dist/7466.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js +40 -0
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/767.creaditor.bundle.js +1 -1
- package/dist/767.creaditor.bundle.js.gz +0 -0
- package/dist/8042.creaditor.bundle.js +71 -0
- package/dist/8042.creaditor.bundle.js.gz +0 -0
- package/dist/8141.creaditor.bundle.js +1 -1
- package/dist/8141.creaditor.bundle.js.gz +0 -0
- package/dist/8173.creaditor.bundle.js +3 -3
- package/dist/8173.creaditor.bundle.js.gz +0 -0
- package/dist/8443.creaditor.bundle.js +72 -0
- package/dist/8443.creaditor.bundle.js.gz +0 -0
- package/dist/8516.creaditor.bundle.js +1 -1
- package/dist/8516.creaditor.bundle.js.gz +0 -0
- package/dist/8570.creaditor.bundle.js +102 -0
- package/dist/8570.creaditor.bundle.js.gz +0 -0
- package/dist/8646.creaditor.bundle.js +122 -0
- package/dist/8646.creaditor.bundle.js.gz +0 -0
- package/dist/8654.creaditor.bundle.js +109 -0
- package/dist/8654.creaditor.bundle.js.gz +0 -0
- package/dist/8854.creaditor.bundle.js +1 -1
- package/dist/8854.creaditor.bundle.js.gz +0 -0
- package/dist/8916.creaditor.bundle.js +18 -0
- package/dist/8916.creaditor.bundle.js.gz +0 -0
- package/dist/898.creaditor.bundle.js +5 -357
- package/dist/898.creaditor.bundle.js.gz +0 -0
- package/dist/9041.creaditor.bundle.js +171 -0
- package/dist/9041.creaditor.bundle.js.gz +0 -0
- package/dist/9193.creaditor.bundle.js +1 -1
- package/dist/9193.creaditor.bundle.js.gz +0 -0
- package/dist/9990.creaditor.bundle.js +16 -0
- package/dist/9990.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +1277 -1671
- package/dist/creaditor.bundle.js.LICENSE.txt +8 -0
- package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/package.json +1 -1
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4819],{84819(t,e,o){o.r(e),o.d(e,{NameAndSubjectPlugin:()=>u});var i=o(59929),s=o(49410);o(78533);function r(){return window.___cdtr_isConsoleLogged||console.log("%cWe run on production, if you want to point to dev server, please add ?dev=1 at the url","color:green"),window.___cdtr_isConsoleLogged=!0,!1}window.___cdtr_isConsoleLogged=window.___cdtr_isConsoleLogged||!1,r(),r(),r(),r();const n=r()?"http://localhost:8000/api/v1/prompt/subject":"https://agent.creaditor.ai/api/v1/prompt/subject",a=r()?"http://localhost:8000/api/v1/prompt/subtitle":"https://agent.creaditor.ai/api/v1/prompt/subtitle";var l=Object.defineProperty,p=(t,e,o,i)=>{for(var s,r=void 0,n=t.length-1;n>=0;n--)(s=t[n])&&(r=s(e,o,r)||r);return r&&l(e,o,r),r};typeof window<"u"&&!window.__polymerElementsLoaded&&(window.__polymerElementsLoaded=!0,(async()=>{try{const t=["paper-dropdown-menu","paper-item","paper-listbox"].filter(t=>customElements.get(t));if(t.length>0)return void console.warn(`Polymer elements already loaded: ${t.join(", ")}. Skipping imports to prevent conflicts.`);if(customElements.get("dom-module"))return void console.warn("dom-module already defined, skipping Polymer element imports to prevent conflicts");await Promise.all([Promise.all([o.e(
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[4819],{84819(t,e,o){o.r(e),o.d(e,{NameAndSubjectPlugin:()=>u});var i=o(59929),s=o(49410);o(78533);function r(){return window.___cdtr_isConsoleLogged||console.log("%cWe run on production, if you want to point to dev server, please add ?dev=1 at the url","color:green"),window.___cdtr_isConsoleLogged=!0,!1}window.___cdtr_isConsoleLogged=window.___cdtr_isConsoleLogged||!1,r(),r(),r(),r();const n=r()?"http://localhost:8000/api/v1/prompt/subject":"https://agent.creaditor.ai/api/v1/prompt/subject",a=r()?"http://localhost:8000/api/v1/prompt/subtitle":"https://agent.creaditor.ai/api/v1/prompt/subtitle";var l=Object.defineProperty,p=(t,e,o,i)=>{for(var s,r=void 0,n=t.length-1;n>=0;n--)(s=t[n])&&(r=s(e,o,r)||r);return r&&l(e,o,r),r};typeof window<"u"&&!window.__polymerElementsLoaded&&(window.__polymerElementsLoaded=!0,(async()=>{try{const t=["paper-dropdown-menu","paper-item","paper-listbox"].filter(t=>customElements.get(t));if(t.length>0)return void console.warn(`Polymer elements already loaded: ${t.join(", ")}. Skipping imports to prevent conflicts.`);if(customElements.get("dom-module"))return void console.warn("dom-module already defined, skipping Polymer element imports to prevent conflicts");await Promise.all([Promise.all([o.e(59),o.e(5813),o.e(574)]).then(o.bind(o,50574)),o.e(898).then(o.bind(o,90898)),Promise.all([o.e(6216),o.e(7463)]).then(o.bind(o,97463))]),console.log("Polymer elements loaded successfully")}catch(t){console.warn("Failed to load Polymer elements:",t)}})().catch(console.error));const d="cdtr-name-and-subject-plugin",c=class extends i.WF{constructor(){super(...arguments),this.bgColor="#000",this.textColor="#000000",this.headerText="Details",this.nameLabel="Name",this.subjectLabel="Subject",this.subtitleLabel="Subtitle",this.saveButtonText="Save",this.subjectPlaceholder="Enter subject",this.mergeTags=[],this.name="",this.subject="",this.subtitle="",this.save=()=>{},this.isGeneratingSubject=!1,this.isGeneratingSubtitle=!1}getTextDirection(t){return/[\u0590-\u05FF]/.test(t)?"rtl":"ltr"}getPlaceholderStyle(){const t=this.getTextDirection(this.subjectPlaceholder);return`direction: ${t}; text-align: ${"rtl"===t?"right":"left"};`}handleSave(){"string"!=typeof this.subtitle&&(this.subtitle=""),"string"!=typeof this.subject&&(this.subject=""),this.dispatchEvent(new CustomEvent("save",{detail:{name:this.name,subject:this.subject,subtitle:this.subtitle}})),this.save(),setTimeout(()=>{var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.close()},200)}handleFieldClick(t){this.subject+=t.value,this.requestUpdate()}handleEmojiSelect(t){const e=t.detail.unicode;this.subject=this.subject+e,this.requestUpdate()}open(){var t,e;null==(e=null==(t=this.shadowRoot)?void 0:t.querySelector("#name-popover"))||e.open()}focusInputs(t){var e;this.open();const o=null==(e=this.shadowRoot)?void 0:e.querySelectorAll("input");if(o)if(o.forEach(t=>t.classList.remove("shake")),t){const e=Array.from(o).find(e=>{var o;const i=e.previousElementSibling;return null==(o=null==i?void 0:i.textContent)?void 0:o.toLowerCase().includes(t.toLowerCase())});e&&(e.focus(),e.classList.add("shake"))}else o.forEach(t=>{t.focus(),t.classList.add("shake")})}handleGenerateSubject(){if(this.isGeneratingSubject)return;const t=this.subject||"";this.subject="",this.isGeneratingSubject=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>500){const t=Math.floor(250);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:"write my subject",context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subject:",t),t}})(t=>{this.subject+=t,this.requestUpdate()}).catch(()=>{this.subject=t}).finally(()=>{this.isGeneratingSubject=!1,this.requestUpdate()})}handleGenerateSubtitle(){if(this.isGeneratingSubtitle)return;const t=this.subtitle||"";this.subtitle="",this.isGeneratingSubtitle=!0,this.requestUpdate(),(async t=>{let e="";if(Array.from(document.querySelectorAll(".text-component")).forEach(t=>{e+=`${t.textContent}\n`}),e.length>1400){const t=Math.floor(700);e=e.slice(0,t)+e.slice(-t)}try{const o=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({context:e})});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);if(!o.body)throw new Error("Response body is null");const i=o.body.getReader(),s=new TextDecoder;try{for(;;){const{done:e,value:o}=await i.read();if(e)break;const r=s.decode(o,{stream:!0}).split("data: ");for(const e of r)if(e.trim()&&!e.includes("[DONE]"))try{const o=JSON.parse(e);o.text&&t(o.text)}catch{}}}finally{i.releaseLock()}}catch(t){throw console.error("Error generating subtitle:",t),t}})(t=>{this.subtitle+=t,this.requestUpdate()}).catch(()=>{this.subtitle=t}).finally(()=>{this.isGeneratingSubtitle=!1,this.requestUpdate()})}render(){return i.qy`
|
|
2
2
|
<div class="subject-input">
|
|
3
3
|
<div class="subject-input-left">
|
|
4
4
|
<cdtr-popover width="400px">
|
|
Binary file
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5133],{15133(e,t,i){i.r(t),i.d(t,{TextArea:()=>V});var l,n,a,r,o,s,u,h,p,c,b,f,d,m,g,y,v,w,A,x,z,$,M,Z,k,S,C,R,E=i(59088),B=i(24586),U=i(36936),W=i(59929),D=i(49410),I=i(21663),N=i(21421),T=i(86319);let V=(l=(0,D.MZ)({type:String,reflect:!0}),n=(0,D.MZ)({type:String}),a=(0,D.MZ)({type:Number}),r=(0,D.MZ)({type:Boolean}),o=(0,D.MZ)({type:Number}),s=(0,D.MZ)({type:Boolean}),u=(0,D.MZ)({type:Boolean}),h=(0,D.MZ)({type:Number}),p=(0,D.MZ)({type:String}),c=(0,D.MZ)({type:Number}),b=(0,D.MZ)({type:String,reflect:!0}),f=(0,D.MZ)({type:Boolean,reflect:!0}),d=(0,D.MZ)({type:String,reflect:!0}),R=class extends W.WF{constructor(){super(),(0,E.A)(this,"value",g,this),(0,E.A)(this,"autoComplete",y,this),(0,E.A)(this,"maxlength",v,this),(0,E.A)(this,"fullWidth",w,this),(0,E.A)(this,"minlength",A,this),(0,E.A)(this,"disabled",x,this),(0,E.A)(this,"readonly",z,this),(0,E.A)(this,"rows",$,this),(0,E.A)(this,"name",M,this),(0,E.A)(this,"cols",Z,this),(0,E.A)(this,"placeholder",k,this),(0,E.A)(this,"autofocus",S,this),(0,E.A)(this,"inputStyle",C,this),(0,B.A)(this,"inputRef",(0,N._)()),this.minlength=0,this.maxlength=250,this.autofocus=!1,this.value="",this.autoComplete="off",this.placeholder="",this.fullWidth=!1,this.rows=5}onSubmit(e){e.preventDefault();const t=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onFocus(){const e=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e)}onBlur(){const e=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e)}render(){this.fullWidth&&(this.style.width="100%");const e=T.M.get("lang",this.placeholder)||this.placeholder||"";return W.qy`<form @submit=${this.onSubmit}>
|
|
2
|
+
<textarea
|
|
3
|
+
${(0,N.K)(this.inputRef)}
|
|
4
|
+
style="${this.inputStyle}"
|
|
5
|
+
.autofocus="${this.autofocus}"
|
|
6
|
+
.placeholder="${e}"
|
|
7
|
+
@input="${this.setValue}"
|
|
8
|
+
@change="${this.setValue}"
|
|
9
|
+
.minlength="${this.minlength}"
|
|
10
|
+
.maxlength="${this.maxlength}"
|
|
11
|
+
.autocomplete="${this.autoComplete}"
|
|
12
|
+
.value="${String(this.value)}"
|
|
13
|
+
.name=${this.name}
|
|
14
|
+
.rows=${this.rows}
|
|
15
|
+
.cols=${this.cols}
|
|
16
|
+
></textarea
|
|
17
|
+
>${this.maxlength?W.qy`<span class="counter"
|
|
18
|
+
>${this.value.length}/${this.maxlength}</span
|
|
19
|
+
> `:null}
|
|
20
|
+
</form>`}firstUpdated(){setTimeout(()=>{this.autofocus&&this.inputRef.value&&this.inputRef.value.focus()},200)}focus(){super.focus(),this.inputRef.value&&this.inputRef.value.focus()}connectedCallback(){super.connectedCallback(),setTimeout(()=>{this.setDir()},50)}setValue(e){if(!this.inputRef.value)return;const t=this.inputRef.value;if(this.max&&t.value.length>this.max)return t.value=this.value,void this.inputRef.value.focus();if(this.value=t.value,this.value){this.setDir();const t=new UIEvent(e.type,{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}}setDir(){const e=this.inputRef.value;e&&(!this.value||(0,I.A)(this.value)?(e.style.textAlign="right",e.style.direction="rtl"):(e.style.textAlign="left",e.style.direction="ltr"))}patch(e){this.value=e}},(0,B.A)(R,"styles",W.AH`
|
|
21
|
+
:host {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
--cdtr-input-height: 30px;
|
|
24
|
+
--cdtr-input-padding: 0.105rem 0.45rem;
|
|
25
|
+
}
|
|
26
|
+
.counter {
|
|
27
|
+
font-size: 10px;
|
|
28
|
+
}
|
|
29
|
+
textarea {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
width: 100%;
|
|
32
|
+
padding: var(--cdtr-input-padding);
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
font-weight: 400;
|
|
35
|
+
line-height: 1.5;
|
|
36
|
+
color: #212529;
|
|
37
|
+
background: #fff;
|
|
38
|
+
background-clip: padding-box;
|
|
39
|
+
border: 1px solid #ced4da;
|
|
40
|
+
-webkit-appearance: none;
|
|
41
|
+
-moz-appearance: none;
|
|
42
|
+
appearance: none;
|
|
43
|
+
border-radius: 0.25rem;
|
|
44
|
+
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
|
45
|
+
margin: 0;
|
|
46
|
+
font-family: var(--font-family);
|
|
47
|
+
border-color: var(--input-border-color);
|
|
48
|
+
outline: var(--input-border-color);
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
}
|
|
51
|
+
textarea:hover {
|
|
52
|
+
border-color: black;
|
|
53
|
+
}
|
|
54
|
+
textarea::placeholder {
|
|
55
|
+
font-family: var(--font-family);
|
|
56
|
+
}
|
|
57
|
+
textarea:focus {
|
|
58
|
+
border-color: var(--primary);
|
|
59
|
+
}
|
|
60
|
+
`),m=R,g=(0,U.A)(m.prototype,"value",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),y=(0,U.A)(m.prototype,"autoComplete",[n],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),v=(0,U.A)(m.prototype,"maxlength",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),w=(0,U.A)(m.prototype,"fullWidth",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),A=(0,U.A)(m.prototype,"minlength",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),x=(0,U.A)(m.prototype,"disabled",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),z=(0,U.A)(m.prototype,"readonly",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$=(0,U.A)(m.prototype,"rows",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),M=(0,U.A)(m.prototype,"name",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Z=(0,U.A)(m.prototype,"cols",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),k=(0,U.A)(m.prototype,"placeholder",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),S=(0,U.A)(m.prototype,"autofocus",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),C=(0,U.A)(m.prototype,"inputStyle",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),m);customElements.define("cdtr-textarea",V)}}]);
|
|
Binary file
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5501],{35501(t,e,i){i.r(e),i.d(e,{ListPicker:()=>a});var l=i(24586),s=i(59929),r=i(21421);class a extends s.WF{constructor(){super(),(0,l.A)(this,"storage",{}),(0,l.A)(this,"createdEvent",null),(0,l.A)(this,"inputRef",(0,r._)()),(0,l.A)(this,"modalRef",(0,r._)()),this.level=0,this.storage={},this.filtered=[],this.list=[],this.dispatch=this.dispatch.bind(this)}disconnectedCallback(){super.disconnectedCallback()}connectedCallback(){super.connectedCallback(),this.storage[0]||(this.storage={0:[...this.list]}),this.createdEvent=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0})}findSelected(){if(this.selected){const t=(e,i)=>{for(const l of e){if(l.value===this.selected)return this.level=i,this.storage[i]=[...e],!0;if(l.children&&t(l.children,i+1))return!0}return!1};t(this.storage[0],0)}}onSearch(t){const e=t.target.value;if(""===e)return void(this.filtered=[]);const i=function(t){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=[];for(const r of t){if(r.label.toLowerCase().includes(e.toLowerCase())){let t=s.find(t=>t.parentLabel===l);t||(t={parentLabel:l,items:[]},s.push(t)),t.items.push(r)}r.children&&(s=s.concat(i(r.children,r.label)))}return s};this.filtered=i(this.storage[0])}close(){this.opened=!1,this.modalRef.value?.close()}dispatch(t){this.value=t,this.createdEvent&&this.dispatchEvent(this.createdEvent),this.inputRef&&this.inputRef.value&&(this.inputRef.value.value=""),this.close(),this.filtered=[]}updated(t){t.has("selected")&&this.findSelected()}render(){const t=s.qy`${(t=>this.filtered&&this.filtered.length>0?this.filtered.map(t=>{let{items:e,parentLabel:i}=t;return s.qy`<h3
|
|
2
|
+
style="font-size:16px;text-align:var(--text-align-locale)"
|
|
3
|
+
>
|
|
4
|
+
${i}
|
|
5
|
+
</h3>
|
|
6
|
+
${e.map(t=>s.qy` <cdtr-dropdown-item
|
|
7
|
+
class="${t.value===this.selected?"selected":""}"
|
|
8
|
+
@click=${()=>this.dispatch(t.value)}
|
|
9
|
+
.value="${t.value}"
|
|
10
|
+
><cdtr-row class="animate">
|
|
11
|
+
${t.value===this.selected?" ✓ ":""}${" "}
|
|
12
|
+
<lang-text text="${t.label}"></lang-text>
|
|
13
|
+
</cdtr-row>
|
|
14
|
+
</cdtr-dropdown-item>`)}
|
|
15
|
+
<cdtr-divider></cdtr-divider>`}):t.map(t=>t.children&&t.children.length>0?s.qy`
|
|
16
|
+
<cdtr-dropdown-item
|
|
17
|
+
class="slideFromLeft"
|
|
18
|
+
@click=${()=>{this.level++,this.storage[this.level]=[...t.children],this.list=t.children}}
|
|
19
|
+
.notClickable=${!0}
|
|
20
|
+
>
|
|
21
|
+
<cdtr-row
|
|
22
|
+
class="animate"
|
|
23
|
+
alignItems="center"
|
|
24
|
+
justify="space-between"
|
|
25
|
+
style="min-width:0;padding:2px;width:100%;display:flex;align-items:center;justify-content:space-between;"
|
|
26
|
+
>
|
|
27
|
+
<lang-text text="${t.label}"></lang-text>
|
|
28
|
+
<svg
|
|
29
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
30
|
+
viewBox="0 0 24 24"
|
|
31
|
+
width="20"
|
|
32
|
+
fill="currentColor"
|
|
33
|
+
>
|
|
34
|
+
<path
|
|
35
|
+
fill="#000"
|
|
36
|
+
d="M11.8284 12.0005L14.6569 14.8289L13.2426 16.2431L9 12.0005L13.2426 7.75781L14.6569 9.17203L11.8284 12.0005Z"
|
|
37
|
+
></path>
|
|
38
|
+
</svg>
|
|
39
|
+
</cdtr-row>
|
|
40
|
+
</cdtr-dropdown-item>
|
|
41
|
+
`:s.qy`<cdtr-dropdown-item
|
|
42
|
+
class="slideFromLeft ${t.value===this.selected?"selected":""}"
|
|
43
|
+
@click=${()=>this.dispatch(t.value)}
|
|
44
|
+
.value="${t.value}"
|
|
45
|
+
><cdtr-row class="animate">
|
|
46
|
+
${t.value===this.selected?" ✓ ":""}${" "}
|
|
47
|
+
<lang-text text="${t.label}"></lang-text>
|
|
48
|
+
</cdtr-row>
|
|
49
|
+
</cdtr-dropdown-item>`))(this.filtered.length>0?this.filtered:this.storage[this.level])}`,e=s.qy`<cdtr-row
|
|
50
|
+
slot="header"
|
|
51
|
+
class="header"
|
|
52
|
+
justify="flex-start"
|
|
53
|
+
>
|
|
54
|
+
${this.level>0?s.qy` <paper-button
|
|
55
|
+
@click=${t=>{this.level--,this.level<0?(this.level=0,this.list=this.storage[this.level],this.close()):this.list=this.storage[this.level]}}
|
|
56
|
+
>
|
|
57
|
+
<cdtr-arrow-icon></cdtr-arrow-icon>
|
|
58
|
+
<cdtr-title>
|
|
59
|
+
<lang-text
|
|
60
|
+
style="font-weight:700;"
|
|
61
|
+
text="${this.level>0?"go_back":"close"}"
|
|
62
|
+
></lang-text>
|
|
63
|
+
</cdtr-title>
|
|
64
|
+
</paper-button>`:""}
|
|
65
|
+
${0===this.level?s.qy`<cdtr-col sm="12"
|
|
66
|
+
><h3
|
|
67
|
+
style="padding:0 3px;text-align:var(--text-align-locale);font-size:20px !important;"
|
|
68
|
+
>
|
|
69
|
+
<lang-text text="${this.heading}"></lang-text>
|
|
70
|
+
</h3>
|
|
71
|
+
</cdtr-col>`:""}
|
|
72
|
+
${this.hasSearch&&s.qy`<cdtr-input
|
|
73
|
+
${(0,r.K)(this.inputRef)}
|
|
74
|
+
placeholder="search"
|
|
75
|
+
@input=${this.onSearch}
|
|
76
|
+
style="width:100%"
|
|
77
|
+
></cdtr-input>`}
|
|
78
|
+
</cdtr-row>
|
|
79
|
+
<div style="direction:var(--direction);" slot="content">${t}</div>`;return this.hasModal?s.qy` <cdtr-draggable-box
|
|
80
|
+
${(0,r.K)(this.modalRef)}
|
|
81
|
+
style="direction:var(--direction);"
|
|
82
|
+
.height=${this.height||300}
|
|
83
|
+
.left=${this.left}
|
|
84
|
+
.top=${this.top}
|
|
85
|
+
.opened=${this.opened}
|
|
86
|
+
>
|
|
87
|
+
<cdtr-dropdown-button
|
|
88
|
+
style="min-width:0;width:100%;display:block;"
|
|
89
|
+
slot="trigger"
|
|
90
|
+
><lang-text text="${this.title}"></lang-text
|
|
91
|
+
></cdtr-dropdown-button>
|
|
92
|
+
${e}
|
|
93
|
+
</cdtr-draggable-box>`:e}}(0,l.A)(a,"properties",{value:{type:String,reflect:!1},title:{type:String,reflect:!1},heading:{type:String},list:{type:Array},level:{type:Number},left:{type:String},top:{type:String},opened:{type:Boolean},hasModal:{type:Boolean},hasSearch:{type:Boolean},selected:{type:String},height:{type:Number},filtered:{type:Array}}),(0,l.A)(a,"styles",s.AH`
|
|
94
|
+
.selected {
|
|
95
|
+
background: #f1f1f1 !important;
|
|
96
|
+
border-radius: 5px;
|
|
97
|
+
display: block;
|
|
98
|
+
}
|
|
99
|
+
.slideFromLeft {
|
|
100
|
+
animation: slideFromLeft 0.2s ease-in-out;
|
|
101
|
+
display: block;
|
|
102
|
+
}
|
|
103
|
+
@keyframes slideFromLeft {
|
|
104
|
+
from {
|
|
105
|
+
transform: translateX(-10%);
|
|
106
|
+
opacity: 0;
|
|
107
|
+
}
|
|
108
|
+
to {
|
|
109
|
+
transform: translateX(0);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
`),customElements.define("cdtr-list-picker",a)}}]);
|
|
Binary file
|
|
@@ -1,155 +1,5 @@
|
|
|
1
1
|
/*! For license information please see 5713.creaditor.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5713],{
|
|
3
|
-
<dom-module id="paper-material-styles">
|
|
4
|
-
<template>
|
|
5
|
-
<style>
|
|
6
|
-
html {
|
|
7
|
-
--paper-material: {
|
|
8
|
-
display: block;
|
|
9
|
-
position: relative;
|
|
10
|
-
};
|
|
11
|
-
--paper-material-elevation-1: {
|
|
12
|
-
@apply --shadow-elevation-2dp;
|
|
13
|
-
};
|
|
14
|
-
--paper-material-elevation-2: {
|
|
15
|
-
@apply --shadow-elevation-4dp;
|
|
16
|
-
};
|
|
17
|
-
--paper-material-elevation-3: {
|
|
18
|
-
@apply --shadow-elevation-6dp;
|
|
19
|
-
};
|
|
20
|
-
--paper-material-elevation-4: {
|
|
21
|
-
@apply --shadow-elevation-8dp;
|
|
22
|
-
};
|
|
23
|
-
--paper-material-elevation-5: {
|
|
24
|
-
@apply --shadow-elevation-16dp;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
.paper-material {
|
|
28
|
-
@apply --paper-material;
|
|
29
|
-
}
|
|
30
|
-
.paper-material[elevation="1"] {
|
|
31
|
-
@apply --paper-material-elevation-1;
|
|
32
|
-
}
|
|
33
|
-
.paper-material[elevation="2"] {
|
|
34
|
-
@apply --paper-material-elevation-2;
|
|
35
|
-
}
|
|
36
|
-
.paper-material[elevation="3"] {
|
|
37
|
-
@apply --paper-material-elevation-3;
|
|
38
|
-
}
|
|
39
|
-
.paper-material[elevation="4"] {
|
|
40
|
-
@apply --paper-material-elevation-4;
|
|
41
|
-
}
|
|
42
|
-
.paper-material[elevation="5"] {
|
|
43
|
-
@apply --paper-material-elevation-5;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* Duplicate the styles because of https://github.com/webcomponents/shadycss/issues/193 */
|
|
47
|
-
:host {
|
|
48
|
-
--paper-material: {
|
|
49
|
-
display: block;
|
|
50
|
-
position: relative;
|
|
51
|
-
};
|
|
52
|
-
--paper-material-elevation-1: {
|
|
53
|
-
@apply --shadow-elevation-2dp;
|
|
54
|
-
};
|
|
55
|
-
--paper-material-elevation-2: {
|
|
56
|
-
@apply --shadow-elevation-4dp;
|
|
57
|
-
};
|
|
58
|
-
--paper-material-elevation-3: {
|
|
59
|
-
@apply --shadow-elevation-6dp;
|
|
60
|
-
};
|
|
61
|
-
--paper-material-elevation-4: {
|
|
62
|
-
@apply --shadow-elevation-8dp;
|
|
63
|
-
};
|
|
64
|
-
--paper-material-elevation-5: {
|
|
65
|
-
@apply --shadow-elevation-16dp;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
:host(.paper-material) {
|
|
69
|
-
@apply --paper-material;
|
|
70
|
-
}
|
|
71
|
-
:host(.paper-material[elevation="1"]) {
|
|
72
|
-
@apply --paper-material-elevation-1;
|
|
73
|
-
}
|
|
74
|
-
:host(.paper-material[elevation="2"]) {
|
|
75
|
-
@apply --paper-material-elevation-2;
|
|
76
|
-
}
|
|
77
|
-
:host(.paper-material[elevation="3"]) {
|
|
78
|
-
@apply --paper-material-elevation-3;
|
|
79
|
-
}
|
|
80
|
-
:host(.paper-material[elevation="4"]) {
|
|
81
|
-
@apply --paper-material-elevation-4;
|
|
82
|
-
}
|
|
83
|
-
:host(.paper-material[elevation="5"]) {
|
|
84
|
-
@apply --paper-material-elevation-5;
|
|
85
|
-
}
|
|
86
|
-
</style>
|
|
87
|
-
</template>
|
|
88
|
-
</dom-module>`;p.setAttribute("style","display: none;"),document.head.appendChild(p.content)},48176(e,a,t){t(69130);const p=t(47351).q`
|
|
89
|
-
<custom-style>
|
|
90
|
-
<style is="custom-style">
|
|
91
|
-
html {
|
|
92
|
-
|
|
93
|
-
--shadow-transition: {
|
|
94
|
-
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
--shadow-none: {
|
|
98
|
-
box-shadow: none;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
/* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */
|
|
102
|
-
|
|
103
|
-
--shadow-elevation-2dp: {
|
|
104
|
-
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
|
|
105
|
-
0 1px 5px 0 rgba(0, 0, 0, 0.12),
|
|
106
|
-
0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
--shadow-elevation-3dp: {
|
|
110
|
-
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
|
|
111
|
-
0 1px 8px 0 rgba(0, 0, 0, 0.12),
|
|
112
|
-
0 3px 3px -2px rgba(0, 0, 0, 0.4);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
--shadow-elevation-4dp: {
|
|
116
|
-
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
|
|
117
|
-
0 1px 10px 0 rgba(0, 0, 0, 0.12),
|
|
118
|
-
0 2px 4px -1px rgba(0, 0, 0, 0.4);
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
--shadow-elevation-6dp: {
|
|
122
|
-
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
|
|
123
|
-
0 1px 18px 0 rgba(0, 0, 0, 0.12),
|
|
124
|
-
0 3px 5px -1px rgba(0, 0, 0, 0.4);
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
--shadow-elevation-8dp: {
|
|
128
|
-
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
129
|
-
0 3px 14px 2px rgba(0, 0, 0, 0.12),
|
|
130
|
-
0 5px 5px -3px rgba(0, 0, 0, 0.4);
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
--shadow-elevation-12dp: {
|
|
134
|
-
box-shadow: 0 12px 16px 1px rgba(0, 0, 0, 0.14),
|
|
135
|
-
0 4px 22px 3px rgba(0, 0, 0, 0.12),
|
|
136
|
-
0 6px 7px -4px rgba(0, 0, 0, 0.4);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
--shadow-elevation-16dp: {
|
|
140
|
-
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
|
|
141
|
-
0 6px 30px 5px rgba(0, 0, 0, 0.12),
|
|
142
|
-
0 8px 10px -5px rgba(0, 0, 0, 0.4);
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
--shadow-elevation-24dp: {
|
|
146
|
-
box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
|
|
147
|
-
0 9px 46px 8px rgba(0, 0, 0, 0.12),
|
|
148
|
-
0 11px 15px -7px rgba(0, 0, 0, 0.4);
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
</style>
|
|
152
|
-
</custom-style>`;p.setAttribute("style","display: none;"),document.head.appendChild(p.content)},85713(e,a,t){t.r(a);t(12479),t(10527);var p=t(58945),i=t(95586);const o=t(69130).qy` <style include="paper-material-styles">
|
|
2
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5713],{85713(e,t,a){a.r(t);a(12479),a(10527);var o=a(58945),i=a(95586);const r=a(69130).qy` <style include="paper-material-styles">
|
|
153
3
|
/* Need to specify the same specificity as the styles imported from paper-material. */
|
|
154
4
|
:host {
|
|
155
5
|
@apply --layout-inline;
|
|
@@ -233,4 +83,4 @@
|
|
|
233
83
|
color: var(--paper-button-ink-color);
|
|
234
84
|
}
|
|
235
85
|
</style>
|
|
236
|
-
<slot></slot>`;
|
|
86
|
+
<slot></slot>`;r.setAttribute("strip-whitespace",""),window.customElements.get("paper-button")||(0,i.b)({_template:r,is:"paper-button",behaviors:[o.J],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?o.b._calculateElevation.apply(this):this._setElevation(0)}})}}]);
|
|
@@ -8,14 +8,3 @@ found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
|
8
8
|
part of the polymer project is also subject to an additional IP rights grant
|
|
9
9
|
found at http://polymer.github.io/PATENTS.txt
|
|
10
10
|
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
@license
|
|
14
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
15
|
-
This code may only be used under the BSD style license found at
|
|
16
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
17
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
18
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
19
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
20
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
21
|
-
*/
|
|
Binary file
|
|
Binary file
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
display: none;
|
|
21
21
|
}
|
|
22
22
|
</style>
|
|
23
|
-
`,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:i.C6.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&(0,s.tT)(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,(0,s.tT)(this.root).appendChild(this._img))}});n(95813);var
|
|
23
|
+
`,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:i.C6.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&(0,s.tT)(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,(0,s.tT)(this.root).appendChild(this._img))}});n(95813);var c=n(90703),p=n(68876),d=n(74396);(0,r.b)({_template:l.q`
|
|
24
24
|
<style>
|
|
25
25
|
:host {
|
|
26
26
|
position: fixed;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
<div id="contentWrapper">
|
|
40
40
|
<slot id="content" name="dropdown-content"></slot>
|
|
41
41
|
</div>
|
|
42
|
-
`,is:"iron-dropdown",behaviors:[
|
|
42
|
+
`,is:"iron-dropdown",behaviors:[c.x,o.D,p.r,d.L],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],get containedElement(){for(var e=(0,s.tT)(this.$.content).getDistributedNodes(),t=0,n=e.length;t<n;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},ready:function(){this.scrollAction||(this.scrollAction=this.allowOutsideScroll?"refit":"lock"),this._readied=!0},attached:function(){this.sizingTarget&&this.sizingTarget!==this||(this.sizingTarget=this.containedElement||this)},detached:function(){this.cancelAnimation()},_openedChanged:function(){this.opened&&this.disabled?this.cancel():(this.cancelAnimation(),this._updateAnimationConfig(),p.N._openedChanged.apply(this,arguments))},_renderOpened:function(){!this.noAnimations&&this.animationConfig.open?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("open")):p.N._renderOpened.apply(this,arguments)},_renderClosed:function(){!this.noAnimations&&this.animationConfig.close?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("close")):p.N._renderClosed.apply(this,arguments)},_onNeonAnimationFinish:function(){this.$.contentWrapper.classList.remove("animating"),this.opened?this._finishRenderOpened():this._finishRenderClosed()},_updateAnimationConfig:function(){for(var e=this.containedElement,t=[].concat(this.openAnimationConfig||[]).concat(this.closeAnimationConfig||[]),n=0;n<t.length;n++)t[n].node=e;this.animationConfig={open:this.openAnimationConfig,close:this.closeAnimationConfig}},_updateOverlayPosition:function(){this.isAttached&&this.notifyResize()},_allowOutsideScrollChanged:function(e){this._readied&&(e?this.scrollAction&&"lock"!==this.scrollAction||(this.scrollAction="refit"):this.scrollAction="lock")},_applyFocus:function(){var e=this.focusTarget||this.containedElement;e&&this.opened&&!this.noAutoFocus?e.focus():p.N._applyFocus.apply(this,arguments)}});const h={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}},isNeonAnimation:!0,created:function(){document.body.animate||console.warn("No web animations detected. This element will not function without a web animations polyfill.")},timingFromConfig:function(e){if(e.timing)for(var t in e.timing)this.animationTiming[t]=e.timing[t];return this.animationTiming},setPrefixedProperty:function(e,t,n){for(var i,o={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]}[t],a=0;i=o[a];a++)e.style[i]=n;e.style[t]=n},complete:function(e){}};(0,r.b)({is:"fade-in-animation",behaviors:[h],configure:function(e){var t=e.node;return this._effect=new KeyframeEffect(t,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(e)),this._effect}}),(0,r.b)({is:"fade-out-animation",behaviors:[h],configure:function(e){var t=e.node;return this._effect=new KeyframeEffect(t,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(e)),this._effect}});n(45611),n(48176);(0,r.b)({is:"paper-menu-grow-height-animation",_template:null,behaviors:[h],configure:function(e){var t=e.node,n=t.getBoundingClientRect().height;return this._effect=new KeyframeEffect(t,[{height:n/2+"px"},{height:n+"px"}],this.timingFromConfig(e)),this._effect}}),(0,r.b)({is:"paper-menu-grow-width-animation",_template:null,behaviors:[h],configure:function(e){var t=e.node,n=t.getBoundingClientRect().width;return this._effect=new KeyframeEffect(t,[{width:n/2+"px"},{width:n+"px"}],this.timingFromConfig(e)),this._effect}}),(0,r.b)({is:"paper-menu-shrink-width-animation",_template:null,behaviors:[h],configure:function(e){var t=e.node,n=t.getBoundingClientRect().width;return this._effect=new KeyframeEffect(t,[{width:n+"px"},{width:n-n/20+"px"}],this.timingFromConfig(e)),this._effect}}),(0,r.b)({is:"paper-menu-shrink-height-animation",_template:null,behaviors:[h],configure:function(e){var t=e.node,n=t.getBoundingClientRect().height;return this.setPrefixedProperty(t,"transformOrigin","0 0"),this._effect=new KeyframeEffect(t,[{height:n+"px",transform:"translateY(0)"},{height:n/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(e)),this._effect}});var u={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400};const m=(0,r.b)({_template:l.q`
|
|
43
43
|
<style>
|
|
44
44
|
:host {
|
|
45
45
|
display: inline-block;
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
<slot id="content" name="dropdown-content"></slot>
|
|
98
98
|
</div>
|
|
99
99
|
</iron-dropdown>
|
|
100
|
-
`,is:"paper-menu-button",behaviors:[o.D,
|
|
100
|
+
`,is:"paper-menu-button",behaviors:[o.D,c.x],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:u.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:u.ANIMATION_CUBIC_BEZIER}}]}},closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:u.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},expandSizingTargetForScrollbars:{type:Boolean,value:!1},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){for(var e=(0,s.tT)(this.$.content).getDistributedNodes(),t=0,n=e.length;t<n;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},toggle:function(){this.opened?this.close():this.open()},open:function(){this.disabled||this.$.dropdown.open()},close:function(){this.$.dropdown.close()},_onIronSelect:function(e){this.ignoreSelect||this.close()},_onIronActivate:function(e){this.closeOnActivate&&this.close()},_openedChanged:function(e,t){e?(this._dropdownContent=this.contentElement,this.fire("paper-dropdown-open")):null!=t&&this.fire("paper-dropdown-close")},_disabledChanged:function(e){c.x._disabledChanged.apply(this,arguments),e&&this.opened&&this.close()},__onIronOverlayCanceled:function(e){var t=e.detail,n=this.$.trigger;(0,s.tT)(t).path.indexOf(n)>-1&&e.preventDefault()}});Object.keys(u).forEach(function(e){m[e]=u[e]});n(82491);(0,r.b)({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new a.s({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map(function(e){return this.name+":"+e},this)},applyIcon:function(e,t){this.removeIcon(e);var n=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(n){var i=(0,s.tT)(e.root||e);return i.insertBefore(n,i.childNodes[0]),e._svgIcon=n}return null},removeIcon:function(e){e._svgIcon&&((0,s.tT)(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===t.getAttribute("dir")}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&"rtl"===window.getComputedStyle(e).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},_createIconMap:function(){var e=Object.create(null);return(0,s.tT)(this).querySelectorAll("[id]").forEach(function(t){e[t.id]=t}),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,n){if(e){var i=e.cloneNode(!0),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),a=i.getAttribute("viewBox")||"0 0 "+t+" "+t,r="pointer-events: none; display: block; width: 100%; height: 100%;";return n&&i.hasAttribute("mirror-in-rtl")&&(r+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),o.setAttribute("viewBox",a),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.setAttribute("focusable","false"),o.style.cssText=r,o.appendChild(i).removeAttribute("id"),o}return null}});const f=document.createElement("template");f.setAttribute("style","display: none;"),f.innerHTML='<iron-iconset-svg name="paper-dropdown-menu" size="24">\n<svg><defs>\n<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g>\n</defs></svg>\n</iron-iconset-svg>',document.head.appendChild(f.content);const g=document.createElement("template");g.setAttribute("style","display: none;"),g.innerHTML='<dom-module id="paper-dropdown-menu-shared-styles">\n <template>\n <style>\n :host {\n display: inline-block;\n position: relative;\n text-align: left;\n\n /* NOTE(cdata): Both values are needed, since some phones require the\n * value to be `transparent`.\n */\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n -webkit-tap-highlight-color: transparent;\n\n --paper-input-container-input: {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: 100%;\n box-sizing: border-box;\n cursor: pointer;\n };\n\n @apply --paper-dropdown-menu;\n }\n\n /* paper-dropdown-menu and paper-dropdown-menu-light both delegate focus\n * to other internal elements which manage focus styling. */\n :host(:focus) {\n outline: none;\n }\n\n :host(:dir(rtl)) {\n text-align: right;\n\n @apply(--paper-dropdown-menu);\n }\n\n :host([disabled]) {\n @apply --paper-dropdown-menu-disabled;\n }\n\n :host([noink]) paper-ripple {\n display: none;\n }\n\n :host([no-label-float]) paper-ripple {\n top: 8px;\n }\n\n paper-ripple {\n top: 12px;\n left: 0px;\n bottom: 8px;\n right: 0px;\n\n @apply --paper-dropdown-menu-ripple;\n }\n\n paper-menu-button {\n display: block;\n padding: 0;\n\n @apply --paper-dropdown-menu-button;\n }\n\n paper-input {\n @apply --paper-dropdown-menu-input;\n }\n\n iron-icon {\n color: var(--disabled-text-color);\n\n @apply --paper-dropdown-menu-icon;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(g.content);var v=n(71920),y=n(19911),_=n(18811),b=n(94794),w=n(15055),A=n(13107);const C=(0,b.r)(HTMLElement);(0,r.b)({_template:l.q`
|
|
101
101
|
<style include="paper-dropdown-menu-shared-styles"></style>
|
|
102
102
|
|
|
103
103
|
<paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" dynamic-align="[[dynamicAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]" expand-sizing-target-for-scrollbars="[[expandSizingTargetForScrollbars]]">
|
|
@@ -112,68 +112,4 @@
|
|
|
112
112
|
</div>
|
|
113
113
|
<slot id="content" name="dropdown-content" slot="dropdown-content"></slot>
|
|
114
114
|
</paper-menu-button>
|
|
115
|
-
`,is:"paper-dropdown-menu",behaviors:[
|
|
116
|
-
<custom-style>
|
|
117
|
-
<style is="custom-style">
|
|
118
|
-
html {
|
|
119
|
-
|
|
120
|
-
--shadow-transition: {
|
|
121
|
-
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
122
|
-
};
|
|
123
|
-
|
|
124
|
-
--shadow-none: {
|
|
125
|
-
box-shadow: none;
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
/* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */
|
|
129
|
-
|
|
130
|
-
--shadow-elevation-2dp: {
|
|
131
|
-
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
|
|
132
|
-
0 1px 5px 0 rgba(0, 0, 0, 0.12),
|
|
133
|
-
0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
--shadow-elevation-3dp: {
|
|
137
|
-
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
|
|
138
|
-
0 1px 8px 0 rgba(0, 0, 0, 0.12),
|
|
139
|
-
0 3px 3px -2px rgba(0, 0, 0, 0.4);
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
--shadow-elevation-4dp: {
|
|
143
|
-
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
|
|
144
|
-
0 1px 10px 0 rgba(0, 0, 0, 0.12),
|
|
145
|
-
0 2px 4px -1px rgba(0, 0, 0, 0.4);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
--shadow-elevation-6dp: {
|
|
149
|
-
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
|
|
150
|
-
0 1px 18px 0 rgba(0, 0, 0, 0.12),
|
|
151
|
-
0 3px 5px -1px rgba(0, 0, 0, 0.4);
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
--shadow-elevation-8dp: {
|
|
155
|
-
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
|
156
|
-
0 3px 14px 2px rgba(0, 0, 0, 0.12),
|
|
157
|
-
0 5px 5px -3px rgba(0, 0, 0, 0.4);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
--shadow-elevation-12dp: {
|
|
161
|
-
box-shadow: 0 12px 16px 1px rgba(0, 0, 0, 0.14),
|
|
162
|
-
0 4px 22px 3px rgba(0, 0, 0, 0.12),
|
|
163
|
-
0 6px 7px -4px rgba(0, 0, 0, 0.4);
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
--shadow-elevation-16dp: {
|
|
167
|
-
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
|
|
168
|
-
0 6px 30px 5px rgba(0, 0, 0, 0.12),
|
|
169
|
-
0 8px 10px -5px rgba(0, 0, 0, 0.4);
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
--shadow-elevation-24dp: {
|
|
173
|
-
box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
|
|
174
|
-
0 9px 46px 8px rgba(0, 0, 0, 0.12),
|
|
175
|
-
0 11px 15px -7px rgba(0, 0, 0, 0.4);
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
</style>
|
|
179
|
-
</custom-style>`;i.setAttribute("style","display: none;"),document.head.appendChild(i.content)}}]);
|
|
115
|
+
`,is:"paper-dropdown-menu",behaviors:[v.a,c.x,y.x,_.Q],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0},expandSizingTargetForScrollbars:{type:Boolean,value:!1}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},observers:["_selectedItemChanged(selectedItem)"],_attachDom(e){const t=(0,A.L)(this);return t.attachShadow({mode:"open",delegatesFocus:!0,shadyUpgradeFragment:e}),t.shadowRoot.appendChild(e),C.prototype._attachDom.call(this,e)},focus(){this.$.input._focusableElement.focus()},attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){for(var e=(0,s.tT)(this.$.content).getDistributedNodes(),t=0,n=e.length;t<n;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},open:function(){this.$.menuButton.open()},close:function(){this.$.menuButton.close()},_onIronSelect:function(e){this._setSelectedItem(e.detail.item)},_onIronDeselect:function(e){this._setSelectedItem(null)},_onTap:function(e){w.Ix(e)===this&&this.open()},_selectedItemChanged:function(e){var t="";t=e?e.label||e.getAttribute("label")||e.textContent.trim():"",this.value=t,this._setSelectedItemLabel(t)},_computeMenuVerticalOffset:function(e,t){return t||(e?-4:8)},_getValidity:function(e){return this.disabled||!this.required||this.required&&!!this.value},_openedChanged:function(){var e=this.opened?"true":"false",t=this.contentElement;t&&t.setAttribute("aria-expanded",e)}})}}]);
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5849],{75849(t,e,i){i.r(e),i.d(e,{default:()=>l});var s=i(24586),a=i(59929);
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5849],{75849(t,e,i){i.r(e),i.d(e,{default:()=>l});var s=i(24586),a=i(59929);class l extends a.WF{constructor(){super()}connectedCallback(){super.connectedCallback(),this.setAttribute("data-type","inline-image"),this.classList.add("inlineImage-component"),this.src="https://api.creaditor.com/images/placeholder?width=100&height=100",this.alt="alt text"}calculateSize(){const t=this.shadowRoot.querySelector("img");if(t){const e=t.getBoundingClientRect();this.width=e.width,this.height=e.height}}render(){return this.calculateSize(),a.qy`<img
|
|
2
2
|
draggable="false"
|
|
3
3
|
.style="${this.style}"
|
|
4
4
|
src="${this.src}"
|
|
Binary file
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5926],{83545(t,e,o){o.r(e),o.d(e,{EditorTabs:()=>a});var n=o(24586),i=o(59929),s=o(9507);o
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5926],{83545(t,e,o){o.r(e),o.d(e,{EditorTabs:()=>a});var n=o(24586),i=o(59929),s=o(9507);o.e(7937).then(o.bind(o,67937));class a extends i.WF{constructor(){super(),this.onConnected=this.onConnected.bind(this),this.onArrowNavigation=this.onArrowNavigation.bind(this),this.tabs=[],this.labelMode}onClickItem(t){let{target:e}=t;const o=this.value=e.value,n=[...this.tabs],i=n.findIndex(t=>t.text===o);-1!==i&&(n.forEach(t=>{t.selected=!1}),n[i].selected=!0),this.tabs=n;const s=new UIEvent("tabChanged",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(s)}firstUpdated(){super.firstUpdated(),this.labelMode=0}onConnected(t){let{name:e}=t;this.onClickItem({target:{value:e}})}onArrowNavigation(t){console.log("Arrow navigation event received:",t.detail);const{key:e,currentIcon:o}=t.detail,n=this.tabs.findIndex(t=>t.text===o);if(console.log("Current index:",n,"Total tabs:",this.tabs.length),-1===n)return void console.log("Current icon not found in tabs");let i=n;switch(e){case"ArrowUp":case"ArrowLeft":i=n>0?n-1:this.tabs.length-1;break;case"ArrowDown":case"ArrowRight":i=n<this.tabs.length-1?n+1:0;break;default:return}console.log("Next index:",i);const s=this.tabs[i];s&&(console.log("Switching to tab:",s.text),this.onClickItem({target:{value:s.text}}),this.updateComplete.then(()=>{const t=this.shadowRoot.querySelector(`cdtr-editor-tab-item[icon="${s.text}"]`);t?(console.log("Focusing next tab element"),t.focus()):console.log("Next tab element not found")}))}connectedCallback(){super.connectedCallback(),s.Ay.on("editor-tabs",this.onConnected),console.log("EditorTabs connected")}disconnectedCallback(){super.disconnectedCallback(),s.Ay.off("editor-tabs",this.onConnected)}renderContent(){switch(this.value){case"animations":return o.e(3553).then(o.bind(o,3553)),i.qy`<cdtr-animations-editor>
|
|
2
2
|
<cdtr-block-loader></cdtr-block-loader
|
|
3
3
|
></cdtr-animations-editor>`;case"settings":case"setting":return o.e(5340).then(o.bind(o,45340)),i.qy`<cdtr-setting-editor>
|
|
4
4
|
<cdtr-block-loader></cdtr-block-loader
|
|
Binary file
|