This commit is contained in:
Dan Harrin
2022-10-14 14:44:09 +01:00
parent b9e01e4097
commit f8f337fb47
15 changed files with 153 additions and 151 deletions
+4 -2
View File
@@ -17,7 +17,8 @@ packages.forEach((package) => {
platform: 'neutral',
mainFields: ['module', 'main'],
watch: shouldWatch,
minify: true,
minifySyntax: true,
minifyWhitespace: true,
})
.catch(() => process.exit(1))
})
@@ -51,7 +52,8 @@ formComponents.forEach((component) => {
platform: 'neutral',
mainFields: ['module', 'main'],
watch: shouldWatch,
minify: true,
minifySyntax: true,
minifyWhitespace: true,
})
.catch(() => process.exit(1))
})
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
{
"/app.js": "/app.js?id=ce779caac004e5d5d923bf38807f9566",
"/echo.js": "/echo.js?id=22aa4e6bc6600bac3fe51d62296919c4",
"/app.css": "/app.css?id=739a8b77b718fbd7a49d9d11b742d587"
"/app.css": "/app.css?id=691ad1e59ba32ca4f757df4e7739a71e"
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
function o({state:i}){return{state:i,rows:[],shouldUpdateRows:!0,init:function(){this.updateRows(),this.rows.length<=0&&this.addRow(),this.shouldUpdateRows=!0,this.$watch("state",()=>{if(!this.shouldUpdateRows){this.shouldUpdateRows=!0;return}this.updateRows()})},addRow:function(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow:function(t){this.rows.splice(t,1),this.rows.length<=0&&this.addRow(),this.updateState(),this.shouldUpdateRows=!0},reorderRows:function(t){let e=Alpine.raw(this.rows),s=e.splice(t.oldIndex,1)[0];e.splice(t.newIndex,0,s),this.rows=e,this.updateState()},updateRows:function(){let t=[];for(let[e,s]of Object.entries(this.state??{}))t.push({key:e,value:s});this.rows=t},updateState:function(){let t={};this.rows.forEach(e=>{e.key===""||e.key===null||(t[e.key]=e.value)}),this.shouldUpdateRows=!1,this.state=t}}}export{o as default};
function keyValueFormComponent({state}){return{state,rows:[],shouldUpdateRows:!0,init:function(){this.updateRows(),this.rows.length<=0&&this.addRow(),this.shouldUpdateRows=!0,this.$watch("state",()=>{if(!this.shouldUpdateRows){this.shouldUpdateRows=!0;return}this.updateRows()})},addRow:function(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow:function(index){this.rows.splice(index,1),this.rows.length<=0&&this.addRow(),this.updateState(),this.shouldUpdateRows=!0},reorderRows:function(event){let rows=Alpine.raw(this.rows),reorderedRow=rows.splice(event.oldIndex,1)[0];rows.splice(event.newIndex,0,reorderedRow),this.rows=rows,this.updateState()},updateRows:function(){let rows=[];for(let[key,value]of Object.entries(this.state??{}))rows.push({key,value});this.rows=rows},updateState:function(){let state2={};this.rows.forEach(row=>{row.key===""||row.key===null||(state2[row.key]=row.value)}),this.shouldUpdateRows=!1,this.state=state2}}}export{keyValueFormComponent as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
function t({state:e}){return{newTag:"",state:e,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(n){this.state=this.state.filter(i=>i!==n)}}}export{t as default};
function tagsInputFormComponent({state}){return{newTag:"",state,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(tagToDelete){this.state=this.state.filter(tag=>tag!==tagToDelete)}}}export{tagsInputFormComponent as default};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
function t(){return{init:function(){this.$nextTick(()=>{this.render()})},render:function(){this.$el.scrollHeight>0&&(this.$el.style.height="150px",this.$el.style.height=this.$el.scrollHeight+2+"px")}}}export{t as default};
function textareaFormComponent(){return{init:function(){this.$nextTick(()=>{this.render()})},render:function(){this.$el.scrollHeight>0&&(this.$el.style.height="150px",this.$el.style.height=this.$el.scrollHeight+2+"px")}}}export{textareaFormComponent as default};
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long