ods-component-lib 1.23.3 → 1.23.5
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/_virtual/{FileSaver.min2.js → FileSaver2.min.js} +1 -1
- package/dist/_virtual/FileSaver2.min.js.map +1 -0
- package/dist/_virtual/{dayjs.min2.js → dayjs2.min.js} +1 -1
- package/dist/_virtual/dayjs2.min.js.map +1 -0
- package/dist/_virtual/es2.array.index-of.js +5 -0
- package/dist/_virtual/es2.array.index-of.js.map +1 -0
- package/dist/_virtual/es2.array.reduce.js +5 -0
- package/dist/_virtual/es2.array.reduce.js.map +1 -0
- package/dist/_virtual/es2.array.reverse.js +5 -0
- package/dist/_virtual/es2.array.reverse.js.map +1 -0
- package/dist/_virtual/{es.promise2.js → es2.promise.js} +1 -1
- package/dist/_virtual/es2.promise.js.map +1 -0
- package/dist/_virtual/es2.regexp.to-string.js +5 -0
- package/dist/_virtual/es2.regexp.to-string.js.map +1 -0
- package/dist/_virtual/es2.string.ends-with.js +5 -0
- package/dist/_virtual/es2.string.ends-with.js.map +1 -0
- package/dist/_virtual/es2.string.includes.js +5 -0
- package/dist/_virtual/es2.string.includes.js.map +1 -0
- package/dist/_virtual/es2.string.match.js +5 -0
- package/dist/_virtual/es2.string.match.js.map +1 -0
- package/dist/_virtual/es2.string.replace.js +5 -0
- package/dist/_virtual/es2.string.replace.js.map +1 -0
- package/dist/_virtual/es2.string.split.js +5 -0
- package/dist/_virtual/es2.string.split.js.map +1 -0
- package/dist/_virtual/es2.string.starts-with.js +5 -0
- package/dist/_virtual/es2.string.starts-with.js.map +1 -0
- package/dist/_virtual/es2.string.trim.js +5 -0
- package/dist/_virtual/es2.string.trim.js.map +1 -0
- package/dist/_virtual/{exceljs.min2.js → exceljs2.min.js} +1 -1
- package/dist/_virtual/exceljs2.min.js.map +1 -0
- package/dist/_virtual/web2.dom-collections.iterator.js +5 -0
- package/dist/_virtual/web2.dom-collections.iterator.js.map +1 -0
- package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.Functions.js.map +1 -1
- package/dist/components/devextreme/OdsBatchEditDataGrid/OdsBatchEditDataGrid.Functions.js.map +1 -1
- package/dist/components/devextreme/OdsMergeCellDataGrid/OdsMergeCellDataGrid.Functions.js.map +1 -1
- package/dist/components/devextreme/OdsRemoteDataGrid.js +39 -39
- package/dist/components/devextreme/OdsRemoteDataGrid.js.map +1 -1
- package/dist/components/devextreme/OdsTransfer.js +35 -32
- package/dist/components/devextreme/OdsTransfer.js.map +1 -1
- package/dist/components/devextreme/OdsTransferV2.js +43 -40
- package/dist/components/devextreme/OdsTransferV2.js.map +1 -1
- package/dist/index.d.ts +30 -31
- package/dist/node_modules/canvg/lib/index.es.js +84 -84
- package/dist/node_modules/canvg/lib/index.es.js.map +1 -1
- package/dist/node_modules/core-js/modules/es.array.index-of.js +1 -1
- package/dist/node_modules/core-js/modules/es.array.reduce.js +1 -1
- package/dist/node_modules/core-js/modules/es.array.reverse.js +1 -1
- package/dist/node_modules/core-js/modules/es.promise.js +1 -1
- package/dist/node_modules/core-js/modules/es.regexp.to-string.js +1 -1
- package/dist/node_modules/core-js/modules/es.string.ends-with.js +1 -1
- package/dist/node_modules/core-js/modules/es.string.includes.js +1 -1
- package/dist/node_modules/core-js/modules/es.string.match.js +1 -1
- package/dist/node_modules/core-js/modules/es.string.replace.js +1 -1
- package/dist/node_modules/core-js/modules/es.string.split.js +1 -1
- package/dist/node_modules/core-js/modules/es.string.starts-with.js +1 -1
- package/dist/node_modules/core-js/modules/es.string.trim.js +1 -1
- package/dist/node_modules/core-js/modules/web.dom-collections.iterator.js +1 -1
- package/dist/node_modules/dayjs/dayjs.min.js +17 -17
- package/dist/node_modules/dayjs/dayjs.min.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.js +217 -223
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
- package/dist/node_modules/exceljs/dist/exceljs.min.js +1 -1
- package/dist/node_modules/fflate/esm/browser.js +295 -335
- package/dist/node_modules/fflate/esm/browser.js.map +1 -1
- package/dist/node_modules/file-saver/dist/FileSaver.min.js +1 -1
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js +1771 -1781
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js.map +1 -1
- package/dist/node_modules/lodash/lodash.js +1154 -1169
- package/dist/node_modules/lodash/lodash.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +6 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/package.json +3 -2
- package/dist/_virtual/FileSaver.min2.js.map +0 -1
- package/dist/_virtual/dayjs.min2.js.map +0 -1
- package/dist/_virtual/es.array.index-of2.js +0 -5
- package/dist/_virtual/es.array.index-of2.js.map +0 -1
- package/dist/_virtual/es.array.reduce2.js +0 -5
- package/dist/_virtual/es.array.reduce2.js.map +0 -1
- package/dist/_virtual/es.array.reverse2.js +0 -5
- package/dist/_virtual/es.array.reverse2.js.map +0 -1
- package/dist/_virtual/es.promise2.js.map +0 -1
- package/dist/_virtual/es.regexp.to-string2.js +0 -5
- package/dist/_virtual/es.regexp.to-string2.js.map +0 -1
- package/dist/_virtual/es.string.ends-with2.js +0 -5
- package/dist/_virtual/es.string.ends-with2.js.map +0 -1
- package/dist/_virtual/es.string.includes2.js +0 -5
- package/dist/_virtual/es.string.includes2.js.map +0 -1
- package/dist/_virtual/es.string.match2.js +0 -5
- package/dist/_virtual/es.string.match2.js.map +0 -1
- package/dist/_virtual/es.string.replace2.js +0 -5
- package/dist/_virtual/es.string.replace2.js.map +0 -1
- package/dist/_virtual/es.string.split2.js +0 -5
- package/dist/_virtual/es.string.split2.js.map +0 -1
- package/dist/_virtual/es.string.starts-with2.js +0 -5
- package/dist/_virtual/es.string.starts-with2.js.map +0 -1
- package/dist/_virtual/es.string.trim2.js +0 -5
- package/dist/_virtual/es.string.trim2.js.map +0 -1
- package/dist/_virtual/exceljs.min2.js.map +0 -1
- package/dist/_virtual/web.dom-collections.iterator2.js +0 -5
- package/dist/_virtual/web.dom-collections.iterator2.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileSaver2.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dayjs2.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.array.index-of.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.array.reduce.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.array.reverse.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.promise.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.regexp.to-string.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.string.ends-with.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.string.includes.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.string.match.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.string.replace.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.string.split.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.string.starts-with.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"es2.string.trim.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exceljs2.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web2.dom-collections.iterator.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdsBasicDataGrid.Functions.js","sources":["../../../../src/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.Functions.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\r\nimport { Column, TotalItem } from \"devextreme-react/data-grid\";\r\n\r\nimport {\r\n ICellInfo,\r\n IOdsDataGridProps,\r\n SummaryTypes,\r\n} from \"./OdsBasicDataGrid.Types\";\r\n\r\nexport const checkCellSelectionConstraints = (e: any) => {\r\n return e.rowType == \"data\" && e.columnIndex > -1 && e.rowIndex > -1;\r\n};\r\n\r\nexport const cellAlreadySelected = (\r\n pkValue: any,\r\n dataField: string,\r\n cellInfos: ICellInfo[]\r\n) => {\r\n return cellInfos.some(\r\n (cell) => cell.pkValue == pkValue && cell.dataField == dataField\r\n );\r\n};\r\n\r\nexport const addNewFieldForFastUpdate = (data: any[]): any[] => {\r\n return data.map((item) => {\r\n item.SelectedFields = [];\r\n return item;\r\n });\r\n};\r\n\r\nexport const getRequestHeaders = (props) => {\r\n
|
|
1
|
+
{"version":3,"file":"OdsBasicDataGrid.Functions.js","sources":["../../../../src/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.Functions.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\r\nimport { Column, TotalItem } from \"devextreme-react/data-grid\";\r\n\r\nimport {\r\n ICellInfo,\r\n IOdsDataGridProps,\r\n SummaryTypes,\r\n} from \"./OdsBasicDataGrid.Types\";\r\n\r\nexport const checkCellSelectionConstraints = (e: any) => {\r\n return e.rowType == \"data\" && e.columnIndex > -1 && e.rowIndex > -1;\r\n};\r\n\r\nexport const cellAlreadySelected = (\r\n pkValue: any,\r\n dataField: string,\r\n cellInfos: ICellInfo[]\r\n) => {\r\n return cellInfos.some(\r\n (cell) => cell.pkValue == pkValue && cell.dataField == dataField\r\n );\r\n};\r\n\r\nexport const addNewFieldForFastUpdate = (data: any[]): any[] => {\r\n return data.map((item) => {\r\n item.SelectedFields = [];\r\n return item;\r\n });\r\n};\r\n\r\nexport const getRequestHeaders = (props) => {\r\n const headers = new Headers({\r\n \"Content-Type\": \"application/json\",\r\n \"Accept-Language\": props.language != \"\" ? props.language : \"EN\",\r\n });\r\n if (props.axiosRequest?.token) {\r\n headers.set(\"Authorization\", \"Bearer \" + props.axiosRequest.token);\r\n }\r\n return headers;\r\n};\r\n\r\nexport const concatFilteredLabel = (\r\n result: string,\r\n totalloaded: number,\r\n filteredRowCount: number,\r\n filterApplied: boolean,\r\n props: any\r\n) => {\r\n if (\r\n filteredRowCount > 0 &&\r\n totalloaded !== filteredRowCount &&\r\n filterApplied\r\n ) {\r\n let filteredLabel =\r\n `${filteredRowCount} ` +\r\n props.customSummary.summaryFilteredDataLabel +\r\n `- `;\r\n result = `${filteredLabel} ${result} `;\r\n }\r\n return result;\r\n};\r\n\r\nexport const showSummaryItems = (props: IOdsDataGridProps): boolean => {\r\n return (\r\n props.customSummary?.showAvgInSummary ||\r\n props.customSummary?.showCountInSummary ||\r\n props.customSummary?.showMaxInSummary ||\r\n props.customSummary?.showMinInSummary ||\r\n props.customSummary?.showSumInSummary\r\n );\r\n};\r\n\r\nexport const getSummaryItems = (\r\n props: IOdsDataGridProps,\r\n columns: any[],\r\n grid: any,\r\n isMultiLevelColumn: boolean = false\r\n): ReactElement<any>[] => {\r\n let totalItems: ReactElement<any>[] = [];\r\n\r\n columns.map((col, _index) => {\r\n if (col.multiLevelColumns && col.multiLevelColumns.length > 0) {\r\n totalItems = [\r\n ...totalItems,\r\n ...getSummaryItems(props, col.multiLevelColumns, grid, true),\r\n ];\r\n } else {\r\n const colOption = grid.columnOption(col.dataField);\r\n if (!colOption) {\r\n return col;\r\n }\r\n props.customSummary?.showAvgInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"avg\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryAvgLabel\r\n )\r\n );\r\n props.customSummary?.showCountInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"count\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryCountLabel\r\n )\r\n );\r\n props.customSummary?.showMaxInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"max\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryMaxLabel\r\n )\r\n );\r\n props.customSummary?.showMinInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"min\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryMinLabel\r\n )\r\n );\r\n props.customSummary?.showSumInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"sum\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summarySumLabel\r\n )\r\n );\r\n }\r\n return col;\r\n });\r\n return totalItems;\r\n};\r\n\r\nexport const getSummaryItem = (\r\n col: any,\r\n visibleIndex: number,\r\n summaryType: SummaryTypes,\r\n isMultiLevelColumn: boolean,\r\n label?: string,\r\n): ReactElement<any> => {\r\n if (!isMultiLevelColumn && visibleIndex == 0) {\r\n return (\r\n <TotalItem\r\n column={col.dataField}\r\n summaryType=\"custom\"\r\n cssClass=\"grid-summary-row-label\"\r\n customizeText={(_itemInfo) => label}\r\n />\r\n );\r\n }\r\n\r\n if (col.dataType != \"number\") {\r\n return <div></div>;\r\n }\r\n\r\n return (\r\n <TotalItem\r\n column={col.dataField}\r\n summaryType={summaryType}\r\n cssClass=\"grid-summary-row-data\"\r\n customizeText={(itemInfo) => Number(itemInfo.value).toFixed(2)}\r\n />\r\n );\r\n};\r\n\r\nexport const getMultiLevelColumns = (col) => {\r\n return (\r\n col.multiLevelColumns &&\r\n col.multiLevelColumns.map((colItem: any) => (\r\n <Column width={80} {...colItem}>\r\n {getMultiLevelColumns(colItem)}\r\n </Column>\r\n ))\r\n );\r\n};\r\n"],"names":["checkCellSelectionConstraints","cellAlreadySelected","pkValue","dataField","cellInfos","cell","concatFilteredLabel","result","totalloaded","filteredRowCount","filterApplied","props","getMultiLevelColumns","col","colItem","jsx","Column"],"mappings":";;AASO,MAAMA,IAAgC,CAAC,MACrC,EAAE,WAAW,UAAU,EAAE,cAAc,MAAM,EAAE,WAAW,IAGtDC,IAAsB,CACjCC,GACAC,GACAC,MAEOA,EAAU;AAAA,EACf,CAACC,MAASA,EAAK,WAAWH,KAAWG,EAAK,aAAaF;AAAA,GAsB9CG,IAAsB,CACjCC,GACAC,GACAC,GACAC,GACAC,OAGEF,IAAmB,KACnBD,MAAgBC,KAChBC,MAMAH,IAAS,GAHP,GAAGE,CAAgB,MACnBE,EAAM,cAAc,2BACpB,IACuB,IAAIJ,CAAM,UAE9BA,IAwHIK,IAAuB,CAACC,MAEjCA,EAAI,qBACJA,EAAI,kBAAkB,IAAI,CAACC,MACzB,gBAAAC,EAACC,GAAA,EAAO,OAAO,IAAK,GAAGF,GACpB,UAAAF,EAAqBE,CAAO,GAC/B,CACD;"}
|
package/dist/components/devextreme/OdsBatchEditDataGrid/OdsBatchEditDataGrid.Functions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdsBatchEditDataGrid.Functions.js","sources":["../../../../src/components/devextreme/OdsBatchEditDataGrid/OdsBatchEditDataGrid.Functions.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\r\nimport { Column, TotalItem } from \"devextreme-react/data-grid\";\r\n\r\nimport {\r\n IBatchEditDataGridProps,\r\n ICellInfo,\r\n SummaryTypes,\r\n} from \"./OdsBatchEditDataGrid.Types\";\r\n\r\nexport const checkCellSelectionConstraints = (e: any) => {\r\n return e.rowType == \"data\" && e.columnIndex > -1 && e.rowIndex > -1;\r\n};\r\n\r\nexport const cellAlreadySelected = (\r\n pkValue: any,\r\n dataField: string,\r\n cellInfos: ICellInfo[]\r\n) => {\r\n return cellInfos.some(\r\n (cell) => cell.pkValue == pkValue && cell.dataField == dataField\r\n );\r\n};\r\n\r\nexport const addNewFieldForFastUpdate = (data: any[]): any[] => {\r\n return data.map((item) => {\r\n item.SelectedFields = [];\r\n return item;\r\n });\r\n};\r\n\r\nexport const getRequestHeaders = (props) => {\r\n
|
|
1
|
+
{"version":3,"file":"OdsBatchEditDataGrid.Functions.js","sources":["../../../../src/components/devextreme/OdsBatchEditDataGrid/OdsBatchEditDataGrid.Functions.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\r\nimport { Column, TotalItem } from \"devextreme-react/data-grid\";\r\n\r\nimport {\r\n IBatchEditDataGridProps,\r\n ICellInfo,\r\n SummaryTypes,\r\n} from \"./OdsBatchEditDataGrid.Types\";\r\n\r\nexport const checkCellSelectionConstraints = (e: any) => {\r\n return e.rowType == \"data\" && e.columnIndex > -1 && e.rowIndex > -1;\r\n};\r\n\r\nexport const cellAlreadySelected = (\r\n pkValue: any,\r\n dataField: string,\r\n cellInfos: ICellInfo[]\r\n) => {\r\n return cellInfos.some(\r\n (cell) => cell.pkValue == pkValue && cell.dataField == dataField\r\n );\r\n};\r\n\r\nexport const addNewFieldForFastUpdate = (data: any[]): any[] => {\r\n return data.map((item) => {\r\n item.SelectedFields = [];\r\n return item;\r\n });\r\n};\r\n\r\nexport const getRequestHeaders = (props) => {\r\n const headers = new Headers({\r\n \"Content-Type\": \"application/json\",\r\n \"Accept-Language\": props.language != \"\" ? props.language : \"EN\",\r\n });\r\n if (props.axiosRequest?.token) {\r\n headers.set(\"Authorization\", \"Bearer \" + props.axiosRequest.token);\r\n }\r\n return headers;\r\n};\r\n\r\nexport const concatFilteredLabel = (\r\n result: string,\r\n totalloaded: number,\r\n filteredRowCount: number,\r\n filterApplied: boolean,\r\n props: any\r\n) => {\r\n if (\r\n filteredRowCount > 0 &&\r\n totalloaded !== filteredRowCount &&\r\n filterApplied\r\n ) {\r\n let filteredLabel =\r\n `${filteredRowCount} ` +\r\n props.customSummary.summaryFilteredDataLabel +\r\n `- `;\r\n result = `${filteredLabel} ${result} `;\r\n }\r\n return result;\r\n};\r\n\r\nexport const showSummaryItems = (props: IBatchEditDataGridProps): boolean => {\r\n return (\r\n props.customSummary?.showAvgInSummary ||\r\n props.customSummary?.showCountInSummary ||\r\n props.customSummary?.showMaxInSummary ||\r\n props.customSummary?.showMinInSummary ||\r\n props.customSummary?.showSumInSummary\r\n );\r\n};\r\n\r\nexport const getSummaryItems = (\r\n props: IBatchEditDataGridProps,\r\n columns: any[],\r\n grid: any,\r\n isMultiLevelColumn: boolean = false\r\n): ReactElement<any>[] => {\r\n let totalItems: ReactElement<any>[] = [];\r\n\r\n columns.map((col, _index) => {\r\n if (col.multiLevelColumns && col.multiLevelColumns.length > 0) {\r\n totalItems = [\r\n ...totalItems,\r\n ...getSummaryItems(props, col.multiLevelColumns, grid, true),\r\n ];\r\n } else {\r\n const colOption = grid.columnOption(col.dataField);\r\n if (!colOption) {\r\n return col;\r\n }\r\n props.customSummary?.showAvgInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"avg\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryAvgLabel\r\n )\r\n );\r\n props.customSummary?.showCountInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"count\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryCountLabel\r\n )\r\n );\r\n props.customSummary?.showMaxInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"max\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryMaxLabel\r\n )\r\n );\r\n props.customSummary?.showMinInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"min\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryMinLabel\r\n )\r\n );\r\n props.customSummary?.showSumInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"sum\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summarySumLabel\r\n )\r\n );\r\n }\r\n return col;\r\n });\r\n return totalItems;\r\n};\r\n\r\nexport const getSummaryItem = (\r\n col: any,\r\n visibleIndex: number,\r\n summaryType: SummaryTypes,\r\n isMultiLevelColumn: boolean,\r\n label?: string,\r\n): ReactElement<any> => {\r\n if (!isMultiLevelColumn && visibleIndex == 0) {\r\n return (\r\n <TotalItem\r\n column={col.dataField}\r\n summaryType=\"custom\"\r\n cssClass=\"grid-summary-row-label\"\r\n customizeText={(_itemInfo) => label}\r\n />\r\n );\r\n }\r\n\r\n if (col.dataType != \"number\") {\r\n return <div></div>;\r\n }\r\n\r\n return (\r\n <TotalItem\r\n column={col.dataField}\r\n summaryType={summaryType}\r\n cssClass=\"grid-summary-row-data\"\r\n customizeText={(itemInfo) => Number(itemInfo.value).toFixed(2)}\r\n />\r\n );\r\n};\r\n\r\nexport const getMultiLevelColumns = (col) => {\r\n return (\r\n col.multiLevelColumns &&\r\n col.multiLevelColumns.map((colItem: any) => (\r\n <Column width={80} {...colItem}>\r\n {getMultiLevelColumns(colItem)}\r\n </Column>\r\n ))\r\n );\r\n};\r\n"],"names":["concatFilteredLabel","result","totalloaded","filteredRowCount","filterApplied","props","getMultiLevelColumns","col","colItem","jsx","Column"],"mappings":";;AAyCO,MAAMA,IAAsB,CACjCC,GACAC,GACAC,GACAC,GACAC,OAGEF,IAAmB,KACnBD,MAAgBC,KAChBC,MAMAH,IAAS,GAHP,GAAGE,CAAgB,MACnBE,EAAM,cAAc,2BACpB,IACuB,IAAIJ,CAAM,UAE9BA,IAwHIK,IAAuB,CAACC,MAEjCA,EAAI,qBACJA,EAAI,kBAAkB,IAAI,CAACC,MACzB,gBAAAC,EAACC,GAAA,EAAO,OAAO,IAAK,GAAGF,GACpB,UAAAF,EAAqBE,CAAO,GAC/B,CACD;"}
|
package/dist/components/devextreme/OdsMergeCellDataGrid/OdsMergeCellDataGrid.Functions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OdsMergeCellDataGrid.Functions.js","sources":["../../../../src/components/devextreme/OdsMergeCellDataGrid/OdsMergeCellDataGrid.Functions.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\r\nimport { Column, TotalItem } from \"devextreme-react/data-grid\";\r\nimport _ from \"lodash\";\r\n\r\nimport { ISortedColumn, SortingType } from \"../../../utils/customTypes\";\r\n\r\nimport { IOdsDataGridProps, SummaryTypes } from \"./OdsMergeCellDataGrid.Types\";\r\n\r\nexport const getRequestHeaders = (props) => {\r\n
|
|
1
|
+
{"version":3,"file":"OdsMergeCellDataGrid.Functions.js","sources":["../../../../src/components/devextreme/OdsMergeCellDataGrid/OdsMergeCellDataGrid.Functions.tsx"],"sourcesContent":["import React, { ReactElement } from \"react\";\r\nimport { Column, TotalItem } from \"devextreme-react/data-grid\";\r\nimport _ from \"lodash\";\r\n\r\nimport { ISortedColumn, SortingType } from \"../../../utils/customTypes\";\r\n\r\nimport { IOdsDataGridProps, SummaryTypes } from \"./OdsMergeCellDataGrid.Types\";\r\n\r\nexport const getRequestHeaders = (props) => {\r\n const headers = new Headers({\r\n \"Content-Type\": \"application/json\",\r\n \"Accept-Language\": props.language != \"\" ? props.language : \"EN\",\r\n });\r\n if (props.axiosRequest?.token) {\r\n headers.set(\"Authorization\", \"Bearer \" + props.axiosRequest.token);\r\n }\r\n return headers;\r\n};\r\n\r\nexport const concatFilteredLabel = (\r\n result: string,\r\n totalloaded: number,\r\n filteredRowCount: number,\r\n filterApplied: boolean,\r\n props: any\r\n) => {\r\n if (\r\n filteredRowCount > 0 &&\r\n totalloaded !== filteredRowCount &&\r\n filterApplied\r\n ) {\r\n let filteredLabel =\r\n `${filteredRowCount} ` +\r\n props.customSummary.summaryFilteredDataLabel +\r\n `- `;\r\n result = `${filteredLabel} ${result} `;\r\n }\r\n return result;\r\n};\r\n\r\nexport const showSummaryItems = (props: IOdsDataGridProps): boolean => {\r\n return (\r\n props.customSummary?.showAvgInSummary ||\r\n props.customSummary?.showCountInSummary ||\r\n props.customSummary?.showMaxInSummary ||\r\n props.customSummary?.showMinInSummary ||\r\n props.customSummary?.showSumInSummary\r\n );\r\n};\r\n\r\nexport const getSummaryItems = (\r\n props: IOdsDataGridProps,\r\n columns: any[],\r\n grid: any,\r\n isMultiLevelColumn: boolean = false\r\n): ReactElement<any>[] => {\r\n let totalItems: ReactElement<any>[] = [];\r\n\r\n columns.map((col, _index) => {\r\n if (col.multiLevelColumns && col.multiLevelColumns.length > 0) {\r\n totalItems = [\r\n ...totalItems,\r\n ...getSummaryItems(props, col.multiLevelColumns, grid, true),\r\n ];\r\n } else {\r\n const colOption = grid.columnOption(col.dataField);\r\n if (!colOption) {\r\n return col;\r\n }\r\n props.customSummary?.showAvgInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"avg\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryAvgLabel\r\n )\r\n );\r\n props.customSummary?.showCountInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"count\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryCountLabel\r\n )\r\n );\r\n props.customSummary?.showMaxInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"max\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryMaxLabel\r\n )\r\n );\r\n props.customSummary?.showMinInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"min\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summaryMinLabel\r\n )\r\n );\r\n props.customSummary?.showSumInSummary &&\r\n totalItems.push(\r\n getSummaryItem(\r\n col,\r\n colOption.visibleIndex,\r\n \"sum\",\r\n isMultiLevelColumn,\r\n props.customSummary?.summarySumLabel\r\n )\r\n );\r\n }\r\n return col;\r\n });\r\n return totalItems;\r\n};\r\n\r\nexport const getSummaryItem = (\r\n col: any,\r\n visibleIndex: number,\r\n summaryType: SummaryTypes,\r\n isMultiLevelColumn: boolean,\r\n label?: string\r\n): ReactElement<any> => {\r\n if (!isMultiLevelColumn && visibleIndex == 0) {\r\n return (\r\n <TotalItem\r\n column={col.dataField}\r\n summaryType=\"custom\"\r\n cssClass=\"grid-summary-row-label\"\r\n customizeText={(_itemInfo) => label}\r\n />\r\n );\r\n }\r\n\r\n if (col.dataType != \"number\") {\r\n return <div></div>;\r\n }\r\n\r\n return (\r\n <TotalItem\r\n column={col.dataField}\r\n summaryType={summaryType}\r\n cssClass=\"grid-summary-row-data\"\r\n customizeText={(itemInfo) => Number(itemInfo.value).toFixed(2)}\r\n />\r\n );\r\n};\r\n\r\nexport const getMultiLevelColumns = (col) => {\r\n return (\r\n col.multiLevelColumns &&\r\n col.multiLevelColumns.map((colItem: any) => (\r\n <Column width={80} {...colItem}>\r\n {getMultiLevelColumns(colItem)}\r\n </Column>\r\n ))\r\n );\r\n};\r\n\r\nexport const getSortedColumns = (dataGrid): ISortedColumn[] => {\r\n if (dataGrid === undefined || dataGrid === null) {\r\n return [];\r\n }\r\n const columns = dataGrid.getVisibleColumns();\r\n const sortedColumns: ISortedColumn[] = [];\r\n _.forEach(columns, (column) => {\r\n if (column.sortIndex >= 0) {\r\n const _sortField = column.sortingFieldName ?? column.dataField;\r\n const _sortType = String(column.sortOrder).toLocaleUpperCase() as SortingType;\r\n sortedColumns.push({\r\n sortField: _sortField,\r\n sortType: _sortType,\r\n sortIndex: column.sortIndex,\r\n sortQuery: `${_sortField} ${_sortType}`\r\n });\r\n }\r\n });\r\n return sortedColumns;\r\n}\r\n\r\nexport const isSortChanged = (sortOne: ISortedColumn[], sortTwo: ISortedColumn[]): boolean => {\r\n const _sortOne = sortOne === undefined || sortOne === null ? [] : sortOne;\r\n const _sortTwo = sortTwo === undefined || sortTwo === null ? [] : sortTwo;\r\n if (_sortOne.length != _sortTwo.length) {\r\n return true;\r\n }\r\n if (_sortOne.length == 0 && _sortTwo.length == 0) {\r\n return false;\r\n }\r\n for (let index = 0; index < _sortOne.length; index++) {\r\n const sortItem = _sortOne[index];\r\n if (!_sortTwo.some(item => item.sortField == sortItem.sortField && item.sortType == sortItem.sortType && item.sortIndex == sortItem.sortIndex)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}"],"names":["getMultiLevelColumns","col","colItem","jsx","Column","getSortedColumns","dataGrid","columns","sortedColumns","_","column","_sortField","_sortType","isSortChanged","sortOne","sortTwo","_sortOne","_sortTwo","index","sortItem","item"],"mappings":";;;AA6JO,MAAMA,IAAuB,CAACC,MAEjCA,EAAI,qBACJA,EAAI,kBAAkB,IAAI,CAACC,MACzB,gBAAAC,EAACC,GAAA,EAAO,OAAO,IAAK,GAAGF,GACpB,UAAAF,EAAqBE,CAAO,GAC/B,CACD,GAIQG,IAAmB,CAACC,MAA8B;AAC7D,MAA8BA,KAAa;AACzC,WAAO,CAAA;AAET,QAAMC,IAAUD,EAAS,kBAAA,GACnBE,IAAiC,CAAA;AACvC,SAAAC,EAAE,QAAQF,GAAS,CAACG,MAAW;AAC7B,QAAIA,EAAO,aAAa,GAAG;AACzB,YAAMC,IAAaD,EAAO,oBAAoBA,EAAO,WAC/CE,IAAY,OAAOF,EAAO,SAAS,EAAE,kBAAA;AAC3C,MAAAF,EAAc,KAAK;AAAA,QACjB,WAAWG;AAAA,QACX,UAAUC;AAAA,QACV,WAAWF,EAAO;AAAA,QAClB,WAAW,GAAGC,CAAU,IAAIC,CAAS;AAAA,MAAA,CACtC;AAAA,IACH;AAAA,EACF,CAAC,GACMJ;AACT,GAEaK,IAAgB,CAACC,GAA0BC,MAAsC;AAC5F,QAAMC,IAAoCF,KAAmB,CAAA,GACvDG,IAAoCF,KAAmB,CAAA;AAC7D,MAAIC,EAAS,UAAUC,EAAS;AAC9B,WAAO;AAET,MAAID,EAAS,UAAU,KAAKC,EAAS,UAAU;AAC7C,WAAO;AAET,WAASC,IAAQ,GAAGA,IAAQF,EAAS,QAAQE,KAAS;AACpD,UAAMC,IAAWH,EAASE,CAAK;AAC/B,QAAI,CAACD,EAAS,KAAK,CAAAG,MAAQA,EAAK,aAAaD,EAAS,aAAaC,EAAK,YAAYD,EAAS,YAAYC,EAAK,aAAaD,EAAS,SAAS;AAC3I,aAAO;AAAA,EAEX;AACA,SAAO;AACT;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as o, jsxs as C } from "react/jsx-runtime";
|
|
2
|
-
import { createRoot as
|
|
2
|
+
import { createRoot as V } from "react-dom/client";
|
|
3
3
|
import q, { useState as v, useRef as O, useEffect as f, useMemo as ge, useCallback as g } from "react";
|
|
4
|
-
import he, { Column as B, HeaderFilter as G, MasterDetail as Se, Editing as xe, Popup as ye, Form as Ce, Paging as be, Pager as ve, Scrolling as we, LoadPanel as Re, SearchPanel as Ee, FilterRow as qe, FilterPanel as Fe, Sorting as Pe, Export as
|
|
5
|
-
import { Item as
|
|
4
|
+
import he, { Column as B, HeaderFilter as G, MasterDetail as Se, Editing as xe, Popup as ye, Form as Ce, Paging as be, Pager as ve, Scrolling as we, LoadPanel as Re, SearchPanel as Ee, FilterRow as qe, FilterPanel as Fe, Sorting as Pe, Export as ke, Selection as Te, ColumnChooser as De, Position as Oe, ColumnChooserSearch as Be, ColumnChooserSelection as Ge, Toolbar as Me, Item as M, Summary as $e, TotalItem as Ne, StateStoring as Le } from "devextreme-react/data-grid";
|
|
5
|
+
import { Item as _ } from "devextreme-react/form";
|
|
6
6
|
import { exportDataGrid as Ae } from "devextreme/pdf_exporter";
|
|
7
7
|
import { exportDataGrid as ze } from "devextreme/excel_exporter";
|
|
8
8
|
import Ue from "../../node_modules/jspdf/dist/jspdf.es.min.js";
|
|
@@ -24,22 +24,21 @@ import { isTextEmpty as et } from "../../utils/commonFunctions.js";
|
|
|
24
24
|
const tt = ["xlsx"];
|
|
25
25
|
let u = 1, s = 1, S = 0;
|
|
26
26
|
const { useToken: nt } = je, at = (t) => {
|
|
27
|
-
const { token:
|
|
27
|
+
const { token: Q } = nt(), [c, w] = v([]), P = t.exportFileName ? t.exportFileName + $().format("YYYYMMDD") : "DatagridExportFile" + $().format("YYYYMMDD"), [R, k] = v(0), x = O(t.columns);
|
|
28
28
|
let h = O(null);
|
|
29
|
-
const b = O(!1), [
|
|
29
|
+
const b = O(!1), [W, T] = v(!1), [D, I] = v(!1), [J, K] = v(0), X = new CustomEvent("cancelEdit", {
|
|
30
30
|
bubbles: !0,
|
|
31
31
|
detail: {
|
|
32
32
|
rowData: null
|
|
33
33
|
}
|
|
34
|
-
}),
|
|
34
|
+
}), L = new Headers({
|
|
35
35
|
"Content-Type": "application/json",
|
|
36
|
-
Authorization: "Bearer " + (t.axiosRequest ? t.axiosRequest.token : ""),
|
|
37
36
|
"Accept-Language": t.language != "" ? t.language : "EN"
|
|
38
37
|
});
|
|
39
|
-
f(() => {
|
|
38
|
+
t.axiosRequest?.token && L.set("Authorization", "Bearer " + t.axiosRequest.token), f(() => {
|
|
40
39
|
u = 1, s = 1, S = 0;
|
|
41
40
|
}, [t.dataGridPageName]), f(() => {
|
|
42
|
-
t.axiosRequest !== void 0 && (t.axiosRequest?.requestData && Object.keys(t.axiosRequest?.requestData).length > 0 || t.axiosRequest?.requestQueryString) && (u = 1, s = 1, S = 0, w([]),
|
|
41
|
+
t.axiosRequest !== void 0 && (t.axiosRequest?.requestData && Object.keys(t.axiosRequest?.requestData).length > 0 || t.axiosRequest?.requestQueryString) && (u = 1, s = 1, S = 0, w([]), z());
|
|
43
42
|
}, [t.axiosRequest?.requestData, t.axiosRequest?.requestQueryString]), f(() => {
|
|
44
43
|
if (x.current !== void 0 && x.current.length > 0) {
|
|
45
44
|
const e = x.current.map((n) => {
|
|
@@ -110,7 +109,7 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
110
109
|
}, p = (e) => {
|
|
111
110
|
const n = Object.keys(e);
|
|
112
111
|
return n.length === 1 && n[0] === "Sorting";
|
|
113
|
-
},
|
|
112
|
+
}, A = ge(() => t.actionButtonGroup ? t.actionButtonGroup.length >= 2 && !t.edit ? t.actionButtonGroup.slice(0, 2) : t.actionButtonGroup : [], [t.actionButtonGroup]), z = g(async () => {
|
|
114
113
|
if (t.axiosRequest != null && t.isServerSide) {
|
|
115
114
|
if (t.axiosRequest.requestData && p(t.axiosRequest.requestData))
|
|
116
115
|
return;
|
|
@@ -122,11 +121,12 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
122
121
|
}
|
|
123
122
|
const n = {
|
|
124
123
|
method: t.axiosRequest.requestType,
|
|
125
|
-
headers:
|
|
124
|
+
headers: L,
|
|
125
|
+
credentials: t.axiosRequest.token ? "same-origin" : "include",
|
|
126
126
|
body: JSON.stringify(t.axiosRequest.requestData)
|
|
127
127
|
};
|
|
128
128
|
try {
|
|
129
|
-
|
|
129
|
+
T(!0);
|
|
130
130
|
const i = await fetch(e, n), l = await i.json();
|
|
131
131
|
if (s == 1)
|
|
132
132
|
w(l.Data ? l.Data : l), s = 1;
|
|
@@ -136,7 +136,7 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
136
136
|
}
|
|
137
137
|
ee(i, l);
|
|
138
138
|
} catch {
|
|
139
|
-
|
|
139
|
+
T(!1);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
142
|
}, [
|
|
@@ -154,20 +154,20 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
154
154
|
let i;
|
|
155
155
|
e && (i = e.headers.get("x-total-count")), i == null && (i = n?.rowCount), i == null && (i = n?.length), S = parseInt(i, 10) || 0, u = Math.ceil(S / t.pageSize);
|
|
156
156
|
}
|
|
157
|
-
|
|
157
|
+
T(!1);
|
|
158
158
|
}, te = g(
|
|
159
159
|
(e) => {
|
|
160
160
|
e.row !== void 0 && e.parentType === "dataRow" && t.handleEditorPreparing && t.handleEditorPreparing(e), e.editorOptions && e.rowType === "data" && e.parentType === "dataRow" && (e.editorOptions.onValueChanged = function(n) {
|
|
161
|
-
n.event && n.event.type === "cancel" && e.cellElement.dispatchEvent(
|
|
161
|
+
n.event && n.event.type === "cancel" && e.cellElement.dispatchEvent(X);
|
|
162
162
|
});
|
|
163
163
|
},
|
|
164
164
|
[t.isServerSide]
|
|
165
|
-
),
|
|
165
|
+
), U = g(
|
|
166
166
|
async (e) => {
|
|
167
167
|
if (e === "reachedBottom") {
|
|
168
168
|
if (u <= s)
|
|
169
169
|
return;
|
|
170
|
-
s = s + 1, await
|
|
170
|
+
s = s + 1, await z();
|
|
171
171
|
}
|
|
172
172
|
},
|
|
173
173
|
[u]
|
|
@@ -229,9 +229,9 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
229
229
|
[t.filterEnabledShow]
|
|
230
230
|
), ie = g((e) => {
|
|
231
231
|
e.parentType === "filterRow" && e.editorName === "dxSelectBox" && e.dataField === "IsActive" && e.dataSource != null && e.dataSource.length > 0 && (e.showAllText = e.dataSource.find((n) => n.value === null).label, e.trueText = e.dataSource.find((n) => n.value === !0).label, e.falseText = e.dataSource.find((n) => n.value === !1).label);
|
|
232
|
-
}, []),
|
|
232
|
+
}, []), Y = g(() => {
|
|
233
233
|
let e = "", n = 0;
|
|
234
|
-
return c.length < 50 || !t.isServerSide || s == u ? n = c.length : n = s * t.pageSize, t.isServerSide && (e = S > 0 ? `${n} ` + t.customSummary?.summaryLoadedDataLabel + `- ${S}` + t.customSummary?.summaryTotalDataLabel : "", e =
|
|
234
|
+
return c.length < 50 || !t.isServerSide || s == u ? n = c.length : n = s * t.pageSize, t.isServerSide && (e = S > 0 ? `${n} ` + t.customSummary?.summaryLoadedDataLabel + `- ${S}` + t.customSummary?.summaryTotalDataLabel : "", e = H(e, n)), t.customSummary?.summaryTotalCount !== void 0 && !t.isServerSide && (e = t.customSummary.summaryTotalDataLabel + " : " + t.customSummary.summaryTotalCount, e = H(e, n)), u > 1 && (e = `${e} - ${t.customSummary?.summaryTotalPageCountLabel} ${s} / ${u}`), e;
|
|
235
235
|
}, [
|
|
236
236
|
c,
|
|
237
237
|
R,
|
|
@@ -239,7 +239,7 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
239
239
|
t.pageSize,
|
|
240
240
|
S,
|
|
241
241
|
b.current
|
|
242
|
-
]),
|
|
242
|
+
]), H = (e, n) => (R > 0 && n !== R && b.current && (e = `${`${R} ` + t.customSummary.summaryFilteredDataLabel + "- "} ${e} `), e);
|
|
243
243
|
function le(e, n) {
|
|
244
244
|
const i = n.actionButtonGroup && n.actionButtonGroup.length >= 2 && !n.edit ? n.actionButtonGroup.slice(2).map((a) => ({
|
|
245
245
|
icon: /* @__PURE__ */ o(F, { iconName: a.icon }),
|
|
@@ -255,7 +255,7 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
255
255
|
a.onClick(d);
|
|
256
256
|
}
|
|
257
257
|
})) : [], l = [];
|
|
258
|
-
return !n.edit &&
|
|
258
|
+
return !n.edit && A.forEach((a, r) => {
|
|
259
259
|
const d = typeof a.visible == "function" ? a.visible({ column: e.column, component: e.component, row: e.row }) : a.visible;
|
|
260
260
|
l.push(
|
|
261
261
|
/* @__PURE__ */ o(
|
|
@@ -282,7 +282,7 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
282
282
|
`action-button-${r}`
|
|
283
283
|
)
|
|
284
284
|
);
|
|
285
|
-
}), n.edit &&
|
|
285
|
+
}), n.edit && A.forEach((a, r) => {
|
|
286
286
|
const d = typeof a.visible == "function" ? a.visible({ column: e.column, component: e.component, row: e.row }) : a.visible;
|
|
287
287
|
l.push(
|
|
288
288
|
/* @__PURE__ */ o(
|
|
@@ -324,44 +324,44 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
324
324
|
), /* @__PURE__ */ o(q.Fragment, { children: /* @__PURE__ */ o("div", { className: "flex flex-row gap-4 justify-center items-center", children: l }) });
|
|
325
325
|
}
|
|
326
326
|
const re = g(() => {
|
|
327
|
-
|
|
328
|
-
}, [t.axiosRequest?.requestData,
|
|
327
|
+
U("reachedBottom");
|
|
328
|
+
}, [t.axiosRequest?.requestData, U]), j = (e) => {
|
|
329
329
|
Ie((i) => {
|
|
330
330
|
const l = i.target, a = l?.scrollTop ?? 0, r = l?.clientHeight ?? 0, d = l?.scrollHeight ?? 0, m = Math.max(a, r, d) - 1;
|
|
331
331
|
if (d <= r) return;
|
|
332
332
|
const y = Math.ceil(a + r) >= m;
|
|
333
333
|
let E = 0;
|
|
334
|
-
a < E || (E = a <= 0 ? 0 : a, y && re(),
|
|
334
|
+
a < E || (E = a <= 0 ? 0 : a, y && re(), K(a));
|
|
335
335
|
}, 200)(e);
|
|
336
336
|
};
|
|
337
337
|
f(() => {
|
|
338
338
|
const e = h.current.instance?.()?.element();
|
|
339
|
-
e.scrollTop =
|
|
339
|
+
e.scrollTop = J;
|
|
340
340
|
}, [c.length]), f(() => (document.querySelectorAll(".dx-scrollable-container").forEach((e) => {
|
|
341
|
-
e.addEventListener("scrollend",
|
|
341
|
+
e.addEventListener("scrollend", j);
|
|
342
342
|
}), () => {
|
|
343
343
|
document.querySelectorAll(".dx-scrollable-container").forEach((e) => {
|
|
344
|
-
e.removeEventListener("scrollend",
|
|
344
|
+
e.removeEventListener("scrollend", j);
|
|
345
345
|
});
|
|
346
346
|
}), [c.length]);
|
|
347
347
|
const de = (e) => {
|
|
348
348
|
const i = e.component.totalCount();
|
|
349
|
-
b.current && i > 0 ?
|
|
349
|
+
b.current && i > 0 ? k(i) : k(0), D || I(!0);
|
|
350
350
|
}, se = (e) => {
|
|
351
|
-
e !== null ? b.current = !0 : (b.current = !1,
|
|
351
|
+
e !== null ? b.current = !0 : (b.current = !1, k(0));
|
|
352
352
|
}, ce = (e) => {
|
|
353
353
|
t.toolbarButtonGroup && t.toolbarButtonGroup.length > 0 && e.toolbarOptions.items.unshift({
|
|
354
354
|
location: "before",
|
|
355
355
|
template: function(n, i, l) {
|
|
356
356
|
const a = document.createElement("div");
|
|
357
|
-
l.appendChild(a),
|
|
357
|
+
l.appendChild(a), V(a).render(/* @__PURE__ */ o(q.StrictMode, { children: t.toolbarButtonGroup && Array.isArray(t.toolbarButtonGroup) && t.toolbarButtonGroup.map((d, m) => /* @__PURE__ */ o(Xe, { style: { marginLeft: Q.margin }, type: d.type, onClick: d.onclick, children: d.label }, m)) }));
|
|
358
358
|
}
|
|
359
359
|
}), et(t.pageTitle) || e.toolbarOptions.items.unshift({
|
|
360
360
|
location: "before",
|
|
361
361
|
cssClass: "toolbarTitleItem",
|
|
362
362
|
template: function(n, i, l) {
|
|
363
363
|
const a = document.createElement("div");
|
|
364
|
-
l.appendChild(a),
|
|
364
|
+
l.appendChild(a), V(a).render(/* @__PURE__ */ o(q.StrictMode, { children: /* @__PURE__ */ o(Ze, { level: 5, style: { display: "flex", alignItems: "center", alignSelf: "stretch", margin: 0 }, children: t.pageTitle }) }));
|
|
365
365
|
}
|
|
366
366
|
});
|
|
367
367
|
}, ue = ({ data: e }) => /* @__PURE__ */ o(
|
|
@@ -474,13 +474,13 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
474
474
|
}
|
|
475
475
|
),
|
|
476
476
|
/* @__PURE__ */ o(Ce, { children: t.edit.formItems && t.edit.formItems.map((e) => /* @__PURE__ */ o(
|
|
477
|
-
|
|
477
|
+
_,
|
|
478
478
|
{
|
|
479
479
|
itemType: e.itemType,
|
|
480
480
|
colCount: e.colCount,
|
|
481
481
|
colSpan: e.colSpan,
|
|
482
482
|
children: e.items.map((n) => /* @__PURE__ */ o(
|
|
483
|
-
|
|
483
|
+
_,
|
|
484
484
|
{
|
|
485
485
|
dataField: n.dataField
|
|
486
486
|
},
|
|
@@ -512,7 +512,7 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
512
512
|
rowRenderingMode: "virtual"
|
|
513
513
|
}
|
|
514
514
|
),
|
|
515
|
-
|
|
515
|
+
W && /* @__PURE__ */ o(Re, { enabled: !0, shadingColor: "rgba(0,0,0,0.4)" }),
|
|
516
516
|
/* @__PURE__ */ o(Ee, { visible: !0 }),
|
|
517
517
|
/* @__PURE__ */ o(
|
|
518
518
|
qe,
|
|
@@ -524,7 +524,7 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
524
524
|
/* @__PURE__ */ o(G, { visible: !0 }),
|
|
525
525
|
/* @__PURE__ */ o(Pe, { mode: "multiple" }),
|
|
526
526
|
/* @__PURE__ */ o(
|
|
527
|
-
|
|
527
|
+
ke,
|
|
528
528
|
{
|
|
529
529
|
enabled: !0,
|
|
530
530
|
allowExportSelectedData: !0,
|
|
@@ -532,7 +532,7 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
532
532
|
}
|
|
533
533
|
),
|
|
534
534
|
t.selectOptions?.selectEnable && /* @__PURE__ */ o(
|
|
535
|
-
|
|
535
|
+
Te,
|
|
536
536
|
{
|
|
537
537
|
mode: t.selectOptions?.mode ?? "multiple",
|
|
538
538
|
deferred: t.selectOptions?.deferred ?? !0
|
|
@@ -568,12 +568,12 @@ const { useToken: nt } = je, at = (t) => {
|
|
|
568
568
|
/* @__PURE__ */ o(M, { name: "columnChooserButton", cssClass: "toolbarPanelItems" }),
|
|
569
569
|
/* @__PURE__ */ o(M, { name: "exportButton", cssClass: "toolbarPanelItems" })
|
|
570
570
|
] }),
|
|
571
|
-
/* @__PURE__ */ o($e, { calculateCustomSummary:
|
|
571
|
+
/* @__PURE__ */ o($e, { calculateCustomSummary: Y, children: /* @__PURE__ */ o(
|
|
572
572
|
Ne,
|
|
573
573
|
{
|
|
574
574
|
column: x.current[0].dataField,
|
|
575
575
|
summaryType: "custom",
|
|
576
|
-
displayFormat:
|
|
576
|
+
displayFormat: Y()
|
|
577
577
|
}
|
|
578
578
|
) }),
|
|
579
579
|
/* @__PURE__ */ o(
|