adminizer 4.6.0-build.219 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{add-hHMUzxu4.js → add-BlvzWQKF.js} +1 -1
- package/assets/{add-group-C0Vu2voe.js → add-group-1Uoq9NWe.js} +1 -1
- package/assets/{add-user-BLcJ_RpR.js → add-user-BQCAsaRy.js} +1 -1
- package/assets/{app-layout-CT2IA-Qm.js → app-layout-CAm60qoE.js} +1 -1
- package/assets/{app-sidebar-fwA94nGO.js → app-sidebar-CfaYbnSy.js} +1 -1
- package/assets/app.js +2 -2
- package/assets/{catalog-CESwM1aJ.js → catalog-k5myk7fk.js} +1 -1
- package/assets/{dashboard-Dy2bgnIr.js → dashboard-BkL9ybBw.js} +1 -1
- package/assets/{form--rZJFrGO.js → form-DJapG3qF.js} +1 -1
- package/assets/{history-BIqkGcpy.js → history-CluyR-yJ.js} +1 -1
- package/assets/{home-DATbVs_r.js → home-Dug9zBzM.js} +2 -2
- package/assets/{list-BF_6CeDP.js → list-CuexshNt.js} +1 -1
- package/assets/manifest.json +26 -26
- package/assets/{module-Buk9uR0I.js → module-Cd4Tm6uq.js} +1 -1
- package/assets/{notification-CMGc2DD3.js → notification-D64qvni-.js} +1 -1
- package/assets/{welcome-CY_nFu0c.js → welcome-PDp-gUei.js} +1 -1
- package/helpers/configHelper.d.ts +5 -4
- package/helpers/configHelper.js +34 -40
- package/helpers/fieldsHelper.d.ts +1 -1
- package/helpers/fieldsHelper.js +0 -4
- package/helpers/runtimeMode.d.ts +1 -0
- package/helpers/runtimeMode.js +3 -0
- package/helpers/viteHelper.js +2 -1
- package/interfaces/adminpanelConfig.d.ts +1 -1
- package/lib/Adminizer.js +2 -1
- package/lib/DataAccessor.js +33 -44
- package/lib/requestProcessor.js +1 -2
- package/lib/widgets/widgetHandler.js +2 -2
- package/package.json +7 -7
- package/system/bindInertia.js +2 -1
- package/system/bindNavigation.js +4 -4
- package/system/defaults.js +13 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-De1FvcYu.js","./handsontable-PxYdjN8c.js","./monaco-BhBYtg3d.js","./app-DaOMy1nl.css","./RelationDialogStack-D9UVEF9s.js","./icon-DfDLMG5f.js","./dynamic-controls-k61T9W2P.js","./input-error-DuuqFgZa.js","./RelationDialogStack-DV8OITPR.css","./add-group-form-B01gwDGu.js","./add-user-form-Cgwc9JkI.js","./material-icon-DMT8KdmE.js","./app-shell-QWCtn9ye.js","./app-sidebar-header-BsPFDhZ8.js","./breadcrumbs-CZZirDj8.js","./nav-user-Bn1Lt-BZ.js","./user-info-DtBK5Kh8.js","./user-menu-content-0XYOCMaA.js","./theme-switcher-DfExsHW2.js","./app-sidebar-
|
|
2
|
-
import{_ as t}from"./jsoneditor-De1FvcYu.js";import{u as x,j as o,ah as v,ai as P}from"./app.js";import{r as l}from"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";const L=(i,n,_)=>{const r=i[n];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((p,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+n+(n.split("/").length!==_?". Note that variables only represent file names one level deep.":""))))})};function T(){const i=x(),[n,_]=l.useState(null),[r,p]=l.useState(null),m=i.props.controls,c=async()=>{const{component:s,props:a}=m[0],E=(await L(Object.assign({"../components/VanillaJSONEditor.tsx":()=>t(()=>import("./app.js").then(e=>e.bZ),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./RelationDialogStack-D9UVEF9s.js").then(e=>e.b),__vite__mapDeps([5,0,1,2,3,4,6,7,8,9]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-B01gwDGu.js"),__vite__mapDeps([10,0,1,2,3,4,6]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-Cgwc9JkI.js"),__vite__mapDeps([11,0,1,2,3,4,6,8,12]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-QWCtn9ye.js"),__vite__mapDeps([13,0,1,2,3,4]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-BsPFDhZ8.js").then(e=>e.c),__vite__mapDeps([14,0,1,2,3,4,15,16,17,18,19,6,12]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./app.js","./jsoneditor-De1FvcYu.js","./handsontable-PxYdjN8c.js","./monaco-BhBYtg3d.js","./app-DaOMy1nl.css","./RelationDialogStack-D9UVEF9s.js","./icon-DfDLMG5f.js","./dynamic-controls-k61T9W2P.js","./input-error-DuuqFgZa.js","./RelationDialogStack-DV8OITPR.css","./add-group-form-B01gwDGu.js","./add-user-form-Cgwc9JkI.js","./material-icon-DMT8KdmE.js","./app-shell-QWCtn9ye.js","./app-sidebar-header-BsPFDhZ8.js","./breadcrumbs-CZZirDj8.js","./nav-user-Bn1Lt-BZ.js","./user-info-DtBK5Kh8.js","./user-menu-content-0XYOCMaA.js","./theme-switcher-DfExsHW2.js","./app-sidebar-CfaYbnSy.js","./nav-main-BctqyzeV.js","./date-picker-B5AZ_7Q9.js","./form-1WGY0YgG.js","./geo-json-DsMUHo0l.js","./list-table-BsEWjTKY.js","./del-modal-BoyXZloG.js","./pagination-render-DxD78ahJ.js","./nav-footer-D3olYxtz.js","./toast-editor-ESK5iWPx.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as t}from"./jsoneditor-De1FvcYu.js";import{u as x,j as o,ah as v,ai as P}from"./app.js";import{r as l}from"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";const L=(i,n,_)=>{const r=i[n];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((p,m)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(m.bind(null,new Error("Unknown variable dynamic import: "+n+(n.split("/").length!==_?". Note that variables only represent file names one level deep.":""))))})};function T(){const i=x(),[n,_]=l.useState(null),[r,p]=l.useState(null),m=i.props.controls,c=async()=>{const{component:s,props:a}=m[0],E=(await L(Object.assign({"../components/VanillaJSONEditor.tsx":()=>t(()=>import("./app.js").then(e=>e.bZ),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/add-form.tsx":()=>t(()=>import("./RelationDialogStack-D9UVEF9s.js").then(e=>e.b),__vite__mapDeps([5,0,1,2,3,4,6,7,8,9]),import.meta.url),"../components/add-group-form.tsx":()=>t(()=>import("./add-group-form-B01gwDGu.js"),__vite__mapDeps([10,0,1,2,3,4,6]),import.meta.url),"../components/add-user-form.tsx":()=>t(()=>import("./add-user-form-Cgwc9JkI.js"),__vite__mapDeps([11,0,1,2,3,4,6,8,12]),import.meta.url),"../components/app-shell.tsx":()=>t(()=>import("./app-shell-QWCtn9ye.js"),__vite__mapDeps([13,0,1,2,3,4]),import.meta.url),"../components/app-sidebar-header.tsx":()=>t(()=>import("./app-sidebar-header-BsPFDhZ8.js").then(e=>e.c),__vite__mapDeps([14,0,1,2,3,4,15,16,17,18,19,6,12]),import.meta.url),"../components/app-sidebar.tsx":()=>t(()=>import("./app-sidebar-CfaYbnSy.js"),__vite__mapDeps([20,0,1,2,3,4,21,12]),import.meta.url),"../components/breadcrumbs.tsx":()=>t(()=>import("./breadcrumbs-CZZirDj8.js"),__vite__mapDeps([15,0,1,2,3,4]),import.meta.url),"../components/date-picker.tsx":()=>t(()=>import("./date-picker-B5AZ_7Q9.js"),__vite__mapDeps([22,0,1,2,3,4]),import.meta.url),"../components/dynamic-controls.tsx":()=>t(()=>import("./dynamic-controls-k61T9W2P.js"),__vite__mapDeps([7,0,1,2,3,4]),import.meta.url),"../components/field-renderer.tsx":()=>t(()=>import("./RelationDialogStack-D9UVEF9s.js").then(e=>e.f),__vite__mapDeps([5,0,1,2,3,4,6,7,8,9]),import.meta.url),"../components/form.tsx":()=>t(()=>import("./form-1WGY0YgG.js"),__vite__mapDeps([23,0,1,2,3,4,5,6,7,8,9]),import.meta.url),"../components/geo-json.tsx":()=>t(()=>import("./geo-json-DsMUHo0l.js"),__vite__mapDeps([24,0,1,2,3,4]),import.meta.url),"../components/handsontable.tsx":()=>t(()=>import("./app.js").then(e=>e.b_),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/icon.tsx":()=>t(()=>import("./icon-DfDLMG5f.js"),__vite__mapDeps([6,0,1,2,3,4]),import.meta.url),"../components/input-error.tsx":()=>t(()=>import("./input-error-DuuqFgZa.js"),__vite__mapDeps([8,0,1,2,3,4]),import.meta.url),"../components/list-table.tsx":()=>t(()=>import("./list-table-BsEWjTKY.js"),__vite__mapDeps([25,0,1,2,3,4,6,12,26,27]),import.meta.url),"../components/material-icon.tsx":()=>t(()=>import("./material-icon-DMT8KdmE.js"),__vite__mapDeps([12,0,1,2,3,4]),import.meta.url),"../components/monaco-editor.tsx":()=>t(()=>import("./app.js").then(e=>e.b$),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/multi-select.tsx":()=>t(()=>import("./app.js").then(e=>e.c0),__vite__mapDeps([0,1,2,3,4]),import.meta.url),"../components/nav-footer.tsx":()=>t(()=>import("./nav-footer-D3olYxtz.js"),__vite__mapDeps([28,0,1,2,3,4,6]),import.meta.url),"../components/nav-main.tsx":()=>t(()=>import("./nav-main-BctqyzeV.js"),__vite__mapDeps([21,0,1,2,3,4,12]),import.meta.url),"../components/nav-user.tsx":()=>t(()=>import("./nav-user-Bn1Lt-BZ.js"),__vite__mapDeps([16,0,1,2,3,4,17,18]),import.meta.url),"../components/pagination-render.tsx":()=>t(()=>import("./pagination-render-DxD78ahJ.js"),__vite__mapDeps([27,0,1,2,3,4]),import.meta.url),"../components/theme-switcher.tsx":()=>t(()=>import("./theme-switcher-DfExsHW2.js"),__vite__mapDeps([19,0,1,2,3,4,6]),import.meta.url),"../components/toast-editor.tsx":()=>t(()=>import("./toast-editor-ESK5iWPx.js"),__vite__mapDeps([29,0,1,2,3,4]),import.meta.url),"../components/user-info.tsx":()=>t(()=>import("./user-info-DtBK5Kh8.js"),__vite__mapDeps([17,0,1,2,3,4]),import.meta.url),"../components/user-menu-content.tsx":()=>t(()=>import("./user-menu-content-0XYOCMaA.js"),__vite__mapDeps([18,0,1,2,3,4,17]),import.meta.url)}),`../components/${s}.tsx`,3)).default;_(o.jsx(E,{...a}))},d=async()=>{const{component:s}=m[1],u=(await import(s)).default;p(o.jsx(u,{message:"Hello from Component B"}))};return o.jsxs(o.Fragment,{children:[o.jsx(v,{title:"Home"}),o.jsx("div",{children:o.jsx(P,{href:"/page",children:"Page"})}),o.jsx("div",{children:o.jsx("h1",{children:"Is Home"})}),o.jsxs("div",{children:[o.jsx("button",{onClick:c,children:"Загрузить компонент"}),o.jsx("p",{}),n||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]}),o.jsx("p",{}),o.jsxs("div",{children:[o.jsx("button",{onClick:d,children:"Загрузить компонент"}),o.jsx("p",{}),r||o.jsx("p",{children:"Нажмите кнопку, чтобы загрузить компонент"})]})]})}export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from"./app.js";import{A as r}from"./app-layout-
|
|
1
|
+
import{j as o}from"./app.js";import{A as r}from"./app-layout-CAm60qoE.js";import t from"./list-table-BsEWjTKY.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-QWCtn9ye.js";import"./app-sidebar-CfaYbnSy.js";import"./nav-main-BctqyzeV.js";import"./material-icon-DMT8KdmE.js";import"./app-sidebar-header-BsPFDhZ8.js";import"./breadcrumbs-CZZirDj8.js";import"./nav-user-Bn1Lt-BZ.js";import"./user-info-DtBK5Kh8.js";import"./user-menu-content-0XYOCMaA.js";import"./theme-switcher-DfExsHW2.js";import"./icon-DfDLMG5f.js";import"./RelationDialogStack-D9UVEF9s.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-DuuqFgZa.js";import"./del-modal-BoyXZloG.js";import"./pagination-render-DxD78ahJ.js";const m=[],R=()=>o.jsx(r,{breadcrumbs:m,className:"overflow-auto h-[calc(100svh-16px)]",children:o.jsx(t,{})});export{R as default};
|
package/assets/manifest.json
CHANGED
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"file": "RelationDialogStack-DV8OITPR.css",
|
|
28
28
|
"src": "_RelationDialogStack-DV8OITPR.css"
|
|
29
29
|
},
|
|
30
|
-
"_app-layout-
|
|
31
|
-
"file": "app-layout-
|
|
30
|
+
"_app-layout-CAm60qoE.js": {
|
|
31
|
+
"file": "app-layout-CAm60qoE.js",
|
|
32
32
|
"name": "app-layout",
|
|
33
33
|
"imports": [
|
|
34
34
|
"src/assets/js/app.tsx",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
]
|
|
218
218
|
},
|
|
219
219
|
"src/assets/js/components/app-sidebar.tsx": {
|
|
220
|
-
"file": "app-sidebar-
|
|
220
|
+
"file": "app-sidebar-CfaYbnSy.js",
|
|
221
221
|
"name": "app-sidebar",
|
|
222
222
|
"src": "src/assets/js/components/app-sidebar.tsx",
|
|
223
223
|
"isDynamicEntry": true,
|
|
@@ -468,13 +468,13 @@
|
|
|
468
468
|
]
|
|
469
469
|
},
|
|
470
470
|
"src/assets/js/pages/add-group.tsx": {
|
|
471
|
-
"file": "add-group-
|
|
471
|
+
"file": "add-group-1Uoq9NWe.js",
|
|
472
472
|
"name": "add-group",
|
|
473
473
|
"src": "src/assets/js/pages/add-group.tsx",
|
|
474
474
|
"isDynamicEntry": true,
|
|
475
475
|
"imports": [
|
|
476
476
|
"src/assets/js/app.tsx",
|
|
477
|
-
"_app-layout-
|
|
477
|
+
"_app-layout-CAm60qoE.js",
|
|
478
478
|
"src/assets/js/components/add-group-form.tsx",
|
|
479
479
|
"_jsoneditor-De1FvcYu.js",
|
|
480
480
|
"_handsontable-PxYdjN8c.js",
|
|
@@ -496,13 +496,13 @@
|
|
|
496
496
|
]
|
|
497
497
|
},
|
|
498
498
|
"src/assets/js/pages/add-user.tsx": {
|
|
499
|
-
"file": "add-user-
|
|
499
|
+
"file": "add-user-BQCAsaRy.js",
|
|
500
500
|
"name": "add-user",
|
|
501
501
|
"src": "src/assets/js/pages/add-user.tsx",
|
|
502
502
|
"isDynamicEntry": true,
|
|
503
503
|
"imports": [
|
|
504
504
|
"src/assets/js/app.tsx",
|
|
505
|
-
"_app-layout-
|
|
505
|
+
"_app-layout-CAm60qoE.js",
|
|
506
506
|
"src/assets/js/components/add-user-form.tsx",
|
|
507
507
|
"_jsoneditor-De1FvcYu.js",
|
|
508
508
|
"_handsontable-PxYdjN8c.js",
|
|
@@ -524,13 +524,13 @@
|
|
|
524
524
|
]
|
|
525
525
|
},
|
|
526
526
|
"src/assets/js/pages/add.tsx": {
|
|
527
|
-
"file": "add-
|
|
527
|
+
"file": "add-BlvzWQKF.js",
|
|
528
528
|
"name": "add",
|
|
529
529
|
"src": "src/assets/js/pages/add.tsx",
|
|
530
530
|
"isDynamicEntry": true,
|
|
531
531
|
"imports": [
|
|
532
532
|
"src/assets/js/app.tsx",
|
|
533
|
-
"_app-layout-
|
|
533
|
+
"_app-layout-CAm60qoE.js",
|
|
534
534
|
"_RelationDialogStack-D9UVEF9s.js",
|
|
535
535
|
"_jsoneditor-De1FvcYu.js",
|
|
536
536
|
"_handsontable-PxYdjN8c.js",
|
|
@@ -551,13 +551,13 @@
|
|
|
551
551
|
]
|
|
552
552
|
},
|
|
553
553
|
"src/assets/js/pages/catalog.tsx": {
|
|
554
|
-
"file": "catalog-
|
|
554
|
+
"file": "catalog-k5myk7fk.js",
|
|
555
555
|
"name": "catalog",
|
|
556
556
|
"src": "src/assets/js/pages/catalog.tsx",
|
|
557
557
|
"isDynamicEntry": true,
|
|
558
558
|
"imports": [
|
|
559
559
|
"src/assets/js/app.tsx",
|
|
560
|
-
"_app-layout-
|
|
560
|
+
"_app-layout-CAm60qoE.js",
|
|
561
561
|
"_handsontable-PxYdjN8c.js",
|
|
562
562
|
"_jsoneditor-De1FvcYu.js",
|
|
563
563
|
"src/assets/js/components/material-icon.tsx",
|
|
@@ -582,13 +582,13 @@
|
|
|
582
582
|
]
|
|
583
583
|
},
|
|
584
584
|
"src/assets/js/pages/dashboard.tsx": {
|
|
585
|
-
"file": "dashboard-
|
|
585
|
+
"file": "dashboard-BkL9ybBw.js",
|
|
586
586
|
"name": "dashboard",
|
|
587
587
|
"src": "src/assets/js/pages/dashboard.tsx",
|
|
588
588
|
"isDynamicEntry": true,
|
|
589
589
|
"imports": [
|
|
590
590
|
"src/assets/js/app.tsx",
|
|
591
|
-
"_app-layout-
|
|
591
|
+
"_app-layout-CAm60qoE.js",
|
|
592
592
|
"src/assets/js/components/material-icon.tsx",
|
|
593
593
|
"_handsontable-PxYdjN8c.js",
|
|
594
594
|
"_jsoneditor-De1FvcYu.js",
|
|
@@ -612,13 +612,13 @@
|
|
|
612
612
|
]
|
|
613
613
|
},
|
|
614
614
|
"src/assets/js/pages/form.tsx": {
|
|
615
|
-
"file": "form
|
|
615
|
+
"file": "form-DJapG3qF.js",
|
|
616
616
|
"name": "form",
|
|
617
617
|
"src": "src/assets/js/pages/form.tsx",
|
|
618
618
|
"isDynamicEntry": true,
|
|
619
619
|
"imports": [
|
|
620
620
|
"src/assets/js/app.tsx",
|
|
621
|
-
"_app-layout-
|
|
621
|
+
"_app-layout-CAm60qoE.js",
|
|
622
622
|
"src/assets/js/components/form.tsx",
|
|
623
623
|
"_jsoneditor-De1FvcYu.js",
|
|
624
624
|
"_handsontable-PxYdjN8c.js",
|
|
@@ -640,7 +640,7 @@
|
|
|
640
640
|
]
|
|
641
641
|
},
|
|
642
642
|
"src/assets/js/pages/history.tsx": {
|
|
643
|
-
"file": "history-
|
|
643
|
+
"file": "history-CluyR-yJ.js",
|
|
644
644
|
"name": "history",
|
|
645
645
|
"src": "src/assets/js/pages/history.tsx",
|
|
646
646
|
"isDynamicEntry": true,
|
|
@@ -648,7 +648,7 @@
|
|
|
648
648
|
"src/assets/js/app.tsx",
|
|
649
649
|
"_handsontable-PxYdjN8c.js",
|
|
650
650
|
"_RelationDialogStack-D9UVEF9s.js",
|
|
651
|
-
"_app-layout-
|
|
651
|
+
"_app-layout-CAm60qoE.js",
|
|
652
652
|
"_jsoneditor-De1FvcYu.js",
|
|
653
653
|
"_monaco-BhBYtg3d.js",
|
|
654
654
|
"src/assets/js/components/icon.tsx",
|
|
@@ -667,7 +667,7 @@
|
|
|
667
667
|
]
|
|
668
668
|
},
|
|
669
669
|
"src/assets/js/pages/home.tsx": {
|
|
670
|
-
"file": "home-
|
|
670
|
+
"file": "home-Dug9zBzM.js",
|
|
671
671
|
"name": "home",
|
|
672
672
|
"src": "src/assets/js/pages/home.tsx",
|
|
673
673
|
"isDynamicEntry": true,
|
|
@@ -722,13 +722,13 @@
|
|
|
722
722
|
]
|
|
723
723
|
},
|
|
724
724
|
"src/assets/js/pages/list.tsx": {
|
|
725
|
-
"file": "list-
|
|
725
|
+
"file": "list-CuexshNt.js",
|
|
726
726
|
"name": "list",
|
|
727
727
|
"src": "src/assets/js/pages/list.tsx",
|
|
728
728
|
"isDynamicEntry": true,
|
|
729
729
|
"imports": [
|
|
730
730
|
"src/assets/js/app.tsx",
|
|
731
|
-
"_app-layout-
|
|
731
|
+
"_app-layout-CAm60qoE.js",
|
|
732
732
|
"src/assets/js/components/list-table.tsx",
|
|
733
733
|
"_jsoneditor-De1FvcYu.js",
|
|
734
734
|
"_handsontable-PxYdjN8c.js",
|
|
@@ -766,14 +766,14 @@
|
|
|
766
766
|
]
|
|
767
767
|
},
|
|
768
768
|
"src/assets/js/pages/module.tsx": {
|
|
769
|
-
"file": "module-
|
|
769
|
+
"file": "module-Cd4Tm6uq.js",
|
|
770
770
|
"name": "module",
|
|
771
771
|
"src": "src/assets/js/pages/module.tsx",
|
|
772
772
|
"isDynamicEntry": true,
|
|
773
773
|
"imports": [
|
|
774
774
|
"src/assets/js/app.tsx",
|
|
775
775
|
"_handsontable-PxYdjN8c.js",
|
|
776
|
-
"_app-layout-
|
|
776
|
+
"_app-layout-CAm60qoE.js",
|
|
777
777
|
"_jsoneditor-De1FvcYu.js",
|
|
778
778
|
"_monaco-BhBYtg3d.js",
|
|
779
779
|
"src/assets/js/components/app-shell.tsx",
|
|
@@ -793,13 +793,13 @@
|
|
|
793
793
|
]
|
|
794
794
|
},
|
|
795
795
|
"src/assets/js/pages/notification.tsx": {
|
|
796
|
-
"file": "notification-
|
|
796
|
+
"file": "notification-D64qvni-.js",
|
|
797
797
|
"name": "notification",
|
|
798
798
|
"src": "src/assets/js/pages/notification.tsx",
|
|
799
799
|
"isDynamicEntry": true,
|
|
800
800
|
"imports": [
|
|
801
801
|
"src/assets/js/app.tsx",
|
|
802
|
-
"_app-layout-
|
|
802
|
+
"_app-layout-CAm60qoE.js",
|
|
803
803
|
"_handsontable-PxYdjN8c.js",
|
|
804
804
|
"_jsoneditor-De1FvcYu.js",
|
|
805
805
|
"_app-sidebar-header-BsPFDhZ8.js",
|
|
@@ -833,13 +833,13 @@
|
|
|
833
833
|
]
|
|
834
834
|
},
|
|
835
835
|
"src/assets/js/pages/welcome.tsx": {
|
|
836
|
-
"file": "welcome-
|
|
836
|
+
"file": "welcome-PDp-gUei.js",
|
|
837
837
|
"name": "welcome",
|
|
838
838
|
"src": "src/assets/js/pages/welcome.tsx",
|
|
839
839
|
"isDynamicEntry": true,
|
|
840
840
|
"imports": [
|
|
841
841
|
"src/assets/js/app.tsx",
|
|
842
|
-
"_app-layout-
|
|
842
|
+
"_app-layout-CAm60qoE.js",
|
|
843
843
|
"_jsoneditor-De1FvcYu.js",
|
|
844
844
|
"_handsontable-PxYdjN8c.js",
|
|
845
845
|
"_monaco-BhBYtg3d.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as a,j as e,L as c}from"./app.js";import{r as s}from"./handsontable-PxYdjN8c.js";import{A as d}from"./app-layout-
|
|
1
|
+
import{u as a,j as e,L as c}from"./app.js";import{r as s}from"./handsontable-PxYdjN8c.js";import{A as d}from"./app-layout-CAm60qoE.js";import"./jsoneditor-De1FvcYu.js";import"./monaco-BhBYtg3d.js";import"./app-shell-QWCtn9ye.js";import"./app-sidebar-CfaYbnSy.js";import"./nav-main-BctqyzeV.js";import"./material-icon-DMT8KdmE.js";import"./app-sidebar-header-BsPFDhZ8.js";import"./breadcrumbs-CZZirDj8.js";import"./nav-user-Bn1Lt-BZ.js";import"./user-info-DtBK5Kh8.js";import"./user-menu-content-0XYOCMaA.js";import"./theme-switcher-DfExsHW2.js";import"./icon-DfDLMG5f.js";import"./RelationDialogStack-D9UVEF9s.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-DuuqFgZa.js";const u=[];function z(){const r=a(),[m,p]=s.useState(null);return s.useEffect(()=>{const i=async()=>{const o=(await import(r.props.moduleComponent)).default,{moduleComponent:n,moduleComponentCSS:S,...l}=r.props;p(e.jsx(o,{...l}))};(()=>{const t=r.props.moduleComponentCSS;if(!t||[...document.head.querySelectorAll("link[rel='stylesheet']")].some(n=>n.href.includes(t)))return;const o=document.createElement("link");o.rel="stylesheet",o.href=t,o.type="text/css",o.onload=()=>console.log(`CSS loaded: ${t}`),o.onerror=()=>console.error(`Failed to load CSS: ${t}`),document.head.appendChild(o)})(),i()},[]),e.jsx(d,{breadcrumbs:u,children:e.jsx("div",{className:"m-5",children:m||e.jsx(c,{className:"size-10 animate-spin text-neutral-500 mx-auto mt-[15%]"})})})}export{z as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as S,a5 as c_,a6 as h_,a7 as Hi,a8 as cr,a9 as g_,aa as dt,N as p_,O as __,B as ms,E as d_,Q as v_,u as x_,I as w_,L as ws,an as A_,ao as m_,ap as R_,aq as T_,r as y_}from"./app.js";import{A as S_}from"./app-layout-
|
|
1
|
+
import{j as S,a5 as c_,a6 as h_,a7 as Hi,a8 as cr,a9 as g_,aa as dt,N as p_,O as __,B as ms,E as d_,Q as v_,u as x_,I as w_,L as ws,an as A_,ao as m_,ap as R_,aq as T_,r as y_}from"./app.js";import{A as S_}from"./app-layout-CAm60qoE.js";import{r as Q}from"./handsontable-PxYdjN8c.js";import{c as hr,e as C_}from"./jsoneditor-De1FvcYu.js";import{u as E_}from"./app-sidebar-header-BsPFDhZ8.js";import"./monaco-BhBYtg3d.js";import"./app-shell-QWCtn9ye.js";import"./app-sidebar-CfaYbnSy.js";import"./nav-main-BctqyzeV.js";import"./material-icon-DMT8KdmE.js";import"./RelationDialogStack-D9UVEF9s.js";import"./icon-DfDLMG5f.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-DuuqFgZa.js";import"./breadcrumbs-CZZirDj8.js";import"./nav-user-Bn1Lt-BZ.js";import"./user-info-DtBK5Kh8.js";import"./user-menu-content-0XYOCMaA.js";import"./theme-switcher-DfExsHW2.js";var vt={exports:{}};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Lodash <https://lodash.com/>
|
|
4
4
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o,j as t}from"./app.js";import{A as p}from"./app-layout-
|
|
1
|
+
import{u as o,j as t}from"./app.js";import{A as p}from"./app-layout-CAm60qoE.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-QWCtn9ye.js";import"./app-sidebar-CfaYbnSy.js";import"./nav-main-BctqyzeV.js";import"./material-icon-DMT8KdmE.js";import"./app-sidebar-header-BsPFDhZ8.js";import"./breadcrumbs-CZZirDj8.js";import"./nav-user-Bn1Lt-BZ.js";import"./user-info-DtBK5Kh8.js";import"./user-menu-content-0XYOCMaA.js";import"./theme-switcher-DfExsHW2.js";import"./icon-DfDLMG5f.js";import"./RelationDialogStack-D9UVEF9s.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-DuuqFgZa.js";const i=[];function L(){const r=o();return t.jsx(p,{breadcrumbs:i,children:t.jsxs("div",{className:"flex h-full flex-1 flex-col gap-4 rounded-xl p-4",children:[r.props.title&&t.jsx("div",{className:"text-3xl mb-8",children:r.props.title}),t.jsx("div",{className:"text-3xl mb-8",children:"Adminizer"}),r.props.text&&t.jsx("div",{dangerouslySetInnerHTML:{__html:r.props.text}})]})})}export{L as default};
|
|
@@ -37,15 +37,16 @@ export declare class ConfigHelper {
|
|
|
37
37
|
*/
|
|
38
38
|
isCsrfEnabled(): boolean;
|
|
39
39
|
/**
|
|
40
|
-
* Normalizes field configuration
|
|
40
|
+
* Normalizes field configuration: fills in default title/visibility and
|
|
41
|
+
* resolves identifier/display fields for association types.
|
|
41
42
|
*
|
|
42
43
|
* @param adminizer
|
|
43
|
-
* @param config Field configuration
|
|
44
|
+
* @param config Field configuration object
|
|
44
45
|
* @param key Field key name
|
|
45
46
|
* @param modelField Field model configuration
|
|
46
|
-
* @returns Normalized field configuration
|
|
47
|
+
* @returns Normalized field configuration
|
|
47
48
|
*/
|
|
48
|
-
normalizeFieldConfig(adminizer: Adminizer, config:
|
|
49
|
+
normalizeFieldConfig(adminizer: Adminizer, config: BaseFieldConfig, key: string, modelField: Attribute): BaseFieldConfig | undefined;
|
|
49
50
|
/**
|
|
50
51
|
* Normalizes the entire adminpanel configuration.
|
|
51
52
|
* Merges custom config with default config and handles normalization.
|
package/helpers/configHelper.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Adminizer } from "../lib/Adminizer.js";
|
|
1
2
|
import { getDefaultConfig } from "../system/defaults.js";
|
|
2
3
|
export class ConfigHelper {
|
|
3
4
|
adminizer;
|
|
@@ -64,57 +65,50 @@ export class ConfigHelper {
|
|
|
64
65
|
return (this.adminizer.config.security.csrf !== false);
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
|
-
* Normalizes field configuration
|
|
68
|
+
* Normalizes field configuration: fills in default title/visibility and
|
|
69
|
+
* resolves identifier/display fields for association types.
|
|
68
70
|
*
|
|
69
71
|
* @param adminizer
|
|
70
|
-
* @param config Field configuration
|
|
72
|
+
* @param config Field configuration object
|
|
71
73
|
* @param key Field key name
|
|
72
74
|
* @param modelField Field model configuration
|
|
73
|
-
* @returns Normalized field configuration
|
|
75
|
+
* @returns Normalized field configuration
|
|
74
76
|
*/
|
|
75
77
|
normalizeFieldConfig(adminizer, config, key, modelField) {
|
|
76
|
-
if (typeof config
|
|
77
|
-
|
|
78
|
+
if (typeof config !== "object" || config === null) {
|
|
79
|
+
Adminizer.log.warn(`Field "${key}" config is a primitive (${typeof config}) and will be ignored. ` +
|
|
80
|
+
`Since v5 field configs must be objects (ModelFieldConfig); the boolean/string shorthand has been removed.`);
|
|
81
|
+
return undefined;
|
|
78
82
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
config.visible = config.visible === undefined ? true : Boolean(config.visible);
|
|
91
|
-
// For association types, determine display field by checking model attributes.
|
|
92
|
-
if (["association", "association-many"].includes(config.type)) {
|
|
93
|
-
let associatedModelAttributes = {};
|
|
94
|
-
let displayField;
|
|
95
|
-
try {
|
|
96
|
-
const associatedModelName = config.type === "association"
|
|
97
|
-
? modelField.model.toLowerCase()
|
|
98
|
-
: modelField.collection.toLowerCase();
|
|
99
|
-
const associatedModel = adminizer.modelHandler.model.get(associatedModelName);
|
|
100
|
-
if (!associatedModel) {
|
|
101
|
-
throw new Error(`Can not add relations to unloaded models; Config: ${JSON.stringify(config, null, 2)}`);
|
|
102
|
-
}
|
|
103
|
-
associatedModelAttributes = associatedModel.attributes;
|
|
83
|
+
config.title = config.title || key;
|
|
84
|
+
config.visible = config.visible === undefined ? true : Boolean(config.visible);
|
|
85
|
+
if (["association", "association-many"].includes(config.type)) {
|
|
86
|
+
let associatedModelAttributes = {};
|
|
87
|
+
let displayField;
|
|
88
|
+
try {
|
|
89
|
+
const associatedModelName = config.type === "association"
|
|
90
|
+
? modelField.model?.toLowerCase()
|
|
91
|
+
: modelField.collection?.toLowerCase();
|
|
92
|
+
if (!associatedModelName) {
|
|
93
|
+
throw new Error(`No model/collection defined for association field: ${key}`);
|
|
104
94
|
}
|
|
105
|
-
|
|
106
|
-
|
|
95
|
+
const associatedModel = adminizer.modelHandler.model.get(associatedModelName);
|
|
96
|
+
if (!associatedModel) {
|
|
97
|
+
throw new Error(`Can not add relations to unloaded models; Config: ${JSON.stringify(config, null, 2)}`);
|
|
107
98
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
displayField: displayField,
|
|
113
|
-
};
|
|
99
|
+
associatedModelAttributes = associatedModel.attributes;
|
|
100
|
+
}
|
|
101
|
+
catch (e) {
|
|
102
|
+
console.error(`Error loading model for field ${key}:`, e);
|
|
114
103
|
}
|
|
115
|
-
|
|
104
|
+
displayField = getDisplayField(associatedModelAttributes);
|
|
105
|
+
config = {
|
|
106
|
+
...config,
|
|
107
|
+
identifierField: "id",
|
|
108
|
+
displayField: displayField,
|
|
109
|
+
};
|
|
116
110
|
}
|
|
117
|
-
return
|
|
111
|
+
return config;
|
|
118
112
|
}
|
|
119
113
|
/**
|
|
120
114
|
* Normalizes the entire adminpanel configuration.
|
package/helpers/fieldsHelper.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DataAccessor } from "../lib/DataAccessor.js";
|
|
2
2
|
import { Adminizer } from "../lib/Adminizer.js";
|
|
3
|
-
import { isObject } from "./JsUtils.js";
|
|
4
3
|
export class FieldsHelper {
|
|
5
4
|
/**
|
|
6
5
|
* Load list of records for all associations into `fields`
|
|
@@ -21,9 +20,6 @@ export class FieldsHelper {
|
|
|
21
20
|
*/
|
|
22
21
|
let loadAssoc = async function (key, action) {
|
|
23
22
|
let fieldConfigConfig = fields[key].config;
|
|
24
|
-
if (!isObject(fieldConfigConfig)) {
|
|
25
|
-
throw 'type error: fieldConfigConfig should be normalized';
|
|
26
|
-
}
|
|
27
23
|
if (fieldConfigConfig.type !== 'association' && fieldConfigConfig.type !== 'association-many') {
|
|
28
24
|
return;
|
|
29
25
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isAdminizerViteDevMode(): boolean;
|
package/helpers/viteHelper.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import chalk from "chalk";
|
|
4
|
+
import { isAdminizerViteDevMode } from "./runtimeMode.js";
|
|
4
5
|
export function viteRender(routePrefix, assetName) {
|
|
5
|
-
const isViteDev =
|
|
6
|
+
const isViteDev = isAdminizerViteDevMode();
|
|
6
7
|
if (isViteDev) {
|
|
7
8
|
return `/${assetName}`;
|
|
8
9
|
}
|
|
@@ -355,7 +355,7 @@ export type ModelFieldConfig = (BaseFieldConfig | TuiEditorFieldConfig) & {
|
|
|
355
355
|
groupsAccessRights?: string[];
|
|
356
356
|
};
|
|
357
357
|
export interface FieldsModels {
|
|
358
|
-
[key: string]:
|
|
358
|
+
[key: string]: ModelFieldConfig;
|
|
359
359
|
}
|
|
360
360
|
interface FormFieldConfig extends BaseFieldConfig {
|
|
361
361
|
value?: any;
|
package/lib/Adminizer.js
CHANGED
|
@@ -34,6 +34,7 @@ import { bindAiAssistant } from "../system/bindAiAssistant.js";
|
|
|
34
34
|
import { MediaManagerHandler } from "./media-manager/MediaManagerHandler.js";
|
|
35
35
|
import { bindCors } from "../system/bindCors.js";
|
|
36
36
|
import bindHistory from "../system/bindHistory.js";
|
|
37
|
+
import { isAdminizerViteDevMode } from "../helpers/runtimeMode.js";
|
|
37
38
|
import { FeedbackHandler } from "./feedback/FeedbackHandler.js";
|
|
38
39
|
export class Adminizer {
|
|
39
40
|
// Preconfigures
|
|
@@ -169,7 +170,7 @@ export class Adminizer {
|
|
|
169
170
|
// set cookie parser
|
|
170
171
|
this.app.use(cookieParser());
|
|
171
172
|
// Set vite middleware
|
|
172
|
-
const isViteDev =
|
|
173
|
+
const isViteDev = isAdminizerViteDevMode();
|
|
173
174
|
if (isViteDev)
|
|
174
175
|
await this.viteMiddleware();
|
|
175
176
|
this.emitter.emit('adminizer:init');
|
package/lib/DataAccessor.js
CHANGED
|
@@ -64,21 +64,15 @@ export class DataAccessor {
|
|
|
64
64
|
// Getting base field config
|
|
65
65
|
let fldConfig = { key: key, title: key };
|
|
66
66
|
let associatedModelConfig = undefined;
|
|
67
|
-
// Action-specific config has priority over global;
|
|
68
|
-
const globalFieldConfig =
|
|
67
|
+
// Action-specific config has priority over global; objects are merged
|
|
68
|
+
const globalFieldConfig = fieldsConfig[key];
|
|
69
69
|
const actionFieldConfig = actionConfig.fields?.[key];
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
combinedFieldConfig = actionFieldConfig; // boolean or string — normalizeFieldConfig handles it
|
|
79
|
-
}
|
|
80
|
-
if (combinedFieldConfig !== undefined) {
|
|
81
|
-
const normalizedFieldConfig = this.adminizer.configHelper.normalizeFieldConfig(this.adminizer, combinedFieldConfig, key, modelField);
|
|
70
|
+
if (globalFieldConfig || actionFieldConfig) {
|
|
71
|
+
const rawFieldConfig = { ...globalFieldConfig, ...actionFieldConfig };
|
|
72
|
+
const normalizedFieldConfig = this.adminizer.configHelper.normalizeFieldConfig(this.adminizer, rawFieldConfig, key, modelField);
|
|
73
|
+
if (!normalizedFieldConfig) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
82
76
|
if (!this.checkFieldAccess(key, normalizedFieldConfig)) {
|
|
83
77
|
return;
|
|
84
78
|
}
|
|
@@ -114,7 +108,7 @@ export class DataAccessor {
|
|
|
114
108
|
fldConfig.required = Boolean(fldConfig.required ?? modelField.required);
|
|
115
109
|
// Default type for field. Could be fetched form config file or file model if not defined in config file.
|
|
116
110
|
fldConfig.type = (fldConfig.type || modelField.type).toLowerCase();
|
|
117
|
-
// Normalize final configuration
|
|
111
|
+
// Normalize final configuration (fldConfig is always an object here, normalize never returns undefined)
|
|
118
112
|
fldConfig = this.adminizer.configHelper.normalizeFieldConfig(this.adminizer, fldConfig, key, modelField);
|
|
119
113
|
// Add new field to result set
|
|
120
114
|
result[key] = { config: fldConfig, model: modelField, populated: populatedModelFieldsConfig, modelConfig: associatedModelConfig };
|
|
@@ -138,27 +132,28 @@ export class DataAccessor {
|
|
|
138
132
|
// Get the main fields configuration
|
|
139
133
|
const fieldsConfig = modelConfig.fields || {};
|
|
140
134
|
// Merge action-specific fields configuration if it exists
|
|
135
|
+
const addCfg = typeof modelConfig.add === "object" ? modelConfig.add : undefined;
|
|
136
|
+
const editCfg = typeof modelConfig.edit === "object" ? modelConfig.edit : undefined;
|
|
137
|
+
const listCfg = typeof modelConfig.list === "object" ? modelConfig.list : undefined;
|
|
141
138
|
let actionSpecificConfig = {};
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
throw `Action type error: unknown type [${this.action}]`;
|
|
161
|
-
}
|
|
139
|
+
switch (this.action) {
|
|
140
|
+
case "add":
|
|
141
|
+
actionSpecificConfig = addCfg?.fields || {};
|
|
142
|
+
break;
|
|
143
|
+
case "edit":
|
|
144
|
+
actionSpecificConfig = editCfg?.fields || {};
|
|
145
|
+
break;
|
|
146
|
+
case "list":
|
|
147
|
+
actionSpecificConfig = listCfg?.fields || {};
|
|
148
|
+
break;
|
|
149
|
+
case "view":
|
|
150
|
+
actionSpecificConfig = editCfg?.fields || {};
|
|
151
|
+
break;
|
|
152
|
+
case "remove":
|
|
153
|
+
actionSpecificConfig = {};
|
|
154
|
+
break;
|
|
155
|
+
default:
|
|
156
|
+
throw `Action type error: unknown type [${this.action}]`;
|
|
162
157
|
}
|
|
163
158
|
const mergedFieldsConfig = { ...fieldsConfig, ...actionSpecificConfig };
|
|
164
159
|
// Loop through model attributes and apply access checks
|
|
@@ -169,6 +164,8 @@ export class DataAccessor {
|
|
|
169
164
|
// If fieldConfig exists, normalize it and merge with the basic config
|
|
170
165
|
if (fieldConfig) {
|
|
171
166
|
const normalizedFieldConfig = this.adminizer.configHelper.normalizeFieldConfig(this.adminizer, fieldConfig, key, modelField);
|
|
167
|
+
if (!normalizedFieldConfig)
|
|
168
|
+
return;
|
|
172
169
|
if (!this.checkFieldAccess(key, normalizedFieldConfig))
|
|
173
170
|
return;
|
|
174
171
|
fldConfig = { ...fldConfig, ...normalizedFieldConfig };
|
|
@@ -184,19 +181,12 @@ export class DataAccessor {
|
|
|
184
181
|
return associatedFields;
|
|
185
182
|
}
|
|
186
183
|
checkFieldAccess(key, fieldConfig) {
|
|
187
|
-
// If config is set to false skip this field
|
|
188
|
-
if (fieldConfig === false) {
|
|
189
|
-
return false;
|
|
190
|
-
}
|
|
191
184
|
if (this.entity.model.primaryKey === key) {
|
|
192
185
|
return true;
|
|
193
186
|
}
|
|
194
187
|
if (this.user.isAdministrator) {
|
|
195
188
|
return true;
|
|
196
189
|
}
|
|
197
|
-
if (typeof fieldConfig !== "object") {
|
|
198
|
-
return true;
|
|
199
|
-
}
|
|
200
190
|
const userGroups = this.user.groups?.map((group) => group.name.toLowerCase());
|
|
201
191
|
// Check if `groupsAccessRights` is set in the fieldConfig
|
|
202
192
|
if (fieldConfig.groupsAccessRights) {
|
|
@@ -228,8 +218,7 @@ export class DataAccessor {
|
|
|
228
218
|
continue;
|
|
229
219
|
// Check access to the field
|
|
230
220
|
if (this.checkFieldAccess(fieldKey, fieldConfig.config)) {
|
|
231
|
-
const
|
|
232
|
-
const fieldType = fieldConfigConfig.type;
|
|
221
|
+
const fieldType = fieldConfig.config.type;
|
|
233
222
|
// Handle fields that are not associations
|
|
234
223
|
if (fieldType !== 'association' && fieldType !== 'association-many') {
|
|
235
224
|
filteredRecord[fieldKey] = fieldValue;
|
package/lib/requestProcessor.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { isObject } from "../helpers/JsUtils.js";
|
|
2
1
|
import { Adminizer } from "./Adminizer.js";
|
|
3
2
|
/**
|
|
4
3
|
* Default helper that will contain all methods
|
|
@@ -38,7 +37,7 @@ export class RequestProcessor {
|
|
|
38
37
|
// continue;
|
|
39
38
|
// }
|
|
40
39
|
if (field.model.type === 'number') {
|
|
41
|
-
if (
|
|
40
|
+
if (field.config.type === "boolean" && typeof postParams[key] === "boolean") {
|
|
42
41
|
postParams[key] = postParams[key] ? 1 : 0;
|
|
43
42
|
}
|
|
44
43
|
postParams[key] = parseFloat(postParams[key]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { isAdminizerViteDevMode } from "../../helpers/runtimeMode.js";
|
|
2
2
|
export class WidgetHandler {
|
|
3
3
|
widgets = [];
|
|
4
4
|
adminizer;
|
|
@@ -108,7 +108,7 @@ export class WidgetHandler {
|
|
|
108
108
|
name: i18n.__(widget.name),
|
|
109
109
|
backgroundCSS: widget.backgroundCSS ?? null,
|
|
110
110
|
size: widget.size ?? null,
|
|
111
|
-
scriptUrl:
|
|
111
|
+
scriptUrl: isAdminizerViteDevMode() ? widget.jsPath.dev : widget.jsPath.production,
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
}
|