@streamline-pulse/formkrafter-wc 0.28.1 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/fk-address-search.js +1 -1
- package/dist/components/fk-brick-actions.js +1 -1
- package/dist/components/fk-brick-list.js +1 -1
- package/dist/components/fk-brick-mold-item.js +1 -1
- package/dist/components/fk-brick-not-found.js +1 -1
- package/dist/components/fk-brick-render.js +1 -1
- package/dist/components/fk-data-grid.js +1 -1
- package/dist/components/fk-document-reader.d.ts +11 -0
- package/dist/components/fk-document-reader.js +1 -0
- package/dist/components/fk-drop-area.js +1 -1
- package/dist/components/fk-empty-form.js +1 -1
- package/dist/components/fk-file-input.js +1 -1
- package/dist/components/fk-form-builder.js +1 -1
- package/dist/components/fk-form-render.js +1 -1
- package/dist/components/fk-form-review.js +1 -1
- package/dist/components/fk-geo-map.js +1 -1
- package/dist/components/fk-property-panel.js +1 -1
- package/dist/components/fk-rules-editor.js +1 -1
- package/dist/components/fk-select-input.js +1 -1
- package/dist/components/fk-signature-input.js +1 -1
- package/dist/components/fk-slot-picker.js +1 -1
- package/dist/components/fk-stepper.js +1 -1
- package/dist/components/fk-tabs.js +1 -1
- package/dist/components/fk-variable-picker.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-DK2UgrV9.js → p-4Q-3Ver4.js} +1 -1
- package/dist/components/p-4m9rWHxf.js +1 -0
- package/dist/components/{p-Dt5tFknh.js → p-B10DgHR6.js} +1 -1
- package/dist/components/{p-DJxeNTfC.js → p-BDpEUqN2.js} +1 -1
- package/dist/components/{p-C8yXvs3g.js → p-BHIeIlFC.js} +1 -1
- package/dist/components/{p-CIZUeonQ.js → p-BUhr7oBc.js} +1 -1
- package/dist/components/p-Bvcoal_I.js +1 -0
- package/dist/components/{p-Di7uMflS.js → p-Bys4WPXJ.js} +1 -1
- package/dist/components/p-CIgvEKbO.js +1 -0
- package/dist/components/{p-CuF0gbWB.js → p-C_Pmu3Ks.js} +1 -1
- package/dist/components/{p-YMLbA4H2.js → p-CeeOFuGt.js} +1 -1
- package/dist/components/{p-lOT7NMxD.js → p-CpzxDHMT.js} +1 -1
- package/dist/components/{p-CVsWXbzX.js → p-CsEICbNO.js} +1 -1
- package/dist/components/{p-Ddiv4Djm.js → p-Cxo64gUs.js} +5 -5
- package/dist/components/{p-BEft-cf2.js → p-D0hs1wGD.js} +1 -1
- package/dist/components/p-DOptnd38.js +1 -0
- package/dist/components/{p-DskfAsd6.js → p-DP103_4D.js} +1 -1
- package/dist/components/{p-DtPhC0nx.js → p-DSP-Orjw.js} +1 -1
- package/dist/components/p-DTPZ6Tcw.js +1 -0
- package/dist/components/{p-B5gG7fHb.js → p-DpJEAEkV.js} +1 -1
- package/dist/components/{p-BGax6QkM.js → p-USwwkbqI.js} +1 -1
- package/dist/components/{p-xvN-OJAU.js → p-cJsQ9IYB.js} +1 -1
- package/dist/formkrafter-wc/formkrafter-wc.esm.js +1 -1
- package/dist/formkrafter-wc/index.esm.js +1 -1
- package/dist/formkrafter-wc/p-1d604a4a.entry.js +1 -0
- package/dist/formkrafter-wc/{p-7bc82da2.entry.js → p-4535f1d5.entry.js} +1 -1
- package/dist/formkrafter-wc/{p-730cac62.entry.js → p-974ac7cb.entry.js} +1 -1
- package/dist/formkrafter-wc/{p-D3ItRsmP.js → p-BAt0IfOE.js} +5 -5
- package/dist/formkrafter-wc/{p-CiXmtjEN.js → p-DcT7JnEy.js} +1 -1
- package/dist/types/components/fk-document-reader/fk-document-reader.d.ts +44 -0
- package/dist/types/components.d.ts +135 -2
- package/dist/types/registry/default-bricks.d.ts +18 -0
- package/package.json +2 -2
- package/dist/components/p-DIW5FtAy.js +0 -1
- package/dist/components/p-DMLnAgzb.js +0 -1
- package/dist/components/p-FSCguIuu.js +0 -1
- package/dist/components/p-t-OoJsHu.js +0 -1
- package/dist/formkrafter-wc/p-f867357b.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as s,p as t,H as l,c as e,h as o}from"./p-8ICOcloT.js";import{o as i,q as r,t as a,b as c}from"./p-
|
|
1
|
+
import{t as s,p as t,H as l,c as e,h as o}from"./p-8ICOcloT.js";import{o as i,q as r,t as a,b as c}from"./p-Cxo64gUs.js";const n=(s,t)=>{const[l,e,o]=s.split("-").map(Number);return new Date(l,e-1,o).toLocaleDateString(t,{weekday:"short",day:"numeric",month:"short"})},k=s=>s.slice(11,16),d=t(class extends l{constructor(s){super(),!1!==s&&this.__registerHost(),this.slotPick=e(this,"slotPick"),this.rules={},this.disabled=!1,this.readOnly=!1,this.slots=[],this.day="",this.loading=!1,this.failed=!1}componentWillLoad(){return this.day=this.value?this.value.start.slice(0,10):"",this.load()}reload(){return this.load()}onValueChange(s){s&&(this.day=s.start.slice(0,10))}get locked(){return this.disabled||this.readOnly}async load(){if(this.failed=!1,this.slotsUrl){this.loading=!0;try{const s=await fetch(this.slotsUrl,{headers:{Accept:"application/json"}});if(!s.ok)throw new Error(String(s.status));this.slots=r(await s.json())}catch(s){this.failed=!0,this.slots=[]}finally{this.loading=!1}}else this.slots=i(this.rules)}pick(s){this.locked||this.slotPick.emit({id:s.id,start:s.start,end:s.end})}render(){var s;const t=a(this.slots),l=this.value,e=null!==(s=t.find((s=>s.day===this.day)))&&void 0!==s?s:t[0];return this.locked?o("div",{class:"fk-slots fk-slots--locked"},l?o("span",{class:"fk-slots__picked"},n(l.start.slice(0,10),this.locale)," · ",k(l.start),"–",k(l.end)):o("span",{class:"fk-slots__empty"},c("slots.none"))):o("div",{class:"fk-slots"},this.loading?o("span",{class:"fk-slots__empty"},c("slots.loading")):null,this.failed?o("span",{class:"fk-slots__empty"},c("slots.unavailable")):null,this.loading||this.failed||0!==t.length?null:o("span",{class:"fk-slots__empty"},c("slots.empty")),t.length?o("div",{class:"fk-slots__days",role:"tablist"},t.map((s=>o("button",{type:"button",role:"tab","aria-selected":s.day===(null==e?void 0:e.day)?"true":"false",class:{"fk-slots__day":!0,"fk-slots__day--active":s.day===(null==e?void 0:e.day)},onClick:()=>{this.day=s.day}},n(s.day,this.locale))))):null,e?o("div",{class:"fk-slots__times"},e.slots.map((s=>o("button",{type:"button",class:{"fk-slots__time":!0,"fk-slots__time--picked":(null==l?void 0:l.id)===s.id},"aria-pressed":(null==l?void 0:l.id)===s.id?"true":"false",onClick:()=>this.pick(s)},k(s.start),void 0!==s.remaining?o("small",null," · ",s.remaining):null)))):null,l?o("p",{class:"fk-slots__picked"},c("slots.picked")," ",n(l.start.slice(0,10),this.locale)," · ",k(l.start),"–",k(l.end),o("button",{type:"button",class:"fk-slots__clear",onClick:()=>this.slotPick.emit(void 0)},c("geo.clear"))):null)}static get watchers(){return{slotsUrl:[{reload:0}],rules:[{reload:0}],value:[{onValueChange:0}]}}static get style(){return".sc-fk-slot-picker-h{display:block}.fk-slots__days.sc-fk-slot-picker{display:flex;gap:0.375rem;overflow-x:auto;padding-bottom:0.25rem}.fk-slots__day.sc-fk-slot-picker,.fk-slots__time.sc-fk-slot-picker{border:1px solid var(--fk-border, #d4d4d8);border-radius:var(--fk-radius, 0.375rem);background:transparent;color:inherit;font:inherit;font-size:0.8125rem;padding:0.375rem 0.625rem;cursor:pointer;white-space:nowrap}.fk-slots__day--active.sc-fk-slot-picker,.fk-slots__time--picked.sc-fk-slot-picker{border-color:var(--fk-primary, #16a34a);background:var(--fk-primary, #16a34a);color:#fff}.fk-slots__times.sc-fk-slot-picker{display:flex;flex-wrap:wrap;gap:0.375rem;margin-top:0.5rem}.fk-slots__time.sc-fk-slot-picker small.sc-fk-slot-picker{opacity:0.7}.fk-slots__picked.sc-fk-slot-picker,.fk-slots__empty.sc-fk-slot-picker{display:block;margin:0.5rem 0 0;font-size:0.8125rem}.fk-slots__empty.sc-fk-slot-picker{color:var(--fk-text-muted, #71717a)}.fk-slots__clear.sc-fk-slot-picker{margin-left:0.5rem;border:0;background:transparent;color:var(--fk-text-muted, #71717a);font:inherit;font-size:0.75rem;text-decoration:underline;cursor:pointer}"}},[2,"fk-slot-picker",{value:[16],slotsUrl:[1,"slots-url"],rules:[16],locale:[1],disabled:[4],readOnly:[4,"read-only"],slots:[32],day:[32],loading:[32],failed:[32]},void 0,{slotsUrl:[{reload:0}],rules:[{reload:0}],value:[{onValueChange:0}]}]);function f(){"undefined"!=typeof customElements&&["fk-slot-picker"].forEach((t=>{"fk-slot-picker"===t&&(customElements.get(s(t))||customElements.define(s(t),d))}))}f();export{d as F,f as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as o,p as
|
|
1
|
+
import{t as o,p as r,H as e,h as i}from"./p-8ICOcloT.js";import{d as s}from"./p-92BozD8S.js";import{f as t}from"./p-Cxo64gUs.js";const a=r(class extends e{constructor(o){super(),!1!==o&&this.__registerHost(),this.isDragging=!1}componentDidLoad(){this.cleanup=s({element:this.host,getInitialData:()=>({kind:"new-brick",moldType:this.brickMold.type,moldId:this.brickMold.id}),onDragStart:()=>this.isDragging=!0,onDrop:()=>this.isDragging=!1})}disconnectedCallback(){var o;null===(o=this.cleanup)||void 0===o||o.call(this)}render(){return i("div",{key:"25cf1c5dc3f3f97bc00ee3b551fe97d20540e343",class:{"fk-mold":!0,"fk-mold--dragging":this.isDragging},title:t(`brick.${this.brickMold.id}.name`,this.brickMold.name)},i("span",{key:"f286273ca548a6e5dd79af2a1a40f2881d2685de",class:"fk-mold__name"},t(`brick.${this.brickMold.id}.name`,this.brickMold.name)))}get host(){return this}static get style(){return".sc-fk-brick-mold-item-h{display:block;cursor:grab;min-width:0}.fk-mold.sc-fk-brick-mold-item{display:flex;align-items:center;padding:calc(var(--fk-spacing) / 1.5) var(--fk-spacing);border:1px solid var(--fk-color-border);border-radius:calc(var(--fk-radius) / 1.5);background:var(--fk-color-surface);font-size:0.8rem;transition:border-color 120ms ease, box-shadow 120ms ease}.fk-mold.sc-fk-brick-mold-item:hover{border-color:var(--fk-color-primary);box-shadow:0 1px 4px var(--fk-color-shadow)}.fk-mold--dragging.sc-fk-brick-mold-item{opacity:0.5}.fk-mold__name.sc-fk-brick-mold-item{font-weight:500;color:var(--fk-color-text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}"}},[2,"fk-brick-mold-item",{brickMold:[16],isDragging:[32]}]);function c(){"undefined"!=typeof customElements&&["fk-brick-mold-item"].forEach((r=>{"fk-brick-mold-item"===r&&(customElements.get(o(r))||customElements.define(o(r),a))}))}c();export{a as F,c as d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t,p as i,H as s,c as e,h as r}from"./p-8ICOcloT.js";import{b as a}from"./p-
|
|
1
|
+
import{t,p as i,H as s,c as e,h as r}from"./p-8ICOcloT.js";import{b as a}from"./p-Cxo64gUs.js";const l=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.variablePick=e(this,"variablePick"),this.variables=[],this.open=!1,this.query="",this.index=0,this.tokenStart=-1,this.control=null,this.closeTimer=null,this.sync=()=>{var t;const i=this.control;if(!i)return;const s=null!==(t=i.selectionStart)&&void 0!==t?t:i.value.length,e=i.value.slice(0,s),r=e.lastIndexOf("{{");-1===r||e.slice(r).includes("}}")||/\s/.test(e.slice(r+2))?this.close():(this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=null),this.tokenStart=r,this.query=e.slice(r+2),this.index=0,this.open=!0)},this.close=()=>{this.closeTimer&&(clearTimeout(this.closeTimer),this.closeTimer=null),this.open=!1},this.closeSoon=()=>{this.closeTimer&&clearTimeout(this.closeTimer),this.closeTimer=setTimeout((()=>{this.closeTimer=null,this.open=!1}),120)},this.onKeyUp=t=>{["ArrowDown","ArrowUp","Enter","Escape"].includes(t.key)||this.sync()},this.onKeyDown=t=>{if(!this.open)return;const i=this.matches();"ArrowDown"===t.key?(this.index=(this.index+1)%Math.max(i.length,1),t.preventDefault()):"ArrowUp"===t.key?(this.index=(this.index-1+Math.max(i.length,1))%Math.max(i.length,1),t.preventDefault()):"Enter"===t.key&&i[this.index]?(this.pick(i[this.index]),t.preventDefault()):"Escape"===t.key&&(this.open=!1,t.preventDefault())}}componentDidLoad(){const t=this.el.previousElementSibling;(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&(this.control=t,t.addEventListener("input",this.sync),t.addEventListener("click",this.sync),t.addEventListener("keyup",this.onKeyUp),t.addEventListener("keydown",this.onKeyDown),t.addEventListener("blur",this.closeSoon))}disconnectedCallback(){const t=this.control;t&&(t.removeEventListener("input",this.sync),t.removeEventListener("click",this.sync),t.removeEventListener("keyup",this.onKeyUp),t.removeEventListener("keydown",this.onKeyDown),t.removeEventListener("blur",this.closeSoon),this.closeTimer&&clearTimeout(this.closeTimer))}matches(){const t=this.query.toLowerCase();return(t?this.variables.filter((i=>{var s;return i.name.toLowerCase().includes(t)||(null!==(s=i.label)&&void 0!==s?s:"").toLowerCase().includes(t)})):this.variables).slice(0,12)}pick(t){var i;const s=this.control;if(!s||this.tokenStart<0)return;const e=null!==(i=s.selectionStart)&&void 0!==i?i:s.value.length,r=`{{${t.name}}}`,a=s.value.slice(0,this.tokenStart)+r+s.value.slice(e),l=this.tokenStart+r.length;s.value=a,s.setSelectionRange(l,l),this.open=!1,this.variablePick.emit(a),s.focus()}render(){if(!this.open)return null;const t=this.matches();return r("div",{class:"fk-variables__list",role:"listbox"},0===t.length?r("div",{class:"fk-variables__empty"},a("variables.empty")):t.map(((t,i)=>r("button",{type:"button",role:"option","aria-selected":i===this.index?"true":"false",class:{"fk-variables__item":!0,"fk-variables__item--active":i===this.index},onMouseDown:i=>{i.preventDefault(),this.pick(t)},onMouseEnter:()=>{this.index=i}},r("code",{class:"fk-variables__name"},t.name),t.label?r("span",{class:"fk-variables__label"},t.label):null))))}get el(){return this}static get style(){return".sc-fk-variable-picker-h{display:block;position:relative}.fk-variables__list.sc-fk-variable-picker{position:absolute;z-index:20;left:0;right:0;margin-top:0.25rem;max-height:14rem;overflow-y:auto;border:1px solid var(--fk-border, #d4d4d8);border-radius:var(--fk-radius, 0.375rem);background:var(--fk-bg, #fff);box-shadow:0 8px 24px rgba(0, 0, 0, 0.12)}.fk-variables__item.sc-fk-variable-picker{display:flex;width:100%;align-items:baseline;gap:0.5rem;padding:0.375rem 0.625rem;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer}.fk-variables__item--active.sc-fk-variable-picker,.fk-variables__item.sc-fk-variable-picker:hover{background:var(--fk-bg-muted, rgba(127, 127, 127, 0.12))}.fk-variables__name.sc-fk-variable-picker{font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:0.8125rem}.fk-variables__label.sc-fk-variable-picker{font-size:0.75rem;color:var(--fk-text-muted, #71717a)}.fk-variables__empty.sc-fk-variable-picker{padding:0.5rem 0.625rem;font-size:0.75rem;color:var(--fk-text-muted, #71717a)}"}},[2,"fk-variable-picker",{variables:[16],open:[32],query:[32],index:[32]}]);function o(){"undefined"!=typeof customElements&&["fk-variable-picker"].forEach((i=>{"fk-variable-picker"===i&&(customElements.get(t(i))||customElements.define(t(i),l))}))}o();export{l as F,o as d}
|