@next-bricks/form 1.13.5 → 1.13.8
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 +33 -33
- package/dist/chunks/1122.f4078280.js +2 -0
- package/dist/chunks/1122.f4078280.js.map +1 -0
- package/dist/chunks/114.531359b5.js +2 -0
- package/dist/chunks/{114.37bf18eb.js.map → 114.531359b5.js.map} +1 -1
- package/dist/chunks/{1269.52b4e847.js → 1269.7e1ba640.js} +2 -2
- package/dist/chunks/{1269.52b4e847.js.map → 1269.7e1ba640.js.map} +1 -1
- package/dist/chunks/1940.a199452a.js +2 -0
- package/dist/chunks/1940.a199452a.js.map +1 -0
- package/dist/chunks/{2277.c39a213c.js → 2277.f9546bd4.js} +2 -2
- package/dist/chunks/{4658.a7becf80.js.map → 2277.f9546bd4.js.map} +1 -1
- package/dist/chunks/{3171.bfa526d0.js → 3171.8cf6f87a.js} +2 -2
- package/dist/chunks/{5552.f2e38477.js.map → 3171.8cf6f87a.js.map} +1 -1
- package/dist/chunks/3933.f299055e.js +2 -0
- package/dist/chunks/{6314.cd073def.js.map → 3933.f299055e.js.map} +1 -1
- package/dist/chunks/4306.009ee1ec.js +2 -0
- package/dist/chunks/4306.009ee1ec.js.map +1 -0
- package/dist/chunks/{4658.a7becf80.js → 4658.9a12fd73.js} +2 -2
- package/dist/chunks/{2277.c39a213c.js.map → 4658.9a12fd73.js.map} +1 -1
- package/dist/chunks/{4837.da0fe122.js → 4837.5782f5bd.js} +2 -2
- package/dist/chunks/{4837.da0fe122.js.map → 4837.5782f5bd.js.map} +1 -1
- package/dist/chunks/5399.7df199ce.js +2 -0
- package/dist/chunks/5399.7df199ce.js.map +1 -0
- package/dist/chunks/{5552.f2e38477.js → 5552.5899c7ae.js} +2 -2
- package/dist/chunks/{3171.bfa526d0.js.map → 5552.5899c7ae.js.map} +1 -1
- package/dist/chunks/6314.a9731824.js +2 -0
- package/dist/chunks/{3933.72905659.js.map → 6314.a9731824.js.map} +1 -1
- package/dist/chunks/6519.b03d81cb.js +2 -0
- package/dist/chunks/{6519.512a2834.js.map → 6519.b03d81cb.js.map} +1 -1
- package/dist/chunks/{7218.8e41ef02.js → 7218.8ed93f51.js} +2 -2
- package/dist/chunks/{7218.8e41ef02.js.map → 7218.8ed93f51.js.map} +1 -1
- package/dist/chunks/7733.10fcbe3c.js +2 -0
- package/dist/chunks/{7733.cfda832d.js.map → 7733.10fcbe3c.js.map} +1 -1
- package/dist/chunks/{790.4d902e94.js → 790.71e8de18.js} +2 -2
- package/dist/chunks/{790.4d902e94.js.map → 790.71e8de18.js.map} +1 -1
- package/dist/chunks/799.72fa2e89.js +3 -0
- package/dist/chunks/799.72fa2e89.js.map +1 -0
- package/dist/chunks/9259.7778bbaf.js +3 -0
- package/dist/chunks/{9259.1eb7a074.js.map → 9259.7778bbaf.js.map} +1 -1
- package/dist/chunks/9559.0bd45c4a.js +2 -0
- package/dist/chunks/9559.0bd45c4a.js.map +1 -0
- package/dist/chunks/eo-auto-complete.abd5bb43.js +3 -0
- package/dist/chunks/{eo-auto-complete.f65b6cb6.js.map → eo-auto-complete.abd5bb43.js.map} +1 -1
- package/dist/chunks/eo-checkbox.b96d4223.js +3 -0
- package/dist/chunks/{eo-checkbox.cdcad3e7.js.map → eo-checkbox.b96d4223.js.map} +1 -1
- package/dist/chunks/eo-color-picker.9cba3082.js +2 -0
- package/dist/chunks/{eo-color-picker.e5f183c4.js.map → eo-color-picker.9cba3082.js.map} +1 -1
- package/dist/chunks/eo-date-picker.1f4e55b2.js +2 -0
- package/dist/chunks/{eo-date-picker.95d1c925.js.map → eo-date-picker.1f4e55b2.js.map} +1 -1
- package/dist/chunks/eo-dynamic-form-item.05008202.js +3 -0
- package/dist/chunks/{eo-dynamic-form-item.e5bb1558.js.map → eo-dynamic-form-item.05008202.js.map} +1 -1
- package/dist/chunks/eo-form-item.4ddcda40.js +3 -0
- package/dist/chunks/{eo-form-item.986d5f0f.js.map → eo-form-item.4ddcda40.js.map} +1 -1
- package/dist/chunks/eo-form.21a2008c.js +2 -0
- package/dist/chunks/{eo-form.0218499b.js.map → eo-form.21a2008c.js.map} +1 -1
- package/dist/chunks/eo-icon-select.c1eda0c5.js +3 -0
- package/dist/chunks/{eo-icon-select.4caa9d3a.js.map → eo-icon-select.c1eda0c5.js.map} +1 -1
- package/dist/chunks/eo-input.3c5e9802.js +3 -0
- package/dist/chunks/{eo-input.721b4ee8.js.map → eo-input.3c5e9802.js.map} +1 -1
- package/dist/chunks/eo-radio.c584bd27.js +3 -0
- package/dist/chunks/{eo-radio.5a6590c0.js.map → eo-radio.c584bd27.js.map} +1 -1
- package/dist/chunks/eo-search.ed0857b5.js +2 -0
- package/dist/chunks/{eo-search.c98e6353.js.map → eo-search.ed0857b5.js.map} +1 -1
- package/dist/chunks/eo-select.28c15503.js +3 -0
- package/dist/chunks/{eo-select.d313c433.js.map → eo-select.28c15503.js.map} +1 -1
- package/dist/chunks/eo-submit-buttons.7cd42251.js +2 -0
- package/dist/chunks/{eo-submit-buttons.fec2f3cb.js.map → eo-submit-buttons.7cd42251.js.map} +1 -1
- package/dist/chunks/eo-switch.342e4f8f.js +3 -0
- package/dist/chunks/{eo-switch.bcf2da15.js.map → eo-switch.342e4f8f.js.map} +1 -1
- package/dist/chunks/eo-textarea.26ac76de.js +2 -0
- package/dist/chunks/{eo-textarea.e5348ca0.js.map → eo-textarea.26ac76de.js.map} +1 -1
- package/dist/chunks/eo-time-picker.d81de579.js +2 -0
- package/dist/chunks/{eo-time-picker.04ef402f.js.map → eo-time-picker.d81de579.js.map} +1 -1
- package/dist/chunks/eo-time-range-picker.15057d2a.js +2 -0
- package/dist/chunks/{eo-time-range-picker.865254af.js.map → eo-time-range-picker.15057d2a.js.map} +1 -1
- package/dist/chunks/eo-upload-file.15c30d10.js +3 -0
- package/dist/chunks/{eo-upload-file.e67d3268.js.map → eo-upload-file.15c30d10.js.map} +1 -1
- package/dist/chunks/eo-upload-image.b96a2fcc.js +3 -0
- package/dist/chunks/{eo-upload-image.b866ae24.js.map → eo-upload-image.b96a2fcc.js.map} +1 -1
- package/dist/chunks/main.0009a6af.js +2 -0
- package/dist/chunks/main.0009a6af.js.map +1 -0
- package/dist/examples.json +11 -11
- package/dist/index.a96799f8.js +2 -0
- package/dist/index.a96799f8.js.map +1 -0
- package/dist/manifest.json +377 -377
- package/dist/stories.json +0 -48
- package/dist/types.json +1215 -1215
- package/package.json +4 -4
- package/dist/chunks/1122.eec09eb1.js +0 -2
- package/dist/chunks/1122.eec09eb1.js.map +0 -1
- package/dist/chunks/114.37bf18eb.js +0 -2
- package/dist/chunks/1940.5d3d1dbf.js +0 -2
- package/dist/chunks/1940.5d3d1dbf.js.map +0 -1
- package/dist/chunks/3933.72905659.js +0 -2
- package/dist/chunks/4741.ed462c44.js +0 -2
- package/dist/chunks/4741.ed462c44.js.map +0 -1
- package/dist/chunks/5399.25e83e7f.js +0 -2
- package/dist/chunks/5399.25e83e7f.js.map +0 -1
- package/dist/chunks/6314.cd073def.js +0 -2
- package/dist/chunks/6519.512a2834.js +0 -2
- package/dist/chunks/7733.cfda832d.js +0 -2
- package/dist/chunks/799.afdb809c.js +0 -3
- package/dist/chunks/799.afdb809c.js.map +0 -1
- package/dist/chunks/9259.1eb7a074.js +0 -3
- package/dist/chunks/9559.5d9e9834.js +0 -2
- package/dist/chunks/9559.5d9e9834.js.map +0 -1
- package/dist/chunks/eo-auto-complete.f65b6cb6.js +0 -3
- package/dist/chunks/eo-checkbox.cdcad3e7.js +0 -3
- package/dist/chunks/eo-color-picker.e5f183c4.js +0 -2
- package/dist/chunks/eo-date-picker.95d1c925.js +0 -2
- package/dist/chunks/eo-dynamic-form-item.e5bb1558.js +0 -3
- package/dist/chunks/eo-form-item.986d5f0f.js +0 -3
- package/dist/chunks/eo-form.0218499b.js +0 -2
- package/dist/chunks/eo-icon-select.4caa9d3a.js +0 -3
- package/dist/chunks/eo-input.721b4ee8.js +0 -3
- package/dist/chunks/eo-radio.5a6590c0.js +0 -3
- package/dist/chunks/eo-search.c98e6353.js +0 -2
- package/dist/chunks/eo-select.d313c433.js +0 -3
- package/dist/chunks/eo-submit-buttons.fec2f3cb.js +0 -2
- package/dist/chunks/eo-switch.bcf2da15.js +0 -3
- package/dist/chunks/eo-textarea.e5348ca0.js +0 -2
- package/dist/chunks/eo-time-picker.04ef402f.js +0 -2
- package/dist/chunks/eo-time-range-picker.865254af.js +0 -2
- package/dist/chunks/eo-upload-file.e67d3268.js +0 -3
- package/dist/chunks/eo-upload-image.b866ae24.js +0 -3
- package/dist/chunks/main.a3960ab5.js +0 -2
- package/dist/chunks/main.a3960ab5.js.map +0 -1
- package/dist/index.85ea0c83.js +0 -2
- package/dist/index.85ea0c83.js.map +0 -1
- /package/dist/chunks/{799.afdb809c.js.LICENSE.txt → 799.72fa2e89.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{9259.1eb7a074.js.LICENSE.txt → 9259.7778bbaf.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-auto-complete.f65b6cb6.js.LICENSE.txt → eo-auto-complete.abd5bb43.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-checkbox.cdcad3e7.js.LICENSE.txt → eo-checkbox.b96d4223.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-dynamic-form-item.e5bb1558.js.LICENSE.txt → eo-dynamic-form-item.05008202.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-form-item.986d5f0f.js.LICENSE.txt → eo-form-item.4ddcda40.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-icon-select.4caa9d3a.js.LICENSE.txt → eo-icon-select.c1eda0c5.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-input.721b4ee8.js.LICENSE.txt → eo-input.3c5e9802.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-radio.5a6590c0.js.LICENSE.txt → eo-radio.c584bd27.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-select.d313c433.js.LICENSE.txt → eo-select.28c15503.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-switch.bcf2da15.js.LICENSE.txt → eo-switch.342e4f8f.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-upload-file.e67d3268.js.LICENSE.txt → eo-upload-file.15c30d10.js.LICENSE.txt} +0 -0
- /package/dist/chunks/{eo-upload-image.b866ae24.js.LICENSE.txt → eo-upload-image.b96a2fcc.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/1269.52b4e847.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,KAAM,KAAM,OAAOC,SAASC,IACvC,MAAMC,EAAWP,EAAQM,GACrBC,IACE,CAAC,SAAU,UAAUC,gBAAgBD,GACvCL,GAAO,iBAAiBI,KAAQC,MAE/BA,EAAqBJ,OACnBD,GAAO,iBAAiBI,KAASC,EAAqBJ,SAExDI,EAAqBH,SACnBF,GAAO,iBAAiBI,YACtBC,EAAqBH,YAG9B,IAGKF,GA3ByCA,CA4BlD,CAEO,SAASO,EACdC,EACAC,GAEA,IAAIC,EACAC,EAEsB,iBAAfF,GAAiD,iBAAfA,GAC3CC,EAAcD,EACdE,EAAgB,IAEhBD,EAAcD,EAAWR,KACzBU,IAAkBF,EAAWP,QAAU,IAGzC,IAAIA,GACmB,iBAAbM,GAA6C,iBAAbA,GACnCA,IACCA,EAASP,MAAQ,MAAOO,EAASN,QAAU,IAAMS,EAMzD,OAJKD,EAAcR,EAAS,KAC1BA,EAASS,GAGJ,CACLV,KAAMS,EACNR,SAEJ,CAEO,SAASU,EACdJ,EACAC,GAEA,YAAwBI,IAApBJ,EAAWR,KACNM,EAA4BC,EAAUC,GAGxCK,OAAOC,YACZD,OA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AAAiD,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":""}
|
|
1
|
+
{"version":3,"file":"chunks/1269.7e1ba640.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,KAAM,KAAM,OAAOC,SAASC,IACvC,MAAMC,EAAWP,EAAQM,GACrBC,IACE,CAAC,SAAU,UAAUC,gBAAgBD,GACvCL,GAAO,iBAAiBI,KAAQC,MAE/BA,EAAqBJ,OACnBD,GAAO,iBAAiBI,KAASC,EAAqBJ,SAExDI,EAAqBH,SACnBF,GAAO,iBAAiBI,YACtBC,EAAqBH,YAG9B,IAGKF,GA3ByCA,CA4BlD,CAEO,SAASO,EACdC,EACAC,GAEA,IAAIC,EACAC,EAEsB,iBAAfF,GAAiD,iBAAfA,GAC3CC,EAAcD,EACdE,EAAgB,IAEhBD,EAAcD,EAAWR,KACzBU,IAAkBF,EAAWP,QAAU,IAGzC,IAAIA,GACmB,iBAAbM,GAA6C,iBAAbA,GACnCA,IACCA,EAASP,MAAQ,MAAOO,EAASN,QAAU,IAAMS,EAMzD,OAJKD,EAAcR,EAAS,KAC1BA,EAASS,GAGJ,CACLV,KAAMS,EACNR,SAEJ,CAEO,SAASU,EACdJ,EACAC,GAEA,YAAwBI,IAApBJ,EAAWR,KACNM,EAA4BC,EAAUC,GAGxCK,OAAOC,YACZD,OAAOE,QAAQP,GAAYQ,KAAIC,IAAkB,IAAhBC,EAAKC,GAAMF,EAC1C,MAAO,CACLC,EACAZ,EACEC,EAASW,GACTC,GAEH,IAGP,C,4FCpFIC,E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AC,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([[1940,9559],{9559:(e,t,r)=>{r.r(t),r.d(t,{supply:()=>s});var n=r(1030),a=r(1302),o=r(1744);function s(e,t,r){const n={undefined:void 0};for(const a of e)if(!Object.prototype.hasOwnProperty.call(n,a))if(t&&Object.prototype.hasOwnProperty.call(t,a))n[a]=t[a];else{const e=u(a,r);void 0!==e&&(n[a]=e)}return n}const i=new Set(["fill","pull","pullAll","pullAllBy","pullAllWith","pullAt","remove","reverse","assign","assignIn","assignInWith","assignWith","defaults","defaultsDeep","merge","mergeWith","set","setWith","unset","update","updateWith","after","ary","before","bind","bindKey","curry","curryRight","debounce","defer","delay","flip","memoize","negate","once","overArgs","partial","partialRight","rearg","rest","spread","throttle","unary","wrap"]),c=new Set(["lang","langData","locale","localeData","defineLocale","updateLocale","updateOffset"]),l=new Set(["Array","Boolean","Date","Infinity","JSON","Math","NaN","Number","String","RegExp","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","isFinite","isNaN","parseFloat","parseInt","Map","Set","URL","URLSearchParams","WeakMap","WeakSet","atob","btoa"]);function u(e,t){switch(e){case"Object":return r=Object,s=["entries","fromEntries","keys","values"],Object.fromEntries(s.map((e=>[e,function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return r[e].apply(r,n)}])));case"_":return Object.fromEntries(Object.entries(n).filter((e=>!i.has(e[0]))).concat(t?[["uniqueId",e=>`${e??""}42`]]:[]));case"moment":return Object.assign((function(){return a(...arguments)}),Object.fromEntries(Object.entries(a).filter((e=>!c.has(e[0])))));case"PIPES":return o.pipes;case"TAG_URL":return p(!0);case"SAFE_TAG_URL":return p();default:if(l.has(e))return window[e]}var r,s}function p(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];const o=[];return t.forEach(((t,r)=>{o.push(t),r<n.length&&o.push(e?String(n[r]).replace(/[^/]+/g,(e=>encodeURIComponent(e))):encodeURIComponent(String(n[r])))})),o.join("")}}}}]);
|
|
2
|
+
//# sourceMappingURL=1940.a199452a.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/1940.a199452a.js","mappings":"sMAGO,SAASA,EAAOC,EAAuBC,EAAyBC,GACrE,MAAMC,EAAkB,CACtBC,kBAGF,IAAK,MAAMC,KAAgBL,EACzB,IAAKM,OAAOC,UAAUC,eAAeC,KAAKN,EAAiBE,GACzD,GAAIJ,GAA2BK,OAAOC,UAAUC,eAAeC,KAAKR,EAAyBI,GAC3FF,EAAgBE,GAAgBJ,EAAwBI,OACnD,CACL,MAAMK,EAAWC,EAAiBN,EAAcH,QAC/BE,IAAbM,IACFP,EAAgBE,GAAgBK,EAEpC,CAGJ,OAAOP,CACT,CACA,MAAMS,EAAqB,IAAIC,IAAI,CAGnC,OAAQ,OAAQ,UAAW,YAAa,cAAe,SAAU,SAAU,UAAW,SAAU,WAAY,eAAgB,aAAc,WAAY,eAAgB,QAAS,YAAa,MAAO,UAAW,QAAS,SAAU,aAWjO,QAAS,MAAO,SAAU,OAAQ,UAAW,QAAS,aAAc,WAAY,QAAS,QAAS,OAAQ,UAAW,SAAU,OAAQ,WAAY,UAAW,eAAgB,QAAS,OAAQ,SAAU,WAAY,QAAS,SAGxNC,EAAqB,IAAID,IAAI,CAAC,OAAQ,WAAY,SAAU,aAAc,eAAgB,eAAgB,iBAC1GE,EAAuB,IAAIF,IAAI,CAAC,QAAS,UAAW,OAAQ,WAAY,OAAQ,OAAQ,MAAO,SAAU,SAAU,SAAU,YAAa,qBAAsB,YAAa,qBAAsB,WAAY,QAAS,aAAc,WAAY,MAAO,MAAO,MAAO,kBAAmB,UAAW,UAAW,OAAQ,SAC9T,SAASF,EAAiBN,EAAcH,GACtC,OAAQG,GACN,IAAK,SA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S,KAAK,GACrB,CACF,C","sources":["webpack:///../../node_modules/@next-core/supply/dist/esm/index.js"],"sourcesContent":["import lodash from \"lodash\";\nimport moment from \"moment\";\nimport { pipes } from \"@next-core/pipes\";\nexport function supply(attemptToVisitGlobals, providedGlobalVariables, mock) {\n const globalVariables = {\n undefined\n };\n // Allow limited browser builtin values.\n for (const variableName of attemptToVisitGlobals) {\n if (!Object.prototype.hasOwnProperty.call(globalVariables, variableName)) {\n if (providedGlobalVariables && Object.prototype.hasOwnProperty.call(providedGlobalVariables, variableName)) {\n globalVariables[variableName] = providedGlobalVariables[variableName];\n } else {\n const variable = supplyIndividual(variableName, mock);\n if (variable !== undefined) {\n globalVariables[variableName] = variable;\n }\n }\n }\n }\n return globalVariables;\n}\nconst shouldOmitInLodash = new Set([\n// Omit all mutable methods from lodash.\n// But allow sequence methods like `_.chain`.\n\"fill\", \"pull\", \"pullAll\", \"pullAllBy\", \"pullAllWith\", \"pullAt\", \"remove\", \"reverse\", \"assign\", \"assignIn\", \"assignInWith\", \"assignWith\", \"defaults\", \"defaultsDeep\", \"merge\", \"mergeWith\", \"set\", \"setWith\", \"unset\", \"update\", \"updateWith\",\n/**\n * Ignore `Function` methods from lodash, too.\n * There are chances to invoke `Object.assign`, etc.\n *\n * E.g.:\n *\n * ```\n * _.wrap(_.method('constructor.assign',{b:2},{b:3}),(func,...a) => func(...a))({})\n * ```\n */\n\"after\", \"ary\", \"before\", \"bind\", \"bindKey\", \"curry\", \"curryRight\", \"debounce\", \"defer\", \"delay\", \"flip\", \"memoize\", \"negate\", \"once\", \"overArgs\", \"partial\", \"partialRight\", \"rearg\", \"rest\", \"spread\", \"throttle\", \"unary\", \"wrap\"]);\n\n// Omit all mutable methods from moment.\nconst shouldOmitInMoment = new Set([\"lang\", \"langData\", \"locale\", \"localeData\", \"defineLocale\", \"updateLocale\", \"updateOffset\"]);\nconst allowedGlobalObjects = new Set([\"Array\", \"Boolean\", \"Date\", \"Infinity\", \"JSON\", \"Math\", \"NaN\", \"Number\", \"String\", \"RegExp\", \"decodeURI\", \"decodeURIComponent\", \"encodeURI\", \"encodeURIComponent\", \"isFinite\", \"isNaN\", \"parseFloat\", \"parseInt\", \"Map\", \"Set\", \"URL\", \"URLSearchParams\", \"WeakMap\", \"WeakSet\", \"atob\", \"btoa\"]);\nfunction supplyIndividual(variableName, mock) {\n switch (variableName) {\n case \"Object\":\n // Do not allow mutable methods like `Object.assign`.\n return delegateMethods(Object, [\"entries\", \"fromEntries\", \"keys\", \"values\"]);\n case \"_\":\n return Object.fromEntries(Object.entries(lodash).filter(entry => !shouldOmitInLodash.has(entry[0])).concat(mock ? [[\"uniqueId\", prefix => `${prefix ?? \"\"}42`]] : []));\n case \"moment\":\n return Object.assign(function () {\n return moment(...arguments);\n }, Object.fromEntries(Object.entries(moment).filter(entry => !shouldOmitInMoment.has(entry[0]))));\n case \"PIPES\":\n return pipes;\n case \"TAG_URL\":\n return tagUrlFactory(true);\n case \"SAFE_TAG_URL\":\n return tagUrlFactory();\n default:\n if (allowedGlobalObjects.has(variableName)) {\n return window[variableName];\n }\n }\n}\nfunction delegateMethods(target, methods) {\n return Object.fromEntries(methods.map(method => [method, function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return target[method].apply(target, args);\n }]));\n}\n/**\n * Pass `ignoreSlashes` as `true` to encode all tagged expressions\n * as URL components, except for `/` which maybe used in `APP.homepage`.\n *\n * Otherwise encode all tagged expressions as URL components.\n * This will encode `/` as `%2F`. So do not use it directly\n * with `APP.homepage` as in template expressions.\n *\n * @example\n *\n * ```js\n * TAG_URL`${APP.homepage}/list?q=${q}&redirect=${redirect}`\n * ```\n *\n * ```js\n * SAFE_TAG_URL`file/${path}?q=${q}`\n * // `path` will be fully transformed by `encodeURIComponent`.\n * ```\n *\n * ```js\n * // Wrap `APP.homepage` outside of `SAFE_TAG_URL`.\n * `${APP.homepage}/${SAFE_TAG_URL`file/${path}?q=${q}`}`\n * ```\n */\nfunction tagUrlFactory(ignoreSlashes) {\n return function (strings) {\n for (var _len2 = arguments.length, partials = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n partials[_key2 - 1] = arguments[_key2];\n }\n const result = [];\n strings.forEach((str, index) => {\n result.push(str);\n if (index < partials.length) {\n result.push(ignoreSlashes ? String(partials[index]).replace(/[^/]+/g, p => encodeURIComponent(p)) : encodeURIComponent(String(partials[index])));\n }\n });\n return result.join(\"\");\n };\n}\n//# sourceMappingURL=index.js.map"],"names":["supply","attemptToVisitGlobals","providedGlobalVariables","mock","globalVariables","undefined","variableName","Object","prototype","hasOwnProperty","call","variable","supplyIndividual","shouldOmitInLodash","Set","shouldOmitInMoment","allowedGlobalObjects","target","methods","fromEntries","map","method","_len","arguments","length","args","Array","_key","apply","entries","filter","entry","has","concat","prefix","assign","pipes","tagUrlFactory","window","ignoreSlashes","strings","_len2","partials","_key2","result","forEach","str","index","push","String","replace","p","encodeURIComponent","join"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[2277,4658],{2277:(e,t,r)=>{r.r(t),r.d(t,{inject:()=>v,transform:()=>m,transformAndInject:()=>w});var n=r(1030),a=r(
|
|
2
|
-
//# sourceMappingURL=2277.
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[2277,4658],{2277:(e,t,r)=>{r.r(t),r.d(t,{inject:()=>v,transform:()=>m,transformAndInject:()=>w});var n=r(1030),a=r(1744);let i=function(e){return e[e.Initial=0]="Initial",e[e.ExpectField=1]="ExpectField",e[e.ExpectOptionalBeginDefault=2]="ExpectOptionalBeginDefault",e[e.ExpectDefaultValue=3]="ExpectDefaultValue",e[e.ExpectOptionalBeginPipe=4]="ExpectOptionalBeginPipe",e[e.ExpectPipeIdentifier=5]="ExpectPipeIdentifier",e[e.ExpectOptionalBeginPipeParameter=6]="ExpectOptionalBeginPipeParameter",e[e.ExpectPipeParameter=7]="ExpectPipeParameter",e[e.ExpectPlaceholderEnd=8]="ExpectPlaceholderEnd",e}({}),s=function(e){return e.Raw="Raw",e.BeginPlaceHolder="BeginPlaceHolder",e.Field="Field",e.BeginDefault="BeginDefault",e.LiteralString="LiteralString",e.BeginPipe="BeginPipe",e.PipeIdentifier="PipeIdentifier",e.BeginPipeParameter="BeginPipeParameter",e.EndPlaceHolder="EndPlaceHolder",e.JsonValue="JsonValue",e}({}),c=function(e){return e[e.Array=0]="Array",e[e.Object=1]="Object",e[e.String=2]="String",e[e.Others=3]="Others",e}({});function o(e){return new RegExp(`(${[].concat(e).map((e=>(0,n.escapeRegExp)(e))).join("|")})\\{`)}function l(e){var t;const r=y(e),n=null===(t=r.match(e.beginPlaceholder))||void 0===t?void 0:t[0],a=n?r.indexOf(n):-1;if(a>=0&&n&&"{"!==r.charAt(a+n.length)){const t=e.cursor+a;a>0&&e.tokens.push({type:s.Raw,value:r.substring(0,a)}),e.tokens.push({type:s.BeginPlaceHolder,loc:{start:t,end:t+n.length},value:n.substring(0,n.length-1)}),e.cursor+=a+n.length,e.status=i.ExpectField}else e.tokens.push({type:s.Raw,value:r}),e.cursor=e.raw.length}function u(e){e.cursor+=y(e).match(/^[ \r\n\t]*/)[0].length}function p(e){const[t]=y(e).match(/^[\w.*[\]\-\u{80}-\u{10FFFF}]*/u);e.tokens.push({type:s.Field,value:t}),e.cursor+=t.length,e.status=i.ExpectOptionalBeginDefault}function f(e){"="===y(e).charAt(0)?(e.tokens.push({type:s.BeginDefault}),e.cursor+=1,e.status=i.ExpectDefaultValue):e.status=i.ExpectOptionalBeginPipe}function d(e){k(e,i.ExpectOptionalBeginPipe)}function g(e){"|"===y(e).charAt(0)?(e.tokens.push({type:s.BeginPipe}),e.cursor+=1,e.status=i.ExpectPipeIdentifier):e.status=i.ExpectPlaceholderEnd}function h(e){const t=y(e).match(/^[a-zA-Z]\w*/);if(!t)throw new Error(`Expected a pipe identifier at index ${e.cursor} near: ${JSON.stringify(e.raw.substring(e.cursor))}`);const r=t[0];e.tokens.push({type:s.PipeIdentifier,value:r}),e.cursor+=r.length,e.status=i.ExpectOptionalBeginPipeParameter}function P(e){":"===y(e).charAt(0)?(e.tokens.push({type:s.BeginPipeParameter}),e.cursor+=1,e.status=i.ExpectPipeParameter):e.status=i.ExpectOptionalBeginPipe}function E(e){k(e,i.ExpectOptionalBeginPipeParameter)}function b(e){if("}"!==y(e).charAt(0))throw new Error(`Expected a placeholder end '}' at index ${e.cursor} near: ${JSON.stringify(e.raw.substring(e.cursor))}`);e.tokens.push({type:s.EndPlaceHolder,loc:{start:e.cursor,end:e.cursor+1}}),e.cursor+=1,e.status=i.Initial}const x=new Map([["false",!1],["null",null],["true",!0]]);function k(e,t){const r=y(e);if(/[0-9[{"]/.test(r.charAt(0))||/-[0-9]/.test(r.substring(0,2)))!function(e,t){const r=y(e),n=r.charAt(0),a="["===n?c.Array:"{"===n?c.Object:'"'===n?c.String:c.Others;let i=0,o=0,l=0,u=!1,p=!1,f=!1;for(;i<r.length;){const e=r.charAt(i);if(p)p=!1;else if(u)'"'===e?u=!1:"\\"===e&&(p=!0);else switch(e){case"[":l+=1;break;case"{":o+=1;break;case"]":l-=1;break;case"}":o-=1;break;case'"':u=!0}switch(i+=1,a){case c.Array:f=!l;break;case c.Object:f=!o;break;case c.String:f=!u;break;default:f=i<r.length&&/[^a-z0-9E.+-]/.test(r.charAt(i))}if(f)break}if(!f)throw new Error(`Failed to match a JSON value at index ${e.cursor} near: ${JSON.stringify(e.raw.substring(e.cursor))}`);e.tokens.push({type:s.JsonValue,value:JSON.parse(r.substring(0,i))}),e.cursor+=i,e.status=t}(e,t);else{const[r]=y(e).match(/^[\w\-\u{80}-\u{10FFFF}]*/u);x.has(r)?e.tokens.push({type:s.JsonValue,value:x.get(r)}):e.tokens.push({type:s.LiteralString,value:r}),e.cursor+=r.length,e.status=t}}function y(e){return e.raw.substring(e.cursor)}function m(e,t){return A(e,"@",t)}function v(e,t){return A(e,"$",t)}function w(e,t){return A(e,["@","$"],t)}function A(e,t,r){if(!function(e,t){return o(t).test(e)}(e,t))return e;const c=(x=r.data,function(e){let t=e.field?(0,n.get)(x,e.field):x;return void 0===t&&(t=e.defaultValue),(0,a.processPipes)(t,e.pipes)});var x;const k=function(e,t){return function(r){const i=r.field.match(/^(?:(QUERY(?:_ARRAY)?|EVENT|query|event|APP|HASH|ANCHOR|SYS|FLAGS|CTX)\.)?(.+)$/);if(!i)return t.substring(r.loc.start,r.loc.end);let s,[,c,o]=i;!c&&/^[A-Z_]+$/.test(o)&&(c=o,o="*");const l={SYS:"sys",FLAGS:"flags"};switch(c){case"QUERY":case"query":s="*"===o?e.query:e.query.has(o)?e.query.get(o):void 0;break;case"QUERY_ARRAY":s=e.query.has(o)?e.query.getAll(o):void 0;break;case"EVENT":case"event":if(void 0===e.event)return t.substring(r.loc.start,r.loc.end);s="*"===o?e.event:(0,n.get)(e.event,o);break;case"APP":s="*"===o?e.overrideApp??e.app:(0,n.get)(e.overrideApp??e.app,o);break;case"HASH":s=e.location.hash;break;case"SYS":case"FLAGS":s="*"===o?e[l[c]]:(0,n.get)(e[l[c]],o);break;case"ANCHOR":{const t=e.location.hash?e.location.hash.substr(1):null;s="*"===o?t:(0,n.get)(t,o);break}case"CTX":{const e=t.substring(r.loc.start,r.loc.end);return console.error(`CTX is not supported in placeholder any more: "${e}"`),e}default:if(!e.match)return t.substring(r.loc.start,r.loc.end);s=e.match.params[o]}return void 0===s&&(s=r.defaultValue),(0,a.processPipes)(s,r.pipes)}}(r,e);return y=function(e,t){return function(e){const t={type:"InjectableString",elements:[]};let r;function n(t){return t===e[0].type&&(r=e.shift(),!0)}function a(t){if(r=e.shift(),Array.isArray(t)?!t.includes(r.type):t!==r.type)throw new Error(`Expected token: ${t}, received token: ${r.type}`)}for(;e.length>0;)if(n(s.Raw))t.elements.push({type:"RawString",value:r.value});else{a(s.BeginPlaceHolder);const e=r.loc.start,i=r.value;a(s.Field);const c={type:"Placeholder",symbol:i,field:r.value,defaultValue:void 0,pipes:[],loc:{start:e,end:e}};for(t.elements.push(c),n(s.BeginDefault)&&(a([s.JsonValue,s.LiteralString]),c.defaultValue=r.value);n(s.BeginPipe);){a(s.PipeIdentifier);const e={type:"PipeCall",identifier:r.value,parameters:[]};for(c.pipes.push(e);n(s.BeginPipeParameter);)a([s.JsonValue,s.LiteralString]),e.parameters.push(r.value)}a(s.EndPlaceHolder),c.loc.end=r.loc.end}return t}(function(e,t){const r={beginPlaceholder:o(t),raw:e,cursor:0,status:i.Initial,tokens:[]};for(;r.cursor<e.length;)switch(r.status){case i.Initial:l(r);break;case i.ExpectField:u(r),p(r);break;case i.ExpectOptionalBeginDefault:u(r),f(r);break;case i.ExpectDefaultValue:u(r),d(r);break;case i.ExpectOptionalBeginPipe:u(r),g(r);break;case i.ExpectPipeIdentifier:u(r),h(r);break;case i.ExpectOptionalBeginPipeParameter:u(r),P(r);break;case i.ExpectPipeParameter:u(r),E(r);break;case i.ExpectPlaceholderEnd:u(r),b(r)}if(r.status!==i.Initial)throw new Error("Expected a placeholder end '}' at the end");return r.tokens}(e,t))}(e,t).elements.map((e=>"RawString"===e.type?e.value:"$"===e.symbol?k(e):c(e))),1===y.length?y[0]:y.join("");var y}}}]);
|
|
2
|
+
//# sourceMappingURL=2277.f9546bd4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/4658.a7becf80.js","mappings":"qOAAO,IAAIA,EAA6B,SAAUA,GAUhD,OATAA,EAAcA,EAAuB,QAAI,GAAK,UAC9CA,EAAcA,EAA2B,YAAI,GAAK,cAClDA,EAAcA,EAA0C,2BAAI,GAAK,6BACjEA,EAAcA,EAAkC,mBAAI,GAAK,qBACzDA,EAAcA,EAAuC,wBAAI,GAAK,0BAC9DA,EAAcA,EAAoC,qBAAI,GAAK,uBAC3DA,EAAcA,EAAgD,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OAAQ,IAEV,KAAOb,EAAQY,OAASa,EAAIf,QAC1B,OAAQV,EAAQuB,QACd,KAAKnC,EAAciE,QACjBtD,EAA0CC,GAC1C,MACF,KAAKZ,EAAcoC,YACjBE,EAAc1B,GACd2B,EAAS3B,GACT,MACF,KAAKZ,EAAcyC,2BACjBH,EAAc1B,GACd8B,EAAmB9B,GACnB,MACF,KAAKZ,EAAc4C,mBACjBN,EAAc1B,GACdkC,EAAgBlC,GAChB,MACF,KAAKZ,EAAc6C,wBACjBP,EAAc1B,GACdoC,EAAqBpC,GACrB,MACF,KAAKZ,EAAckD,qBACjBZ,EAAc1B,GACdwC,EAAkBxC,GAClB,MACF,KAAKZ,EAAc0D,iCACjBpB,EAAc1B,GACd+C,EAA8B/C,GAC9B,MACF,KAAKZ,EAAc6D,oBACjBvB,EAAc1B,GACdkD,EAAiBlD,GACjB,MACF,KAAKZ,EAAcmD,qBACjBb,EAAc1B,GACdmD,EAAkBnD,GAIxB,GAAIA,EAAQuB,SAAWnC,EAAciE,QACnC,MAAM,IAAIX,MAAM,6CAElB,OAAO1C,EAAQa,MACjB,CErDqB+G,CAASnG,EAAKjC,GACnC,CDgBeqI,CAAsBpG,EAAKjC,GACpBwH,SAASrH,KAAIwF,GAAsB,cAAdA,EAAKpE,KAAuBoE,EAAKlE,MAAwB,MAAhBkE,EAAKvF,OAAiB8F,EAAWP,GAAQF,EAAcE,KAKnH,IAAlB2B,EAAOpG,OACFoG,EAAO,GAKTA,EAAOhH,KAAK,IARrB,IAA8BgH,CAD9B,C","sources":["webpack:///../../node_modules/@next-core/inject/dist/esm/interfaces.js","webpack:///../../node_modules/@next-core/inject/dist/esm/lexical.js","webpack:///../../node_modules/@next-core/inject/dist/esm/compile.js","webpack:///../../node_modules/@next-core/inject/dist/esm/syntax.js"],"sourcesContent":["export let LexicalStatus = /*#__PURE__*/function (LexicalStatus) {\n LexicalStatus[LexicalStatus[\"Initial\"] = 0] = \"Initial\";\n LexicalStatus[LexicalStatus[\"ExpectField\"] = 1] = \"ExpectField\";\n LexicalStatus[LexicalStatus[\"ExpectOptionalBeginDefault\"] = 2] = \"ExpectOptionalBeginDefault\";\n LexicalStatus[LexicalStatus[\"ExpectDefaultValue\"] = 3] = \"ExpectDefaultValue\";\n LexicalStatus[LexicalStatus[\"ExpectOptionalBeginPipe\"] = 4] = \"ExpectOptionalBeginPipe\";\n LexicalStatus[LexicalStatus[\"ExpectPipeIdentifier\"] = 5] = \"ExpectPipeIdentifier\";\n LexicalStatus[LexicalStatus[\"ExpectOptionalBeginPipeParameter\"] = 6] = \"ExpectOptionalBeginPipeParameter\";\n LexicalStatus[LexicalStatus[\"ExpectPipeParameter\"] = 7] = \"ExpectPipeParameter\";\n LexicalStatus[LexicalStatus[\"ExpectPlaceholderEnd\"] = 8] = \"ExpectPlaceholderEnd\";\n return LexicalStatus;\n}({});\nexport let TokenType = /*#__PURE__*/function (TokenType) {\n TokenType[\"Raw\"] = \"Raw\";\n TokenType[\"BeginPlaceHolder\"] = \"BeginPlaceHolder\";\n TokenType[\"Field\"] = \"Field\";\n TokenType[\"BeginDefault\"] = \"BeginDefault\";\n TokenType[\"LiteralString\"] = \"LiteralString\";\n TokenType[\"BeginPipe\"] = \"BeginPipe\";\n TokenType[\"PipeIdentifier\"] = \"PipeIdentifier\";\n TokenType[\"BeginPipeParameter\"] = \"BeginPipeParameter\";\n TokenType[\"EndPlaceHolder\"] = \"EndPlaceHolder\";\n TokenType[\"JsonValue\"] = \"JsonValue\";\n return TokenType;\n}({});\nexport let JsonValueType = /*#__PURE__*/function (JsonValueType) {\n JsonValueType[JsonValueType[\"Array\"] = 0] = \"Array\";\n JsonValueType[JsonValueType[\"Object\"] = 1] = \"Object\";\n JsonValueType[JsonValueType[\"String\"] = 2] = \"String\";\n JsonValueType[JsonValueType[\"Others\"] = 3] = \"Others\";\n return JsonValueType;\n}({});\n//# sourceMappingURL=interfaces.js.map","import { escapeRegExp } from \"lodash\";\nimport { LexicalStatus, TokenType, JsonValueType } from \"./interfaces.js\";\nexport function getRegExpOfPlaceholder(symbols) {\n return new RegExp(`(${[].concat(symbols).map(symbol => escapeRegExp(symbol)).join(\"|\")})\\\\{`);\n}\nexport function tokenize(raw, symbols) {\n const context = {\n beginPlaceholder: getRegExpOfPlaceholder(symbols),\n raw,\n cursor: 0,\n status: LexicalStatus.Initial,\n tokens: []\n };\n while (context.cursor < raw.length) {\n switch (context.status) {\n case LexicalStatus.Initial:\n eatOptionalRawAndOptionalPlaceholderBegin(context);\n break;\n case LexicalStatus.ExpectField:\n eatWhitespace(context);\n eatField(context);\n break;\n case LexicalStatus.ExpectOptionalBeginDefault:\n eatWhitespace(context);\n eatOptionalDefault(context);\n break;\n case LexicalStatus.ExpectDefaultValue:\n eatWhitespace(context);\n eatDefaultValue(context);\n break;\n case LexicalStatus.ExpectOptionalBeginPipe:\n eatWhitespace(context);\n eatOptionalBeginPipe(context);\n break;\n case LexicalStatus.ExpectPipeIdentifier:\n eatWhitespace(context);\n eatPipeIdentifier(context);\n break;\n case LexicalStatus.ExpectOptionalBeginPipeParameter:\n eatWhitespace(context);\n eatOptionalBeginPipeParameter(context);\n break;\n case LexicalStatus.ExpectPipeParameter:\n eatWhitespace(context);\n eatPipeParameter(context);\n break;\n case LexicalStatus.ExpectPlaceholderEnd:\n eatWhitespace(context);\n eatPlaceholderEnd(context);\n break;\n }\n }\n if (context.status !== LexicalStatus.Initial) {\n throw new Error(\"Expected a placeholder end '}' at the end\");\n }\n return context.tokens;\n}\nfunction eatOptionalRawAndOptionalPlaceholderBegin(context) {\n var _subRaw$match;\n const subRaw = getSubRaw(context);\n const matchedPlaceholder = (_subRaw$match = subRaw.match(context.beginPlaceholder)) === null || _subRaw$match === void 0 ? void 0 : _subRaw$match[0];\n const subCursor = matchedPlaceholder ? subRaw.indexOf(matchedPlaceholder) : -1;\n if (subCursor >= 0 && matchedPlaceholder && subRaw.charAt(subCursor + matchedPlaceholder.length) !== \"{\") {\n const nextCursor = context.cursor + subCursor;\n if (subCursor > 0) {\n context.tokens.push({\n type: TokenType.Raw,\n value: subRaw.substring(0, subCursor)\n });\n }\n context.tokens.push({\n type: TokenType.BeginPlaceHolder,\n loc: {\n start: nextCursor,\n end: nextCursor + matchedPlaceholder.length\n },\n value: matchedPlaceholder.substring(0, matchedPlaceholder.length - 1)\n });\n context.cursor += subCursor + matchedPlaceholder.length;\n context.status = LexicalStatus.ExpectField;\n } else {\n context.tokens.push({\n type: TokenType.Raw,\n value: subRaw\n });\n context.cursor = context.raw.length;\n }\n}\nfunction eatWhitespace(context) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n context.cursor += getSubRaw(context).match(/^[ \\r\\n\\t]*/)[0].length;\n}\nfunction eatField(context) {\n // Only allow alphanumeric, `_`, `.`, `*`, `[`, `]`, `-` and other non-ascii.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [value] = getSubRaw(context).match(/^[\\w.*[\\]\\-\\u{80}-\\u{10FFFF}]*/u);\n context.tokens.push({\n type: TokenType.Field,\n value\n });\n context.cursor += value.length;\n context.status = LexicalStatus.ExpectOptionalBeginDefault;\n}\nfunction eatOptionalDefault(context) {\n if (getSubRaw(context).charAt(0) === \"=\") {\n context.tokens.push({\n type: TokenType.BeginDefault\n });\n context.cursor += 1;\n context.status = LexicalStatus.ExpectDefaultValue;\n } else {\n context.status = LexicalStatus.ExpectOptionalBeginPipe;\n }\n}\nfunction eatDefaultValue(context) {\n eatJsonValueOrLiteralString(context, LexicalStatus.ExpectOptionalBeginPipe);\n}\nfunction eatOptionalBeginPipe(context) {\n if (getSubRaw(context).charAt(0) === \"|\") {\n context.tokens.push({\n type: TokenType.BeginPipe\n });\n context.cursor += 1;\n context.status = LexicalStatus.ExpectPipeIdentifier;\n } else {\n context.status = LexicalStatus.ExpectPlaceholderEnd;\n }\n}\nfunction eatPipeIdentifier(context) {\n const matches = getSubRaw(context).match(/^[a-zA-Z]\\w*/);\n if (!matches) {\n throw new Error(`Expected a pipe identifier at index ${context.cursor} near: ${JSON.stringify(context.raw.substring(context.cursor))}`);\n }\n const value = matches[0];\n context.tokens.push({\n type: TokenType.PipeIdentifier,\n value\n });\n context.cursor += value.length;\n context.status = LexicalStatus.ExpectOptionalBeginPipeParameter;\n}\nfunction eatOptionalBeginPipeParameter(context) {\n if (getSubRaw(context).charAt(0) === \":\") {\n context.tokens.push({\n type: TokenType.BeginPipeParameter\n });\n context.cursor += 1;\n context.status = LexicalStatus.ExpectPipeParameter;\n } else {\n context.status = LexicalStatus.ExpectOptionalBeginPipe;\n }\n}\nfunction eatPipeParameter(context) {\n eatJsonValueOrLiteralString(context, LexicalStatus.ExpectOptionalBeginPipeParameter);\n}\nfunction eatPlaceholderEnd(context) {\n if (getSubRaw(context).charAt(0) === \"}\") {\n context.tokens.push({\n type: TokenType.EndPlaceHolder,\n loc: {\n start: context.cursor,\n end: context.cursor + 1\n }\n });\n context.cursor += 1;\n context.status = LexicalStatus.Initial;\n } else {\n throw new Error(`Expected a placeholder end '}' at index ${context.cursor} near: ${JSON.stringify(context.raw.substring(context.cursor))}`);\n }\n}\nconst jsonLiteralMap = new Map([[\"false\", false], [\"null\", null], [\"true\", true]]);\nfunction eatJsonValueOrLiteralString(context, nextStatus) {\n const subRaw = getSubRaw(context);\n if (/[0-9[{\"]/.test(subRaw.charAt(0)) || /-[0-9]/.test(subRaw.substring(0, 2))) {\n eatJsonValue(context, nextStatus);\n } else {\n // Accept any characters except controls and whitespace.\n // Only allow alphanumeric, `_`, `-` and other non-ascii.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [value] = getSubRaw(context).match(/^[\\w\\-\\u{80}-\\u{10FFFF}]*/u);\n if (jsonLiteralMap.has(value)) {\n context.tokens.push({\n type: TokenType.JsonValue,\n value: jsonLiteralMap.get(value)\n });\n } else {\n context.tokens.push({\n type: TokenType.LiteralString,\n value\n });\n }\n context.cursor += value.length;\n context.status = nextStatus;\n }\n}\n\n// 我们不需要非常精确地在一段字符串中匹配出一段*完整合法的* JSON value,\n// 而只需要找到一段*可能是完整合法的* JSON value 即可,解析的工作交给 `JSON.parse()`。\n// 由于 JSON 中 object/array/string 的镜像起止符特性,我们尝试去完成这些符号匹配即可。\nfunction eatJsonValue(context, nextStatus) {\n const subRaw = getSubRaw(context);\n const firstChar = subRaw.charAt(0);\n const valueType = firstChar === \"[\" ? JsonValueType.Array : firstChar === \"{\" ? JsonValueType.Object : firstChar === '\"' ? JsonValueType.String : JsonValueType.Others;\n let subCursor = 0;\n let objectBracesToMatch = 0;\n let arrayBracketsToMatch = 0;\n let stringQuotesToClose = false;\n let stringBackslashToEscape = false;\n let matched = false;\n while (subCursor < subRaw.length) {\n const char = subRaw.charAt(subCursor);\n if (stringBackslashToEscape) {\n stringBackslashToEscape = false;\n } else if (stringQuotesToClose) {\n if (char === '\"') {\n stringQuotesToClose = false;\n } else if (char === \"\\\\\") {\n stringBackslashToEscape = true;\n }\n } else {\n switch (char) {\n case \"[\":\n arrayBracketsToMatch += 1;\n break;\n case \"{\":\n objectBracesToMatch += 1;\n break;\n case \"]\":\n arrayBracketsToMatch -= 1;\n break;\n case \"}\":\n objectBracesToMatch -= 1;\n break;\n case '\"':\n stringQuotesToClose = true;\n break;\n }\n }\n subCursor += 1;\n switch (valueType) {\n case JsonValueType.Array:\n matched = !arrayBracketsToMatch;\n break;\n case JsonValueType.Object:\n matched = !objectBracesToMatch;\n break;\n case JsonValueType.String:\n matched = !stringQuotesToClose;\n break;\n default:\n // 对于其它类型,如果下一个字符不再是这些值类型可能的字符时,我们认为 JSON value 完成匹配。\n // 其它可能的值类型:number/boolean/null/undefined。\n matched = subCursor < subRaw.length && /[^a-z0-9E.+-]/.test(subRaw.charAt(subCursor));\n }\n if (matched) {\n break;\n }\n }\n if (!matched) {\n throw new Error(`Failed to match a JSON value at index ${context.cursor} near: ${JSON.stringify(context.raw.substring(context.cursor))}`);\n }\n context.tokens.push({\n type: TokenType.JsonValue,\n value: JSON.parse(subRaw.substring(0, subCursor))\n });\n context.cursor += subCursor;\n context.status = nextStatus;\n}\nfunction getSubRaw(context) {\n return context.raw.substring(context.cursor);\n}\n//# sourceMappingURL=lexical.js.map","import { get } from \"lodash\";\nimport { processPipes } from \"@next-core/pipes\";\nimport { parseInjectableString } from \"./syntax.js\";\nimport { getRegExpOfPlaceholder } from \"./lexical.js\";\nexport function transform(raw, context) {\n return compile(raw, \"@\", context);\n}\nexport function inject(raw, context) {\n return compile(raw, \"$\", context);\n}\nexport function transformAndInject(raw, context) {\n return compile(raw, [\"@\", \"$\"], context);\n}\nfunction compile(raw, symbols, context) {\n // const symbols = [\"@\", \"$\"];\n if (!isInjectable(raw, symbols)) {\n return raw;\n }\n const transformNode = transformNodeFactory(context.data);\n const injectNode = injectNodeFactory(context, raw);\n const tree = parseInjectableString(raw, symbols);\n const values = tree.elements.map(node => node.type === \"RawString\" ? node.value : node.symbol === \"$\" ? injectNode(node) : transformNode(node));\n return reduceCompiledValues(values);\n}\nfunction reduceCompiledValues(values) {\n // If the whole string is a placeholder, we should keep the original value.\n if (values.length === 1) {\n return values[0];\n }\n\n // If an element is `undefined`, `null` or an empty array `[]`, it is converted to an empty string.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join#Description\n return values.join(\"\");\n}\nfunction isInjectable(raw, symbols) {\n return getRegExpOfPlaceholder(symbols).test(raw);\n}\nfunction transformNodeFactory(data) {\n return function transformNode(node) {\n // If meet `@{}`, return `data`.\n let result = node.field ? get(data, node.field) : data;\n if (result === undefined) {\n result = node.defaultValue;\n }\n return processPipes(result, node.pipes);\n };\n}\nfunction injectNodeFactory(context, raw) {\n return function injectNode(node) {\n const matches = node.field.match(/^(?:(QUERY(?:_ARRAY)?|EVENT|query|event|APP|HASH|ANCHOR|SYS|FLAGS|CTX)\\.)?(.+)$/);\n if (!matches) {\n // Keep the original raw partial when meet a unknown namespace.\n return raw.substring(node.loc.start, node.loc.end);\n }\n let [, namespace, subField] = matches;\n\n // Support namespace with no subfield such as `${ANCHOR}`.\n // But distinguish with match params. E.g. `${query}` is a match param.\n if (!namespace && /^[A-Z_]+$/.test(subField)) {\n namespace = subField;\n subField = \"*\";\n }\n let result;\n const SimpleContextMap = {\n SYS: \"sys\",\n FLAGS: \"flags\"\n };\n switch (namespace) {\n case \"QUERY\":\n case \"query\":\n if (subField === \"*\") {\n result = context.query;\n } else {\n result = context.query.has(subField) ? context.query.get(subField) : undefined;\n }\n break;\n case \"QUERY_ARRAY\":\n result = context.query.has(subField) ? context.query.getAll(subField) : undefined;\n break;\n case \"EVENT\":\n case \"event\":\n if (context.event === undefined) {\n // Keep the original raw partial when meet a `${EVENT}` in non-event context.\n return raw.substring(node.loc.start, node.loc.end);\n }\n result = subField === \"*\" ? context.event : get(context.event, subField);\n break;\n case \"APP\":\n result = subField === \"*\" ? context.overrideApp ?? context.app : get(context.overrideApp ?? context.app, subField);\n break;\n case \"HASH\":\n result = context.location.hash;\n break;\n case \"SYS\":\n case \"FLAGS\":\n result = subField === \"*\" ? context[SimpleContextMap[namespace]] : get(context[SimpleContextMap[namespace]], subField);\n break;\n case \"ANCHOR\":\n {\n const anchor = context.location.hash ? context.location.hash.substr(1) : null;\n result = subField === \"*\" ? anchor : get(anchor, subField);\n break;\n }\n case \"CTX\":\n {\n const original = raw.substring(node.loc.start, node.loc.end);\n // eslint-disable-next-line no-console\n console.error(`CTX is not supported in placeholder any more: \"${original}\"`);\n return original;\n }\n default:\n if (context.match) {\n result = context.match.params[subField];\n } else {\n // If the context is empty, return the original raw partial.\n return raw.substring(node.loc.start, node.loc.end);\n }\n }\n if (result === undefined) {\n result = node.defaultValue;\n }\n return processPipes(result, node.pipes);\n };\n}\n//# sourceMappingURL=compile.js.map","import { tokenize } from \"./lexical.js\";\nimport { TokenType } from \"./interfaces.js\";\nexport function parseInjectableString(raw, symbols) {\n return parseTokens(tokenize(raw, symbols));\n}\nfunction parseTokens(tokens) {\n const tree = {\n type: \"InjectableString\",\n elements: []\n };\n let token;\n function optionalToken(type) {\n if (type === tokens[0].type) {\n token = tokens.shift();\n return true;\n }\n return false;\n }\n function acceptToken(type) {\n token = tokens.shift();\n if (Array.isArray(type) ? !type.includes(token.type) : type !== token.type) {\n throw new Error(`Expected token: ${type}, received token: ${token.type}`);\n }\n }\n while (tokens.length > 0) {\n if (optionalToken(TokenType.Raw)) {\n tree.elements.push({\n type: \"RawString\",\n value: token.value\n });\n } else {\n acceptToken(TokenType.BeginPlaceHolder);\n const start = token.loc.start;\n const symbol = token.value;\n acceptToken(TokenType.Field);\n const placeholder = {\n type: \"Placeholder\",\n symbol,\n field: token.value,\n defaultValue: undefined,\n pipes: [],\n loc: {\n start,\n end: start\n }\n };\n tree.elements.push(placeholder);\n if (optionalToken(TokenType.BeginDefault)) {\n acceptToken([TokenType.JsonValue, TokenType.LiteralString]);\n placeholder.defaultValue = token.value;\n }\n while (optionalToken(TokenType.BeginPipe)) {\n acceptToken(TokenType.PipeIdentifier);\n const pipe = {\n type: \"PipeCall\",\n identifier: token.value,\n parameters: []\n };\n placeholder.pipes.push(pipe);\n while (optionalToken(TokenType.BeginPipeParameter)) {\n acceptToken([TokenType.JsonValue, TokenType.LiteralString]);\n pipe.parameters.push(token.value);\n }\n }\n acceptToken(TokenType.EndPlaceHolder);\n placeholder.loc.end = token.loc.end;\n }\n }\n return tree;\n}\n//# sourceMappingURL=syntax.js.map"],"names":["LexicalStatus","TokenType","JsonValueType","getRegExpOfPlaceholder","symbols","RegExp","concat","map","symbol","escapeRegExp","join","eatOptionalRawAndOptionalPlaceholderBegin","context","_subRaw$match","subRaw","getSubRaw","matchedPlaceholder","match","beginPlaceholder","subCursor","indexOf","charAt","length","nextCursor","cursor","tokens","push","type","Raw","value","substring","BeginPlaceHolder","loc","start","end","status","ExpectField","raw","eatWhitespace","eatField","Field","ExpectOptionalBeginDefault","eatOptionalDefault","BeginDefault","ExpectDefaultValue","ExpectOptionalBeginPipe","eatDefaultValue","eatJsonValueOrLiteralString","eatOptionalBeginPipe","BeginPipe","ExpectPipeIdentifier","ExpectPlaceholderEnd","eatPipeIdentifier","matches","Error","JSON","stringify","PipeIdentifier","ExpectOptionalBeginPipeParameter","eatOptionalBeginPipeParameter","BeginPipeParameter","ExpectPipeParameter","eatPipeParameter","eatPlaceholderEnd","EndPlaceHolder","Initial","jsonLiteralMap","Map","nextStatus","test","firstChar","valueType","Array","Object","String","Others","objectBracesToMatch","arrayBracketsToMatch","stringQuotesToClose","stringBackslashToEscape","matched","char","JsonValue","parse","eatJsonValue","has","get","LiteralString","transform","compile","inject","transformAndInject","isInjectable","transformNode","data","node","result","field","undefined","defaultValue","processPipes","pipes","injectNode","namespace","subField","SimpleContextMap","SYS","FLAGS","query","getAll","event","overrideApp","app","location","hash","anchor","substr","original","console","error","params","injectNodeFactory","values","tree","elements","token","optionalToken","shift","acceptToken","isArray","includes","placeholder","pipe","identifier","parameters","parseTokens","tokenize","parseInjectableString"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"chunks/2277.f9546bd4.js","mappings":"qOAAO,IAAIA,EAA6B,SAAUA,GAUhD,OATAA,EAAcA,EAAuB,QAAI,GAAK,UAC9CA,EAAcA,EAA2B,YAAI,GAAK,cAClDA,EAAcA,EAA0C,2BAAI,GAAK,6BACjEA,EAAcA,EAAkC,mBAAI,GAAK,qBACzDA,EAAcA,EAAuC,wBAAI,GAAK,0BAC9DA,EAAcA,EAAoC,qBAAI,GAAK,uBAC3DA,EAAcA,EAAgD,iCAAI,GAAK,mCACvEA,EAAcA,EAAmC,oBAAI,GAAK,sBAC1DA,EAAcA,EAAoC,qBAAI,GAAK,uBACpDA,CACT,CAXwC,CAWtC,CAAC,GACQC,EAAyB,SAAUA,GAW5C,OAVAA,EAAe,IAAI,MACnBA,EAA4B,iBAAI,mBAChCA,EAAiB,MAAI,QACrBA,EAAwB,aAAI,eAC5BA,EAAyB,cAAI,gBAC7BA,EAAqB,UAAI,YACzBA,EAA0B,eAAI,iBAC9BA,EAA8B,mBAAI,qBAClCA,EAA0B,eAAI,iBAC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rB,MACF,KAAKZ,EAAckD,qBACjBZ,EAAc1B,GACdwC,EAAkBxC,GAClB,MACF,KAAKZ,EAAc0D,iCACjBpB,EAAc1B,GACd+C,EAA8B/C,GAC9B,MACF,KAAKZ,EAAc6D,oBACjBvB,EAAc1B,GACdkD,EAAiBlD,GACjB,MACF,KAAKZ,EAAcmD,qBACjBb,EAAc1B,GACdmD,EAAkBnD,GAIxB,GAAIA,EAAQuB,SAAWnC,EAAciE,QACnC,MAAM,IAAIX,MAAM,6CAElB,OAAO1C,EAAQa,MACjB,CErDqB+G,CAASnG,EAAKjC,GACnC,CDgBeqI,CAAsBpG,EAAKjC,GACpBwH,SAASrH,KAAIwF,GAAsB,cAAdA,EAAKpE,KAAuBoE,EAAKlE,MAAwB,MAAhBkE,EAAKvF,OAAiB8F,EAAWP,GAAQF,EAAcE,KAKnH,IAAlB2B,EAAOpG,OACFoG,EAAO,GAKTA,EAAOhH,KAAK,IARrB,IAA8BgH,CAD9B,C","sources":["webpack:///../../node_modules/@next-core/inject/dist/esm/interfaces.js","webpack:///../../node_modules/@next-core/inject/dist/esm/lexical.js","webpack:///../../node_modules/@next-core/inject/dist/esm/compile.js","webpack:///../../node_modules/@next-core/inject/dist/esm/syntax.js"],"sourcesContent":["export let LexicalStatus = /*#__PURE__*/function (LexicalStatus) {\n LexicalStatus[LexicalStatus[\"Initial\"] = 0] = \"Initial\";\n LexicalStatus[LexicalStatus[\"ExpectField\"] = 1] = \"ExpectField\";\n LexicalStatus[LexicalStatus[\"ExpectOptionalBeginDefault\"] = 2] = \"ExpectOptionalBeginDefault\";\n LexicalStatus[LexicalStatus[\"ExpectDefaultValue\"] = 3] = \"ExpectDefaultValue\";\n LexicalStatus[LexicalStatus[\"ExpectOptionalBeginPipe\"] = 4] = \"ExpectOptionalBeginPipe\";\n LexicalStatus[LexicalStatus[\"ExpectPipeIdentifier\"] = 5] = \"ExpectPipeIdentifier\";\n LexicalStatus[LexicalStatus[\"ExpectOptionalBeginPipeParameter\"] = 6] = \"ExpectOptionalBeginPipeParameter\";\n LexicalStatus[LexicalStatus[\"ExpectPipeParameter\"] = 7] = \"ExpectPipeParameter\";\n LexicalStatus[LexicalStatus[\"ExpectPlaceholderEnd\"] = 8] = \"ExpectPlaceholderEnd\";\n return LexicalStatus;\n}({});\nexport let TokenType = /*#__PURE__*/function (TokenType) {\n TokenType[\"Raw\"] = \"Raw\";\n TokenType[\"BeginPlaceHolder\"] = \"BeginPlaceHolder\";\n TokenType[\"Field\"] = \"Field\";\n TokenType[\"BeginDefault\"] = \"BeginDefault\";\n TokenType[\"LiteralString\"] = \"LiteralString\";\n TokenType[\"BeginPipe\"] = \"BeginPipe\";\n TokenType[\"PipeIdentifier\"] = \"PipeIdentifier\";\n TokenType[\"BeginPipeParameter\"] = \"BeginPipeParameter\";\n TokenType[\"EndPlaceHolder\"] = \"EndPlaceHolder\";\n TokenType[\"JsonValue\"] = \"JsonValue\";\n return TokenType;\n}({});\nexport let JsonValueType = /*#__PURE__*/function (JsonValueType) {\n JsonValueType[JsonValueType[\"Array\"] = 0] = \"Array\";\n JsonValueType[JsonValueType[\"Object\"] = 1] = \"Object\";\n JsonValueType[JsonValueType[\"String\"] = 2] = \"String\";\n JsonValueType[JsonValueType[\"Others\"] = 3] = \"Others\";\n return JsonValueType;\n}({});\n//# sourceMappingURL=interfaces.js.map","import { escapeRegExp } from \"lodash\";\nimport { LexicalStatus, TokenType, JsonValueType } from \"./interfaces.js\";\nexport function getRegExpOfPlaceholder(symbols) {\n return new RegExp(`(${[].concat(symbols).map(symbol => escapeRegExp(symbol)).join(\"|\")})\\\\{`);\n}\nexport function tokenize(raw, symbols) {\n const context = {\n beginPlaceholder: getRegExpOfPlaceholder(symbols),\n raw,\n cursor: 0,\n status: LexicalStatus.Initial,\n tokens: []\n };\n while (context.cursor < raw.length) {\n switch (context.status) {\n case LexicalStatus.Initial:\n eatOptionalRawAndOptionalPlaceholderBegin(context);\n break;\n case LexicalStatus.ExpectField:\n eatWhitespace(context);\n eatField(context);\n break;\n case LexicalStatus.ExpectOptionalBeginDefault:\n eatWhitespace(context);\n eatOptionalDefault(context);\n break;\n case LexicalStatus.ExpectDefaultValue:\n eatWhitespace(context);\n eatDefaultValue(context);\n break;\n case LexicalStatus.ExpectOptionalBeginPipe:\n eatWhitespace(context);\n eatOptionalBeginPipe(context);\n break;\n case LexicalStatus.ExpectPipeIdentifier:\n eatWhitespace(context);\n eatPipeIdentifier(context);\n break;\n case LexicalStatus.ExpectOptionalBeginPipeParameter:\n eatWhitespace(context);\n eatOptionalBeginPipeParameter(context);\n break;\n case LexicalStatus.ExpectPipeParameter:\n eatWhitespace(context);\n eatPipeParameter(context);\n break;\n case LexicalStatus.ExpectPlaceholderEnd:\n eatWhitespace(context);\n eatPlaceholderEnd(context);\n break;\n }\n }\n if (context.status !== LexicalStatus.Initial) {\n throw new Error(\"Expected a placeholder end '}' at the end\");\n }\n return context.tokens;\n}\nfunction eatOptionalRawAndOptionalPlaceholderBegin(context) {\n var _subRaw$match;\n const subRaw = getSubRaw(context);\n const matchedPlaceholder = (_subRaw$match = subRaw.match(context.beginPlaceholder)) === null || _subRaw$match === void 0 ? void 0 : _subRaw$match[0];\n const subCursor = matchedPlaceholder ? subRaw.indexOf(matchedPlaceholder) : -1;\n if (subCursor >= 0 && matchedPlaceholder && subRaw.charAt(subCursor + matchedPlaceholder.length) !== \"{\") {\n const nextCursor = context.cursor + subCursor;\n if (subCursor > 0) {\n context.tokens.push({\n type: TokenType.Raw,\n value: subRaw.substring(0, subCursor)\n });\n }\n context.tokens.push({\n type: TokenType.BeginPlaceHolder,\n loc: {\n start: nextCursor,\n end: nextCursor + matchedPlaceholder.length\n },\n value: matchedPlaceholder.substring(0, matchedPlaceholder.length - 1)\n });\n context.cursor += subCursor + matchedPlaceholder.length;\n context.status = LexicalStatus.ExpectField;\n } else {\n context.tokens.push({\n type: TokenType.Raw,\n value: subRaw\n });\n context.cursor = context.raw.length;\n }\n}\nfunction eatWhitespace(context) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n context.cursor += getSubRaw(context).match(/^[ \\r\\n\\t]*/)[0].length;\n}\nfunction eatField(context) {\n // Only allow alphanumeric, `_`, `.`, `*`, `[`, `]`, `-` and other non-ascii.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [value] = getSubRaw(context).match(/^[\\w.*[\\]\\-\\u{80}-\\u{10FFFF}]*/u);\n context.tokens.push({\n type: TokenType.Field,\n value\n });\n context.cursor += value.length;\n context.status = LexicalStatus.ExpectOptionalBeginDefault;\n}\nfunction eatOptionalDefault(context) {\n if (getSubRaw(context).charAt(0) === \"=\") {\n context.tokens.push({\n type: TokenType.BeginDefault\n });\n context.cursor += 1;\n context.status = LexicalStatus.ExpectDefaultValue;\n } else {\n context.status = LexicalStatus.ExpectOptionalBeginPipe;\n }\n}\nfunction eatDefaultValue(context) {\n eatJsonValueOrLiteralString(context, LexicalStatus.ExpectOptionalBeginPipe);\n}\nfunction eatOptionalBeginPipe(context) {\n if (getSubRaw(context).charAt(0) === \"|\") {\n context.tokens.push({\n type: TokenType.BeginPipe\n });\n context.cursor += 1;\n context.status = LexicalStatus.ExpectPipeIdentifier;\n } else {\n context.status = LexicalStatus.ExpectPlaceholderEnd;\n }\n}\nfunction eatPipeIdentifier(context) {\n const matches = getSubRaw(context).match(/^[a-zA-Z]\\w*/);\n if (!matches) {\n throw new Error(`Expected a pipe identifier at index ${context.cursor} near: ${JSON.stringify(context.raw.substring(context.cursor))}`);\n }\n const value = matches[0];\n context.tokens.push({\n type: TokenType.PipeIdentifier,\n value\n });\n context.cursor += value.length;\n context.status = LexicalStatus.ExpectOptionalBeginPipeParameter;\n}\nfunction eatOptionalBeginPipeParameter(context) {\n if (getSubRaw(context).charAt(0) === \":\") {\n context.tokens.push({\n type: TokenType.BeginPipeParameter\n });\n context.cursor += 1;\n context.status = LexicalStatus.ExpectPipeParameter;\n } else {\n context.status = LexicalStatus.ExpectOptionalBeginPipe;\n }\n}\nfunction eatPipeParameter(context) {\n eatJsonValueOrLiteralString(context, LexicalStatus.ExpectOptionalBeginPipeParameter);\n}\nfunction eatPlaceholderEnd(context) {\n if (getSubRaw(context).charAt(0) === \"}\") {\n context.tokens.push({\n type: TokenType.EndPlaceHolder,\n loc: {\n start: context.cursor,\n end: context.cursor + 1\n }\n });\n context.cursor += 1;\n context.status = LexicalStatus.Initial;\n } else {\n throw new Error(`Expected a placeholder end '}' at index ${context.cursor} near: ${JSON.stringify(context.raw.substring(context.cursor))}`);\n }\n}\nconst jsonLiteralMap = new Map([[\"false\", false], [\"null\", null], [\"true\", true]]);\nfunction eatJsonValueOrLiteralString(context, nextStatus) {\n const subRaw = getSubRaw(context);\n if (/[0-9[{\"]/.test(subRaw.charAt(0)) || /-[0-9]/.test(subRaw.substring(0, 2))) {\n eatJsonValue(context, nextStatus);\n } else {\n // Accept any characters except controls and whitespace.\n // Only allow alphanumeric, `_`, `-` and other non-ascii.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const [value] = getSubRaw(context).match(/^[\\w\\-\\u{80}-\\u{10FFFF}]*/u);\n if (jsonLiteralMap.has(value)) {\n context.tokens.push({\n type: TokenType.JsonValue,\n value: jsonLiteralMap.get(value)\n });\n } else {\n context.tokens.push({\n type: TokenType.LiteralString,\n value\n });\n }\n context.cursor += value.length;\n context.status = nextStatus;\n }\n}\n\n// 我们不需要非常精确地在一段字符串中匹配出一段*完整合法的* JSON value,\n// 而只需要找到一段*可能是完整合法的* JSON value 即可,解析的工作交给 `JSON.parse()`。\n// 由于 JSON 中 object/array/string 的镜像起止符特性,我们尝试去完成这些符号匹配即可。\nfunction eatJsonValue(context, nextStatus) {\n const subRaw = getSubRaw(context);\n const firstChar = subRaw.charAt(0);\n const valueType = firstChar === \"[\" ? JsonValueType.Array : firstChar === \"{\" ? JsonValueType.Object : firstChar === '\"' ? JsonValueType.String : JsonValueType.Others;\n let subCursor = 0;\n let objectBracesToMatch = 0;\n let arrayBracketsToMatch = 0;\n let stringQuotesToClose = false;\n let stringBackslashToEscape = false;\n let matched = false;\n while (subCursor < subRaw.length) {\n const char = subRaw.charAt(subCursor);\n if (stringBackslashToEscape) {\n stringBackslashToEscape = false;\n } else if (stringQuotesToClose) {\n if (char === '\"') {\n stringQuotesToClose = false;\n } else if (char === \"\\\\\") {\n stringBackslashToEscape = true;\n }\n } else {\n switch (char) {\n case \"[\":\n arrayBracketsToMatch += 1;\n break;\n case \"{\":\n objectBracesToMatch += 1;\n break;\n case \"]\":\n arrayBracketsToMatch -= 1;\n break;\n case \"}\":\n objectBracesToMatch -= 1;\n break;\n case '\"':\n stringQuotesToClose = true;\n break;\n }\n }\n subCursor += 1;\n switch (valueType) {\n case JsonValueType.Array:\n matched = !arrayBracketsToMatch;\n break;\n case JsonValueType.Object:\n matched = !objectBracesToMatch;\n break;\n case JsonValueType.String:\n matched = !stringQuotesToClose;\n break;\n default:\n // 对于其它类型,如果下一个字符不再是这些值类型可能的字符时,我们认为 JSON value 完成匹配。\n // 其它可能的值类型:number/boolean/null/undefined。\n matched = subCursor < subRaw.length && /[^a-z0-9E.+-]/.test(subRaw.charAt(subCursor));\n }\n if (matched) {\n break;\n }\n }\n if (!matched) {\n throw new Error(`Failed to match a JSON value at index ${context.cursor} near: ${JSON.stringify(context.raw.substring(context.cursor))}`);\n }\n context.tokens.push({\n type: TokenType.JsonValue,\n value: JSON.parse(subRaw.substring(0, subCursor))\n });\n context.cursor += subCursor;\n context.status = nextStatus;\n}\nfunction getSubRaw(context) {\n return context.raw.substring(context.cursor);\n}\n//# sourceMappingURL=lexical.js.map","import { get } from \"lodash\";\nimport { processPipes } from \"@next-core/pipes\";\nimport { parseInjectableString } from \"./syntax.js\";\nimport { getRegExpOfPlaceholder } from \"./lexical.js\";\nexport function transform(raw, context) {\n return compile(raw, \"@\", context);\n}\nexport function inject(raw, context) {\n return compile(raw, \"$\", context);\n}\nexport function transformAndInject(raw, context) {\n return compile(raw, [\"@\", \"$\"], context);\n}\nfunction compile(raw, symbols, context) {\n // const symbols = [\"@\", \"$\"];\n if (!isInjectable(raw, symbols)) {\n return raw;\n }\n const transformNode = transformNodeFactory(context.data);\n const injectNode = injectNodeFactory(context, raw);\n const tree = parseInjectableString(raw, symbols);\n const values = tree.elements.map(node => node.type === \"RawString\" ? node.value : node.symbol === \"$\" ? injectNode(node) : transformNode(node));\n return reduceCompiledValues(values);\n}\nfunction reduceCompiledValues(values) {\n // If the whole string is a placeholder, we should keep the original value.\n if (values.length === 1) {\n return values[0];\n }\n\n // If an element is `undefined`, `null` or an empty array `[]`, it is converted to an empty string.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/join#Description\n return values.join(\"\");\n}\nfunction isInjectable(raw, symbols) {\n return getRegExpOfPlaceholder(symbols).test(raw);\n}\nfunction transformNodeFactory(data) {\n return function transformNode(node) {\n // If meet `@{}`, return `data`.\n let result = node.field ? get(data, node.field) : data;\n if (result === undefined) {\n result = node.defaultValue;\n }\n return processPipes(result, node.pipes);\n };\n}\nfunction injectNodeFactory(context, raw) {\n return function injectNode(node) {\n const matches = node.field.match(/^(?:(QUERY(?:_ARRAY)?|EVENT|query|event|APP|HASH|ANCHOR|SYS|FLAGS|CTX)\\.)?(.+)$/);\n if (!matches) {\n // Keep the original raw partial when meet a unknown namespace.\n return raw.substring(node.loc.start, node.loc.end);\n }\n let [, namespace, subField] = matches;\n\n // Support namespace with no subfield such as `${ANCHOR}`.\n // But distinguish with match params. E.g. `${query}` is a match param.\n if (!namespace && /^[A-Z_]+$/.test(subField)) {\n namespace = subField;\n subField = \"*\";\n }\n let result;\n const SimpleContextMap = {\n SYS: \"sys\",\n FLAGS: \"flags\"\n };\n switch (namespace) {\n case \"QUERY\":\n case \"query\":\n if (subField === \"*\") {\n result = context.query;\n } else {\n result = context.query.has(subField) ? context.query.get(subField) : undefined;\n }\n break;\n case \"QUERY_ARRAY\":\n result = context.query.has(subField) ? context.query.getAll(subField) : undefined;\n break;\n case \"EVENT\":\n case \"event\":\n if (context.event === undefined) {\n // Keep the original raw partial when meet a `${EVENT}` in non-event context.\n return raw.substring(node.loc.start, node.loc.end);\n }\n result = subField === \"*\" ? context.event : get(context.event, subField);\n break;\n case \"APP\":\n result = subField === \"*\" ? context.overrideApp ?? context.app : get(context.overrideApp ?? context.app, subField);\n break;\n case \"HASH\":\n result = context.location.hash;\n break;\n case \"SYS\":\n case \"FLAGS\":\n result = subField === \"*\" ? context[SimpleContextMap[namespace]] : get(context[SimpleContextMap[namespace]], subField);\n break;\n case \"ANCHOR\":\n {\n const anchor = context.location.hash ? context.location.hash.substr(1) : null;\n result = subField === \"*\" ? anchor : get(anchor, subField);\n break;\n }\n case \"CTX\":\n {\n const original = raw.substring(node.loc.start, node.loc.end);\n // eslint-disable-next-line no-console\n console.error(`CTX is not supported in placeholder any more: \"${original}\"`);\n return original;\n }\n default:\n if (context.match) {\n result = context.match.params[subField];\n } else {\n // If the context is empty, return the original raw partial.\n return raw.substring(node.loc.start, node.loc.end);\n }\n }\n if (result === undefined) {\n result = node.defaultValue;\n }\n return processPipes(result, node.pipes);\n };\n}\n//# sourceMappingURL=compile.js.map","import { tokenize } from \"./lexical.js\";\nimport { TokenType } from \"./interfaces.js\";\nexport function parseInjectableString(raw, symbols) {\n return parseTokens(tokenize(raw, symbols));\n}\nfunction parseTokens(tokens) {\n const tree = {\n type: \"InjectableString\",\n elements: []\n };\n let token;\n function optionalToken(type) {\n if (type === tokens[0].type) {\n token = tokens.shift();\n return true;\n }\n return false;\n }\n function acceptToken(type) {\n token = tokens.shift();\n if (Array.isArray(type) ? !type.includes(token.type) : type !== token.type) {\n throw new Error(`Expected token: ${type}, received token: ${token.type}`);\n }\n }\n while (tokens.length > 0) {\n if (optionalToken(TokenType.Raw)) {\n tree.elements.push({\n type: \"RawString\",\n value: token.value\n });\n } else {\n acceptToken(TokenType.BeginPlaceHolder);\n const start = token.loc.start;\n const symbol = token.value;\n acceptToken(TokenType.Field);\n const placeholder = {\n type: \"Placeholder\",\n symbol,\n field: token.value,\n defaultValue: undefined,\n pipes: [],\n loc: {\n start,\n end: start\n }\n };\n tree.elements.push(placeholder);\n if (optionalToken(TokenType.BeginDefault)) {\n acceptToken([TokenType.JsonValue, TokenType.LiteralString]);\n placeholder.defaultValue = token.value;\n }\n while (optionalToken(TokenType.BeginPipe)) {\n acceptToken(TokenType.PipeIdentifier);\n const pipe = {\n type: \"PipeCall\",\n identifier: token.value,\n parameters: []\n };\n placeholder.pipes.push(pipe);\n while (optionalToken(TokenType.BeginPipeParameter)) {\n acceptToken([TokenType.JsonValue, TokenType.LiteralString]);\n pipe.parameters.push(token.value);\n }\n }\n acceptToken(TokenType.EndPlaceHolder);\n placeholder.loc.end = token.loc.end;\n }\n }\n return tree;\n}\n//# sourceMappingURL=syntax.js.map"],"names":["LexicalStatus","TokenType","JsonValueType","getRegExpOfPlaceholder","symbols","RegExp","concat","map","symbol","escapeRegExp","join","eatOptionalRawAndOptionalPlaceholderBegin","context","_subRaw$match","subRaw","getSubRaw","matchedPlaceholder","match","beginPlaceholder","subCursor","indexOf","charAt","length","nextCursor","cursor","tokens","push","type","Raw","value","substring","BeginPlaceHolder","loc","start","end","status","ExpectField","raw","eatWhitespace","eatField","Field","ExpectOptionalBeginDefault","eatOptionalDefault","BeginDefault","ExpectDefaultValue","ExpectOptionalBeginPipe","eatDefaultValue","eatJsonValueOrLiteralString","eatOptionalBeginPipe","BeginPipe","ExpectPipeIdentifier","ExpectPlaceholderEnd","eatPipeIdentifier","matches","Error","JSON","stringify","PipeIdentifier","ExpectOptionalBeginPipeParameter","eatOptionalBeginPipeParameter","BeginPipeParameter","ExpectPipeParameter","eatPipeParameter","eatPlaceholderEnd","EndPlaceHolder","Initial","jsonLiteralMap","Map","nextStatus","test","firstChar","valueType","Array","Object","String","Others","objectBracesToMatch","arrayBracketsToMatch","stringQuotesToClose","stringBackslashToEscape","matched","char","JsonValue","parse","eatJsonValue","has","get","LiteralString","transform","compile","inject","transformAndInject","isInjectable","transformNode","data","node","result","field","undefined","defaultValue","processPipes","pipes","injectNode","namespace","subField","SimpleContextMap","SYS","FLAGS","query","getAll","event","overrideApp","app","location","hash","anchor","substr","original","console","error","params","injectNodeFactory","values","tree","elements","token","optionalToken","shift","acceptToken","isArray","includes","placeholder","pipe","identifier","parameters","parseTokens","tokenize","parseInjectableString"],"sourceRoot":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[3171,5552,790],{5552:(e,n,t)=>{t.r(n),t.d(n,{i18n:()=>f,i18nText:()=>l,initializeI18n:()=>c});var i=t(2350),s=t(8799),r=t(7072);let o=!1;const a=new Set;function c(e,n){if(o||(o=!0,s.i18n.use(r.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!a.has(e)){a.add(e);for(const[t,i]of Object.entries(n))s.i18n.addResourceBundle(t,e,i)}}var u=t(
|
|
2
|
-
//# sourceMappingURL=3171.
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[3171,5552,790],{5552:(e,n,t)=>{t.r(n),t.d(n,{i18n:()=>f,i18nText:()=>l,initializeI18n:()=>c});var i=t(2350),s=t(8799),r=t(7072);let o=!1;const a=new Set;function c(e,n){if(o||(o=!0,s.i18n.use(r.default).init({fallbackLng:"zh",debug:!1,supportedLngs:["zh","en"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1},compatibilityJSON:"v3",resources:{}})),e&&n&&!a.has(e)){a.add(e);for(const[t,i]of Object.entries(n))s.i18n.addResourceBundle(t,e,i)}}var u=t(3078);function l(e){if(!e)return;const n=s.i18n.language??"zh-CN";if((0,u.hasOwnProperty)(e,n))return e[n];const t=n.split("-")[0];if(t!==n)return(0,u.hasOwnProperty)(e,t)?e[t]:void 0;const i=`${t}-`;for(const n of Object.keys(e))if(n.startsWith(i))return e[n]}const f=i.default}}]);
|
|
2
|
+
//# sourceMappingURL=3171.8cf6f87a.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/
|
|
1
|
+
{"version":3,"file":"chunks/3171.8cf6f87a.js","mappings":"4OAEA,IAAIA,GAAc,EAClB,MAAMC,EAAwB,IAAIC,IAC3B,SAASC,EAAeC,EAAIC,GAwBjC,GAvBKL,IACHA,GAAc,EACd,EAAAM,KAICC,IAAmF,WAEnFC,KAAK,CACJC,YAAa,KACbC,OAAO,EACPC,cAAe,CAAC,KAAM,MACtBC,0BAA0B,EAC1BC,cAAe,CACbC,aAAa,GAEfC,MAAO,CACLC,aAAa,GAEfC,kBAAmB,KACnBC,UAAW,CAAC,KAGXd,GAAOC,IAAWJ,EAAsBkB,IAAIf,GAAjD,CAGAH,EAAsBmB,IAAIhB,GAC1B,IAAK,MAAOiB,EAAMH,KAAcI,OAAOC,QAAQlB,GAC7C,EAAAC,KAAKkB,kBAAkBH,EAAMjB,EAAIc,EAHnC,CAKF,C,cCjCO,SAASO,EAASC,GACvB,IAAKA,EACH,OAEF,MAAMC,EAAW,EAAArB,KAAKqB,UAAY,QAElC,IAAI,IAAAC,gBAAeF,EAAMC,GACvB,OAAOD,EAAKC,GAGd,MAAME,EAAkBF,EAASG,MAAM,KAAK,GAC5C,GAAID,IAAoBF,EAGtB,OAAO,IAAAC,gBAAeF,EAAMG,GAAmBH,EAAKG,QAAmBE,EAKzE,MAAMC,EAAS,GAAGH,KAClB,IAAK,MAAMI,KAAOX,OAAOY,KAAKR,GAC5B,GAAIO,EAAIE,WAAWH,GACjB,OAAON,EAAKO,EAGlB,CC1BO,MAAM3B,EAA6E,S","sources":["webpack:///../../node_modules/@next-core/i18n/dist/esm/init.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/text.js","webpack:///../../node_modules/@next-core/i18n/dist/esm/index.js"],"sourcesContent":["import { i18n } from \"@next-core/i18n\";\nimport LanguageDetector from \"i18next-browser-languagedetector\";\nlet initialized = false;\nconst initializedNamespaces = new Set();\nexport function initializeI18n(NS, locales) {\n if (!initialized) {\n initialized = true;\n i18n\n // learn more: https://github.com/i18next/i18next-xhr-backend\n // .use(Backend)\n // learn more: https://github.com/i18next/i18next-browser-languageDetector\n .use(process.env.NODE_ENV === \"test\" ? LanguageDetector : /* istanbul ignore next */LanguageDetector.default)\n // for all options read: https://www.i18next.com/overview/configuration-options\n .init({\n fallbackLng: \"zh\",\n debug: process.env.NODE_ENV === \"development\",\n supportedLngs: [\"zh\", \"en\"],\n nonExplicitSupportedLngs: true,\n interpolation: {\n escapeValue: false // not needed for react as it escapes by default\n },\n react: {\n useSuspense: false\n },\n compatibilityJSON: \"v3\",\n resources: {}\n });\n }\n if (!NS || !locales || initializedNamespaces.has(NS)) {\n return;\n }\n initializedNamespaces.add(NS);\n for (const [lang, resources] of Object.entries(locales)) {\n i18n.addResourceBundle(lang, NS, resources);\n }\n}\n//# sourceMappingURL=init.js.map","import { i18n } from \"@next-core/i18n\";\nimport { hasOwnProperty } from \"@next-core/utils/general\";\nexport function i18nText(data) {\n if (!data) {\n return;\n }\n const language = i18n.language ?? \"zh-CN\";\n // First, make a perfect match.\n if (hasOwnProperty(data, language)) {\n return data[language];\n }\n // https://en.wikipedia.org/wiki/IETF_language_tag\n const primaryLanguage = language.split(\"-\")[0];\n if (primaryLanguage !== language) {\n // Then, match the primary language (which omits other subtags).\n // E.g., match `zh` if the current language is `zh-CN`.\n return hasOwnProperty(data, primaryLanguage) ? data[primaryLanguage] : undefined;\n }\n // At last, match the first key which starts with the primary language,\n // if the current language contains primary subtag only.\n // E.g., match `zh-CN` if the current language is `zh`.\n const prefix = `${primaryLanguage}-`;\n for (const key of Object.keys(data)) {\n if (key.startsWith(prefix)) {\n return data[key];\n }\n }\n}\n//# sourceMappingURL=text.js.map","import i18next from \"i18next\";\nexport const i18n = process.env.NODE_ENV === \"test\" ? i18next : /* istanbul ignore next */i18next.default;\nexport * from \"./init.js\";\nexport * from \"./text.js\";\n//# sourceMappingURL=index.js.map"],"names":["initialized","initializedNamespaces","Set","initializeI18n","NS","locales","i18n","use","init","fallbackLng","debug","supportedLngs","nonExplicitSupportedLngs","interpolation","escapeValue","react","useSuspense","compatibilityJSON","resources","has","add","lang","Object","entries","addResourceBundle","i18nText","data","language","hasOwnProperty","primaryLanguage","split","undefined","prefix","key","keys","startsWith"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[3933,6314],{3933:(e,t,o)=>{function n(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return function(r,s){if("string"==typeof t?r.name===t:t.includes(r.name)){const t=[];for(let i=1;i<=o;i++){const o=s[s.length-i];if("MemberExpression"===(null==o?void 0:o.node.type)&&"object"===o.key){const s=o.node;s.computed||"Identifier"!==s.property.type?s.computed&&"Literal"===s.property.type&&"string"==typeof s.property.value?t.push(n?`${r.name}.${s.property.value}`:s.property.value):e.hasNonStaticUsage=!0:t.push(n?`${r.name}.${s.property.name}`:s.property.name)}else e.hasNonStaticUsage=!0}t.length===o&&e.usedProperties.add(t.join("."))}}}function r(e,t){return function(o,n,r){if(n.name===e){const e=r[r.length-1],n=r[r.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==e?void 0:e.node.type)&&"object"===e.key&&(e.node.computed?"Literal"===e.node.property.type&&e.node.property.value===t:"Identifier"===e.node.property.type&&e.node.property.name===t)){const e=n.node.arguments;if(e.length>0){const t=e[0];"Literal"===t.type&&"string"==typeof t.value?o.usedArgs.add(t.value):o.hasNonStaticUsage=!0}}}}}o.r(t),o.d(t,{beforeVisitGlobalMember:()=>n,collectAppGetMenuUsage:()=>s,collectInstalledAppsHasUsage:()=>i,collectMemberUsage:()=>p,collectMemberUsageInFunction:()=>S,createProviderClass:()=>c.createProviderClass,scanPermissionActionsInAny:()=>P,scanPermissionActionsInStoryboard:()=>v,strictCollectMemberUsage:()=>l,track:()=>f,trackAll:()=>y,traverseStoryboardExpressions:()=>u,traverseStoryboardFunction:()=>g,traverseStoryboardFunctions:()=>h,unwrapProvider:()=>c.unwrapProvider});const s=r("APP","getMenu"),i=r("INSTALLED_APPS","has");var a=o(522),c=o(2681);function u(e,t,o){const n=new WeakSet,{matchExpressionString:r,visitNotMatchedExpressionString:s,visitNonExpressionString:i,visitObject:u}="string"==typeof o?{matchExpressionString:e=>e.includes(o)}:o;!function e(o){if("string"==typeof o)if((0,a.isEvaluable)(o))if(r(o))try{(0,a.preevaluate)(o,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal(e,n){t(e,n,o)}}})}catch(e){console.error("Parse storyboard expression failed:",e)}else null==s||s(o);else null==i||i(o);else if((0,c.isObject)(o)){if(n.has(o))return;n.add(o),null==u||u(o);for(const t of Array.isArray(o)?o:Object.values(o))e(t)}}(e)}function l(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{hasNonStaticUsage:n,nonStaticUsage:r,usedProperties:s}=p(e,t,o);if(n)throw new Error(`Non-static usage of ${t} is prohibited, check your expression: "${r}"`);return s}function p(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r={usedProperties:new Set,hasNonStaticUsage:!1},s=n(r,t,o);return u(e,((e,t,o)=>{s(e,t),r.hasNonStaticUsage&&(r.nonStaticUsage=o)}),t),r}const d=["CTX","STATE","FORM_STATE"];function f(e,t,o){if(e.includes(t)){const r={usedProperties:new Set,hasNonStaticUsage:!1},{expression:s}=(0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(r,o)}});let i;if("SequenceExpression"===s.type&&(i=s.expressions[0])&&"Literal"===i.type&&i.value===t){if(r.usedProperties.size>0)return r.usedProperties;console.warn(`You are using "${t}" but no \`${o}\` usage found in your expression: ${JSON.stringify(e)}`)}}return!1}function y(e){if(d.some((t=>e.includes(t)))){const t={usedProperties:new Set,hasNonStaticUsage:!1};if((0,a.preevaluate)(e,{cache:!0,withParent:!0,hooks:{beforeVisitGlobal:n(t,d,1,!0)}}),t.usedProperties.size>0){const e=[...t.usedProperties],o={context:!1,state:!1,formState:!1},n={CTX:"context",STATE:"state",FORM_STATE:"formState"};return e.forEach((e=>{const[t,r]=e.split(".");o[n[t]]||(o[n[t]]=[]),o[n[t]].push(r)})),o}console.warn(`You are using track all but no "CTX" or "STATE" or "FORM_STATE" usage found in your expression: ${JSON.stringify(e)}`)}return!1}function h(e,t,o){if(Array.isArray(e))for(const n of e)null!=o&&o.matchSource&&!o.matchSource(n.source)||g(n,t)}function g(e,t,o){try{(0,a.precookFunction)(e.source,{typescript:e.typescript,withParent:!0,hooks:{beforeVisitGlobal:t},cacheKey:e})}catch(t){o||console.error(`Parse storyboard function "${e.name}" failed:`,t)}}function S(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s={usedProperties:new Set,hasNonStaticUsage:!1};if(e.source.includes(t)&&g(e,n(s,t,r),o),s.hasNonStaticUsage&&!o)throw new Error(`Non-static usage of ${t} is prohibited, check your function: "${e.name}"`);return s.usedProperties.delete(e.name),s.usedProperties}const m="PERMISSIONS",b="check";function v(e){const t=new Set,o=k(t),{customTemplates:n,functions:r}=e.meta??{};return u([e.routes,n],o,m),h(r,o,{matchSource:e=>e.includes(m)}),Array.from(t)}function P(e){const t=new Set;return u(e,k(t),m),Array.from(t)}function k(e){return function(t,o){if(t.name===m){const t=o[o.length-1],n=o[o.length-2];if("CallExpression"===(null==n?void 0:n.node.type)&&"callee"===(null==n?void 0:n.key)&&"MemberExpression"===(null==t?void 0:t.node.type)&&"object"===t.key&&(t.node.computed?"Literal"===t.node.property.type&&t.node.property.value===b:"Identifier"===t.node.property.type&&t.node.property.name===b))for(const t of n.node.arguments)"Literal"===t.type&&"string"==typeof t.value&&e.add(t.value)}}}}}]);
|
|
2
|
+
//# sourceMappingURL=3933.f299055e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/6314.cd073def.js","mappings":"uIAAO,SAASA,EAAwBC,EAAOC,GAC7C,IAAIC,EAAQC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,GAAK,EAC5EG,EAAqBH,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,IAAmBA,UAAU,GACxF,OAAO,SAA2BI,EAAMC,GACtC,GAA0B,iBAAfP,EAA0BM,EAAKE,OAASR,EAAaA,EAAWS,SAASH,EAAKE,MAAO,CAC9F,MAAME,EAAW,GACjB,IAAK,IAAIC,EAAI,EAAGA,GAAKV,EAAOU,IAAK,CAC/B,MAAMC,EAAeL,EAAOA,EAAOJ,OAASQ,GAC5C,GAA6F,sBAAxFC,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,IAAkB,CAChJ,MAAMC,EAAaH,EAAaN,KAC3BS,EAAWC,UAAyC,eAA7BD,EAAWE,SAASJ,KAErCE,EAAWC,UAAyC,YAA7BD,EAAWE,SAASJ,MAA2D,iBAA9BE,EAAWE,SAASC,MACrGR,EAASS,KAAKd,EAAqB,GAAGC,EAAKE,QAAQO,EAAWE,SAASC,QAAUH,EAAWE,SAASC,OAErGnB,EAAMqB,mBAAoB,EAJ1BV,EAASS,KAAKd,EAAqB,GAAGC,EAAKE,QAAQO,EAAWE,SAAST,OAASO,EAAWE,SAAST,KAMxG,MACET,EAAMqB,mBAAoB,CAE9B,CACIV,EAASP,SAAWF,GACtBF,EAAMsB,eAAeC,IAAIZ,EAASa,KAAK,KAE3C,CACF,CACF,CC1BA,SAASC,EAA8BC,EAAQR,GAC7C,OAAO,SAAgClB,EAAOO,EAAMC,GAClD,GAAID,EAAKE,OAASiB,EAAQ,CACxB,MAAMb,EAAeL,EAAOA,EAAO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ASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,MAAqBF,EAAaN,KAAKU,SAA+C,YAApCJ,EAAaN,KAAKW,SAASJ,MAAsBD,EAAaN,KAAKW,SAASC,QAAUmF,EAA4C,eAApCzF,EAAaN,KAAKW,SAASJ,MAAyBD,EAAaN,KAAKW,SAAST,OAAS6F,GACtiB,IAAK,MAAMW,KAAOtF,EAAWpB,KAAKJ,UACf,YAAb8G,EAAInG,MAA2C,iBAAdmG,EAAI9F,OACvCsF,EAAWlF,IAAI0F,EAAI9F,MAI3B,CACF,CACF,C","sources":["webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/beforeVisitGlobalMember.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberCallUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/track.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/collectMemberUsageInFunction.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/permissions.js"],"sourcesContent":["export function beforeVisitGlobalMember(usage, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n let rememberObjectName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return function beforeVisitGlobal(node, parent) {\n if (typeof objectName === \"string\" ? node.name === objectName : objectName.includes(node.name)) {\n const segments = [];\n for (let i = 1; i <= level; i++) {\n const memberParent = parent[parent.length - i];\n if ((memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\") {\n const memberNode = memberParent.node;\n if (!memberNode.computed && memberNode.property.type === \"Identifier\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.name}` : memberNode.property.name);\n } else if (memberNode.computed && memberNode.property.type === \"Literal\" && typeof memberNode.property.value === \"string\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.value}` : memberNode.property.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n if (segments.length === level) {\n usage.usedProperties.add(segments.join(\".\"));\n }\n }\n };\n}\n//# sourceMappingURL=beforeVisitGlobalMember.js.map","function collectMemberCallUsageFactory(object, property) {\n return function collectMemberCallUsage(usage, node, parent) {\n if (node.name === object) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === property : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === property)) {\n const args = callParent.node.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n if (firstArg.type === \"Literal\" && typeof firstArg.value === \"string\") {\n usage.usedArgs.add(firstArg.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n }\n }\n };\n}\nexport const collectAppGetMenuUsage = collectMemberCallUsageFactory(\"APP\", \"getMenu\");\nexport const collectInstalledAppsHasUsage = collectMemberCallUsageFactory(\"INSTALLED_APPS\", \"has\");\n//# sourceMappingURL=collectMemberCallUsage.js.map","import { isEvaluable, preevaluate } from \"@next-core/cook\";\nimport { isObject } from \"@next-core/utils/general\";\nexport function traverseStoryboardExpressions(data, beforeVisitGlobal,\n// If `options` is a string, it means the *keyword*.\noptions) {\n const memo = new WeakSet();\n const {\n matchExpressionString,\n visitNotMatchedExpressionString,\n visitNonExpressionString,\n visitObject\n } = typeof options === \"string\" ? {\n matchExpressionString: v => v.includes(options)\n } : options;\n function traverse(value) {\n if (typeof value === \"string\") {\n if (isEvaluable(value)) {\n if (matchExpressionString(value)) {\n try {\n preevaluate(value, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal(node, parent) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n beforeVisitGlobal(node, parent, value);\n }\n }\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Parse storyboard expression failed:\", error);\n }\n } else {\n visitNotMatchedExpressionString === null || visitNotMatchedExpressionString === void 0 || visitNotMatchedExpressionString(value);\n }\n } else {\n visitNonExpressionString === null || visitNonExpressionString === void 0 || visitNonExpressionString(value);\n }\n } else if (isObject(value)) {\n // Avoid call stack overflow.\n if (memo.has(value)) {\n return;\n }\n memo.add(value);\n visitObject === null || visitObject === void 0 || visitObject(value);\n for (const item of Array.isArray(value) ? value : Object.values(value)) {\n traverse(item);\n }\n }\n }\n traverse(data);\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nimport { traverseStoryboardExpressions } from \"./traverse.js\";\nexport function strictCollectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const {\n hasNonStaticUsage,\n nonStaticUsage,\n usedProperties\n } = collectMemberUsage(data, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your expression: \"${nonStaticUsage}\"`);\n }\n return usedProperties;\n}\nexport function collectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const beforeVisitGlobal = beforeVisitGlobalMember(usage, objectName, level);\n traverseStoryboardExpressions(data, (node, parent, expr) => {\n beforeVisitGlobal(node, parent);\n if (usage.hasNonStaticUsage) {\n usage.nonStaticUsage = expr;\n }\n }, objectName);\n return usage;\n}\n//# sourceMappingURL=collectMemberUsage.js.map","import { preevaluate } from \"@next-core/cook\";\nimport { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nconst TRACK_NAMES = [\"CTX\", \"STATE\", \"FORM_STATE\"];\nexport function track(raw, trackText, variableName) {\n if (raw.includes(trackText)) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const {\n expression\n } = preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, variableName)\n }\n });\n let trackCtxExp;\n if (expression.type === \"SequenceExpression\" && (trackCtxExp = expression.expressions[0]) && trackCtxExp.type === \"Literal\" && trackCtxExp.value === trackText) {\n if (usage.usedProperties.size > 0) {\n return usage.usedProperties;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using \"${trackText}\" but no \\`${variableName}\\` usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n }\n return false;\n}\nexport function trackAll(raw) {\n // Do not pre-evaluate a string if it doesn't include track names.\n if (TRACK_NAMES.some(name => raw.includes(name))) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, TRACK_NAMES, 1, true)\n }\n });\n if (usage.usedProperties.size > 0) {\n const usedProperties = [...usage.usedProperties];\n const result = {\n context: false,\n state: false,\n formState: false\n };\n const keyMap = {\n CTX: \"context\",\n STATE: \"state\",\n FORM_STATE: \"formState\"\n };\n usedProperties.forEach(item => {\n const [key, name] = item.split(\".\");\n if (!result[keyMap[key]]) {\n result[keyMap[key]] = [];\n }\n result[keyMap[key]].push(name);\n });\n return result;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using track all but no \"CTX\" or \"STATE\" or \"FORM_STATE\" usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n return false;\n}\n//# sourceMappingURL=track.js.map","import { precookFunction } from \"@next-core/cook\";\nexport function traverseStoryboardFunctions(functions, beforeVisitGlobal, options) {\n if (Array.isArray(functions)) {\n for (const fn of functions) {\n if (!(options !== null && options !== void 0 && options.matchSource) || options.matchSource(fn.source)) {\n traverseStoryboardFunction(fn, beforeVisitGlobal);\n }\n }\n }\n}\nexport function traverseStoryboardFunction(fn, beforeVisitGlobal, silentErrors) {\n try {\n precookFunction(fn.source, {\n typescript: fn.typescript,\n withParent: true,\n hooks: {\n beforeVisitGlobal\n },\n cacheKey: fn\n });\n } catch (error) {\n if (!silentErrors) {\n // eslint-disable-next-line no-console\n console.error(`Parse storyboard function \"${fn.name}\" failed:`, error);\n }\n }\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"../expressions/beforeVisitGlobalMember.js\";\nimport { traverseStoryboardFunction } from \"./traverse.js\";\nexport function collectMemberUsageInFunction(fn, objectName, silentErrors) {\n let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n if (fn.source.includes(objectName)) {\n traverseStoryboardFunction(fn, beforeVisitGlobalMember(usage, objectName, level), silentErrors);\n }\n if (usage.hasNonStaticUsage && !silentErrors) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your function: \"${fn.name}\"`);\n }\n usage.usedProperties.delete(fn.name);\n return usage.usedProperties;\n}\n//# sourceMappingURL=collectMemberUsageInFunction.js.map","import { traverseStoryboardExpressions } from \"./expressions/index.js\";\nimport { traverseStoryboardFunctions } from \"./functions/index.js\";\nconst PERMISSIONS = \"PERMISSIONS\";\nconst check = \"check\";\nexport function scanPermissionActionsInStoryboard(storyboard) {\n const collection = new Set();\n const beforeVisitPermissions = beforeVisitPermissionsFactory(collection);\n const {\n customTemplates,\n functions\n } = storyboard.meta ?? {};\n traverseStoryboardExpressions([storyboard.routes, customTemplates], beforeVisitPermissions, PERMISSIONS);\n traverseStoryboardFunctions(functions, beforeVisitPermissions, {\n matchSource(source) {\n return source.includes(PERMISSIONS);\n }\n });\n return Array.from(collection);\n}\nexport function scanPermissionActionsInAny(data) {\n const collection = new Set();\n traverseStoryboardExpressions(data, beforeVisitPermissionsFactory(collection), PERMISSIONS);\n return Array.from(collection);\n}\nfunction beforeVisitPermissionsFactory(collection) {\n return function beforeVisitPermissions(node, parent) {\n if (node.name === PERMISSIONS) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === check : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === check)) {\n for (const arg of callParent.node.arguments) {\n if (arg.type === \"Literal\" && typeof arg.value === \"string\") {\n collection.add(arg.value);\n }\n }\n }\n }\n };\n}\n//# sourceMappingURL=permissions.js.map"],"names":["beforeVisitGlobalMember","usage","objectName","level","arguments","length","undefined","rememberObjectName","node","parent","name","includes","segments","i","memberParent","type","key","memberNode","computed","property","value","push","hasNonStaticUsage","usedProperties","add","join","collectMemberCallUsageFactory","object","callParent","args","firstArg","usedArgs","collectAppGetMenuUsage","collectInstalledAppsHasUsage","traverseStoryboardExpressions","data","beforeVisitGlobal","options","memo","WeakSet","matchExpressionString","visitNotMatchedExpressionString","visitNonExpressionString","visitObject","v","traverse","isEvaluable","preevaluate","cache","withParent","hooks","error","console","isObject","has","item","Array","isArray","Object","values","strictCollectMemberUsage","nonStaticUsage","collectMemberUsage","Error","Set","expr","TRACK_NAMES","track","raw","trackText","variableName","expression","trackCtxExp","expressions","size","warn","JSON","stringify","trackAll","some","result","context","state","formState","keyMap","CTX","STATE","FORM_STATE","forEach","split","traverseStoryboardFunctions","functions","fn","matchSource","source","traverseStoryboardFunction","silentErrors","precookFunction","typescript","cacheKey","collectMemberUsageInFunction","delete","PERMISSIONS","check","scanPermissionActionsInStoryboard","storyboard","collection","beforeVisitPermissions","beforeVisitPermissionsFactory","customTemplates","meta","routes","from","scanPermissionActionsInAny","arg"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"chunks/3933.f299055e.js","mappings":"uIAAO,SAASA,EAAwBC,EAAOC,GAC7C,IAAIC,EAAQC,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,GAAmBA,UAAU,GAAK,EAC5EG,EAAqBH,UAAUC,OAAS,QAAsBC,IAAjBF,UAAU,IAAmBA,UAAU,GACxF,OAAO,SAA2BI,EAAMC,GACtC,GAA0B,iBAAfP,EAA0BM,EAAKE,OAASR,EAAaA,EAAWS,SAASH,EAAKE,MAAO,CAC9F,MAAME,EAAW,GACjB,IAAK,IAAIC,EAAI,EAAGA,GAAKV,EAAOU,IAAK,CAC/B,MAAMC,EAAeL,EAAOA,EAAOJ,OAASQ,GAC5C,GAA6F,sBAAxFC,aAAmD,EAASA,EAAaN,KAAKO,OAAqD,WAArBD,EAAaE,IAAkB,CAChJ,MAAMC,EAAaH,EAAaN,KAC3BS,EAAWC,UAAyC,eAA7BD,EAAWE,SAASJ,KAErCE,EAAWC,UAAyC,YAA7BD,EAAWE,SAASJ,MAA2D,iBAA9BE,EAAWE,SAASC,MACrGR,EAASS,KAAKd,EAAqB,GAAGC,EAAKE,QAAQO,EAAWE,SAASC,QAAUH,EAAWE,SAASC,OAErGnB,EAAMqB,mBAAoB,EAJ1BV,EAASS,KAAKd,EAAqB,GAAGC,EAAKE,QAAQO,EAAWE,SAAST,OAASO,EAAWE,SAAST,KAMxG,MACET,EAAMqB,mBAAoB,CAE9B,CACIV,EAASP,SAAWF,GACtBF,EAAMsB,eAAeC,IAAIZ,EAASa,KAAK,KAE3C,CACF,CACF,CC1BA,SAASC,EAA8BC,EAAQR,GAC7C,OAAO,SAAgClB,EAAOO,EAAMC,GAClD,GAAID,EAAKE,OAASiB,EAAQ,CACxB,MAAMb,EAAeL,EAAOA,EAAOJ,OAAS,GACtCuB,EAAanB,EAAOA,EAAOJ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MAAqBF,EAAaN,KAAKU,SAA+C,YAApCJ,EAAaN,KAAKW,SAASJ,MAAsBD,EAAaN,KAAKW,SAASC,QAAUmF,EAA4C,eAApCzF,EAAaN,KAAKW,SAASJ,MAAyBD,EAAaN,KAAKW,SAAST,OAAS6F,GACtiB,IAAK,MAAMW,KAAOtF,EAAWpB,KAAKJ,UACf,YAAb8G,EAAInG,MAA2C,iBAAdmG,EAAI9F,OACvCsF,EAAWlF,IAAI0F,EAAI9F,MAI3B,CACF,CACF,C","sources":["webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/beforeVisitGlobalMember.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberCallUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/collectMemberUsage.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/expressions/track.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/traverse.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/functions/collectMemberUsageInFunction.js","webpack:///../../node_modules/@next-core/utils/dist/esm/storyboard/permissions.js"],"sourcesContent":["export function beforeVisitGlobalMember(usage, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n let rememberObjectName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n return function beforeVisitGlobal(node, parent) {\n if (typeof objectName === \"string\" ? node.name === objectName : objectName.includes(node.name)) {\n const segments = [];\n for (let i = 1; i <= level; i++) {\n const memberParent = parent[parent.length - i];\n if ((memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\") {\n const memberNode = memberParent.node;\n if (!memberNode.computed && memberNode.property.type === \"Identifier\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.name}` : memberNode.property.name);\n } else if (memberNode.computed && memberNode.property.type === \"Literal\" && typeof memberNode.property.value === \"string\") {\n segments.push(rememberObjectName ? `${node.name}.${memberNode.property.value}` : memberNode.property.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n if (segments.length === level) {\n usage.usedProperties.add(segments.join(\".\"));\n }\n }\n };\n}\n//# sourceMappingURL=beforeVisitGlobalMember.js.map","function collectMemberCallUsageFactory(object, property) {\n return function collectMemberCallUsage(usage, node, parent) {\n if (node.name === object) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === property : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === property)) {\n const args = callParent.node.arguments;\n if (args.length > 0) {\n const firstArg = args[0];\n if (firstArg.type === \"Literal\" && typeof firstArg.value === \"string\") {\n usage.usedArgs.add(firstArg.value);\n } else {\n usage.hasNonStaticUsage = true;\n }\n }\n }\n }\n };\n}\nexport const collectAppGetMenuUsage = collectMemberCallUsageFactory(\"APP\", \"getMenu\");\nexport const collectInstalledAppsHasUsage = collectMemberCallUsageFactory(\"INSTALLED_APPS\", \"has\");\n//# sourceMappingURL=collectMemberCallUsage.js.map","import { isEvaluable, preevaluate } from \"@next-core/cook\";\nimport { isObject } from \"@next-core/utils/general\";\nexport function traverseStoryboardExpressions(data, beforeVisitGlobal,\n// If `options` is a string, it means the *keyword*.\noptions) {\n const memo = new WeakSet();\n const {\n matchExpressionString,\n visitNotMatchedExpressionString,\n visitNonExpressionString,\n visitObject\n } = typeof options === \"string\" ? {\n matchExpressionString: v => v.includes(options)\n } : options;\n function traverse(value) {\n if (typeof value === \"string\") {\n if (isEvaluable(value)) {\n if (matchExpressionString(value)) {\n try {\n preevaluate(value, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal(node, parent) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n beforeVisitGlobal(node, parent, value);\n }\n }\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Parse storyboard expression failed:\", error);\n }\n } else {\n visitNotMatchedExpressionString === null || visitNotMatchedExpressionString === void 0 || visitNotMatchedExpressionString(value);\n }\n } else {\n visitNonExpressionString === null || visitNonExpressionString === void 0 || visitNonExpressionString(value);\n }\n } else if (isObject(value)) {\n // Avoid call stack overflow.\n if (memo.has(value)) {\n return;\n }\n memo.add(value);\n visitObject === null || visitObject === void 0 || visitObject(value);\n for (const item of Array.isArray(value) ? value : Object.values(value)) {\n traverse(item);\n }\n }\n }\n traverse(data);\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nimport { traverseStoryboardExpressions } from \"./traverse.js\";\nexport function strictCollectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const {\n hasNonStaticUsage,\n nonStaticUsage,\n usedProperties\n } = collectMemberUsage(data, objectName, level);\n if (hasNonStaticUsage) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your expression: \"${nonStaticUsage}\"`);\n }\n return usedProperties;\n}\nexport function collectMemberUsage(data, objectName) {\n let level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const beforeVisitGlobal = beforeVisitGlobalMember(usage, objectName, level);\n traverseStoryboardExpressions(data, (node, parent, expr) => {\n beforeVisitGlobal(node, parent);\n if (usage.hasNonStaticUsage) {\n usage.nonStaticUsage = expr;\n }\n }, objectName);\n return usage;\n}\n//# sourceMappingURL=collectMemberUsage.js.map","import { preevaluate } from \"@next-core/cook\";\nimport { beforeVisitGlobalMember } from \"./beforeVisitGlobalMember.js\";\nconst TRACK_NAMES = [\"CTX\", \"STATE\", \"FORM_STATE\"];\nexport function track(raw, trackText, variableName) {\n if (raw.includes(trackText)) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n const {\n expression\n } = preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, variableName)\n }\n });\n let trackCtxExp;\n if (expression.type === \"SequenceExpression\" && (trackCtxExp = expression.expressions[0]) && trackCtxExp.type === \"Literal\" && trackCtxExp.value === trackText) {\n if (usage.usedProperties.size > 0) {\n return usage.usedProperties;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using \"${trackText}\" but no \\`${variableName}\\` usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n }\n return false;\n}\nexport function trackAll(raw) {\n // Do not pre-evaluate a string if it doesn't include track names.\n if (TRACK_NAMES.some(name => raw.includes(name))) {\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n preevaluate(raw, {\n cache: true,\n withParent: true,\n hooks: {\n beforeVisitGlobal: beforeVisitGlobalMember(usage, TRACK_NAMES, 1, true)\n }\n });\n if (usage.usedProperties.size > 0) {\n const usedProperties = [...usage.usedProperties];\n const result = {\n context: false,\n state: false,\n formState: false\n };\n const keyMap = {\n CTX: \"context\",\n STATE: \"state\",\n FORM_STATE: \"formState\"\n };\n usedProperties.forEach(item => {\n const [key, name] = item.split(\".\");\n if (!result[keyMap[key]]) {\n result[keyMap[key]] = [];\n }\n result[keyMap[key]].push(name);\n });\n return result;\n } else {\n // eslint-disable-next-line no-console\n console.warn(`You are using track all but no \"CTX\" or \"STATE\" or \"FORM_STATE\" usage found in your expression: ${JSON.stringify(raw)}`);\n }\n }\n return false;\n}\n//# sourceMappingURL=track.js.map","import { precookFunction } from \"@next-core/cook\";\nexport function traverseStoryboardFunctions(functions, beforeVisitGlobal, options) {\n if (Array.isArray(functions)) {\n for (const fn of functions) {\n if (!(options !== null && options !== void 0 && options.matchSource) || options.matchSource(fn.source)) {\n traverseStoryboardFunction(fn, beforeVisitGlobal);\n }\n }\n }\n}\nexport function traverseStoryboardFunction(fn, beforeVisitGlobal, silentErrors) {\n try {\n precookFunction(fn.source, {\n typescript: fn.typescript,\n withParent: true,\n hooks: {\n beforeVisitGlobal\n },\n cacheKey: fn\n });\n } catch (error) {\n if (!silentErrors) {\n // eslint-disable-next-line no-console\n console.error(`Parse storyboard function \"${fn.name}\" failed:`, error);\n }\n }\n}\n//# sourceMappingURL=traverse.js.map","import { beforeVisitGlobalMember } from \"../expressions/beforeVisitGlobalMember.js\";\nimport { traverseStoryboardFunction } from \"./traverse.js\";\nexport function collectMemberUsageInFunction(fn, objectName, silentErrors) {\n let level = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;\n const usage = {\n usedProperties: new Set(),\n hasNonStaticUsage: false\n };\n if (fn.source.includes(objectName)) {\n traverseStoryboardFunction(fn, beforeVisitGlobalMember(usage, objectName, level), silentErrors);\n }\n if (usage.hasNonStaticUsage && !silentErrors) {\n throw new Error(`Non-static usage of ${objectName} is prohibited, check your function: \"${fn.name}\"`);\n }\n usage.usedProperties.delete(fn.name);\n return usage.usedProperties;\n}\n//# sourceMappingURL=collectMemberUsageInFunction.js.map","import { traverseStoryboardExpressions } from \"./expressions/index.js\";\nimport { traverseStoryboardFunctions } from \"./functions/index.js\";\nconst PERMISSIONS = \"PERMISSIONS\";\nconst check = \"check\";\nexport function scanPermissionActionsInStoryboard(storyboard) {\n const collection = new Set();\n const beforeVisitPermissions = beforeVisitPermissionsFactory(collection);\n const {\n customTemplates,\n functions\n } = storyboard.meta ?? {};\n traverseStoryboardExpressions([storyboard.routes, customTemplates], beforeVisitPermissions, PERMISSIONS);\n traverseStoryboardFunctions(functions, beforeVisitPermissions, {\n matchSource(source) {\n return source.includes(PERMISSIONS);\n }\n });\n return Array.from(collection);\n}\nexport function scanPermissionActionsInAny(data) {\n const collection = new Set();\n traverseStoryboardExpressions(data, beforeVisitPermissionsFactory(collection), PERMISSIONS);\n return Array.from(collection);\n}\nfunction beforeVisitPermissionsFactory(collection) {\n return function beforeVisitPermissions(node, parent) {\n if (node.name === PERMISSIONS) {\n const memberParent = parent[parent.length - 1];\n const callParent = parent[parent.length - 2];\n if ((callParent === null || callParent === void 0 ? void 0 : callParent.node.type) === \"CallExpression\" && (callParent === null || callParent === void 0 ? void 0 : callParent.key) === \"callee\" && (memberParent === null || memberParent === void 0 ? void 0 : memberParent.node.type) === \"MemberExpression\" && memberParent.key === \"object\" && (memberParent.node.computed ? memberParent.node.property.type === \"Literal\" && memberParent.node.property.value === check : memberParent.node.property.type === \"Identifier\" && memberParent.node.property.name === check)) {\n for (const arg of callParent.node.arguments) {\n if (arg.type === \"Literal\" && typeof arg.value === \"string\") {\n collection.add(arg.value);\n }\n }\n }\n }\n };\n}\n//# sourceMappingURL=permissions.js.map"],"names":["beforeVisitGlobalMember","usage","objectName","level","arguments","length","undefined","rememberObjectName","node","parent","name","includes","segments","i","memberParent","type","key","memberNode","computed","property","value","push","hasNonStaticUsage","usedProperties","add","join","collectMemberCallUsageFactory","object","callParent","args","firstArg","usedArgs","collectAppGetMenuUsage","collectInstalledAppsHasUsage","traverseStoryboardExpressions","data","beforeVisitGlobal","options","memo","WeakSet","matchExpressionString","visitNotMatchedExpressionString","visitNonExpressionString","visitObject","v","traverse","isEvaluable","preevaluate","cache","withParent","hooks","error","console","isObject","has","item","Array","isArray","Object","values","strictCollectMemberUsage","nonStaticUsage","collectMemberUsage","Error","Set","expr","TRACK_NAMES","track","raw","trackText","variableName","expression","trackCtxExp","expressions","size","warn","JSON","stringify","trackAll","some","result","context","state","formState","keyMap","CTX","STATE","FORM_STATE","forEach","split","traverseStoryboardFunctions","functions","fn","matchSource","source","traverseStoryboardFunction","silentErrors","precookFunction","typescript","cacheKey","collectMemberUsageInFunction","delete","PERMISSIONS","check","scanPermissionActionsInStoryboard","storyboard","collection","beforeVisitPermissions","beforeVisitPermissionsFactory","customTemplates","meta","routes","from","scanPermissionActionsInAny","arg"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";(globalThis.webpackChunk_next_bricks_form=globalThis.webpackChunk_next_bricks_form||[]).push([[4306],{4306:(i,e,n)=>{n.r(e),n.d(e,{pipes:()=>t,utils:()=>r});var r={};n.r(r),n.d(r,{convertUnitValueByPrecision:()=>Gi,formatUnitValue:()=>Li});var t={};function s(i,e){return i+e}function a(i){return"0"!==i&&Boolean(i)}n.r(t),n.d(t,{add:()=>s,atobUnicode:()=>Ii,bool:()=>o,boolean:()=>a,btoaUnicode:()=>Oi,cmdbInstanceShowName:()=>d,countBy:()=>c,datetime:()=>p,deltaTime:()=>v,divide:()=>B,equal:()=>m,find:()=>g,findIndex:()=>h,findLast:()=>M,findLastIndex:()=>w,get:()=>k,graphTree:()=>S,groupBy:()=>P,groupByToIndex:()=>C,includes:()=>A,join:()=>N,json:()=>x,jsonStringify:()=>j,keyBy:()=>I,map:()=>O,mapToArray:()=>R,mergeArrayByKey:()=>D,multiply:()=>_,not:()=>U,nullish:()=>H,number:()=>Y,parseTimeRange:()=>q,randomString:()=>F,reverse:()=>J,round:()=>ji,slice:()=>W,sort:()=>z,split:()=>V,string:()=>Q,substr:()=>X,substring:()=>Z,subtract:()=>$,ternary:()=>ii,uniq:()=>ei,unitFormat:()=>Ci,yaml:()=>Ni,yamlStringify:()=>xi});var o=a;function d(i){if(Array.isArray(i)){var e=i[0]||"-",n=i.slice(1,i.length).join(",");return n?e+"("+n+")":e}return i}var u=n(1030);function c(i,e){return(0,u.countBy)(i,e)}var l=n(8297),y=n.n(l);function p(i,e){return y()(i).format(e)}function f(i){return"object"==typeof i&&null!==i}function b(i,e){return"number"==typeof i?y()(i):y()(i,e)}function v(i,e,n){if(void 0===e&&(e=!0),void 0===n&&(n="YYYY-MM-DD HH:mm:ss"),!i)return"";if(f(i)&&i.startTime&&i.endTime){var r=b(i.startTime,n),t=b(i.endTime,n);return y().duration(t.diff(r)).humanize(e)}var s=b(f(i)?i.startTime||i.endTime:i,n);return y().duration(s.diff(y()())).humanize(e)}function B(i,e){return i/e}function m(i,e){return(0,u.isEqual)(i,e)}function g(i,e,n){return(0,u.find)(i,e,n)}function h(i,e,n){return(0,u.findIndex)(i,e,n)}function M(i,e,n){return(0,u.findLast)(i,e,n)}function w(i,e,n){return(0,u.findLastIndex)(i,e,n)}function k(i,e,n){return(0,u.get)(i,e,n)}function S(i,e){var n,r;if(!i)return[];var t=null==e?void 0:e.sort,s=(0,u.groupBy)(i.edges,"out"),a=function(e){var n=s[e.instanceId];if((0,u.forEach)(n,(function(n){var r=n.out_name,t=(0,u.find)(i.vertices,["instanceId",n.in]);if(t){var s=a(t);e[r]?e[r].push(s):e[r]=[s]}})),t){var r=(0,u.uniq)((0,u.map)(n,"out_name"));(0,u.forEach)(r,(function(i){(0,u.isEmpty)(e[i])||(e[i]=(0,u.orderBy)(e[i],(function(i){var e;return null!==(e=(0,u.get)(i,t.key))&&void 0!==e?e:-1/0}),-1===t.order?"desc":"asc"))}))}return e};return null!==(r=null===(n=i.topic_vertices)||void 0===n?void 0:n.map((function(i){return a(i)})))&&void 0!==r?r:[]}function P(i,e){return(0,u.groupBy)(i,e)}var K,T,G=function(){return G=Object.assign||function(i){for(var e,n=1,r=arguments.length;n<r;n++)for(var t in e=arguments[n])Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i},G.apply(this,arguments)};function L(){for(var i=0,e=0,n=arguments.length;e<n;e++)i+=arguments[e].length;var r=Array(i),t=0;for(e=0;e<n;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,t++)r[t]=s[a];return r}function C(i,e,n){var r=i;if(!(0,u.isNil)(e)&&!(0,u.isNil)(n)){var t=(0,u.groupBy)(i,e),s=(0,u.keys)(t).sort();r=r.map((function(i){var r=G({},i);return(0,u.set)(r,n,(0,u.indexOf)(s,(0,u.get)(i,e))),r}))}return r}function A(i,e){return i.includes(e)}function N(i,e){return void 0===e&&(e=","),Array.isArray(i)?i.join(e):""}function x(i){if((0,u.isNil)(i))return i;try{return JSON.parse(i)}catch(i){return void console.error(i)}}function j(i,e){void 0===e&&(e=2);try{return JSON.stringify(i,null,e)}catch(i){return void console.error(i)}}function I(i,e){return(0,u.keyBy)(i,e)}function O(i,e){return Array.isArray(i)?i.map((function(i){return(0,u.get)(i,e)})):[]}function R(i,e,n){return"object"==typeof i&&i?Object.entries(i).map((function(i){var r,t=i[0],s=i[1];return(r={})[e]=t,r[n]=s,r})):[]}function D(i,e){return i.reduce((function(i,n){return Object.values((0,u.mergeWith)((0,u.keyBy)(i,e),(0,u.keyBy)(n,e),E))}),[])}function E(i,e){if((0,u.isArray)(i))return i.concat(e)}function _(i,e){return i*e}function U(i){return!i}function H(i,e){return null!=i?i:e}function Y(i){return Number(i)}function q(i){if("now/d"===i)return+y()().startOf("day");if("now/y"===i)return+y()().startOf("year");var e=/^now-(\d+)(\w+)/.exec(i);if(null!==e){var n=e[1],r=e[2];return+y()().subtract(n,r)}return i?+i:+y()()}function F(i,e){i=i>0?i:8,e="string"==typeof e?e:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(var n="",r=0;r<i;r++)n+=e.charAt(Math.floor(Math.random()*e.length));return n}function J(i){return Array.isArray(i)?i.slice().reverse():[]}function W(i,e,n){return i.slice(e,n)}function z(i,e){return Array.isArray(i)?(0,u.sortBy)(i,e):[]}function V(i,e){return"string"==typeof i?i.split(e):[]}function Q(i){return null==i?"":String(i)}function X(i,e,n){return"string"==typeof i?i.substr(e,n):""}function Z(i,e,n){return"string"==typeof i?i.substring(e,n):""}function $(i,e){return i-e}function ii(i,e,n){return i?e:n}function ei(i){return(0,u.uniq)(i)}Object.create,Object.create,"function"==typeof SuppressedError&&SuppressedError,function(i){i.Time="time",i.Byte="byte",i.Bibyte="bibyte",i.BitRate="bitRate",i.ByteRate="byteRate"}(K||(K={})),function(i){i.Percent1="percent(1)",i.Percent100="percent(100)"}(T||(T={}));var ni,ri=[T.Percent1,T.Percent100];!function(i){i.Bytes="bytes",i.Kilobytes="kilobytes",i.Megabytes="megabytes",i.Gigabytes="gigabytes",i.Terabytes="terabytes",i.Petabytes="petabytes",i.Bibytes="bibytes",i.Kibibytes="kibibytes",i.Mebibytes="mebibytes",i.Gibibytes="gibibytes",i.Tebibytes="tebibytes",i.Pebibytes="pebibytes",i.b="b",i.B="B",i.KB="KB",i.MB="MB",i.GB="GB"}(ni||(ni={}));var ti,si=[{id:ni.Bytes,alias:["B","bytes(B)"],divisor:1,display:"B"},{id:ni.Kilobytes,alias:["KB","kilobytes(KB)"],divisor:1e3,display:"KB"},{id:ni.Megabytes,alias:["MB","megabytes(MB)"],divisor:Math.pow(1e3,2),display:"MB"},{id:ni.Gigabytes,alias:["GB","gigabytes(GB)"],divisor:Math.pow(1e3,3),display:"GB"},{id:ni.Terabytes,alias:["TB","terabytes(TB)"],divisor:Math.pow(1e3,4),display:"TB"},{id:ni.Petabytes,alias:["PB","petabytes(PB)"],divisor:Math.pow(1e3,5),display:"PB"}],ai=[{id:ni.Bibytes,alias:["B","bibytes(B)"],divisor:1,display:"B"},{id:ni.Kibibytes,alias:["KiB","kibibytes(KiB)"],divisor:1024,display:"KiB"},{id:ni.Mebibytes,alias:["MiB","mebibytes(MiB)"],divisor:Math.pow(1024,2),display:"MiB"},{id:ni.Gibibytes,alias:["GiB","gibibytes(GiB)"],divisor:Math.pow(1024,3),display:"GiB"},{id:ni.Tebibytes,alias:["TiB","tebibytes(TiB)"],divisor:Math.pow(1024,4),display:"TiB"},{id:ni.Pebibytes,alias:["PiB","pebibytes(PiB)"],divisor:Math.pow(1024,5),display:"PiB"}],oi=[{id:ni.b,divisor:1,display:"b"},{id:ni.B,divisor:8,display:"B"},{id:ni.KB,divisor:8192,display:"KB"},{id:ni.MB,divisor:8388608,display:"MB"},{id:ni.GB,divisor:8589934592,display:"GB"}];!function(i){i.BitsPerSecond="bits/sec",i.KilobitsPerSecond="kilobits/sec",i.MegabitsPerSecond="megabits/sec",i.GigabitsPerSecond="gigabits/sec",i.BytesPerSecond="bytes/sec",i.KilobytesPerSecond="kilobytes/sec",i.MegabytesPerSecond="megabytes/sec",i.GigabytesPerSecond="gigabytes/sec",i.bps="bps",i.Bps="Bps",i.KBps="KBps",i.MBps="MBps",i.GBps="GBps"}(ti||(ti={}));var di,ui=[{id:ti.BitsPerSecond,alias:["bps","bits/sec(bps)"],divisor:1,display:"bps"},{id:ti.KilobitsPerSecond,alias:["Kbps","kilobits/sec(Kbps)"],divisor:1024,display:"Kbps"},{id:ti.MegabitsPerSecond,alias:["Mbps","megabits/sec(Mbps)"],divisor:1048576,display:"Mbps"},{id:ti.GigabitsPerSecond,alias:["Gbps","gigabits/sec(Gbps)"],divisor:1073741824,display:"Gbps"}],ci=[{id:ti.BytesPerSecond,alias:["Bps","bytes/sec(Bps)"],divisor:8,display:"Bps"},{id:ti.KilobytesPerSecond,alias:["KBps","kilobytes/sec(KBps)"],divisor:8192,display:"KBps"},{id:ti.MegabytesPerSecond,alias:["MBps","megabytes/sec(MBps)"],divisor:8388608,display:"MBps"},{id:ti.GigabytesPerSecond,alias:["GBps","gigabytes/sec(GBps)"],divisor:8589934592,display:"GBps"}],li=[{id:ti.bps,divisor:1,display:"bps"},{id:ti.Bps,divisor:8,display:"Bps"},{id:ti.KBps,divisor:8192,display:"KBps"},{id:ti.MBps,divisor:8388608,display:"MBps"},{id:ti.GBps,divisor:8589934592,display:"GBps"}];!function(i){i.Nanosecond="nanoseconds",i.Microsecond="microseconds",i.Milliseconds="milliseconds",i.Seconds="seconds",i.Minutes="minutes",i.Hours="hours",i.Days="days",i.Weeks="weeks",i.Months="months",i.Years="years",i.ms="ms",i.s="s",i.min="min",i.hour="hour",i.day="day",i.week="week"}(di||(di={}));var yi,pi,fi=[{id:di.Nanosecond,alias:["ns","nanoseconds(ns)"],divisor:1,display:"ns"},{id:di.Microsecond,alias:["μs","microseconds(μs)"],divisor:1e3,display:"μs"},{id:di.Milliseconds,alias:["ms","milliseconds(ms)"],divisor:1e6,display:"ms"},{id:di.Seconds,alias:["s","seconds(s)"],divisor:1e9,display:"s"},{id:di.Minutes,alias:["min","minutes(min)"],divisor:6e10,display:"min"},{id:di.Hours,alias:["hour","hours(hour)"],divisor:36e11,display:"hour"},{id:di.Days,alias:["day","days(day)"],divisor:864e11,display:"day"},{id:di.Weeks,alias:["week","weeks(week)"],divisor:6048e11,display:"week"},{id:di.Months,alias:["month","months(month)"],divisor:2592e12,display:"month"},{id:di.Years,alias:["year","years(year)"],divisor:31536e12,display:"year"}];di.ms,di.s,di.min,di.hour,di.day,di.week,(yi={})[K.Time]=fi,yi[K.Byte]=si,yi[K.Bibyte]=ai,yi[K.BitRate]=ui,yi[K.ByteRate]=ci,function(i){i.None="none",i.K="K",i.M="M",i.B="B",i.T="T"}(pi||(pi={}));var bi,vi,Bi=[{id:pi.None,divisor:1,display:""},{id:pi.K,divisor:1e3,display:"K"},{id:pi.M,divisor:1e6,display:"M"},{id:pi.B,divisor:1e9,display:"B"},{id:pi.T,divisor:1e12,display:"T"}],mi=function(i,e){return i.id.toLocaleLowerCase()===(null==e?void 0:e.toLocaleLowerCase())||i.alias&&i.alias.map((function(i){return i.toLocaleLowerCase()})).includes(e)},gi=function(i,e){return i.id.toLocaleLowerCase()===(null==e?void 0:e.toLocaleLowerCase())||i.alias&&i.alias.includes(e)},hi=[fi],Mi=[].concat.apply([],hi.map((function(i){return L(i.map((function(i){return i.id})),[].concat.apply([],i.map((function(i){return i.alias?i.alias:[]}))))}))),wi=[si,ai,oi],ki=[].concat.apply([],wi.map((function(i){return L(i.map((function(i){return i.id})),[].concat.apply([],i.map((function(i){return i.alias?i.alias:[]}))))}))),Si=[ui,ci,li],Pi=[].concat.apply([],Si.map((function(i){return L(i.map((function(i){return i.id})),[].concat.apply([],i.map((function(i){return i.alias?i.alias:[]}))))}))),Ki=function(i,e,n){var r=0,t=Math.sign(i),s=Math.abs(i);if(e){var a=Bi.findIndex((function(i){return i.id.toLocaleLowerCase()===e.toLocaleLowerCase()}));-1!==a&&(r=a)}for(var o=Bi[r],d=r+1;d<Bi.length&&s/(Bi[d].divisor/Bi[r].divisor)>=1;++d)o=Bi[d];return o.id===pi.None?(t*s).toFixed(null!=n?n:2):(s/(o.divisor/Bi[r].divisor)*t).toFixed(null!=n?n:2)+o.display};!function(i){i.None="none",i.Short="short",i.Percent="percent",i.Time="time",i.Data="data",i.DataRate="data_rate"}(vi||(vi={}));var Ti=((bi={})[vi.None]=[],bi[vi.Short]=[],bi[vi.Percent]=ri,bi[vi.Time]=Mi,bi[vi.Data]=ki,bi[vi.DataRate]=Pi,bi),Gi=function(i,e){return void 0===e?i.toString():i.toFixed(e)},Li=function(i,e){if(!e)return[Ki(i),null];var n=e.type;n||(e.unit?(n=vi.Short,Object.entries(Ti).map((function(i){var r=i[0];i[1].map((function(i){return i.toLocaleLowerCase()})).includes(e.unit.toLocaleLowerCase())&&(n=r)}))):n=vi.None);var r=void 0===(null==e?void 0:e.precision)?2:e.precision;switch(n){case vi.Percent:var t=function(i,e){return e&&e.toLocaleLowerCase()===T.Percent100.toLocaleLowerCase()?i:100*i}(i,e.unit);return[Gi(t,r)+"%",null];case vi.Time:var s=function(i,e,n){var r=0,t=2,s=-1;if(e)for(var a=function(i){var a=-1,o=-1;if(hi[i].forEach((function(i,r){mi(i,e)&&(a=r),mi(i,n)&&(o=r)})),-1!==a)return r=i,t=a,s=o,"break"},o=0;o<hi.length&&"break"!==a(o);++o);else n&&(s=hi[r].findIndex((function(i){return mi(i,n)})));var d=hi[r],u=d[t],c=u;if(-1===s)for(o=t+1;o<d.length&&i/(d[o].divisor/u.divisor)>=1;++o)c=d[o];else c=d[s];return n&&-1===s&&console.warn('Cannot convert unit "'+(e||u.display)+'" to "'+n+'"'),[i/(c.divisor/u.divisor),c.display]}(i,e.unit,e.targetUnit),a=s[0],o=s[1];return[""+Gi(a,void 0===(null==e?void 0:e.precision)?1:e.precision),o];case vi.Data:var d=function(i,e,n){var r=wi.length-1,t=0,s=-1,a=Math.sign(i),o=Math.abs(i);if(e)for(var d=function(i){var a=-1,o=-1;if(wi[i].forEach((function(i,r){gi(i,e)&&(a=r),gi(i,n)&&(o=r)})),-1!==a)return r=i,t=a,s=o,"break"},u=0;u<wi.length&&"break"!==d(u);++u);else n&&(s=wi[r].findIndex((function(i){return gi(i,n)})));var c=wi[r],l=c[t],y=l;if(-1===s)for(u=t+1;u<c.length&&o/(c[u].divisor/l.divisor)>=1;++u)y=c[u];else y=c[s];return n&&-1===s&&console.warn('Cannot convert unit "'+(e||l.display)+'" to "'+n+'"'),[o/(y.divisor/l.divisor)*a,y.display]}(i,e.unit,e.targetUnit),u=d[0],c=d[1];return[""+Gi(u,r),c];case vi.DataRate:var l=function(i,e,n){var r=Si.length-1,t=0,s=-1,a=Math.sign(i),o=Math.abs(i);if(e)for(var d=function(i){var a=-1,o=-1;if(Si[i].forEach((function(i,r){mi(i,e)&&(a=r),mi(i,n)&&(o=r)})),-1!==a)return r=i,t=a,s=o,"break"},u=0;u<Si.length&&"break"!==d(u);++u);else n&&(s=Si[r].findIndex((function(i){return mi(i,n)})));var c=Si[r],l=c[t],y=l;if(-1===s)for(u=t+1;u<c.length&&o/(c[u].divisor/l.divisor)>=1;++u)y=c[u];else y=c[s];return n&&-1===s&&console.warn('Cannot convert unit "'+(e||l.display)+'" to "'+n+'"'),[o/(y.divisor/l.divisor)*a,y.display]}(i,e.unit,e.targetUnit),y=l[0],p=l[1];return[""+Gi(y,r),p];case vi.None:return[Gi(i,r),""];default:return[Ki(i,e.unit,r),e.unit]}};function Ci(i,e,n,r){return void 0===n&&(n=2),Li(i,{unit:e,precision:n,targetUnit:r})}var Ai=n(1204);function Ni(i){var e;try{e=(0,Ai.safeLoad)(i,{schema:Ai.JSON_SCHEMA,json:!0})}catch(i){console.error(i)}return e}function xi(i,e,n){var r;void 0===e&&(e=2);try{r=(0,Ai.safeDump)(i,{indent:e,schema:Ai.JSON_SCHEMA,skipInvalid:!0,noRefs:!0,noCompatMode:!0,sortKeys:null==n?void 0:n.sortKeys})}catch(i){console.error(i)}return r}function ji(i,e){return(0,u.round)(i,e)}function Ii(i){return decodeURIComponent(atob(i).split("").map((function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)})).join(""))}function Oi(i){return btoa(encodeURIComponent(i).replace(/%([0-9A-F]{2})/g,(function(i,e){return String.fromCharCode(Number("0x"+e))})))}}}]);
|
|
2
|
+
//# sourceMappingURL=4306.009ee1ec.js.map
|