@creaditor/web-starterkit 1.0.64 → 1.0.66

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.
Files changed (209) hide show
  1. package/dist/100.creaditor.bundle.js +348 -0
  2. package/dist/100.creaditor.bundle.js.gz +0 -0
  3. package/dist/112.creaditor.bundle.js.gz +0 -0
  4. package/dist/1142.creaditor.bundle.js +1 -1
  5. package/dist/1142.creaditor.bundle.js.gz +0 -0
  6. package/dist/1271.creaditor.bundle.js.gz +0 -0
  7. package/dist/1317.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  8. package/dist/1317.creaditor.bundle.js.gz +0 -0
  9. package/dist/1334.creaditor.bundle.js.gz +0 -0
  10. package/dist/1396.creaditor.bundle.js.gz +0 -0
  11. package/dist/1403.creaditor.bundle.js.gz +0 -0
  12. package/dist/1456.creaditor.bundle.js.gz +0 -0
  13. package/dist/1529.creaditor.bundle.js.gz +0 -0
  14. package/dist/168.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  15. package/dist/168.creaditor.bundle.js.gz +0 -0
  16. package/dist/170.creaditor.bundle.js.gz +0 -0
  17. package/dist/1728.creaditor.bundle.js +133 -0
  18. package/dist/1728.creaditor.bundle.js.gz +0 -0
  19. package/dist/175.creaditor.bundle.js.gz +0 -0
  20. package/dist/1972.creaditor.bundle.js.gz +0 -0
  21. package/dist/211.creaditor.bundle.js.gz +0 -0
  22. package/dist/2112.creaditor.bundle.js.gz +0 -0
  23. package/dist/2154.creaditor.bundle.js.gz +0 -0
  24. package/dist/2234.creaditor.bundle.js.gz +0 -0
  25. package/dist/2298.creaditor.bundle.js.gz +0 -0
  26. package/dist/235.creaditor.bundle.js.gz +0 -0
  27. package/dist/2350.creaditor.bundle.js.gz +0 -0
  28. package/dist/2377.creaditor.bundle.js.gz +0 -0
  29. package/dist/2384.creaditor.bundle.js.gz +0 -0
  30. package/dist/2397.creaditor.bundle.js.gz +0 -0
  31. package/dist/2409.creaditor.bundle.js.gz +0 -0
  32. package/dist/2547.creaditor.bundle.js.gz +0 -0
  33. package/dist/2550.creaditor.bundle.js.gz +0 -0
  34. package/dist/2590.creaditor.bundle.js.gz +0 -0
  35. package/dist/2655.creaditor.bundle.js.gz +0 -0
  36. package/dist/2706.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  37. package/dist/2706.creaditor.bundle.js.gz +0 -0
  38. package/dist/271.creaditor.bundle.js.gz +0 -0
  39. package/dist/2717.creaditor.bundle.js.gz +0 -0
  40. package/dist/2765.creaditor.bundle.js.gz +0 -0
  41. package/dist/2773.creaditor.bundle.js.gz +0 -0
  42. package/dist/2833.creaditor.bundle.js.gz +0 -0
  43. package/dist/2837.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  44. package/dist/2837.creaditor.bundle.js.gz +0 -0
  45. package/dist/2956.creaditor.bundle.js.gz +0 -0
  46. package/dist/2963.creaditor.bundle.js.gz +0 -0
  47. package/dist/3105.creaditor.bundle.js.gz +0 -0
  48. package/dist/3233.creaditor.bundle.js.gz +0 -0
  49. package/dist/3418.creaditor.bundle.js.gz +0 -0
  50. package/dist/3521.creaditor.bundle.js.gz +0 -0
  51. package/dist/353.creaditor.bundle.js.gz +0 -0
  52. package/dist/3545.creaditor.bundle.js.gz +0 -0
  53. package/dist/3553.creaditor.bundle.js.gz +0 -0
  54. package/dist/3600.creaditor.bundle.js.gz +0 -0
  55. package/dist/3601.creaditor.bundle.js +288 -0
  56. package/dist/3601.creaditor.bundle.js.gz +0 -0
  57. package/dist/3606.creaditor.bundle.js.gz +0 -0
  58. package/dist/3792.creaditor.bundle.js.gz +0 -0
  59. package/dist/380.creaditor.bundle.js +4 -4
  60. package/dist/380.creaditor.bundle.js.gz +0 -0
  61. package/dist/3827.creaditor.bundle.js.gz +0 -0
  62. package/dist/3847.creaditor.bundle.js +6 -2
  63. package/dist/3847.creaditor.bundle.js.gz +0 -0
  64. package/dist/3875.creaditor.bundle.js.gz +0 -0
  65. package/dist/3971.creaditor.bundle.js.gz +0 -0
  66. package/dist/4000.creaditor.bundle.js.gz +0 -0
  67. package/dist/4061.creaditor.bundle.js.gz +0 -0
  68. package/dist/407.creaditor.bundle.js.gz +0 -0
  69. package/dist/4074.creaditor.bundle.js.gz +0 -0
  70. package/dist/4100.creaditor.bundle.js.gz +0 -0
  71. package/dist/4109.creaditor.bundle.js.gz +0 -0
  72. package/dist/4114.creaditor.bundle.js.gz +0 -0
  73. package/dist/4161.creaditor.bundle.js.gz +0 -0
  74. package/dist/4186.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  75. package/dist/4186.creaditor.bundle.js.gz +0 -0
  76. package/dist/4288.creaditor.bundle.js.gz +0 -0
  77. package/dist/4413.creaditor.bundle.js.gz +0 -0
  78. package/dist/4475.creaditor.bundle.js.gz +0 -0
  79. package/dist/453.creaditor.bundle.js.gz +0 -0
  80. package/dist/4615.creaditor.bundle.js.gz +0 -0
  81. package/dist/4639.creaditor.bundle.js.gz +0 -0
  82. package/dist/467.creaditor.bundle.js.gz +0 -0
  83. package/dist/4762.creaditor.bundle.js.gz +0 -0
  84. package/dist/4770.creaditor.bundle.js.gz +0 -0
  85. package/dist/4947.creaditor.bundle.js.gz +0 -0
  86. package/dist/4987.creaditor.bundle.js.gz +0 -0
  87. package/dist/4988.creaditor.bundle.js.gz +0 -0
  88. package/dist/507.creaditor.bundle.js +334 -0
  89. package/dist/507.creaditor.bundle.js.gz +0 -0
  90. package/dist/5133.creaditor.bundle.js.gz +0 -0
  91. package/dist/5156.creaditor.bundle.js.gz +0 -0
  92. package/dist/5284.creaditor.bundle.js.gz +0 -0
  93. package/dist/5379.creaditor.bundle.js.gz +0 -0
  94. package/dist/5391.creaditor.bundle.js.gz +0 -0
  95. package/dist/5411.creaditor.bundle.js.gz +0 -0
  96. package/dist/5501.creaditor.bundle.js.gz +0 -0
  97. package/dist/5530.creaditor.bundle.js.gz +0 -0
  98. package/dist/5666.creaditor.bundle.js.gz +0 -0
  99. package/dist/567.creaditor.bundle.js.gz +0 -0
  100. package/dist/5713.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  101. package/dist/5713.creaditor.bundle.js.gz +0 -0
  102. package/dist/574.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  103. package/dist/574.creaditor.bundle.js.gz +0 -0
  104. package/dist/578.creaditor.bundle.js.gz +0 -0
  105. package/dist/5839.creaditor.bundle.js.gz +0 -0
  106. package/dist/5849.creaditor.bundle.js.gz +0 -0
  107. package/dist/5850.creaditor.bundle.js.gz +0 -0
  108. package/dist/59.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  109. package/dist/59.creaditor.bundle.js.gz +0 -0
  110. package/dist/5926.creaditor.bundle.js.gz +0 -0
  111. package/dist/6036.creaditor.bundle.js.gz +0 -0
  112. package/dist/6151.creaditor.bundle.js.gz +0 -0
  113. package/dist/6216.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  114. package/dist/6216.creaditor.bundle.js.gz +0 -0
  115. package/dist/{4819.creaditor.bundle.js → 6323.creaditor.bundle.js} +7 -7
  116. package/dist/6323.creaditor.bundle.js.gz +0 -0
  117. package/dist/638.creaditor.bundle.js.gz +0 -0
  118. package/dist/6442.creaditor.bundle.js.gz +0 -0
  119. package/dist/6496.creaditor.bundle.js.gz +0 -0
  120. package/dist/653.creaditor.bundle.js.gz +0 -0
  121. package/dist/6751.creaditor.bundle.js.gz +0 -0
  122. package/dist/6814.creaditor.bundle.js.gz +0 -0
  123. package/dist/6937.creaditor.bundle.js.gz +0 -0
  124. package/dist/7055.creaditor.bundle.js.gz +0 -0
  125. package/dist/7155.creaditor.bundle.js.gz +0 -0
  126. package/dist/7209.creaditor.bundle.js.gz +0 -0
  127. package/dist/7238.creaditor.bundle.js.gz +0 -0
  128. package/dist/7255.creaditor.bundle.js.gz +0 -0
  129. package/dist/7348.creaditor.bundle.js.gz +0 -0
  130. package/dist/738.creaditor.bundle.js.gz +0 -0
  131. package/dist/7380.creaditor.bundle.js.gz +0 -0
  132. package/dist/7463.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  133. package/dist/7463.creaditor.bundle.js.gz +0 -0
  134. package/dist/7466.creaditor.bundle.js.gz +0 -0
  135. package/dist/7493.creaditor.bundle.js.gz +0 -0
  136. package/dist/752.creaditor.bundle.js.gz +0 -0
  137. package/dist/7523.creaditor.bundle.js.gz +0 -0
  138. package/dist/7564.creaditor.bundle.js.gz +0 -0
  139. package/dist/7654.creaditor.bundle.js.gz +0 -0
  140. package/dist/767.creaditor.bundle.js.gz +0 -0
  141. package/dist/7789.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  142. package/dist/7789.creaditor.bundle.js.gz +0 -0
  143. package/dist/7838.creaditor.bundle.js.gz +0 -0
  144. package/dist/7997.creaditor.bundle.js.gz +0 -0
  145. package/dist/8042.creaditor.bundle.js.gz +0 -0
  146. package/dist/8064.creaditor.bundle.js.gz +0 -0
  147. package/dist/8088.creaditor.bundle.js +141 -0
  148. package/dist/8088.creaditor.bundle.js.gz +0 -0
  149. package/dist/8141.creaditor.bundle.js.gz +0 -0
  150. package/dist/8173.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  151. package/dist/8173.creaditor.bundle.js.gz +0 -0
  152. package/dist/8196.creaditor.bundle.js.gz +0 -0
  153. package/dist/823.creaditor.bundle.js.gz +0 -0
  154. package/dist/8250.creaditor.bundle.js.gz +0 -0
  155. package/dist/8251.creaditor.bundle.js.gz +0 -0
  156. package/dist/8299.creaditor.bundle.js.gz +0 -0
  157. package/dist/8315.creaditor.bundle.js.gz +0 -0
  158. package/dist/8443.creaditor.bundle.js.gz +0 -0
  159. package/dist/8516.creaditor.bundle.js.gz +0 -0
  160. package/dist/8533.creaditor.bundle.js.gz +0 -0
  161. package/dist/8570.creaditor.bundle.js.gz +0 -0
  162. package/dist/8646.creaditor.bundle.js.gz +0 -0
  163. package/dist/8654.creaditor.bundle.js.gz +0 -0
  164. package/dist/8854.creaditor.bundle.js.gz +0 -0
  165. package/dist/8878.creaditor.bundle.js.gz +0 -0
  166. package/dist/8916.creaditor.bundle.js.gz +0 -0
  167. package/dist/8921.creaditor.bundle.js.gz +0 -0
  168. package/dist/898.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  169. package/dist/898.creaditor.bundle.js.gz +0 -0
  170. package/dist/8983.creaditor.bundle.js.gz +0 -0
  171. package/dist/9041.creaditor.bundle.js.gz +0 -0
  172. package/dist/9158.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  173. package/dist/9158.creaditor.bundle.js.gz +0 -0
  174. package/dist/9250.creaditor.bundle.js.gz +0 -0
  175. package/dist/9386.creaditor.bundle.js.gz +0 -0
  176. package/dist/9431.creaditor.bundle.js.gz +0 -0
  177. package/dist/9453.creaditor.bundle.js.gz +0 -0
  178. package/dist/9570.creaditor.bundle.js.gz +0 -0
  179. package/dist/9694.creaditor.bundle.js.gz +0 -0
  180. package/dist/975.creaditor.bundle.js.gz +0 -0
  181. package/dist/976.creaditor.bundle.js.gz +0 -0
  182. package/dist/9986.creaditor.bundle.js.gz +0 -0
  183. package/dist/9990.creaditor.bundle.js.gz +0 -0
  184. package/dist/9994.creaditor.bundle.js.gz +0 -0
  185. package/dist/creaditor.bundle.js +147 -147
  186. package/dist/creaditor.bundle.js.LICENSE.txt.gz +0 -0
  187. package/dist/creaditor.bundle.js.gz +0 -0
  188. package/dist/index.html.gz +0 -0
  189. package/dist/service-worker.js +1 -1
  190. package/dist/service-worker.js.gz +0 -0
  191. package/dist/workbox-f3063069.js.gz +0 -0
  192. package/package.json +1 -1
  193. package/dist/2001.creaditor.bundle.js +0 -335
  194. package/dist/2001.creaditor.bundle.js.LICENSE.txt +0 -11
  195. package/dist/2001.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  196. package/dist/2001.creaditor.bundle.js.gz +0 -0
  197. package/dist/4819.creaditor.bundle.js.gz +0 -0
  198. package/dist/5791.creaditor.bundle.js +0 -288
  199. package/dist/5791.creaditor.bundle.js.gz +0 -0
  200. package/dist/5884.creaditor.bundle.js +0 -91
  201. package/dist/5884.creaditor.bundle.js.gz +0 -0
  202. package/dist/7051.creaditor.bundle.js +0 -162
  203. package/dist/7051.creaditor.bundle.js.LICENSE.txt +0 -17
  204. package/dist/7051.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  205. package/dist/7051.creaditor.bundle.js.gz +0 -0
  206. package/dist/715.creaditor.bundle.js +0 -142
  207. package/dist/715.creaditor.bundle.js.LICENSE.txt +0 -11
  208. package/dist/715.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  209. package/dist/715.creaditor.bundle.js.gz +0 -0
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,288 @@
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[3601],{3601(t,i,e){e.r(i),e.d(i,{MakeNewsletterAsEventPlugin:()=>kt});var n,r,a,o,l,s,c,h,p,u,d,b,m,f,g,y,v,T,A,x,w,S,C,D,$,k,M,z,Z,E,L,H,V,P,R,B,q,O,F,I,K,N,W,_,j,G,J,Q,U,X,Y,tt,it,et,nt,rt,at,ot,lt,st,ct,ht,pt,ut,dt,bt,mt,ft,gt,yt,vt,Tt,At,xt,wt=e(59088),St=e(36936),Ct=e(59929),Dt=e(49410),$t=e(21421);let kt=(n=(0,Dt.EM)("cdtr-make-newsletter-as-event-plugin"),r=(0,Dt.MZ)({type:String}),a=(0,Dt.MZ)({type:String}),o=(0,Dt.MZ)({type:String}),l=(0,Dt.MZ)({type:String}),s=(0,Dt.MZ)({type:String}),c=(0,Dt.MZ)({type:String}),h=(0,Dt.MZ)({type:String}),p=(0,Dt.MZ)({type:String}),u=(0,Dt.MZ)({type:String}),d=(0,Dt.MZ)({type:String}),b=(0,Dt.MZ)({type:String}),m=(0,Dt.MZ)({type:String}),f=(0,Dt.MZ)({type:String}),g=(0,Dt.MZ)({type:String}),y=(0,Dt.MZ)({type:String}),v=(0,Dt.MZ)({type:String}),T=(0,Dt.MZ)({type:String}),A=(0,Dt.MZ)({type:String}),x=(0,Dt.MZ)({type:String}),w=(0,Dt.MZ)({type:String}),S=(0,Dt.MZ)({type:String}),C=(0,Dt.MZ)({type:String}),D=(0,Dt.MZ)({type:String}),$=(0,Dt.MZ)({type:String}),k=(0,Dt.MZ)({type:String}),M=(0,Dt.MZ)(),z=(0,Dt.MZ)(),Z=(0,Dt.MZ)(),E=(0,Dt.MZ)(),L=(0,Dt.MZ)(),H=(0,Dt.MZ)(),V=(0,Dt.MZ)(),P=(0,Dt.MZ)(),R=(0,Dt.MZ)(),B=(0,Dt.MZ)(),n((xt=class extends Ct.WF{constructor(){super(...arguments),(0,wt.A)(this,"lang",F,this),(0,wt.A)(this,"primaryColor",I,this),(0,wt.A)(this,"primaryTextColor",K,this),(0,wt.A)(this,"buttonText",N,this),(0,wt.A)(this,"iconColor",W,this),(0,wt.A)(this,"buttonTextContent",_,this),(0,wt.A)(this,"headerText",j,this),(0,wt.A)(this,"startLabel",G,this),(0,wt.A)(this,"endLabel",J,this),(0,wt.A)(this,"locationLabel",Q,this),(0,wt.A)(this,"linkLabel",U,this),(0,wt.A)(this,"saveButtonText",X,this),(0,wt.A)(this,"cancelEventText",Y,this),(0,wt.A)(this,"confirmCancelText",tt,this),(0,wt.A)(this,"creatingEventText",it,this),(0,wt.A)(this,"eventCreatedText",et,this),(0,wt.A)(this,"errorMessage",nt,this),(0,wt.A)(this,"locationPlaceholder",rt,this),(0,wt.A)(this,"linkPlaceholder",at,this),(0,wt.A)(this,"initialStartDate",ot,this),(0,wt.A)(this,"initialStartTime",lt,this),(0,wt.A)(this,"initialEndDate",st,this),(0,wt.A)(this,"initialEndTime",ct,this),(0,wt.A)(this,"initialLocation",ht,this),(0,wt.A)(this,"initialLink",pt,this),(0,wt.A)(this,"startDate",ut,this),(0,wt.A)(this,"startTime",dt,this),(0,wt.A)(this,"endDate",bt,this),(0,wt.A)(this,"endTime",mt,this),(0,wt.A)(this,"location",ft,this),(0,wt.A)(this,"link",gt,this),(0,wt.A)(this,"error",yt,this),(0,wt.A)(this,"isSaving",vt,this),(0,wt.A)(this,"isSaved",Tt,this),(0,wt.A)(this,"isConfirmingCancel",At,this),this.popoverRef=(0,$t._)(),this.cancelTimeout=null}get buttonDisplayText(){if(this.isSaved)return this.eventCreatedText;if(this.isSaving)return this.creatingEventText;if(this.startDate&&this.startTime){return new Date(`${this.startDate}T${this.startTime}`).toLocaleDateString(this.lang,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}return this.buttonTextContent}connectedCallback(){super.connectedCallback(),this.initialStartDate&&this.initialStartTime&&(this.startDate=this.initialStartDate,this.startTime=this.initialStartTime),this.initialEndDate&&this.initialEndTime&&(this.endDate=this.initialEndDate,this.endTime=this.initialEndTime),this.initialLocation&&(this.location=this.initialLocation),this.initialLink&&(this.link=this.initialLink)}handleStartDateTimeChange(t){const i=t.target,[e,n]=i.value.split("T");if(this.startDate=e,this.startTime=n,!this.endDate&&!this.endTime){const t=new Date(`${e}T${n}`),i=new Date(t.getTime()+36e5);this.endDate=i.toISOString().split("T")[0],this.endTime=i.toTimeString().slice(0,5)}this.validateDates()}handleEndDateTimeChange(t){const i=t.target,[e,n]=i.value.split("T");this.endDate=e,this.endTime=n,this.validateDates()}validateDates(){if(this.startDate&&this.startTime&&this.endDate&&this.endTime){const t=new Date(`${this.startDate}T${this.startTime}`),i=new Date(`${this.endDate}T${this.endTime}`);this.error=i<=t?this.errorMessage:""}}async handleSave(){if(this.error)return;this.isSaving=!0,this.isSaved=!1;const t=new CustomEvent("event-created",{detail:{startDate:this.startDate,startTime:this.startTime,endDate:this.endDate,endTime:this.endTime,location:this.location,link:this.link},bubbles:!0,composed:!0});this.dispatchEvent(t),this.popoverRef.value?.close(),await new Promise(t=>setTimeout(t,1500)),this.isSaving=!1,this.isSaved=!0,setTimeout(()=>{this.isSaved=!1},2e3)}handleCancelEvent(){if(this.isConfirmingCancel){this.cancelTimeout&&(clearTimeout(this.cancelTimeout),this.cancelTimeout=null),this.startDate="",this.startTime="",this.endDate="",this.endTime="",this.location="",this.link="",this.error="",this.isConfirmingCancel=!1;const t=new CustomEvent("event-cancelled",{detail:{startDate:this.startDate,startTime:this.startTime,endDate:this.endDate,endTime:this.endTime,location:this.location,link:this.link},bubbles:!0,composed:!0});this.dispatchEvent(t),this.popoverRef.value?.close()}else this.isConfirmingCancel=!0,this.cancelTimeout=window.setTimeout(()=>{this.isConfirmingCancel=!1},3e3)}disconnectedCallback(){super.disconnectedCallback(),this.cancelTimeout&&clearTimeout(this.cancelTimeout)}render(){return Ct.qy`
2
+ <cdtr-popover ${(0,$t.K)(this.popoverRef)}>
3
+ <paper-button
4
+ color="primary"
5
+ slot="trigger"
6
+ dir="auto"
7
+ ?disabled=${this.isSaving}
8
+ >
9
+ <div
10
+ style="color:${this.iconColor}"
11
+ class="button-content ${this.isSaved?"hidden":""}"
12
+ >
13
+ <svg
14
+ width="20"
15
+ height="20"
16
+ xmlns="http://www.w3.org/2000/svg"
17
+ viewBox="0 0 24 24"
18
+ fill="${this.iconColor||"currentColor"}"
19
+ >
20
+ <path
21
+ d="M9 1V3H15V1H17V3H21C21.5523 3 22 3.44772 22 4V20C22 20.5523 21.5523 21 21 21H3C2.44772 21 2 20.5523 2 20V4C2 3.44772 2.44772 3 3 3H7V1H9ZM20 11H4V19H20V11ZM11 13V17H6V13H11ZM7 5H4V9H20V5H17V7H15V5H9V7H7V5Z"
22
+ ></path>
23
+ </svg>
24
+ ${this.buttonDisplayText}
25
+ </div>
26
+ <div
27
+ class="button-border ${this.isSaving?"loading":""} ${this.isSaved?"success":""}"
28
+ ></div>
29
+ <svg
30
+ class="checkmark ${this.isSaved?"visible":""}"
31
+ viewBox="0 0 24 24"
32
+ xmlns="http://www.w3.org/2000/svg"
33
+ >
34
+ <path
35
+ d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"
36
+ fill="${"currentColor"}"
37
+ />
38
+ </svg>
39
+ </paper-button>
40
+ <div slot="content" class="popover-content" dir="auto">
41
+ <div class="popover-header">
42
+ <h3 dir="auto">${this.headerText}</h3>
43
+ </div>
44
+
45
+ <div class="input-group">
46
+ <label dir="auto">${this.startLabel}</label>
47
+ <input
48
+ type="datetime-local"
49
+ .value=${`${this.startDate}T${this.startTime}`}
50
+ @change=${this.handleStartDateTimeChange}
51
+ dir="auto"
52
+ />
53
+ </div>
54
+
55
+ <div class="input-group">
56
+ <label dir="auto">${this.endLabel}</label>
57
+ <input
58
+ type="datetime-local"
59
+ .value=${`${this.endDate}T${this.endTime}`}
60
+ @change=${this.handleEndDateTimeChange}
61
+ dir="auto"
62
+ />
63
+ </div>
64
+
65
+ <div class="input-group">
66
+ <label dir="auto">${this.locationLabel}</label>
67
+ <input
68
+ type="text"
69
+ .value=${this.location}
70
+ @input=${t=>this.location=t.target.value}
71
+ placeholder=${this.locationPlaceholder}
72
+ dir="auto"
73
+ />
74
+ </div>
75
+
76
+ <div class="input-group">
77
+ <label dir="auto">${this.linkLabel}</label>
78
+ <input
79
+ name="link"
80
+ type="url"
81
+ .value=${this.link}
82
+ @input=${t=>this.link=t.target.value}
83
+ placeholder=${this.linkPlaceholder}
84
+ dir="auto"
85
+ />
86
+ </div>
87
+
88
+ ${this.error?Ct.qy`<div class="error" dir="auto">${this.error}</div>`:""}
89
+
90
+ <div class="button-group">
91
+ ${this.startDate||this.endDate?Ct.qy`
92
+ <paper-button
93
+ style=${`background: #ff0000;color:${this.primaryTextColor}`}
94
+ class="cancel-event ${this.isConfirmingCancel?"confirming":""}"
95
+ @click=${this.handleCancelEvent}
96
+ ?disabled=${this.isSaving}
97
+ dir="auto"
98
+ >
99
+ ${this.isConfirmingCancel?this.confirmCancelText:this.cancelEventText}
100
+ </paper-button>
101
+ `:""}
102
+ <paper-button
103
+ @click=${this.handleSave}
104
+ ?disabled=${!!this.error||this.isSaving}
105
+ style=${`background: ${this.primaryColor};color:${this.primaryTextColor};width:100%;`}
106
+ dir="auto"
107
+ >
108
+ ${this.saveButtonText}
109
+ </paper-button>
110
+ </div>
111
+ </div>
112
+ </cdtr-popover>
113
+ `}},xt.styles=Ct.AH`
114
+ :host {
115
+ display: block;
116
+ }
117
+ * {
118
+ font-family: Arial, Helvetica, sans-serif;
119
+ box-sizing: border-box;
120
+ }
121
+ .popover-content {
122
+ padding: 16px;
123
+ min-width: 300px;
124
+ }
125
+ .popover-header {
126
+ display: flex;
127
+ align-items: center;
128
+ gap: 8px;
129
+ margin-bottom: 16px;
130
+ padding-bottom: 8px;
131
+ border-bottom: 1px solid #e0e0e0;
132
+ }
133
+ .popover-header h3 {
134
+ margin: 0;
135
+ font-size: 16px;
136
+ font-weight: 600;
137
+ color: #333;
138
+ }
139
+ .popover-header svg {
140
+ width: 20px;
141
+ height: 20px;
142
+ color: #666;
143
+ }
144
+ .input-group {
145
+ margin-bottom: 16px;
146
+ }
147
+ .input-group label {
148
+ display: block;
149
+ margin-bottom: 4px;
150
+ font-size: 14px;
151
+ color: #333;
152
+ }
153
+ .input-group input {
154
+ padding: 8px 12px;
155
+ border: 1px solid #ccc;
156
+ border-radius: 4px;
157
+ width: 100%;
158
+ font-size: 14px;
159
+ transition: border-color 0.2s;
160
+ }
161
+ .input-group input:focus {
162
+ border-color: #666;
163
+ outline: none;
164
+ }
165
+ .datetime-container {
166
+ display: grid;
167
+ grid-template-columns: 1fr 1fr;
168
+ gap: 8px;
169
+ }
170
+ .error {
171
+ color: #ff0000;
172
+ font-size: 12px;
173
+ margin-bottom: 8px;
174
+ }
175
+
176
+ .button-content {
177
+ display: flex;
178
+ align-items: center;
179
+ gap: 8px;
180
+ position: relative;
181
+ z-index: 1;
182
+ transition: opacity 0.3s ease;
183
+ }
184
+
185
+ .button-content.hidden {
186
+ opacity: 0;
187
+ }
188
+
189
+ .button-border {
190
+ position: absolute;
191
+ top: 0;
192
+ left: 0;
193
+ right: 0;
194
+ bottom: 0;
195
+ border: 2px solid transparent;
196
+ border-radius: 4px;
197
+ pointer-events: none;
198
+ }
199
+
200
+ .button-border.loading {
201
+ border-color: #ffffff;
202
+ animation: borderRotate 1.5s linear infinite;
203
+ }
204
+
205
+ .button-border.success {
206
+ border-color: #4caf50;
207
+ animation: borderSuccess 0.5s ease-out forwards;
208
+ }
209
+ paper-button {
210
+ min-width: 10px;
211
+ max-height:40px;
212
+ }
213
+ .checkmark {
214
+ position: absolute;
215
+ top: 50%;
216
+ left: 50%;
217
+ transform: translate(-50%, -50%) scale(0);
218
+ width: 24px;
219
+ height: 24px;
220
+ opacity: 0;
221
+ transition: opacity 0.3s ease;
222
+ }
223
+
224
+ .checkmark.visible {
225
+ opacity: 1;
226
+ transform: translate(-50%, -50%) scale(1);
227
+ }
228
+
229
+ @keyframes borderRotate {
230
+ 0% {
231
+ clip-path: polygon(0 0, 0 0, 0 0, 0 0);
232
+ }
233
+ 25% {
234
+ clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
235
+ }
236
+ 50% {
237
+ clip-path: polygon(100% 0, 100% 100%, 100% 100%, 100% 0);
238
+ }
239
+ 75% {
240
+ clip-path: polygon(100% 100%, 0 100%, 0 100%, 100% 100%);
241
+ }
242
+ 100% {
243
+ clip-path: polygon(0 100%, 0 0, 0 0, 0 100%);
244
+ }
245
+ }
246
+
247
+ @keyframes borderSuccess {
248
+ 0% {
249
+ clip-path: polygon(0 0, 0 0, 0 0, 0 0);
250
+ }
251
+ 100% {
252
+ clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
253
+ }
254
+ }
255
+
256
+ @keyframes checkmarkSuccess {
257
+ 0% {
258
+ transform: translate(-50%, -50%) scale(0);
259
+ opacity: 0;
260
+ }
261
+ 50% {
262
+ transform: translate(-50%, -50%) scale(1.2);
263
+ opacity: 1;
264
+ }
265
+ 100% {
266
+ transform: translate(-50%, -50%) scale(1);
267
+ opacity: 1;
268
+ }
269
+ }
270
+
271
+ .button-group {
272
+ display: flex;
273
+ gap: 8px;
274
+ margin-top: 16px;
275
+ }
276
+
277
+ @keyframes pulse {
278
+ 0% {
279
+ transform: scale(1);
280
+ }
281
+ 50% {
282
+ transform: scale(1.05);
283
+ }
284
+ 100% {
285
+ transform: scale(1);
286
+ }
287
+ }
288
+ `,O=xt,F=(0,St.A)(O.prototype,"lang",[r],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"en"}}),I=(0,St.A)(O.prototype,"primaryColor",[a],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"#000000"}}),K=(0,St.A)(O.prototype,"primaryTextColor",[o],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"#ffffff"}}),N=(0,St.A)(O.prototype,"buttonText",[l],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"#ffffff"}}),W=(0,St.A)(O.prototype,"iconColor",[s],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"#ffffff"}}),_=(0,St.A)(O.prototype,"buttonTextContent",[c],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),j=(0,St.A)(O.prototype,"headerText",[h],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Create Event"}}),G=(0,St.A)(O.prototype,"startLabel",[p],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Start Date & Time"}}),J=(0,St.A)(O.prototype,"endLabel",[u],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"End Date & Time"}}),Q=(0,St.A)(O.prototype,"locationLabel",[d],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Location"}}),U=(0,St.A)(O.prototype,"linkLabel",[b],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Link (Optional)"}}),X=(0,St.A)(O.prototype,"saveButtonText",[m],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Save Event"}}),Y=(0,St.A)(O.prototype,"cancelEventText",[f],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Cancel Event"}}),tt=(0,St.A)(O.prototype,"confirmCancelText",[g],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Are you sure you want to cancel?"}}),it=(0,St.A)(O.prototype,"creatingEventText",[y],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Creating Event..."}}),et=(0,St.A)(O.prototype,"eventCreatedText",[v],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Event Created!"}}),nt=(0,St.A)(O.prototype,"errorMessage",[T],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"End date/time must be after start date/time"}}),rt=(0,St.A)(O.prototype,"locationPlaceholder",[A],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Enter event location"}}),at=(0,St.A)(O.prototype,"linkPlaceholder",[x],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return"Enter event link"}}),ot=(0,St.A)(O.prototype,"initialStartDate",[w],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),lt=(0,St.A)(O.prototype,"initialStartTime",[S],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),st=(0,St.A)(O.prototype,"initialEndDate",[C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ct=(0,St.A)(O.prototype,"initialEndTime",[D],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ht=(0,St.A)(O.prototype,"initialLocation",[$],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),pt=(0,St.A)(O.prototype,"initialLink",[k],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ut=(0,St.A)(O.prototype,"startDate",[M],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),dt=(0,St.A)(O.prototype,"startTime",[z],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),bt=(0,St.A)(O.prototype,"endDate",[Z],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),mt=(0,St.A)(O.prototype,"endTime",[E],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ft=(0,St.A)(O.prototype,"location",[L],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),gt=(0,St.A)(O.prototype,"link",[H],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),yt=(0,St.A)(O.prototype,"error",[V],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),vt=(0,St.A)(O.prototype,"isSaving",[P],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tt=(0,St.A)(O.prototype,"isSaved",[R],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),At=(0,St.A)(O.prototype,"isConfirmingCancel",[B],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),q=O))||q)}}]);
Binary file
Binary file
Binary file
@@ -1,4 +1,4 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[380],{70380(t,e,s){s.r(e),s.d(e,{default:()=>p});var i=s(59929),n=s(21421),a=s(91597);const o="֑-߿יִ-﷽ﹰ-ﻼ",l="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",c=new RegExp("^[^"+l+"]*["+o+"]"),r=new RegExp("^[^"+o+"]*["+l+"]");var u=s(86319);const h=(0,a.S)();class p extends i.WF{constructor(){super(),this.inputRef=(0,n._)(),this.min=0,this.max=100,this.step=1,this.autofocus=!1,this.type="text",this.value="number"===this.type?"0":"",this.placeholder="",this.oldValue=this.value,this.successActive=!1,this._successTimeout=null}onSubmit(t){t.preventDefault();const e=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),this.oldValue=this.value}focus(){const t=this.inputRef.value;t.focus(),t.setSelectionRange(t.value.length,t.value.length)}onFocus(){const t=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onBlur(){const t=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),this.oldValue=this.value}render(){this.fullWidth&&(this.style.width="100%"),this.value||"text"!==this.type||(this.value=""),this.icon&&"string"!=typeof this.inputStyle&&(this.inputStyle="");const t=u.M.get("lang",this.placeholder)||this.placeholder||"";t&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("text-align")&&(this.inputStyle+=";text-align:"+("rtl"===function(t){const e=String(t||"");return c.test(e)?"rtl":r.test(e)?"ltr":"neutral"}(t)?"right":"")));const e=this.multiline?i.qy` <textarea
1
+ "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[380],{70380(t,e,s){s.r(e),s.d(e,{default:()=>h});var i=s(59929),n=s(21421),a=s(91597);const o="֑-߿יִ-﷽ﹰ-ﻼ",l="A-Za-zÀ-ÖØ-öø-ʸ̀-֐ࠀ-῿‎Ⰰ-﬜︀-﹯﻽-￿",c=new RegExp("^[^"+l+"]*["+o+"]"),r=new RegExp("^[^"+o+"]*["+l+"]");var u=s(86319);const p=(0,a.S)();class h extends i.WF{constructor(){super(),this.inputRef=(0,n._)(),this.min=0,this.max=100,this.step=1,this.autofocus=!1,this.type="text",this.value="number"===this.type?"0":"",this.placeholder="",this.oldValue=this.value,this.successActive=!1,this._successTimeout=null}onSubmit(t){t.preventDefault();const e=new UIEvent("submit",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(e),this.oldValue=this.value}focus(){const t=this.inputRef.value;t.focus(),t.setSelectionRange(t.value.length,t.value.length)}onFocus(){const t=new UIEvent("focus",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}onBlur(){const t=new UIEvent("blur",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),this.oldValue=this.value}render(){this.fullWidth&&(this.style.width="100%"),this.value||"text"!==this.type||(this.value=""),this.icon&&"string"!=typeof this.inputStyle&&(this.inputStyle="");const t=u.M.get("lang",this.placeholder)||this.placeholder||"";t&&("string"!=typeof this.inputStyle&&(this.inputStyle=""),-1===this.inputStyle.indexOf("text-align")&&(this.inputStyle+=";text-align:"+("rtl"===function(t){const e=String(t||"");return c.test(e)?"rtl":r.test(e)?"ltr":"neutral"}(t)?"right":"")));const e=this.multiline?i.qy` <textarea
2
2
  rows=${this.row||4}
3
3
  .disabled=${this.disabled}
4
4
  dir="auto"
@@ -49,7 +49,7 @@
49
49
  ${"text"===this.type&&this.maxLength?i.qy`<span class="counter"
50
50
  >${this.value.length}/${this.maxLength}</span
51
51
  > `:null}
52
- </form>`}firstUpdated(){this.autofocus&&setTimeout(()=>{this.inputRef.value&&this.inputRef.value.focus()},500),void 0===this.value&&(this.value="")}focus(){super.focus(),this.inputRef.value.focus()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null)}setValue(t){if(this.selectionStart=this.inputRef.value.selectionStart,!this.inputRef.value)return;const e=this.inputRef.value;if("text"===this.type&&this.max&&e.value.length>this.max)return e.value=this.value,void this.inputRef.value.focus();this.value=e.value;const s=new UIEvent(t.type,{view:window,bubbles:!0,cancelable:!0});if(this.dispatchEvent(s),"input"===t.type){const t=()=>{const t=new UIEvent("debounce",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)};h.run(t,500)}}success(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null),this.successActive=!0;const e=Number(t);!Number.isFinite(e)||e<=0||(this._successTimeout=setTimeout(()=>{this.successActive=!1,this._successTimeout=null},e))}patch(t){this.value=t}}p.styles=i.AH`
52
+ </form>`}firstUpdated(){this.autofocus&&setTimeout(()=>{this.inputRef.value&&this.inputRef.value.focus()},500),void 0===this.value&&(this.value="")}focus(){super.focus(),this.inputRef.value.focus()}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null)}setValue(t){if(this.selectionStart=this.inputRef.value.selectionStart,!this.inputRef.value)return;const e=this.inputRef.value;if("text"===this.type&&this.max&&e.value.length>this.max)return e.value=this.value,void this.inputRef.value.focus();this.value=e.value;const s=new UIEvent(t.type,{view:window,bubbles:!0,cancelable:!0});if(this.dispatchEvent(s),"input"===t.type){const t=()=>{const t=new UIEvent("debounce",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)};p.run(t,500)}}success(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e3;this._successTimeout&&(clearTimeout(this._successTimeout),this._successTimeout=null),this.successActive=!0;const e=Number(t);!Number.isFinite(e)||e<=0||(this._successTimeout=setTimeout(()=>{this.successActive=!1,this._successTimeout=null},e))}patch(t){this.value=t}}h.styles=i.AH`
53
53
  :host {
54
54
  display: inline-block;
55
55
  --cdtr-input-height: 30px;
@@ -78,7 +78,7 @@
78
78
  -webkit-appearance: none;
79
79
  -moz-appearance: none;
80
80
  appearance: none;
81
- border-radius: 0.25rem;
81
+ border-radius: var(--cdtr-input-radius, 0.25rem);
82
82
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
83
83
  margin: 0;
84
84
  font-family: var(--font-family);
@@ -185,4 +185,4 @@
185
185
  box-shadow: 0 0 10px rgba(79, 192, 111, 0.2);
186
186
  }
187
187
  }
188
- `,p.properties={value:{type:String,reflect:!0},step:{type:Number,reflect:!0},min:{type:Number,reflect:!0},max:{type:Number,reflect:!0},type:{type:String,reflect:!0},inputDir:{type:String},icon:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},autofocus:{type:Boolean,reflect:!0},fullWidth:{type:Boolean,reflect:!0},selectionStart:{type:Number},inputStyle:{type:String,reflect:!0},maxLength:{type:Number},couchOnEmpty:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},row:{type:Number},successActive:{type:Boolean}},customElements.get("cdtr-input")||customElements.define("cdtr-input",p)}}]);
188
+ `,h.properties={value:{type:String,reflect:!0},step:{type:Number,reflect:!0},min:{type:Number,reflect:!0},max:{type:Number,reflect:!0},type:{type:String,reflect:!0},inputDir:{type:String},icon:{type:String,reflect:!0},placeholder:{type:String,reflect:!0},autofocus:{type:Boolean,reflect:!0},fullWidth:{type:Boolean,reflect:!0},selectionStart:{type:Number},inputStyle:{type:String,reflect:!0},maxLength:{type:Number},couchOnEmpty:{type:Boolean},disabled:{type:Boolean},multiline:{type:Boolean},row:{type:Number},successActive:{type:Boolean}},customElements.get("cdtr-input")||customElements.define("cdtr-input",h)}}]);
Binary file
Binary file
@@ -78,7 +78,7 @@
78
78
  -webkit-appearance: none;
79
79
  -moz-appearance: none;
80
80
  appearance: none;
81
- border-radius: 0.25rem;
81
+ border-radius: var(--cdtr-input-radius, 0.25rem);
82
82
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
83
83
  margin: 0;
84
84
  font-family: var(--font-family);
@@ -311,10 +311,14 @@
311
311
  }
312
312
  .compact-tab cdtr-checkbox {
313
313
  flex: none;
314
+ /* a light empty box; checked still turns the primary colour */
315
+ color: #a8a5b5;
314
316
  }
315
317
  /* the email/SMS extra fields are drawn 260px wide; in a tight panel they fill the space instead */
316
318
  .compact cdtr-input {
317
319
  width: 100% !important;
320
+ /* rounded like the type dropdown under it */
321
+ --cdtr-input-radius: 8px;
318
322
  }
319
323
  .compact .explain-title {
320
324
  margin-top: 4px;
@@ -1080,8 +1084,8 @@
1080
1084
  </div>
1081
1085
  `}}}(s.WF)){constructor(){super(),this.inputRef=(0,a._)(),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.urlInputFocused=!1,this._urlInputRawValue="",this._lastSyncedMyHref=void 0,this._lastBodySyncHref=void 0,this.lastUrl=void 0,this.target="_blank",this.anchors=[],this.event=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}),this.options=c,this.body="",this.subject="",this.name=o.M.get("lang",c[0].text),this.initAutomations()}onDispatch(){this.event=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});const t=function(t){const{href:e,protocol:i,params:s,body:o,subject:r,target:n,dispatchEvent:a,event:l}=t;if(!e)return a(l),{dispatched:!0};const c=L(e,i,s,o,r,n);return c?{dispatched:!0,href:c.url,protocol:c.protocol,params:c.params,value:c.url,link:c.url,lastUrl:c.url}:{dispatched:!1}}({href:this.href,protocol:this.protocol,params:this.params,body:this.body,subject:this.subject,target:this.target,dispatchEvent:this.dispatchEvent.bind(this),event:this.event});if(t.dispatched){if(t.href){this.href=t.href,this.protocol=t.protocol,this.params=t.params?{...t.params}:{},this.value=t.value,this.link=t.link,this.lastUrl=t.lastUrl;const e="string"==typeof t.href?t.href:t.href?.href;this._urlInputRawValue=null!=e&&""!==e?String(e):""}this.dispatchEvent(this.event)}}onChangeLink(t){const e=t.target.value;this._urlInputRawValue=e;const i=R(e,this.protocol,this.href);null!==i?(this.href=i.href,this.protocol=i.protocol,i.clearParams&&(this.body="",this.subject=""),void 0!==i.body&&(this.body=i.body),void 0!==i.subject&&(this.subject=i.subject),i.shouldBlur&&this.onBlur()):this.href=e}onKeyDown(t){if("submit"===t.type){const t=this.inputRef?.value;void 0!==t?.value&&this.onChangeLink({target:{value:t.value}}),t&&"function"==typeof t.success&&t.success(),this.onDispatch()}}onUrlInputFocus(){const t=this.inputRef?.value?.value;null!=t&&(this._urlInputRawValue=t),this.urlInputFocused=!0}onUrlInputBlur(){this.urlInputFocused=!1,this.hasButton||this.onDispatch()}onBlur(){this.hasButton||this.onDispatch()}onClickOk(){this.onDispatch()}onChangeTarget(t){const e={target:t.target.value};this.target=e.target,t.stopPropagation(),!this.hasButton&&this.href&&this.onBlur()}resolveAnchors(){this.anchors=U()}onChangeType(t){if(t===C)return void this.onAutomationsClick();const e=function(t,e,i,s){const o=e.find(e=>e.type===t);if(!o)return{forceProtocolChange:!1};const r="anchor"===o.text,n=s!==o.type;return setTimeout(()=>{i&&i.value&&i.value.focus()},500),{protocol:o.type,forceProtocolChange:!0,shouldResolveAnchors:r,clearParams:n}}(t,this.options,this.inputRef,this.protocol);if(e.shouldResolveAnchors&&this.resolveAnchors(),this.protocol=e.protocol,this.forceProtocolChange=e.forceProtocolChange,e.clearParams&&(this.body="",this.subject=""),this.compact&&e.clearParams)return this.href="",this.params={},void(this._urlInputRawValue="");if(e.forceProtocolChange){const t=new r.A(this.href,{protocol:this.protocol});t.protocol=this.protocol,this.href=t,this.onBlur()}}connectedCallback(){super.connectedCallback(),this.href=new r.A(this.href);const t=String(this.href?.href||""),e=(0,m.r_)(t),i=this.href&&this.href.params&&this.href.params[p];(e||i)&&this.parseAutomationLink(this.href)}render(){const t=o.M.get("config","editor","configure","editorProps","linkPicker","savedVariables");this.resolveAnchors();const e=this.lastUrl!==this.href,i=new r.A(this.href,{protocol:e?null:this.protocol});this.protocol&&!e?i.protocol=this.protocol:i.protocol&&(this.protocol=i.protocol);const n=String(this.href?.href||this.href||"");if(this._lastBodySyncHref!==n){const t=void 0===this._lastBodySyncHref;this._lastBodySyncHref=n,i.params?(this.body=i.params.text||i.params.body||"",this.subject=i.params.subject||""):(this.body="",this.subject="");(0,m.r_)(n)||i.params&&i.params[p]?(this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,this.showAutomations=!0,this.parseAutomationLink(this.href)):(this.showAutomations=!1,this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,t&&this.openAutomations&&B().length&&this.onAutomationsClick())}const l=function(t,e,i){let s=[];return t.isEmail?s=[]:t.isPhone?s=i.filter(t=>("tel:"===t.type||"sms:"===t.type||"whatsapp:"===t.type)&&t.type!==e):-1!==t.href.indexOf("http://")&&"https:"!==e&&(s=[{type:"https:",text:o.M.get("lang","is_user_wants_https"),reccomanded:!0}]),"anchor:"===e&&(s=[]),s}(i,this.protocol,this.options);let c=i.href;const h=String(i.href||""),d=(0,m.r_)(h),g=i.params&&i.params[p];if(d)c=h;else if(g){const t=u,e=[];i.params&&Object.keys(i.params).forEach(s=>{if(!t.includes(s)){const t=i.params[s];e.push(`${s}=${encodeURIComponent(t).replace(/%24/g,"$")}`)}});const s=i.url||"";c=i.protocol?"http:"===i.protocol||"https:"===i.protocol?`${i.protocol}//${s}`:`${i.protocol}${s}`:s,e.length>0&&(c+=`?${e.join("&")}`)}const f=function(t){switch(t){case"mailto:":return"what_the_email_address";case"tel:":return"what_the_phone_number";case"sms:":case"whatsapp:":return"what_the_phone_number_to_send_msg";case"anchor:":return"what_the_anchor_name";case"file:":return"what_the_file_name";default:return"what_the_url_address"}}(this.protocol),b=[...this.options],y=b.findIndex(t=>"http:"===t.type);y>-1&&b.splice(y,1);const x=B(),v={url:i,href:this.href,protocol:this.protocol,anchors:this.anchors,body:this.body,subject:this.subject,onChangeLink:this.onChangeLink.bind(this),onBlur:this.onBlur.bind(this),onRequest:this.onRequest,updateBody:t=>{this.body=t},updateSubject:t=>{this.subject=t}},w=null!=c&&""!==c?String(c):"",$=this._urlInputRawValue!==w,k=void 0!==this._lastSyncedMyHref&&w!==this._lastSyncedMyHref,A=this.urlInputFocused&&this._urlInputRawValue&&w&&!k;$&&!A?(this._urlInputRawValue=w,this._lastSyncedMyHref=w):$||(this._lastSyncedMyHref=w);const L=this.urlInputFocused&&void 0!==this._urlInputRawValue?this._urlInputRawValue:c,R={protocol:this.protocol,url:i,autofocus:this.autofocus,inputRef:(0,a.K)(this.inputRef),onChangeLink:this.onChangeLink.bind(this),onBlur:this.onUrlInputBlur.bind(this),onFocus:this.onUrlInputFocus.bind(this),onKeyDown:this.onKeyDown.bind(this),myHref:L},U="rtl"===getComputedStyle(this).getPropertyValue("--direction-locale").trim();if(this.showAutomations)return s.qy` <div class="root ${U?"rtl":""}">${this.renderAutomationsView()}</div>`;if(this.compact){const t=!this.protocol||"https:"===this.protocol||"http:"===this.protocol;return s.qy`<div class="compact">
1082
1086
  <div class="compact-row">
1087
+ ${"anchor:"===this.protocol?null:S({...R,value:L,onChange:R.onChangeLink,placeholder:o.M.get("lang",f)||"",style:"width:100%;--cdtr-input-height:36px;",width:"100%",coach:!1})}
1083
1088
  ${M(b,this.protocol,this.onChangeType.bind(this),x)}
1084
- ${"anchor:"===this.protocol?null:S({...R,value:L,onChange:R.onChangeLink,placeholder:o.M.get("lang",f)||"",style:"width:100%;--cdtr-input-height:32px;",width:"100%",coach:!1})}
1085
1089
  </div>
1086
1090
  ${_(this.protocol,v)}
1087
1091
  ${t?s.qy`<div
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file