Merge branch 'filamentphp:3.x' into 3.x

This commit is contained in:
Sam Maosa
2023-11-14 11:34:16 +03:00
committed by GitHub
228 changed files with 7093 additions and 681 deletions
@@ -179,6 +179,17 @@ class EntriesDemo extends Component implements HasInfolists
->icon('heroicon-m-envelope')
->iconPosition(IconPosition::After),
]),
Group::make()
->id('textIconColor')
->extraAttributes([
'class' => 'p-16 max-w-xl',
])
->schema([
TextEntry::make('email')
->state('dan@filamentphp.com')
->icon('heroicon-m-envelope')
->iconColor('primary'),
]),
Group::make()
->id('textLarge')
->extraAttributes([
@@ -364,6 +364,17 @@ class TablesDemo extends Component implements HasForms, HasTable
]);
}
public function textColumnIconColor(Table $table): Table
{
return $this->usersTable($table)
->columns([
TextColumn::make('name'),
TextColumn::make('email')
->icon('heroicon-m-envelope')
->iconColor('primary'),
]);
}
public function textColumnLarge(Table $table): Table
{
return $this->postsTable($table)
+413 -387
View File
File diff suppressed because it is too large Load Diff
+52 -41
View File
@@ -391,9 +391,9 @@
"integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
},
"node_modules/@jridgewell/trace-mapping": {
"version": "0.3.19",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",
"integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",
"version": "0.3.20",
"resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
"integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
"dependencies": {
"@jridgewell/resolve-uri": "^3.1.0",
"@jridgewell/sourcemap-codec": "^1.4.14"
@@ -441,9 +441,9 @@
}
},
"node_modules/@tailwindcss/forms": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.6.tgz",
"integrity": "sha512-Fw+2BJ0tmAwK/w01tEFL5TiaJBX1NLT1/YbWgvm7ws3Qcn11kiXxzNTEQDMs5V3mQemhB56l3u0i9dwdzSQldA==",
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/@tailwindcss/forms/-/forms-0.5.7.tgz",
"integrity": "sha512-QE7X69iQI+ZXwldE+rzasvbJiyV/ju1FGHH0Qn2W3FKbuYtqp8LKcy6iSw79fVUT5/Vvf+0XgLCeYVG+UV6hOw==",
"dependencies": {
"mini-svg-data-uri": "^1.2.3"
},
@@ -596,9 +596,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001549",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz",
"integrity": "sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==",
"version": "1.0.30001561",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001561.tgz",
"integrity": "sha512-NTt0DNoKe958Q0BE0j0c1V9jbUzhBxHIEJy7asmGrpE0yG63KTV7PLHPnK2E1O9RsQrQ081I3NLuXGS6zht3cw==",
"funding": [
{
"type": "opencollective",
@@ -686,9 +686,9 @@
"integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
},
"node_modules/electron-to-chromium": {
"version": "1.4.554",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.554.tgz",
"integrity": "sha512-Q0umzPJjfBrrj8unkONTgbKQXzXRrH7sVV7D9ea2yBV3Oaogz991yhbpfvo2LMNkJItmruXTEzVpP9cp7vaIiQ=="
"version": "1.4.581",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.581.tgz",
"integrity": "sha512-6uhqWBIapTJUxgPTCHH9sqdbxIMPt7oXl0VcAL1kOtlU6aECdcMncCrX5Z7sHQ/invtrC9jUQUef7+HhO8vVFw=="
},
"node_modules/esbuild": {
"version": "0.18.20",
@@ -735,9 +735,9 @@
}
},
"node_modules/fast-glob": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",
"integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
"integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
"@nodelib/fs.walk": "^1.2.3",
@@ -809,6 +809,14 @@
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/function-bind": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
@@ -839,12 +847,15 @@
"node": ">=10.13.0"
}
},
"node_modules/has": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz",
"integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==",
"node_modules/hasown": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
"integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
"dependencies": {
"function-bind": "^1.1.2"
},
"engines": {
"node": ">= 0.4.0"
"node": ">= 0.4"
}
},
"node_modules/inflight": {
@@ -873,11 +884,11 @@
}
},
"node_modules/is-core-module": {
"version": "2.13.0",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz",
"integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==",
"version": "2.13.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
"integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
"dependencies": {
"has": "^1.0.3"
"hasown": "^2.0.0"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -911,9 +922,9 @@
}
},
"node_modules/jiti": {
"version": "1.20.0",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.20.0.tgz",
"integrity": "sha512-3TV69ZbrvV6U5DfQimop50jE9Dl6J8O1ja1dvBbMba/sZ3YBEQqJ2VZRoQPVnhlzjNtU1vaXRZVrVjU4qtm8yA==",
"version": "1.21.0",
"resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
"integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
"bin": {
"jiti": "bin/jiti.js"
}
@@ -1011,9 +1022,9 @@
}
},
"node_modules/nanoid": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
"version": "3.3.7",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
"integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
"funding": [
{
"type": "github",
@@ -1394,19 +1405,19 @@
}
},
"node_modules/tailwindcss": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz",
"integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==",
"version": "3.3.5",
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.5.tgz",
"integrity": "sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==",
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
"arg": "^5.0.2",
"chokidar": "^3.5.3",
"didyoumean": "^1.2.2",
"dlv": "^1.1.3",
"fast-glob": "^3.2.12",
"fast-glob": "^3.3.0",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
"jiti": "^1.18.2",
"jiti": "^1.19.1",
"lilconfig": "^2.1.0",
"micromatch": "^4.0.5",
"normalize-path": "^3.0.0",
@@ -1519,9 +1530,9 @@
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
},
"node_modules/vite": {
"version": "4.4.11",
"resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz",
"integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==",
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz",
"integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==",
"dependencies": {
"esbuild": "^0.18.10",
"postcss": "^8.4.27",
@@ -1590,9 +1601,9 @@
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
},
"node_modules/yaml": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.3.tgz",
"integrity": "sha512-zw0VAJxgeZ6+++/su5AFoqBbZbrEakwu+X0M5HmcwUiBL7AzcuPKjj5we4xfQLp78LkEMpD0cOnUhmgOVy3KdQ==",
"version": "2.3.4",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",
"integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==",
"engines": {
"node": ">= 14"
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}
.fi-pagination-overview{display:none}.fi-pagination-records-per-page-select:not(.fi-compact){display:none}.fi-pagination-items{display:none}@supports (container-type: inline-size){.fi-pagination{container-type:inline-size}@container (min-width: 28rem){.fi-pagination-records-per-page-select.fi-compact{display:none}.fi-pagination-records-per-page-select:not(.fi-compact){display:inline}}@container (min-width: 56rem){.fi-pagination:not(.fi-simple)>.fi-pagination-previous-btn{display:none}.fi-pagination-overview{display:inline}.fi-pagination:not(.fi-simple)>.fi-pagination-next-btn{display:none}.fi-pagination-items{display:flex}}}@supports not (container-type: inline-size){@media (min-width: 640px){.fi-pagination-records-per-page-select.fi-compact{display:none}.fi-pagination-records-per-page-select:not(.fi-compact){display:inline}}@media (min-width: 768px){.fi-pagination:not(.fi-simple)>.fi-pagination-previous-btn{display:none}.fi-pagination-overview{display:inline}.fi-pagination:not(.fi-simple)>.fi-pagination-next-btn{display:none}.fi-pagination-items{display:flex}}}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.tippy-box[data-theme~=light]{color:#26323d;box-shadow:0 0 20px 4px #9aa1b126,0 4px 80px -8px #24282f40,0 4px 4px -2px #5b5e6926;background-color:#fff}.tippy-box[data-theme~=light][data-placement^=top]>.tippy-arrow:before{border-top-color:#fff}.tippy-box[data-theme~=light][data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:#fff}.tippy-box[data-theme~=light][data-placement^=left]>.tippy-arrow:before{border-left-color:#fff}.tippy-box[data-theme~=light][data-placement^=right]>.tippy-arrow:before{border-right-color:#fff}.tippy-box[data-theme~=light]>.tippy-backdrop{background-color:#fff}.tippy-box[data-theme~=light]>.tippy-svg-arrow{fill:#fff}
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 @@
function i({state:a,splitKeys:n}){return{newTag:"",state:a,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(t){this.state=this.state.filter(e=>e!==t)},input:{["x-on:blur"]:"createTag()",["x-model"]:"newTag",["x-on:keydown"](t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},["x-on:paste"](){this.$nextTick(()=>{let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
function i({state:a,splitKeys:n}){return{newTag:"",state:a,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(t){this.state=this.state.filter(e=>e!==t)},input:{["x-on:blur"]:"createTag()",["x-model"]:"newTag",["x-on:keydown"](t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},["x-on:paste"](){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

+18
View File
@@ -1315,6 +1315,15 @@ export default {
deviceScaleFactor: 3,
},
},
'infolists/entries/text/icon-color': {
url: 'infolists/entries',
selector: '#textIconColor',
viewport: {
width: 1920,
height: 640,
deviceScaleFactor: 3,
},
},
'infolists/entries/text/large': {
url: 'infolists/entries',
selector: '#textLarge',
@@ -1959,6 +1968,15 @@ export default {
deviceScaleFactor: 3,
},
},
'tables/columns/text/icon-color': {
url: 'tables?table=textColumnIconColor',
selector: 'body',
viewport: {
width: 1080,
height: 640,
deviceScaleFactor: 3,
},
},
'tables/columns/text/large': {
url: 'tables?table=textColumnLarge',
selector: 'body',
+21
View File
@@ -17,6 +17,7 @@
"async-alpine": "^1.0.0",
"autoprefixer": "^10.4.0",
"chart.js": "^3.6.0",
"chartjs-adapter-luxon": "^1.3.1",
"choices.js": "^10.1.0",
"codemirror": "^5.65.8",
"cropperjs": "^1.5.13",
@@ -36,6 +37,7 @@
"filepond-plugin-media-preview": "^1.0.9",
"laravel-echo": "^1.14.0",
"laravel-mix": "^6.0.37",
"luxon": "^3.4.3",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.4",
"prettier": "^2.7.1",
@@ -3857,6 +3859,16 @@
"integrity": "sha512-Ro2JbLmvg83gXF5F4sniaQ+lTbSv18E+TIf2cOeiH1Iqd2PGFOtem+DUufMZsCJwFE7ywPOpfXFBwRTGq7dh6w==",
"dev": true
},
"node_modules/chartjs-adapter-luxon": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/chartjs-adapter-luxon/-/chartjs-adapter-luxon-1.3.1.tgz",
"integrity": "sha512-yxHov3X8y+reIibl1o+j18xzrcdddCLqsXhriV2+aQ4hCR66IYFchlRXUvrJVoxglJ380pgytU7YWtoqdIgqhg==",
"dev": true,
"peerDependencies": {
"chart.js": ">=3.0.0",
"luxon": ">=1.0.0"
}
},
"node_modules/choices.js": {
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/choices.js/-/choices.js-10.2.0.tgz",
@@ -7219,6 +7231,15 @@
"yallist": "^3.0.2"
}
},
"node_modules/luxon": {
"version": "3.4.3",
"resolved": "https://registry.npmjs.org/luxon/-/luxon-3.4.3.tgz",
"integrity": "sha512-tFWBiv3h7z+T/tDaoxA8rqTxy1CHV6gHS//QdaH4pulbq/JuBSGgQspQQqcgnwdAx6pNI7cmvz5Sv/addzHmUg==",
"dev": true,
"engines": {
"node": ">=12"
}
},
"node_modules/make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+2
View File
@@ -24,6 +24,7 @@
"async-alpine": "^1.0.0",
"autoprefixer": "^10.4.0",
"chart.js": "^3.6.0",
"chartjs-adapter-luxon": "^1.3.1",
"choices.js": "^10.1.0",
"codemirror": "^5.65.8",
"cropperjs": "^1.5.13",
@@ -43,6 +44,7 @@
"filepond-plugin-media-preview": "^1.0.9",
"laravel-echo": "^1.14.0",
"laravel-mix": "^6.0.37",
"luxon": "^3.4.3",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.4",
"prettier": "^2.7.1",
@@ -0,0 +1,45 @@
<?php
return [
'single' => [
'label' => 'Associar',
'modal' => [
'heading' => 'Associar :label',
'fields' => [
'record_id' => [
'label' => 'Registre',
],
],
'actions' => [
'associate' => [
'label' => 'Associar',
],
'associate_another' => [
'label' => 'Associar i associar un altre',
],
],
],
'notifications' => [
'associated' => [
'title' => 'Associat',
],
],
],
];
@@ -0,0 +1,45 @@
<?php
return [
'single' => [
'label' => 'Vincular',
'modal' => [
'heading' => 'Vincular :label',
'fields' => [
'record_id' => [
'label' => 'Registre',
],
],
'actions' => [
'attach' => [
'label' => 'Vincular',
],
'attach_another' => [
'label' => 'Vincular i vincular un altre',
],
],
],
'notifications' => [
'attached' => [
'title' => 'Vinculats',
],
],
],
];
@@ -0,0 +1,37 @@
<?php
return [
'single' => [
'label' => 'Crear :label',
'modal' => [
'heading' => 'Crear :label',
'actions' => [
'create' => [
'label' => 'Crear',
],
'create_another' => [
'label' => 'Crear i crear un altre',
],
],
],
'notifications' => [
'created' => [
'title' => 'Creat',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Esborrar',
'modal' => [
'heading' => 'Esborrar :label',
'actions' => [
'delete' => [
'label' => 'Esborrar',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Esborrat',
],
],
],
'multiple' => [
'label' => 'Esborrar seleccionats',
'modal' => [
'heading' => 'Esborrar :label seleccionats',
'actions' => [
'delete' => [
'label' => 'Esborrar',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Esborrats',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Desvincular',
'modal' => [
'heading' => 'Desvincular :label',
'actions' => [
'detach' => [
'label' => 'Desvincular',
],
],
],
'notifications' => [
'detached' => [
'title' => 'Desvinculat',
],
],
],
'multiple' => [
'label' => 'Desvincular seleccionats',
'modal' => [
'heading' => 'Desvincular :label seleccionats',
'actions' => [
'detach' => [
'label' => 'Desvincular seleccionats',
],
],
],
'notifications' => [
'detached' => [
'title' => 'Desvinculats',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Dissociar',
'modal' => [
'heading' => 'Dissociar :label',
'actions' => [
'dissociate' => [
'label' => 'Dissociar',
],
],
],
'notifications' => [
'dissociated' => [
'title' => 'Dissociat',
],
],
],
'multiple' => [
'label' => 'Dissociar seleccionats',
'modal' => [
'heading' => 'Dissociar :label seleccionats',
'actions' => [
'dissociate' => [
'label' => 'Dissociar',
],
],
],
'notifications' => [
'dissociated' => [
'title' => 'Dissociats',
],
],
],
];
@@ -0,0 +1,33 @@
<?php
return [
'single' => [
'label' => 'Editar',
'modal' => [
'heading' => 'Editar :label',
'actions' => [
'save' => [
'label' => 'Desar canvis',
],
],
],
'notifications' => [
'saved' => [
'title' => 'Desat',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Forçar l\'esborrat',
'modal' => [
'heading' => 'Forçar l\'esborrat de :label',
'actions' => [
'delete' => [
'label' => 'Esborrar',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Registre esborrat',
],
],
],
'multiple' => [
'label' => 'Forçar l\'esborrat dels elements seleccionats',
'modal' => [
'heading' => 'Forçar l\'esborrat dels :label seleccionats',
'actions' => [
'delete' => [
'label' => 'Esborrar',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Registres esborrats',
],
],
],
];
@@ -0,0 +1,9 @@
<?php
return [
'trigger' => [
'label' => 'Accions',
],
];
@@ -0,0 +1,23 @@
<?php
return [
'confirmation' => 'Està segur/a de fer això?',
'actions' => [
'cancel' => [
'label' => 'Cancel·lar',
],
'confirm' => [
'label' => 'Confirmar',
],
'submit' => [
'label' => 'Enviar',
],
],
];
@@ -0,0 +1,33 @@
<?php
return [
'single' => [
'label' => 'Replicar',
'modal' => [
'heading' => 'Replicar :label',
'actions' => [
'replicate' => [
'label' => 'Replicar',
],
],
],
'notifications' => [
'replicated' => [
'title' => 'Registre replicat',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Restaurar',
'modal' => [
'heading' => 'Restaurar :label',
'actions' => [
'restore' => [
'label' => 'Restaurar',
],
],
],
'notifications' => [
'restored' => [
'title' => 'Registre restaurat',
],
],
],
'multiple' => [
'label' => 'Restaurar seleccionats',
'modal' => [
'heading' => 'Restaurar els :label seleccionats',
'actions' => [
'restore' => [
'label' => 'Restaurar',
],
],
],
'notifications' => [
'restored' => [
'title' => 'Registres restaurats',
],
],
],
];
@@ -0,0 +1,25 @@
<?php
return [
'single' => [
'label' => 'Vista',
'modal' => [
'heading' => 'Vista de :label',
'actions' => [
'close' => [
'label' => 'Tancar',
],
],
],
],
];
@@ -0,0 +1,45 @@
<?php
return [
'single' => [
'label' => 'Poveži',
'modal' => [
'heading' => 'Poveži :label',
'fields' => [
'record_id' => [
'label' => 'Zapis',
],
],
'actions' => [
'associate' => [
'label' => 'Poveži',
],
'associate_another' => [
'label' => 'Poveži i poveži drugi',
],
],
],
'notifications' => [
'associated' => [
'title' => 'Povezano',
],
],
],
];
@@ -0,0 +1,45 @@
<?php
return [
'single' => [
'label' => 'Priloži',
'modal' => [
'heading' => 'Priloži :label',
'fields' => [
'record_id' => [
'label' => 'Zapis',
],
],
'actions' => [
'attach' => [
'label' => 'Priloži',
],
'attach_another' => [
'label' => 'Priloži i priloži drugi',
],
],
],
'notifications' => [
'attached' => [
'title' => 'Priloženo',
],
],
],
];
@@ -0,0 +1,37 @@
<?php
return [
'single' => [
'label' => 'Dodaj :label',
'modal' => [
'heading' => 'Napravi :label',
'actions' => [
'create' => [
'label' => 'Napravi',
],
'create_another' => [
'label' => 'Napravi i napravi drugi',
],
],
],
'notifications' => [
'created' => [
'title' => 'Napravljeno',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Obriši',
'modal' => [
'heading' => 'Obriši :label',
'actions' => [
'delete' => [
'label' => 'Obriši',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Obrisano',
],
],
],
'multiple' => [
'label' => 'Obriši odabrano',
'modal' => [
'heading' => 'Obriši odabrano :label',
'actions' => [
'delete' => [
'label' => 'Obriši',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Obrisano',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Odvoji',
'modal' => [
'heading' => 'Odvoji :label',
'actions' => [
'detach' => [
'label' => 'Odvoji',
],
],
],
'notifications' => [
'detached' => [
'title' => 'Odvojeno',
],
],
],
'multiple' => [
'label' => 'Odvoji odabrano',
'modal' => [
'heading' => 'Odvoji odabrano :label',
'actions' => [
'detach' => [
'label' => 'Odvoji',
],
],
],
'notifications' => [
'detached' => [
'title' => 'Odvojeno',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Razdvoji',
'modal' => [
'heading' => 'Razdvoji :label',
'actions' => [
'dissociate' => [
'label' => 'Razdvoji',
],
],
],
'notifications' => [
'dissociated' => [
'title' => 'Razdvojeno',
],
],
],
'multiple' => [
'label' => 'Dissociate selected',
'modal' => [
'heading' => 'Razdvoji odabrano :label',
'actions' => [
'dissociate' => [
'label' => 'Razdvoji',
],
],
],
'notifications' => [
'dissociated' => [
'title' => 'Razdvojeno',
],
],
],
];
@@ -0,0 +1,33 @@
<?php
return [
'single' => [
'label' => 'Uredi',
'modal' => [
'heading' => 'Uredi :label',
'actions' => [
'save' => [
'label' => 'Spremi promjene',
],
],
],
'notifications' => [
'saved' => [
'title' => 'Spremljeno',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Prisilno izbriši',
'modal' => [
'heading' => 'Prisilno izbriši :label',
'actions' => [
'delete' => [
'label' => 'Obriši',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Obrisano',
],
],
],
'multiple' => [
'label' => 'Prisilno izbriši odabrano',
'modal' => [
'heading' => 'Prisilno izbriši odabrano :label',
'actions' => [
'delete' => [
'label' => 'Obriši',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Obrisano',
],
],
],
];
@@ -0,0 +1,9 @@
<?php
return [
'trigger' => [
'label' => 'Akcije',
],
];
@@ -0,0 +1,23 @@
<?php
return [
'confirmation' => 'Jeste li sigurni da želite to učiniti?',
'actions' => [
'cancel' => [
'label' => 'Odustani',
],
'confirm' => [
'label' => 'Potvrdi',
],
'submit' => [
'label' => 'Pošalji',
],
],
];
@@ -0,0 +1,33 @@
<?php
return [
'single' => [
'label' => 'Repliciraj',
'modal' => [
'heading' => 'Repliciraj :label',
'actions' => [
'replicate' => [
'label' => 'Repliciraj',
],
],
],
'notifications' => [
'replicated' => [
'title' => 'Replicirano',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Vrati',
'modal' => [
'heading' => 'Vrati :label',
'actions' => [
'restore' => [
'label' => 'Vrati',
],
],
],
'notifications' => [
'restored' => [
'title' => 'Vraćeno',
],
],
],
'multiple' => [
'label' => 'Vrati odabrano',
'modal' => [
'heading' => 'Vrati odabrano :label',
'actions' => [
'restore' => [
'label' => 'Vrati',
],
],
],
'notifications' => [
'restored' => [
'title' => 'Vraćeno',
],
],
],
];
@@ -0,0 +1,25 @@
<?php
return [
'single' => [
'label' => 'Pregledaj',
'modal' => [
'heading' => 'Pregled :label',
'actions' => [
'close' => [
'label' => 'Zatvori',
],
],
],
],
];
@@ -0,0 +1,45 @@
<?php
return [
'single' => [
'label' => 'Pripojiť',
'modal' => [
'heading' => 'Pripojiť :label',
'fields' => [
'record_id' => [
'label' => 'Záznam',
],
],
'actions' => [
'associate' => [
'label' => 'Pripojiť',
],
'associate_another' => [
'label' => 'Pripojiť & pripojiť ďalšie',
],
],
],
'notifications' => [
'associated' => [
'title' => 'Pripojené',
],
],
],
];
@@ -0,0 +1,45 @@
<?php
return [
'single' => [
'label' => 'Pridať',
'modal' => [
'heading' => 'Pridať :label',
'fields' => [
'record_id' => [
'label' => 'Záznam',
],
],
'actions' => [
'attach' => [
'label' => 'Pridať',
],
'attach_another' => [
'label' => 'Pridať & pridať ďalšie',
],
],
],
'notifications' => [
'attached' => [
'title' => 'Pridané',
],
],
],
];
@@ -0,0 +1,37 @@
<?php
return [
'single' => [
'label' => 'Vytvoriť',
'modal' => [
'heading' => 'Vytvoriť :label',
'actions' => [
'create' => [
'label' => 'Vytvoriť',
],
'create_another' => [
'label' => 'Vytvoriť & vytvoriť ďalšie',
],
],
],
'notifications' => [
'created' => [
'title' => 'Vytvoriť',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Odstrániť',
'modal' => [
'heading' => 'Odstrániť :label',
'actions' => [
'delete' => [
'label' => 'Odstrániť',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Odstránené',
],
],
],
'multiple' => [
'label' => 'Odstrániť vybrané',
'modal' => [
'heading' => 'Odstrániť vybrané :label',
'actions' => [
'delete' => [
'label' => 'Odstrániť',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Odstránené',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Odobrať',
'modal' => [
'heading' => 'Odobrať :label',
'actions' => [
'detach' => [
'label' => 'Odobrať',
],
],
],
'notifications' => [
'detached' => [
'title' => 'Odobrať',
],
],
],
'multiple' => [
'label' => 'Odobrať vybrané',
'modal' => [
'heading' => 'Odobrať vybrané :label',
'actions' => [
'detach' => [
'label' => 'Odobrať',
],
],
],
'notifications' => [
'detached' => [
'title' => 'Odobrať',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Odpojiť',
'modal' => [
'heading' => 'Odpojiť :label',
'actions' => [
'dissociate' => [
'label' => 'Odpojiť',
],
],
],
'notifications' => [
'dissociated' => [
'title' => 'Odpojené',
],
],
],
'multiple' => [
'label' => 'Odpojiť vybrané',
'modal' => [
'heading' => 'Odpojiť vybrané :label',
'actions' => [
'dissociate' => [
'label' => 'Odpojiť',
],
],
],
'notifications' => [
'dissociated' => [
'title' => 'Odpojené',
],
],
],
];
@@ -0,0 +1,33 @@
<?php
return [
'single' => [
'label' => 'Upraviť',
'modal' => [
'heading' => 'Upraviť :label',
'actions' => [
'save' => [
'label' => 'Uložiť zmeny',
],
],
],
'notifications' => [
'saved' => [
'title' => 'Uložené',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Trvalo odstrániť',
'modal' => [
'heading' => 'Trvalo odstrániť :label',
'actions' => [
'delete' => [
'label' => 'Odstrániť',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Odstránené',
],
],
],
'multiple' => [
'label' => 'Trvalo odstrániť vybrané',
'modal' => [
'heading' => 'Trvalo odstrániť vybrané :label',
'actions' => [
'delete' => [
'label' => 'Odstránené',
],
],
],
'notifications' => [
'deleted' => [
'title' => 'Odstránené',
],
],
],
];
@@ -0,0 +1,9 @@
<?php
return [
'trigger' => [
'label' => 'Akcie',
],
];
@@ -0,0 +1,23 @@
<?php
return [
'confirmation' => 'Naozaj chcete pokračovať?',
'actions' => [
'cancel' => [
'label' => 'Zrušiť',
],
'confirm' => [
'label' => 'Potvrdiť',
],
'submit' => [
'label' => 'Odoslať',
],
],
];
@@ -0,0 +1,33 @@
<?php
return [
'single' => [
'label' => 'Duplikovať',
'modal' => [
'heading' => 'Duplikovať :label',
'actions' => [
'replicate' => [
'label' => 'Duplikovať',
],
],
],
'notifications' => [
'replicated' => [
'title' => 'Duplikované',
],
],
],
];
@@ -0,0 +1,61 @@
<?php
return [
'single' => [
'label' => 'Obnoviť',
'modal' => [
'heading' => 'Obnoviť :label',
'actions' => [
'restore' => [
'label' => 'Obnoviť',
],
],
],
'notifications' => [
'restored' => [
'title' => 'Obnovené',
],
],
],
'multiple' => [
'label' => 'Obnoviť vybrané',
'modal' => [
'heading' => 'Obnoviť vybrané :label',
'actions' => [
'restore' => [
'label' => 'Obnoviť',
],
],
],
'notifications' => [
'restored' => [
'title' => 'Obnovené',
],
],
],
];
@@ -0,0 +1,25 @@
<?php
return [
'single' => [
'label' => 'Zobraziť',
'modal' => [
'heading' => 'Zobraziť :label',
'actions' => [
'close' => [
'label' => 'Zavrieť',
],
],
],
],
];
@@ -0,0 +1,9 @@
<?php
return [
'trigger' => [
'label' => 'Дії',
],
];
+2 -1
View File
@@ -8,6 +8,7 @@ use Filament\Support\Concerns\HasBadge;
use Filament\Support\Concerns\HasColor;
use Filament\Support\Concerns\HasExtraAttributes;
use Filament\Support\Concerns\HasIcon;
use Filament\Support\Facades\FilamentIcon;
use Livewire\Component;
class ActionGroup extends ViewComponent implements HasLivewire
@@ -194,7 +195,7 @@ class ActionGroup extends ViewComponent implements HasLivewire
public function getIcon(): string
{
return $this->getBaseIcon() ?? 'heroicon-m-ellipsis-vertical';
return $this->getBaseIcon() ?? FilamentIcon::resolve('actions::action-group') ?? 'heroicon-m-ellipsis-vertical';
}
public function isHidden(): bool
@@ -5,6 +5,7 @@ namespace Filament\Actions\Concerns;
use Closure;
use Filament\Actions\MountableAction;
use Filament\Support\Enums\Alignment;
use Filament\Support\Facades\FilamentIcon;
trait CanRequireConfirmation
{
@@ -12,7 +13,7 @@ trait CanRequireConfirmation
{
$this->modalAlignment(fn (MountableAction $action): ?Alignment => $action->evaluate($condition) ? Alignment::Center : null);
$this->modalFooterActionsAlignment(fn (MountableAction $action): ?Alignment => $action->evaluate($condition) ? Alignment::Center : null);
$this->modalIcon(fn (MountableAction $action): ?string => $action->evaluate($condition) ? 'heroicon-o-exclamation-triangle' : null);
$this->modalIcon(fn (MountableAction $action): ?string => $action->evaluate($condition) ? (FilamentIcon::resolve('actions::modal.confirmation') ?? 'heroicon-o-exclamation-triangle') : null);
$this->modalDescription(fn (MountableAction $action): ?string => $action->evaluate($condition) ? __('filament-actions::modal.confirmation') : null);
$this->modalSubmitActionLabel(fn (MountableAction $action): ?string => $action->evaluate($condition) ? __('filament-actions::modal.actions.confirm.label') : null);
$this->modalWidth(fn (MountableAction $action): ?string => $action->evaluate($condition) ? 'md' : null);
+2 -1
View File
@@ -6,6 +6,7 @@ use Closure;
use Filament\Actions\Concerns\CanCustomizeProcess;
use Filament\Actions\Contracts\HasActions;
use Filament\Forms\Form;
use Filament\Support\Facades\FilamentIcon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\Relation;
@@ -42,7 +43,7 @@ class CreateAction extends Action
$this->successNotificationTitle(__('filament-actions::create.single.notifications.created.title'));
$this->groupedIcon('heroicon-m-plus');
$this->groupedIcon(FilamentIcon::resolve('actions::create-action.grouped') ?? 'heroicon-m-plus');
$this->record(null);
+2 -1
View File
@@ -5,6 +5,7 @@ namespace Filament\Actions;
use Closure;
use Filament\Actions\Concerns\CanCustomizeProcess;
use Filament\Actions\Contracts\HasActions;
use Filament\Support\Facades\FilamentIcon;
use Illuminate\Database\Eloquent\Model;
class EditAction extends Action
@@ -30,7 +31,7 @@ class EditAction extends Action
$this->successNotificationTitle(__('filament-actions::edit.single.notifications.saved.title'));
$this->groupedIcon('heroicon-m-pencil-square');
$this->groupedIcon(FilamentIcon::resolve('actions::edit-action.grouped') ?? 'heroicon-m-pencil-square');
$this->fillForm(function (HasActions $livewire, Model $record): array {
if ($translatableContentDriver = $livewire->makeFilamentTranslatableContentDriver()) {
+2 -1
View File
@@ -4,6 +4,7 @@ namespace Filament\Actions;
use Closure;
use Filament\Actions\Contracts\HasActions;
use Filament\Support\Facades\FilamentIcon;
use Illuminate\Database\Eloquent\Model;
class ViewAction extends Action
@@ -28,7 +29,7 @@ class ViewAction extends Action
$this->color('gray');
$this->groupedIcon('heroicon-m-eye');
$this->groupedIcon(FilamentIcon::resolve('actions::view-action.grouped') ?? 'heroicon-m-eye');
$this->disabledForm();
+14
View File
@@ -506,6 +506,20 @@ use Filament\Forms\Components\TextInput;
TextInput::make('name')->validationAttribute('full name')
```
## Validation messages
By default Laravel's validation error message is used. To customize the error messages, use the `validationMessages()` method:
```php
use Filament\Forms\Components\TextInput;
TextInput::make('email')
->unique(// ...)
->validationMessages([
'unique' => 'The :attribute has already been registered.',
])
```
## Sending validation notifications
If you want to send a notification when validation error occurs, you may do so by using the `onValidationError()` method on your Livewire component:
+384 -9
View File
@@ -1,6 +1,305 @@
<?php
return [
'builder' => [
'actions' => [
'clone' => [
'label' => 'Clonar',
],
'add' => [
'label' => 'Afegir a :label',
],
'add_between' => [
'label' => 'Inserir entre blocs',
],
'delete' => [
'label' => 'Esborrar',
],
'reorder' => [
'label' => 'Moure',
],
'move_down' => [
'label' => 'Moure cap avall',
],
'move_up' => [
'label' => 'Moure cap amunt',
],
'collapse' => [
'label' => 'Replegar',
],
'expand' => [
'label' => 'Ampliar',
],
'collapse_all' => [
'label' => 'Replegar tots',
],
'expand_all' => [
'label' => 'Ampliar tots',
],
],
],
'checkbox_list' => [
'actions' => [
'deselect_all' => [
'label' => 'Deseleccionar tot',
],
'select_all' => [
'label' => 'Seleccionar tot',
],
],
],
'file_upload' => [
'editor' => [
'actions' => [
'cancel' => [
'label' => 'Cancel·lar',
],
'drag_crop' => [
'label' => `Mode d'arrossegament "retallar"`,
],
'drag_move' => [
'label' => `Mode d'arrossegament "moure"`,
],
'flip_horizontal' => [
'label' => 'Girar imatge horitzontalment',
],
'flip_vertical' => [
'label' => 'Girar imatge verticalment',
],
'move_down' => [
'label' => 'Mou la imatge cap avall',
],
'move_left' => [
'label' => 'Mou la imatge cap a l\'esquerra',
],
'move_right' => [
'label' => 'Mou la imatge cap a la dreta',
],
'move_up' => [
'label' => 'Mou la imatge cap amunt',
],
'reset' => [
'label' => 'Restablir',
],
'rotate_left' => [
'label' => 'Rota la imatge cap a l\'esquerra',
],
'rotate_right' => [
'label' => 'Rota la imatge cap a la dreta',
],
'set_aspect_ratio' => [
'label' => 'Estableix la relació d\'aspecte a :ratio',
],
'save' => [
'label' => 'Desar',
],
'zoom_100' => [
'label' => 'Amplia la imatge a 100%',
],
'zoom_in' => [
'label' => 'Ampliar el zoom',
],
'zoom_out' => [
'label' => 'Reduir el zoom',
],
],
'fields' => [
'height' => [
'label' => 'Altura',
'unit' => 'px',
],
'rotation' => [
'label' => 'Rotació',
'unit' => 'deg',
],
'width' => [
'label' => 'Amplada',
'unit' => 'px',
],
'x_position' => [
'label' => 'X',
'unit' => 'px',
],
'y_position' => [
'label' => 'Y',
'unit' => 'px',
],
],
'aspect_ratios' => [
'label' => 'Relacions d\'aspecte',
'no_fixed' => [
'label' => 'Lliure',
],
],
'svg' => [
'messages' => [
'confirmation' => 'No es recomana editar fitxers SVG ja que pot provocar una pèrdua de qualitat en escalar-los.\n Esteu segur que voleu continuar?',
'disabled' => 'L\'edició de fitxers SVG està desactivada ja que pot provocar una pèrdua de qualitat en escalar-los.',
],
],
],
],
'key_value' => [
'actions' => [
'add' => [
'label' => 'Afegir fila',
],
'delete' => [
'label' => 'Esborrar fila',
],
'reorder' => [
'label' => 'Reordenar fila',
],
],
'fields' => [
'key' => [
'label' => 'Clau',
],
'value' => [
'label' => 'Valor',
],
],
],
'markdown_editor' => [
'toolbar_buttons' => [
'attach_files' => 'Adjuntar fitxers',
'blockquote' => 'Cita de bloc',
'bold' => 'Negreta',
'bullet_list' => 'Llista de vinyetes',
'code_block' => 'Bloc de codi',
'heading' => 'Encapçalament',
'italic' => 'Cursiva',
'link' => 'Enllaç',
'ordered_list' => 'Llista numerada',
'redo' => 'Refer',
'strike' => 'Ratllat',
'table' => 'Taula',
'undo' => 'Desfer',
],
],
'repeater' => [
'actions' => [
'add' => [
'label' => 'Afegir a :label',
],
'add_between' => [
'label' => 'Inserir entre',
],
'delete' => [
'label' => 'Esborrar',
],
'clone' => [
'label' => 'Clonar',
],
'reorder' => [
'label' => 'Moure',
],
'move_down' => [
'label' => 'Moure cap avall',
],
'move_up' => [
'label' => 'Moure cap amunt',
],
'collapse' => [
'label' => 'Replegar',
],
'expand' => [
'label' => 'Ampliar',
],
'collapse_all' => [
'label' => 'Replegar tots',
],
'expand_all' => [
'label' => 'Ampliar tots',
],
],
],
'rich_editor' => [
@@ -10,7 +309,7 @@ return [
'actions' => [
'link' => 'Enllaç',
'unlink' => "Elimina l'enllaç",
'unlink' => 'Elimina l\'enllaç',
],
'label' => 'URL',
@@ -25,29 +324,105 @@ return [
'attach_files' => 'Adjuntar fitxers',
'blockquote' => 'Bloc de cita',
'bold' => 'Negreta',
'bullet_list' => 'Bullets',
'code_block' => 'Codi',
'bullet_list' => 'Llista de vinyetes',
'code_block' => 'Bloc de codi',
'h1' => 'Títol',
'h2' => 'Capçaleres',
'h2' => 'Capçalera',
'h3' => 'Subtítol',
'italic' => 'Cursiva',
'link' => 'Enllaç',
'ordered_list' => 'Números',
'redo' => 'Refés',
'strike' => 'Barrat',
'ordered_list' => 'Llista numerada',
'redo' => 'Refer',
'strike' => 'Ratllat',
'underline' => 'Subratllat',
'undo' => 'Desfer',
],
],
'select' => [
'no_search_results_message' => "No s'ha trobat cap opció que coincideixi amb la vostra cerca",
'actions' => [
'create_option' => [
'modal' => [
'heading' => 'Crear',
'actions' => [
'create' => [
'label' => 'Crear',
],
'create_another' => [
'label' => 'Crear i crear un altre',
],
],
],
],
'edit_option' => [
'modal' => [
'heading' => 'Editar',
'actions' => [
'save' => [
'label' => 'Desar',
],
],
],
],
],
'boolean' => [
'true' => 'Si',
'false' => 'No',
],
'loading_message' => 'Carregant...',
'max_items_message' => 'Només :count poden ser seleccionats.',
'no_search_results_message' => 'No s\'ha trobat cap opció que coincideixi amb la vostra cerca.',
'placeholder' => 'Trieu una opció',
'searching_message' => 'Cercant...',
'search_prompt' => 'Comenceu a escriure per cercar...',
],
'tags_input' => [
'placeholder' => 'Nova Etiqueta',
'placeholder' => 'Nova etiqueta',
],
'wizard' => [
'actions' => [
'previous_step' => [
'label' => 'Enrere',
],
'next_step' => [
'label' => 'Endavant',
],
],
],
];
@@ -0,0 +1,416 @@
<?php
return [
'builder' => [
'actions' => [
'clone' => [
'label' => 'Kloniraj',
],
'add' => [
'label' => 'Dodaj na :label',
],
'add_between' => [
'label' => 'Umetni između blokova',
],
'delete' => [
'label' => 'Obriši',
],
'reorder' => [
'label' => 'Pomakni',
],
'move_down' => [
'label' => 'Pomakni dolje',
],
'move_up' => [
'label' => 'Pomakni gore',
],
'collapse' => [
'label' => 'Skupi',
],
'expand' => [
'label' => 'Proširi',
],
'collapse_all' => [
'label' => 'Skupi sve',
],
'expand_all' => [
'label' => 'Proširi sve',
],
],
],
'checkbox_list' => [
'actions' => [
'deselect_all' => [
'label' => 'Odznači sve',
],
'select_all' => [
'label' => 'Označi sve',
],
],
],
'file_upload' => [
'editor' => [
'actions' => [
'cancel' => [
'label' => 'Odustani',
],
'drag_crop' => [
'label' => 'Povlačenje za obrezivanje',
],
'drag_move' => [
'label' => 'Povlačenje za pomicanje',
],
'flip_horizontal' => [
'label' => 'Obrni sliku horizontalno',
],
'flip_vertical' => [
'label' => 'Obrni sliku vertikalno',
],
'move_down' => [
'label' => 'Pomakni sliku dolje',
],
'move_left' => [
'label' => 'Pomakni sliku lijevo',
],
'move_right' => [
'label' => 'Pomakni sliku desno',
],
'move_up' => [
'label' => 'Pomakni sliku gore',
],
'reset' => [
'label' => 'Poništi',
],
'rotate_left' => [
'label' => 'Rotiraj sliku ulijevo',
],
'rotate_right' => [
'label' => 'Rotiraj sliku udesno',
],
'set_aspect_ratio' => [
'label' => 'Postavi omjer širine i visine na :ratio',
],
'save' => [
'label' => 'Spremi',
],
'zoom_100' => [
'label' => 'Zumiraj sliku na 100%',
],
'zoom_in' => [
'label' => 'Povećaj',
],
'zoom_out' => [
'label' => 'Smanji',
],
],
'fields' => [
'height' => [
'label' => 'Visina',
'unit' => 'px',
],
'rotation' => [
'label' => 'Rotacija',
'unit' => 'deg',
],
'width' => [
'label' => 'Širina',
'unit' => 'px',
],
'x_position' => [
'label' => 'X',
'unit' => 'px',
],
'y_position' => [
'label' => 'Y',
'unit' => 'px',
],
],
'aspect_ratios' => [
'label' => 'Omjeri širine i visine',
'no_fixed' => [
'label' => 'Slobodno',
],
],
],
],
'key_value' => [
'actions' => [
'add' => [
'label' => 'Dodaj red',
],
'delete' => [
'label' => 'Obriši red',
],
'reorder' => [
'label' => 'Promijeni redoslijed reda',
],
],
'fields' => [
'key' => [
'label' => 'Ključ',
],
'value' => [
'label' => 'Vrijednost',
],
],
],
'markdown_editor' => [
'toolbar_buttons' => [
'attach_files' => 'Dodaj datoteke',
'blockquote' => 'Blockquote',
'bold' => 'Podebljano',
'bullet_list' => 'Lista',
'code_block' => 'Blok koda',
'heading' => 'Zaglavlje',
'italic' => 'Kurziv',
'link' => 'Poveznica',
'ordered_list' => 'Numerirana lista',
'redo' => 'Ponovi',
'strike' => 'Precrtano',
'table' => 'Tablica',
'undo' => 'Poništi',
],
],
'repeater' => [
'actions' => [
'add' => [
'label' => 'Dodaj na :label',
],
'delete' => [
'label' => 'Obriši',
],
'clone' => [
'label' => 'Kloniraj',
],
'reorder' => [
'label' => 'Pomakni',
],
'move_down' => [
'label' => 'Pomakni dolje',
],
'move_up' => [
'label' => 'Pomakni gore',
],
'collapse' => [
'label' => 'Skupi',
],
'expand' => [
'label' => 'Proširi',
],
'collapse_all' => [
'label' => 'Skupi sve',
],
'expand_all' => [
'label' => 'Proširi sve',
],
],
],
'rich_editor' => [
'dialogs' => [
'link' => [
'actions' => [
'link' => 'Poveznica',
'unlink' => 'Ukloni poveznicu',
],
'label' => 'URL',
'placeholder' => 'Unesi URL',
],
],
'toolbar_buttons' => [
'attach_files' => 'Dodaj datoteke',
'blockquote' => 'Blockquote',
'bold' => 'Podebljano',
'bullet_list' => 'Lista',
'code_block' => 'Blok koda',
'h1' => 'Naslov',
'h2' => 'Zaglavlje',
'h3' => 'Podnaslov',
'italic' => 'Kurziv',
'link' => 'Poveznica',
'ordered_list' => 'Numerirana lista',
'redo' => 'Ponovi',
'strike' => 'Precrtano',
'underline' => 'Podcrtano',
'undo' => 'Poništi',
],
],
'select' => [
'actions' => [
'create_option' => [
'modal' => [
'heading' => 'Napravi',
'actions' => [
'create' => [
'label' => 'Napravi',
],
'create_another' => [
'label' => 'Napravi i napravi drugi',
],
],
],
],
'edit_option' => [
'modal' => [
'heading' => 'Uredi',
'actions' => [
'save' => [
'label' => 'Spremi',
],
],
],
],
],
'boolean' => [
'true' => 'Da',
'false' => 'Ne',
],
'loading_message' => 'Učitavanje...',
'max_items_message' => 'Samo :count može biti odabrano.',
'no_search_results_message' => 'Nema opcija koje odgovaraju vašem pretraživanju.',
'placeholder' => 'Odaberi opciju',
'searching_message' => 'Pretraživanje...',
'search_prompt' => 'Počnite tipkati za pretragu...',
],
'tags_input' => [
'placeholder' => 'Novi tag',
],
'wizard' => [
'actions' => [
'previous_step' => [
'label' => 'Natrag',
],
'next_step' => [
'label' => 'Naprijed',
],
],
],
];
@@ -185,6 +185,15 @@ return [
],
'svg' => [
'messages' => [
'confirmation' => 'Не рекомендуется редактировать SVG-файлы, поскольку при масштабировании может быть потеряно качество.\n Уверены, что хотите продолжить?',
'disabled' => 'Редактирование SVG-файлов заблокировано, поскольку при масштабировании может быть потеряно качество.',
],
],
],
],
@@ -248,6 +257,10 @@ return [
'label' => 'Добавить к :label',
],
'add_between' => [
'label' => 'Добавить между',
],
'delete' => [
'label' => 'Удалить',
],
@@ -321,6 +334,7 @@ return [
'ordered_list' => 'Нумерованный список',
'redo' => 'Повторить',
'strike' => 'Зачеркнутый',
'underline' => 'Подчеркнутый',
'undo' => 'Отменить',
],
@@ -0,0 +1,429 @@
<?php
return [
'builder' => [
'actions' => [
'clone' => [
'label' => 'Duplikovať',
],
'add' => [
'label' => 'Pridať do :label',
],
'add_between' => [
'label' => 'Pridať medzi bloky',
],
'delete' => [
'label' => 'Odstrániť',
],
'reorder' => [
'label' => 'Presunúť',
],
'move_down' => [
'label' => 'Presunúť dole',
],
'move_up' => [
'label' => 'Presunúť hore',
],
'collapse' => [
'label' => 'Zabaliť',
],
'expand' => [
'label' => 'Rozbaliť',
],
'collapse_all' => [
'label' => 'Zbaliť všetko',
],
'expand_all' => [
'label' => 'Rozbaliť všetko',
],
],
],
'checkbox_list' => [
'actions' => [
'deselect_all' => [
'label' => 'Odznačiť všetko',
],
'select_all' => [
'label' => 'Označiť všetko',
],
],
],
'file_upload' => [
'editor' => [
'actions' => [
'cancel' => [
'label' => 'Zrušiť',
],
'drag_crop' => [
'label' => 'Ťahaním orezať (crop)',
],
'drag_move' => [
'label' => 'Ťahaním posunúť (move)',
],
'flip_horizontal' => [
'label' => 'Prevrátiť obrázok vodorovne',
],
'flip_vertical' => [
'label' => 'Otočiť obrázok vertikálne',
],
'move_down' => [
'label' => 'Presunúť obrázok dole',
],
'move_left' => [
'label' => 'Presunúť obrázok doľava',
],
'move_right' => [
'label' => 'Presunúť obrázok doprava',
],
'move_up' => [
'label' => 'Presunúť obrázok hore',
],
'reset' => [
'label' => 'Resetovať',
],
'rotate_left' => [
'label' => 'Otočiť obrázok doľava',
],
'rotate_right' => [
'label' => 'Otočiť obrázok doprava',
],
'set_aspect_ratio' => [
'label' => 'Nastaviť pomer strán na :ratio',
],
'save' => [
'label' => 'Uložiť',
],
'zoom_100' => [
'label' => 'Priblížiť obrázok na 100%',
],
'zoom_in' => [
'label' => 'Priblížiť',
],
'zoom_out' => [
'label' => 'Oddiaľiť',
],
],
'fields' => [
'height' => [
'label' => 'Výška',
'unit' => 'px',
],
'rotation' => [
'label' => 'Rotácia',
'unit' => 'deg',
],
'width' => [
'label' => 'Šírka',
'unit' => 'px',
],
'x_position' => [
'label' => 'X',
'unit' => 'px',
],
'y_position' => [
'label' => 'Y',
'unit' => 'px',
],
],
'aspect_ratios' => [
'label' => 'Pomery strán',
'no_fixed' => [
'label' => 'Voľne',
],
],
'svg' => [
'messages' => [
'confirmation' => 'Úprava SVG obrázkov nie je odporúčaná, pretože zmena veľkosti môže znížiť kvalitu.\n Naozaj chcete pokračovať?',
'disabled' => 'Úprava SVG obrázkov nie je dostupná, pretože zmena veľkosti môže znížiť kvalitu.',
],
],
],
],
'key_value' => [
'actions' => [
'add' => [
'label' => 'Pridať riadok',
],
'delete' => [
'label' => 'Odstrániť riadok',
],
'reorder' => [
'label' => 'Presunúť riadok',
],
],
'fields' => [
'key' => [
'label' => 'Kľúč',
],
'value' => [
'label' => 'Hodnota',
],
],
],
'markdown_editor' => [
'toolbar_buttons' => [
'attach_files' => 'Pripojiť súbory',
'blockquote' => 'Citát',
'bold' => 'Tučné písmo',
'bullet_list' => 'Odrážkový zoznam',
'code_block' => 'Blok kódu',
'heading' => 'Nadpis',
'italic' => 'Kurzíva',
'link' => 'Odkaz',
'ordered_list' => 'Číslovaný zoznam',
'redo' => 'Prerobenie',
'strike' => 'Prečiarknutie',
'table' => 'Tabuľka',
'undo' => 'Späť',
],
],
'repeater' => [
'actions' => [
'add' => [
'label' => 'Pridať do :label',
],
'add_between' => [
'label' => 'Vložiť medzi',
],
'delete' => [
'label' => 'Odstrániť',
],
'clone' => [
'label' => 'Duplikovať',
],
'reorder' => [
'label' => 'Presunúť',
],
'move_down' => [
'label' => 'Presunúť dole',
],
'move_up' => [
'label' => 'Presunúť hore',
],
'collapse' => [
'label' => 'Zabaliť',
],
'expand' => [
'label' => 'Rozbaliť',
],
'collapse_all' => [
'label' => 'Zabaliť všetko',
],
'expand_all' => [
'label' => 'Rozbaliť všetko',
],
],
],
'rich_editor' => [
'dialogs' => [
'link' => [
'actions' => [
'link' => 'Pridať odkaz',
'unlink' => 'Zrušiť odkaz',
],
'label' => 'URL adresa',
'placeholder' => 'Zdajte adresu URL',
],
],
'toolbar_buttons' => [
'attach_files' => 'Pripojiť súbory',
'blockquote' => 'Citát',
'bold' => 'Tučné písmo',
'bullet_list' => 'Odrážkový zoznam',
'code_block' => 'Blok kódu',
'h1' => 'Názov',
'h2' => 'Nadpis',
'h3' => 'Podnadpis',
'italic' => 'Kurzíva',
'link' => 'Odkaz',
'ordered_list' => 'Číslovaný zoznam',
'redo' => 'Prerobiť',
'strike' => 'Prečiarknutie',
'underline' => 'Podčiarknutie',
'undo' => 'Späť',
],
],
'select' => [
'actions' => [
'create_option' => [
'modal' => [
'heading' => 'Vytvoriť',
'actions' => [
'create' => [
'label' => 'Vytvoriť',
],
'create_another' => [
'label' => 'Vytvoriť & vytvoriť ďalšie',
],
],
],
],
'edit_option' => [
'modal' => [
'heading' => 'Upraviť',
'actions' => [
'save' => [
'label' => 'Uložiť',
],
],
],
],
],
'boolean' => [
'true' => 'Áno',
'false' => 'Nie',
],
'loading_message' => 'Načítam...',
'max_items_message' => 'Maximálny počet pre výber je: :count.',
'no_search_results_message' => 'Žiadne možnosti neodpovedajú vášmu hľadaniu.',
'placeholder' => 'Vyberte možnosť',
'searching_message' => 'Hľadám...',
'search_prompt' => 'Začnite písať...',
],
'tags_input' => [
'placeholder' => 'Nová značka',
],
'wizard' => [
'actions' => [
'previous_step' => [
'label' => 'Spať',
],
'next_step' => [
'label' => 'Ďalej',
],
],
],
];
@@ -185,6 +185,15 @@ return [
],
'svg' => [
'messages' => [
'confirmation' => 'Не рекомендується редагувати SVG-файли, оскільки під час масштабування може погіршитися якість.\n Ви впевнені, що хочере продовжити?',
'disabled' => 'Редагування SVG-файлів заблоковано, оскільки під час масштабування може погіршитися якість.',
],
],
],
],
@@ -248,6 +257,10 @@ return [
'label' => 'Додати до :label',
],
'add_between' => [
'label' => 'Додати між',
],
'delete' => [
'label' => 'Видалити',
],
@@ -269,19 +282,19 @@ return [
],
'collapse' => [
'label' => 'Звернути',
'label' => 'Згорнути',
],
'expand' => [
'label' => 'Розвернути',
'label' => 'Розгорнути',
],
'collapse_all' => [
'label' => 'Звернути все',
'label' => 'Згорнути все',
],
'expand_all' => [
'label' => 'Розвернути все',
'label' => 'Розгорнути все',
],
],
@@ -311,16 +324,17 @@ return [
'attach_files' => 'Прикріпити файли',
'blockquote' => 'Цитата',
'bold' => 'Жирний',
'bullet_list' => 'Маркувальний список',
'bullet_list' => 'Маркований список',
'code_block' => 'Код',
'h1' => 'Назва',
'h2' => 'Заголовок',
'h3' => 'Підзаголовок',
'italic' => 'Курсів',
'italic' => 'Курсив',
'link' => 'Посилання',
'ordered_list' => 'Нумерований список',
'redo' => 'Повторити',
'strike' => 'Закреслений',
'underline' => 'Підкреслений',
'undo' => 'Скасувати',
],
@@ -43,7 +43,7 @@
fn (\Filament\Forms\Components\Actions\Action $hintAction): bool => $hintAction->isVisible(),
);
$hasError = $errors->has($statePath) || ($hasNestedRecursiveValidationRules && $errors->has("{$statePath}.*"));
$hasError = filled($statePath) && ($errors->has($statePath) || ($hasNestedRecursiveValidationRules && $errors->has("{$statePath}.*")));
@endphp
<div {{ $attributes->class(['fi-fo-field-wrp']) }}>
@@ -69,7 +69,7 @@
@if ($label && (! $labelSrOnly))
<x-filament-forms::field-wrapper.label
:for="$id"
:error="$errors->has($statePath)"
:error="$hasError"
:is-disabled="$isDisabled"
:is-marked-as-required="$isMarkedAsRequired"
:prefix="$labelPrefix"
+8 -7
View File
@@ -7,6 +7,7 @@ use Filament\Forms\ComponentContainer;
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Components\Builder\Block;
use Filament\Support\Enums\ActionSize;
use Filament\Support\Facades\FilamentIcon;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
@@ -228,7 +229,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getCloneActionName())
->label(__('filament-forms::components.builder.actions.clone.label'))
->icon('heroicon-m-square-2-stack')
->icon(FilamentIcon::resolve('forms::components.builder.actions.clone') ?? 'heroicon-m-square-2-stack')
->color('gray')
->action(function (array $arguments, Builder $component): void {
$newUuid = $component->generateUuid();
@@ -271,7 +272,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getDeleteActionName())
->label(__('filament-forms::components.builder.actions.delete.label'))
->icon('heroicon-m-trash')
->icon(FilamentIcon::resolve('forms::components.builder.actions.delete') ?? 'heroicon-m-trash')
->color('danger')
->action(function (array $arguments, Builder $component): void {
$items = $component->getState();
@@ -310,7 +311,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getMoveDownActionName())
->label(__('filament-forms::components.builder.actions.move_down.label'))
->icon('heroicon-m-arrow-down')
->icon(FilamentIcon::resolve('forms::components.builder.actions.move-down') ?? 'heroicon-m-arrow-down')
->color('gray')
->action(function (array $arguments, Builder $component): void {
$items = array_move_after($component->getState(), $arguments['item']);
@@ -348,7 +349,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getMoveUpActionName())
->label(__('filament-forms::components.builder.actions.move_up.label'))
->icon('heroicon-m-arrow-up')
->icon(FilamentIcon::resolve('forms::components.builder.actions.move-up') ?? 'heroicon-m-arrow-up')
->color('gray')
->action(function (array $arguments, Builder $component): void {
$items = array_move_before($component->getState(), $arguments['item']);
@@ -393,7 +394,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getReorderActionName())
->label(__('filament-forms::components.builder.actions.reorder.label'))
->icon('heroicon-m-arrows-up-down')
->icon(FilamentIcon::resolve('forms::components.builder.actions.reorder') ?? 'heroicon-m-arrows-up-down')
->color('gray')
->action(function (array $arguments, Builder $component): void {
$items = [
@@ -435,7 +436,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getCollapseActionName())
->label(__('filament-forms::components.builder.actions.collapse.label'))
->icon('heroicon-m-chevron-up')
->icon(FilamentIcon::resolve('forms::components.builder.actions.collapse') ?? 'heroicon-m-chevron-up')
->color('gray')
->livewireClickHandlerEnabled(false)
->iconButton()
@@ -466,7 +467,7 @@ class Builder extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getExpandActionName())
->label(__('filament-forms::components.builder.actions.expand.label'))
->icon('heroicon-m-chevron-down')
->icon(FilamentIcon::resolve('forms::components.builder.actions.expand') ?? 'heroicon-m-chevron-down')
->color('gray')
->livewireClickHandlerEnabled(false)
->iconButton()
@@ -23,6 +23,11 @@ trait CanBeValidated
*/
protected array $rules = [];
/**
* @var array<string, string | Closure>
*/
protected array $validationMessages = [];
protected string | Closure | null $validationAttribute = null;
public function activeUrl(bool | Closure $condition = true): static
@@ -538,6 +543,16 @@ trait CanBeValidated
return $this;
}
/**
* @param array<string, string | Closure> $messages
*/
public function validationMessages(array $messages): static
{
$this->validationMessages = $messages;
return $this;
}
public function getRegexPattern(): ?string
{
return $this->evaluate($this->regexPattern);
@@ -553,6 +568,20 @@ trait CanBeValidated
return $this->evaluate($this->validationAttribute) ?? Str::lcfirst($this->getLabel());
}
/**
* @return array<string, string>
*/
public function getValidationMessages(): array
{
$messages = [];
foreach ($this->validationMessages as $rule => $message) {
$messages[$rule] = $this->evaluate($message);
}
return array_filter($messages);
}
/**
* @return array<mixed>
*/
@@ -577,6 +606,20 @@ trait CanBeValidated
return $rules;
}
/**
* @param array<string, array<string, string>> $messages
*/
public function dehydrateValidationMessages(array &$messages): void
{
$statePath = $this->getStatePath();
if (count($componentMessages = $this->getValidationMessages())) {
foreach ($componentMessages as $rule => $message) {
$messages["{$statePath}.{$rule}"] = $message;
}
}
}
/**
* @param array<string, array<mixed>> $rules
*/
@@ -9,6 +9,11 @@ interface HasValidationRules
*/
public function dehydrateValidationAttributes(array &$attributes): void;
/**
* @param array<string, array<string, string>> $messages
*/
public function dehydrateValidationMessages(array &$messages): void;
/**
* @param array<string, array<mixed>> $rules
*/
+14 -13
View File
@@ -6,6 +6,7 @@ use Closure;
use Exception;
use Filament\Support\Concerns\HasAlignment;
use Filament\Support\Concerns\HasExtraAlpineAttributes;
use Filament\Support\Facades\FilamentIcon;
use Illuminate\Support\Collection;
use Illuminate\Support\HtmlString;
@@ -474,71 +475,71 @@ class FileUpload extends BaseFileUpload
'zoom' => [
[
'label' => __('filament-forms::components.file_upload.editor.actions.drag_move.label'),
'iconHtml' => new HtmlString('<svg class="' . $iconSizeClasses . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M13 6v5h5V7.75L22.25 12L18 16.25V13h-5v5h3.25L12 22.25L7.75 18H11v-5H6v3.25L1.75 12L6 7.75V11h5V6H7.75L12 1.75L16.25 6H13Z"/></svg>'),
'iconHtml' => ($icon = FilamentIcon::resolve('forms::components.file-upload.editor.actions.drag-move')) ? svg($icon, $iconSizeClasses)->toHtml() : new HtmlString('<svg class="' . $iconSizeClasses . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M13 6v5h5V7.75L22.25 12L18 16.25V13h-5v5h3.25L12 22.25L7.75 18H11v-5H6v3.25L1.75 12L6 7.75V11h5V6H7.75L12 1.75L16.25 6H13Z"/></svg>'),
'alpineClickHandler' => "editor.setDragMode('move')",
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.drag_crop.label'),
'iconHtml' => new HtmlString('<svg class="' . $iconSizeClasses . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17 23v-4H7q-.825 0-1.412-.587Q5 17.825 5 17V7H1V5h4V1h2v16h16v2h-4v4Zm0-8V7H9V5h8q.825 0 1.413.588Q19 6.175 19 7v8Z"/></svg>'),
'iconHtml' => ($icon = FilamentIcon::resolve('forms::components.file-upload.editor.actions.drag-crop')) ? svg($icon, $iconSizeClasses)->toHtml() : new HtmlString('<svg class="' . $iconSizeClasses . '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M17 23v-4H7q-.825 0-1.412-.587Q5 17.825 5 17V7H1V5h4V1h2v16h16v2h-4v4Zm0-8V7H9V5h8q.825 0 1.413.588Q19 6.175 19 7v8Z"/></svg>'),
'alpineClickHandler' => "editor.setDragMode('crop')",
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.zoom_in.label'),
'iconHtml' => svg('heroicon-o-magnifying-glass-plus', $iconSizeClasses)->toHtml(),
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.zoom-in') ?? 'heroicon-o-magnifying-glass-plus', $iconSizeClasses)->toHtml(),
'alpineClickHandler' => 'editor.zoom(0.1)',
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.zoom_out.label'),
'iconHtml' => svg('heroicon-o-magnifying-glass-minus', $iconSizeClasses)->toHtml(),
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.zoom-out') ?? 'heroicon-o-magnifying-glass-minus', $iconSizeClasses)->toHtml(),
'alpineClickHandler' => 'editor.zoom(-0.1)',
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.zoom_100.label'),
'iconHtml' => svg('heroicon-o-arrows-pointing-out', $iconSizeClasses)->toHtml(),
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.zoom-100') ?? 'heroicon-o-arrows-pointing-out', $iconSizeClasses)->toHtml(),
'alpineClickHandler' => 'editor.zoomTo(1)',
],
],
'move' => [
[
'label' => __('filament-forms::components.file_upload.editor.actions.move_left.label'),
'iconHtml' => svg('heroicon-o-arrow-left-circle', $iconSizeClasses)->toHtml(),
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.move-left') ?? 'heroicon-o-arrow-left-circle', $iconSizeClasses)->toHtml(),
'alpineClickHandler' => 'editor.move(-10, 0)',
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.move_right.label'),
'iconHtml' => svg('heroicon-o-arrow-right-circle', $iconSizeClasses)->toHtml(),
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.move-right') ?? 'heroicon-o-arrow-right-circle', $iconSizeClasses)->toHtml(),
'alpineClickHandler' => 'editor.move(10, 0)',
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.move_up.label'),
'iconHtml' => svg('heroicon-o-arrow-up-circle', $iconSizeClasses)->toHtml(),
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.move-up') ?? 'heroicon-o-arrow-up-circle', $iconSizeClasses)->toHtml(),
'alpineClickHandler' => 'editor.move(0, -10)',
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.move_down.label'),
'iconHtml' => svg('heroicon-o-arrow-down-circle', $iconSizeClasses)->toHtml(),
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.move-down') ?? 'heroicon-o-arrow-down-circle', $iconSizeClasses)->toHtml(),
'alpineClickHandler' => 'editor.move(0, 10)',
],
],
'transform' => [
[
'label' => __('filament-forms::components.file_upload.editor.actions.rotate_left.label'),
'iconHtml' => svg('heroicon-o-arrow-uturn-left', $iconSizeClasses)->toHtml(),
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.rotate-left') ?? 'heroicon-o-arrow-uturn-left', $iconSizeClasses)->toHtml(),
'alpineClickHandler' => 'editor.rotate(-90)',
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.rotate_right.label'),
'iconHtml' => svg('heroicon-o-arrow-uturn-right', $iconSizeClasses)->toHtml(),
'iconHtml' => svg(FilamentIcon::resolve('forms::components.file-upload.editor.actions.rotate-right') ?? 'heroicon-o-arrow-uturn-right', $iconSizeClasses)->toHtml(),
'alpineClickHandler' => 'editor.rotate(90)',
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.flip_horizontal.label'),
'iconHtml' => new HtmlString('<svg class="' . $iconSizeClasses . '" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m3 7l5 5l-5 5V7m18 0l-5 5l5 5V7m-9 13v2m0-8v2m0-8v2m0-8v2"/></svg>'),
'iconHtml' => ($icon = FilamentIcon::resolve('forms::components.file-upload.editor.actions.flip-horizontal')) ? svg($icon, $iconSizeClasses)->toHtml() : new HtmlString('<svg class="' . $iconSizeClasses . '" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m3 7l5 5l-5 5V7m18 0l-5 5l5 5V7m-9 13v2m0-8v2m0-8v2m0-8v2"/></svg>'),
'alpineClickHandler' => 'editor.scaleX(-editor.getData().scaleX || -1)',
],
[
'label' => __('filament-forms::components.file_upload.editor.actions.flip_vertical.label'),
'iconHtml' => new HtmlString('<svg class="' . $iconSizeClasses . '" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m17 3l-5 5l-5-5h10m0 18l-5-5l-5 5h10M4 12H2m8 0H8m8 0h-2m8 0h-2"/></svg>'),
'iconHtml' => ($icon = FilamentIcon::resolve('forms::components.file-upload.editor.actions.flip-vertical')) ? svg($icon, $iconSizeClasses)->toHtml() : new HtmlString('<svg class="' . $iconSizeClasses . '" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m17 3l-5 5l-5-5h10m0 18l-5-5l-5 5h10M4 12H2m8 0H8m8 0h-2m8 0h-2"/></svg>'),
'alpineClickHandler' => 'editor.scaleY(-editor.getData().scaleY || -1)',
],
],
+3 -2
View File
@@ -6,6 +6,7 @@ use Closure;
use Filament\Forms\Components\Actions\Action;
use Filament\Support\Concerns\HasExtraAlpineAttributes;
use Filament\Support\Enums\ActionSize;
use Filament\Support\Facades\FilamentIcon;
class KeyValue extends Field
{
@@ -100,7 +101,7 @@ class KeyValue extends Field
{
$action = Action::make($this->getDeleteActionName())
->label(__('filament-forms::components.key_value.actions.delete.label'))
->icon('heroicon-m-trash')
->icon(FilamentIcon::resolve('forms::components.key-value.actions.delete') ?? 'heroicon-m-trash')
->color('danger')
->livewireClickHandlerEnabled(false)
->iconButton()
@@ -132,7 +133,7 @@ class KeyValue extends Field
{
$action = Action::make($this->getReorderActionName())
->label(__('filament-forms::components.key_value.actions.reorder.label'))
->icon('heroicon-m-arrows-up-down')
->icon(FilamentIcon::resolve('forms::components.key-value.actions.reorder') ?? 'heroicon-m-arrows-up-down')
->color('gray')
->livewireClickHandlerEnabled(false)
->iconButton()
+8 -7
View File
@@ -7,6 +7,7 @@ use Filament\Forms\ComponentContainer;
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Contracts\HasForms;
use Filament\Support\Enums\ActionSize;
use Filament\Support\Facades\FilamentIcon;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
@@ -253,7 +254,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getCloneActionName())
->label(__('filament-forms::components.repeater.actions.clone.label'))
->icon('heroicon-m-square-2-stack')
->icon(FilamentIcon::resolve('forms::components.repeater.actions.clone') ?? 'heroicon-m-square-2-stack')
->color('gray')
->action(function (array $arguments, Repeater $component): void {
$newUuid = $component->generateUuid();
@@ -296,7 +297,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getDeleteActionName())
->label(__('filament-forms::components.repeater.actions.delete.label'))
->icon('heroicon-m-trash')
->icon(FilamentIcon::resolve('forms::components.repeater.actions.delete') ?? 'heroicon-m-trash')
->color('danger')
->action(function (array $arguments, Repeater $component): void {
$items = $component->getState();
@@ -335,7 +336,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getMoveDownActionName())
->label(__('filament-forms::components.repeater.actions.move_down.label'))
->icon('heroicon-m-arrow-down')
->icon(FilamentIcon::resolve('forms::components.repeater.actions.move-down') ?? 'heroicon-m-arrow-down')
->color('gray')
->action(function (array $arguments, Repeater $component): void {
$items = array_move_after($component->getState(), $arguments['item']);
@@ -373,7 +374,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getMoveUpActionName())
->label(__('filament-forms::components.repeater.actions.move_up.label'))
->icon('heroicon-m-arrow-up')
->icon(FilamentIcon::resolve('forms::components.repeater.actions.move-up') ?? 'heroicon-m-arrow-up')
->color('gray')
->action(function (array $arguments, Repeater $component): void {
$items = array_move_before($component->getState(), $arguments['item']);
@@ -411,7 +412,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getReorderActionName())
->label(__('filament-forms::components.repeater.actions.reorder.label'))
->icon('heroicon-m-arrows-up-down')
->icon(FilamentIcon::resolve('forms::components.repeater.actions.reorder') ?? 'heroicon-m-arrows-up-down')
->color('gray')
->action(function (array $arguments, Repeater $component): void {
$items = [
@@ -453,7 +454,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getCollapseActionName())
->label(__('filament-forms::components.repeater.actions.collapse.label'))
->icon('heroicon-m-chevron-up')
->icon(FilamentIcon::resolve('forms::components.repeater.actions.collapse') ?? 'heroicon-m-chevron-up')
->color('gray')
->livewireClickHandlerEnabled(false)
->iconButton()
@@ -484,7 +485,7 @@ class Repeater extends Field implements Contracts\CanConcealComponents
{
$action = Action::make($this->getExpandActionName())
->label(__('filament-forms::components.repeater.actions.expand.label'))
->icon('heroicon-m-chevron-down')
->icon(FilamentIcon::resolve('forms::components.repeater.actions.expand') ?? 'heroicon-m-chevron-down')
->color('gray')
->livewireClickHandlerEnabled(false)
->iconButton()
+3 -2
View File
@@ -8,6 +8,7 @@ use Filament\Forms\ComponentContainer;
use Filament\Forms\Components\Actions\Action;
use Filament\Forms\Form;
use Filament\Support\Concerns\HasExtraAlpineAttributes;
use Filament\Support\Facades\FilamentIcon;
use Filament\Support\Services\RelationshipJoiner;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Contracts\Support\Htmlable;
@@ -304,7 +305,7 @@ class Select extends Field implements Contracts\HasAffixActions, Contracts\HasNe
$action->halt();
})
->color('gray')
->icon('heroicon-m-plus')
->icon(FilamentIcon::resolve('forms::components.select.actions.create-option') ?? 'heroicon-m-plus')
->iconButton()
->modalHeading($this->getCreateOptionModalHeading() ?? __('filament-forms::components.select.actions.create_option.modal.heading'))
->modalSubmitActionLabel(__('filament-forms::components.select.actions.create_option.modal.actions.create.label'))
@@ -445,7 +446,7 @@ class Select extends Field implements Contracts\HasAffixActions, Contracts\HasNe
$livewire->dispatch('filament-forms::select.refreshSelectedOptionLabel', livewireId: $livewire->getId(), statePath: $statePath);
})
->color('gray')
->icon('heroicon-m-pencil-square')
->icon(FilamentIcon::resolve('forms::components.select.actions.edit-option') ?? 'heroicon-m-pencil-square')
->iconButton()
->modalHeading($this->getEditOptionModalHeading() ?? __('filament-forms::components.select.actions.edit_option.modal.heading'))
->modalSubmitActionLabel(__('filament-forms::components.select.actions.edit_option.modal.actions.save.label'));
+28 -1
View File
@@ -33,6 +33,33 @@ trait CanBeValidated
return $attributes;
}
/**
* @return array<string, string>
*/
public function getValidationMessages(): array
{
$messages = [];
foreach ($this->getComponents() as $component) {
if ($component instanceof Components\Contracts\HasValidationRules) {
$component->dehydrateValidationMessages($messages);
}
foreach ($component->getChildComponentContainers() as $container) {
if ($container->isHidden()) {
continue;
}
$messages = [
...$messages,
...$container->getValidationMessages(),
];
}
}
return $messages;
}
/**
* @return array<string, array<mixed>>
*/
@@ -75,6 +102,6 @@ trait CanBeValidated
return [];
}
return $this->getLivewire()->validate($rules, [], $this->getValidationAttributes());
return $this->getLivewire()->validate($rules, $this->getValidationMessages(), $this->getValidationAttributes());
}
}
@@ -246,6 +246,17 @@ TextEntry::make('email')
<AutoScreenshot name="infolists/entries/text/icon-after" alt="Text entry with icon after" version="3.x" />
The icon color defaults to the text color, but you may customize the icon color separately using `iconColor()`:
```php
use Filament\Infolists\Components\TextEntry;
TextEntry::make('email')
->icon('heroicon-m-envelope')
->iconColor('primary')
<AutoScreenshot name="infolists/entries/text/icon-color" alt="Text entry with icon in the primary color" version="3.x" />
## Customizing the text size
Text columns have small font size by default, but you may change this to `TextEntrySize::ExtraSmall`, `TextEntrySize::Medium`, or `TextEntrySize::Large`.
@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 'i :count més',
],
];
@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 'i :count još',
],
];
@@ -0,0 +1,9 @@
<?php
return [
'text_entry' => [
'more_list_items' => 'a ďalšich :count',
],
];
@@ -69,6 +69,7 @@
$copyMessageDuration = $getCopyMessageDuration($state);
$fontFamily = $getFontFamily($state);
$icon = $getIcon($state);
$iconColor = $getIconColor($state);
$itemIsCopyable = $isCopyable($state);
$size = $getSize($state);
$weight = $getWeight($state);
@@ -87,7 +88,7 @@
$iconClasses = \Illuminate\Support\Arr::toCssClasses([
'fi-in-text-item-icon h-5 w-5 shrink-0',
match ($color) {
match ($iconColor) {
'gray', null => 'text-gray-400 dark:text-gray-500',
default => 'text-custom-500',
},
@@ -95,9 +96,9 @@
$iconStyles = \Illuminate\Support\Arr::toCssStyles([
\Filament\Support\get_color_css_variables(
$color,
$iconColor,
shades: [500],
) => $color !== 'gray',
) => $iconColor !== 'gray',
]);
@endphp
@@ -79,4 +79,9 @@ class Action extends MountableAction
return $action->component($this->getInfolistComponent());
}
public function getInfolistName(): string
{
return 'mountedInfolistActionsInfolist';
}
}
@@ -0,0 +1,33 @@
<?php
namespace Filament\Infolists\Components\Concerns;
use Closure;
trait HasIconColor
{
/**
* @var string | array{50: string, 100: string, 200: string, 300: string, 400: string, 500: string, 600: string, 700: string, 800: string, 900: string, 950: string} | Closure | null
*/
protected string | array | Closure | null $iconColor = null;
/**
* @param string | array{50: string, 100: string, 200: string, 300: string, 400: string, 500: string, 600: string, 700: string, 800: string, 900: string, 950: string} | Closure | null $color
*/
public function iconColor(string | array | Closure | null $color): static
{
$this->iconColor = $color;
return $this;
}
/**
* @return string | array{50: string, 100: string, 200: string, 300: string, 400: string, 500: string, 600: string, 700: string, 800: string, 900: string, 950: string} | null
*/
public function getIconColor(mixed $state): string | array | null
{
return $this->evaluate($this->iconColor, [
'state' => $state,
]);
}
}
@@ -134,7 +134,7 @@ class ImageEntry extends Entry
public function getImageUrl(?string $state = null): ?string
{
if (filter_var($state, FILTER_VALIDATE_URL) !== false) {
if ((filter_var($state, FILTER_VALIDATE_URL) !== false) || str($state)->startsWith('data:')) {
return $state;
}
@@ -15,6 +15,7 @@ class TextEntry extends Entry implements HasAffixActions
use Concerns\HasColor;
use Concerns\HasFontFamily;
use Concerns\HasIcon;
use Concerns\HasIconColor;
use Concerns\HasWeight;
/**
File diff suppressed because one or more lines are too long
@@ -32,27 +32,7 @@ class Notification {
}
status(status) {
switch (status) {
case 'danger':
this.danger()
break
case 'info':
this.info()
break
case 'success':
this.success()
break
case 'warning':
this.warning()
break
}
this.status = status
return this
}
@@ -94,29 +74,25 @@ class Notification {
}
danger() {
this.icon('heroicon-o-x-circle')
this.iconColor('danger')
this.status('danger')
return this
}
info() {
this.icon('heroicon-o-information-circle')
this.iconColor('info')
this.status('info')
return this
}
success() {
this.icon('heroicon-o-check-circle')
this.iconColor('success')
this.status('success')
return this
}
warning() {
this.icon('heroicon-o-exclamation-circle')
this.iconColor('warning')
this.status('warning')
return this
}
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notificacions',
'actions' => [
'clear' => [
'label' => 'Netejar',
],
'mark_all_as_read' => [
'label' => 'Marcar tot com a llegit',
],
],
'empty' => [
'heading' => 'Sense notificacions',
'description' => 'Si us plau, torna a comprovar-ho més tard.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Obavijesti',
'actions' => [
'clear' => [
'label' => 'Očisti',
],
'mark_all_as_read' => [
'label' => 'Označi sve kao pročitano',
],
],
'empty' => [
'heading' => 'Nema obavijesti',
'description' => 'Molim provjerite ponovno kasnije.',
],
],
];
@@ -0,0 +1,28 @@
<?php
return [
'modal' => [
'heading' => 'Notifikácie',
'actions' => [
'clear' => [
'label' => 'Odstrániť',
],
'mark_all_as_read' => [
'label' => 'Označiť všetko ako prečítané',
],
],
'empty' => [
'heading' => 'Žiadne notifikácie',
'description' => 'Skúste to prosím neskôr.',
],
],
];
@@ -0,0 +1,24 @@
<?php
namespace Filament\Notifications\Concerns;
use Filament\Support\Concerns\HasIcon as BaseTrait;
use Filament\Support\Facades\FilamentIcon;
trait HasIcon
{
use BaseTrait {
getIcon as baseGetIcon;
}
public function getIcon(): ?string
{
return $this->baseGetIcon() ?? match ($this->getStatus()) {
'danger' => FilamentIcon::resolve('notifications::notification.danger') ?? 'heroicon-o-x-circle',
'info' => FilamentIcon::resolve('notifications::notification.info') ?? 'heroicon-o-information-circle',
'success' => FilamentIcon::resolve('notifications::notification.success') ?? 'heroicon-o-check-circle',
'warning' => FilamentIcon::resolve('notifications::notification.warning') ?? 'heroicon-o-exclamation-circle',
default => null,
};
}
}
@@ -0,0 +1,20 @@
<?php
namespace Filament\Notifications\Concerns;
use Filament\Support\Concerns\HasIconColor as BaseTrait;
trait HasIconColor
{
use BaseTrait {
getIconColor as baseGetIconColor;
}
/**
* @return string | array{50: string, 100: string, 200: string, 300: string, 400: string, 500: string, 600: string, 700: string, 800: string, 900: string, 950: string} | null
*/
public function getIconColor(): string | array | null
{
return $this->baseGetIconColor() ?? $this->getStatus();
}
}
@@ -0,0 +1,42 @@
<?php
namespace Filament\Notifications\Concerns;
use Closure;
trait HasStatus
{
protected string | Closure | null $status = null;
public function status(string | Closure | null $status): static
{
$this->status = $status;
return $this;
}
public function getStatus(): ?string
{
return $this->evaluate($this->status);
}
public function danger(): static
{
return $this->status('danger');
}
public function info(): static
{
return $this->status('info');
}
public function success(): static
{
return $this->status('success');
}
public function warning(): static
{
return $this->status('warning');
}
}
+6 -48
View File
@@ -8,8 +8,6 @@ use Filament\Notifications\Events\DatabaseNotificationsSent;
use Filament\Notifications\Livewire\Notifications;
use Filament\Support\Components\ViewComponent;
use Filament\Support\Concerns\HasColor;
use Filament\Support\Concerns\HasIcon;
use Filament\Support\Concerns\HasIconColor;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Contracts\Support\Arrayable;
use Illuminate\Database\Eloquent\Model;
@@ -27,11 +25,12 @@ class Notification extends ViewComponent implements Arrayable
use Concerns\HasBody;
use Concerns\HasDate;
use Concerns\HasDuration;
use Concerns\HasIcon;
use Concerns\HasIconColor;
use Concerns\HasId;
use Concerns\HasStatus;
use Concerns\HasTitle;
use HasColor;
use HasIcon;
use HasIconColor;
/**
* @var view-string
@@ -76,6 +75,7 @@ class Notification extends ViewComponent implements Arrayable
'duration' => $this->getDuration(),
'icon' => $this->getIcon(),
'iconColor' => $this->getIconColor(),
'status' => $this->getStatus(),
'title' => $this->getTitle(),
'view' => $this->getView(),
'viewData' => $this->getViewData(),
@@ -119,7 +119,8 @@ class Notification extends ViewComponent implements Arrayable
$static->body($data['body'] ?? null);
$static->color($data['color'] ?? null);
$static->duration($data['duration'] ?? $static->getDuration());
$static->icon($data['icon'] ?? null);
$static->status($data['status'] ?? $static->getStatus());
$static->icon($data['icon'] ?? $static->getIcon());
$static->iconColor($data['iconColor'] ?? $static->getIconColor());
$static->title($data['title'] ?? null);
@@ -224,49 +225,6 @@ class Notification extends ViewComponent implements Arrayable
return $data;
}
public function status(string $status): static
{
return match ($status) {
'danger' => $this->danger(),
'info' => $this->info(),
'success' => $this->success(),
'warning' => $this->warning(),
default => $this,
};
}
public function danger(): static
{
$this->icon('heroicon-o-x-circle');
$this->iconColor('danger');
return $this;
}
public function info(): static
{
$this->icon('heroicon-o-information-circle');
$this->iconColor('info');
return $this;
}
public function success(): static
{
$this->icon('heroicon-o-check-circle');
$this->iconColor('success');
return $this;
}
public function warning(): static
{
$this->icon('heroicon-o-exclamation-circle');
$this->iconColor('warning');
return $this;
}
public static function fromDatabase(DatabaseNotificationModel $notification): static
{
/** @phpstan-ignore-next-line */
@@ -313,7 +313,7 @@ use Filament\Tables\Actions\AttachAction;
use Illuminate\Database\Eloquent\Builder;
AttachAction::make()
->recordSelectOptionsQuery(fn (Builder $query) => $query->whereBelongsTo(auth()->user())
->recordSelectOptionsQuery(fn (Builder $query) => $query->whereBelongsTo(auth()->user()))
```
### Searching the options to attach across multiple columns
@@ -415,7 +415,7 @@ use Filament\Tables\Actions\AssociateAction;
use Illuminate\Database\Eloquent\Builder;
AssociateAction::make()
->recordSelectOptionsQuery(fn (Builder $query) => $query->whereBelongsTo(auth()->user())
->recordSelectOptionsQuery(fn (Builder $query) => $query->whereBelongsTo(auth()->user()))
```
### Searching the options to associate across multiple columns
+8
View File
@@ -645,6 +645,14 @@ public function panel(Panel $panel): Panel
Before, the URL structure was `/admin/1` for tenant 1. Now, it is `/admin/team/1`.
## Disabling tenancy for a resource
By default, all resources within a panel with tenancy will be scoped to the current tenant. If you have resources that are shared between tenants, you can disable tenancy for them by setting the `$isScopedToTenant` static property to `false` on the resource class:
```php
protected static bool $isScopedToTenant = false;
```
## Tenancy security
It's important to understand the security implications of multi-tenancy and how to properly implement it. If implemented partially or incorrectly, data belonging to one tenant may be exposed to another tenant. Filament provides a set of tools to help you implement multi-tenancy in your application, but it is up to you to understand how to use them. Filament does not provide any guarantees about the security of your application. It is your responsibility to ensure that your application is secure.
-10
View File
@@ -157,16 +157,6 @@ The command will create a CSS file and Tailwind Configuration file in the `/reso
Please reference the command to see the exact file names that you need to register, they may not be `admin/theme.css`.
## Non-sticky topbar
By default, the topbar sticks to the top of the page. You may make the topbar scroll out of view with the following CSS:
```css
.fi-topbar {
position: relative;
}
```
## Disabling dark mode
To disable dark mode switching, you can use the [configuration](configuration) file:
-3
View File
@@ -103,8 +103,6 @@ Use `assertHasFormErrors()` to ensure that data is properly validated in a form:
use function Pest\Livewire\livewire;
it('can validate input', function () {
$newData = Post::factory()->make();
livewire(PostResource\Pages\CreatePost::class)
->fillForm([
'title' => null,
@@ -190,7 +188,6 @@ use function Pest\Livewire\livewire;
it('can validate input', function () {
$post = Post::factory()->create();
$newData = Post::factory()->make();
livewire(PostResource\Pages\EditPost::class, [
'record' => $post->getRouteKey(),

Some files were not shown because too many files have changed in this diff Show More