@next-bricks/form 1.12.2 → 1.13.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/bricks.json +1 -1
- package/dist/chunks/{1269.1a046297.js → 1269.ed712797.js} +2 -2
- package/dist/chunks/{1269.1a046297.js.map → 1269.ed712797.js.map} +1 -1
- package/dist/chunks/4837.f5538448.js +2 -0
- package/dist/chunks/{7218.764309e9.js.map → 4837.f5538448.js.map} +1 -1
- package/dist/chunks/7218.22824b22.js +2 -0
- package/dist/chunks/{4837.efb19b28.js.map → 7218.22824b22.js.map} +1 -1
- package/dist/chunks/{799.63685513.js → 799.0d02d664.js} +3 -3
- package/dist/chunks/799.0d02d664.js.map +1 -0
- package/dist/chunks/9259.d31069e0.js +3 -0
- package/dist/chunks/9259.d31069e0.js.map +1 -0
- package/dist/chunks/eo-color-picker.aec3b352.js +2 -0
- package/dist/chunks/{eo-color-picker.b7380f86.js.map → eo-color-picker.aec3b352.js.map} +1 -1
- package/dist/chunks/eo-date-picker.a068145a.js +2 -0
- package/dist/chunks/{eo-date-picker.647287ef.js.map → eo-date-picker.a068145a.js.map} +1 -1
- package/dist/chunks/eo-dynamic-form-item.87fc1816.js +3 -0
- package/dist/chunks/{eo-dynamic-form-item.206eba1d.js.map → eo-dynamic-form-item.87fc1816.js.map} +1 -1
- package/dist/chunks/eo-form-item.92f16bc1.js +3 -0
- package/dist/chunks/eo-form-item.92f16bc1.js.map +1 -0
- package/dist/chunks/eo-form.e2369d33.js +2 -0
- package/dist/chunks/eo-form.e2369d33.js.map +1 -0
- package/dist/chunks/eo-radio.3dfef4db.js +3 -0
- package/dist/chunks/{eo-radio.07cb2c75.js.map → eo-radio.3dfef4db.js.map} +1 -1
- package/dist/chunks/eo-select.aee01e15.js +3 -0
- package/dist/chunks/{eo-select.661359c0.js.map → eo-select.aee01e15.js.map} +1 -1
- package/dist/chunks/eo-time-picker.47e85deb.js +2 -0
- package/dist/chunks/{eo-time-picker.3f81cca0.js.map → eo-time-picker.47e85deb.js.map} +1 -1
- package/dist/chunks/eo-time-range-picker.c5728b35.js +2 -0
- package/dist/chunks/{eo-time-range-picker.b496eab5.js.map → eo-time-range-picker.c5728b35.js.map} +1 -1
- package/dist/chunks/eo-upload-file.80033217.js +3 -0
- package/dist/chunks/{eo-upload-file.01fc165a.js.map → eo-upload-file.80033217.js.map} +1 -1
- package/dist/chunks/eo-upload-image.f406cc57.js +3 -0
- package/dist/chunks/{eo-upload-image.256b5177.js.map → eo-upload-image.f406cc57.js.map} +1 -1
- package/dist/chunks/main.c6215620.js +2 -0
- package/dist/chunks/{main.5e26d64a.js.map → main.c6215620.js.map} +1 -1
- package/dist/index.207c3f7a.js +2 -0
- package/dist/index.207c3f7a.js.map +1 -0
- package/dist/manifest.json +5 -0
- package/dist/types.json +23 -0
- package/dist-types/form/index.d.ts +1 -0
- package/package.json +2 -2
- package/dist/chunks/4837.efb19b28.js +0 -2
- package/dist/chunks/7218.764309e9.js +0 -2
- package/dist/chunks/799.63685513.js.map +0 -1
- package/dist/chunks/9259.23d60a51.js +0 -3
- package/dist/chunks/9259.23d60a51.js.map +0 -1
- package/dist/chunks/eo-color-picker.b7380f86.js +0 -2
- package/dist/chunks/eo-date-picker.647287ef.js +0 -2
- package/dist/chunks/eo-dynamic-form-item.206eba1d.js +0 -3
- package/dist/chunks/eo-form-item.5c41fa37.js +0 -3
- package/dist/chunks/eo-form-item.5c41fa37.js.map +0 -1
- package/dist/chunks/eo-form.ffd7110b.js +0 -2
- package/dist/chunks/eo-form.ffd7110b.js.map +0 -1
- package/dist/chunks/eo-radio.07cb2c75.js +0 -3
- package/dist/chunks/eo-select.661359c0.js +0 -3
- package/dist/chunks/eo-time-picker.3f81cca0.js +0 -2
- package/dist/chunks/eo-time-range-picker.b496eab5.js +0 -2
- package/dist/chunks/eo-upload-file.01fc165a.js +0 -3
- package/dist/chunks/eo-upload-image.256b5177.js +0 -3
- package/dist/chunks/main.5e26d64a.js +0 -2
- package/dist/index.5c2a3203.js +0 -2
- package/dist/index.5c2a3203.js.map +0 -1
- /package/dist/chunks/{799.63685513.js.LICENSE.txt → 799.0d02d664.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9259.23d60a51.js.LICENSE.txt → 9259.d31069e0.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-dynamic-form-item.206eba1d.js.LICENSE.txt → eo-dynamic-form-item.87fc1816.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-form-item.5c41fa37.js.LICENSE.txt → eo-form-item.92f16bc1.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-radio.07cb2c75.js.LICENSE.txt → eo-radio.3dfef4db.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-select.661359c0.js.LICENSE.txt → eo-select.aee01e15.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-upload-file.01fc165a.js.LICENSE.txt → eo-upload-file.80033217.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-upload-image.256b5177.js.LICENSE.txt → eo-upload-image.f406cc57.js.LICENSE.txt} +0 -0
package/dist/bricks.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[1269],{1173:(l,m,o)=>{function t(l,m){let o="";return l&&"horizontal"===m?(l.span&&(o+=`form-item-col-${l.span} `),l.offset&&(o+=`form-item-col-offset-${l.offset} `),["sm","md","lg","xl","xxl"].forEach((m=>{const t=l[m];t&&(["number","string"].includes(typeof t)?o+=`form-item-col-${m}-${t} `:(t.span&&(o+=`form-item-col-${m}-${t.span} `),t.offset&&(o+=`form-item-col-${m}-offset-${t.offset} `)))})),o):o}function e(l,m){let o,t;"number"==typeof m||"string"==typeof m?(o=m,t=0):(o=m.span,t=+(m.offset??0));let e=("number"==typeof l||"string"==typeof l?+l:+(l.span??0)+ +(l.offset??0))+t;return+o+e>24&&(e=t),{span:o,offset:e}}function f(l,m){return void 0!==m.span?e(l,m):Object.fromEntries(Object.entries(m).map((m=>{let[o,t]=m;return[o,e(l[o],t)]})))}o.d(m,{ht:()=>t,uj:()=>f})},1248:(l,m,o)=>{o.d(m,{A:()=>r});var t=o(6758),e=o.n(t),f=o(935),i=o.n(f)()(e());i.push([l.id,'.form-item-col-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-offset-24{margin-left:100%}.form-item-col-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-offset-23{margin-left:95.83333333%}.form-item-col-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-offset-22{margin-left:91.66666667%}.form-item-col-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-offset-21{margin-left:87.5%}.form-item-col-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-offset-20{margin-left:83.33333333%}.form-item-col-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-offset-19{margin-left:79.16666667%}.form-item-col-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-offset-18{margin-left:75%}.form-item-col-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-offset-17{margin-left:70.83333333%}.form-item-col-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-offset-16{margin-left:66.66666667%}.form-item-col-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-offset-15{margin-left:62.5%}.form-item-col-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-offset-14{margin-left:58.33333333%}.form-item-col-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-offset-13{margin-left:54.16666667%}.form-item-col-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-offset-12{margin-left:50%}.form-item-col-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-offset-11{margin-left:45.83333333%}.form-item-col-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-offset-10{margin-left:41.66666667%}.form-item-col-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-offset-9{margin-left:37.5%}.form-item-col-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-offset-8{margin-left:33.33333333%}.form-item-col-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-offset-7{margin-left:29.16666667%}.form-item-col-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-offset-6{margin-left:25%}.form-item-col-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-offset-5{margin-left:20.83333333%}.form-item-col-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-offset-4{margin-left:16.66666667%}.form-item-col-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-offset-3{margin-left:12.5%}.form-item-col-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-offset-2{margin-left:8.33333333%}.form-item-col-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-offset-1{margin-left:4.16666667%}@media (min-width: 576px){.form-item-col-sm-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-sm-offset-24{margin-left:100%}.form-item-col-sm-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-sm-offset-23{margin-left:95.83333333%}.form-item-col-sm-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-sm-offset-22{margin-left:91.66666667%}.form-item-col-sm-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-sm-offset-21{margin-left:87.5%}.form-item-col-sm-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-sm-offset-20{margin-left:83.33333333%}.form-item-col-sm-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-sm-offset-19{margin-left:79.16666667%}.form-item-col-sm-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-sm-offset-18{margin-left:75%}.form-item-col-sm-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-sm-offset-17{margin-left:70.83333333%}.form-item-col-sm-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-sm-offset-16{margin-left:66.66666667%}.form-item-col-sm-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-sm-offset-15{margin-left:62.5%}.form-item-col-sm-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-sm-offset-14{margin-left:58.33333333%}.form-item-col-sm-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-sm-offset-13{margin-left:54.16666667%}.form-item-col-sm-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-sm-offset-12{margin-left:50%}.form-item-col-sm-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-sm-offset-11{margin-left:45.83333333%}.form-item-col-sm-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-sm-offset-10{margin-left:41.66666667%}.form-item-col-sm-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-sm-offset-9{margin-left:37.5%}.form-item-col-sm-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-sm-offset-8{margin-left:33.33333333%}.form-item-col-sm-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-sm-offset-7{margin-left:29.16666667%}.form-item-col-sm-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-sm-offset-6{margin-left:25%}.form-item-col-sm-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-sm-offset-5{margin-left:20.83333333%}.form-item-col-sm-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-sm-offset-4{margin-left:16.66666667%}.form-item-col-sm-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-sm-offset-3{margin-left:12.5%}.form-item-col-sm-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-sm-offset-2{margin-left:8.33333333%}.form-item-col-sm-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-sm-offset-1{margin-left:4.16666667%}}@media (min-width: 768px){.form-item-col-md-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-md-offset-24{margin-left:100%}.form-item-col-md-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-md-offset-23{margin-left:95.83333333%}.form-item-col-md-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-md-offset-22{margin-left:91.66666667%}.form-item-col-md-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-md-offset-21{margin-left:87.5%}.form-item-col-md-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-md-offset-20{margin-left:83.33333333%}.form-item-col-md-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-md-offset-19{margin-left:79.16666667%}.form-item-col-md-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-md-offset-18{margin-left:75%}.form-item-col-md-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-md-offset-17{margin-left:70.83333333%}.form-item-col-md-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-md-offset-16{margin-left:66.66666667%}.form-item-col-md-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-md-offset-15{margin-left:62.5%}.form-item-col-md-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-md-offset-14{margin-left:58.33333333%}.form-item-col-md-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-md-offset-13{margin-left:54.16666667%}.form-item-col-md-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-md-offset-12{margin-left:50%}.form-item-col-md-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-md-offset-11{margin-left:45.83333333%}.form-item-col-md-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-md-offset-10{margin-left:41.66666667%}.form-item-col-md-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-md-offset-9{margin-left:37.5%}.form-item-col-md-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-md-offset-8{margin-left:33.33333333%}.form-item-col-md-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-md-offset-7{margin-left:29.16666667%}.form-item-col-md-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-md-offset-6{margin-left:25%}.form-item-col-md-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-md-offset-5{margin-left:20.83333333%}.form-item-col-md-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-md-offset-4{margin-left:16.66666667%}.form-item-col-md-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-md-offset-3{margin-left:12.5%}.form-item-col-md-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-md-offset-2{margin-left:8.33333333%}.form-item-col-md-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-md-offset-1{margin-left:4.16666667%}}@media (min-width: 992px){.form-item-col-lg-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-lg-offset-24{margin-left:100%}.form-item-col-lg-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-lg-offset-23{margin-left:95.83333333%}.form-item-col-lg-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-lg-offset-22{margin-left:91.66666667%}.form-item-col-lg-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-lg-offset-21{margin-left:87.5%}.form-item-col-lg-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-lg-offset-20{margin-left:83.33333333%}.form-item-col-lg-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-lg-offset-19{margin-left:79.16666667%}.form-item-col-lg-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-lg-offset-18{margin-left:75%}.form-item-col-lg-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-lg-offset-17{margin-left:70.83333333%}.form-item-col-lg-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-lg-offset-16{margin-left:66.66666667%}.form-item-col-lg-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-lg-offset-15{margin-left:62.5%}.form-item-col-lg-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-lg-offset-14{margin-left:58.33333333%}.form-item-col-lg-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-lg-offset-13{margin-left:54.16666667%}.form-item-col-lg-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-lg-offset-12{margin-left:50%}.form-item-col-lg-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-lg-offset-11{margin-left:45.83333333%}.form-item-col-lg-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-lg-offset-10{margin-left:41.66666667%}.form-item-col-lg-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-lg-offset-9{margin-left:37.5%}.form-item-col-lg-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-lg-offset-8{margin-left:33.33333333%}.form-item-col-lg-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-lg-offset-7{margin-left:29.16666667%}.form-item-col-lg-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-lg-offset-6{margin-left:25%}.form-item-col-lg-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-lg-offset-5{margin-left:20.83333333%}.form-item-col-lg-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-lg-offset-4{margin-left:16.66666667%}.form-item-col-lg-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-lg-offset-3{margin-left:12.5%}.form-item-col-lg-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-lg-offset-2{margin-left:8.33333333%}.form-item-col-lg-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-lg-offset-1{margin-left:4.16666667%}}@media (min-width: 1200px){.form-item-col-xl-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-xl-offset-24{margin-left:100%}.form-item-col-xl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-xl-offset-23{margin-left:95.83333333%}.form-item-col-xl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-xl-offset-22{margin-left:91.66666667%}.form-item-col-xl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-xl-offset-21{margin-left:87.5%}.form-item-col-xl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-xl-offset-20{margin-left:83.33333333%}.form-item-col-xl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-xl-offset-19{margin-left:79.16666667%}.form-item-col-xl-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-xl-offset-18{margin-left:75%}.form-item-col-xl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-xl-offset-17{margin-left:70.83333333%}.form-item-col-xl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-xl-offset-16{margin-left:66.66666667%}.form-item-col-xl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-xl-offset-15{margin-left:62.5%}.form-item-col-xl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-xl-offset-14{margin-left:58.33333333%}.form-item-col-xl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-xl-offset-13{margin-left:54.16666667%}.form-item-col-xl-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-xl-offset-12{margin-left:50%}.form-item-col-xl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-xl-offset-11{margin-left:45.83333333%}.form-item-col-xl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-xl-offset-10{margin-left:41.66666667%}.form-item-col-xl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-xl-offset-9{margin-left:37.5%}.form-item-col-xl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-xl-offset-8{margin-left:33.33333333%}.form-item-col-xl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-xl-offset-7{margin-left:29.16666667%}.form-item-col-xl-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-xl-offset-6{margin-left:25%}.form-item-col-xl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-xl-offset-5{margin-left:20.83333333%}.form-item-col-xl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-xl-offset-4{margin-left:16.66666667%}.form-item-col-xl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-xl-offset-3{margin-left:12.5%}.form-item-col-xl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-xl-offset-2{margin-left:8.33333333%}.form-item-col-xl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-xl-offset-1{margin-left:4.16666667%}}@media (min-width: 1600px){.form-item-col-xxl-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-xxl-offset-24{margin-left:100%}.form-item-col-xxl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-xxl-offset-23{margin-left:95.83333333%}.form-item-col-xxl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-xxl-offset-22{margin-left:91.66666667%}.form-item-col-xxl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-xxl-offset-21{margin-left:87.5%}.form-item-col-xxl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-xxl-offset-20{margin-left:83.33333333%}.form-item-col-xxl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-xxl-offset-19{margin-left:79.16666667%}.form-item-col-xxl-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-xxl-offset-18{margin-left:75%}.form-item-col-xxl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-xxl-offset-17{margin-left:70.83333333%}.form-item-col-xxl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-xxl-offset-16{margin-left:66.66666667%}.form-item-col-xxl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-xxl-offset-15{margin-left:62.5%}.form-item-col-xxl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-xxl-offset-14{margin-left:58.33333333%}.form-item-col-xxl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-xxl-offset-13{margin-left:54.16666667%}.form-item-col-xxl-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-xxl-offset-12{margin-left:50%}.form-item-col-xxl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-xxl-offset-11{margin-left:45.83333333%}.form-item-col-xxl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-xxl-offset-10{margin-left:41.66666667%}.form-item-col-xxl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-xxl-offset-9{margin-left:37.5%}.form-item-col-xxl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-xxl-offset-8{margin-left:33.33333333%}.form-item-col-xxl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-xxl-offset-7{margin-left:29.16666667%}.form-item-col-xxl-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-xxl-offset-6{margin-left:25%}.form-item-col-xxl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-xxl-offset-5{margin-left:20.83333333%}.form-item-col-xxl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-xxl-offset-4{margin-left:16.66666667%}.form-item-col-xxl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-xxl-offset-3{margin-left:12.5%}.form-item-col-xxl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-xxl-offset-2{margin-left:8.33333333%}.form-item-col-xxl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-xxl-offset-1{margin-left:4.16666667%}}@media (max-width: 767px){.form-item.horizontal .form-item-label-wrapper,\n .form-item.horizontal .form-item-wrapper{flex:0 0 100%;max-width:100%;text-align:left}.form-item.horizontal .form-item-col-sm-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-sm-24 .form-item-label label::after{content:""}}@media (max-width: 991px){.form-item.horizontal .form-item-col-md-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-md-24 .form-item-label label::after{content:""}}@media (max-width: 1199px){.form-item.horizontal .form-item-col-lg-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-lg-24 .form-item-label label::after{content:""}}@media (max-width: 1599px){.form-item.horizontal .form-item-col-xl-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-xl-24 .form-item-label label::after{content:""}}.form-item{display:flex;box-sizing:border-box;color:var(--antd-text-color);font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";vertical-align:top}.form-item .form-item-label{display:flex;align-items:center}.form-item.vertical{flex-direction:column}.form-item.vertical > .form-item-label-wrapper{text-align:left;line-height:20px;margin-bottom:8px}.form-item:not(.vertical) .form-item-label > label::after{content:":";position:relative;top:-0.5px;margin:0 0 0 2px}.form-item.horizontal{flex-flow:row wrap}.required{color:#ff4d4f;margin-right:4px}.form-item-label-wrapper{box-sizing:border-box;display:inline-block;white-space:nowrap;line-height:30px;text-align:right;vertical-align:middle;flex-grow:0;padding-right:8px}.form-item-label > label{margin-right:6px}.form-item-wrapper{flex:1 1 0;line-height:30px}.form-item-control{display:flex;gap:4px}.form-item-control slot{display:block;width:100%}.align-right{flex-direction:row}.align-bottom{flex-direction:column}.message{min-height:22px}.message.error{clear:both;min-height:23px;margin-top:-2px;color:var(--antd-error-color);font-size:14px;line-height:1.5715;transition:color 0.3s cubic-bezier(0.215,0.61,0.355,1)}',""]);const r=i.toString()},426:(l,m,o)=>{o.d(m,{N:()=>B});var t,e=o(4635),f=o(918),i=o(5536),r=o(9492),a=o(6121),c=o(829),x=o(2740),s=o(4782),d=o(1389);let n,g,h,p,b,w,k,y,u;const{method:A,property:z}=(0,s.createDecorators)();var v=new WeakMap,$=new WeakSet,_=new WeakMap,C=new WeakMap,E=new WeakMap,W=new WeakMap,M=new WeakMap,R=new WeakMap;class B extends d.ReactNextElement{constructor(){super(...arguments),(0,e.A)(this,$),(0,f.A)(this,v,(n(this),!1)),(0,f.A)(this,_,"normal"),(0,f.A)(this,C,!1),(0,f.A)(this,E,g(this)),(0,f.A)(this,W,(h(this),p(this))),(0,f.A)(this,M,(b(this),w(this))),(0,f.A)(this,R,(k(this),y(this))),u(this)}get isFormItemElement(){return!0}set validateState(l){(0,r.A)($,j,this,l),this._render()}get validateState(){return(0,i.A)($,this,S)}set notRender(l){this.hidden=l,(0,r.A)($,N,this,l),this._render()}get notRender(){return(0,i.A)($,this,F)}get $bindFormItem(){return(0,i.A)($,this,I)}set $bindFormItem(l){(0,r.A)($,O,this,l),this._render()}get helpBrick(){return(0,c.A)(E,this)}set helpBrick(l){(0,a.A)(E,this,l)}get labelBrick(){return(0,c.A)(W,this)}set labelBrick(l){(0,a.A)(W,this,l)}get labelCol(){return(0,c.A)(M,this)}set labelCol(l){(0,a.A)(M,this,l)}get wrapperCol(){return(0,c.A)(R,this)}set wrapperCol(l){(0,a.A)(R,this,l)}setNotRender(l){this.notRender=l}getFormElement(){let l=this;for(;(l=l.parentNode)&&l&&!l.isFormElement;);return l}}function F(l){return(0,c.A)(v,l)}function N(l,m){(0,a.A)(v,l,m)}function S(l){return(0,c.A)(_,l)}function j(l,m){(0,a.A)(_,l,m)}function I(l){return(0,c.A)(C,l)}function O(l,m){(0,a.A)(C,l,m)}t=B,[g,h,p,b,w,k,y,u,n]=(0,x.A)(t,[],[[z({attribute:!1}),1,"helpBrick"],[z({attribute:!1}),1,"labelBrick"],[z({attribute:!1}),1,"labelCol"],[z({attribute:!1}),1,"wrapperCol"],[A(),2,"setNotRender"],[A(),2,"getFormElement"]],0,void 0,d.ReactNextElement).e}}]);
|
|
2
|
-
//# sourceMappingURL=1269.
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[1269],{1173:(l,m,o)=>{function t(l,m){let o="";return l&&"horizontal"===m?(l.span&&(o+=`form-item-col-${l.span} `),l.offset&&(o+=`form-item-col-offset-${l.offset} `),["sm","md","lg","xl","xxl"].forEach((m=>{const t=l[m];t&&(["number","string"].includes(typeof t)?o+=`form-item-col-${m}-${t} `:(t.span&&(o+=`form-item-col-${m}-${t.span} `),t.offset&&(o+=`form-item-col-${m}-offset-${t.offset} `)))})),o):o}function e(l,m){let o,t;"number"==typeof m||"string"==typeof m?(o=m,t=0):(o=m.span,t=+(m.offset??0));let e=("number"==typeof l||"string"==typeof l?+l:+(l.span??0)+ +(l.offset??0))+t;return+o+e>24&&(e=t),{span:o,offset:e}}function f(l,m){return void 0!==m.span?e(l,m):Object.fromEntries(Object.entries(m).map((m=>{let[o,t]=m;return[o,e(l[o],t)]})))}o.d(m,{ht:()=>t,uj:()=>f})},1248:(l,m,o)=>{o.d(m,{A:()=>r});var t=o(6758),e=o.n(t),f=o(935),i=o.n(f)()(e());i.push([l.id,'.form-item-col-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-offset-24{margin-left:100%}.form-item-col-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-offset-23{margin-left:95.83333333%}.form-item-col-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-offset-22{margin-left:91.66666667%}.form-item-col-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-offset-21{margin-left:87.5%}.form-item-col-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-offset-20{margin-left:83.33333333%}.form-item-col-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-offset-19{margin-left:79.16666667%}.form-item-col-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-offset-18{margin-left:75%}.form-item-col-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-offset-17{margin-left:70.83333333%}.form-item-col-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-offset-16{margin-left:66.66666667%}.form-item-col-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-offset-15{margin-left:62.5%}.form-item-col-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-offset-14{margin-left:58.33333333%}.form-item-col-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-offset-13{margin-left:54.16666667%}.form-item-col-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-offset-12{margin-left:50%}.form-item-col-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-offset-11{margin-left:45.83333333%}.form-item-col-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-offset-10{margin-left:41.66666667%}.form-item-col-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-offset-9{margin-left:37.5%}.form-item-col-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-offset-8{margin-left:33.33333333%}.form-item-col-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-offset-7{margin-left:29.16666667%}.form-item-col-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-offset-6{margin-left:25%}.form-item-col-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-offset-5{margin-left:20.83333333%}.form-item-col-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-offset-4{margin-left:16.66666667%}.form-item-col-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-offset-3{margin-left:12.5%}.form-item-col-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-offset-2{margin-left:8.33333333%}.form-item-col-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-offset-1{margin-left:4.16666667%}@media (min-width: 576px){.form-item-col-sm-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-sm-offset-24{margin-left:100%}.form-item-col-sm-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-sm-offset-23{margin-left:95.83333333%}.form-item-col-sm-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-sm-offset-22{margin-left:91.66666667%}.form-item-col-sm-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-sm-offset-21{margin-left:87.5%}.form-item-col-sm-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-sm-offset-20{margin-left:83.33333333%}.form-item-col-sm-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-sm-offset-19{margin-left:79.16666667%}.form-item-col-sm-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-sm-offset-18{margin-left:75%}.form-item-col-sm-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-sm-offset-17{margin-left:70.83333333%}.form-item-col-sm-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-sm-offset-16{margin-left:66.66666667%}.form-item-col-sm-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-sm-offset-15{margin-left:62.5%}.form-item-col-sm-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-sm-offset-14{margin-left:58.33333333%}.form-item-col-sm-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-sm-offset-13{margin-left:54.16666667%}.form-item-col-sm-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-sm-offset-12{margin-left:50%}.form-item-col-sm-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-sm-offset-11{margin-left:45.83333333%}.form-item-col-sm-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-sm-offset-10{margin-left:41.66666667%}.form-item-col-sm-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-sm-offset-9{margin-left:37.5%}.form-item-col-sm-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-sm-offset-8{margin-left:33.33333333%}.form-item-col-sm-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-sm-offset-7{margin-left:29.16666667%}.form-item-col-sm-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-sm-offset-6{margin-left:25%}.form-item-col-sm-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-sm-offset-5{margin-left:20.83333333%}.form-item-col-sm-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-sm-offset-4{margin-left:16.66666667%}.form-item-col-sm-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-sm-offset-3{margin-left:12.5%}.form-item-col-sm-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-sm-offset-2{margin-left:8.33333333%}.form-item-col-sm-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-sm-offset-1{margin-left:4.16666667%}}@media (min-width: 768px){.form-item-col-md-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-md-offset-24{margin-left:100%}.form-item-col-md-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-md-offset-23{margin-left:95.83333333%}.form-item-col-md-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-md-offset-22{margin-left:91.66666667%}.form-item-col-md-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-md-offset-21{margin-left:87.5%}.form-item-col-md-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-md-offset-20{margin-left:83.33333333%}.form-item-col-md-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-md-offset-19{margin-left:79.16666667%}.form-item-col-md-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-md-offset-18{margin-left:75%}.form-item-col-md-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-md-offset-17{margin-left:70.83333333%}.form-item-col-md-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-md-offset-16{margin-left:66.66666667%}.form-item-col-md-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-md-offset-15{margin-left:62.5%}.form-item-col-md-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-md-offset-14{margin-left:58.33333333%}.form-item-col-md-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-md-offset-13{margin-left:54.16666667%}.form-item-col-md-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-md-offset-12{margin-left:50%}.form-item-col-md-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-md-offset-11{margin-left:45.83333333%}.form-item-col-md-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-md-offset-10{margin-left:41.66666667%}.form-item-col-md-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-md-offset-9{margin-left:37.5%}.form-item-col-md-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-md-offset-8{margin-left:33.33333333%}.form-item-col-md-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-md-offset-7{margin-left:29.16666667%}.form-item-col-md-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-md-offset-6{margin-left:25%}.form-item-col-md-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-md-offset-5{margin-left:20.83333333%}.form-item-col-md-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-md-offset-4{margin-left:16.66666667%}.form-item-col-md-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-md-offset-3{margin-left:12.5%}.form-item-col-md-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-md-offset-2{margin-left:8.33333333%}.form-item-col-md-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-md-offset-1{margin-left:4.16666667%}}@media (min-width: 992px){.form-item-col-lg-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-lg-offset-24{margin-left:100%}.form-item-col-lg-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-lg-offset-23{margin-left:95.83333333%}.form-item-col-lg-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-lg-offset-22{margin-left:91.66666667%}.form-item-col-lg-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-lg-offset-21{margin-left:87.5%}.form-item-col-lg-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-lg-offset-20{margin-left:83.33333333%}.form-item-col-lg-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-lg-offset-19{margin-left:79.16666667%}.form-item-col-lg-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-lg-offset-18{margin-left:75%}.form-item-col-lg-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-lg-offset-17{margin-left:70.83333333%}.form-item-col-lg-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-lg-offset-16{margin-left:66.66666667%}.form-item-col-lg-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-lg-offset-15{margin-left:62.5%}.form-item-col-lg-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-lg-offset-14{margin-left:58.33333333%}.form-item-col-lg-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-lg-offset-13{margin-left:54.16666667%}.form-item-col-lg-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-lg-offset-12{margin-left:50%}.form-item-col-lg-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-lg-offset-11{margin-left:45.83333333%}.form-item-col-lg-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-lg-offset-10{margin-left:41.66666667%}.form-item-col-lg-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-lg-offset-9{margin-left:37.5%}.form-item-col-lg-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-lg-offset-8{margin-left:33.33333333%}.form-item-col-lg-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-lg-offset-7{margin-left:29.16666667%}.form-item-col-lg-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-lg-offset-6{margin-left:25%}.form-item-col-lg-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-lg-offset-5{margin-left:20.83333333%}.form-item-col-lg-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-lg-offset-4{margin-left:16.66666667%}.form-item-col-lg-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-lg-offset-3{margin-left:12.5%}.form-item-col-lg-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-lg-offset-2{margin-left:8.33333333%}.form-item-col-lg-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-lg-offset-1{margin-left:4.16666667%}}@media (min-width: 1200px){.form-item-col-xl-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-xl-offset-24{margin-left:100%}.form-item-col-xl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-xl-offset-23{margin-left:95.83333333%}.form-item-col-xl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-xl-offset-22{margin-left:91.66666667%}.form-item-col-xl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-xl-offset-21{margin-left:87.5%}.form-item-col-xl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-xl-offset-20{margin-left:83.33333333%}.form-item-col-xl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-xl-offset-19{margin-left:79.16666667%}.form-item-col-xl-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-xl-offset-18{margin-left:75%}.form-item-col-xl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-xl-offset-17{margin-left:70.83333333%}.form-item-col-xl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-xl-offset-16{margin-left:66.66666667%}.form-item-col-xl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-xl-offset-15{margin-left:62.5%}.form-item-col-xl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-xl-offset-14{margin-left:58.33333333%}.form-item-col-xl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-xl-offset-13{margin-left:54.16666667%}.form-item-col-xl-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-xl-offset-12{margin-left:50%}.form-item-col-xl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-xl-offset-11{margin-left:45.83333333%}.form-item-col-xl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-xl-offset-10{margin-left:41.66666667%}.form-item-col-xl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-xl-offset-9{margin-left:37.5%}.form-item-col-xl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-xl-offset-8{margin-left:33.33333333%}.form-item-col-xl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-xl-offset-7{margin-left:29.16666667%}.form-item-col-xl-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-xl-offset-6{margin-left:25%}.form-item-col-xl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-xl-offset-5{margin-left:20.83333333%}.form-item-col-xl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-xl-offset-4{margin-left:16.66666667%}.form-item-col-xl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-xl-offset-3{margin-left:12.5%}.form-item-col-xl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-xl-offset-2{margin-left:8.33333333%}.form-item-col-xl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-xl-offset-1{margin-left:4.16666667%}}@media (min-width: 1600px){.form-item-col-xxl-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-xxl-offset-24{margin-left:100%}.form-item-col-xxl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-xxl-offset-23{margin-left:95.83333333%}.form-item-col-xxl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-xxl-offset-22{margin-left:91.66666667%}.form-item-col-xxl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-xxl-offset-21{margin-left:87.5%}.form-item-col-xxl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-xxl-offset-20{margin-left:83.33333333%}.form-item-col-xxl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-xxl-offset-19{margin-left:79.16666667%}.form-item-col-xxl-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-xxl-offset-18{margin-left:75%}.form-item-col-xxl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-xxl-offset-17{margin-left:70.83333333%}.form-item-col-xxl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-xxl-offset-16{margin-left:66.66666667%}.form-item-col-xxl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-xxl-offset-15{margin-left:62.5%}.form-item-col-xxl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-xxl-offset-14{margin-left:58.33333333%}.form-item-col-xxl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-xxl-offset-13{margin-left:54.16666667%}.form-item-col-xxl-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-xxl-offset-12{margin-left:50%}.form-item-col-xxl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-xxl-offset-11{margin-left:45.83333333%}.form-item-col-xxl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-xxl-offset-10{margin-left:41.66666667%}.form-item-col-xxl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-xxl-offset-9{margin-left:37.5%}.form-item-col-xxl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-xxl-offset-8{margin-left:33.33333333%}.form-item-col-xxl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-xxl-offset-7{margin-left:29.16666667%}.form-item-col-xxl-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-xxl-offset-6{margin-left:25%}.form-item-col-xxl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-xxl-offset-5{margin-left:20.83333333%}.form-item-col-xxl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-xxl-offset-4{margin-left:16.66666667%}.form-item-col-xxl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-xxl-offset-3{margin-left:12.5%}.form-item-col-xxl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-xxl-offset-2{margin-left:8.33333333%}.form-item-col-xxl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-xxl-offset-1{margin-left:4.16666667%}}@media (max-width: 767px){.form-item.horizontal .form-item-label-wrapper,\n .form-item.horizontal .form-item-wrapper{flex:0 0 100%;max-width:100%;text-align:left}.form-item.horizontal .form-item-col-sm-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-sm-24 .form-item-label label::after{content:""}}@media (max-width: 991px){.form-item.horizontal .form-item-col-md-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-md-24 .form-item-label label::after{content:""}}@media (max-width: 1199px){.form-item.horizontal .form-item-col-lg-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-lg-24 .form-item-label label::after{content:""}}@media (max-width: 1599px){.form-item.horizontal .form-item-col-xl-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-xl-24 .form-item-label label::after{content:""}}.form-item{display:flex;box-sizing:border-box;color:var(--antd-text-color);font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";vertical-align:top}.form-item .form-item-label{display:flex;align-items:center}.form-item.vertical{flex-direction:column}.form-item.vertical > .form-item-label-wrapper{text-align:left;line-height:20px;margin-bottom:8px}.form-item:not(.vertical) .form-item-label > label::after{content:":";position:relative;top:-0.5px;margin:0 0 0 2px}.form-item.horizontal{flex-flow:row wrap}.required{color:#ff4d4f;margin-right:4px}.form-item-label-wrapper{box-sizing:border-box;display:inline-block;white-space:nowrap;line-height:30px;text-align:right;vertical-align:middle;flex-grow:0;padding-right:8px}.form-item-label > label{margin-right:6px}.form-item-wrapper{flex:1 1 0;line-height:30px}.form-item-control{display:flex}.form-item-control slot{display:block;width:100%}.form-item-control .help-brick{color:var(--color-secondary-text,#8c8c8c);font-size:14px;line-height:20px}.align-right{flex-direction:row}.align-bottom{flex-direction:column}.message{min-height:22px}.message.error{clear:both;min-height:23px;margin-top:-2px;color:var(--antd-error-color);font-size:14px;line-height:1.5715;transition:color 0.3s cubic-bezier(0.215,0.61,0.355,1)}',""]);const r=i.toString()},426:(l,m,o)=>{o.d(m,{N:()=>B});var t,e=o(4635),f=o(918),i=o(5536),r=o(9492),a=o(6121),c=o(829),x=o(2740),s=o(4782),d=o(1389);let n,g,h,p,b,w,k,y,u;const{method:A,property:z}=(0,s.createDecorators)();var v=new WeakMap,$=new WeakSet,_=new WeakMap,C=new WeakMap,E=new WeakMap,W=new WeakMap,M=new WeakMap,R=new WeakMap;class B extends d.ReactNextElement{constructor(){super(...arguments),(0,e.A)(this,$),(0,f.A)(this,v,(n(this),!1)),(0,f.A)(this,_,"normal"),(0,f.A)(this,C,!1),(0,f.A)(this,E,g(this)),(0,f.A)(this,W,(h(this),p(this))),(0,f.A)(this,M,(b(this),w(this))),(0,f.A)(this,R,(k(this),y(this))),u(this)}get isFormItemElement(){return!0}set validateState(l){(0,r.A)($,j,this,l),this._render()}get validateState(){return(0,i.A)($,this,S)}set notRender(l){this.hidden=l,(0,r.A)($,N,this,l),this._render()}get notRender(){return(0,i.A)($,this,F)}get $bindFormItem(){return(0,i.A)($,this,I)}set $bindFormItem(l){(0,r.A)($,O,this,l),this._render()}get helpBrick(){return(0,c.A)(E,this)}set helpBrick(l){(0,a.A)(E,this,l)}get labelBrick(){return(0,c.A)(W,this)}set labelBrick(l){(0,a.A)(W,this,l)}get labelCol(){return(0,c.A)(M,this)}set labelCol(l){(0,a.A)(M,this,l)}get wrapperCol(){return(0,c.A)(R,this)}set wrapperCol(l){(0,a.A)(R,this,l)}setNotRender(l){this.notRender=l}getFormElement(){let l=this;for(;(l=l.parentNode)&&l&&!l.isFormElement;);return l}}function F(l){return(0,c.A)(v,l)}function N(l,m){(0,a.A)(v,l,m)}function S(l){return(0,c.A)(_,l)}function j(l,m){(0,a.A)(_,l,m)}function I(l){return(0,c.A)(C,l)}function O(l,m){(0,a.A)(C,l,m)}t=B,[g,h,p,b,w,k,y,u,n]=(0,x.A)(t,[],[[z({attribute:!1}),1,"helpBrick"],[z({attribute:!1}),1,"labelBrick"],[z({attribute:!1}),1,"labelCol"],[z({attribute:!1}),1,"wrapperCol"],[A(),2,"setNotRender"],[A(),2,"getFormElement"]],0,void 0,d.ReactNextElement).e}}]);
|
|
2
|
+
//# sourceMappingURL=1269.ed712797.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/1269.1a046297.js","mappings":"kIAG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IAAQ,mBAKRA,IAAQ,8BApEuCc,EAAAA,kBAAgBgD,C","sources":["webpack:///./src/form-item/convertToItemColName.ts","webpack:///./src/form-item/FormItem.shadow.less","webpack:///../../src/FormItemElement.tsx"],"sourcesContent":["import type { ColProps, ColSize } from \"@next-shared/form\";\nimport type { Layout } from \"../interface.js\";\n\nexport function convertToItemColName(\n colConf: ColProps | undefined,\n layout: Layout\n): string {\n let cls = \"\";\n if (!colConf || layout !== \"horizontal\") return cls;\n\n if (colConf.span) {\n cls += `form-item-col-${colConf.span} `;\n }\n\n if (colConf.offset) {\n cls += `form-item-col-offset-${colConf.offset} `;\n }\n\n [\"sm\", \"md\", \"lg\", \"xl\", \"xxl\"].forEach((size) => {\n const sizeConf = colConf[size as keyof ColProps];\n if (sizeConf) {\n if ([\"number\", \"string\"].includes(typeof sizeConf)) {\n cls += `form-item-col-${size}-${sizeConf} `;\n } else {\n (sizeConf as ColSize).span &&\n (cls += `form-item-col-${size}-${(sizeConf as ColSize).span} `);\n\n (sizeConf as ColSize).offset &&\n (cls += `form-item-col-${size}-offset-${\n (sizeConf as ColSize).offset\n } `);\n }\n }\n });\n\n return cls;\n}\n\nexport function addLabelSizeToWrapperOffset(\n labelCol: number | string | ColSize,\n wrapperCol: number | string | ColSize\n): ColSize {\n let wrapperSpan: number | string;\n let wrapperOffset: number;\n\n if (typeof wrapperCol === \"number\" || typeof wrapperCol === \"string\") {\n wrapperSpan = wrapperCol;\n wrapperOffset = 0;\n } else {\n wrapperSpan = wrapperCol.span!;\n wrapperOffset = +(wrapperCol.offset ?? 0);\n }\n\n let offset =\n (typeof labelCol === \"number\" || typeof labelCol === \"string\"\n ? +labelCol\n : +(labelCol.span ?? 0) + +(labelCol.offset ?? 0)) + wrapperOffset;\n\n if (+wrapperSpan + offset > 24) {\n offset = wrapperOffset;\n }\n\n return {\n span: wrapperSpan,\n offset,\n };\n}\n\nexport function calcWrapperColOffsetWithoutLabel(\n labelCol: ColProps,\n wrapperCol: ColProps\n): ColProps {\n if (wrapperCol.span !== undefined) {\n return addLabelSizeToWrapperOffset(labelCol, wrapperCol);\n }\n\n return Object.fromEntries(\n Object.entries(wrapperCol).map(([key, value]) => {\n return [\n key,\n addLabelSizeToWrapperOffset(\n labelCol[key as keyof ColProps] as ColSize,\n value\n ),\n ];\n })\n );\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.form-item-col-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-offset-24{margin-left:100%}.form-item-col-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-offset-23{margin-left:95.83333333%}.form-item-col-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-offset-22{margin-left:91.66666667%}.form-item-col-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-offset-21{margin-left:87.5%}.form-item-col-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-offset-20{margin-left:83.33333333%}.form-item-col-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-offset-19{margin-left:79.16666667%}.form-item-col-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-offset-18{margin-left:75%}.form-item-col-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-offset-17{margin-left:70.83333333%}.form-item-col-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-offset-16{margin-left:66.66666667%}.form-item-col-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-offset-15{margin-left:62.5%}.form-item-col-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-offset-14{margin-left:58.33333333%}.form-item-col-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-offset-13{margin-left:54.16666667%}.form-item-col-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-offset-12{margin-left:50%}.form-item-col-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-offset-11{margin-left:45.83333333%}.form-item-col-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-offset-10{margin-left:41.66666667%}.form-item-col-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-offset-9{margin-left:37.5%}.form-item-col-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-offset-8{margin-left:33.33333333%}.form-item-col-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-offset-7{margin-left:29.16666667%}.form-item-col-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-offset-6{margin-left:25%}.form-item-col-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-offset-5{margin-left:20.83333333%}.form-item-col-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-offset-4{margin-left:16.66666667%}.form-item-col-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-offset-3{margin-left:12.5%}.form-item-col-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-offset-2{margin-left:8.33333333%}.form-item-col-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-offset-1{margin-left:4.16666667%}@media (min-width: 576px){.form-item-col-sm-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-sm-offset-24{margin-left:100%}.form-item-col-sm-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-sm-offset-23{margin-left:95.83333333%}.form-item-col-sm-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-sm-offset-22{margin-left:91.66666667%}.form-item-col-sm-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-sm-offset-21{margin-left:87.5%}.form-item-col-sm-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-sm-offset-20{margin-left:83.33333333%}.form-item-col-sm-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-sm-offset-19{margin-left:79.16666667%}.form-item-col-sm-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-sm-offset-18{margin-left:75%}.form-item-col-sm-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-sm-offset-17{margin-left:70.83333333%}.form-item-col-sm-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-sm-offset-16{margin-left:66.66666667%}.form-item-col-sm-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-sm-offset-15{margin-left:62.5%}.form-item-col-sm-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-sm-offset-14{margin-left:58.33333333%}.form-item-col-sm-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-sm-offset-13{margin-left:54.16666667%}.form-item-col-sm-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-sm-offset-12{margin-left:50%}.form-item-col-sm-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-sm-offset-11{margin-left:45.83333333%}.form-item-col-sm-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-sm-offset-10{margin-left:41.66666667%}.form-item-col-sm-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-sm-offset-9{margin-left:37.5%}.form-item-col-sm-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-sm-offset-8{margin-left:33.33333333%}.form-item-col-sm-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-sm-offset-7{margin-left:29.16666667%}.form-item-col-sm-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-sm-offset-6{margin-left:25%}.form-item-col-sm-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-sm-offset-5{margin-left:20.83333333%}.form-item-col-sm-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-sm-offset-4{margin-left:16.66666667%}.form-item-col-sm-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-sm-offset-3{margin-left:12.5%}.form-item-col-sm-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-sm-offset-2{margin-left:8.33333333%}.form-item-col-sm-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-sm-offset-1{margin-left:4.16666667%}}@media (min-width: 768px){.form-item-col-md-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-md-offset-24{margin-left:100%}.form-item-col-md-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-md-offset-23{margin-left:95.83333333%}.form-item-col-md-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-md-offset-22{margin-left:91.66666667%}.form-item-col-md-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-md-offset-21{margin-left:87.5%}.form-item-col-md-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-md-offset-20{margin-left:83.33333333%}.form-item-col-md-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-md-offset-19{margin-left:79.16666667%}.form-item-col-md-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-md-offset-18{margin-left:75%}.form-item-col-md-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-md-offset-17{margin-left:70.83333333%}.form-item-col-md-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-md-offset-16{margin-left:66.66666667%}.form-item-col-md-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-md-offset-15{margin-left:62.5%}.form-item-col-md-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-md-offset-14{margin-left:58.33333333%}.form-item-col-md-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-md-offset-13{margin-left:54.16666667%}.form-item-col-md-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-md-offset-12{margin-left:50%}.form-item-col-md-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-md-offset-11{margin-left:45.83333333%}.form-item-col-md-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-md-offset-10{margin-left:41.66666667%}.form-item-col-md-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-md-offset-9{margin-left:37.5%}.form-item-col-md-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-md-offset-8{margin-left:33.33333333%}.form-item-col-md-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-md-offset-7{margin-left:29.16666667%}.form-item-col-md-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-md-offset-6{margin-left:25%}.form-item-col-md-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-md-offset-5{margin-left:20.83333333%}.form-item-col-md-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-md-offset-4{margin-left:16.66666667%}.form-item-col-md-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-md-offset-3{margin-left:12.5%}.form-item-col-md-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-md-offset-2{margin-left:8.33333333%}.form-item-col-md-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-md-offset-1{margin-left:4.16666667%}}@media (min-width: 992px){.form-item-col-lg-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-lg-offset-24{margin-left:100%}.form-item-col-lg-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-lg-offset-23{margin-left:95.83333333%}.form-item-col-lg-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-lg-offset-22{margin-left:91.66666667%}.form-item-col-lg-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-lg-offset-21{margin-left:87.5%}.form-item-col-lg-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-lg-offset-20{margin-left:83.33333333%}.form-item-col-lg-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-lg-offset-19{margin-left:79.16666667%}.form-item-col-lg-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-lg-offset-18{margin-left:75%}.form-item-col-lg-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-lg-offset-17{margin-left:70.83333333%}.form-item-col-lg-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-lg-offset-16{margin-left:66.66666667%}.form-item-col-lg-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-lg-offset-15{margin-left:62.5%}.form-item-col-lg-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-lg-offset-14{margin-left:58.33333333%}.form-item-col-lg-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-lg-offset-13{margin-left:54.16666667%}.form-item-col-lg-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-lg-offset-12{margin-left:50%}.form-item-col-lg-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-lg-offset-11{margin-left:45.83333333%}.form-item-col-lg-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-lg-offset-10{margin-left:41.66666667%}.form-item-col-lg-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-lg-offset-9{margin-left:37.5%}.form-item-col-lg-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-lg-offset-8{margin-left:33.33333333%}.form-item-col-lg-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-lg-offset-7{margin-left:29.16666667%}.form-item-col-lg-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-lg-offset-6{margin-left:25%}.form-item-col-lg-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-lg-offset-5{margin-left:20.83333333%}.form-item-col-lg-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-lg-offset-4{margin-left:16.66666667%}.form-item-col-lg-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-lg-offset-3{margin-left:12.5%}.form-item-col-lg-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-lg-offset-2{margin-left:8.33333333%}.form-item-col-lg-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-lg-offset-1{margin-left:4.16666667%}}@media (min-width: 1200px){.form-item-col-xl-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-xl-offset-24{margin-left:100%}.form-item-col-xl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-xl-offset-23{margin-left:95.83333333%}.form-item-col-xl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-xl-offset-22{margin-left:91.66666667%}.form-item-col-xl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-xl-offset-21{margin-left:87.5%}.form-item-col-xl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-xl-offset-20{margin-left:83.33333333%}.form-item-col-xl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-xl-offset-19{margin-left:79.16666667%}.form-item-col-xl-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-xl-offset-18{margin-left:75%}.form-item-col-xl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-xl-offset-17{margin-left:70.83333333%}.form-item-col-xl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-xl-offset-16{margin-left:66.66666667%}.form-item-col-xl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-xl-offset-15{margin-left:62.5%}.form-item-col-xl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-xl-offset-14{margin-left:58.33333333%}.form-item-col-xl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-xl-offset-13{margin-left:54.16666667%}.form-item-col-xl-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-xl-offset-12{margin-left:50%}.form-item-col-xl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-xl-offset-11{margin-left:45.83333333%}.form-item-col-xl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-xl-offset-10{margin-left:41.66666667%}.form-item-col-xl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-xl-offset-9{margin-left:37.5%}.form-item-col-xl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-xl-offset-8{margin-left:33.33333333%}.form-item-col-xl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-xl-offset-7{margin-left:29.16666667%}.form-item-col-xl-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-xl-offset-6{margin-left:25%}.form-item-col-xl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-xl-offset-5{margin-left:20.83333333%}.form-item-col-xl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-xl-offset-4{margin-left:16.66666667%}.form-item-col-xl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-xl-offset-3{margin-left:12.5%}.form-item-col-xl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-xl-offset-2{margin-left:8.33333333%}.form-item-col-xl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-xl-offset-1{margin-left:4.16666667%}}@media (min-width: 1600px){.form-item-col-xxl-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-xxl-offset-24{margin-left:100%}.form-item-col-xxl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-xxl-offset-23{margin-left:95.83333333%}.form-item-col-xxl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-xxl-offset-22{margin-left:91.66666667%}.form-item-col-xxl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-xxl-offset-21{margin-left:87.5%}.form-item-col-xxl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-xxl-offset-20{margin-left:83.33333333%}.form-item-col-xxl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-xxl-offset-19{margin-left:79.16666667%}.form-item-col-xxl-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-xxl-offset-18{margin-left:75%}.form-item-col-xxl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-xxl-offset-17{margin-left:70.83333333%}.form-item-col-xxl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-xxl-offset-16{margin-left:66.66666667%}.form-item-col-xxl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-xxl-offset-15{margin-left:62.5%}.form-item-col-xxl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-xxl-offset-14{margin-left:58.33333333%}.form-item-col-xxl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-xxl-offset-13{margin-left:54.16666667%}.form-item-col-xxl-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-xxl-offset-12{margin-left:50%}.form-item-col-xxl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-xxl-offset-11{margin-left:45.83333333%}.form-item-col-xxl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-xxl-offset-10{margin-left:41.66666667%}.form-item-col-xxl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-xxl-offset-9{margin-left:37.5%}.form-item-col-xxl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-xxl-offset-8{margin-left:33.33333333%}.form-item-col-xxl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-xxl-offset-7{margin-left:29.16666667%}.form-item-col-xxl-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-xxl-offset-6{margin-left:25%}.form-item-col-xxl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-xxl-offset-5{margin-left:20.83333333%}.form-item-col-xxl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-xxl-offset-4{margin-left:16.66666667%}.form-item-col-xxl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-xxl-offset-3{margin-left:12.5%}.form-item-col-xxl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-xxl-offset-2{margin-left:8.33333333%}.form-item-col-xxl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-xxl-offset-1{margin-left:4.16666667%}}@media (max-width: 767px){.form-item.horizontal .form-item-label-wrapper,\n .form-item.horizontal .form-item-wrapper{flex:0 0 100%;max-width:100%;text-align:left}.form-item.horizontal .form-item-col-sm-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-sm-24 .form-item-label label::after{content:\"\"}}@media (max-width: 991px){.form-item.horizontal .form-item-col-md-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-md-24 .form-item-label label::after{content:\"\"}}@media (max-width: 1199px){.form-item.horizontal .form-item-col-lg-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-lg-24 .form-item-label label::after{content:\"\"}}@media (max-width: 1599px){.form-item.horizontal .form-item-col-xl-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-xl-24 .form-item-label label::after{content:\"\"}}.form-item{display:flex;box-sizing:border-box;color:var(--antd-text-color);font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:\"tnum\";vertical-align:top}.form-item .form-item-label{display:flex;align-items:center}.form-item.vertical{flex-direction:column}.form-item.vertical > .form-item-label-wrapper{text-align:left;line-height:20px;margin-bottom:8px}.form-item:not(.vertical) .form-item-label > label::after{content:\":\";position:relative;top:-0.5px;margin:0 0 0 2px}.form-item.horizontal{flex-flow:row wrap}.required{color:#ff4d4f;margin-right:4px}.form-item-label-wrapper{box-sizing:border-box;display:inline-block;white-space:nowrap;line-height:30px;text-align:right;vertical-align:middle;flex-grow:0;padding-right:8px}.form-item-label > label{margin-right:6px}.form-item-wrapper{flex:1 1 0;line-height:30px}.form-item-control{display:flex;gap:4px}.form-item-control slot{display:block;width:100%}.align-right{flex-direction:row}.align-bottom{flex-direction:column}.message{min-height:22px}.message.error{clear:both;min-height:23px;margin-top:-2px;color:var(--antd-error-color);font-size:14px;line-height:1.5715;transition:color 0.3s cubic-bezier(0.215,0.61,0.355,1)}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport type { AbstractForm, ColProps } from \"./Form.js\";\nimport { UseSingleBrickConf } from \"@next-core/types\";\n\nconst { method, property } = createDecorators();\n\nexport abstract class FormItemElementBase extends ReactNextElement {\n accessor #_notRender = false;\n accessor #validate = \"normal\";\n accessor #bindFormItem = false;\n\n get isFormItemElement(): true {\n return true;\n }\n\n set validateState(value: string) {\n this.#validate = value;\n this._render();\n }\n get validateState() {\n return this.#validate;\n }\n\n /**\n * 控制该表单项是否隐藏\n * @default false\n * @group ui\n */\n set notRender(value: boolean) {\n this.hidden = value;\n this.#_notRender = value;\n this._render();\n }\n get notRender(): boolean {\n return this.#_notRender;\n }\n\n get $bindFormItem() {\n return this.#bindFormItem;\n }\n set $bindFormItem(value: boolean) {\n this.#bindFormItem = value;\n this._render();\n }\n\n @property({\n attribute: false,\n })\n accessor helpBrick:\n | { useBrick: UseSingleBrickConf | UseSingleBrickConf[] }\n | undefined;\n\n @property({\n attribute: false,\n })\n accessor labelBrick:\n | { useBrick: UseSingleBrickConf | UseSingleBrickConf[] }\n | undefined;\n\n @property({\n attribute: false,\n })\n accessor labelCol: ColProps | undefined;\n\n @property({\n attribute: false,\n })\n accessor wrapperCol: ColProps | undefined;\n\n @method()\n setNotRender(value: boolean) {\n this.notRender = value;\n }\n\n @method()\n getFormElement(): AbstractForm | null {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let element: AbstractForm | null = this as unknown as AbstractForm;\n while ((element = element.parentNode as AbstractForm | null)) {\n if (!element || element.isFormElement) {\n break;\n }\n }\n return element as AbstractForm | null;\n }\n}\n"],"names":["convertToItemColName","colConf","layout","cls","span","offset","forEach","size","sizeConf","includes","addLabelSizeToWrapperOffset","labelCol","wrapperCol","wrapperSpan","wrapperOffset","calcWrapperColOffsetWithoutLabel","undefined","Object","fromEntries","entries","map","_ref","key","value","___CSS_LOADER_EXPORT___","push","module","id","toString","method","property","createDecorators","_A","WeakMap","_FormItemElementBase_brand","WeakSet","_B","_C","_D","_E","_F","_G","FormItemElementBase","ReactNextElement","constructor","arguments","_classPrivateMethodInitSpec","_classPrivateFieldInitSpec","_initProto","_init_helpBrick","_init_extra_helpBrick","_init_labelBrick","_init_extra_labelBrick","_init_labelCol","_init_extra_labelCol","_init_wrapperCol","_init_extra_wrapperCol","isFormItemElement","validateState","_classPrivateSetter","_set_validate","this","_render","_classPrivateGetter","_get_validate","notRender","hidden","_set__notRender","_get__notRender","$bindFormItem","_get_bindFormItem","_set_bindFormItem","helpBrick","_classPrivateFieldGet","v","_classPrivateFieldSet","labelBrick","setNotRender","getFormElement","element","parentNode","isFormElement","_this","_this2","_this3","_this4","_this5","_this6","_FormItemElementBase","_applyDecs","attribute","e"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"chunks/1269.ed712797.js","mappings":"kIAGO,SAASA,EACdC,EACAC,GAEA,IAAIC,EAAM,GACV,OAAKF,GAAsB,eAAXC,GAEZD,EAAQG,OACVD,GAAO,iBAAiBF,EAAQG,SAG9BH,EAAQI,SACVF,GAAO,wBAAwBF,EAAQI,WAGzC,CAAC,KAAM,KAAM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AAA,kBAAR7B,CAAQ+D,IAAAC,EAAAA,EAAAA,GAAAnC,EAAA,KAAAkC,EAAA,eAKR9D,GAAU,OAAA6D,EAAAA,EAAAA,GAAAhC,EAAA,oBAAV7B,CAAU8D,IAAAC,EAAAA,EAAAA,GAAAlC,EAAA,KAAAiC,EAAA,CAGnBG,YAAAA,CAAatD,GACXsC,KAAKI,UAAY1C,CACnB,CAGAuD,cAAAA,GAEE,IAAIC,EAA+BlB,KACnC,MAAQkB,EAAUA,EAAQC,aACnBD,IAAWA,EAAQE,gBAI1B,OAAOF,CACT,EA9EuC,SAAAX,EAAAc,GAAA,OAAAT,EAAAA,EAAAA,GAAAzC,EAAAkD,EAAA,UAAAf,EAAAgB,EAAAT,IAAAC,EAAAA,EAAAA,GAAA3C,EAAAmD,EAAAT,EAAA,UAAAV,EAAAoB,GAAA,OAAAX,EAAAA,EAAAA,GAAArC,EAAAgD,EAAA,UAAAxB,EAAAyB,EAAAX,IAAAC,EAAAA,EAAAA,GAAAvC,EAAAiD,EAAAX,EAAA,UAAAJ,EAAAgB,GAAA,OAAAb,EAAAA,EAAAA,GAAApC,EAAAiD,EAAA,UAAAf,EAAAgB,EAAAb,IAAAC,EAAAA,EAAAA,GAAAtC,EAAAkD,EAAAb,EAAA,CA+ExCc,EA/EqB9C,GAAmBO,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAR,IAAAyC,EAAAA,EAAAA,GAAAD,EAAA,KAuCtC1D,EAAS,CACR4D,WAAW,IACX,gBAKD5D,EAAS,CACR4D,WAAW,IACX,iBAKD5D,EAAS,CACR4D,WAAW,IACX,eAGD5D,EAAS,CACR4D,WAAW,IACX,iBAGD7D,IAAQ,mBAKRA,IAAQ,8BApEuCc,EAAAA,kBAAgBgD,C","sources":["webpack:///./src/form-item/convertToItemColName.ts","webpack:///./src/form-item/FormItem.shadow.less","webpack:///../../src/FormItemElement.tsx"],"sourcesContent":["import type { ColProps, ColSize } from \"@next-shared/form\";\nimport type { Layout } from \"../interface.js\";\n\nexport function convertToItemColName(\n colConf: ColProps | undefined,\n layout: Layout\n): string {\n let cls = \"\";\n if (!colConf || layout !== \"horizontal\") return cls;\n\n if (colConf.span) {\n cls += `form-item-col-${colConf.span} `;\n }\n\n if (colConf.offset) {\n cls += `form-item-col-offset-${colConf.offset} `;\n }\n\n [\"sm\", \"md\", \"lg\", \"xl\", \"xxl\"].forEach((size) => {\n const sizeConf = colConf[size as keyof ColProps];\n if (sizeConf) {\n if ([\"number\", \"string\"].includes(typeof sizeConf)) {\n cls += `form-item-col-${size}-${sizeConf} `;\n } else {\n (sizeConf as ColSize).span &&\n (cls += `form-item-col-${size}-${(sizeConf as ColSize).span} `);\n\n (sizeConf as ColSize).offset &&\n (cls += `form-item-col-${size}-offset-${\n (sizeConf as ColSize).offset\n } `);\n }\n }\n });\n\n return cls;\n}\n\nexport function addLabelSizeToWrapperOffset(\n labelCol: number | string | ColSize,\n wrapperCol: number | string | ColSize\n): ColSize {\n let wrapperSpan: number | string;\n let wrapperOffset: number;\n\n if (typeof wrapperCol === \"number\" || typeof wrapperCol === \"string\") {\n wrapperSpan = wrapperCol;\n wrapperOffset = 0;\n } else {\n wrapperSpan = wrapperCol.span!;\n wrapperOffset = +(wrapperCol.offset ?? 0);\n }\n\n let offset =\n (typeof labelCol === \"number\" || typeof labelCol === \"string\"\n ? +labelCol\n : +(labelCol.span ?? 0) + +(labelCol.offset ?? 0)) + wrapperOffset;\n\n if (+wrapperSpan + offset > 24) {\n offset = wrapperOffset;\n }\n\n return {\n span: wrapperSpan,\n offset,\n };\n}\n\nexport function calcWrapperColOffsetWithoutLabel(\n labelCol: ColProps,\n wrapperCol: ColProps\n): ColProps {\n if (wrapperCol.span !== undefined) {\n return addLabelSizeToWrapperOffset(labelCol, wrapperCol);\n }\n\n return Object.fromEntries(\n Object.entries(wrapperCol).map(([key, value]) => {\n return [\n key,\n addLabelSizeToWrapperOffset(\n labelCol[key as keyof ColProps] as ColSize,\n value\n ),\n ];\n })\n );\n}\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.form-item-col-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-offset-24{margin-left:100%}.form-item-col-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-offset-23{margin-left:95.83333333%}.form-item-col-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-offset-22{margin-left:91.66666667%}.form-item-col-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-offset-21{margin-left:87.5%}.form-item-col-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-offset-20{margin-left:83.33333333%}.form-item-col-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-offset-19{margin-left:79.16666667%}.form-item-col-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-offset-18{margin-left:75%}.form-item-col-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-offset-17{margin-left:70.83333333%}.form-item-col-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-offset-16{margin-left:66.66666667%}.form-item-col-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-offset-15{margin-left:62.5%}.form-item-col-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-offset-14{margin-left:58.33333333%}.form-item-col-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-offset-13{margin-left:54.16666667%}.form-item-col-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-offset-12{margin-left:50%}.form-item-col-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-offset-11{margin-left:45.83333333%}.form-item-col-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-offset-10{margin-left:41.66666667%}.form-item-col-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-offset-9{margin-left:37.5%}.form-item-col-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-offset-8{margin-left:33.33333333%}.form-item-col-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-offset-7{margin-left:29.16666667%}.form-item-col-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-offset-6{margin-left:25%}.form-item-col-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-offset-5{margin-left:20.83333333%}.form-item-col-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-offset-4{margin-left:16.66666667%}.form-item-col-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-offset-3{margin-left:12.5%}.form-item-col-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-offset-2{margin-left:8.33333333%}.form-item-col-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-offset-1{margin-left:4.16666667%}@media (min-width: 576px){.form-item-col-sm-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-sm-offset-24{margin-left:100%}.form-item-col-sm-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-sm-offset-23{margin-left:95.83333333%}.form-item-col-sm-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-sm-offset-22{margin-left:91.66666667%}.form-item-col-sm-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-sm-offset-21{margin-left:87.5%}.form-item-col-sm-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-sm-offset-20{margin-left:83.33333333%}.form-item-col-sm-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-sm-offset-19{margin-left:79.16666667%}.form-item-col-sm-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-sm-offset-18{margin-left:75%}.form-item-col-sm-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-sm-offset-17{margin-left:70.83333333%}.form-item-col-sm-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-sm-offset-16{margin-left:66.66666667%}.form-item-col-sm-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-sm-offset-15{margin-left:62.5%}.form-item-col-sm-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-sm-offset-14{margin-left:58.33333333%}.form-item-col-sm-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-sm-offset-13{margin-left:54.16666667%}.form-item-col-sm-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-sm-offset-12{margin-left:50%}.form-item-col-sm-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-sm-offset-11{margin-left:45.83333333%}.form-item-col-sm-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-sm-offset-10{margin-left:41.66666667%}.form-item-col-sm-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-sm-offset-9{margin-left:37.5%}.form-item-col-sm-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-sm-offset-8{margin-left:33.33333333%}.form-item-col-sm-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-sm-offset-7{margin-left:29.16666667%}.form-item-col-sm-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-sm-offset-6{margin-left:25%}.form-item-col-sm-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-sm-offset-5{margin-left:20.83333333%}.form-item-col-sm-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-sm-offset-4{margin-left:16.66666667%}.form-item-col-sm-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-sm-offset-3{margin-left:12.5%}.form-item-col-sm-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-sm-offset-2{margin-left:8.33333333%}.form-item-col-sm-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-sm-offset-1{margin-left:4.16666667%}}@media (min-width: 768px){.form-item-col-md-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-md-offset-24{margin-left:100%}.form-item-col-md-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-md-offset-23{margin-left:95.83333333%}.form-item-col-md-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-md-offset-22{margin-left:91.66666667%}.form-item-col-md-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-md-offset-21{margin-left:87.5%}.form-item-col-md-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-md-offset-20{margin-left:83.33333333%}.form-item-col-md-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-md-offset-19{margin-left:79.16666667%}.form-item-col-md-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-md-offset-18{margin-left:75%}.form-item-col-md-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-md-offset-17{margin-left:70.83333333%}.form-item-col-md-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-md-offset-16{margin-left:66.66666667%}.form-item-col-md-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-md-offset-15{margin-left:62.5%}.form-item-col-md-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-md-offset-14{margin-left:58.33333333%}.form-item-col-md-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-md-offset-13{margin-left:54.16666667%}.form-item-col-md-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-md-offset-12{margin-left:50%}.form-item-col-md-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-md-offset-11{margin-left:45.83333333%}.form-item-col-md-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-md-offset-10{margin-left:41.66666667%}.form-item-col-md-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-md-offset-9{margin-left:37.5%}.form-item-col-md-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-md-offset-8{margin-left:33.33333333%}.form-item-col-md-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-md-offset-7{margin-left:29.16666667%}.form-item-col-md-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-md-offset-6{margin-left:25%}.form-item-col-md-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-md-offset-5{margin-left:20.83333333%}.form-item-col-md-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-md-offset-4{margin-left:16.66666667%}.form-item-col-md-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-md-offset-3{margin-left:12.5%}.form-item-col-md-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-md-offset-2{margin-left:8.33333333%}.form-item-col-md-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-md-offset-1{margin-left:4.16666667%}}@media (min-width: 992px){.form-item-col-lg-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-lg-offset-24{margin-left:100%}.form-item-col-lg-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-lg-offset-23{margin-left:95.83333333%}.form-item-col-lg-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-lg-offset-22{margin-left:91.66666667%}.form-item-col-lg-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-lg-offset-21{margin-left:87.5%}.form-item-col-lg-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-lg-offset-20{margin-left:83.33333333%}.form-item-col-lg-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-lg-offset-19{margin-left:79.16666667%}.form-item-col-lg-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-lg-offset-18{margin-left:75%}.form-item-col-lg-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-lg-offset-17{margin-left:70.83333333%}.form-item-col-lg-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-lg-offset-16{margin-left:66.66666667%}.form-item-col-lg-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-lg-offset-15{margin-left:62.5%}.form-item-col-lg-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-lg-offset-14{margin-left:58.33333333%}.form-item-col-lg-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-lg-offset-13{margin-left:54.16666667%}.form-item-col-lg-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-lg-offset-12{margin-left:50%}.form-item-col-lg-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-lg-offset-11{margin-left:45.83333333%}.form-item-col-lg-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-lg-offset-10{margin-left:41.66666667%}.form-item-col-lg-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-lg-offset-9{margin-left:37.5%}.form-item-col-lg-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-lg-offset-8{margin-left:33.33333333%}.form-item-col-lg-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-lg-offset-7{margin-left:29.16666667%}.form-item-col-lg-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-lg-offset-6{margin-left:25%}.form-item-col-lg-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-lg-offset-5{margin-left:20.83333333%}.form-item-col-lg-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-lg-offset-4{margin-left:16.66666667%}.form-item-col-lg-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-lg-offset-3{margin-left:12.5%}.form-item-col-lg-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-lg-offset-2{margin-left:8.33333333%}.form-item-col-lg-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-lg-offset-1{margin-left:4.16666667%}}@media (min-width: 1200px){.form-item-col-xl-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-xl-offset-24{margin-left:100%}.form-item-col-xl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-xl-offset-23{margin-left:95.83333333%}.form-item-col-xl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-xl-offset-22{margin-left:91.66666667%}.form-item-col-xl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-xl-offset-21{margin-left:87.5%}.form-item-col-xl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-xl-offset-20{margin-left:83.33333333%}.form-item-col-xl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-xl-offset-19{margin-left:79.16666667%}.form-item-col-xl-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-xl-offset-18{margin-left:75%}.form-item-col-xl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-xl-offset-17{margin-left:70.83333333%}.form-item-col-xl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-xl-offset-16{margin-left:66.66666667%}.form-item-col-xl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-xl-offset-15{margin-left:62.5%}.form-item-col-xl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-xl-offset-14{margin-left:58.33333333%}.form-item-col-xl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-xl-offset-13{margin-left:54.16666667%}.form-item-col-xl-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-xl-offset-12{margin-left:50%}.form-item-col-xl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-xl-offset-11{margin-left:45.83333333%}.form-item-col-xl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-xl-offset-10{margin-left:41.66666667%}.form-item-col-xl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-xl-offset-9{margin-left:37.5%}.form-item-col-xl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-xl-offset-8{margin-left:33.33333333%}.form-item-col-xl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-xl-offset-7{margin-left:29.16666667%}.form-item-col-xl-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-xl-offset-6{margin-left:25%}.form-item-col-xl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-xl-offset-5{margin-left:20.83333333%}.form-item-col-xl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-xl-offset-4{margin-left:16.66666667%}.form-item-col-xl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-xl-offset-3{margin-left:12.5%}.form-item-col-xl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-xl-offset-2{margin-left:8.33333333%}.form-item-col-xl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-xl-offset-1{margin-left:4.16666667%}}@media (min-width: 1600px){.form-item-col-xxl-24{display:block;flex:0 0 100%;max-width:100%}.form-item-col-xxl-offset-24{margin-left:100%}.form-item-col-xxl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.form-item-col-xxl-offset-23{margin-left:95.83333333%}.form-item-col-xxl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.form-item-col-xxl-offset-22{margin-left:91.66666667%}.form-item-col-xxl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.form-item-col-xxl-offset-21{margin-left:87.5%}.form-item-col-xxl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.form-item-col-xxl-offset-20{margin-left:83.33333333%}.form-item-col-xxl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.form-item-col-xxl-offset-19{margin-left:79.16666667%}.form-item-col-xxl-18{display:block;flex:0 0 75%;max-width:75%}.form-item-col-xxl-offset-18{margin-left:75%}.form-item-col-xxl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.form-item-col-xxl-offset-17{margin-left:70.83333333%}.form-item-col-xxl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.form-item-col-xxl-offset-16{margin-left:66.66666667%}.form-item-col-xxl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.form-item-col-xxl-offset-15{margin-left:62.5%}.form-item-col-xxl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.form-item-col-xxl-offset-14{margin-left:58.33333333%}.form-item-col-xxl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.form-item-col-xxl-offset-13{margin-left:54.16666667%}.form-item-col-xxl-12{display:block;flex:0 0 50%;max-width:50%}.form-item-col-xxl-offset-12{margin-left:50%}.form-item-col-xxl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.form-item-col-xxl-offset-11{margin-left:45.83333333%}.form-item-col-xxl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.form-item-col-xxl-offset-10{margin-left:41.66666667%}.form-item-col-xxl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.form-item-col-xxl-offset-9{margin-left:37.5%}.form-item-col-xxl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.form-item-col-xxl-offset-8{margin-left:33.33333333%}.form-item-col-xxl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.form-item-col-xxl-offset-7{margin-left:29.16666667%}.form-item-col-xxl-6{display:block;flex:0 0 25%;max-width:25%}.form-item-col-xxl-offset-6{margin-left:25%}.form-item-col-xxl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.form-item-col-xxl-offset-5{margin-left:20.83333333%}.form-item-col-xxl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.form-item-col-xxl-offset-4{margin-left:16.66666667%}.form-item-col-xxl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.form-item-col-xxl-offset-3{margin-left:12.5%}.form-item-col-xxl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.form-item-col-xxl-offset-2{margin-left:8.33333333%}.form-item-col-xxl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.form-item-col-xxl-offset-1{margin-left:4.16666667%}}@media (max-width: 767px){.form-item.horizontal .form-item-label-wrapper,\n .form-item.horizontal .form-item-wrapper{flex:0 0 100%;max-width:100%;text-align:left}.form-item.horizontal .form-item-col-sm-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-sm-24 .form-item-label label::after{content:\"\"}}@media (max-width: 991px){.form-item.horizontal .form-item-col-md-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-md-24 .form-item-label label::after{content:\"\"}}@media (max-width: 1199px){.form-item.horizontal .form-item-col-lg-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-lg-24 .form-item-label label::after{content:\"\"}}@media (max-width: 1599px){.form-item.horizontal .form-item-col-xl-24 .form-item-label{text-align:left}.form-item.horizontal .form-item-col-xl-24 .form-item-label label::after{content:\"\"}}.form-item{display:flex;box-sizing:border-box;color:var(--antd-text-color);font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:\"tnum\";vertical-align:top}.form-item .form-item-label{display:flex;align-items:center}.form-item.vertical{flex-direction:column}.form-item.vertical > .form-item-label-wrapper{text-align:left;line-height:20px;margin-bottom:8px}.form-item:not(.vertical) .form-item-label > label::after{content:\":\";position:relative;top:-0.5px;margin:0 0 0 2px}.form-item.horizontal{flex-flow:row wrap}.required{color:#ff4d4f;margin-right:4px}.form-item-label-wrapper{box-sizing:border-box;display:inline-block;white-space:nowrap;line-height:30px;text-align:right;vertical-align:middle;flex-grow:0;padding-right:8px}.form-item-label > label{margin-right:6px}.form-item-wrapper{flex:1 1 0;line-height:30px}.form-item-control{display:flex}.form-item-control slot{display:block;width:100%}.form-item-control .help-brick{color:var(--color-secondary-text,#8c8c8c);font-size:14px;line-height:20px}.align-right{flex-direction:row}.align-bottom{flex-direction:column}.message{min-height:22px}.message.error{clear:both;min-height:23px;margin-top:-2px;color:var(--antd-error-color);font-size:14px;line-height:1.5715;transition:color 0.3s cubic-bezier(0.215,0.61,0.355,1)}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n","import { createDecorators } from \"@next-core/element\";\nimport { ReactNextElement } from \"@next-core/react-element\";\nimport type { AbstractForm, ColProps } from \"./Form.js\";\nimport { UseSingleBrickConf } from \"@next-core/types\";\n\nconst { method, property } = createDecorators();\n\nexport abstract class FormItemElementBase extends ReactNextElement {\n accessor #_notRender = false;\n accessor #validate = \"normal\";\n accessor #bindFormItem = false;\n\n get isFormItemElement(): true {\n return true;\n }\n\n set validateState(value: string) {\n this.#validate = value;\n this._render();\n }\n get validateState() {\n return this.#validate;\n }\n\n /**\n * 控制该表单项是否隐藏\n * @default false\n * @group ui\n */\n set notRender(value: boolean) {\n this.hidden = value;\n this.#_notRender = value;\n this._render();\n }\n get notRender(): boolean {\n return this.#_notRender;\n }\n\n get $bindFormItem() {\n return this.#bindFormItem;\n }\n set $bindFormItem(value: boolean) {\n this.#bindFormItem = value;\n this._render();\n }\n\n @property({\n attribute: false,\n })\n accessor helpBrick:\n | { useBrick: UseSingleBrickConf | UseSingleBrickConf[] }\n | undefined;\n\n @property({\n attribute: false,\n })\n accessor labelBrick:\n | { useBrick: UseSingleBrickConf | UseSingleBrickConf[] }\n | undefined;\n\n @property({\n attribute: false,\n })\n accessor labelCol: ColProps | undefined;\n\n @property({\n attribute: false,\n })\n accessor wrapperCol: ColProps | undefined;\n\n @method()\n setNotRender(value: boolean) {\n this.notRender = value;\n }\n\n @method()\n getFormElement(): AbstractForm | null {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let element: AbstractForm | null = this as unknown as AbstractForm;\n while ((element = element.parentNode as AbstractForm | null)) {\n if (!element || element.isFormElement) {\n break;\n }\n }\n return element as AbstractForm | null;\n }\n}\n"],"names":["convertToItemColName","colConf","layout","cls","span","offset","forEach","size","sizeConf","includes","addLabelSizeToWrapperOffset","labelCol","wrapperCol","wrapperSpan","wrapperOffset","calcWrapperColOffsetWithoutLabel","undefined","Object","fromEntries","entries","map","_ref","key","value","___CSS_LOADER_EXPORT___","push","module","id","toString","method","property","createDecorators","_A","WeakMap","_FormItemElementBase_brand","WeakSet","_B","_C","_D","_E","_F","_G","FormItemElementBase","ReactNextElement","constructor","arguments","_classPrivateMethodInitSpec","_classPrivateFieldInitSpec","_initProto","_init_helpBrick","_init_extra_helpBrick","_init_labelBrick","_init_extra_labelBrick","_init_labelCol","_init_extra_labelCol","_init_wrapperCol","_init_extra_wrapperCol","isFormItemElement","validateState","_classPrivateSetter","_set_validate","this","_render","_classPrivateGetter","_get_validate","notRender","hidden","_set__notRender","_get__notRender","$bindFormItem","_get_bindFormItem","_set_bindFormItem","helpBrick","_classPrivateFieldGet","v","_classPrivateFieldSet","labelBrick","setNotRender","getFormElement","element","parentNode","isFormElement","_this","_this2","_this3","_this4","_this5","_this6","_FormItemElementBase","_applyDecs","attribute","e"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[4837,7218],{4837:(e,r,t)=>{t.r(r),t.d(r,{ReactUseBrick:()=>c,ReactUseMultipleBricks:()=>u,asyncWrapBrick:()=>k,useCurrentApp:()=>l,useCurrentTheme:()=>o,useLazyWrapBrick:()=>w,useNavConfig:()=>h,useProvider:()=>m,useRecentApps:()=>i,useRouteRender:()=>d});var n=t(8769),s=t(184);let c=function(e){let{useBrick:r,data:t,errorBoundary:c,refCallback:u,ignoredCallback:a}=e;const[o,i]=(0,n.useState)(null),l=(0,n.useRef)(),[d,f]=(0,n.useState)(),p=(0,n.useRef)(0),g=(0,n.useMemo)((()=>{var e;return null===(e=s.__secret_internals.getRenderId)||void 0===e?void 0:e.call(s.__secret_internals)}),[]);(0,n.useEffect)((()=>{let e=!1;return async function(){try{const n=await s.__secret_internals.renderUseBrick(r,t,c);if(e)return;i(n),f(++p.current)}catch(n){!e&&function(e){var r;const t=null===(r=s.__secret_internals.getRenderId)||void 0===r?void 0:r.call(s.__secret_internals);return!e||!t||e===t}(g)&&(console.error("Render useBrick failed:",r,"with data:",t),(0,s.handleHttpError)(n))}}(),()=>{e=!0}}),[t,r,g,c]);const y=(0,n.useCallback)((e=>{e?l.current=s.__secret_internals.mountUseBrick(o,e):(s.__secret_internals.unmountUseBrick(o,l.current),l.current=void 0),null==u||u(e)}),[u,o]);if(!o)return null;const{tagName:m}=o;if(null===m)return null==a||a(),null;const v=m;return n.createElement(v,{key:d,ref:y})},u=function(e){let{useBrick:r,data:t,errorBoundary:s}=e;return Array.isArray(r)?n.createElement(n.Fragment,null,r.map(((e,r)=>n.createElement(c,{key:r,useBrick:e,data:t,errorBoundary:s})))):n.createElement(c,{useBrick:r,data:t,errorBoundary:s})};const a=(0,s.getV2RuntimeFromDll)();if(a){const{SingleBrickAsComponentFactory:e,BrickAsComponentFactory:r}=a;e&&r&&(c=e(n),u=r(n))}function o(){const[e,r]=(0,n.useState)(s.getCurrentTheme);return(0,n.useEffect)((()=>{const e=e=>{r(e.detail)};return window.addEventListener("theme.change",e),()=>{window.removeEventListener("theme.change",e)}}),[]),e}function i(){const[e,r]=n.useState((()=>(0,s.getRuntime)().getRecentApps()));return n.useEffect((()=>{const e=e=>{r(e.detail)};return window.addEventListener("app.change",e),()=>window.removeEventListener("app.change",e)}),[]),e}function l(){return i().currentApp}function d(){const[e,r]=n.useState(null);return n.useEffect((()=>{const e=e=>{r(e.detail)};return window.addEventListener("route.render",e),()=>window.removeEventListener("route.render",e)}),[]),e}const f={provider:"",customOptions:{onError:()=>{},transform:(e,r)=>r,data:void 0,loading:!1,suspense:!1,cache:!0},dependencies:void 0},p=Object.entries(f).reduce(((e,r)=>{let[t,n]=r;return"[object Object]"===Object.prototype.toString.call(n)?{...e,...n}:{...e,[t]:n}}),{});var g=t(1030);const y=new Map;function m(){const{provider:e,customOptions:r,dependencies:t,requestInit:c}=function(e,r,t){const s=(0,n.useMemo)((()=>"string"==typeof e?e:f.provider),[e,r]),c=(0,n.useMemo)((()=>{let t={};return(0,g.isObject)(e)?t=e:(0,g.isObject)(r)&&(t=r),{...p,...t}}),[e,r]),u=(0,n.useMemo)((()=>{const e=[...Object.keys(f),...Object.keys(f.customOptions)],{args:r=null,...t}=Object.keys(c).reduce(((r,t)=>(e.includes(t)||(r[t]=c[t]),r)),{});return{options:{...t},args:r}}),[c]),a=(0,n.useMemo)((()=>Array.isArray(r)?r:Array.isArray(t)?t:p.dependencies),[r,t]),o=c.loading||Array.isArray(a);return{provider:s,customOptions:(0,n.useMemo)((()=>({...Object.keys(f.customOptions).reduce(((e,r)=>(e[r]=c[r],e)),{}),loading:o})),[c]),requestInit:u,dependencies:a}}(...arguments),{onError:u,transform:a,suspense:o,cache:i,...l}=r,[d,m]=(0,n.useState)(l.loading),v=(0,n.useRef)("pending"),k=(0,n.useRef)(),h=(0,n.useRef)(!1),w=(0,n.useRef)(),_=(0,n.useRef)(),b=(0,n.useRef)(l.data),B=(0,n.useReducer)((()=>({})),[])[1],E=(0,n.useCallback)((async(e,r)=>{try{w.current=void 0,o||m(!0);const t=await async function(e,r,t){let n;const c=function(e){const r=e=>Object.keys(e).sort().map((r=>({[r]:e[r]})));for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];try{const t="object"!=typeof(c=n)||null===c||Array.isArray(c)?n.map((e=>function(e){return"string"==typeof e}(e)?e:r(e))):r(n);return JSON.stringify({provider:e,args:t})}catch(r){return JSON.stringify({provider:e,args:n})}var c}(e,...t);return!r&&y.has(c)&&y.delete(c),y.has(c)?n=y.get(c):(n=(0,s.fetchByProvider)(e,t),r&&y.set(c,n)),n}(e,i,r);_.current=t,b.current=a(b.current,t)}catch(e){w.current=e,b.current=void 0}return o||m(!1),w.current&&u(w.current),b.current}),[e,r,t,c,o,a,l.data,u,i]),O=(0,n.useCallback)((async(r,t)=>{let n=e,s=[];return(0,g.isString)(r)&&(n=r),(0,g.isObject)(r)?s=r:(0,g.isObject)(t)&&(s=t),o?(async()=>(k.current=E(n,s).then((e=>(v.current="success",e)),(e=>(v.current="error",e.current=e,e))),B(),await k.current))():E(n,s)}),[E]),R=(0,n.useMemo)((()=>Object.defineProperties({query:O},{loading:{get:()=>d},data:{get:()=>b.current},error:{get:()=>w.current}})),[O]);if((0,n.useEffect)((()=>(h.current=!0,Array.isArray(t)&&e&&R.query(e,c.args),()=>h.current=!1)),t),o&&k.current)switch(v.current){case"pending":throw k.current;case"error":throw w.current}return Object.assign([R,_.current,d,w.current],{request:R,...R,response:_.current,data:b.current,loading:d,error:w.current})}var v=t(1389);async function k(e,r){return await s.__secret_internals.loadBricks([e]),(0,v.wrapBrick)(e,r)}function h(){const[e,r]=(0,n.useState)((()=>(0,s.getRuntime)().getNavConfig()));return(0,n.useEffect)((()=>{const e=e=>{r(e.detail)};return window.addEventListener("navConfig.change",e),()=>window.removeEventListener("navConfig.change",e)}),[]),e}function w(e,r){return(0,n.useMemo)((()=>null!=e?(0,n.lazy)((async()=>({default:await k(e,r)}))):null),[e,r])}}}]);
|
|
2
|
+
//# sourceMappingURL=4837.f5538448.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/7218.764309e9.js","mappings":"oYAIA,IAAIA,EAAgB,SAAuBC,GACzC,IAAI,SACFC,EAAQ,KACRC,EAAI,cACJC,EAAa,YACbC,EAAW,gBACXC,GACEL,EACJ,MAAOM,EAAcC,IAAmB,IAAAC,UAAS,MAC3CC,GAAc,IAAAC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,IACM3I,EAAKuB,SAGhBC,MAAO,CACLmH,IAAG,IACMnH,EAAMD,YAGf,CAACwH,IAUL,IAPA,IAAA7H,YAAU,KACR+F,EAAQ1F,SAAU,EACdoB,MAAMC,QAAQuC,IAAiBT,GACjCyE,EAAQE,MAAM3E,EAAUoB,EAAYS,MAE/B,IAAMU,EAAQ1F,SAAU,IAC9B4D,GACCF,GAAY+B,EAAUzF,QACxB,OAAQwF,EAAexF,SACrB,IAAK,UACH,MAAMyF,EAAUzF,QAElB,IAAK,QACH,MAAMC,EAAMD,QAGlB,OAAO6D,OAAOkE,OAAO,CAACH,EAASjC,EAAS3F,QAASyD,EAASxD,EAAMD,SAAU,CACxE4H,aACGA,EACHjC,SAAUA,EAAS3F,QACnBvB,KAAMA,EAAKuB,QACXyD,UACAxD,MAAOA,EAAMD,SAEjB,C,cEjGOH,eAAemI,EAAeC,EAAWC,GAE9C,aADM,EAAA1I,mBAAmB2I,WAAW,CAACF,KAC9B,IAAAG,WAAUH,EAAWC,EAC9B,CClBO,SAASG,IACd,MAAOC,EAAWC,IAAgB,IAAAxJ,WAAS,KAAM,IAAA2D,cAAa8F,iBAQ9D,OAPA,IAAA7I,YAAU,KACR,MAAMiD,EAAWV,IACfqG,EAAarG,EAAMC,OAAO,EAG5B,OADAC,OAAOC,iBAAiB,mBAAoBO,GACrC,IAAMR,OAAOE,oBAAoB,mBAAoBM,EAAS,GACpE,IACI0F,CACT,CC2CO,SAASG,EAAiBR,EAAWC,GAC1C,OAAO,IAAA5I,UAAQ,IACI,MAAb2I,GACkB,IAAAS,OAAK7I,UAAY,CACnC8I,cAAeX,EAAeC,EAAWC,OAGtC,MACN,CAACD,EAAWC,GACjB,C","sources":["webpack:///../../node_modules/@next-core/react-runtime/dist/esm/ReactUseBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentTheme.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRecentApps.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentApp.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRouteRender.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProviderArgsDefaults.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/fetch.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProvider.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProviderArgs.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/asyncWrapBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useNavConfig.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useLazyWrapBrick.js"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { __secret_internals, handleHttpError, getV2RuntimeFromDll } from \"@next-core/runtime\";\n// Note: always synchronize code in LegacyUseBrick:\n// `bricks/v2-adapter/src/data-providers/legacy-brick-kit/getLegacyUseBrick.ts`\nlet ReactUseBrick = function ReactUseBrick(_ref) {\n let {\n useBrick,\n data,\n errorBoundary,\n refCallback,\n ignoredCallback\n } = _ref;\n const [renderResult, setRenderResult] = useState(null);\n const mountResult = useRef();\n const [renderKey, setRenderKey] = useState();\n const IdCounterRef = useRef(0);\n const initialRenderId = useMemo(() => {\n var _secret_internals$ge;\n return (_secret_internals$ge = __secret_internals.getRenderId) === null || _secret_internals$ge === void 0 ? void 0 : _secret_internals$ge.call(__secret_internals);\n }, []);\n useEffect(() => {\n let ignore = false;\n async function init() {\n try {\n const newRender = await __secret_internals.renderUseBrick(useBrick, data, errorBoundary);\n if (ignore) {\n return;\n }\n setRenderResult(newRender);\n setRenderKey(getUniqueId(IdCounterRef));\n } catch (error) {\n if (!ignore && isTheSameRender(initialRenderId)) {\n // eslint-disable-next-line no-console\n console.error(\"Render useBrick failed:\", useBrick, \"with data:\", data);\n handleHttpError(error);\n }\n }\n }\n init();\n return () => {\n ignore = true;\n };\n }, [data, useBrick, initialRenderId, errorBoundary]);\n const _refCallback = useCallback(element => {\n if (element) {\n mountResult.current = __secret_internals.mountUseBrick(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n renderResult, element);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n __secret_internals.unmountUseBrick(renderResult, mountResult.current);\n mountResult.current = undefined;\n }\n refCallback === null || refCallback === void 0 || refCallback(element);\n }, [refCallback, renderResult]);\n if (!renderResult) {\n // Fallback when loading/\n return null;\n // return <span>🌀 Loading...</span>;\n }\n const {\n tagName\n } = renderResult;\n if (tagName === null) {\n ignoredCallback === null || ignoredCallback === void 0 || ignoredCallback();\n return null;\n }\n const WebComponent = tagName;\n return /*#__PURE__*/React.createElement(WebComponent, {\n key: renderKey,\n ref: _refCallback\n });\n};\nfunction getUniqueId(ref) {\n return ++ref.current;\n}\nfunction isTheSameRender(initialRenderId) {\n var _secret_internals$ge2;\n const newRenderId = (_secret_internals$ge2 = __secret_internals.getRenderId) === null || _secret_internals$ge2 === void 0 ? void 0 : _secret_internals$ge2.call(__secret_internals);\n return !initialRenderId || !newRenderId || initialRenderId === newRenderId;\n}\nlet ReactUseMultipleBricks = function ReactUseMultipleBricks(_ref2) {\n let {\n useBrick,\n data,\n errorBoundary\n } = _ref2;\n if (Array.isArray(useBrick)) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(ReactUseBrick, {\n key: index,\n useBrick: item,\n data: data,\n errorBoundary: errorBoundary\n })));\n }\n return /*#__PURE__*/React.createElement(ReactUseBrick, {\n useBrick: useBrick,\n data: data,\n errorBoundary: errorBoundary\n });\n};\n\n// Make v3 bricks compatible with Brick Next v2.\n// istanbul ignore next\nconst v2Kit = getV2RuntimeFromDll();\n// istanbul ignore next\nif (v2Kit) {\n const {\n SingleBrickAsComponentFactory,\n BrickAsComponentFactory\n } = v2Kit;\n if (SingleBrickAsComponentFactory && BrickAsComponentFactory) {\n ReactUseBrick = SingleBrickAsComponentFactory(React);\n ReactUseMultipleBricks = BrickAsComponentFactory(React);\n }\n}\nexport { ReactUseBrick, ReactUseMultipleBricks };\n//# sourceMappingURL=ReactUseBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getCurrentTheme } from \"@next-core/runtime\";\nexport function useCurrentTheme() {\n const [currentTheme, setCurrentTheme] = useState(getCurrentTheme);\n useEffect(() => {\n const listenToThemeChange = event => {\n setCurrentTheme(event.detail);\n };\n window.addEventListener(\"theme.change\", listenToThemeChange);\n return () => {\n window.removeEventListener(\"theme.change\", listenToThemeChange);\n };\n }, []);\n return currentTheme;\n}\n//# sourceMappingURL=useCurrentTheme.js.map","import React from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useRecentApps() {\n const [recentApps, setRecentApps] = React.useState(() => getRuntime().getRecentApps());\n React.useEffect(() => {\n const listener = event => {\n setRecentApps(event.detail);\n };\n window.addEventListener(\"app.change\", listener);\n return () => window.removeEventListener(\"app.change\", listener);\n }, []);\n return recentApps;\n}\n//# sourceMappingURL=useRecentApps.js.map","import { useRecentApps } from \"./useRecentApps.js\";\n\n/**\n * 获取当前所在微应用信息的 React hooks。\n *\n * @example\n *\n * ```tsx\n * function MyReactComponent() {\n * const app = useCurrentApp();\n * return <div>{app.id}</div>;\n * }\n * ```\n *\n * @returns 当前所在微应用的信息。\n */\nexport function useCurrentApp() {\n return useRecentApps().currentApp;\n}\n//# sourceMappingURL=useCurrentApp.js.map","import React from \"react\";\nexport function useRouteRender() {\n const [routeRender, setRouteRender] = React.useState(null);\n React.useEffect(() => {\n const listener = event => {\n setRouteRender(event.detail);\n };\n window.addEventListener(\"route.render\", listener);\n return () => window.removeEventListener(\"route.render\", listener);\n }, []);\n return routeRender;\n}\n//# sourceMappingURL=useRouteRender.js.map","export const useProviderArgsDefaults = {\n provider: \"\",\n customOptions: {\n onError: () => {\n /* Do nothing.. */\n },\n transform: (oldData, newData) => newData,\n data: undefined,\n loading: false,\n suspense: false,\n cache: true\n },\n dependencies: undefined\n};\nexport default Object.entries(useProviderArgsDefaults).reduce((acc, _ref) => {\n let [key, value] = _ref;\n if (Object.prototype.toString.call(value) === \"[object Object]\") return {\n ...acc,\n ...value\n };\n return {\n ...acc,\n [key]: value\n };\n}, {});\n//# sourceMappingURL=useProviderArgsDefaults.js.map","import { fetchByProvider } from \"@next-core/runtime\";\nconst cacheMap = new Map();\nfunction isObj(v) {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\nfunction isString(v) {\n return typeof v === \"string\";\n}\nfunction buildSortedCacheKey(provider) {\n const sortObj = obj => Object.keys(obj).sort().map(k => ({\n [k]: obj[k]\n }));\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n try {\n const sortedArgs = isObj(args) ? sortObj(args) : args.map(arg => isString(arg) ? arg : sortObj(arg));\n return JSON.stringify({\n provider,\n args: sortedArgs\n });\n } catch (e) {\n return JSON.stringify({\n provider,\n args\n });\n }\n}\nexport default async function fetch(provider, cache, args) {\n let promise;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const cacheKey = buildSortedCacheKey(provider, ...args);\n !cache && cacheMap.has(cacheKey) && cacheMap.delete(cacheKey);\n if (cacheMap.has(cacheKey)) {\n promise = cacheMap.get(cacheKey);\n } else {\n promise = (() => {\n return fetchByProvider(provider, args);\n })();\n cache && cacheMap.set(cacheKey, promise);\n }\n return promise;\n}\n//# sourceMappingURL=fetch.js.map","import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from \"react\";\nimport useProviderArgs from \"./useProviderArgs.js\";\nimport { isObject, isString } from \"lodash\";\nimport fetch from \"./fetch.js\";\nexport function useProvider() {\n const {\n provider,\n customOptions,\n dependencies,\n requestInit\n } = useProviderArgs(...arguments);\n const {\n onError,\n transform,\n suspense,\n cache,\n ...defaults\n } = customOptions;\n const [loading, setLoading] = useState(defaults.loading);\n const suspenseStatus = useRef(\"pending\");\n const suspender = useRef();\n const mounted = useRef(false);\n const error = useRef();\n const response = useRef();\n const data = useRef(defaults.data);\n const forceUpdate = useReducer(() => ({}), [])[1];\n const doFetch = useCallback(async (provider, providerArgs) => {\n try {\n error.current = undefined;\n if (!suspense) setLoading(true);\n const newRes = await fetch(provider, cache, providerArgs);\n response.current = newRes;\n data.current = transform(data.current, newRes);\n } catch (e) {\n error.current = e;\n data.current = undefined;\n }\n if (!suspense) setLoading(false);\n if (error.current) onError(error.current);\n return data.current;\n }, [provider, customOptions, dependencies, requestInit, suspense, transform, defaults.data, onError, cache]);\n const makeFetch = useCallback(async (providerOrBody, args) => {\n let providerStr = provider;\n let providerArgs = [];\n if (isString(providerOrBody)) {\n providerStr = providerOrBody;\n }\n if (isObject(providerOrBody)) {\n providerArgs = providerOrBody;\n } else if (isObject(args)) {\n providerArgs = args;\n }\n if (suspense) {\n return (async () => {\n suspender.current = doFetch(providerStr, providerArgs).then(newData => {\n suspenseStatus.current = \"success\";\n return newData;\n }, error => {\n /* istanbul ignore next */\n suspenseStatus.current = \"error\";\n error.current = error;\n return error;\n });\n forceUpdate();\n return await suspender.current;\n })();\n }\n return doFetch(providerStr, providerArgs);\n }, [doFetch]);\n const request = useMemo(() => Object.defineProperties({\n query: makeFetch\n }, {\n loading: {\n get() {\n return loading;\n }\n },\n data: {\n get() {\n return data.current;\n }\n },\n error: {\n get() {\n return error.current;\n }\n }\n }), [makeFetch]);\n\n // onMount/onUpdate\n useEffect(() => {\n mounted.current = true;\n if (Array.isArray(dependencies) && provider) {\n request.query(provider, requestInit.args);\n }\n return () => mounted.current = false;\n }, dependencies);\n if (suspense && suspender.current) {\n switch (suspenseStatus.current) {\n case \"pending\":\n throw suspender.current;\n /* istanbul ignore next */\n case \"error\":\n throw error.current;\n }\n }\n return Object.assign([request, response.current, loading, error.current], {\n request,\n ...request,\n response: response.current,\n data: data.current,\n loading,\n error: error.current\n });\n}\n//# sourceMappingURL=useProvider.js.map","import { useMemo } from \"react\";\nimport defaults, { useProviderArgsDefaults } from \"./useProviderArgsDefaults.js\";\nimport { isObject } from \"lodash\";\nexport default function useProviderArgs(providerOrParamsOrGlobalOptions, globalOptionsOrDeps, deps) {\n const provider = useMemo(() => {\n if (typeof providerOrParamsOrGlobalOptions === \"string\") {\n return providerOrParamsOrGlobalOptions;\n }\n return useProviderArgsDefaults.provider;\n }, [providerOrParamsOrGlobalOptions, globalOptionsOrDeps]);\n const options = useMemo(() => {\n let localOptions = {};\n if (isObject(providerOrParamsOrGlobalOptions)) {\n localOptions = providerOrParamsOrGlobalOptions;\n } else if (isObject(globalOptionsOrDeps)) {\n localOptions = globalOptionsOrDeps;\n }\n return {\n ...defaults,\n ...localOptions\n };\n }, [providerOrParamsOrGlobalOptions, globalOptionsOrDeps]);\n const requestInit = useMemo(() => {\n const customOptionKeys = [...Object.keys(useProviderArgsDefaults), ...Object.keys(useProviderArgsDefaults.customOptions)];\n const {\n args = null,\n ...restOptions\n } = Object.keys(options).reduce((acc, key) => {\n if (!customOptionKeys.includes(key)) acc[key] = options[key];\n return acc;\n }, {});\n return {\n options: {\n ...restOptions\n },\n args\n };\n }, [options]);\n const dependencies = useMemo(() => {\n if (Array.isArray(globalOptionsOrDeps)) return globalOptionsOrDeps;\n if (Array.isArray(deps)) return deps;\n return defaults.dependencies;\n }, [globalOptionsOrDeps, deps]);\n const loading = options.loading || Array.isArray(dependencies);\n const customOptions = useMemo(() => {\n const customOptionKeys = Object.keys(useProviderArgsDefaults.customOptions);\n const customOptions = customOptionKeys.reduce((opts, key) => {\n opts[key] = options[key];\n return opts;\n }, {});\n return {\n ...customOptions,\n loading\n };\n }, [options]);\n return {\n provider,\n customOptions,\n requestInit,\n dependencies\n };\n}\n//# sourceMappingURL=useProviderArgs.js.map","import { __secret_internals } from \"@next-core/runtime\";\nimport { wrapBrick } from \"@next-core/react-element\";\n\n/**\n * 使用异步加载的方式包装一个构件,可用于按条件渲染的构件依赖。\n *\n * 例如提供复杂弹层内容的按钮构件,其内容需要使用到一些大型构件,那么这些依赖可以使用 asyncWrapBrick,\n * 这样只有在需要时才会加载这些依赖的构件。\n */\n\n/**\n * 使用异步加载的方式包装一个构件,可用于按条件渲染的构件依赖。\n *\n * 例如提供复杂弹层内容的按钮构件,其内容需要使用到一些大型构件,那么这些依赖可以使用 asyncWrapBrick,\n * 这样只有在需要时才会加载这些依赖的构件。\n */\n\nexport async function asyncWrapBrick(brickName, eventsMapping) {\n await __secret_internals.loadBricks([brickName]);\n return wrapBrick(brickName, eventsMapping);\n}\n//# sourceMappingURL=asyncWrapBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useNavConfig() {\n const [navConfig, setNavConfig] = useState(() => getRuntime().getNavConfig());\n useEffect(() => {\n const listener = event => {\n setNavConfig(event.detail);\n };\n window.addEventListener(\"navConfig.change\", listener);\n return () => window.removeEventListener(\"navConfig.change\", listener);\n }, []);\n return navConfig;\n}\n//# sourceMappingURL=useNavConfig.js.map","import { lazy, useMemo } from \"react\";\nimport { asyncWrapBrick } from \"./asyncWrapBrick.js\";\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\nexport function useLazyWrapBrick(brickName, eventsMapping) {\n return useMemo(() => {\n if (brickName != null) {\n return /*#__PURE__*/lazy(async () => ({\n default: await asyncWrapBrick(brickName, eventsMapping)\n }));\n }\n return null;\n }, [brickName, eventsMapping]);\n}\n//# sourceMappingURL=useLazyWrapBrick.js.map"],"names":["ReactUseBrick","_ref","useBrick","data","errorBoundary","refCallback","ignoredCallback","renderResult","setRenderResult","useState","mountResult","useRef","renderKey","setRenderKey","IdCounterRef","initialRenderId","useMemo","_secret_internals$ge","__secret_internals","getRenderId","call","useEffect","ignore","async","newRender","renderUseBrick","current","error","_secret_internals$ge2","newRenderId","isTheSameRender","console","handleHttpError","init","_refCallback","useCallback","element","mountUseBrick","unmountUseBrick","undefined","tagName","WebComponent","key","ref","ReactUseMultipleBricks","_ref2","Array","isArray","map","item","index","v2Kit","getV2RuntimeFromDll","SingleBrickAsComponentFactory","BrickAsComponentFactory","useCurrentTheme","currentTheme","setCurrentTheme","getCurrentTheme","listenToThemeChange","event","detail","window","addEventListener","removeEventListener","useRecentApps","recentApps","setRecentApps","getRuntime","getRecentApps","listener","useCurrentApp","currentApp","useRouteRender","routeRender","setRouteRender","useProviderArgsDefaults","provider","customOptions","onError","transform","oldData","newData","loading","suspense","cache","dependencies","Object","entries","reduce","acc","value","prototype","toString","cacheMap","Map","useProvider","requestInit","providerOrParamsOrGlobalOptions","globalOptionsOrDeps","deps","options","localOptions","isObject","customOptionKeys","keys","args","restOptions","includes","opts","useProviderArgs","arguments","defaults","setLoading","suspenseStatus","suspender","mounted","response","forceUpdate","useReducer","doFetch","providerArgs","newRes","promise","cacheKey","sortObj","obj","sort","k","_len","length","_key","sortedArgs","v","arg","isString","JSON","stringify","e","buildSortedCacheKey","has","delete","get","fetchByProvider","set","fetch","makeFetch","providerOrBody","providerStr","then","request","defineProperties","query","assign","asyncWrapBrick","brickName","eventsMapping","loadBricks","wrapBrick","useNavConfig","navConfig","setNavConfig","getNavConfig","useLazyWrapBrick","lazy","default"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"chunks/4837.f5538448.js","mappings":"mYAIA,IAAIA,EAAgB,SAAuBC,GACzC,IAAI,SACFC,EAAQ,KACRC,EAAI,cACJC,EAAa,YACbC,EAAW,gBACXC,GACEL,EACJ,MAAOM,EAAcC,IAAmB,IAAAC,UAAS,MAC3CC,GAAc,IAAAC,WACbC,EAAWC,IAAgB,IAAAJ,YAC5BK,GAAe,IAAAH,QAAO,GACtBI,GAAkB,IAAAC,UAAQ,KAC9B,IAAIC,EACJ,OAAmE,QAA3DA,EAAuB,EAAAC,mBAAmBC,mBAAkD,IAAzBF,OAAkC,EAASA,EAAqBG,KAAK,EAAAF,mBAAmB,GAClK,KACH,IAAAG,YAAU,KACR,IAAIC,GAAS,EAkBb,OAjBAC,iBACE,IACE,MAAMC,QAAkB,EAAAN,mBAAmBO,eAAevB,EAAUC,EAAMC,GAC1E,GAAIkB,EACF,OAEFd,EAAgBgB,GAChBX,IAAyBC,EA6ClBY,QA5CT,CAAE,MAAOC,IACFL,GA6Cb,SAAyBP,GACvB,IAAIa,EACJ,MAAMC,EAA2E,QAA5DD,EAAwB,EAAAV,mBAAmBC,mBAAmD,IAA1BS,OAAmC,EAASA,EAAsBR,KAAK,EAAAF,oBAChK,OAAQH,IAAoBc,GAAed,IAAoBc,CACjE,CAjDuBC,CAAgBf,KAE7BgB,QAAQJ,MAAM,0BAA2BzB,EAAU,aAAcC,IACjE,IAAA6B,iBAAgBL,GAEpB,CACF,CACAM,GACO,KACLX,GAAS,CAAI,CACd,GACA,CAACnB,EAAMD,EAAUa,EAAiBX,IACrC,MAAM8B,GAAe,IAAAC,cAAYC,IAC3BA,EACF1B,EAAYgB,QAAU,EAAAR,mBAAmBmB,cAEzC9B,EAAc6B,IAGd,EAAAlB,mBAAmBoB,gBAAgB/B,EAAcG,EAAYgB,SAC7DhB,EAAYgB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,UAAQ,IACI,MAAb2I,GACkB,IAAAS,OAAK7I,UAAY,CACnC8I,cAAeX,EAAeC,EAAWC,OAGtC,MACN,CAACD,EAAWC,GACjB,C","sources":["webpack:///../../node_modules/@next-core/react-runtime/dist/esm/ReactUseBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentTheme.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRecentApps.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentApp.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRouteRender.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProviderArgsDefaults.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/fetch.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProvider.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProviderArgs.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/asyncWrapBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useNavConfig.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useLazyWrapBrick.js"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { __secret_internals, handleHttpError, getV2RuntimeFromDll } from \"@next-core/runtime\";\n// Note: always synchronize code in LegacyUseBrick:\n// `bricks/v2-adapter/src/data-providers/legacy-brick-kit/getLegacyUseBrick.ts`\nlet ReactUseBrick = function ReactUseBrick(_ref) {\n let {\n useBrick,\n data,\n errorBoundary,\n refCallback,\n ignoredCallback\n } = _ref;\n const [renderResult, setRenderResult] = useState(null);\n const mountResult = useRef();\n const [renderKey, setRenderKey] = useState();\n const IdCounterRef = useRef(0);\n const initialRenderId = useMemo(() => {\n var _secret_internals$ge;\n return (_secret_internals$ge = __secret_internals.getRenderId) === null || _secret_internals$ge === void 0 ? void 0 : _secret_internals$ge.call(__secret_internals);\n }, []);\n useEffect(() => {\n let ignore = false;\n async function init() {\n try {\n const newRender = await __secret_internals.renderUseBrick(useBrick, data, errorBoundary);\n if (ignore) {\n return;\n }\n setRenderResult(newRender);\n setRenderKey(getUniqueId(IdCounterRef));\n } catch (error) {\n if (!ignore && isTheSameRender(initialRenderId)) {\n // eslint-disable-next-line no-console\n console.error(\"Render useBrick failed:\", useBrick, \"with data:\", data);\n handleHttpError(error);\n }\n }\n }\n init();\n return () => {\n ignore = true;\n };\n }, [data, useBrick, initialRenderId, errorBoundary]);\n const _refCallback = useCallback(element => {\n if (element) {\n mountResult.current = __secret_internals.mountUseBrick(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n renderResult, element);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n __secret_internals.unmountUseBrick(renderResult, mountResult.current);\n mountResult.current = undefined;\n }\n refCallback === null || refCallback === void 0 || refCallback(element);\n }, [refCallback, renderResult]);\n if (!renderResult) {\n // Fallback when loading/\n return null;\n // return <span>🌀 Loading...</span>;\n }\n const {\n tagName\n } = renderResult;\n if (tagName === null) {\n ignoredCallback === null || ignoredCallback === void 0 || ignoredCallback();\n return null;\n }\n const WebComponent = tagName;\n return /*#__PURE__*/React.createElement(WebComponent, {\n key: renderKey,\n ref: _refCallback\n });\n};\nfunction getUniqueId(ref) {\n return ++ref.current;\n}\nfunction isTheSameRender(initialRenderId) {\n var _secret_internals$ge2;\n const newRenderId = (_secret_internals$ge2 = __secret_internals.getRenderId) === null || _secret_internals$ge2 === void 0 ? void 0 : _secret_internals$ge2.call(__secret_internals);\n return !initialRenderId || !newRenderId || initialRenderId === newRenderId;\n}\nlet ReactUseMultipleBricks = function ReactUseMultipleBricks(_ref2) {\n let {\n useBrick,\n data,\n errorBoundary\n } = _ref2;\n if (Array.isArray(useBrick)) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(ReactUseBrick, {\n key: index,\n useBrick: item,\n data: data,\n errorBoundary: errorBoundary\n })));\n }\n return /*#__PURE__*/React.createElement(ReactUseBrick, {\n useBrick: useBrick,\n data: data,\n errorBoundary: errorBoundary\n });\n};\n\n// Make v3 bricks compatible with Brick Next v2.\n// istanbul ignore next\nconst v2Kit = getV2RuntimeFromDll();\n// istanbul ignore next\nif (v2Kit) {\n const {\n SingleBrickAsComponentFactory,\n BrickAsComponentFactory\n } = v2Kit;\n if (SingleBrickAsComponentFactory && BrickAsComponentFactory) {\n ReactUseBrick = SingleBrickAsComponentFactory(React);\n ReactUseMultipleBricks = BrickAsComponentFactory(React);\n }\n}\nexport { ReactUseBrick, ReactUseMultipleBricks };\n//# sourceMappingURL=ReactUseBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getCurrentTheme } from \"@next-core/runtime\";\nexport function useCurrentTheme() {\n const [currentTheme, setCurrentTheme] = useState(getCurrentTheme);\n useEffect(() => {\n const listenToThemeChange = event => {\n setCurrentTheme(event.detail);\n };\n window.addEventListener(\"theme.change\", listenToThemeChange);\n return () => {\n window.removeEventListener(\"theme.change\", listenToThemeChange);\n };\n }, []);\n return currentTheme;\n}\n//# sourceMappingURL=useCurrentTheme.js.map","import React from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useRecentApps() {\n const [recentApps, setRecentApps] = React.useState(() => getRuntime().getRecentApps());\n React.useEffect(() => {\n const listener = event => {\n setRecentApps(event.detail);\n };\n window.addEventListener(\"app.change\", listener);\n return () => window.removeEventListener(\"app.change\", listener);\n }, []);\n return recentApps;\n}\n//# sourceMappingURL=useRecentApps.js.map","import { useRecentApps } from \"./useRecentApps.js\";\n\n/**\n * 获取当前所在微应用信息的 React hooks。\n *\n * @example\n *\n * ```tsx\n * function MyReactComponent() {\n * const app = useCurrentApp();\n * return <div>{app.id}</div>;\n * }\n * ```\n *\n * @returns 当前所在微应用的信息。\n */\nexport function useCurrentApp() {\n return useRecentApps().currentApp;\n}\n//# sourceMappingURL=useCurrentApp.js.map","import React from \"react\";\nexport function useRouteRender() {\n const [routeRender, setRouteRender] = React.useState(null);\n React.useEffect(() => {\n const listener = event => {\n setRouteRender(event.detail);\n };\n window.addEventListener(\"route.render\", listener);\n return () => window.removeEventListener(\"route.render\", listener);\n }, []);\n return routeRender;\n}\n//# sourceMappingURL=useRouteRender.js.map","export const useProviderArgsDefaults = {\n provider: \"\",\n customOptions: {\n onError: () => {\n /* Do nothing.. */\n },\n transform: (oldData, newData) => newData,\n data: undefined,\n loading: false,\n suspense: false,\n cache: true\n },\n dependencies: undefined\n};\nexport default Object.entries(useProviderArgsDefaults).reduce((acc, _ref) => {\n let [key, value] = _ref;\n if (Object.prototype.toString.call(value) === \"[object Object]\") return {\n ...acc,\n ...value\n };\n return {\n ...acc,\n [key]: value\n };\n}, {});\n//# sourceMappingURL=useProviderArgsDefaults.js.map","import { fetchByProvider } from \"@next-core/runtime\";\nconst cacheMap = new Map();\nfunction isObj(v) {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\nfunction isString(v) {\n return typeof v === \"string\";\n}\nfunction buildSortedCacheKey(provider) {\n const sortObj = obj => Object.keys(obj).sort().map(k => ({\n [k]: obj[k]\n }));\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n try {\n const sortedArgs = isObj(args) ? sortObj(args) : args.map(arg => isString(arg) ? arg : sortObj(arg));\n return JSON.stringify({\n provider,\n args: sortedArgs\n });\n } catch (e) {\n return JSON.stringify({\n provider,\n args\n });\n }\n}\nexport default async function fetch(provider, cache, args) {\n let promise;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const cacheKey = buildSortedCacheKey(provider, ...args);\n !cache && cacheMap.has(cacheKey) && cacheMap.delete(cacheKey);\n if (cacheMap.has(cacheKey)) {\n promise = cacheMap.get(cacheKey);\n } else {\n promise = (() => {\n return fetchByProvider(provider, args);\n })();\n cache && cacheMap.set(cacheKey, promise);\n }\n return promise;\n}\n//# sourceMappingURL=fetch.js.map","import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from \"react\";\nimport useProviderArgs from \"./useProviderArgs.js\";\nimport { isObject, isString } from \"lodash\";\nimport fetch from \"./fetch.js\";\nexport function useProvider() {\n const {\n provider,\n customOptions,\n dependencies,\n requestInit\n } = useProviderArgs(...arguments);\n const {\n onError,\n transform,\n suspense,\n cache,\n ...defaults\n } = customOptions;\n const [loading, setLoading] = useState(defaults.loading);\n const suspenseStatus = useRef(\"pending\");\n const suspender = useRef();\n const mounted = useRef(false);\n const error = useRef();\n const response = useRef();\n const data = useRef(defaults.data);\n const forceUpdate = useReducer(() => ({}), [])[1];\n const doFetch = useCallback(async (provider, providerArgs) => {\n try {\n error.current = undefined;\n if (!suspense) setLoading(true);\n const newRes = await fetch(provider, cache, providerArgs);\n response.current = newRes;\n data.current = transform(data.current, newRes);\n } catch (e) {\n error.current = e;\n data.current = undefined;\n }\n if (!suspense) setLoading(false);\n if (error.current) onError(error.current);\n return data.current;\n }, [provider, customOptions, dependencies, requestInit, suspense, transform, defaults.data, onError, cache]);\n const makeFetch = useCallback(async (providerOrBody, args) => {\n let providerStr = provider;\n let providerArgs = [];\n if (isString(providerOrBody)) {\n providerStr = providerOrBody;\n }\n if (isObject(providerOrBody)) {\n providerArgs = providerOrBody;\n } else if (isObject(args)) {\n providerArgs = args;\n }\n if (suspense) {\n return (async () => {\n suspender.current = doFetch(providerStr, providerArgs).then(newData => {\n suspenseStatus.current = \"success\";\n return newData;\n }, error => {\n /* istanbul ignore next */\n suspenseStatus.current = \"error\";\n error.current = error;\n return error;\n });\n forceUpdate();\n return await suspender.current;\n })();\n }\n return doFetch(providerStr, providerArgs);\n }, [doFetch]);\n const request = useMemo(() => Object.defineProperties({\n query: makeFetch\n }, {\n loading: {\n get() {\n return loading;\n }\n },\n data: {\n get() {\n return data.current;\n }\n },\n error: {\n get() {\n return error.current;\n }\n }\n }), [makeFetch]);\n\n // onMount/onUpdate\n useEffect(() => {\n mounted.current = true;\n if (Array.isArray(dependencies) && provider) {\n request.query(provider, requestInit.args);\n }\n return () => mounted.current = false;\n }, dependencies);\n if (suspense && suspender.current) {\n switch (suspenseStatus.current) {\n case \"pending\":\n throw suspender.current;\n /* istanbul ignore next */\n case \"error\":\n throw error.current;\n }\n }\n return Object.assign([request, response.current, loading, error.current], {\n request,\n ...request,\n response: response.current,\n data: data.current,\n loading,\n error: error.current\n });\n}\n//# sourceMappingURL=useProvider.js.map","import { useMemo } from \"react\";\nimport defaults, { useProviderArgsDefaults } from \"./useProviderArgsDefaults.js\";\nimport { isObject } from \"lodash\";\nexport default function useProviderArgs(providerOrParamsOrGlobalOptions, globalOptionsOrDeps, deps) {\n const provider = useMemo(() => {\n if (typeof providerOrParamsOrGlobalOptions === \"string\") {\n return providerOrParamsOrGlobalOptions;\n }\n return useProviderArgsDefaults.provider;\n }, [providerOrParamsOrGlobalOptions, globalOptionsOrDeps]);\n const options = useMemo(() => {\n let localOptions = {};\n if (isObject(providerOrParamsOrGlobalOptions)) {\n localOptions = providerOrParamsOrGlobalOptions;\n } else if (isObject(globalOptionsOrDeps)) {\n localOptions = globalOptionsOrDeps;\n }\n return {\n ...defaults,\n ...localOptions\n };\n }, [providerOrParamsOrGlobalOptions, globalOptionsOrDeps]);\n const requestInit = useMemo(() => {\n const customOptionKeys = [...Object.keys(useProviderArgsDefaults), ...Object.keys(useProviderArgsDefaults.customOptions)];\n const {\n args = null,\n ...restOptions\n } = Object.keys(options).reduce((acc, key) => {\n if (!customOptionKeys.includes(key)) acc[key] = options[key];\n return acc;\n }, {});\n return {\n options: {\n ...restOptions\n },\n args\n };\n }, [options]);\n const dependencies = useMemo(() => {\n if (Array.isArray(globalOptionsOrDeps)) return globalOptionsOrDeps;\n if (Array.isArray(deps)) return deps;\n return defaults.dependencies;\n }, [globalOptionsOrDeps, deps]);\n const loading = options.loading || Array.isArray(dependencies);\n const customOptions = useMemo(() => {\n const customOptionKeys = Object.keys(useProviderArgsDefaults.customOptions);\n const customOptions = customOptionKeys.reduce((opts, key) => {\n opts[key] = options[key];\n return opts;\n }, {});\n return {\n ...customOptions,\n loading\n };\n }, [options]);\n return {\n provider,\n customOptions,\n requestInit,\n dependencies\n };\n}\n//# sourceMappingURL=useProviderArgs.js.map","import { __secret_internals } from \"@next-core/runtime\";\nimport { wrapBrick } from \"@next-core/react-element\";\n\n/**\n * 使用异步加载的方式包装一个构件,可用于按条件渲染的构件依赖。\n *\n * 例如提供复杂弹层内容的按钮构件,其内容需要使用到一些大型构件,那么这些依赖可以使用 asyncWrapBrick,\n * 这样只有在需要时才会加载这些依赖的构件。\n */\n\n/**\n * 使用异步加载的方式包装一个构件,可用于按条件渲染的构件依赖。\n *\n * 例如提供复杂弹层内容的按钮构件,其内容需要使用到一些大型构件,那么这些依赖可以使用 asyncWrapBrick,\n * 这样只有在需要时才会加载这些依赖的构件。\n */\n\nexport async function asyncWrapBrick(brickName, eventsMapping) {\n await __secret_internals.loadBricks([brickName]);\n return wrapBrick(brickName, eventsMapping);\n}\n//# sourceMappingURL=asyncWrapBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useNavConfig() {\n const [navConfig, setNavConfig] = useState(() => getRuntime().getNavConfig());\n useEffect(() => {\n const listener = event => {\n setNavConfig(event.detail);\n };\n window.addEventListener(\"navConfig.change\", listener);\n return () => window.removeEventListener(\"navConfig.change\", listener);\n }, []);\n return navConfig;\n}\n//# sourceMappingURL=useNavConfig.js.map","import { lazy, useMemo } from \"react\";\nimport { asyncWrapBrick } from \"./asyncWrapBrick.js\";\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\nexport function useLazyWrapBrick(brickName, eventsMapping) {\n return useMemo(() => {\n if (brickName != null) {\n return /*#__PURE__*/lazy(async () => ({\n default: await asyncWrapBrick(brickName, eventsMapping)\n }));\n }\n return null;\n }, [brickName, eventsMapping]);\n}\n//# sourceMappingURL=useLazyWrapBrick.js.map"],"names":["ReactUseBrick","_ref","useBrick","data","errorBoundary","refCallback","ignoredCallback","renderResult","setRenderResult","useState","mountResult","useRef","renderKey","setRenderKey","IdCounterRef","initialRenderId","useMemo","_secret_internals$ge","__secret_internals","getRenderId","call","useEffect","ignore","async","newRender","renderUseBrick","current","error","_secret_internals$ge2","newRenderId","isTheSameRender","console","handleHttpError","init","_refCallback","useCallback","element","mountUseBrick","unmountUseBrick","undefined","tagName","WebComponent","key","ref","ReactUseMultipleBricks","_ref2","Array","isArray","map","item","index","v2Kit","getV2RuntimeFromDll","SingleBrickAsComponentFactory","BrickAsComponentFactory","useCurrentTheme","currentTheme","setCurrentTheme","getCurrentTheme","listenToThemeChange","event","detail","window","addEventListener","removeEventListener","useRecentApps","recentApps","setRecentApps","getRuntime","getRecentApps","listener","useCurrentApp","currentApp","useRouteRender","routeRender","setRouteRender","useProviderArgsDefaults","provider","customOptions","onError","transform","oldData","newData","loading","suspense","cache","dependencies","Object","entries","reduce","acc","value","prototype","toString","cacheMap","Map","useProvider","requestInit","providerOrParamsOrGlobalOptions","globalOptionsOrDeps","deps","options","localOptions","isObject","customOptionKeys","keys","args","restOptions","includes","opts","useProviderArgs","arguments","defaults","setLoading","suspenseStatus","suspender","mounted","response","forceUpdate","useReducer","doFetch","providerArgs","newRes","promise","cacheKey","sortObj","obj","sort","k","_len","length","_key","sortedArgs","v","arg","isString","JSON","stringify","e","buildSortedCacheKey","has","delete","get","fetchByProvider","set","fetch","makeFetch","providerOrBody","providerStr","then","request","defineProperties","query","assign","asyncWrapBrick","brickName","eventsMapping","loadBricks","wrapBrick","useNavConfig","navConfig","setNavConfig","getNavConfig","useLazyWrapBrick","lazy","default"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[7218,4837],{4837:(e,r,t)=>{t.r(r),t.d(r,{ReactUseBrick:()=>c,ReactUseMultipleBricks:()=>u,asyncWrapBrick:()=>k,useCurrentApp:()=>l,useCurrentTheme:()=>o,useLazyWrapBrick:()=>w,useNavConfig:()=>h,useProvider:()=>m,useRecentApps:()=>i,useRouteRender:()=>d});var n=t(8769),s=t(184);let c=function(e){let{useBrick:r,data:t,errorBoundary:c,refCallback:u,ignoredCallback:a}=e;const[o,i]=(0,n.useState)(null),l=(0,n.useRef)(),[d,f]=(0,n.useState)(),p=(0,n.useRef)(0),g=(0,n.useMemo)((()=>{var e;return null===(e=s.__secret_internals.getRenderId)||void 0===e?void 0:e.call(s.__secret_internals)}),[]);(0,n.useEffect)((()=>{let e=!1;return async function(){try{const n=await s.__secret_internals.renderUseBrick(r,t,c);if(e)return;i(n),f(++p.current)}catch(n){!e&&function(e){var r;const t=null===(r=s.__secret_internals.getRenderId)||void 0===r?void 0:r.call(s.__secret_internals);return!e||!t||e===t}(g)&&(console.error("Render useBrick failed:",r,"with data:",t),(0,s.handleHttpError)(n))}}(),()=>{e=!0}}),[t,r,g,c]);const y=(0,n.useCallback)((e=>{e?l.current=s.__secret_internals.mountUseBrick(o,e):(s.__secret_internals.unmountUseBrick(o,l.current),l.current=void 0),null==u||u(e)}),[u,o]);if(!o)return null;const{tagName:m}=o;if(null===m)return null==a||a(),null;const v=m;return n.createElement(v,{key:d,ref:y})},u=function(e){let{useBrick:r,data:t,errorBoundary:s}=e;return Array.isArray(r)?n.createElement(n.Fragment,null,r.map(((e,r)=>n.createElement(c,{key:r,useBrick:e,data:t,errorBoundary:s})))):n.createElement(c,{useBrick:r,data:t,errorBoundary:s})};const a=(0,s.getV2RuntimeFromDll)();if(a){const{SingleBrickAsComponentFactory:e,BrickAsComponentFactory:r}=a;e&&r&&(c=e(n),u=r(n))}function o(){const[e,r]=(0,n.useState)(s.getCurrentTheme);return(0,n.useEffect)((()=>{const e=e=>{r(e.detail)};return window.addEventListener("theme.change",e),()=>{window.removeEventListener("theme.change",e)}}),[]),e}function i(){const[e,r]=n.useState((()=>(0,s.getRuntime)().getRecentApps()));return n.useEffect((()=>{const e=e=>{r(e.detail)};return window.addEventListener("app.change",e),()=>window.removeEventListener("app.change",e)}),[]),e}function l(){return i().currentApp}function d(){const[e,r]=n.useState(null);return n.useEffect((()=>{const e=e=>{r(e.detail)};return window.addEventListener("route.render",e),()=>window.removeEventListener("route.render",e)}),[]),e}const f={provider:"",customOptions:{onError:()=>{},transform:(e,r)=>r,data:void 0,loading:!1,suspense:!1,cache:!0},dependencies:void 0},p=Object.entries(f).reduce(((e,r)=>{let[t,n]=r;return"[object Object]"===Object.prototype.toString.call(n)?{...e,...n}:{...e,[t]:n}}),{});var g=t(1030);const y=new Map;function m(){const{provider:e,customOptions:r,dependencies:t,requestInit:c}=function(e,r,t){const s=(0,n.useMemo)((()=>"string"==typeof e?e:f.provider),[e,r]),c=(0,n.useMemo)((()=>{let t={};return(0,g.isObject)(e)?t=e:(0,g.isObject)(r)&&(t=r),{...p,...t}}),[e,r]),u=(0,n.useMemo)((()=>{const e=[...Object.keys(f),...Object.keys(f.customOptions)],{args:r=null,...t}=Object.keys(c).reduce(((r,t)=>(e.includes(t)||(r[t]=c[t]),r)),{});return{options:{...t},args:r}}),[c]),a=(0,n.useMemo)((()=>Array.isArray(r)?r:Array.isArray(t)?t:p.dependencies),[r,t]),o=c.loading||Array.isArray(a);return{provider:s,customOptions:(0,n.useMemo)((()=>({...Object.keys(f.customOptions).reduce(((e,r)=>(e[r]=c[r],e)),{}),loading:o})),[c]),requestInit:u,dependencies:a}}(...arguments),{onError:u,transform:a,suspense:o,cache:i,...l}=r,[d,m]=(0,n.useState)(l.loading),v=(0,n.useRef)("pending"),k=(0,n.useRef)(),h=(0,n.useRef)(!1),w=(0,n.useRef)(),_=(0,n.useRef)(),b=(0,n.useRef)(l.data),B=(0,n.useReducer)((()=>({})),[])[1],E=(0,n.useCallback)((async(e,r)=>{try{w.current=void 0,o||m(!0);const t=await async function(e,r,t){let n;const c=function(e){const r=e=>Object.keys(e).sort().map((r=>({[r]:e[r]})));for(var t=arguments.length,n=new Array(t>1?t-1:0),s=1;s<t;s++)n[s-1]=arguments[s];try{const t="object"!=typeof(c=n)||null===c||Array.isArray(c)?n.map((e=>function(e){return"string"==typeof e}(e)?e:r(e))):r(n);return JSON.stringify({provider:e,args:t})}catch(r){return JSON.stringify({provider:e,args:n})}var c}(e,...t);return!r&&y.has(c)&&y.delete(c),y.has(c)?n=y.get(c):(n=(0,s.fetchByProvider)(e,t),r&&y.set(c,n)),n}(e,i,r);_.current=t,b.current=a(b.current,t)}catch(e){w.current=e,b.current=void 0}return o||m(!1),w.current&&u(w.current),b.current}),[e,r,t,c,o,a,l.data,u,i]),O=(0,n.useCallback)((async(r,t)=>{let n=e,s=[];return(0,g.isString)(r)&&(n=r),(0,g.isObject)(r)?s=r:(0,g.isObject)(t)&&(s=t),o?(async()=>(k.current=E(n,s).then((e=>(v.current="success",e)),(e=>(v.current="error",e.current=e,e))),B(),await k.current))():E(n,s)}),[E]),R=(0,n.useMemo)((()=>Object.defineProperties({query:O},{loading:{get:()=>d},data:{get:()=>b.current},error:{get:()=>w.current}})),[O]);if((0,n.useEffect)((()=>(h.current=!0,Array.isArray(t)&&e&&R.query(e,c.args),()=>h.current=!1)),t),o&&k.current)switch(v.current){case"pending":throw k.current;case"error":throw w.current}return Object.assign([R,_.current,d,w.current],{request:R,...R,response:_.current,data:b.current,loading:d,error:w.current})}var v=t(1389);async function k(e,r){return await s.__secret_internals.loadBricks([e]),(0,v.wrapBrick)(e,r)}function h(){const[e,r]=(0,n.useState)((()=>(0,s.getRuntime)().getNavConfig()));return(0,n.useEffect)((()=>{const e=e=>{r(e.detail)};return window.addEventListener("navConfig.change",e),()=>window.removeEventListener("navConfig.change",e)}),[]),e}function w(e,r){return(0,n.useMemo)((()=>null!=e?(0,n.lazy)((async()=>({default:await k(e,r)}))):null),[e,r])}}}]);
|
|
2
|
+
//# sourceMappingURL=7218.22824b22.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/4837.efb19b28.js","mappings":"oYAIA,IAAIA,EAAgB,SAAuBC,GACzC,IAAI,SACFC,EAAQ,KACRC,EAAI,cACJC,EAAa,YACbC,EAAW,gBACXC,GACEL,EACJ,MAAOM,EAAcC,IAAmB,IAAAC,UAAS,MAC3CC,GAAc,IAAAC,WACbC,EAAWC,IAAgB,IAAAJ,YAC5BK,GAAe,IAAAH,QAAO,GACtBI,GAAkB,IAAAC,UAAQ,KAC9B,IAAIC,EACJ,OAAmE,QAA3DA,EAAuB,EAAAC,mBAAmBC,mBAAkD,IAAzBF,OAAkC,EAASA,EAAqBG,KAAK,EAAAF,mBAAmB,GAClK,KACH,IAAAG,YAAU,KACR,IAAIC,GAAS,EAkBb,OAjBAC,iBACE,IACE,MAAMC,QAAkB,EAAAN,mBAAmBO,eAAevB,EAAUC,EAAMC,GAC1E,GAAIkB,EACF,OAEFd,EAAgBgB,GAChBX,IAAyBC,EA6ClBY,QA5CT,CAAE,MAAOC,IACFL,GA6Cb,SAAyBP,GACvB,IAAIa,EACJ,MAAMC,EAA2E,QAA5DD,EAAwB,EAAAV,m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AxD,MAAOA,EAAMD,SAEjB,C,cEjGOH,eAAemI,EAAeC,EAAWC,GAE9C,aADM,EAAA1I,mBAAmB2I,WAAW,CAACF,KAC9B,IAAAG,WAAUH,EAAWC,EAC9B,CClBO,SAASG,IACd,MAAOC,EAAWC,IAAgB,IAAAxJ,WAAS,KAAM,IAAA2D,cAAa8F,iBAQ9D,OAPA,IAAA7I,YAAU,KACR,MAAMiD,EAAWV,IACfqG,EAAarG,EAAMC,OAAO,EAG5B,OADAC,OAAOC,iBAAiB,mBAAoBO,GACrC,IAAMR,OAAOE,oBAAoB,mBAAoBM,EAAS,GACpE,IACI0F,CACT,CC2CO,SAASG,EAAiBR,EAAWC,GAC1C,OAAO,IAAA5I,UAAQ,IACI,MAAb2I,GACkB,IAAAS,OAAK7I,UAAY,CACnC8I,cAAeX,EAAeC,EAAWC,OAGtC,MACN,CAACD,EAAWC,GACjB,C","sources":["webpack:///../../node_modules/@next-core/react-runtime/dist/esm/ReactUseBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentTheme.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRecentApps.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentApp.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRouteRender.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProviderArgsDefaults.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/fetch.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProvider.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProviderArgs.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/asyncWrapBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useNavConfig.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useLazyWrapBrick.js"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { __secret_internals, handleHttpError, getV2RuntimeFromDll } from \"@next-core/runtime\";\n// Note: always synchronize code in LegacyUseBrick:\n// `bricks/v2-adapter/src/data-providers/legacy-brick-kit/getLegacyUseBrick.ts`\nlet ReactUseBrick = function ReactUseBrick(_ref) {\n let {\n useBrick,\n data,\n errorBoundary,\n refCallback,\n ignoredCallback\n } = _ref;\n const [renderResult, setRenderResult] = useState(null);\n const mountResult = useRef();\n const [renderKey, setRenderKey] = useState();\n const IdCounterRef = useRef(0);\n const initialRenderId = useMemo(() => {\n var _secret_internals$ge;\n return (_secret_internals$ge = __secret_internals.getRenderId) === null || _secret_internals$ge === void 0 ? void 0 : _secret_internals$ge.call(__secret_internals);\n }, []);\n useEffect(() => {\n let ignore = false;\n async function init() {\n try {\n const newRender = await __secret_internals.renderUseBrick(useBrick, data, errorBoundary);\n if (ignore) {\n return;\n }\n setRenderResult(newRender);\n setRenderKey(getUniqueId(IdCounterRef));\n } catch (error) {\n if (!ignore && isTheSameRender(initialRenderId)) {\n // eslint-disable-next-line no-console\n console.error(\"Render useBrick failed:\", useBrick, \"with data:\", data);\n handleHttpError(error);\n }\n }\n }\n init();\n return () => {\n ignore = true;\n };\n }, [data, useBrick, initialRenderId, errorBoundary]);\n const _refCallback = useCallback(element => {\n if (element) {\n mountResult.current = __secret_internals.mountUseBrick(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n renderResult, element);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n __secret_internals.unmountUseBrick(renderResult, mountResult.current);\n mountResult.current = undefined;\n }\n refCallback === null || refCallback === void 0 || refCallback(element);\n }, [refCallback, renderResult]);\n if (!renderResult) {\n // Fallback when loading/\n return null;\n // return <span>🌀 Loading...</span>;\n }\n const {\n tagName\n } = renderResult;\n if (tagName === null) {\n ignoredCallback === null || ignoredCallback === void 0 || ignoredCallback();\n return null;\n }\n const WebComponent = tagName;\n return /*#__PURE__*/React.createElement(WebComponent, {\n key: renderKey,\n ref: _refCallback\n });\n};\nfunction getUniqueId(ref) {\n return ++ref.current;\n}\nfunction isTheSameRender(initialRenderId) {\n var _secret_internals$ge2;\n const newRenderId = (_secret_internals$ge2 = __secret_internals.getRenderId) === null || _secret_internals$ge2 === void 0 ? void 0 : _secret_internals$ge2.call(__secret_internals);\n return !initialRenderId || !newRenderId || initialRenderId === newRenderId;\n}\nlet ReactUseMultipleBricks = function ReactUseMultipleBricks(_ref2) {\n let {\n useBrick,\n data,\n errorBoundary\n } = _ref2;\n if (Array.isArray(useBrick)) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(ReactUseBrick, {\n key: index,\n useBrick: item,\n data: data,\n errorBoundary: errorBoundary\n })));\n }\n return /*#__PURE__*/React.createElement(ReactUseBrick, {\n useBrick: useBrick,\n data: data,\n errorBoundary: errorBoundary\n });\n};\n\n// Make v3 bricks compatible with Brick Next v2.\n// istanbul ignore next\nconst v2Kit = getV2RuntimeFromDll();\n// istanbul ignore next\nif (v2Kit) {\n const {\n SingleBrickAsComponentFactory,\n BrickAsComponentFactory\n } = v2Kit;\n if (SingleBrickAsComponentFactory && BrickAsComponentFactory) {\n ReactUseBrick = SingleBrickAsComponentFactory(React);\n ReactUseMultipleBricks = BrickAsComponentFactory(React);\n }\n}\nexport { ReactUseBrick, ReactUseMultipleBricks };\n//# sourceMappingURL=ReactUseBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getCurrentTheme } from \"@next-core/runtime\";\nexport function useCurrentTheme() {\n const [currentTheme, setCurrentTheme] = useState(getCurrentTheme);\n useEffect(() => {\n const listenToThemeChange = event => {\n setCurrentTheme(event.detail);\n };\n window.addEventListener(\"theme.change\", listenToThemeChange);\n return () => {\n window.removeEventListener(\"theme.change\", listenToThemeChange);\n };\n }, []);\n return currentTheme;\n}\n//# sourceMappingURL=useCurrentTheme.js.map","import React from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useRecentApps() {\n const [recentApps, setRecentApps] = React.useState(() => getRuntime().getRecentApps());\n React.useEffect(() => {\n const listener = event => {\n setRecentApps(event.detail);\n };\n window.addEventListener(\"app.change\", listener);\n return () => window.removeEventListener(\"app.change\", listener);\n }, []);\n return recentApps;\n}\n//# sourceMappingURL=useRecentApps.js.map","import { useRecentApps } from \"./useRecentApps.js\";\n\n/**\n * 获取当前所在微应用信息的 React hooks。\n *\n * @example\n *\n * ```tsx\n * function MyReactComponent() {\n * const app = useCurrentApp();\n * return <div>{app.id}</div>;\n * }\n * ```\n *\n * @returns 当前所在微应用的信息。\n */\nexport function useCurrentApp() {\n return useRecentApps().currentApp;\n}\n//# sourceMappingURL=useCurrentApp.js.map","import React from \"react\";\nexport function useRouteRender() {\n const [routeRender, setRouteRender] = React.useState(null);\n React.useEffect(() => {\n const listener = event => {\n setRouteRender(event.detail);\n };\n window.addEventListener(\"route.render\", listener);\n return () => window.removeEventListener(\"route.render\", listener);\n }, []);\n return routeRender;\n}\n//# sourceMappingURL=useRouteRender.js.map","export const useProviderArgsDefaults = {\n provider: \"\",\n customOptions: {\n onError: () => {\n /* Do nothing.. */\n },\n transform: (oldData, newData) => newData,\n data: undefined,\n loading: false,\n suspense: false,\n cache: true\n },\n dependencies: undefined\n};\nexport default Object.entries(useProviderArgsDefaults).reduce((acc, _ref) => {\n let [key, value] = _ref;\n if (Object.prototype.toString.call(value) === \"[object Object]\") return {\n ...acc,\n ...value\n };\n return {\n ...acc,\n [key]: value\n };\n}, {});\n//# sourceMappingURL=useProviderArgsDefaults.js.map","import { fetchByProvider } from \"@next-core/runtime\";\nconst cacheMap = new Map();\nfunction isObj(v) {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\nfunction isString(v) {\n return typeof v === \"string\";\n}\nfunction buildSortedCacheKey(provider) {\n const sortObj = obj => Object.keys(obj).sort().map(k => ({\n [k]: obj[k]\n }));\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n try {\n const sortedArgs = isObj(args) ? sortObj(args) : args.map(arg => isString(arg) ? arg : sortObj(arg));\n return JSON.stringify({\n provider,\n args: sortedArgs\n });\n } catch (e) {\n return JSON.stringify({\n provider,\n args\n });\n }\n}\nexport default async function fetch(provider, cache, args) {\n let promise;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const cacheKey = buildSortedCacheKey(provider, ...args);\n !cache && cacheMap.has(cacheKey) && cacheMap.delete(cacheKey);\n if (cacheMap.has(cacheKey)) {\n promise = cacheMap.get(cacheKey);\n } else {\n promise = (() => {\n return fetchByProvider(provider, args);\n })();\n cache && cacheMap.set(cacheKey, promise);\n }\n return promise;\n}\n//# sourceMappingURL=fetch.js.map","import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from \"react\";\nimport useProviderArgs from \"./useProviderArgs.js\";\nimport { isObject, isString } from \"lodash\";\nimport fetch from \"./fetch.js\";\nexport function useProvider() {\n const {\n provider,\n customOptions,\n dependencies,\n requestInit\n } = useProviderArgs(...arguments);\n const {\n onError,\n transform,\n suspense,\n cache,\n ...defaults\n } = customOptions;\n const [loading, setLoading] = useState(defaults.loading);\n const suspenseStatus = useRef(\"pending\");\n const suspender = useRef();\n const mounted = useRef(false);\n const error = useRef();\n const response = useRef();\n const data = useRef(defaults.data);\n const forceUpdate = useReducer(() => ({}), [])[1];\n const doFetch = useCallback(async (provider, providerArgs) => {\n try {\n error.current = undefined;\n if (!suspense) setLoading(true);\n const newRes = await fetch(provider, cache, providerArgs);\n response.current = newRes;\n data.current = transform(data.current, newRes);\n } catch (e) {\n error.current = e;\n data.current = undefined;\n }\n if (!suspense) setLoading(false);\n if (error.current) onError(error.current);\n return data.current;\n }, [provider, customOptions, dependencies, requestInit, suspense, transform, defaults.data, onError, cache]);\n const makeFetch = useCallback(async (providerOrBody, args) => {\n let providerStr = provider;\n let providerArgs = [];\n if (isString(providerOrBody)) {\n providerStr = providerOrBody;\n }\n if (isObject(providerOrBody)) {\n providerArgs = providerOrBody;\n } else if (isObject(args)) {\n providerArgs = args;\n }\n if (suspense) {\n return (async () => {\n suspender.current = doFetch(providerStr, providerArgs).then(newData => {\n suspenseStatus.current = \"success\";\n return newData;\n }, error => {\n /* istanbul ignore next */\n suspenseStatus.current = \"error\";\n error.current = error;\n return error;\n });\n forceUpdate();\n return await suspender.current;\n })();\n }\n return doFetch(providerStr, providerArgs);\n }, [doFetch]);\n const request = useMemo(() => Object.defineProperties({\n query: makeFetch\n }, {\n loading: {\n get() {\n return loading;\n }\n },\n data: {\n get() {\n return data.current;\n }\n },\n error: {\n get() {\n return error.current;\n }\n }\n }), [makeFetch]);\n\n // onMount/onUpdate\n useEffect(() => {\n mounted.current = true;\n if (Array.isArray(dependencies) && provider) {\n request.query(provider, requestInit.args);\n }\n return () => mounted.current = false;\n }, dependencies);\n if (suspense && suspender.current) {\n switch (suspenseStatus.current) {\n case \"pending\":\n throw suspender.current;\n /* istanbul ignore next */\n case \"error\":\n throw error.current;\n }\n }\n return Object.assign([request, response.current, loading, error.current], {\n request,\n ...request,\n response: response.current,\n data: data.current,\n loading,\n error: error.current\n });\n}\n//# sourceMappingURL=useProvider.js.map","import { useMemo } from \"react\";\nimport defaults, { useProviderArgsDefaults } from \"./useProviderArgsDefaults.js\";\nimport { isObject } from \"lodash\";\nexport default function useProviderArgs(providerOrParamsOrGlobalOptions, globalOptionsOrDeps, deps) {\n const provider = useMemo(() => {\n if (typeof providerOrParamsOrGlobalOptions === \"string\") {\n return providerOrParamsOrGlobalOptions;\n }\n return useProviderArgsDefaults.provider;\n }, [providerOrParamsOrGlobalOptions, globalOptionsOrDeps]);\n const options = useMemo(() => {\n let localOptions = {};\n if (isObject(providerOrParamsOrGlobalOptions)) {\n localOptions = providerOrParamsOrGlobalOptions;\n } else if (isObject(globalOptionsOrDeps)) {\n localOptions = globalOptionsOrDeps;\n }\n return {\n ...defaults,\n ...localOptions\n };\n }, [providerOrParamsOrGlobalOptions, globalOptionsOrDeps]);\n const requestInit = useMemo(() => {\n const customOptionKeys = [...Object.keys(useProviderArgsDefaults), ...Object.keys(useProviderArgsDefaults.customOptions)];\n const {\n args = null,\n ...restOptions\n } = Object.keys(options).reduce((acc, key) => {\n if (!customOptionKeys.includes(key)) acc[key] = options[key];\n return acc;\n }, {});\n return {\n options: {\n ...restOptions\n },\n args\n };\n }, [options]);\n const dependencies = useMemo(() => {\n if (Array.isArray(globalOptionsOrDeps)) return globalOptionsOrDeps;\n if (Array.isArray(deps)) return deps;\n return defaults.dependencies;\n }, [globalOptionsOrDeps, deps]);\n const loading = options.loading || Array.isArray(dependencies);\n const customOptions = useMemo(() => {\n const customOptionKeys = Object.keys(useProviderArgsDefaults.customOptions);\n const customOptions = customOptionKeys.reduce((opts, key) => {\n opts[key] = options[key];\n return opts;\n }, {});\n return {\n ...customOptions,\n loading\n };\n }, [options]);\n return {\n provider,\n customOptions,\n requestInit,\n dependencies\n };\n}\n//# sourceMappingURL=useProviderArgs.js.map","import { __secret_internals } from \"@next-core/runtime\";\nimport { wrapBrick } from \"@next-core/react-element\";\n\n/**\n * 使用异步加载的方式包装一个构件,可用于按条件渲染的构件依赖。\n *\n * 例如提供复杂弹层内容的按钮构件,其内容需要使用到一些大型构件,那么这些依赖可以使用 asyncWrapBrick,\n * 这样只有在需要时才会加载这些依赖的构件。\n */\n\n/**\n * 使用异步加载的方式包装一个构件,可用于按条件渲染的构件依赖。\n *\n * 例如提供复杂弹层内容的按钮构件,其内容需要使用到一些大型构件,那么这些依赖可以使用 asyncWrapBrick,\n * 这样只有在需要时才会加载这些依赖的构件。\n */\n\nexport async function asyncWrapBrick(brickName, eventsMapping) {\n await __secret_internals.loadBricks([brickName]);\n return wrapBrick(brickName, eventsMapping);\n}\n//# sourceMappingURL=asyncWrapBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useNavConfig() {\n const [navConfig, setNavConfig] = useState(() => getRuntime().getNavConfig());\n useEffect(() => {\n const listener = event => {\n setNavConfig(event.detail);\n };\n window.addEventListener(\"navConfig.change\", listener);\n return () => window.removeEventListener(\"navConfig.change\", listener);\n }, []);\n return navConfig;\n}\n//# sourceMappingURL=useNavConfig.js.map","import { lazy, useMemo } from \"react\";\nimport { asyncWrapBrick } from \"./asyncWrapBrick.js\";\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\nexport function useLazyWrapBrick(brickName, eventsMapping) {\n return useMemo(() => {\n if (brickName != null) {\n return /*#__PURE__*/lazy(async () => ({\n default: await asyncWrapBrick(brickName, eventsMapping)\n }));\n }\n return null;\n }, [brickName, eventsMapping]);\n}\n//# sourceMappingURL=useLazyWrapBrick.js.map"],"names":["ReactUseBrick","_ref","useBrick","data","errorBoundary","refCallback","ignoredCallback","renderResult","setRenderResult","useState","mountResult","useRef","renderKey","setRenderKey","IdCounterRef","initialRenderId","useMemo","_secret_internals$ge","__secret_internals","getRenderId","call","useEffect","ignore","async","newRender","renderUseBrick","current","error","_secret_internals$ge2","newRenderId","isTheSameRender","console","handleHttpError","init","_refCallback","useCallback","element","mountUseBrick","unmountUseBrick","undefined","tagName","WebComponent","key","ref","ReactUseMultipleBricks","_ref2","Array","isArray","map","item","index","v2Kit","getV2RuntimeFromDll","SingleBrickAsComponentFactory","BrickAsComponentFactory","useCurrentTheme","currentTheme","setCurrentTheme","getCurrentTheme","listenToThemeChange","event","detail","window","addEventListener","removeEventListener","useRecentApps","recentApps","setRecentApps","getRuntime","getRecentApps","listener","useCurrentApp","currentApp","useRouteRender","routeRender","setRouteRender","useProviderArgsDefaults","provider","customOptions","onError","transform","oldData","newData","loading","suspense","cache","dependencies","Object","entries","reduce","acc","value","prototype","toString","cacheMap","Map","useProvider","requestInit","providerOrParamsOrGlobalOptions","globalOptionsOrDeps","deps","options","localOptions","isObject","customOptionKeys","keys","args","restOptions","includes","opts","useProviderArgs","arguments","defaults","setLoading","suspenseStatus","suspender","mounted","response","forceUpdate","useReducer","doFetch","providerArgs","newRes","promise","cacheKey","sortObj","obj","sort","k","_len","length","_key","sortedArgs","v","arg","isString","JSON","stringify","e","buildSortedCacheKey","has","delete","get","fetchByProvider","set","fetch","makeFetch","providerOrBody","providerStr","then","request","defineProperties","query","assign","asyncWrapBrick","brickName","eventsMapping","loadBricks","wrapBrick","useNavConfig","navConfig","setNavConfig","getNavConfig","useLazyWrapBrick","lazy","default"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"chunks/7218.22824b22.js","mappings":"mYAIA,IAAIA,EAAgB,SAAuBC,GACzC,IAAI,SACFC,EAAQ,KACRC,EAAI,cACJC,EAAa,YACbC,EAAW,gBACXC,GACEL,EACJ,MAAOM,EAAcC,IAAmB,IAAAC,UAAS,MAC3CC,GAAc,IAAAC,WACbC,EAAWC,IAAgB,IAAAJ,YAC5BK,GAAe,IAAAH,QAAO,GACtBI,GAAkB,IAAAC,UAAQ,KAC9B,IAAIC,EACJ,OAAmE,QAA3DA,EAAuB,EAAAC,mBAAmBC,mBAAkD,IAAzBF,OAAkC,EAASA,EAAqBG,KAAK,EAAA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/B,IAAMU,EAAQ1F,SAAU,IAC9B4D,GACCF,GAAY+B,EAAUzF,QACxB,OAAQwF,EAAexF,SACrB,IAAK,UACH,MAAMyF,EAAUzF,QAElB,IAAK,QACH,MAAMC,EAAMD,QAGlB,OAAO6D,OAAOkE,OAAO,CAACH,EAASjC,EAAS3F,QAASyD,EAASxD,EAAMD,SAAU,CACxE4H,aACGA,EACHjC,SAAUA,EAAS3F,QACnBvB,KAAMA,EAAKuB,QACXyD,UACAxD,MAAOA,EAAMD,SAEjB,C,cEjGOH,eAAemI,EAAeC,EAAWC,GAE9C,aADM,EAAA1I,mBAAmB2I,WAAW,CAACF,KAC9B,IAAAG,WAAUH,EAAWC,EAC9B,CClBO,SAASG,IACd,MAAOC,EAAWC,IAAgB,IAAAxJ,WAAS,KAAM,IAAA2D,cAAa8F,iBAQ9D,OAPA,IAAA7I,YAAU,KACR,MAAMiD,EAAWV,IACfqG,EAAarG,EAAMC,OAAO,EAG5B,OADAC,OAAOC,iBAAiB,mBAAoBO,GACrC,IAAMR,OAAOE,oBAAoB,mBAAoBM,EAAS,GACpE,IACI0F,CACT,CC2CO,SAASG,EAAiBR,EAAWC,GAC1C,OAAO,IAAA5I,UAAQ,IACI,MAAb2I,GACkB,IAAAS,OAAK7I,UAAY,CACnC8I,cAAeX,EAAeC,EAAWC,OAGtC,MACN,CAACD,EAAWC,GACjB,C","sources":["webpack:///../../node_modules/@next-core/react-runtime/dist/esm/ReactUseBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentTheme.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRecentApps.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentApp.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRouteRender.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProviderArgsDefaults.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/fetch.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProvider.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useProvider/useProviderArgs.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/asyncWrapBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useNavConfig.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useLazyWrapBrick.js"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from \"react\";\nimport { __secret_internals, handleHttpError, getV2RuntimeFromDll } from \"@next-core/runtime\";\n// Note: always synchronize code in LegacyUseBrick:\n// `bricks/v2-adapter/src/data-providers/legacy-brick-kit/getLegacyUseBrick.ts`\nlet ReactUseBrick = function ReactUseBrick(_ref) {\n let {\n useBrick,\n data,\n errorBoundary,\n refCallback,\n ignoredCallback\n } = _ref;\n const [renderResult, setRenderResult] = useState(null);\n const mountResult = useRef();\n const [renderKey, setRenderKey] = useState();\n const IdCounterRef = useRef(0);\n const initialRenderId = useMemo(() => {\n var _secret_internals$ge;\n return (_secret_internals$ge = __secret_internals.getRenderId) === null || _secret_internals$ge === void 0 ? void 0 : _secret_internals$ge.call(__secret_internals);\n }, []);\n useEffect(() => {\n let ignore = false;\n async function init() {\n try {\n const newRender = await __secret_internals.renderUseBrick(useBrick, data, errorBoundary);\n if (ignore) {\n return;\n }\n setRenderResult(newRender);\n setRenderKey(getUniqueId(IdCounterRef));\n } catch (error) {\n if (!ignore && isTheSameRender(initialRenderId)) {\n // eslint-disable-next-line no-console\n console.error(\"Render useBrick failed:\", useBrick, \"with data:\", data);\n handleHttpError(error);\n }\n }\n }\n init();\n return () => {\n ignore = true;\n };\n }, [data, useBrick, initialRenderId, errorBoundary]);\n const _refCallback = useCallback(element => {\n if (element) {\n mountResult.current = __secret_internals.mountUseBrick(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n renderResult, element);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n __secret_internals.unmountUseBrick(renderResult, mountResult.current);\n mountResult.current = undefined;\n }\n refCallback === null || refCallback === void 0 || refCallback(element);\n }, [refCallback, renderResult]);\n if (!renderResult) {\n // Fallback when loading/\n return null;\n // return <span>🌀 Loading...</span>;\n }\n const {\n tagName\n } = renderResult;\n if (tagName === null) {\n ignoredCallback === null || ignoredCallback === void 0 || ignoredCallback();\n return null;\n }\n const WebComponent = tagName;\n return /*#__PURE__*/React.createElement(WebComponent, {\n key: renderKey,\n ref: _refCallback\n });\n};\nfunction getUniqueId(ref) {\n return ++ref.current;\n}\nfunction isTheSameRender(initialRenderId) {\n var _secret_internals$ge2;\n const newRenderId = (_secret_internals$ge2 = __secret_internals.getRenderId) === null || _secret_internals$ge2 === void 0 ? void 0 : _secret_internals$ge2.call(__secret_internals);\n return !initialRenderId || !newRenderId || initialRenderId === newRenderId;\n}\nlet ReactUseMultipleBricks = function ReactUseMultipleBricks(_ref2) {\n let {\n useBrick,\n data,\n errorBoundary\n } = _ref2;\n if (Array.isArray(useBrick)) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(ReactUseBrick, {\n key: index,\n useBrick: item,\n data: data,\n errorBoundary: errorBoundary\n })));\n }\n return /*#__PURE__*/React.createElement(ReactUseBrick, {\n useBrick: useBrick,\n data: data,\n errorBoundary: errorBoundary\n });\n};\n\n// Make v3 bricks compatible with Brick Next v2.\n// istanbul ignore next\nconst v2Kit = getV2RuntimeFromDll();\n// istanbul ignore next\nif (v2Kit) {\n const {\n SingleBrickAsComponentFactory,\n BrickAsComponentFactory\n } = v2Kit;\n if (SingleBrickAsComponentFactory && BrickAsComponentFactory) {\n ReactUseBrick = SingleBrickAsComponentFactory(React);\n ReactUseMultipleBricks = BrickAsComponentFactory(React);\n }\n}\nexport { ReactUseBrick, ReactUseMultipleBricks };\n//# sourceMappingURL=ReactUseBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getCurrentTheme } from \"@next-core/runtime\";\nexport function useCurrentTheme() {\n const [currentTheme, setCurrentTheme] = useState(getCurrentTheme);\n useEffect(() => {\n const listenToThemeChange = event => {\n setCurrentTheme(event.detail);\n };\n window.addEventListener(\"theme.change\", listenToThemeChange);\n return () => {\n window.removeEventListener(\"theme.change\", listenToThemeChange);\n };\n }, []);\n return currentTheme;\n}\n//# sourceMappingURL=useCurrentTheme.js.map","import React from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useRecentApps() {\n const [recentApps, setRecentApps] = React.useState(() => getRuntime().getRecentApps());\n React.useEffect(() => {\n const listener = event => {\n setRecentApps(event.detail);\n };\n window.addEventListener(\"app.change\", listener);\n return () => window.removeEventListener(\"app.change\", listener);\n }, []);\n return recentApps;\n}\n//# sourceMappingURL=useRecentApps.js.map","import { useRecentApps } from \"./useRecentApps.js\";\n\n/**\n * 获取当前所在微应用信息的 React hooks。\n *\n * @example\n *\n * ```tsx\n * function MyReactComponent() {\n * const app = useCurrentApp();\n * return <div>{app.id}</div>;\n * }\n * ```\n *\n * @returns 当前所在微应用的信息。\n */\nexport function useCurrentApp() {\n return useRecentApps().currentApp;\n}\n//# sourceMappingURL=useCurrentApp.js.map","import React from \"react\";\nexport function useRouteRender() {\n const [routeRender, setRouteRender] = React.useState(null);\n React.useEffect(() => {\n const listener = event => {\n setRouteRender(event.detail);\n };\n window.addEventListener(\"route.render\", listener);\n return () => window.removeEventListener(\"route.render\", listener);\n }, []);\n return routeRender;\n}\n//# sourceMappingURL=useRouteRender.js.map","export const useProviderArgsDefaults = {\n provider: \"\",\n customOptions: {\n onError: () => {\n /* Do nothing.. */\n },\n transform: (oldData, newData) => newData,\n data: undefined,\n loading: false,\n suspense: false,\n cache: true\n },\n dependencies: undefined\n};\nexport default Object.entries(useProviderArgsDefaults).reduce((acc, _ref) => {\n let [key, value] = _ref;\n if (Object.prototype.toString.call(value) === \"[object Object]\") return {\n ...acc,\n ...value\n };\n return {\n ...acc,\n [key]: value\n };\n}, {});\n//# sourceMappingURL=useProviderArgsDefaults.js.map","import { fetchByProvider } from \"@next-core/runtime\";\nconst cacheMap = new Map();\nfunction isObj(v) {\n return typeof v === \"object\" && v !== null && !Array.isArray(v);\n}\nfunction isString(v) {\n return typeof v === \"string\";\n}\nfunction buildSortedCacheKey(provider) {\n const sortObj = obj => Object.keys(obj).sort().map(k => ({\n [k]: obj[k]\n }));\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n try {\n const sortedArgs = isObj(args) ? sortObj(args) : args.map(arg => isString(arg) ? arg : sortObj(arg));\n return JSON.stringify({\n provider,\n args: sortedArgs\n });\n } catch (e) {\n return JSON.stringify({\n provider,\n args\n });\n }\n}\nexport default async function fetch(provider, cache, args) {\n let promise;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n const cacheKey = buildSortedCacheKey(provider, ...args);\n !cache && cacheMap.has(cacheKey) && cacheMap.delete(cacheKey);\n if (cacheMap.has(cacheKey)) {\n promise = cacheMap.get(cacheKey);\n } else {\n promise = (() => {\n return fetchByProvider(provider, args);\n })();\n cache && cacheMap.set(cacheKey, promise);\n }\n return promise;\n}\n//# sourceMappingURL=fetch.js.map","import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from \"react\";\nimport useProviderArgs from \"./useProviderArgs.js\";\nimport { isObject, isString } from \"lodash\";\nimport fetch from \"./fetch.js\";\nexport function useProvider() {\n const {\n provider,\n customOptions,\n dependencies,\n requestInit\n } = useProviderArgs(...arguments);\n const {\n onError,\n transform,\n suspense,\n cache,\n ...defaults\n } = customOptions;\n const [loading, setLoading] = useState(defaults.loading);\n const suspenseStatus = useRef(\"pending\");\n const suspender = useRef();\n const mounted = useRef(false);\n const error = useRef();\n const response = useRef();\n const data = useRef(defaults.data);\n const forceUpdate = useReducer(() => ({}), [])[1];\n const doFetch = useCallback(async (provider, providerArgs) => {\n try {\n error.current = undefined;\n if (!suspense) setLoading(true);\n const newRes = await fetch(provider, cache, providerArgs);\n response.current = newRes;\n data.current = transform(data.current, newRes);\n } catch (e) {\n error.current = e;\n data.current = undefined;\n }\n if (!suspense) setLoading(false);\n if (error.current) onError(error.current);\n return data.current;\n }, [provider, customOptions, dependencies, requestInit, suspense, transform, defaults.data, onError, cache]);\n const makeFetch = useCallback(async (providerOrBody, args) => {\n let providerStr = provider;\n let providerArgs = [];\n if (isString(providerOrBody)) {\n providerStr = providerOrBody;\n }\n if (isObject(providerOrBody)) {\n providerArgs = providerOrBody;\n } else if (isObject(args)) {\n providerArgs = args;\n }\n if (suspense) {\n return (async () => {\n suspender.current = doFetch(providerStr, providerArgs).then(newData => {\n suspenseStatus.current = \"success\";\n return newData;\n }, error => {\n /* istanbul ignore next */\n suspenseStatus.current = \"error\";\n error.current = error;\n return error;\n });\n forceUpdate();\n return await suspender.current;\n })();\n }\n return doFetch(providerStr, providerArgs);\n }, [doFetch]);\n const request = useMemo(() => Object.defineProperties({\n query: makeFetch\n }, {\n loading: {\n get() {\n return loading;\n }\n },\n data: {\n get() {\n return data.current;\n }\n },\n error: {\n get() {\n return error.current;\n }\n }\n }), [makeFetch]);\n\n // onMount/onUpdate\n useEffect(() => {\n mounted.current = true;\n if (Array.isArray(dependencies) && provider) {\n request.query(provider, requestInit.args);\n }\n return () => mounted.current = false;\n }, dependencies);\n if (suspense && suspender.current) {\n switch (suspenseStatus.current) {\n case \"pending\":\n throw suspender.current;\n /* istanbul ignore next */\n case \"error\":\n throw error.current;\n }\n }\n return Object.assign([request, response.current, loading, error.current], {\n request,\n ...request,\n response: response.current,\n data: data.current,\n loading,\n error: error.current\n });\n}\n//# sourceMappingURL=useProvider.js.map","import { useMemo } from \"react\";\nimport defaults, { useProviderArgsDefaults } from \"./useProviderArgsDefaults.js\";\nimport { isObject } from \"lodash\";\nexport default function useProviderArgs(providerOrParamsOrGlobalOptions, globalOptionsOrDeps, deps) {\n const provider = useMemo(() => {\n if (typeof providerOrParamsOrGlobalOptions === \"string\") {\n return providerOrParamsOrGlobalOptions;\n }\n return useProviderArgsDefaults.provider;\n }, [providerOrParamsOrGlobalOptions, globalOptionsOrDeps]);\n const options = useMemo(() => {\n let localOptions = {};\n if (isObject(providerOrParamsOrGlobalOptions)) {\n localOptions = providerOrParamsOrGlobalOptions;\n } else if (isObject(globalOptionsOrDeps)) {\n localOptions = globalOptionsOrDeps;\n }\n return {\n ...defaults,\n ...localOptions\n };\n }, [providerOrParamsOrGlobalOptions, globalOptionsOrDeps]);\n const requestInit = useMemo(() => {\n const customOptionKeys = [...Object.keys(useProviderArgsDefaults), ...Object.keys(useProviderArgsDefaults.customOptions)];\n const {\n args = null,\n ...restOptions\n } = Object.keys(options).reduce((acc, key) => {\n if (!customOptionKeys.includes(key)) acc[key] = options[key];\n return acc;\n }, {});\n return {\n options: {\n ...restOptions\n },\n args\n };\n }, [options]);\n const dependencies = useMemo(() => {\n if (Array.isArray(globalOptionsOrDeps)) return globalOptionsOrDeps;\n if (Array.isArray(deps)) return deps;\n return defaults.dependencies;\n }, [globalOptionsOrDeps, deps]);\n const loading = options.loading || Array.isArray(dependencies);\n const customOptions = useMemo(() => {\n const customOptionKeys = Object.keys(useProviderArgsDefaults.customOptions);\n const customOptions = customOptionKeys.reduce((opts, key) => {\n opts[key] = options[key];\n return opts;\n }, {});\n return {\n ...customOptions,\n loading\n };\n }, [options]);\n return {\n provider,\n customOptions,\n requestInit,\n dependencies\n };\n}\n//# sourceMappingURL=useProviderArgs.js.map","import { __secret_internals } from \"@next-core/runtime\";\nimport { wrapBrick } from \"@next-core/react-element\";\n\n/**\n * 使用异步加载的方式包装一个构件,可用于按条件渲染的构件依赖。\n *\n * 例如提供复杂弹层内容的按钮构件,其内容需要使用到一些大型构件,那么这些依赖可以使用 asyncWrapBrick,\n * 这样只有在需要时才会加载这些依赖的构件。\n */\n\n/**\n * 使用异步加载的方式包装一个构件,可用于按条件渲染的构件依赖。\n *\n * 例如提供复杂弹层内容的按钮构件,其内容需要使用到一些大型构件,那么这些依赖可以使用 asyncWrapBrick,\n * 这样只有在需要时才会加载这些依赖的构件。\n */\n\nexport async function asyncWrapBrick(brickName, eventsMapping) {\n await __secret_internals.loadBricks([brickName]);\n return wrapBrick(brickName, eventsMapping);\n}\n//# sourceMappingURL=asyncWrapBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useNavConfig() {\n const [navConfig, setNavConfig] = useState(() => getRuntime().getNavConfig());\n useEffect(() => {\n const listener = event => {\n setNavConfig(event.detail);\n };\n window.addEventListener(\"navConfig.change\", listener);\n return () => window.removeEventListener(\"navConfig.change\", listener);\n }, []);\n return navConfig;\n}\n//# sourceMappingURL=useNavConfig.js.map","import { lazy, useMemo } from \"react\";\nimport { asyncWrapBrick } from \"./asyncWrapBrick.js\";\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\n/**\n * 使用 `React.lazy` 包装一个异步加载的构件。\n *\n * ```jsx\n * const DepComponent = useLazyWrapBrick(\"async-dep\");\n * return (\n * <Suspense fallback=\"Loading...\">\n * <DepComponent {...props} />\n * </Suspense>\n * );\n * ```\n */\n\nexport function useLazyWrapBrick(brickName, eventsMapping) {\n return useMemo(() => {\n if (brickName != null) {\n return /*#__PURE__*/lazy(async () => ({\n default: await asyncWrapBrick(brickName, eventsMapping)\n }));\n }\n return null;\n }, [brickName, eventsMapping]);\n}\n//# sourceMappingURL=useLazyWrapBrick.js.map"],"names":["ReactUseBrick","_ref","useBrick","data","errorBoundary","refCallback","ignoredCallback","renderResult","setRenderResult","useState","mountResult","useRef","renderKey","setRenderKey","IdCounterRef","initialRenderId","useMemo","_secret_internals$ge","__secret_internals","getRenderId","call","useEffect","ignore","async","newRender","renderUseBrick","current","error","_secret_internals$ge2","newRenderId","isTheSameRender","console","handleHttpError","init","_refCallback","useCallback","element","mountUseBrick","unmountUseBrick","undefined","tagName","WebComponent","key","ref","ReactUseMultipleBricks","_ref2","Array","isArray","map","item","index","v2Kit","getV2RuntimeFromDll","SingleBrickAsComponentFactory","BrickAsComponentFactory","useCurrentTheme","currentTheme","setCurrentTheme","getCurrentTheme","listenToThemeChange","event","detail","window","addEventListener","removeEventListener","useRecentApps","recentApps","setRecentApps","getRuntime","getRecentApps","listener","useCurrentApp","currentApp","useRouteRender","routeRender","setRouteRender","useProviderArgsDefaults","provider","customOptions","onError","transform","oldData","newData","loading","suspense","cache","dependencies","Object","entries","reduce","acc","value","prototype","toString","cacheMap","Map","useProvider","requestInit","providerOrParamsOrGlobalOptions","globalOptionsOrDeps","deps","options","localOptions","isObject","customOptionKeys","keys","args","restOptions","includes","opts","useProviderArgs","arguments","defaults","setLoading","suspenseStatus","suspender","mounted","response","forceUpdate","useReducer","doFetch","providerArgs","newRes","promise","cacheKey","sortObj","obj","sort","k","_len","length","_key","sortedArgs","v","arg","isString","JSON","stringify","e","buildSortedCacheKey","has","delete","get","fetchByProvider","set","fetch","makeFetch","providerOrBody","providerStr","then","request","defineProperties","query","assign","asyncWrapBrick","brickName","eventsMapping","loadBricks","wrapBrick","useNavConfig","navConfig","setNavConfig","getNavConfig","useLazyWrapBrick","lazy","default"],"sourceRoot":""}
|