@creaditor/web-starterkit 1.0.61 → 1.0.63

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 (32) hide show
  1. package/dist/3601.creaditor.bundle.js +288 -0
  2. package/dist/3601.creaditor.bundle.js.gz +0 -0
  3. package/dist/3847.creaditor.bundle.js +114 -67
  4. package/dist/3847.creaditor.bundle.js.gz +0 -0
  5. package/dist/507.creaditor.bundle.js +334 -0
  6. package/dist/507.creaditor.bundle.js.gz +0 -0
  7. package/dist/{4819.creaditor.bundle.js → 6323.creaditor.bundle.js} +7 -7
  8. package/dist/6323.creaditor.bundle.js.gz +0 -0
  9. package/dist/8088.creaditor.bundle.js +141 -0
  10. package/dist/8088.creaditor.bundle.js.gz +0 -0
  11. package/dist/8299.creaditor.bundle.js +74 -42
  12. package/dist/8299.creaditor.bundle.js.gz +0 -0
  13. package/dist/creaditor.bundle.js +251 -85
  14. package/dist/creaditor.bundle.js.gz +0 -0
  15. package/dist/service-worker.js +1 -1
  16. package/dist/service-worker.js.gz +0 -0
  17. package/package.json +1 -1
  18. package/dist/2001.creaditor.bundle.js +0 -318
  19. package/dist/2001.creaditor.bundle.js.LICENSE.txt +0 -11
  20. package/dist/2001.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  21. package/dist/2001.creaditor.bundle.js.gz +0 -0
  22. package/dist/2682.creaditor.bundle.js +0 -195
  23. package/dist/2682.creaditor.bundle.js.LICENSE.txt +0 -11
  24. package/dist/2682.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  25. package/dist/2682.creaditor.bundle.js.gz +0 -0
  26. package/dist/4819.creaditor.bundle.js.gz +0 -0
  27. package/dist/5791.creaditor.bundle.js +0 -288
  28. package/dist/5791.creaditor.bundle.js.gz +0 -0
  29. package/dist/715.creaditor.bundle.js +0 -142
  30. package/dist/715.creaditor.bundle.js.LICENSE.txt +0 -11
  31. package/dist/715.creaditor.bundle.js.LICENSE.txt.gz +0 -0
  32. package/dist/715.creaditor.bundle.js.gz +0 -0
@@ -1,195 +0,0 @@
1
- /*! For license information please see 2682.creaditor.bundle.js.LICENSE.txt */
2
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[2682],{2682(e,t,s){s.r(t);var o=s(14583),i=Object.defineProperty,n=(e,t,s)=>((e,t,s)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);const r=2;class d{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,s){this._$Ct=e,this._$AM=t,this._$Ci=s}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}const c=(e,t)=>{var s;const o=e._$AN;if(void 0===o)return!1;for(const e of o)null==(s=e._$AO)||s.call(e,t,!1),c(e,t);return!0},a=e=>{let t,s;do{if(void 0===(t=e._$AM))break;s=t._$AN,s.delete(e),e=t}while(0===(null==s?void 0:s.size))},h=e=>{for(let t;t=e._$AM;e=t){let s=t._$AN;if(void 0===s)t._$AN=s=new Set;else if(s.has(e))break;s.add(e),p(t)}};function l(e){void 0!==this._$AN?(a(this),this._$AM=e,h(this)):this._$AM=e}function u(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const o=this._$AH,i=this._$AN;if(void 0!==i&&0!==i.size)if(t)if(Array.isArray(o))for(let e=s;e<o.length;e++)c(o[e],!1),a(o[e]);else null!=o&&(c(o,!1),a(o));else c(this,e)}const p=e=>{e.type==r&&(e._$AP??(e._$AP=u),e._$AQ??(e._$AQ=l))};class b extends d{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,s){super._$AT(e,t,s),h(this),this.isConnected=e._$AU}_$AO(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var s,o;e!==this.isConnected&&(this.isConnected=e,e?null==(s=this.reconnected)||s.call(this):null==(o=this.disconnected)||o.call(this)),t&&(c(this,e),a(this))}setValue(e){if(void 0===this._$Ct.strings)this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}class f{}const v=new WeakMap,m=(g=class extends b{render(e){return o.A}update(e,t){let[s]=t;var i;const n=s!==this.G;return n&&void 0!==this.G&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.G=s,this.ht=null==(i=e.options)?void 0:i.host,this.rt(this.ct=e.element)),o.A}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){const t=this.ht??globalThis;let s=v.get(t);void 0===s&&(s=new WeakMap,v.set(t,s)),void 0!==s.get(this.G)&&this.G.call(this.ht,void 0),s.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){var e,t;return"function"==typeof this.G?null==(e=v.get(this.ht??globalThis))?void 0:e.get(this.G):null==(t=this.G)?void 0:t.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}},function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return{_$litDirective$:g,values:t}});var g;let w=1500;function y(){return w++}class x extends o.i{constructor(){super(),n(this,"contentRef",new f),this.toggle=this.toggle.bind(this),this.onEnter=this.onEnter.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.scheduleCalc=this.scheduleCalc.bind(this),this._calcScheduled=!1,this._resizeObserver=null,this.overflow=!0,this.maxHeight=300,this.left=0,this.top=0,this.custom=!1,this.opened=!1}close(){this.toggle()}onBouncing(e){this.searchText=e.target.value;const t=new UIEvent("search",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}render(){return o.b`
3
- <slot @click=${()=>this.toggle()} tabindex="0" name="trigger"></slot>
4
- ${this.opened?o.b` <div
5
- @mouseup=${this.onClickOutside}
6
- @mousemove=${this.onPointerMove}
7
- class="backdrop"
8
- style="z-index:${y()};"
9
- >
10
- <div
11
- ${m(this.contentRef)}
12
- @mouseup=${this.preventClosing}
13
- style="z-index:${y()};left:${this.left}px;top:${this.top}px;"
14
- class="dropdown-content fade-in ${this.custom?"":"dropdown-background"}"
15
- >
16
- ${this.search?o.b`<cdtr-input
17
- @input=${this.onBouncing}
18
- type="search"
19
- value=${this.searchText}
20
- ></cdtr-input>`:null}
21
- <slot name="content"></slot>
22
- </div>
23
- </div>`:null}
24
- `}preventClosing(e){return e.stopPropagation(),setTimeout(()=>{this.calcRects()},0),!1}onClickOutside(){this.toggle(!1)}updated(){const e=this.contentRef.value;this.opened&&e?(e.classList.add("fade-in"),this.scheduleCalc(),!this._resizeObserver&&typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(this.scheduleCalc),this._resizeObserver.observe(e))):!this.opened&&this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}scheduleCalc(){this._calcScheduled||(this._calcScheduled=!0,requestAnimationFrame(()=>{this._calcScheduled=!1,this.opened&&this.calcRects()}))}calcRects(){var e;const t=null==(e=this.contentRef)?void 0:e.value;if(!t)return;const s=this.getBoundingClientRect(),o=document.documentElement,i=o.clientWidth||window.innerWidth,n=o.clientHeight||window.innerHeight,r=i-16,d=n-16;t.style.maxWidth=`${r}px`,t.style.maxHeight=`${Math.min(this.maxHeight||d,d)}px`;const c=t.getBoundingClientRect(),a=c.width,h=c.height;let l=s.left;l+a>i-8&&(l=i-8-a),l<8&&(l=8);let u=s.bottom;if(u+h>n-8){const e=s.top-h;u=e>=8?e:n-8-h}u<8&&(u=8),this.left=l,this.top=u,t.style.left=`${l}px`,t.style.top=`${u}px`,t.style.overflow=this.overflow?"hidden auto":"hidden"}toggle(){var e;const t=arguments.length>0&&void 0!==arguments[0]&&arguments[0]||!this.opened;t?(window.removeEventListener("keydown",this.onKeydown),window.addEventListener("keydown",this.onKeydown),this.style.removeProperty("--cdtr-item-hover"),this.opened=t,setTimeout(()=>{const e=this.focusedItem=this.querySelector("cdtr-dropdown-item[focused]")||this.querySelector("cdtr-dropdown-item");e&&e.focus()},20)):(window.removeEventListener("keydown",this.onKeydown),null==(e=this.contentRef.value)||e.classList.add("fade-out"),setTimeout(()=>{this.opened=t},150)),this.setAttribute("aria-expanded",t)}onEnter(e){e.target===this&&13===e.keyCode&&this.toggle()}onPointerMove(){this.style.removeProperty("--cdtr-item-hover")}onKeydown(e){(40===e.keyCode||38===e.keyCode)&&this.style.setProperty("--cdtr-item-hover","transparent"),this.focusedItem&&40===e.keyCode&&this.focusedItem.nextElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.nextElementSibling.nodeName?(this.focusedItem=this.focusedItem.nextElementSibling,this.focusedItem&&this.focusedItem.focus()):this.focusedItem&&38===e.keyCode&&this.focusedItem.previousElementSibling&&"CDTR-DROPDOWN-ITEM"===this.focusedItem.previousElementSibling.nodeName?(this.focusedItem=this.focusedItem.previousElementSibling,this.focusedItem&&this.focusedItem.focus()):27===e.keyCode&&this.toggle();const t=new UIEvent("keypress",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t)}connectedCallback(){super.connectedCallback(),this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-disabled","false"),this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",this.opened),this.addEventListener("keydown",this.onEnter),setTimeout(()=>{this.opened&&this.toggle(!0)},50)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("keydown",this.onKeydown),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}patch(e){this.value=e,this.toggle(!1);const t=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t),setTimeout(()=>{this.focus()},0)}}n(x,"styles",o.a`
25
- :host {
26
- display: inline-block;
27
- overflow: hidden;
28
- box-sizing: border-box;
29
- }
30
-
31
- .backdrop {
32
- position: fixed;
33
- top: 0;
34
- left: 0;
35
- width: 100%;
36
- height: 100%;
37
- background: transparent;
38
- overflow: hidden;
39
- }
40
- /* padding lives here so custom content stays flush against the panel */
41
- .dropdown-background {
42
- background: #fff;
43
- padding: 4px;
44
- }
45
- .dropdown-content {
46
- box-sizing: border-box;
47
- min-width: 180px;
48
- min-height: 40px;
49
- position: fixed;
50
- border-radius: 10px;
51
- border: 1px solid #eceef1;
52
- /* layered depth: a tight ambient edge + a soft key shadow */
53
- box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06),
54
- 0 8px 24px -6px rgba(16, 24, 40, 0.16);
55
- transition: box-shadow 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
56
- }
57
- .fade-in {
58
- animation: fade-in 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
59
- }
60
- .fade-out {
61
- animation: fade-out 140ms ease both;
62
- opacity: 0;
63
- }
64
- @keyframes fade-in {
65
- from {
66
- opacity: 0;
67
- transform: translateY(-6px) scale(0.98);
68
- }
69
- to {
70
- opacity: 1;
71
- transform: none;
72
- }
73
- }
74
- @keyframes fade-out {
75
- from {
76
- opacity: 1;
77
- }
78
- to {
79
- opacity: 0;
80
- transform: translateY(-4px);
81
- }
82
- }
83
- @media (prefers-reduced-motion: reduce) {
84
- .fade-in,
85
- .fade-out {
86
- animation-duration: 1ms;
87
- transform: none;
88
- }
89
- }
90
- `),n(x,"properties",{search:{type:Boolean},searchText:{type:String},left:{type:Number},top:{type:Number},opened:{type:Boolean},maxHeight:{type:Number},overflow:{type:Boolean},value:{type:String},custom:{type:String}});class k extends o.i{constructor(){super(),this.minWidth=50}render(){return o.b`<paper-button style="min-width:${this.minWidth}px"
91
- ><slot></slot> <cdtr-dd-arrow-icon></cdtr-dd-arrow-icon
92
- ></paper-button>`}}n(k,"properties",{minWidth:{type:Number}}),n(k,"styles",o.a`
93
- paper-button {
94
- display: flex;
95
- align-items: center;
96
- justify-content: space-between;
97
- gap: 8px;
98
- text-transform: capitalize;
99
- width: 100%;
100
- line-height: 1.4;
101
- font-size: 13px;
102
- font-weight: 500;
103
- color: rgb(33, 37, 41);
104
- background: rgb(255, 255, 255);
105
- background-clip: padding-box;
106
- border: 1px solid var(--input-border-color, #ced4da);
107
- appearance: none;
108
- border-radius: 8px;
109
- transition: border-color 0.15s ease-in-out 0s,
110
- box-shadow 0.15s ease-in-out 0s, background-color 0.15s ease-in-out 0s;
111
- margin: 0px;
112
- font-family: var(--font-family, "Inter", Arial, sans-serif);
113
- box-sizing: border-box;
114
- padding: 7px 10px;
115
- cursor: pointer;
116
- }
117
- paper-button:hover {
118
- border-color: #9aa1a9;
119
- background: #fbfbfc;
120
- }
121
- paper-button:focus,
122
- paper-button:focus-within {
123
- outline: none;
124
- border-color: var(--cdtr-dropdown-accent, #7c5cf6);
125
- box-shadow: 0 0 0 3px rgba(124, 92, 246, 0.2);
126
- }
127
- `);class $ extends o.i{constructor(){super(),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this)}focus(){this.shadowRoot.querySelector(".dropdown-item").focus()}onFocus(){this.focused=!0}onBlur(){this.focused=!1}onClick(e){if(this.notClickable)return;const t=this.closest("cdtr-dropdown");t&&t.patch(this.value,e,this)}onPress(e){if(13===e.keyCode){const t=new UIEvent("click",{view:window,bubbles:!0,cancelable:!0});this.dispatchEvent(t);const s=this.closest("cdtr-dropdown");s&&s.patch(this.value,e,this)}}connectedCallback(){super.connectedCallback(),this.selected&&this.scrollIntoView({behavior:"smooth",block:"start"})}render(){return o.b`<div role="button"
128
- @click=${this.onClick}
129
- @keydown=${this.onPress}
130
- @blur=${this.onBlur}
131
- @focus=${this.onFocus}
132
- class="dropdown-item"
133
- tabindex="0"
134
- >
135
- <slot></slot>
136
- ${this.selected?o.b` <svg
137
- class="check"
138
- fill="currentColor"
139
- xmlns="http://www.w3.org/2000/svg"
140
- viewBox="0 0 24 24"
141
- aria-hidden="true"
142
- >
143
- <path fill="none" d="M0 0h24v24H0z" />
144
- <path
145
- d="M10 15.172l9.192-9.193 1.415 1.414L10 18l-6.364-6.364 1.414-1.414z"
146
- />
147
- </svg>`:null}
148
- </div>`}}n($,"properties",{focused:{type:Boolean,reflect:!0},selected:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},notClickable:{type:Boolean}}),n($,"styles",o.a`
149
- .dropdown-item {
150
- position: relative;
151
- box-sizing: border-box;
152
- display: flex;
153
- align-items: center;
154
- justify-content: space-between;
155
- gap: 10px;
156
- width: 100%;
157
- padding: 8px 12px;
158
- border-radius: 6px;
159
- font-family: var(--font-family, "Inter", Arial, sans-serif);
160
- font-size: 13px;
161
- line-height: 1.4;
162
- color: #212529;
163
- cursor: pointer;
164
- user-select: none;
165
- transition: background-color 120ms ease, color 120ms ease,
166
- box-shadow 120ms ease;
167
- }
168
- /* hover = a translucent violet wash: ephemeral pointer feedback. The
169
- parent sets --cdtr-item-hover to transparent while arrow-key
170
- navigating so it never competes with the keyboard cursor below. */
171
- .dropdown-item:hover {
172
- background: var(--cdtr-item-hover, rgba(124, 92, 246, 0.1));
173
- }
174
- /* keyboard cursor: stronger wash + a left accent bar, so "where am I"
175
- reads at a glance and is distinct from both hover and selected */
176
- .dropdown-item:focus {
177
- outline: none;
178
- background: rgba(124, 92, 246, 0.16);
179
- color: var(--cdtr-dropdown-accent-ink, #5a3cc9);
180
- box-shadow: inset 3px 0 0 var(--cdtr-dropdown-accent, #7c5cf6);
181
- }
182
- /* selected = the committed choice: a SOLID chip (opaque, not a wash),
183
- accent text, weight, and a check — so it can't be mistaken for hover */
184
- :host([selected]) .dropdown-item {
185
- color: var(--cdtr-dropdown-accent-ink, #5a3cc9);
186
- font-weight: 600;
187
- background: var(--cdtr-dropdown-selected-bg, #efeaff);
188
- }
189
- .check {
190
- width: 16px;
191
- height: 16px;
192
- flex: none;
193
- color: var(--cdtr-dropdown-accent, #7c5cf6);
194
- }
195
- `),customElements.get("cdtr-dropdown-item")||customElements.define("cdtr-dropdown-item",$),customElements.get("cdtr-dropdown-button")||customElements.define("cdtr-dropdown-button",k),customElements.get("cdtr-dropdown")||customElements.define("cdtr-dropdown",x)}}]);
@@ -1,11 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2017 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
-
7
- /**
8
- * @license
9
- * Copyright 2020 Google LLC
10
- * SPDX-License-Identifier: BSD-3-Clause
11
- */
Binary file
Binary file
@@ -1,288 +0,0 @@
1
- "use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[5791],{25791(t,e,i){i.r(e),i.d(e,{MakeNewsletterAsEventPlugin:()=>p});var a=i(59929),o=i(49410),n=i(21421),r=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l=(t,e,i,a)=>{for(var o,n=a>1?void 0:a?s(e,i):e,l=t.length-1;l>=0;l--)(o=t[l])&&(n=(a?o(e,i,n):o(n))||n);return a&&n&&r(e,i,n),n};let p=class extends a.WF{constructor(){super(...arguments),this.lang="en",this.primaryColor="#000000",this.primaryTextColor="#ffffff",this.buttonText="#ffffff",this.iconColor="#ffffff",this.buttonTextContent="",this.headerText="Create Event",this.startLabel="Start Date & Time",this.endLabel="End Date & Time",this.locationLabel="Location",this.linkLabel="Link (Optional)",this.saveButtonText="Save Event",this.cancelEventText="Cancel Event",this.confirmCancelText="Are you sure you want to cancel?",this.creatingEventText="Creating Event...",this.eventCreatedText="Event Created!",this.errorMessage="End date/time must be after start date/time",this.locationPlaceholder="Enter event location",this.linkPlaceholder="Enter event link",this.initialStartDate="",this.initialStartTime="",this.initialEndDate="",this.initialEndTime="",this.initialLocation="",this.initialLink="",this.startDate="",this.startTime="",this.endDate="",this.endTime="",this.location="",this.link="",this.error="",this.isSaving=!1,this.isSaved=!1,this.isConfirmingCancel=!1,this.popoverRef=(0,n._)(),this.cancelTimeout=null}get buttonDisplayText(){return this.isSaved?this.eventCreatedText:this.isSaving?this.creatingEventText:this.startDate&&this.startTime?new Date(`${this.startDate}T${this.startTime}`).toLocaleDateString(this.lang,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}):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 e=t.target,[i,a]=e.value.split("T");if(this.startDate=i,this.startTime=a,!this.endDate&&!this.endTime){const t=new Date(new Date(`${i}T${a}`).getTime()+36e5);this.endDate=t.toISOString().split("T")[0],this.endTime=t.toTimeString().slice(0,5)}this.validateDates()}handleEndDateTimeChange(t){const e=t.target,[i,a]=e.value.split("T");this.endDate=i,this.endTime=a,this.validateDates()}validateDates(){if(this.startDate&&this.startTime&&this.endDate&&this.endTime){const t=new Date(`${this.startDate}T${this.startTime}`);new Date(`${this.endDate}T${this.endTime}`)<=t?this.error=this.errorMessage:this.error=""}}async handleSave(){var t;if(this.error)return;this.isSaving=!0,this.isSaved=!1;const e=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(e),null==(t=this.popoverRef.value)||t.close(),await new Promise(t=>setTimeout(t,1500)),this.isSaving=!1,this.isSaved=!0,setTimeout(()=>{this.isSaved=!1},2e3)}handleCancelEvent(){var t;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 e=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(e),null==(t=this.popoverRef.value)||t.close()}else this.isConfirmingCancel=!0,this.cancelTimeout=window.setTimeout(()=>{this.isConfirmingCancel=!1},3e3)}disconnectedCallback(){super.disconnectedCallback(),this.cancelTimeout&&clearTimeout(this.cancelTimeout)}render(){return a.qy`
2
- <cdtr-popover ${(0,n.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?a.qy`<div class="error" dir="auto">${this.error}</div>`:""}
89
-
90
- <div class="button-group">
91
- ${this.startDate||this.endDate?a.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
- `}};p.styles=a.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
- `,l([(0,o.MZ)({type:String})],p.prototype,"lang",2),l([(0,o.MZ)({type:String})],p.prototype,"primaryColor",2),l([(0,o.MZ)({type:String})],p.prototype,"primaryTextColor",2),l([(0,o.MZ)({type:String})],p.prototype,"buttonText",2),l([(0,o.MZ)({type:String})],p.prototype,"iconColor",2),l([(0,o.MZ)({type:String})],p.prototype,"buttonTextContent",2),l([(0,o.MZ)({type:String})],p.prototype,"headerText",2),l([(0,o.MZ)({type:String})],p.prototype,"startLabel",2),l([(0,o.MZ)({type:String})],p.prototype,"endLabel",2),l([(0,o.MZ)({type:String})],p.prototype,"locationLabel",2),l([(0,o.MZ)({type:String})],p.prototype,"linkLabel",2),l([(0,o.MZ)({type:String})],p.prototype,"saveButtonText",2),l([(0,o.MZ)({type:String})],p.prototype,"cancelEventText",2),l([(0,o.MZ)({type:String})],p.prototype,"confirmCancelText",2),l([(0,o.MZ)({type:String})],p.prototype,"creatingEventText",2),l([(0,o.MZ)({type:String})],p.prototype,"eventCreatedText",2),l([(0,o.MZ)({type:String})],p.prototype,"errorMessage",2),l([(0,o.MZ)({type:String})],p.prototype,"locationPlaceholder",2),l([(0,o.MZ)({type:String})],p.prototype,"linkPlaceholder",2),l([(0,o.MZ)({type:String})],p.prototype,"initialStartDate",2),l([(0,o.MZ)({type:String})],p.prototype,"initialStartTime",2),l([(0,o.MZ)({type:String})],p.prototype,"initialEndDate",2),l([(0,o.MZ)({type:String})],p.prototype,"initialEndTime",2),l([(0,o.MZ)({type:String})],p.prototype,"initialLocation",2),l([(0,o.MZ)({type:String})],p.prototype,"initialLink",2),l([(0,o.MZ)()],p.prototype,"startDate",2),l([(0,o.MZ)()],p.prototype,"startTime",2),l([(0,o.MZ)()],p.prototype,"endDate",2),l([(0,o.MZ)()],p.prototype,"endTime",2),l([(0,o.MZ)()],p.prototype,"location",2),l([(0,o.MZ)()],p.prototype,"link",2),l([(0,o.MZ)()],p.prototype,"error",2),l([(0,o.MZ)()],p.prototype,"isSaving",2),l([(0,o.MZ)()],p.prototype,"isSaved",2),l([(0,o.MZ)()],p.prototype,"isConfirmingCancel",2),p=l([(0,o.EM)("cdtr-make-newsletter-as-event-plugin")],p)}}]);
Binary file