@galadrim/galadmin 0.1.104 → 0.1.105
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/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +2 -0
- package/package.json +1 -1
- package/src/front/build/asset-manifest.json +3 -3
- package/src/front/build/index.html +1 -1
- package/src/front/build/static/js/{main.9d617e1e.js → main.f51385bc.js} +3 -3
- package/src/front/build/static/js/{main.9d617e1e.js.map → main.f51385bc.js.map} +1 -1
- package/src/front/node_modules/.cache/.eslintcache +1 -1
- package/src/front/node_modules/.cache/babel-loader/4ba8d93cce9b9bb9e9d35a9736243eb2cb5a172a3da4bff460e48c7f540debd8.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/8288deb48ee2df58484462c929eb4deaa63845e8a35aa4eca3a0dd2c6f2d0458.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/8d55c4123c6fbc61b008f1dc00ea80d019aaf6ca9a9b6fb619e85d369d3c6121.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/c8191949ac4753ef845a81483adfe800f67b152467478a020329c4040a546a6e.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/fec388634ceacbc3c5dde362b4f6ce6ec28cbcedd6bd29193ba6526c96c249ab.json +1 -0
- package/src/front/src/components/Input.js +1 -1
- package/src/front/src/components/Sidebar.js +0 -2
- package/src/front/src/pages/CreateRecord.js +11 -6
- package/src/front/src/pages/EditRecord.js +14 -7
- package/src/front/src/pages/Record.js +22 -16
- package/src/types/config.ts +3 -1
- package/src/front/node_modules/.cache/babel-loader/6e656c8e19d5bfc72071f066db9df465077e006a087080d47fa46bef6dee8d24.json +0 -1
- package/src/front/node_modules/.cache/babel-loader/b48e0edb4b5495d1905816dd392c40aa40b08ade628c94e89a3f85775451a26a.json +0 -1
- package/src/front/node_modules/.cache/babel-loader/cb534fd4b7c6f54f5445d2de21a02fabce63cad224ccb08649541c02baf1b6d6.json +0 -1
- /package/src/front/build/static/js/{main.9d617e1e.js.LICENSE.txt → main.f51385bc.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/home/runner/work/galadmin/galadmin/src/front/src/index.js":"1","/home/runner/work/galadmin/galadmin/src/front/src/App.js":"2","/home/runner/work/galadmin/galadmin/src/front/src/components/Sidebar.js":"3","/home/runner/work/galadmin/galadmin/src/front/src/components/RedirectToFirstView.js":"4","/home/runner/work/galadmin/galadmin/src/front/src/pages/CreateRecord.js":"5","/home/runner/work/galadmin/galadmin/src/front/src/pages/EditRecord.js":"6","/home/runner/work/galadmin/galadmin/src/front/src/pages/Records.js":"7","/home/runner/work/galadmin/galadmin/src/front/src/pages/Record.js":"8","/home/runner/work/galadmin/galadmin/src/front/src/pages/Login.js":"9","/home/runner/work/galadmin/galadmin/src/front/src/pages/Iframe.js":"10","/home/runner/work/galadmin/galadmin/src/front/src/pages/CustomView.js":"11","/home/runner/work/galadmin/galadmin/src/front/src/contexts/ConfigContext.js":"12","/home/runner/work/galadmin/galadmin/src/front/src/components/Input.js":"13","/home/runner/work/galadmin/galadmin/src/front/src/components/LabelTooltip.js":"14","/home/runner/work/galadmin/galadmin/src/front/src/components/DownloadButton.js":"15","/home/runner/work/galadmin/galadmin/src/front/src/components/UploadButton.js":"16","/home/runner/work/galadmin/galadmin/src/front/src/components/AddFilterButton.js":"17","/home/runner/work/galadmin/galadmin/src/front/src/components/BulkActionsButton.js":"18","/home/runner/work/galadmin/galadmin/src/front/src/components/ActionsButton.js":"19","/home/runner/work/galadmin/galadmin/src/front/src/components/BackButton.js":"20","/home/runner/work/galadmin/galadmin/src/front/src/components/DownloadTablePanelButton.js":"21","/home/runner/work/galadmin/galadmin/src/front/src/utils/checkRequiredColumns.js":"22","/home/runner/work/galadmin/galadmin/src/front/src/utils/getFormattedValue.js":"23","/home/runner/work/galadmin/galadmin/src/front/src/components/panels/TablePanel.js":"24","/home/runner/work/galadmin/galadmin/src/front/src/components/panels/GalleryPanel.js":"25","/home/runner/work/galadmin/galadmin/src/front/src/components/panels/MapPanel.js":"26","/home/runner/work/galadmin/galadmin/src/front/src/components/panels/ChatPanel.js":"27","/home/runner/work/galadmin/galadmin/src/front/src/components/CustomComponent.js":"28","/home/runner/work/galadmin/galadmin/src/front/src/components/OutsideClickHandler.js":"29","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ColorInput.js":"30","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/RichTextInput.js":"31","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/BetterRichTextInput.js":"32","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/DatetimeInput.js":"33","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/AddressInput.js":"34","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/FileInput.js":"35","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ForeignSelectInput.js":"36","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ForeignDatalistInput.js":"37","/home/runner/work/galadmin/galadmin/src/front/src/utils/evalExpression.js":"38","/home/runner/work/galadmin/galadmin/src/front/src/components/UploadTablePanelButton.js":"39"},{"size":219,"mtime":1709216608550,"results":"40","hashOfConfig":"41"},{"size":2443,"mtime":1709216608550,"results":"42","hashOfConfig":"41"},{"size":5734,"mtime":1709216608550,"results":"43","hashOfConfig":"41"},{"size":524,"mtime":1709216608550,"results":"44","hashOfConfig":"41"},{"size":4371,"mtime":1709216608550,"results":"45","hashOfConfig":"41"},{"size":3733,"mtime":1709216608550,"results":"46","hashOfConfig":"41"},{"size":10604,"mtime":1709216608550,"results":"47","hashOfConfig":"41"},{"size":4715,"mtime":1709216608550,"results":"48","hashOfConfig":"41"},{"size":1135,"mtime":1709216608550,"results":"49","hashOfConfig":"41"},{"size":404,"mtime":1709216608550,"results":"50","hashOfConfig":"41"},{"size":454,"mtime":1709216608550,"results":"51","hashOfConfig":"41"},{"size":1022,"mtime":1709216608550,"results":"52","hashOfConfig":"41"},{"size":5047,"mtime":1709216608550,"results":"53","hashOfConfig":"41"},{"size":522,"mtime":1709216608550,"results":"54","hashOfConfig":"41"},{"size":895,"mtime":1709216608550,"results":"55","hashOfConfig":"41"},{"size":1474,"mtime":1709216608550,"results":"56","hashOfConfig":"41"},{"size":10302,"mtime":1709216608550,"results":"57","hashOfConfig":"41"},{"size":2656,"mtime":1709216608550,"results":"58","hashOfConfig":"41"},{"size":3169,"mtime":1709216608550,"results":"59","hashOfConfig":"41"},{"size":217,"mtime":1709216608550,"results":"60","hashOfConfig":"41"},{"size":1128,"mtime":1709216608550,"results":"61","hashOfConfig":"41"},{"size":778,"mtime":1709216608550,"results":"62","hashOfConfig":"41"},{"size":2698,"mtime":1709216608550,"results":"63","hashOfConfig":"41"},{"size":4606,"mtime":1709216608550,"results":"64","hashOfConfig":"41"},{"size":2656,"mtime":1709216608550,"results":"65","hashOfConfig":"41"},{"size":1192,"mtime":1709216608550,"results":"66","hashOfConfig":"41"},{"size":1736,"mtime":1709216608550,"results":"67","hashOfConfig":"41"},{"size":1662,"mtime":1709216608550,"results":"68","hashOfConfig":"41"},{"size":826,"mtime":1709216608550,"results":"69","hashOfConfig":"41"},{"size":894,"mtime":1709216608550,"results":"70","hashOfConfig":"41"},{"size":2091,"mtime":1709216608550,"results":"71","hashOfConfig":"41"},{"size":1458,"mtime":1709216608550,"results":"72","hashOfConfig":"41"},{"size":886,"mtime":1709216608550,"results":"73","hashOfConfig":"41"},{"size":3092,"mtime":1709216608550,"results":"74","hashOfConfig":"41"},{"size":3297,"mtime":1709216608550,"results":"75","hashOfConfig":"41"},{"size":1461,"mtime":1709216608550,"results":"76","hashOfConfig":"41"},{"size":2088,"mtime":1709216608550,"results":"77","hashOfConfig":"41"},{"size":530,"mtime":1709216608550,"results":"78","hashOfConfig":"41"},{"size":1854,"mtime":1709216608550,"results":"79","hashOfConfig":"41"},{"filePath":"80","messages":"81","suppressedMessages":"82","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"fnapjk",{"filePath":"83","messages":"84","suppressedMessages":"85","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"86","messages":"87","suppressedMessages":"88","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"89","messages":"90","suppressedMessages":"91","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"92","messages":"93","suppressedMessages":"94","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"95","messages":"96","suppressedMessages":"97","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"98","messages":"99","suppressedMessages":"100","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"101","messages":"102","suppressedMessages":"103","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"104","messages":"105","suppressedMessages":"106","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"107","messages":"108","suppressedMessages":"109","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"110","messages":"111","suppressedMessages":"112","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"113","messages":"114","suppressedMessages":"115","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"116","messages":"117","suppressedMessages":"118","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"119","messages":"120","suppressedMessages":"121","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"122","messages":"123","suppressedMessages":"124","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"125","messages":"126","suppressedMessages":"127","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"128","messages":"129","suppressedMessages":"130","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"131","messages":"132","suppressedMessages":"133","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"134","messages":"135","suppressedMessages":"136","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"137","messages":"138","suppressedMessages":"139","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"140","messages":"141","suppressedMessages":"142","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"143","messages":"144","suppressedMessages":"145","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"146","messages":"147","suppressedMessages":"148","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":1,"source":null},{"filePath":"149","messages":"150","suppressedMessages":"151","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"152","messages":"153","suppressedMessages":"154","errorCount":0,"fatalErrorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":1,"source":null},{"filePath":"155","messages":"156","suppressedMessages":"157","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"158","messages":"159","suppressedMessages":"160","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"161","messages":"162","suppressedMessages":"163","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"164","messages":"165","suppressedMessages":"166","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"167","messages":"168","suppressedMessages":"169","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"170","messages":"171","suppressedMessages":"172","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"173","messages":"174","suppressedMessages":"175","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"176","messages":"177","suppressedMessages":"178","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"179","messages":"180","suppressedMessages":"181","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"182","messages":"183","suppressedMessages":"184","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"185","messages":"186","suppressedMessages":"187","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"188","messages":"189","suppressedMessages":"190","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"191","messages":"192","suppressedMessages":"193","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"194","messages":"195","suppressedMessages":"196","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/home/runner/work/galadmin/galadmin/src/front/src/index.js",[],[],"/home/runner/work/galadmin/galadmin/src/front/src/App.js",[],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/Sidebar.js",["197","198","199","200"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/RedirectToFirstView.js",["201"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/CreateRecord.js",["202"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/EditRecord.js",["203"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/Records.js",["204","205","206","207"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/Record.js",["208","209"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/Login.js",["210","211"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/Iframe.js",["212","213"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/CustomView.js",["214"],[],"/home/runner/work/galadmin/galadmin/src/front/src/contexts/ConfigContext.js",["215"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/Input.js",["216"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/LabelTooltip.js",["217"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/DownloadButton.js",["218"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/UploadButton.js",["219"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/AddFilterButton.js",["220","221"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/BulkActionsButton.js",["222"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/ActionsButton.js",["223"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/BackButton.js",["224"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/DownloadTablePanelButton.js",["225"],[],"/home/runner/work/galadmin/galadmin/src/front/src/utils/checkRequiredColumns.js",["226","227"],[],"/home/runner/work/galadmin/galadmin/src/front/src/utils/getFormattedValue.js",["228","229","230","231"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/panels/TablePanel.js",["232","233"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/panels/GalleryPanel.js",["234","235","236","237","238"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/panels/MapPanel.js",["239","240"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/panels/ChatPanel.js",["241","242"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/CustomComponent.js",["243","244"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/OutsideClickHandler.js",["245"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ColorInput.js",["246","247","248"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/RichTextInput.js",["249","250"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/BetterRichTextInput.js",["251"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/DatetimeInput.js",["252","253"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/AddressInput.js",["254","255","256","257"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/FileInput.js",["258"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ForeignSelectInput.js",["259","260","261"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ForeignDatalistInput.js",["262","263","264","265"],[],"/home/runner/work/galadmin/galadmin/src/front/src/utils/evalExpression.js",["266","267"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/UploadTablePanelButton.js",["268"],[],{"ruleId":"269","severity":1,"message":"270","line":18,"column":1,"nodeType":"271","endLine":131,"endColumn":2},{"ruleId":"272","severity":1,"message":"273","line":41,"column":28,"nodeType":"274","endLine":41,"endColumn":66},{"ruleId":"275","severity":1,"message":"276","line":44,"column":70,"nodeType":"277","messageId":"278","endLine":44,"endColumn":72},{"ruleId":"279","severity":1,"message":"280","line":94,"column":80,"nodeType":"281","messageId":"282","endLine":94,"endColumn":82},{"ruleId":"269","severity":1,"message":"270","line":7,"column":1,"nodeType":"271","endLine":24,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":12,"column":1,"nodeType":"271","endLine":104,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":12,"column":1,"nodeType":"271","endLine":97,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":22,"column":1,"nodeType":"271","endLine":228,"endColumn":2},{"ruleId":"283","severity":1,"message":"284","line":51,"column":8,"nodeType":"285","endLine":51,"endColumn":19,"suggestions":"286"},{"ruleId":"283","severity":1,"message":"287","line":62,"column":8,"nodeType":"285","endLine":62,"endColumn":79,"suggestions":"288"},{"ruleId":"279","severity":1,"message":"280","line":189,"column":66,"nodeType":"281","messageId":"282","endLine":189,"endColumn":68},{"ruleId":"269","severity":1,"message":"270","line":18,"column":1,"nodeType":"271","endLine":93,"endColumn":2},{"ruleId":"283","severity":1,"message":"287","line":28,"column":8,"nodeType":"285","endLine":28,"endColumn":29,"suggestions":"289"},{"ruleId":"269","severity":1,"message":"270","line":5,"column":1,"nodeType":"271","endLine":33,"endColumn":2},{"ruleId":"272","severity":1,"message":"273","line":23,"column":21,"nodeType":"274","endLine":23,"endColumn":57},{"ruleId":"269","severity":1,"message":"270","line":9,"column":1,"nodeType":"271","endLine":19,"endColumn":2},{"ruleId":"290","severity":1,"message":"291","line":16,"column":13,"nodeType":"274","endLine":16,"endColumn":36},{"ruleId":"269","severity":1,"message":"270","line":6,"column":1,"nodeType":"271","endLine":15,"endColumn":2},{"ruleId":"292","severity":1,"message":"293","line":11,"column":29,"nodeType":"294","messageId":"282","endLine":11,"endColumn":33},{"ruleId":"269","severity":1,"message":"270","line":10,"column":1,"nodeType":"271","endLine":149,"endColumn":3},{"ruleId":"269","severity":1,"message":"270","line":3,"column":1,"nodeType":"271","endLine":17,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":5,"column":1,"nodeType":"271","endLine":30,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":5,"column":1,"nodeType":"271","endLine":55,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":6,"column":1,"nodeType":"271","endLine":206,"endColumn":2},{"ruleId":"283","severity":1,"message":"295","line":20,"column":8,"nodeType":"285","endLine":20,"endColumn":15,"suggestions":"296"},{"ruleId":"269","severity":1,"message":"270","line":6,"column":1,"nodeType":"271","endLine":68,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":10,"column":1,"nodeType":"271","endLine":85,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":6,"column":1,"nodeType":"271","endLine":12,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":4,"column":1,"nodeType":"271","endLine":28,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":5,"column":1,"nodeType":"271","endLine":22,"endColumn":2},{"ruleId":"279","severity":1,"message":"280","line":9,"column":44,"nodeType":"281","messageId":"282","endLine":9,"endColumn":46},{"ruleId":"269","severity":1,"message":"270","line":6,"column":1,"nodeType":"271","endLine":51,"endColumn":2},{"ruleId":"297","severity":1,"message":"298","line":19,"column":13,"nodeType":"274","messageId":"299","endLine":19,"endColumn":48,"fix":"300"},{"ruleId":"272","severity":1,"message":"273","line":20,"column":17,"nodeType":"274","endLine":20,"endColumn":127},{"ruleId":"279","severity":1,"message":"280","line":46,"column":93,"nodeType":"281","messageId":"282","endLine":46,"endColumn":95},{"ruleId":"269","severity":1,"message":"270","line":10,"column":1,"nodeType":"271","endLine":112,"endColumn":2},{"ruleId":"283","severity":1,"message":"287","line":18,"column":8,"nodeType":"285","endLine":18,"endColumn":16,"suggestions":"301"},{"ruleId":"269","severity":1,"message":"270","line":8,"column":1,"nodeType":"271","endLine":76,"endColumn":2},{"ruleId":"302","severity":1,"message":"303","line":10,"column":11,"nodeType":"304","messageId":"305","endLine":10,"endColumn":18},{"ruleId":"283","severity":1,"message":"287","line":15,"column":8,"nodeType":"285","endLine":15,"endColumn":29,"suggestions":"306"},{"ruleId":"297","severity":1,"message":"298","line":61,"column":29,"nodeType":"274","messageId":"299","endLine":61,"endColumn":89,"fix":"307"},{"ruleId":"272","severity":1,"message":"273","line":62,"column":33,"nodeType":"274","endLine":66,"endColumn":35},{"ruleId":"269","severity":1,"message":"270","line":4,"column":1,"nodeType":"271","endLine":42,"endColumn":2},{"ruleId":"283","severity":1,"message":"308","line":23,"column":8,"nodeType":"285","endLine":23,"endColumn":31,"suggestions":"309"},{"ruleId":"269","severity":1,"message":"270","line":7,"column":1,"nodeType":"271","endLine":62,"endColumn":2},{"ruleId":"283","severity":1,"message":"287","line":14,"column":8,"nodeType":"285","endLine":14,"endColumn":16,"suggestions":"310"},{"ruleId":"311","severity":1,"message":"312","line":17,"column":27,"nodeType":"294","messageId":"313","endLine":17,"endColumn":69},{"ruleId":"314","severity":1,"message":"315","line":20,"column":13,"nodeType":"316","messageId":"317","endLine":20,"endColumn":47},{"ruleId":"283","severity":1,"message":"318","line":19,"column":8,"nodeType":"285","endLine":19,"endColumn":13,"suggestions":"319"},{"ruleId":"269","severity":1,"message":"270","line":3,"column":1,"nodeType":"271","endLine":29,"endColumn":2},{"ruleId":"283","severity":1,"message":"320","line":19,"column":43,"nodeType":"304","endLine":19,"endColumn":50},{"ruleId":"283","severity":1,"message":"321","line":20,"column":8,"nodeType":"285","endLine":20,"endColumn":29,"suggestions":"322"},{"ruleId":"269","severity":1,"message":"270","line":7,"column":1,"nodeType":"271","endLine":58,"endColumn":3},{"ruleId":"283","severity":1,"message":"323","line":51,"column":8,"nodeType":"285","endLine":51,"endColumn":32,"suggestions":"324"},{"ruleId":"269","severity":1,"message":"270","line":7,"column":1,"nodeType":"271","endLine":41,"endColumn":3},{"ruleId":"269","severity":1,"message":"270","line":3,"column":1,"nodeType":"271","endLine":26,"endColumn":2},{"ruleId":"283","severity":1,"message":"325","line":19,"column":8,"nodeType":"285","endLine":19,"endColumn":28,"suggestions":"326"},{"ruleId":"269","severity":1,"message":"270","line":3,"column":1,"nodeType":"271","endLine":67,"endColumn":2},{"ruleId":"283","severity":1,"message":"327","line":45,"column":8,"nodeType":"285","endLine":45,"endColumn":33,"suggestions":"328"},{"ruleId":"283","severity":1,"message":"329","line":54,"column":39,"nodeType":"304","endLine":54,"endColumn":46},{"ruleId":"283","severity":1,"message":"330","line":55,"column":8,"nodeType":"285","endLine":55,"endColumn":33,"suggestions":"331"},{"ruleId":"269","severity":1,"message":"270","line":8,"column":1,"nodeType":"271","endLine":85,"endColumn":2},{"ruleId":"269","severity":1,"message":"270","line":7,"column":1,"nodeType":"271","endLine":46,"endColumn":2},{"ruleId":"283","severity":1,"message":"332","line":23,"column":8,"nodeType":"285","endLine":23,"endColumn":10,"suggestions":"333"},{"ruleId":"279","severity":1,"message":"280","line":32,"column":50,"nodeType":"281","messageId":"282","endLine":32,"endColumn":52},{"ruleId":"269","severity":1,"message":"270","line":7,"column":1,"nodeType":"271","endLine":64,"endColumn":2},{"ruleId":"283","severity":1,"message":"334","line":22,"column":8,"nodeType":"285","endLine":22,"endColumn":15,"suggestions":"335"},{"ruleId":"283","severity":1,"message":"336","line":31,"column":29,"nodeType":"304","endLine":31,"endColumn":36},{"ruleId":"283","severity":1,"message":"337","line":32,"column":8,"nodeType":"285","endLine":32,"endColumn":23,"suggestions":"338"},{"ruleId":"269","severity":1,"message":"270","line":2,"column":1,"nodeType":"271","endLine":14,"endColumn":2},{"ruleId":"292","severity":1,"message":"293","line":8,"column":16,"nodeType":"294","messageId":"282","endLine":8,"endColumn":20},{"ruleId":"269","severity":1,"message":"270","line":4,"column":1,"nodeType":"271","endLine":56,"endColumn":2},"import/no-anonymous-default-export","Assign arrow function to a variable before exporting as module default","ExportDefaultDeclaration","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","array-callback-return","Array.prototype.map() expects a value to be returned at the end of arrow function.","ArrowFunctionExpression","expectedAtEnd","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'currentFilters.length' and 'selectedRecordIds.length'. Either include them or remove the dependency array.","ArrayExpression",["339"],"React Hook useEffect has a missing dependency: 'refreshData'. Either include it or remove the dependency array.",["340"],["341"],"jsx-a11y/iframe-has-title","<iframe> elements must have a unique title property.","no-eval","eval can be harmful.","CallExpression","React Hook useEffect has missing dependencies: 'column?.dataType', 'column.optional', and 'column.options'. Either include them or remove the dependency array.",["342"],"react/jsx-no-target-blank","Using target=\"_blank\" without rel=\"noreferrer\" (which implies rel=\"noopener\") is a security risk in older browsers: see https://mathiasbynens.github.io/rel-noopener/#recommendations","noTargetBlankWithoutNoreferrer",{"range":"343","text":"344"},["345"],"no-unused-vars","'history' is assigned a value but never used.","Identifier","unusedVar",["346"],{"range":"347","text":"344"},"React Hook useEffect has missing dependencies: 'panel.latitudeField', 'panel.longitudeField', 'panel.query', 'panel.zoom', and 'view.primaryId'. Either include them or remove the dependency array. Outer scope values like 'window.google' aren't valid dependencies because mutating them doesn't re-render the component.",["348"],["349"],"no-new-func","The Function constructor is eval.","noFunctionConstructor","no-throw-literal","Expected an error object to be thrown.","ThrowStatement","object","React Hook useEffect has a missing dependency: 'handler'. Either include it or remove the dependency array. If 'handler' changes too often, find the parent component that defines it and wrap that definition in useCallback.",["350"],"The ref value 'colorPicker.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'colorPicker.current' to a variable inside the effect, and use that variable in the cleanup function.","React Hook useEffect has missing dependencies: 'column.name', 'initialData', and 'onChange'. Either include them or remove the dependency array. Mutable values like 'colorPicker.current' aren't valid dependencies because mutating them doesn't re-render the component.",["351"],"React Hook useEffect has missing dependencies: 'column.contentField', 'column.htmlField', 'initialData', and 'onChange'. Either include them or remove the dependency array. Mutable values like 'quillContainer.current' aren't valid dependencies because mutating them doesn't re-render the component.",["352"],"React Hook useEffect has missing dependencies: 'column.name', 'initialData', 'onChange', and 'withTime'. Either include them or remove the dependency array. Mutable values like 'datepicker.current' aren't valid dependencies because mutating them doesn't re-render the component.",["353"],"React Hook useEffect has missing dependencies: 'column' and 'onChange'. Either include them or remove the dependency array. Mutable values like 'googleMapsInput.current' aren't valid dependencies because mutating them doesn't re-render the component.",["354"],"The ref value 'googleMapsInput.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'googleMapsInput.current' to a variable inside the effect, and use that variable in the cleanup function.","React Hook useEffect has an unnecessary dependency: 'googleMapsInput.current'. Either exclude it or remove the dependency array. Mutable values like 'googleMapsInput.current' aren't valid dependencies because mutating them doesn't re-render the component.",["355"],"React Hook useEffect has missing dependencies: 'column.__id__', 'column.name', 'column.optional', 'initialData', 'onChange', and 'viewIndex'. Either include them or remove the dependency array. If 'onChange' changes too often, find the parent component that defines it and wrap that definition in useCallback.",["356"],"React Hook useEffect has missing dependencies: 'column.__id__' and 'viewIndex'. Either include them or remove the dependency array.",["357"],"The ref value 'input.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'input.current' to a variable inside the effect, and use that variable in the cleanup function.","React Hook useEffect has an unnecessary dependency: 'input.current'. Either exclude it or remove the dependency array. Mutable values like 'input.current' aren't valid dependencies because mutating them doesn't re-render the component.",["358"],{"desc":"359","fix":"360"},{"desc":"361","fix":"362"},{"desc":"363","fix":"364"},{"desc":"365","fix":"366"},[1055,1055]," rel=\"noreferrer\"",{"desc":"367","fix":"368"},{"desc":"369","fix":"370"},[2020,2020],{"desc":"371","fix":"372"},{"desc":"367","fix":"373"},{"desc":"374","fix":"375"},{"desc":"376","fix":"377"},{"desc":"378","fix":"379"},{"desc":"380","fix":"381"},{"desc":"382","fix":"383"},{"desc":"384","fix":"385"},{"desc":"386","fix":"387"},{"desc":"388","fix":"389"},{"desc":"384","fix":"390"},"Update the dependencies array to be: [currentFilters.length, selectedRecordIds.length, viewIndex]",{"range":"391","text":"392"},"Update the dependencies array to be: [viewIndex, subviewIndex, page, query, currentFilters, orderBy, isDesc, refreshData]",{"range":"393","text":"394"},"Update the dependencies array to be: [viewIndex, recordId, refreshData]",{"range":"395","text":"396"},"Update the dependencies array to be: [column?.dataType, column.optional, column.options, field]",{"range":"397","text":"398"},"Update the dependencies array to be: [record, refreshData]",{"range":"399","text":"400"},"Update the dependencies array to be: [panel.query, record, refreshData]",{"range":"401","text":"402"},"Update the dependencies array to be: [panel.latitudeField, panel.longitudeField, panel.query, panel.zoom, record, view.primaryId]",{"range":"403","text":"404"},{"range":"405","text":"400"},"Update the dependencies array to be: [handler, ref]",{"range":"406","text":"407"},"Update the dependencies array to be: [column.name, initialData, onChange]",{"range":"408","text":"409"},"Update the dependencies array to be: [column.contentField, column.htmlField, initialData, onChange]",{"range":"410","text":"411"},"Update the dependencies array to be: [column.name, initialData, onChange, withTime]",{"range":"412","text":"413"},"Update the dependencies array to be: [column, onChange]",{"range":"414","text":"415"},"Update the dependencies array to be: []",{"range":"416","text":"417"},"Update the dependencies array to be: [column.__id__, column.name, column.optional, initialData, onChange, viewIndex]",{"range":"418","text":"419"},"Update the dependencies array to be: [column.__id__, query, viewIndex]",{"range":"420","text":"421"},{"range":"422","text":"417"},[1710,1721],"[currentFilters.length, selectedRecordIds.length, viewIndex]",[1950,2021],"[viewIndex, subviewIndex, page, query, currentFilters, orderBy, isDesc, refreshData]",[1071,1092],"[viewIndex, recordId, refreshData]",[835,842],"[column?.dataType, column.optional, column.options, field]",[542,550],"[record, refreshData]",[359,380],"[panel.query, record, refreshData]",[776,799],"[panel.latitudeField, panel.longitudeField, panel.query, panel.zoom, record, view.primaryId]",[363,371],[604,609],"[handler, ref]",[695,716],"[column.name, initialData, onChange]",[1877,1901],"[column.contentField, column.htmlField, initialData, onChange]",[717,737],"[column.name, initialData, onChange, withTime]",[2440,2465],"[column, onChange]",[2826,2851],"[]",[724,726],"[column.__id__, column.name, column.optional, initialData, onChange, viewIndex]",[620,627],"[column.__id__, query, viewIndex]",[972,987]]
|
|
1
|
+
[{"/home/runner/work/galadmin/galadmin/src/front/src/index.js":"1","/home/runner/work/galadmin/galadmin/src/front/src/App.js":"2","/home/runner/work/galadmin/galadmin/src/front/src/components/Sidebar.js":"3","/home/runner/work/galadmin/galadmin/src/front/src/components/RedirectToFirstView.js":"4","/home/runner/work/galadmin/galadmin/src/front/src/pages/CreateRecord.js":"5","/home/runner/work/galadmin/galadmin/src/front/src/pages/EditRecord.js":"6","/home/runner/work/galadmin/galadmin/src/front/src/pages/Records.js":"7","/home/runner/work/galadmin/galadmin/src/front/src/pages/Record.js":"8","/home/runner/work/galadmin/galadmin/src/front/src/pages/Login.js":"9","/home/runner/work/galadmin/galadmin/src/front/src/pages/Iframe.js":"10","/home/runner/work/galadmin/galadmin/src/front/src/pages/CustomView.js":"11","/home/runner/work/galadmin/galadmin/src/front/src/contexts/ConfigContext.js":"12","/home/runner/work/galadmin/galadmin/src/front/src/components/Input.js":"13","/home/runner/work/galadmin/galadmin/src/front/src/components/LabelTooltip.js":"14","/home/runner/work/galadmin/galadmin/src/front/src/components/DownloadButton.js":"15","/home/runner/work/galadmin/galadmin/src/front/src/components/UploadButton.js":"16","/home/runner/work/galadmin/galadmin/src/front/src/components/AddFilterButton.js":"17","/home/runner/work/galadmin/galadmin/src/front/src/components/BulkActionsButton.js":"18","/home/runner/work/galadmin/galadmin/src/front/src/components/ActionsButton.js":"19","/home/runner/work/galadmin/galadmin/src/front/src/components/BackButton.js":"20","/home/runner/work/galadmin/galadmin/src/front/src/components/DownloadTablePanelButton.js":"21","/home/runner/work/galadmin/galadmin/src/front/src/utils/checkRequiredColumns.js":"22","/home/runner/work/galadmin/galadmin/src/front/src/utils/getFormattedValue.js":"23","/home/runner/work/galadmin/galadmin/src/front/src/components/panels/TablePanel.js":"24","/home/runner/work/galadmin/galadmin/src/front/src/components/panels/GalleryPanel.js":"25","/home/runner/work/galadmin/galadmin/src/front/src/components/panels/MapPanel.js":"26","/home/runner/work/galadmin/galadmin/src/front/src/components/panels/ChatPanel.js":"27","/home/runner/work/galadmin/galadmin/src/front/src/components/CustomComponent.js":"28","/home/runner/work/galadmin/galadmin/src/front/src/components/OutsideClickHandler.js":"29","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ColorInput.js":"30","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/RichTextInput.js":"31","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/BetterRichTextInput.js":"32","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/DatetimeInput.js":"33","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/AddressInput.js":"34","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/FileInput.js":"35","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ForeignSelectInput.js":"36","/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ForeignDatalistInput.js":"37","/home/runner/work/galadmin/galadmin/src/front/src/utils/evalExpression.js":"38","/home/runner/work/galadmin/galadmin/src/front/src/components/UploadTablePanelButton.js":"39"},{"size":219,"mtime":1709463659504,"results":"40","hashOfConfig":"41"},{"size":2443,"mtime":1709463659500,"results":"42","hashOfConfig":"41"},{"size":5703,"mtime":1709463659500,"results":"43","hashOfConfig":"41"},{"size":524,"mtime":1709463659500,"results":"44","hashOfConfig":"41"},{"size":4551,"mtime":1709463659504,"results":"45","hashOfConfig":"41"},{"size":4060,"mtime":1709463659504,"results":"46","hashOfConfig":"41"},{"size":10604,"mtime":1709463659504,"results":"47","hashOfConfig":"41"},{"size":5036,"mtime":1709463659504,"results":"48","hashOfConfig":"41"},{"size":1135,"mtime":1709463659504,"results":"49","hashOfConfig":"41"},{"size":404,"mtime":1709463659504,"results":"50","hashOfConfig":"41"},{"size":454,"mtime":1709463659504,"results":"51","hashOfConfig":"41"},{"size":1022,"mtime":1709463659500,"results":"52","hashOfConfig":"41"},{"size":5057,"mtime":1709463659500,"results":"53","hashOfConfig":"41"},{"size":522,"mtime":1709463659500,"results":"54","hashOfConfig":"41"},{"size":895,"mtime":1709463659500,"results":"55","hashOfConfig":"41"},{"size":1474,"mtime":1709463659500,"results":"56","hashOfConfig":"41"},{"size":10302,"mtime":1709463659500,"results":"57","hashOfConfig":"41"},{"size":2656,"mtime":1709463659500,"results":"58","hashOfConfig":"41"},{"size":3169,"mtime":1709463659500,"results":"59","hashOfConfig":"41"},{"size":217,"mtime":1709463659500,"results":"60","hashOfConfig":"41"},{"size":1128,"mtime":1709463659500,"results":"61","hashOfConfig":"41"},{"size":778,"mtime":1709463659504,"results":"62","hashOfConfig":"41"},{"size":2698,"mtime":1709463659504,"results":"63","hashOfConfig":"41"},{"size":4606,"mtime":1709463659500,"results":"64","hashOfConfig":"41"},{"size":2656,"mtime":1709463659500,"results":"65","hashOfConfig":"41"},{"size":1192,"mtime":1709463659500,"results":"66","hashOfConfig":"41"},{"size":1736,"mtime":1709463659500,"results":"67","hashOfConfig":"41"},{"size":1662,"mtime":1709463659500,"results":"68","hashOfConfig":"41"},{"size":826,"mtime":1709463659500,"results":"69","hashOfConfig":"41"},{"size":894,"mtime":1709463659500,"results":"70","hashOfConfig":"41"},{"size":2091,"mtime":1709463659500,"results":"71","hashOfConfig":"41"},{"size":1458,"mtime":1709463659500,"results":"72","hashOfConfig":"41"},{"size":886,"mtime":1709463659500,"results":"73","hashOfConfig":"41"},{"size":3092,"mtime":1709463659500,"results":"74","hashOfConfig":"41"},{"size":3297,"mtime":1709463659500,"results":"75","hashOfConfig":"41"},{"size":1461,"mtime":1709463659500,"results":"76","hashOfConfig":"41"},{"size":2088,"mtime":1709463659500,"results":"77","hashOfConfig":"41"},{"size":530,"mtime":1709463659504,"results":"78","hashOfConfig":"41"},{"size":1854,"mtime":1709463659500,"results":"79","hashOfConfig":"41"},{"filePath":"80","messages":"81","suppressedMessages":"82","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"fnapjk",{"filePath":"83","messages":"84","suppressedMessages":"85","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"86","messages":"87","suppressedMessages":"88","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"89","messages":"90","suppressedMessages":"91","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"92","messages":"93","suppressedMessages":"94","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"95","messages":"96","suppressedMessages":"97","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"98","messages":"99","suppressedMessages":"100","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"101","messages":"102","suppressedMessages":"103","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"104","messages":"105","suppressedMessages":"106","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"107","messages":"108","suppressedMessages":"109","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"110","messages":"111","suppressedMessages":"112","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"113","messages":"114","suppressedMessages":"115","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"116","messages":"117","suppressedMessages":"118","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"119","messages":"120","suppressedMessages":"121","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"122","messages":"123","suppressedMessages":"124","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"125","messages":"126","suppressedMessages":"127","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"128","messages":"129","suppressedMessages":"130","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"131","messages":"132","suppressedMessages":"133","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"134","messages":"135","suppressedMessages":"136","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"137","messages":"138","suppressedMessages":"139","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"140","messages":"141","suppressedMessages":"142","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"143","messages":"144","suppressedMessages":"145","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"146","messages":"147","suppressedMessages":"148","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":1,"source":null},{"filePath":"149","messages":"150","suppressedMessages":"151","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"152","messages":"153","suppressedMessages":"154","errorCount":0,"fatalErrorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":1,"source":null},{"filePath":"155","messages":"156","suppressedMessages":"157","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"158","messages":"159","suppressedMessages":"160","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"161","messages":"162","suppressedMessages":"163","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"164","messages":"165","suppressedMessages":"166","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"167","messages":"168","suppressedMessages":"169","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"170","messages":"171","suppressedMessages":"172","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"173","messages":"174","suppressedMessages":"175","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"176","messages":"177","suppressedMessages":"178","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"179","messages":"180","suppressedMessages":"181","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"182","messages":"183","suppressedMessages":"184","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"185","messages":"186","suppressedMessages":"187","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"188","messages":"189","suppressedMessages":"190","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"191","messages":"192","suppressedMessages":"193","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"194","messages":"195","suppressedMessages":"196","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/home/runner/work/galadmin/galadmin/src/front/src/index.js",[],[],"/home/runner/work/galadmin/galadmin/src/front/src/App.js",[],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/Sidebar.js",["197","198","199","200"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/RedirectToFirstView.js",["201"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/CreateRecord.js",["202","203"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/EditRecord.js",["204","205"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/Records.js",["206","207","208","209"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/Record.js",["210","211"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/Login.js",["212","213"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/Iframe.js",["214","215"],[],"/home/runner/work/galadmin/galadmin/src/front/src/pages/CustomView.js",["216"],[],"/home/runner/work/galadmin/galadmin/src/front/src/contexts/ConfigContext.js",["217"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/Input.js",["218"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/LabelTooltip.js",["219"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/DownloadButton.js",["220"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/UploadButton.js",["221"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/AddFilterButton.js",["222","223"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/BulkActionsButton.js",["224"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/ActionsButton.js",["225"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/BackButton.js",["226"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/DownloadTablePanelButton.js",["227"],[],"/home/runner/work/galadmin/galadmin/src/front/src/utils/checkRequiredColumns.js",["228","229"],[],"/home/runner/work/galadmin/galadmin/src/front/src/utils/getFormattedValue.js",["230","231","232","233"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/panels/TablePanel.js",["234","235"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/panels/GalleryPanel.js",["236","237","238","239","240"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/panels/MapPanel.js",["241","242"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/panels/ChatPanel.js",["243","244"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/CustomComponent.js",["245","246"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/OutsideClickHandler.js",["247"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ColorInput.js",["248","249","250"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/RichTextInput.js",["251","252"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/BetterRichTextInput.js",["253"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/DatetimeInput.js",["254","255"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/AddressInput.js",["256","257","258","259"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/FileInput.js",["260"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ForeignSelectInput.js",["261","262","263"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/inputs/ForeignDatalistInput.js",["264","265","266","267"],[],"/home/runner/work/galadmin/galadmin/src/front/src/utils/evalExpression.js",["268","269"],[],"/home/runner/work/galadmin/galadmin/src/front/src/components/UploadTablePanelButton.js",["270"],[],{"ruleId":"271","severity":1,"message":"272","line":18,"column":1,"nodeType":"273","endLine":129,"endColumn":2},{"ruleId":"274","severity":1,"message":"275","line":39,"column":28,"nodeType":"276","endLine":39,"endColumn":66},{"ruleId":"277","severity":1,"message":"278","line":42,"column":70,"nodeType":"279","messageId":"280","endLine":42,"endColumn":72},{"ruleId":"281","severity":1,"message":"282","line":92,"column":80,"nodeType":"283","messageId":"284","endLine":92,"endColumn":82},{"ruleId":"271","severity":1,"message":"272","line":7,"column":1,"nodeType":"273","endLine":24,"endColumn":2},{"ruleId":"285","severity":1,"message":"286","line":1,"column":22,"nodeType":"287","messageId":"288","endLine":1,"endColumn":28},{"ruleId":"271","severity":1,"message":"272","line":12,"column":1,"nodeType":"273","endLine":109,"endColumn":2},{"ruleId":"285","severity":1,"message":"286","line":1,"column":22,"nodeType":"287","messageId":"288","endLine":1,"endColumn":28},{"ruleId":"271","severity":1,"message":"272","line":12,"column":1,"nodeType":"273","endLine":104,"endColumn":2},{"ruleId":"271","severity":1,"message":"272","line":22,"column":1,"nodeType":"273","endLine":228,"endColumn":2},{"ruleId":"289","severity":1,"message":"290","line":51,"column":8,"nodeType":"291","endLine":51,"endColumn":19,"suggestions":"292"},{"ruleId":"289","severity":1,"message":"293","line":62,"column":8,"nodeType":"291","endLine":62,"endColumn":79,"suggestions":"294"},{"ruleId":"281","severity":1,"message":"282","line":189,"column":66,"nodeType":"283","messageId":"284","endLine":189,"endColumn":68},{"ruleId":"271","severity":1,"message":"272","line":18,"column":1,"nodeType":"273","endLine":99,"endColumn":2},{"ruleId":"289","severity":1,"message":"293","line":31,"column":8,"nodeType":"291","endLine":31,"endColumn":29,"suggestions":"295"},{"ruleId":"271","severity":1,"message":"272","line":5,"column":1,"nodeType":"273","endLine":33,"endColumn":2},{"ruleId":"274","severity":1,"message":"275","line":23,"column":21,"nodeType":"276","endLine":23,"endColumn":57},{"ruleId":"271","severity":1,"message":"272","line":9,"column":1,"nodeType":"273","endLine":19,"endColumn":2},{"ruleId":"296","severity":1,"message":"297","line":16,"column":13,"nodeType":"276","endLine":16,"endColumn":36},{"ruleId":"271","severity":1,"message":"272","line":6,"column":1,"nodeType":"273","endLine":15,"endColumn":2},{"ruleId":"298","severity":1,"message":"299","line":11,"column":29,"nodeType":"300","messageId":"284","endLine":11,"endColumn":33},{"ruleId":"271","severity":1,"message":"272","line":10,"column":1,"nodeType":"273","endLine":149,"endColumn":3},{"ruleId":"271","severity":1,"message":"272","line":3,"column":1,"nodeType":"273","endLine":17,"endColumn":2},{"ruleId":"271","severity":1,"message":"272","line":5,"column":1,"nodeType":"273","endLine":30,"endColumn":2},{"ruleId":"271","severity":1,"message":"272","line":5,"column":1,"nodeType":"273","endLine":55,"endColumn":2},{"ruleId":"271","severity":1,"message":"272","line":6,"column":1,"nodeType":"273","endLine":206,"endColumn":2},{"ruleId":"289","severity":1,"message":"301","line":20,"column":8,"nodeType":"291","endLine":20,"endColumn":15,"suggestions":"302"},{"ruleId":"271","severity":1,"message":"272","line":6,"column":1,"nodeType":"273","endLine":68,"endColumn":2},{"ruleId":"271","severity":1,"message":"272","line":10,"column":1,"nodeType":"273","endLine":85,"endColumn":2},{"ruleId":"271","severity":1,"message":"272","line":6,"column":1,"nodeType":"273","endLine":12,"endColumn":2},{"ruleId":"271","severity":1,"message":"272","line":4,"column":1,"nodeType":"273","endLine":28,"endColumn":2},{"ruleId":"271","severity":1,"message":"272","line":5,"column":1,"nodeType":"273","endLine":22,"endColumn":2},{"ruleId":"281","severity":1,"message":"282","line":9,"column":44,"nodeType":"283","messageId":"284","endLine":9,"endColumn":46},{"ruleId":"271","severity":1,"message":"272","line":6,"column":1,"nodeType":"273","endLine":51,"endColumn":2},{"ruleId":"303","severity":1,"message":"304","line":19,"column":13,"nodeType":"276","messageId":"305","endLine":19,"endColumn":48,"fix":"306"},{"ruleId":"274","severity":1,"message":"275","line":20,"column":17,"nodeType":"276","endLine":20,"endColumn":127},{"ruleId":"281","severity":1,"message":"282","line":46,"column":93,"nodeType":"283","messageId":"284","endLine":46,"endColumn":95},{"ruleId":"271","severity":1,"message":"272","line":10,"column":1,"nodeType":"273","endLine":112,"endColumn":2},{"ruleId":"289","severity":1,"message":"293","line":18,"column":8,"nodeType":"291","endLine":18,"endColumn":16,"suggestions":"307"},{"ruleId":"271","severity":1,"message":"272","line":8,"column":1,"nodeType":"273","endLine":76,"endColumn":2},{"ruleId":"285","severity":1,"message":"308","line":10,"column":11,"nodeType":"287","messageId":"288","endLine":10,"endColumn":18},{"ruleId":"289","severity":1,"message":"293","line":15,"column":8,"nodeType":"291","endLine":15,"endColumn":29,"suggestions":"309"},{"ruleId":"303","severity":1,"message":"304","line":61,"column":29,"nodeType":"276","messageId":"305","endLine":61,"endColumn":89,"fix":"310"},{"ruleId":"274","severity":1,"message":"275","line":62,"column":33,"nodeType":"276","endLine":66,"endColumn":35},{"ruleId":"271","severity":1,"message":"272","line":4,"column":1,"nodeType":"273","endLine":42,"endColumn":2},{"ruleId":"289","severity":1,"message":"311","line":23,"column":8,"nodeType":"291","endLine":23,"endColumn":31,"suggestions":"312"},{"ruleId":"271","severity":1,"message":"272","line":7,"column":1,"nodeType":"273","endLine":62,"endColumn":2},{"ruleId":"289","severity":1,"message":"293","line":14,"column":8,"nodeType":"291","endLine":14,"endColumn":16,"suggestions":"313"},{"ruleId":"314","severity":1,"message":"315","line":17,"column":27,"nodeType":"300","messageId":"316","endLine":17,"endColumn":69},{"ruleId":"317","severity":1,"message":"318","line":20,"column":13,"nodeType":"319","messageId":"320","endLine":20,"endColumn":47},{"ruleId":"289","severity":1,"message":"321","line":19,"column":8,"nodeType":"291","endLine":19,"endColumn":13,"suggestions":"322"},{"ruleId":"271","severity":1,"message":"272","line":3,"column":1,"nodeType":"273","endLine":29,"endColumn":2},{"ruleId":"289","severity":1,"message":"323","line":19,"column":43,"nodeType":"287","endLine":19,"endColumn":50},{"ruleId":"289","severity":1,"message":"324","line":20,"column":8,"nodeType":"291","endLine":20,"endColumn":29,"suggestions":"325"},{"ruleId":"271","severity":1,"message":"272","line":7,"column":1,"nodeType":"273","endLine":58,"endColumn":3},{"ruleId":"289","severity":1,"message":"326","line":51,"column":8,"nodeType":"291","endLine":51,"endColumn":32,"suggestions":"327"},{"ruleId":"271","severity":1,"message":"272","line":7,"column":1,"nodeType":"273","endLine":41,"endColumn":3},{"ruleId":"271","severity":1,"message":"272","line":3,"column":1,"nodeType":"273","endLine":26,"endColumn":2},{"ruleId":"289","severity":1,"message":"328","line":19,"column":8,"nodeType":"291","endLine":19,"endColumn":28,"suggestions":"329"},{"ruleId":"271","severity":1,"message":"272","line":3,"column":1,"nodeType":"273","endLine":67,"endColumn":2},{"ruleId":"289","severity":1,"message":"330","line":45,"column":8,"nodeType":"291","endLine":45,"endColumn":33,"suggestions":"331"},{"ruleId":"289","severity":1,"message":"332","line":54,"column":39,"nodeType":"287","endLine":54,"endColumn":46},{"ruleId":"289","severity":1,"message":"333","line":55,"column":8,"nodeType":"291","endLine":55,"endColumn":33,"suggestions":"334"},{"ruleId":"271","severity":1,"message":"272","line":8,"column":1,"nodeType":"273","endLine":85,"endColumn":2},{"ruleId":"271","severity":1,"message":"272","line":7,"column":1,"nodeType":"273","endLine":46,"endColumn":2},{"ruleId":"289","severity":1,"message":"335","line":23,"column":8,"nodeType":"291","endLine":23,"endColumn":10,"suggestions":"336"},{"ruleId":"281","severity":1,"message":"282","line":32,"column":50,"nodeType":"283","messageId":"284","endLine":32,"endColumn":52},{"ruleId":"271","severity":1,"message":"272","line":7,"column":1,"nodeType":"273","endLine":64,"endColumn":2},{"ruleId":"289","severity":1,"message":"337","line":22,"column":8,"nodeType":"291","endLine":22,"endColumn":15,"suggestions":"338"},{"ruleId":"289","severity":1,"message":"339","line":31,"column":29,"nodeType":"287","endLine":31,"endColumn":36},{"ruleId":"289","severity":1,"message":"340","line":32,"column":8,"nodeType":"291","endLine":32,"endColumn":23,"suggestions":"341"},{"ruleId":"271","severity":1,"message":"272","line":2,"column":1,"nodeType":"273","endLine":14,"endColumn":2},{"ruleId":"298","severity":1,"message":"299","line":8,"column":16,"nodeType":"300","messageId":"284","endLine":8,"endColumn":20},{"ruleId":"271","severity":1,"message":"272","line":4,"column":1,"nodeType":"273","endLine":56,"endColumn":2},"import/no-anonymous-default-export","Assign arrow function to a variable before exporting as module default","ExportDefaultDeclaration","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","array-callback-return","Array.prototype.map() expects a value to be returned at the end of arrow function.","ArrowFunctionExpression","expectedAtEnd","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","no-unused-vars","'useRef' is defined but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'currentFilters.length' and 'selectedRecordIds.length'. Either include them or remove the dependency array.","ArrayExpression",["342"],"React Hook useEffect has a missing dependency: 'refreshData'. Either include it or remove the dependency array.",["343"],["344"],"jsx-a11y/iframe-has-title","<iframe> elements must have a unique title property.","no-eval","eval can be harmful.","CallExpression","React Hook useEffect has missing dependencies: 'column?.dataType', 'column.optional', and 'column.options'. Either include them or remove the dependency array.",["345"],"react/jsx-no-target-blank","Using target=\"_blank\" without rel=\"noreferrer\" (which implies rel=\"noopener\") is a security risk in older browsers: see https://mathiasbynens.github.io/rel-noopener/#recommendations","noTargetBlankWithoutNoreferrer",{"range":"346","text":"347"},["348"],"'history' is assigned a value but never used.",["349"],{"range":"350","text":"347"},"React Hook useEffect has missing dependencies: 'panel.latitudeField', 'panel.longitudeField', 'panel.query', 'panel.zoom', and 'view.primaryId'. Either include them or remove the dependency array. Outer scope values like 'window.google' aren't valid dependencies because mutating them doesn't re-render the component.",["351"],["352"],"no-new-func","The Function constructor is eval.","noFunctionConstructor","no-throw-literal","Expected an error object to be thrown.","ThrowStatement","object","React Hook useEffect has a missing dependency: 'handler'. Either include it or remove the dependency array. If 'handler' changes too often, find the parent component that defines it and wrap that definition in useCallback.",["353"],"The ref value 'colorPicker.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'colorPicker.current' to a variable inside the effect, and use that variable in the cleanup function.","React Hook useEffect has missing dependencies: 'column.name', 'initialData', and 'onChange'. Either include them or remove the dependency array. Mutable values like 'colorPicker.current' aren't valid dependencies because mutating them doesn't re-render the component.",["354"],"React Hook useEffect has missing dependencies: 'column.contentField', 'column.htmlField', 'initialData', and 'onChange'. Either include them or remove the dependency array. Mutable values like 'quillContainer.current' aren't valid dependencies because mutating them doesn't re-render the component.",["355"],"React Hook useEffect has missing dependencies: 'column.name', 'initialData', 'onChange', and 'withTime'. Either include them or remove the dependency array. Mutable values like 'datepicker.current' aren't valid dependencies because mutating them doesn't re-render the component.",["356"],"React Hook useEffect has missing dependencies: 'column' and 'onChange'. Either include them or remove the dependency array. Mutable values like 'googleMapsInput.current' aren't valid dependencies because mutating them doesn't re-render the component.",["357"],"The ref value 'googleMapsInput.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'googleMapsInput.current' to a variable inside the effect, and use that variable in the cleanup function.","React Hook useEffect has an unnecessary dependency: 'googleMapsInput.current'. Either exclude it or remove the dependency array. Mutable values like 'googleMapsInput.current' aren't valid dependencies because mutating them doesn't re-render the component.",["358"],"React Hook useEffect has missing dependencies: 'column.__id__', 'column.name', 'column.optional', 'initialData', 'onChange', and 'viewIndex'. Either include them or remove the dependency array. If 'onChange' changes too often, find the parent component that defines it and wrap that definition in useCallback.",["359"],"React Hook useEffect has missing dependencies: 'column.__id__' and 'viewIndex'. Either include them or remove the dependency array.",["360"],"The ref value 'input.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy 'input.current' to a variable inside the effect, and use that variable in the cleanup function.","React Hook useEffect has an unnecessary dependency: 'input.current'. Either exclude it or remove the dependency array. Mutable values like 'input.current' aren't valid dependencies because mutating them doesn't re-render the component.",["361"],{"desc":"362","fix":"363"},{"desc":"364","fix":"365"},{"desc":"366","fix":"367"},{"desc":"368","fix":"369"},[1055,1055]," rel=\"noreferrer\"",{"desc":"370","fix":"371"},{"desc":"372","fix":"373"},[2020,2020],{"desc":"374","fix":"375"},{"desc":"370","fix":"376"},{"desc":"377","fix":"378"},{"desc":"379","fix":"380"},{"desc":"381","fix":"382"},{"desc":"383","fix":"384"},{"desc":"385","fix":"386"},{"desc":"387","fix":"388"},{"desc":"389","fix":"390"},{"desc":"391","fix":"392"},{"desc":"387","fix":"393"},"Update the dependencies array to be: [currentFilters.length, selectedRecordIds.length, viewIndex]",{"range":"394","text":"395"},"Update the dependencies array to be: [viewIndex, subviewIndex, page, query, currentFilters, orderBy, isDesc, refreshData]",{"range":"396","text":"397"},"Update the dependencies array to be: [viewIndex, recordId, refreshData]",{"range":"398","text":"399"},"Update the dependencies array to be: [column?.dataType, column.optional, column.options, field]",{"range":"400","text":"401"},"Update the dependencies array to be: [record, refreshData]",{"range":"402","text":"403"},"Update the dependencies array to be: [panel.query, record, refreshData]",{"range":"404","text":"405"},"Update the dependencies array to be: [panel.latitudeField, panel.longitudeField, panel.query, panel.zoom, record, view.primaryId]",{"range":"406","text":"407"},{"range":"408","text":"403"},"Update the dependencies array to be: [handler, ref]",{"range":"409","text":"410"},"Update the dependencies array to be: [column.name, initialData, onChange]",{"range":"411","text":"412"},"Update the dependencies array to be: [column.contentField, column.htmlField, initialData, onChange]",{"range":"413","text":"414"},"Update the dependencies array to be: [column.name, initialData, onChange, withTime]",{"range":"415","text":"416"},"Update the dependencies array to be: [column, onChange]",{"range":"417","text":"418"},"Update the dependencies array to be: []",{"range":"419","text":"420"},"Update the dependencies array to be: [column.__id__, column.name, column.optional, initialData, onChange, viewIndex]",{"range":"421","text":"422"},"Update the dependencies array to be: [column.__id__, query, viewIndex]",{"range":"423","text":"424"},{"range":"425","text":"420"},[1710,1721],"[currentFilters.length, selectedRecordIds.length, viewIndex]",[1950,2021],"[viewIndex, subviewIndex, page, query, currentFilters, orderBy, isDesc, refreshData]",[1158,1179],"[viewIndex, recordId, refreshData]",[835,842],"[column?.dataType, column.optional, column.options, field]",[542,550],"[record, refreshData]",[359,380],"[panel.query, record, refreshData]",[776,799],"[panel.latitudeField, panel.longitudeField, panel.query, panel.zoom, record, view.primaryId]",[363,371],[604,609],"[handler, ref]",[695,716],"[column.name, initialData, onChange]",[1877,1901],"[column.contentField, column.htmlField, initialData, onChange]",[717,737],"[column.name, initialData, onChange, withTime]",[2440,2465],"[column, onChange]",[2826,2851],"[]",[724,726],"[column.__id__, column.name, column.optional, initialData, onChange, viewIndex]",[620,627],"[column.__id__, query, viewIndex]",[972,987]]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _slicedToArray from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import React,{useState,useContext,useEffect}from\"react\";import{Link,useHistory,useLocation}from\"react-router-dom\";import{ConfigContext}from'../contexts/ConfigContext';import{jsx as _jsx}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";var SidebarItemIconAndLabel=function SidebarItemIconAndLabel(_ref){var view=_ref.view;return/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{class:\"sidebarIcon\",children:/*#__PURE__*/_jsx(\"i\",{class:\"fas fa-\".concat(view.icon||\"square\")})}),/*#__PURE__*/_jsx(\"div\",{class:\"sidebarLabel\",children:view.label})]});};export default(function(_ref2){var logout=_ref2.logout;var location=useLocation();var config=useContext(ConfigContext);var history=useHistory();var _useState=useState(false),_useState2=_slicedToArray(_useState,2),showMenu=_useState2[0],setShowMenu=_useState2[1];var toggleMenu=function toggleMenu(){return setShowMenu(!showMenu);};useEffect(function(){var closeMenu=function closeMenu(e){if(!e.target.closest('.menu')&&!e.target.closest('.menuButton')){setShowMenu(false);}};document.addEventListener('click',closeMenu);return function(){return document.removeEventListener('click',closeMenu);};},[]);return/*#__PURE__*/_jsxs(\"div\",{class:\"sidebar\",children:[config.logo?/*#__PURE__*/_jsx(\"img\",{src:config.logo,class:\"logo\"}):null,/*#__PURE__*/_jsx(\"div\",{class:\"sidebarTitle\",children:config.name}),/*#__PURE__*/_jsx(\"div\",{class:\"sidebarSubtitle\",children:\"Back-office\"}),config.views.filter(function(view){return!view.hidden;}).map(function(view,i){if(view.type===\"link\"){return/*#__PURE__*/_jsx(\"a\",{href:view.src,children:/*#__PURE__*/_jsx(\"div\",{class:\"sidebarItem\",children:/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(SidebarItemIconAndLabel,{view:view})})})},i);}else if(view.type===\"iframe\"){var isActive=location.pathname===\"/iframe/\".concat(i);return/*#__PURE__*/_jsx(Link,{to:\"/iframe/\".concat(i),children:/*#__PURE__*/_jsx(\"div\",{class:\"sidebarItem \".concat(isActive?\"active\":\"\"),children:/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(SidebarItemIconAndLabel,{view:view})})})},i);}else if(view.type===\"custom\"){var _isActive=location.pathname===\"/customView/\".concat(i);return/*#__PURE__*/_jsx(Link,{to:\"/customView/\".concat(i),children:/*#__PURE__*/_jsx(\"div\",{class:\"sidebarItem \".concat(_isActive?\"active\":\"\"),children:/*#__PURE__*/_jsx(\"div\",{children:/*#__PURE__*/_jsx(SidebarItemIconAndLabel,{view:view})})})},i);}else if(view.type===\"table\"){var _isActive2=location.pathname===\"/records/\".concat(i)||location.pathname===\"/createRecord/\".concat(i)||location.pathname.startsWith(\"/record/\".concat(i,\"/\"))||location.pathname.startsWith(\"/editRecord/\".concat(i,\"/\"));return/*#__PURE__*/_jsx(\"div\",{onClick:function onClick(){return history.push(\"/records/\".concat(i));},children:/*#__PURE__*/_jsxs(\"div\",{class:\"sidebarItem \".concat(_isActive2?\"active\":\"\"),children:[/*#__PURE__*/_jsxs(\"div\",{children:[/*#__PURE__*/_jsx(\"div\",{class:\"notificationWrapper\"}),/*#__PURE__*/_jsx(SidebarItemIconAndLabel,{view:view})]}),view.subviews?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{class:\"subviewsSeparator\"}),view.subviews.map(function(subview,j){var isActive=location.pathname==\"/records/\".concat(i,\"/\").concat(j);return/*#__PURE__*/_jsx(\"div\",{onClick:function onClick(e){history.push(\"/records/\".concat(i,\"/\").concat(j));e.stopPropagation();},children:/*#__PURE__*/_jsxs(\"div\",{\"data-subview-index\":j,class:isActive?\"active\":\"\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"notificationWrapperForSubview\"}),subview.label]})});})]}):null]})},i);}}),!config.hideBranding?/*#__PURE__*/_jsxs(\"div\",{class:\"sidebarBranding\",children:[\"Made with \",/*#__PURE__*/_jsx(\"i\",{class:\"fas fa-heart\"}),\" by Galadrim\"]}):null,/*#__PURE__*/_jsxs(\"div\",{class:\"menu\",onClick:toggleMenu,children:[/*#__PURE__*/_jsx(\"div\",{class:\"menuButton\",children:/*#__PURE__*/_jsx(\"i\",{class:\"far fa-ellipsis-v\"})}),showMenu?/*#__PURE__*/_jsx(\"div\",{class:\"menuOptions\",children:/*#__PURE__*/_jsxs(\"div\",{onClick:logout,class:\"menuOption\",children:[/*#__PURE__*/_jsx(\"i\",{class:\"far fa-sign-out\"}),\" Se d\\xE9connecter\"]})}):null]})]});});","map":{"version":3,"names":["React","useState","useContext","useEffect","Link","useHistory","useLocation","ConfigContext","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","SidebarItemIconAndLabel","_ref","view","children","class","concat","icon","label","_ref2","logout","location","config","history","_useState","_useState2","_slicedToArray","showMenu","setShowMenu","toggleMenu","closeMenu","e","target","closest","document","addEventListener","removeEventListener","logo","src","name","views","filter","hidden","map","i","type","href","isActive","pathname","to","startsWith","onClick","push","subviews","subview","j","stopPropagation","hideBranding"],"sources":["/home/runner/work/galadmin/galadmin/src/front/src/components/Sidebar.js"],"sourcesContent":["import React, { useState, useContext, useEffect } from \"react\";\nimport {\n Link,\n useHistory,\n useLocation\n} from \"react-router-dom\";\nimport { ConfigContext } from '../contexts/ConfigContext'\n\nconst SidebarItemIconAndLabel = ({ view }) => (\n <>\n <div class=\"sidebarIcon\">\n <i class={`fas fa-${view.icon || \"square\"}`}></i>\n </div>\n <div class=\"sidebarLabel\">{view.label}</div>\n </>\n)\n\nexport default ({ logout }) => {\n const location = useLocation();\n const config = useContext(ConfigContext);\n const history = useHistory();\n const [showMenu, setShowMenu] = useState(false);\n\n const toggleMenu = () => setShowMenu(!showMenu);\n\n useEffect(() => {\n const closeMenu = (e) => {\n if (!e.target.closest('.menu') && !e.target.closest('.menuButton')) {\n setShowMenu(false);\n }\n };\n\n document.addEventListener('click', closeMenu);\n return () => document.removeEventListener('click', closeMenu);\n }, []);\n\n return (\n <div class=\"sidebar\">\n {config.logo ? <img src={config.logo} class=\"logo\" /> : null}\n <div class=\"sidebarTitle\">{config.name}</div>\n <div class=\"sidebarSubtitle\">Back-office</div>\n {config.views.filter(view => !view.hidden).map((view, i) => {\n if (view.type === \"link\") {\n return (\n <a href={view.src} key={i}>\n <div class=\"sidebarItem\">\n <div>\n <SidebarItemIconAndLabel view={view} />\n </div>\n </div>\n </a>\n )\n } else if (view.type === \"iframe\") {\n const isActive = location.pathname === `/iframe/${i}`\n return (\n <Link to={`/iframe/${i}`} key={i}>\n <div class={`sidebarItem ${isActive ? \"active\" : \"\"}`}>\n <div>\n <SidebarItemIconAndLabel view={view} />\n </div>\n </div>\n </Link>\n )\n } else if (view.type === \"custom\") {\n const isActive = location.pathname === `/customView/${i}`\n return (\n <Link to={`/customView/${i}`} key={i}>\n <div class={`sidebarItem ${isActive ? \"active\" : \"\"}`}>\n <div>\n <SidebarItemIconAndLabel view={view} />\n </div>\n </div>\n </Link>\n )\n } else if (view.type === \"table\") {\n const isActive =\n location.pathname === `/records/${i}` ||\n location.pathname === `/createRecord/${i}` ||\n location.pathname.startsWith(`/record/${i}/`) ||\n location.pathname.startsWith(`/editRecord/${i}/`)\n return (\n <div onClick={() => history.push(`/records/${i}`)} key={i}>\n <div class={`sidebarItem ${isActive ? \"active\" : \"\"}`}>\n <div>\n <div class=\"notificationWrapper\"></div>\n <SidebarItemIconAndLabel view={view} />\n </div>\n {view.subviews ? (\n <>\n <div class=\"subviewsSeparator\"></div>\n {view.subviews.map((subview, j) => {\n const isActive = location.pathname == `/records/${i}/${j}`\n return (\n <div onClick={(e) => {\n history.push(`/records/${i}/${j}`);\n e.stopPropagation();\n }}>\n <div data-subview-index={j} class={isActive ? \"active\" : \"\"}>\n <div class=\"notificationWrapperForSubview\"></div>\n {subview.label}\n </div>\n </div>\n )\n })}\n </>\n ) : null}\n </div>\n </div>\n )\n }\n })}\n {!config.hideBranding ? (\n <div class=\"sidebarBranding\">Made with <i class=\"fas fa-heart\"></i> by Galadrim</div>\n ) : null}\n <div class=\"menu\" onClick={toggleMenu}>\n <div class=\"menuButton\">\n <i class=\"far fa-ellipsis-v\"></i>\n </div>\n {showMenu ? (\n <div class=\"menuOptions\">\n <div onClick={logout} class=\"menuOption\">\n <i class=\"far fa-sign-out\"></i> Se déconnecter\n </div>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":"mIAAA,MAAO,CAAAA,KAAK,EAAIC,QAAQ,CAAEC,UAAU,CAAEC,SAAS,KAAQ,OAAO,CAC9D,OACIC,IAAI,CACJC,UAAU,CACVC,WAAW,KACR,kBAAkB,CACzB,OAASC,aAAa,KAAQ,2BAA2B,QAAAC,GAAA,IAAAC,IAAA,gCAAAC,QAAA,IAAAC,SAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEzD,GAAM,CAAAC,uBAAuB,CAAG,QAA1B,CAAAA,uBAAuBA,CAAAC,IAAA,KAAM,CAAAC,IAAI,CAAAD,IAAA,CAAJC,IAAI,oBACnCH,KAAA,CAAAF,SAAA,EAAAM,QAAA,eACIR,IAAA,QAAKS,KAAK,CAAC,aAAa,CAAAD,QAAA,cACpBR,IAAA,MAAGS,KAAK,WAAAC,MAAA,CAAYH,IAAI,CAACI,IAAI,EAAI,QAAQ,CAAG,CAAI,CAAC,CAChD,CAAC,cACNX,IAAA,QAAKS,KAAK,CAAC,cAAc,CAAAD,QAAA,CAAED,IAAI,CAACK,KAAK,CAAM,CAAC,EAC9C,CAAC,EACN,CAED,eAAe,SAAAC,KAAA,CAAgB,IAAb,CAAAC,MAAM,CAAAD,KAAA,CAANC,MAAM,CACpB,GAAM,CAAAC,QAAQ,CAAGlB,WAAW,CAAC,CAAC,CAC9B,GAAM,CAAAmB,MAAM,CAAGvB,UAAU,CAACK,aAAa,CAAC,CACxC,GAAM,CAAAmB,OAAO,CAAGrB,UAAU,CAAC,CAAC,CAC5B,IAAAsB,SAAA,CAAgC1B,QAAQ,CAAC,KAAK,CAAC,CAAA2B,UAAA,CAAAC,cAAA,CAAAF,SAAA,IAAxCG,QAAQ,CAAA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E,CAAC,CAClCxB,CAAC,CAACyB,eAAe,CAAC,CAAC,CACvB,CAAE,CAAA1C,QAAA,cACEJ,KAAA,QAAK,qBAAoB6C,CAAE,CAACxC,KAAK,CAAEgC,QAAQ,CAAG,QAAQ,CAAG,EAAG,CAAAjC,QAAA,eACxDR,IAAA,QAAKS,KAAK,CAAC,+BAA+B,CAAM,CAAC,CAChDuC,OAAO,CAACpC,KAAK,EACb,CAAC,CACL,CAAC,CAEd,CAAC,CAAC,EACJ,CAAC,CACH,IAAI,EACP,CAAC,EAzB8C0B,CA0BnD,CAAC,CAEd,CACJ,CAAC,CAAC,CACD,CAACtB,MAAM,CAACmC,YAAY,cACjB/C,KAAA,QAAKK,KAAK,CAAC,iBAAiB,CAAAD,QAAA,EAAC,YAAU,cAAAR,IAAA,MAAGS,KAAK,CAAC,cAAc,CAAI,CAAC,eAAY,EAAK,CAAC,CACrF,IAAI,cACRL,KAAA,QAAKK,KAAK,CAAC,MAAM,CAACoC,OAAO,CAAEtB,UAAW,CAAAf,QAAA,eAClCR,IAAA,QAAKS,KAAK,CAAC,YAAY,CAAAD,QAAA,cACnBR,IAAA,MAAGS,KAAK,CAAC,mBAAmB,CAAI,CAAC,CAChC,CAAC,CACLY,QAAQ,cACLrB,IAAA,QAAKS,KAAK,CAAC,aAAa,CAAAD,QAAA,cACpBJ,KAAA,QAAKyC,OAAO,CAAE/B,MAAO,CAACL,KAAK,CAAC,YAAY,CAAAD,QAAA,eACpCR,IAAA,MAAGS,KAAK,CAAC,iBAAiB,CAAI,CAAC,qBACnC,EAAK,CAAC,CACL,CAAC,CACN,IAAI,EACP,CAAC,EACL,CAAC,CAEd,CAAC"},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _objectSpread from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _regeneratorRuntime from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _asyncToGenerator from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _slicedToArray from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import _createForOfIteratorHelper from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js\";import{useContext,useRef,useState}from\"react\";import{useParams,useHistory}from\"react-router-dom\";import axios from\"axios\";import Input from\"../components/Input\";import LabelTooltip from\"../components/LabelTooltip\";import{ConfigContext}from'../contexts/ConfigContext';import checkRequiredColumns from\"../utils/checkRequiredColumns\";import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";export default(function(){var config=useContext(ConfigContext);var _useParams=useParams(),viewIndex=_useParams.viewIndex,panelIndex=_useParams.panelIndex,recordId=_useParams.recordId;var history=useHistory();var view=config.views[viewIndex];var panel=panelIndex?view.recordViewPanels[panelIndex]:null;var filteredColumns=panel?panel.createConfig.columns:view.columns.filter(function(column){return column.dataType&&(column.canEditOnCreation===true||column.canEdit!==false)&&!column.hidden;});var initialData={};var _iterator=_createForOfIteratorHelper(filteredColumns),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var column=_step.value;if(column.defaultOption){initialData[column.name]=column.defaultOption;}else if(column.dataType===\"tinyint\"){initialData[column.name]=column.optional?\"NULL\":\"0\";}else if(column.dataType===\"select\"&&column.optional){initialData[column.name]=\"NULL\";}else if(column.dataType===\"select\"&&Array.isArray(column.options)){initialData[column.name]=column.options[0];}else if(column.dataType===\"select\"){initialData[column.name]=Object.keys(column.options)[0];}if(column.defaultValue){initialData[column.name]=column.defaultValue;}}}catch(err){_iterator.e(err);}finally{_iterator.f();}var _useState=useState(initialData),_useState2=_slicedToArray(_useState,2),data=_useState2[0],setData=_useState2[1];var _useState3=useState(false),_useState4=_slicedToArray(_useState3,2),isCreating=_useState4[0],setIsCreating=_useState4[1];var displayedColumns=filteredColumns.filter(function(column){return!column.displayCondition||column.displayCondition(data);});var createRecord=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var createData,key,_view$createConfig,response;return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(checkRequiredColumns(filteredColumns,data)){_context.next=2;break;}return _context.abrupt(\"return\");case 2:createData=JSON.parse(JSON.stringify(data));for(key in view.createFilters){createData[key]=view.createFilters[key];}setIsCreating(true);_context.prev=5;_context.next=8;return axios.post(\"/createRecord\",{viewIndex:viewIndex,panelIndex:panelIndex,recordId:recordId,data:createData});case 8:response=_context.sent;setIsCreating(false);if(recordId){// Create from panel view\nhistory.push(\"/record/\".concat(viewIndex,\"/\").concat(recordId));}else if(view!==null&&view!==void 0&&(_view$createConfig=view.createConfig)!==null&&_view$createConfig!==void 0&&_view$createConfig.redirectToCreatedItems){history.push(\"/record/\".concat(viewIndex,\"/\").concat(response.data.id));}else{history.push(\"/records/\".concat(viewIndex));}_context.next=17;break;case 13:_context.prev=13;_context.t0=_context[\"catch\"](5);window.swal({title:\"Erreur\",text:axios.isAxiosError(_context.t0)?_context.t0.response.data.message:\"Une erreur est survenue\",dangerMode:true});setIsCreating(false);case 17:case\"end\":return _context.stop();}},_callee,null,[[5,13]]);}));return function createRecord(){return _ref.apply(this,arguments);};}();return/*#__PURE__*/_jsxs(\"div\",{class:\"view\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"viewHeader\",children:/*#__PURE__*/_jsx(\"div\",{class:\"viewTitle\",children:panel?panel.createConfig.label:\"Cr\\xE9er \".concat(view.aNewSingular)})}),/*#__PURE__*/_jsxs(\"div\",{class:\"paddedView\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"form\",children:displayedColumns.map(function(column,index){return/*#__PURE__*/_jsxs(\"div\",{class:\"formElement\",children:[/*#__PURE__*/_jsxs(\"div\",{class:\"formLabel\",children:[column.label,\" \",column.required?\"*\":\"\",column.labelTooltip?/*#__PURE__*/_jsx(LabelTooltip,{text:column.labelTooltip}):null]}),/*#__PURE__*/_jsx(\"div\",{class:\"formInput\",children:/*#__PURE__*/_jsx(Input,{column:column,onChange:function onChange(newValues){return setData(_objectSpread(_objectSpread({},data),newValues));}})})]},index);})}),/*#__PURE__*/_jsx(\"div\",{class:\"button greenButton \".concat(isCreating?\"loading\":\"\"),onClick:createRecord,children:isCreating?\"Sauvegarde en cours...\":\"Créer\"}),/*#__PURE__*/_jsx(\"div\",{class:\"button\",onClick:function onClick(){return history.goBack();},children:\"Annuler\"})]})]});});","map":{"version":3,"names":["useContext","useRef","useState","useParams","useHistory","axios","Input","LabelTooltip","ConfigContext","checkRequiredColumns","jsx","_jsx","jsxs","_jsxs","config","_useParams","viewIndex","panelIndex","recordId","history","view","views","panel","recordViewPanels","filteredColumns","createConfig","columns","filter","column","dataType","canEditOnCreation","canEdit","hidden","initialData","_iterator","_createForOfIteratorHelper","_step","s","n","done","value","defaultOption","name","optional","Array","isArray","options","Object","keys","defaultValue","err","e","f","_useState","_useState2","_slicedToArray","data","setData","_useState3","_useState4","isCreating","setIsCreating","displayedColumns","displayCondition","createRecord","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","createData","key","_view$createConfig","response","wrap","_callee$","_context","prev","next","abrupt","JSON","parse","stringify","createFilters","post","sent","push","concat","redirectToCreatedItems","id","t0","window","swal","title","text","isAxiosError","message","dangerMode","stop","apply","arguments","class","children","label","aNewSingular","map","index","required","labelTooltip","onChange","newValues","_objectSpread","onClick","goBack"],"sources":["/home/runner/work/galadmin/galadmin/src/front/src/pages/CreateRecord.js"],"sourcesContent":["import { useContext, useRef, useState } from \"react\";\nimport {\n useParams,\n useHistory\n} from \"react-router-dom\";\nimport axios from \"axios\";\nimport Input from \"../components/Input\"\nimport LabelTooltip from \"../components/LabelTooltip\"\nimport { ConfigContext } from '../contexts/ConfigContext'\nimport checkRequiredColumns from \"../utils/checkRequiredColumns\";\n\nexport default () => {\n const config = useContext(ConfigContext)\n const { viewIndex, panelIndex, recordId } = useParams();\n const history = useHistory();\n const view = config.views[viewIndex];\n const panel = panelIndex ? view.recordViewPanels[panelIndex] : null;\n const filteredColumns = panel ? panel.createConfig.columns : view.columns.filter(\n column => column.dataType &&\n (column.canEditOnCreation === true || column.canEdit !== false)\n && !column.hidden\n )\n\n const initialData = {}\n for (const column of filteredColumns) {\n if (column.defaultOption) {\n initialData[column.name] = column.defaultOption\n } else if (column.dataType === \"tinyint\") {\n initialData[column.name] = column.optional ? \"NULL\" : \"0\"\n } else if (column.dataType === \"select\" && column.optional) {\n initialData[column.name] = \"NULL\"\n } else if (column.dataType === \"select\" && Array.isArray(column.options)) {\n initialData[column.name] = column.options[0]\n } else if (column.dataType === \"select\") {\n initialData[column.name] = Object.keys(column.options)[0]\n }\n if (column.defaultValue) {\n initialData[column.name] = column.defaultValue\n }\n }\n const [data, setData] = useState(initialData)\n const [isCreating, setIsCreating] = useState(false)\n\n const displayedColumns = filteredColumns.filter(column =>\n !column.displayCondition || column.displayCondition(data)\n )\n\n const createRecord = async () => {\n if (!checkRequiredColumns(filteredColumns, data)) return;\n const createData = JSON.parse(JSON.stringify(data));\n for (const key in view.createFilters) {\n createData[key] = view.createFilters[key]\n }\n setIsCreating(true)\n try {\n const response = await axios.post(\"/createRecord\", {\n viewIndex,\n panelIndex,\n recordId,\n data: createData\n })\n setIsCreating(false)\n if (recordId) { // Create from panel view\n history.push(`/record/${viewIndex}/${recordId}`)\n } else if (view?.createConfig?.redirectToCreatedItems) {\n history.push(`/record/${viewIndex}/${response.data.id}`)\n } else {\n history.push(`/records/${viewIndex}`)\n }\n } catch (error) {\n window.swal({\n title: \"Erreur\",\n text: axios.isAxiosError(error) ? error.response.data.message : \"Une erreur est survenue\",\n dangerMode: true\n })\n setIsCreating(false)\n }\n }\n\n return (\n <div class=\"view\">\n <div class=\"viewHeader\">\n <div class=\"viewTitle\">{panel ? panel.createConfig.label : `Créer ${view.aNewSingular}`}</div>\n </div>\n <div class=\"paddedView\">\n <div class=\"form\">\n {displayedColumns.map((column, index) => {\n return (\n <div class='formElement' key={index}>\n <div class='formLabel'>\n {column.label} {column.required ? \"*\" : \"\"}\n {column.labelTooltip ? <LabelTooltip text={column.labelTooltip} /> : null}\n </div>\n <div class='formInput'>\n <Input\n column={column}\n onChange={(newValues) => setData({ ...data, ...newValues })}\n />\n </div>\n </div>\n )\n })}\n </div>\n <div class={`button greenButton ${isCreating ? \"loading\" : \"\"}`} onClick={createRecord}>{isCreating ? \"Sauvegarde en cours...\" : \"Créer\"}</div>\n <div class=\"button\" onClick={() => history.goBack()}>Annuler</div>\n </div>\n </div>\n )\n}"],"mappings":"srBAAA,OAASA,UAAU,CAAEC,MAAM,CAAEC,QAAQ,KAAQ,OAAO,CACpD,OACIC,SAAS,CACTC,UAAU,KACP,kBAAkB,CACzB,MAAO,CAAAC,KAAK,KAAM,OAAO,CACzB,MAAO,CAAAC,KAAK,KAAM,qBAAqB,CACvC,MAAO,CAAAC,YAAY,KAAM,4BAA4B,CACrD,OAASC,aAAa,KAAQ,2BAA2B,CACzD,MAAO,CAAAC,oBAAoB,KAAM,+BAA+B,CAAC,OAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEjE,eAAe,UAAM,CACjB,GAAM,CAAAC,MAAM,CAAGd,UAAU,CAACQ,aAAa,CAAC,CACxC,IAAAO,UAAA,CAA4CZ,SAAS,CAAC,CAAC,CAA/Ca,SAAS,CAAAD,UAAA,CAATC,SAAS,CAAEC,UAAU,CAAAF,UAAA,CAAVE,UAAU,CAAEC,QAAQ,CAAAH,UAAA,CAARG,QAAQ,CACvC,GAAM,CAAAC,OAAO,CAAGf,UAAU,CAAC,CAAC,CAC5B,GAAM,CAAAgB,IAAI,CAAGN,MAAM,CAACO,KAAK,CAACL,SAAS,CAAC,CACpC,GAAM,CAAAM,KAAK,CAAGL,UAAU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E,SAAAA,SAACC,SAAS,QAAK,CAAArD,OAAO,CAAAsD,aAAA,CAAAA,aAAA,IAAMvD,IAAI,EAAKsD,SAAS,CAAE,CAAC,EAAC,CAC/D,CAAC,CACD,CAAC,GAVoBJ,KAWzB,CAAC,CAEd,CAAC,CAAC,CACD,CAAC,cACN/F,IAAA,QAAK0F,KAAK,uBAAAd,MAAA,CAAwB3B,UAAU,CAAG,SAAS,CAAG,EAAE,CAAG,CAACoD,OAAO,CAAEhD,YAAa,CAAAsC,QAAA,CAAE1C,UAAU,CAAG,wBAAwB,CAAG,OAAO,CAAM,CAAC,cAC/IjD,IAAA,QAAK0F,KAAK,CAAC,QAAQ,CAACW,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAA7F,OAAO,CAAC8F,MAAM,CAAC,CAAC,EAAC,CAAAX,QAAA,CAAC,SAAO,CAAK,CAAC,EACjE,CAAC,EACL,CAAC,CAEd,CAAC"},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _slicedToArray from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{useState,useEffect,useContext}from\"react\";import axios from\"axios\";import{useParams,Link}from\"react-router-dom\";import getFormattedValue from\"../utils/getFormattedValue\";import ActionsButton from\"../components/ActionsButton\";import BackButton from\"../components/BackButton\";import DownloadTablePanelButton from\"../components/DownloadTablePanelButton\";import UploadTablePanelButton from\"../components/UploadTablePanelButton\";import TablePanel from\"../components/panels/TablePanel\";import GalleryPanel from\"../components/panels/GalleryPanel\";import MapPanel from\"../components/panels/MapPanel\";import{ConfigContext}from'../contexts/ConfigContext';import ChatPanel from\"../components/panels/ChatPanel\";import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";export default(function(){var _view$columns;var config=useContext(ConfigContext);var _useParams=useParams(),viewIndex=_useParams.viewIndex,recordId=_useParams.recordId;var _useState=useState(null),_useState2=_slicedToArray(_useState,2),record=_useState2[0],setRecord=_useState2[1];var view=config.views[viewIndex];var filteredColumns=(_view$columns=view.columns)===null||_view$columns===void 0?void 0:_view$columns.filter(function(x){return!x.hidden&&(!record||!x.displayCondition||x.displayCondition(record));});useEffect(function(){refreshData();},[viewIndex,recordId]);var refreshData=function refreshData(){axios.get(\"/record\",{params:{viewIndex:viewIndex,recordId:recordId}}).then(function(response){setRecord(response.data);});};return/*#__PURE__*/_jsxs(\"div\",{class:\"view backgroundBlue\",children:[/*#__PURE__*/_jsxs(\"div\",{class:\"viewHeader\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"viewTitle\",children:view.label}),/*#__PURE__*/_jsxs(\"div\",{class:\"viewHeaderActions\",children:[/*#__PURE__*/_jsx(BackButton,{}),/*#__PURE__*/_jsx(ActionsButton,{viewIndex:viewIndex,record:record,refreshData:refreshData}),view.canEdit!==false?/*#__PURE__*/_jsx(Link,{to:\"/editRecord/\".concat(viewIndex,\"/\").concat(recordId),children:/*#__PURE__*/_jsx(\"div\",{class:\"button greenButton recordAction\",children:\"Modifier\"})}):null]})]}),/*#__PURE__*/_jsx(\"div\",{class:\"paddedView\",children:/*#__PURE__*/_jsxs(\"div\",{class:\"showContainer\",children:[/*#__PURE__*/_jsxs(\"div\",{class:\"panel detailsPanel\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"panelTitle\",children:\"D\\xE9tails\"}),record?filteredColumns.map(function(column,index){return/*#__PURE__*/_jsxs(\"div\",{class:\"showRecordField\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"formLabel\",children:column.label}),/*#__PURE__*/_jsx(\"div\",{class:\"formValue\",children:getFormattedValue(column,record,config,false)||\"-\"})]},index);}):null]}),view.recordViewPanels&&record?/*#__PURE__*/_jsx(\"div\",{class:\"recordViewPanels\",children:view.recordViewPanels.filter(function(panel){return!panel.displayCondition||panel.displayCondition(record);}).map(function(panel,index){return/*#__PURE__*/_jsxs(\"div\",{class:\"panel\",children:[/*#__PURE__*/_jsxs(\"div\",{class:\"panelHeader\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"viewTitle\",children:panel.label}),/*#__PURE__*/_jsxs(\"div\",{class:\"viewHeaderActions\",children:[panel.folded?/*#__PURE__*/_jsx(\"div\",{class:\"button smallButton unfoldPanel\",children:\"Afficher\"}):null,panel.canCreate?/*#__PURE__*/_jsx(Link,{to:\"/createRecord/\".concat(viewIndex,\"/\").concat(index,\"/\").concat(recordId),children:/*#__PURE__*/_jsx(\"div\",{class:\"plusButton\",children:/*#__PURE__*/_jsx(\"i\",{class:\"fa fa-plus\"})})}):null,panel.canDownload&&panel.type===\"table\"?/*#__PURE__*/_jsx(DownloadTablePanelButton,{record:record,panel:panel}):null,panel.canImport&&panel.type===\"table\"?/*#__PURE__*/_jsx(UploadTablePanelButton,{record:record,viewIndex:viewIndex,panel:panel,panelIndex:index,refreshData:refreshData}):null]})]}),panel.type===\"table\"?/*#__PURE__*/_jsx(TablePanel,{record:record,panel:panel,view:view,index:index}):null,panel.type===\"gallery\"?/*#__PURE__*/_jsx(GalleryPanel,{record:record,panel:panel,view:view,index:index}):null,panel.type===\"map\"?/*#__PURE__*/_jsx(MapPanel,{record:record,panel:panel,view:view,index:index}):null,panel.type===\"chat\"?/*#__PURE__*/_jsx(ChatPanel,{record:record,panel:panel,view:view,index:index}):null]},index);})}):null]})})]});});","map":{"version":3,"names":["useState","useEffect","useContext","axios","useParams","Link","getFormattedValue","ActionsButton","BackButton","DownloadTablePanelButton","UploadTablePanelButton","TablePanel","GalleryPanel","MapPanel","ConfigContext","ChatPanel","jsx","_jsx","jsxs","_jsxs","_view$columns","config","_useParams","viewIndex","recordId","_useState","_useState2","_slicedToArray","record","setRecord","view","views","filteredColumns","columns","filter","x","hidden","displayCondition","refreshData","get","params","then","response","data","class","children","label","canEdit","to","concat","map","column","index","recordViewPanels","panel","folded","canCreate","canDownload","type","canImport","panelIndex"],"sources":["/home/runner/work/galadmin/galadmin/src/front/src/pages/Record.js"],"sourcesContent":["import { useState, useEffect, useContext } from \"react\"\nimport axios from \"axios\";\nimport {\n useParams,\n Link,\n} from \"react-router-dom\";\nimport getFormattedValue from \"../utils/getFormattedValue\"\nimport ActionsButton from \"../components/ActionsButton\"\nimport BackButton from \"../components/BackButton\"\nimport DownloadTablePanelButton from \"../components/DownloadTablePanelButton\"\nimport UploadTablePanelButton from \"../components/UploadTablePanelButton\"\nimport TablePanel from \"../components/panels/TablePanel\"\nimport GalleryPanel from \"../components/panels/GalleryPanel\"\nimport MapPanel from \"../components/panels/MapPanel\"\nimport { ConfigContext } from '../contexts/ConfigContext'\nimport ChatPanel from \"../components/panels/ChatPanel\";\n\nexport default () => {\n const config = useContext(ConfigContext)\n const { viewIndex, recordId } = useParams();\n const [record, setRecord] = useState(null);\n\n const view = config.views[viewIndex]\n const filteredColumns = view.columns?.filter(x =>\n !x.hidden &&\n (!record || !x.displayCondition || x.displayCondition(record))\n )\n\n useEffect(() => {\n refreshData()\n }, [viewIndex, recordId]);\n\n const refreshData = () => {\n axios.get(\"/record\", {\n params: {\n viewIndex,\n recordId\n }\n }).then((response) => {\n setRecord(response.data);\n });\n }\n\n return (\n <div class=\"view backgroundBlue\">\n <div class=\"viewHeader\">\n <div class=\"viewTitle\">{view.label}</div>\n <div class=\"viewHeaderActions\">\n <BackButton />\n <ActionsButton viewIndex={viewIndex} record={record} refreshData={refreshData} />\n {view.canEdit !== false ? (\n <Link to={`/editRecord/${viewIndex}/${recordId}`}>\n <div class=\"button greenButton recordAction\">Modifier</div>\n </Link>\n ) : null}\n </div>\n </div>\n <div class=\"paddedView\">\n <div class=\"showContainer\">\n <div class='panel detailsPanel'>\n <div class='panelTitle'>Détails</div>\n {record ?\n filteredColumns.map((column, index) => (\n <div class='showRecordField' key={index}>\n <div class='formLabel'>{column.label}</div>\n <div class='formValue'>{getFormattedValue(column, record, config, false) || \"-\"}</div>\n </div>\n ))\n : null}\n </div>\n {view.recordViewPanels && record ? (\n <div class='recordViewPanels'>\n {view.recordViewPanels\n .filter(panel => !panel.displayCondition || panel.displayCondition(record))\n .map((panel, index) => (\n <div class='panel' key={index}>\n <div class='panelHeader'>\n <div class='viewTitle'>{panel.label}</div>\n <div class='viewHeaderActions'>\n {panel.folded ? <div class='button smallButton unfoldPanel'>Afficher</div> : null}\n {panel.canCreate ? <Link to={`/createRecord/${viewIndex}/${index}/${recordId}`}><div class='plusButton'><i class='fa fa-plus'></i></div></Link> : null}\n {panel.canDownload && panel.type === \"table\" ? <DownloadTablePanelButton record={record} panel={panel} /> : null}\n {panel.canImport && panel.type === \"table\" ? <UploadTablePanelButton record={record} viewIndex={viewIndex} panel={panel} panelIndex={index} refreshData={refreshData} /> : null}\n </div>\n </div>\n {panel.type === \"table\" ? <TablePanel record={record} panel={panel} view={view} index={index} /> : null}\n {panel.type === \"gallery\" ? <GalleryPanel record={record} panel={panel} view={view} index={index} /> : null}\n {panel.type === \"map\" ? <MapPanel record={record} panel={panel} view={view} index={index} /> : null}\n {panel.type === \"chat\" ? <ChatPanel record={record} panel={panel} view={view} index={index} /> : null}\n </div>\n ))\n }\n </div>\n ) : null}\n </div>\n </div>\n </div>\n )\n}\n"],"mappings":"mIAAA,OAASA,QAAQ,CAAEC,SAAS,CAAEC,UAAU,KAAQ,OAAO,CACvD,MAAO,CAAAC,KAAK,KAAM,OAAO,CACzB,OACIC,SAAS,CACTC,IAAI,KACD,kBAAkB,CACzB,MAAO,CAAAC,iBAAiB,KAAM,4BAA4B,CAC1D,MAAO,CAAAC,aAAa,KAAM,6BAA6B,CACvD,MAAO,CAAAC,UAAU,KAAM,0BAA0B,CACjD,MAAO,CAAAC,wBAAwB,KAAM,wCAAwC,CAC7E,MAAO,CAAAC,sBAAsB,KAAM,sCAAsC,CACzE,MAAO,CAAAC,UAAU,KAAM,iCAAiC,CACxD,MAAO,CAAAC,YAAY,KAAM,mCAAmC,CAC5D,MAAO,CAAAC,QAAQ,KAAM,+BAA+B,CACpD,OAASC,aAAa,KAAQ,2BAA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adata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _regeneratorRuntime from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/regeneratorRuntime.js\";import _asyncToGenerator from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";import _createForOfIteratorHelper from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js\";import _objectSpread from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";import _slicedToArray from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";import{useContext,useRef,useState,useEffect}from\"react\";import{useParams,useHistory}from\"react-router-dom\";import axios from\"axios\";import Input from\"../components/Input\";import LabelTooltip from\"../components/LabelTooltip\";import{ConfigContext}from'../contexts/ConfigContext';import checkRequiredColumns from\"../utils/checkRequiredColumns\";import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";import{Fragment as _Fragment}from\"react/jsx-runtime\";export default(function(){var config=useContext(ConfigContext);var _useParams=useParams(),viewIndex=_useParams.viewIndex,recordId=_useParams.recordId;var history=useHistory();var view=config.views[viewIndex];var _useState=useState(null),_useState2=_slicedToArray(_useState,2),record=_useState2[0],setRecord=_useState2[1];var _useState3=useState({}),_useState4=_slicedToArray(_useState3,2),dataToUpdate=_useState4[0],setDataToUpdate=_useState4[1];var filteredColumns=view.columns.filter(function(column){return column.dataType&&column.canEdit!==false&&!column.hidden&&(!record||!column.displayCondition||column.displayCondition(_objectSpread(_objectSpread({},record),dataToUpdate)));});var _useState5=useState(false),_useState6=_slicedToArray(_useState5,2),isUpdating=_useState6[0],setIsUpdating=_useState6[1];var _iterator=_createForOfIteratorHelper(view.columns),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var column=_step.value;if(column.displayCondition){console.log(_objectSpread(_objectSpread({},record),dataToUpdate));console.log(column.displayCondition(_objectSpread(_objectSpread({},record),dataToUpdate)));}}}catch(err){_iterator.e(err);}finally{_iterator.f();}useEffect(function(){axios.get(\"/record\",{params:{viewIndex:viewIndex,recordId:recordId}}).then(function(response){setDataToUpdate({});setRecord(response.data);});},[viewIndex,recordId]);var updateRecord=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(checkRequiredColumns(filteredColumns,_objectSpread(_objectSpread({},record),dataToUpdate))){_context.next=2;break;}return _context.abrupt(\"return\");case 2:setIsUpdating(true);_context.prev=3;_context.next=6;return axios.post(\"/updateRecord\",{viewIndex:viewIndex,primaryValue:recordId,data:dataToUpdate,previousData:record});case 6:setIsUpdating(false);history.push(\"/record/\".concat(viewIndex,\"/\").concat(recordId));_context.next=14;break;case 10:_context.prev=10;_context.t0=_context[\"catch\"](3);if(_context.t0.response.responseText){window.swal({title:\"Erreur\",text:_context.t0.response.responseText,dangerMode:true});}setIsUpdating(false);case 14:case\"end\":return _context.stop();}},_callee,null,[[3,10]]);}));return function updateRecord(){return _ref.apply(this,arguments);};}();return/*#__PURE__*/_jsxs(\"div\",{class:\"view\",children:[/*#__PURE__*/_jsx(\"div\",{class:\"viewHeader\",children:/*#__PURE__*/_jsx(\"div\",{class:\"viewTitle\",children:view.label})}),/*#__PURE__*/_jsx(\"div\",{class:\"paddedView\",children:record?/*#__PURE__*/_jsxs(_Fragment,{children:[/*#__PURE__*/_jsx(\"div\",{class:\"form\",children:filteredColumns.map(function(column,index){return/*#__PURE__*/_jsxs(\"div\",{class:\"formElement\",children:[/*#__PURE__*/_jsxs(\"div\",{class:\"formLabel\",children:[column.label,\" \",column.required?\"*\":\"\",column.labelTooltip?/*#__PURE__*/_jsx(LabelTooltip,{text:column.labelTooltip}):null]}),/*#__PURE__*/_jsx(\"div\",{class:\"formInput\",children:/*#__PURE__*/_jsx(Input,{column:column,initialData:record,onChange:function onChange(newValues){return setDataToUpdate(_objectSpread(_objectSpread({},dataToUpdate),newValues));}})})]},index);})}),/*#__PURE__*/_jsx(\"div\",{class:\"button greenButton \".concat(isUpdating?\"loading\":\"\"),onClick:updateRecord,children:isUpdating?\"Sauvegarde en cours...\":\"Sauvegarder\"}),/*#__PURE__*/_jsx(\"div\",{class:\"button\",onClick:function onClick(){return history.goBack();},children:\"Annuler\"})]}):null})]});});","map":{"version":3,"names":["useContext","useRef","useState","useEffect","useParams","useHistory","axios","Input","LabelTooltip","ConfigContext","checkRequiredColumns","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","config","_useParams","viewIndex","recordId","history","view","views","_useState","_useState2","_slicedToArray","record","setRecord","_useState3","_useState4","dataToUpdate","setDataToUpdate","filteredColumns","columns","filter","column","dataType","canEdit","hidden","displayCondition","_objectSpread","_useState5","_useState6","isUpdating","setIsUpdating","_iterator","_createForOfIteratorHelper","_step","s","n","done","value","console","log","err","e","f","get","params","then","response","data","updateRecord","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context","prev","next","abrupt","post","primaryValue","previousData","push","concat","t0","responseText","window","swal","title","text","dangerMode","stop","apply","arguments","class","children","label","map","index","required","labelTooltip","initialData","onChange","newValues","onClick","goBack"],"sources":["/home/runner/work/galadmin/galadmin/src/front/src/pages/EditRecord.js"],"sourcesContent":["import { useContext, useRef, useState, useEffect } from \"react\";\nimport {\n useParams,\n useHistory\n} from \"react-router-dom\";\nimport axios from \"axios\";\nimport Input from \"../components/Input\"\nimport LabelTooltip from \"../components/LabelTooltip\"\nimport { ConfigContext } from '../contexts/ConfigContext'\nimport checkRequiredColumns from \"../utils/checkRequiredColumns\";\n\nexport default () => {\n const config = useContext(ConfigContext)\n const { viewIndex, recordId } = useParams();\n const history = useHistory();\n const view = config.views[viewIndex];\n const [record, setRecord] = useState(null);\n const [dataToUpdate, setDataToUpdate] = useState({});\n const filteredColumns = view.columns.filter(\n column => column.dataType &&\n column.canEdit !== false &&\n !column.hidden &&\n (!record || !column.displayCondition || column.displayCondition({ ...record, ...dataToUpdate }))\n )\n const [isUpdating, setIsUpdating] = useState(false)\n\n for (let column of view.columns) {\n if (column.displayCondition) {\n console.log({ ...record, ...dataToUpdate })\n console.log(column.displayCondition({ ...record, ...dataToUpdate }))\n }\n }\n\n useEffect(() => {\n axios.get(\"/record\", {\n params: {\n viewIndex,\n recordId\n }\n }).then((response) => {\n setDataToUpdate({});\n setRecord(response.data);\n });\n }, [viewIndex, recordId]);\n\n const updateRecord = async () => {\n if (!checkRequiredColumns(filteredColumns, { ...record, ...dataToUpdate })) return;\n setIsUpdating(true)\n try {\n await axios.post(\"/updateRecord\", {\n viewIndex,\n primaryValue: recordId,\n data: dataToUpdate,\n previousData: record\n })\n setIsUpdating(false)\n history.push(`/record/${viewIndex}/${recordId}`)\n } catch (error) {\n if (error.response.responseText) {\n window.swal({\n title: \"Erreur\",\n text: error.response.responseText,\n dangerMode: true\n })\n }\n setIsUpdating(false)\n }\n }\n\n return (\n <div class=\"view\">\n <div class=\"viewHeader\">\n <div class=\"viewTitle\">{view.label}</div>\n </div>\n <div class=\"paddedView\">\n {record ? (\n <>\n <div class=\"form\">\n {filteredColumns.map((column, index) => {\n return (\n <div class='formElement' key={index}>\n <div class='formLabel'>\n {column.label} {column.required ? \"*\" : \"\"}\n {column.labelTooltip ? <LabelTooltip text={column.labelTooltip} /> : null}\n </div>\n <div class='formInput'>\n <Input\n column={column}\n initialData={record}\n onChange={(newValues) => setDataToUpdate({ ...dataToUpdate, ...newValues })}\n />\n </div>\n </div>\n )\n })}\n </div>\n <div class={`button greenButton ${isUpdating ? \"loading\" : \"\"}`} onClick={updateRecord}>{isUpdating ? \"Sauvegarde en cours...\" : \"Sauvegarder\"}</div>\n <div class=\"button\" onClick={() => history.goBack()}>Annuler</div>\n </>\n ) : null}\n </div>\n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AAE,CAAG,CAACwD,OAAO,CAAErC,YAAa,CAAA4B,QAAA,CAAE/C,UAAU,CAAG,wBAAwB,CAAG,aAAa,CAAM,CAAC,cACrJhC,IAAA,QAAK8E,KAAK,CAAC,QAAQ,CAACU,OAAO,CAAE,SAAAA,QAAA,QAAM,CAAA/E,OAAO,CAACgF,MAAM,CAAC,CAAC,EAAC,CAAAV,QAAA,CAAC,SAAO,CAAK,CAAC,EACpE,CAAC,CACH,IAAI,CACP,CAAC,EACL,CAAC,CAEd,CAAC"},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ast":null,"code":"import _defineProperty from\"/home/runner/work/galadmin/galadmin/src/front/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";import ColorInput from\"./inputs/ColorInput\";import RichTextInput from\"./inputs/RichTextInput\";import BetterRichTextInput from\"./inputs/BetterRichTextInput\";import DatetimeInput from\"./inputs/DatetimeInput\";import AddressInput from\"./inputs/AddressInput\";import FileInput from\"./inputs/FileInput\";import ForeignSelectInput from\"./inputs/ForeignSelectInput\";import ForeignDatalistInput from\"./inputs/ForeignDatalistInput\";import{jsx as _jsx}from\"react/jsx-runtime\";import{jsxs as _jsxs}from\"react/jsx-runtime\";export default(function(_ref){var column=_ref.column,_onChange2=_ref.onChange,initialData=_ref.initialData;var dataType=column.dataType;if([\"int\",\"double\",\"float\",\"decimal\"].includes(dataType)){return/*#__PURE__*/_jsx(\"input\",{type:\"number\",onChange:function onChange(e){return _onChange2(_defineProperty({},column.name,e.target.value));},defaultValue:initialData===null||initialData===void 0?void 0:initialData[column.name],onWheel:function onWheel(e){e.target.blur();setTimeout(function(){e.target.focus();},0);}});}else if(dataType===\"tinyint\"||dataType===\"boolean\"){var _initialData$column$n;return/*#__PURE__*/_jsxs(\"select\",{onChange:function onChange(e){return _onChange2(_defineProperty({},column.name,parseInt(e.target.value)));},defaultValue:(_initialData$column$n=initialData===null||initialData===void 0?void 0:initialData[column.name])!==null&&_initialData$column$n!==void 0?_initialData$column$n:column.defaultOption,children:[column.optional?/*#__PURE__*/_jsx(\"option\",{value:\"NULL\",children:\"-\"}):null,/*#__PURE__*/_jsx(\"option\",{value:\"0\",children:\"Non\"}),/*#__PURE__*/_jsx(\"option\",{value:\"1\",children:\"Oui\"})]});}else if(dataType===\"select\"&&Array.isArray(column.options)){var _initialData$column$n2;return/*#__PURE__*/_jsxs(\"select\",{onChange:function onChange(e){return _onChange2(_defineProperty({},column.name,e.target.value));},defaultValue:(_initialData$column$n2=initialData===null||initialData===void 0?void 0:initialData[column.name])!==null&&_initialData$column$n2!==void 0?_initialData$column$n2:column.defaultOption,children:[column.optional?/*#__PURE__*/_jsx(\"option\",{value:\"NULL\",children:\"-\"}):null,column.options.map(function(option){return/*#__PURE__*/_jsx(\"option\",{value:option,children:option},option);})]});}else if(dataType===\"select\"){var _initialData$column$n3;return/*#__PURE__*/_jsxs(\"select\",{onChange:function onChange(e){return _onChange2(_defineProperty({},column.name,e.target.value));},defaultValue:(_initialData$column$n3=initialData===null||initialData===void 0?void 0:initialData[column.name])!==null&&_initialData$column$n3!==void 0?_initialData$column$n3:column.defaultOption,children:[column.optional?/*#__PURE__*/_jsx(\"option\",{value:\"NULL\",children:\"-\"}):null,Object.keys(column.options).map(function(key){return/*#__PURE__*/_jsx(\"option\",{value:key,children:column.options[key]},key);})]});}else if(dataType===\"datalist\"){return/*#__PURE__*/_jsx(ForeignDatalistInput,{column:column,onChange:_onChange2,initialData:initialData});}else if(dataType===\"foreign\"){return/*#__PURE__*/_jsx(ForeignSelectInput,{column:column,onChange:_onChange2,initialData:initialData});}else if(dataType===\"address\"){return/*#__PURE__*/_jsx(AddressInput,{column:column,onChange:_onChange2,initialData:initialData});}else if(dataType===\"color\"){return/*#__PURE__*/_jsx(ColorInput,{column:column,onChange:_onChange2,initialData:initialData});}else if(dataType===\"file\"){return/*#__PURE__*/_jsx(FileInput,{column:column,onChange:_onChange2,initialData:initialData});}else if(dataType===\"datetime\"){return/*#__PURE__*/_jsx(DatetimeInput,{column:column,onChange:_onChange2,initialData:initialData,withTime:true});}else if(dataType===\"date\"){return/*#__PURE__*/_jsx(DatetimeInput,{column:column,onChange:_onChange2,initialData:initialData,withTime:false});}else if(dataType===\"textarea\"){return/*#__PURE__*/_jsx(\"textarea\",{onChange:function onChange(e){return _onChange2(_defineProperty({},column.name,e.target.value));},defaultValue:initialData===null||initialData===void 0?void 0:initialData[column.name]});}else if(dataType===\"richText\"){return/*#__PURE__*/_jsx(RichTextInput,{column:column,onChange:_onChange2,initialData:initialData});}else if(dataType===\"betterRichText\"){return/*#__PURE__*/_jsx(BetterRichTextInput,{column:column,onChange:_onChange2,initialData:initialData});}else{return/*#__PURE__*/_jsx(\"input\",{type:\"text\",onChange:function onChange(e){return _onChange2(_defineProperty({},column.name,e.target.value));},defaultValue:initialData===null||initialData===void 0?void 0:initialData[column.name]});}});","map":{"version":3,"names":["ColorInput","RichTextInput","BetterRichTextInput","DatetimeInput","AddressInput","FileInput","ForeignSelectInput","ForeignDatalistInput","jsx","_jsx","jsxs","_jsxs","_ref","column","onChange","initialData","dataType","includes","type","e","_defineProperty","name","target","value","defaultValue","onWheel","blur","setTimeout","focus","_initialData$column$n","parseInt","defaultOption","children","optional","Array","isArray","options","_initialData$column$n2","map","option","_initialData$column$n3","Object","keys","key","withTime"],"sources":["/home/runner/work/galadmin/galadmin/src/front/src/components/Input.js"],"sourcesContent":["import ColorInput from \"./inputs/ColorInput\"\nimport RichTextInput from \"./inputs/RichTextInput\";\nimport BetterRichTextInput from \"./inputs/BetterRichTextInput\";\nimport DatetimeInput from \"./inputs/DatetimeInput\";\nimport AddressInput from \"./inputs/AddressInput\";\nimport FileInput from \"./inputs/FileInput\";\nimport ForeignSelectInput from \"./inputs/ForeignSelectInput\";\nimport ForeignDatalistInput from \"./inputs/ForeignDatalistInput\";\n\nexport default ({ column, onChange, initialData }) => {\n const { dataType } = column;\n\n if ([\"int\", \"double\", \"float\", \"decimal\"].includes(dataType)) {\n return (\n <input\n type='number'\n onChange={(e) => onChange({ [column.name]: e.target.value })}\n defaultValue={initialData?.[column.name]}\n onWheel={(e) => {\n e.target.blur()\n setTimeout(() => {\n e.target.focus()\n }, 0)\n }}\n />\n );\n } else if (dataType === \"tinyint\" || dataType === \"boolean\") {\n return (\n <select\n onChange={(e) => onChange({ [column.name]: parseInt(e.target.value) })}\n defaultValue={initialData?.[column.name] ?? column.defaultOption}\n >\n {column.optional ? <option value='NULL'>-</option> : null}\n <option value='0'>Non</option>\n <option value='1'>Oui</option>\n </select>\n );\n } else if (dataType === \"select\" && Array.isArray(column.options)) {\n return (\n <select\n onChange={(e) => onChange({ [column.name]: e.target.value })}\n defaultValue={initialData?.[column.name] ?? column.defaultOption}\n >\n {column.optional ? <option value='NULL'>-</option> : null}\n {column.options.map(option => <option value={option} key={option}>{option}</option>)}\n </select>\n );\n } else if (dataType === \"select\") {\n return (\n <select\n onChange={(e) => onChange({ [column.name]: e.target.value })}\n defaultValue={initialData?.[column.name] ?? column.defaultOption}\n >\n {column.optional ? <option value='NULL'>-</option> : null}\n {Object.keys(column.options).map(key => <option value={key} key={key}>{column.options[key]}</option>)}\n </select>\n );\n } else if (dataType === \"datalist\") {\n return (\n <ForeignDatalistInput\n column={column}\n onChange={onChange}\n initialData={initialData}\n />\n );\n } else if (dataType === \"foreign\") {\n return (\n <ForeignSelectInput\n column={column}\n onChange={onChange}\n initialData={initialData}\n />\n );\n } else if (dataType === \"address\") {\n return (\n <AddressInput\n column={column}\n onChange={onChange}\n initialData={initialData}\n />\n )\n } else if (dataType === \"color\") {\n return (\n <ColorInput\n column={column}\n onChange={onChange}\n initialData={initialData}\n />\n );\n } else if (dataType === \"file\") {\n return (\n <FileInput\n column={column}\n onChange={onChange}\n initialData={initialData}\n />\n );\n } else if (dataType === \"datetime\") {\n return (\n <DatetimeInput\n column={column}\n onChange={onChange}\n initialData={initialData}\n withTime={true}\n />\n );\n } else if (dataType === \"date\") {\n return (\n <DatetimeInput\n column={column}\n onChange={onChange}\n initialData={initialData}\n withTime={false}\n />\n );\n } else if (dataType === \"textarea\") {\n return (\n <textarea\n onChange={(e) => onChange({ [column.name]: e.target.value })}\n defaultValue={initialData?.[column.name]}\n >\n </textarea>\n );\n } else if (dataType === \"richText\") {\n return (\n <RichTextInput\n column={column}\n onChange={onChange}\n initialData={initialData}\n />\n );\n } else if (dataType === \"betterRichText\") {\n return (\n <BetterRichTextInput\n column={column}\n onChange={onChange}\n initialData={initialData}\n />\n );\n } else {\n return (\n <input\n type='text'\n onChange={(e) => onChange({ [column.name]: e.target.value })}\n defaultValue={initialData?.[column.name]}\n />\n );\n }\n};"],"mappings":"qIAAA,MAAO,CAAAA,UAAU,KAAM,qBAAqB,CAC5C,MAAO,CAAAC,aAAa,KAAM,wBAAwB,CAClD,MAAO,CAAAC,mBAAmB,KAAM,8BAA8B,CAC9D,MAAO,CAAAC,aAAa,KAAM,wBAAwB,CAClD,MAAO,CAAAC,YAAY,KAAM,uBAAuB,CAChD,MAAO,CAAAC,SAAS,KAAM,oBAAoB,CAC1C,MAAO,CAAAC,kBAAkB,KAAM,6BAA6B,CAC5D,MAAO,CAAAC,oBAAoB,KAAM,+BAA+B,CAAC,OAAAC,GAAA,IAAAC,IAAA,gCAAAC,IAAA,IAAAC,KAAA,yBAEjE,eAAe,SAAAC,IAAA,CAAuC,IAApC,CAAAC,MAAM,CAAAD,IAAA,CAANC,MAAM,CAAEC,UAAQ,CAAAF,IAAA,CAARE,QAAQ,CAAEC,WAAW,CAAAH,IAAA,CAAXG,WAAW,CAC3C,GAAQ,CAAAC,QAAQ,CAAKH,MAAM,CAAnBG,QAAQ,CAEhB,GAAI,CAAC,KAAK,CAAE,QAAQ,CAAE,OAAO,CAAE,SAAS,CAAC,CAACC,QAAQ,CAACD,QAAQ,CAAC,CAAE,CAC1D,mBACIP,IAAA,UACIS,IAAI,CAAC,QAAQ,CACbJ,QAAQ,CAAE,SAAAA,SAACK,CAAC,QAAK,CAAAL,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AGF,MAAM,CAACQ,IAAI,CAAE,CAC5C,CAAC,CAEV,CACJ,CAAC"},"metadata":{},"sourceType":"module","externalDependencies":[]}
|
|
@@ -27,7 +27,7 @@ export default ({ column, onChange, initialData }) => {
|
|
|
27
27
|
} else if (dataType === "tinyint" || dataType === "boolean") {
|
|
28
28
|
return (
|
|
29
29
|
<select
|
|
30
|
-
onChange={(e) => onChange({ [column.name]: e.target.value })}
|
|
30
|
+
onChange={(e) => onChange({ [column.name]: parseInt(e.target.value) })}
|
|
31
31
|
defaultValue={initialData?.[column.name] ?? column.defaultOption}
|
|
32
32
|
>
|
|
33
33
|
{column.optional ? <option value='NULL'>-</option> : null}
|
|
@@ -38,13 +38,18 @@ export default () => {
|
|
|
38
38
|
initialData[column.name] = column.defaultValue
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
const data =
|
|
41
|
+
const [data, setData] = useState(initialData)
|
|
42
42
|
const [isCreating, setIsCreating] = useState(false)
|
|
43
43
|
|
|
44
|
+
const displayedColumns = filteredColumns.filter(column =>
|
|
45
|
+
!column.displayCondition || column.displayCondition(data)
|
|
46
|
+
)
|
|
47
|
+
|
|
44
48
|
const createRecord = async () => {
|
|
45
|
-
if (!checkRequiredColumns(filteredColumns, data
|
|
49
|
+
if (!checkRequiredColumns(filteredColumns, data)) return;
|
|
50
|
+
const createData = JSON.parse(JSON.stringify(data));
|
|
46
51
|
for (const key in view.createFilters) {
|
|
47
|
-
|
|
52
|
+
createData[key] = view.createFilters[key]
|
|
48
53
|
}
|
|
49
54
|
setIsCreating(true)
|
|
50
55
|
try {
|
|
@@ -52,7 +57,7 @@ export default () => {
|
|
|
52
57
|
viewIndex,
|
|
53
58
|
panelIndex,
|
|
54
59
|
recordId,
|
|
55
|
-
data:
|
|
60
|
+
data: createData
|
|
56
61
|
})
|
|
57
62
|
setIsCreating(false)
|
|
58
63
|
if (recordId) { // Create from panel view
|
|
@@ -79,7 +84,7 @@ export default () => {
|
|
|
79
84
|
</div>
|
|
80
85
|
<div class="paddedView">
|
|
81
86
|
<div class="form">
|
|
82
|
-
{
|
|
87
|
+
{displayedColumns.map((column, index) => {
|
|
83
88
|
return (
|
|
84
89
|
<div class='formElement' key={index}>
|
|
85
90
|
<div class='formLabel'>
|
|
@@ -89,7 +94,7 @@ export default () => {
|
|
|
89
94
|
<div class='formInput'>
|
|
90
95
|
<Input
|
|
91
96
|
column={column}
|
|
92
|
-
onChange={(newValues) => {
|
|
97
|
+
onChange={(newValues) => setData({ ...data, ...newValues })}
|
|
93
98
|
/>
|
|
94
99
|
</div>
|
|
95
100
|
</div>
|