@perses-dev/table-plugin 0.13.0 → 0.14.0-beta.1

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.
Files changed (211) hide show
  1. package/__mf/js/{Table.73b9cec1.js → Table.646f97de.js} +3 -3
  2. package/__mf/js/async/11.976870d0.js +7 -0
  3. package/__mf/js/async/11.976870d0.js.LICENSE.txt +102 -0
  4. package/__mf/js/async/121.b3a4c6cf.js +2 -0
  5. package/__mf/js/async/153.fa68a9e4.js +1 -0
  6. package/__mf/js/async/186.ab1e0cb3.js +2 -0
  7. package/__mf/js/async/192.942516a2.js +1 -0
  8. package/__mf/js/async/2.6b27d33f.js +1 -0
  9. package/__mf/js/async/235.c5bac291.js +1 -0
  10. package/__mf/js/async/274.f7dabfa6.js +2 -0
  11. package/__mf/js/async/321.96f362a6.js +1 -0
  12. package/__mf/js/async/35.ba7c1b06.js +1 -0
  13. package/__mf/js/async/356.d7fe5d24.js +1 -0
  14. package/__mf/js/async/392.e853a818.js +2 -0
  15. package/__mf/js/async/413.d44db4b1.js +1 -0
  16. package/__mf/js/async/465.8425c17a.js +1 -0
  17. package/__mf/js/async/470.21434f20.js +2 -0
  18. package/__mf/js/async/522.d6a7c203.js +22 -0
  19. package/__mf/js/async/534.aff242e9.js +1 -0
  20. package/__mf/js/async/54.e77ec040.js +1 -0
  21. package/__mf/js/async/587.0ff26337.js +1 -0
  22. package/__mf/js/async/616.4e891cf9.js +1 -0
  23. package/__mf/js/async/663.b3778d4c.js +1 -0
  24. package/__mf/js/async/700.ccacc909.js +3 -0
  25. package/__mf/js/async/{868.507e984c.js → 741.7feaa0ba.js} +6 -6
  26. package/__mf/js/async/862.4c658639.js +2 -0
  27. package/__mf/js/async/865.b9eb3de4.js +1 -0
  28. package/__mf/js/async/923.87e55609.js +1 -0
  29. package/__mf/js/async/941.08c16cb2.js +2 -0
  30. package/__mf/js/async/968.b7fe9818.js +1 -0
  31. package/__mf/js/async/985.6129a36c.js +37 -0
  32. package/__mf/js/async/__federation_expose_Table.f8d0feb7.js +1 -0
  33. package/__mf/js/async/lib-router.020a2a16.js +2 -0
  34. package/__mf/js/{main.7b15c841.js → main.276cd542.js} +2 -2
  35. package/lib/Table.d.ts +3 -3
  36. package/lib/Table.d.ts.map +1 -1
  37. package/lib/Table.js +4 -4
  38. package/lib/Table.js.map +1 -1
  39. package/lib/TableExportAction.d.ts +3 -3
  40. package/lib/TableExportAction.d.ts.map +1 -1
  41. package/lib/TableExportAction.js +6 -6
  42. package/lib/TableExportAction.js.map +1 -1
  43. package/lib/bootstrap.js +2 -2
  44. package/lib/components/CellsEditor/CellsEditor.d.ts +2 -2
  45. package/lib/components/CellsEditor/CellsEditor.d.ts.map +1 -1
  46. package/lib/components/CellsEditor/CellsEditor.js +1 -1
  47. package/lib/components/CellsEditor/CellsEditor.js.map +1 -1
  48. package/lib/components/CellsEditor/index.js +1 -1
  49. package/lib/components/CellsEditor/index.js.map +1 -1
  50. package/lib/components/ColumnsEditor/ColumnEditor.d.ts +5 -4
  51. package/lib/components/ColumnsEditor/ColumnEditor.d.ts.map +1 -1
  52. package/lib/components/ColumnsEditor/ColumnEditor.js +29 -15
  53. package/lib/components/ColumnsEditor/ColumnEditor.js.map +1 -1
  54. package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts +3 -3
  55. package/lib/components/ColumnsEditor/ColumnEditorContainer.d.ts.map +1 -1
  56. package/lib/components/ColumnsEditor/ColumnEditorContainer.js +11 -10
  57. package/lib/components/ColumnsEditor/ColumnEditorContainer.js.map +1 -1
  58. package/lib/components/ColumnsEditor/ColumnsEditor.d.ts +4 -3
  59. package/lib/components/ColumnsEditor/ColumnsEditor.d.ts.map +1 -1
  60. package/lib/components/ColumnsEditor/ColumnsEditor.js +7 -6
  61. package/lib/components/ColumnsEditor/ColumnsEditor.js.map +1 -1
  62. package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts +2 -2
  63. package/lib/components/ColumnsEditor/DataLinkEditorDialog.d.ts.map +1 -1
  64. package/lib/components/ColumnsEditor/DataLinkEditorDialog.js +4 -4
  65. package/lib/components/ColumnsEditor/DataLinkEditorDialog.js.map +1 -1
  66. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts +2 -2
  67. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.d.ts.map +1 -1
  68. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +4 -4
  69. package/lib/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js.map +1 -1
  70. package/lib/components/ColumnsEditor/index.js +3 -3
  71. package/lib/components/ColumnsEditor/index.js.map +1 -1
  72. package/lib/components/ConditionalPanel.d.ts +3 -3
  73. package/lib/components/ConditionalPanel.d.ts.map +1 -1
  74. package/lib/components/ConditionalPanel.js +7 -7
  75. package/lib/components/ConditionalPanel.js.map +1 -1
  76. package/lib/components/EmbeddedPanel.d.ts +3 -3
  77. package/lib/components/EmbeddedPanel.d.ts.map +1 -1
  78. package/lib/components/EmbeddedPanel.js +4 -4
  79. package/lib/components/EmbeddedPanel.js.map +1 -1
  80. package/lib/components/TableCellsEditor.d.ts +3 -3
  81. package/lib/components/TableCellsEditor.d.ts.map +1 -1
  82. package/lib/components/TableCellsEditor.js +1 -1
  83. package/lib/components/TableCellsEditor.js.map +1 -1
  84. package/lib/components/TableColumnsEditor.d.ts +3 -3
  85. package/lib/components/TableColumnsEditor.d.ts.map +1 -1
  86. package/lib/components/TableColumnsEditor.js +3 -2
  87. package/lib/components/TableColumnsEditor.js.map +1 -1
  88. package/lib/components/TableItemSelectionActionsEditor.d.ts +2 -2
  89. package/lib/components/TableItemSelectionActionsEditor.d.ts.map +1 -1
  90. package/lib/components/TableItemSelectionActionsEditor.js +2 -2
  91. package/lib/components/TableItemSelectionActionsEditor.js.map +1 -1
  92. package/lib/components/TablePanel.d.ts +4 -4
  93. package/lib/components/TablePanel.d.ts.map +1 -1
  94. package/lib/components/TablePanel.js +196 -99
  95. package/lib/components/TablePanel.js.map +1 -1
  96. package/lib/components/TableSettingsEditor.d.ts +2 -2
  97. package/lib/components/TableSettingsEditor.d.ts.map +1 -1
  98. package/lib/components/TableSettingsEditor.js +16 -2
  99. package/lib/components/TableSettingsEditor.js.map +1 -1
  100. package/lib/components/TableTransformsEditor.d.ts +2 -2
  101. package/lib/components/TableTransformsEditor.d.ts.map +1 -1
  102. package/lib/components/TableTransformsEditor.js +2 -2
  103. package/lib/components/TableTransformsEditor.js.map +1 -1
  104. package/lib/components/index.js +9 -9
  105. package/lib/components/index.js.map +1 -1
  106. package/lib/getPluginModule.d.ts +1 -1
  107. package/lib/getPluginModule.d.ts.map +1 -1
  108. package/lib/getPluginModule.js +3 -1
  109. package/lib/getPluginModule.js.map +1 -1
  110. package/lib/index-federation.js +1 -1
  111. package/lib/index.js +4 -4
  112. package/lib/index.js.map +1 -1
  113. package/lib/models/index.js +2 -2
  114. package/lib/models/index.js.map +1 -1
  115. package/lib/models/model.d.ts +1 -1
  116. package/lib/models/model.d.ts.map +1 -1
  117. package/lib/models/model.js.map +1 -1
  118. package/lib/models/table-model.d.ts +4 -3
  119. package/lib/models/table-model.d.ts.map +1 -1
  120. package/lib/models/table-model.js +2 -2
  121. package/lib/models/table-model.js.map +1 -1
  122. package/lib/setup-tests.d.ts +1 -1
  123. package/lib/setup-tests.d.ts.map +1 -1
  124. package/lib/setup-tests.js +8 -2
  125. package/lib/setup-tests.js.map +1 -1
  126. package/lib/table-data-utils.d.ts +3 -3
  127. package/lib/table-data-utils.d.ts.map +1 -1
  128. package/lib/table-data-utils.js.map +1 -1
  129. package/lib/test/mock-query-results.d.ts +1 -1
  130. package/lib/test/mock-query-results.d.ts.map +1 -1
  131. package/lib/test/mock-query-results.js.map +1 -1
  132. package/mf-manifest.json +42 -84
  133. package/mf-stats.json +46 -93
  134. package/package.json +11 -11
  135. package/__mf/js/async/1432.4e515509.js +0 -1
  136. package/__mf/js/async/1589.124ce93d.js +0 -2
  137. package/__mf/js/async/1589.124ce93d.js.LICENSE.txt +0 -37
  138. package/__mf/js/async/1616.4828085d.js +0 -1
  139. package/__mf/js/async/2043.1f09864b.js +0 -2
  140. package/__mf/js/async/2043.1f09864b.js.LICENSE.txt +0 -24
  141. package/__mf/js/async/2082.231e8397.js +0 -1
  142. package/__mf/js/async/2842.a52597e6.js +0 -1
  143. package/__mf/js/async/392.b6035b41.js +0 -2
  144. package/__mf/js/async/3981.52e94742.js +0 -3
  145. package/__mf/js/async/4014.cf88a118.js +0 -7
  146. package/__mf/js/async/4014.cf88a118.js.LICENSE.txt +0 -39
  147. package/__mf/js/async/4121.e7df36d6.js +0 -2
  148. package/__mf/js/async/5002.3eb39a8c.js +0 -1
  149. package/__mf/js/async/5021.c663603d.js +0 -1
  150. package/__mf/js/async/5071.839a8f1a.js +0 -1
  151. package/__mf/js/async/5481.6496fac9.js +0 -2
  152. package/__mf/js/async/5587.a8a428db.js +0 -1
  153. package/__mf/js/async/6274.8edae86d.js +0 -2
  154. package/__mf/js/async/629.8cff215d.js +0 -1
  155. package/__mf/js/async/6811.9d4b123a.js +0 -38
  156. package/__mf/js/async/7177.e0e5ba2f.js +0 -1
  157. package/__mf/js/async/7192.692181c8.js +0 -1
  158. package/__mf/js/async/7413.c9310b8a.js +0 -1
  159. package/__mf/js/async/7968.3a9a982e.js +0 -1
  160. package/__mf/js/async/7978.116e4d81.js +0 -1
  161. package/__mf/js/async/7984.a8edc213.js +0 -22
  162. package/__mf/js/async/8356.152d5686.js +0 -1
  163. package/__mf/js/async/8470.b9762117.js +0 -2
  164. package/__mf/js/async/873.264fedc9.js +0 -1
  165. package/__mf/js/async/9051.c4deebd7.js +0 -1
  166. package/__mf/js/async/9235.c67cdb1d.js +0 -1
  167. package/__mf/js/async/941.cc458a98.js +0 -2
  168. package/__mf/js/async/9588.d23e2ed3.js +0 -1
  169. package/__mf/js/async/9701.9c4cea02.js +0 -1
  170. package/__mf/js/async/__federation_expose_Table.5d0cfb46.js +0 -1
  171. package/__mf/js/async/lib-router.3493bbf9.js +0 -2
  172. package/lib/cjs/Table.js +0 -62
  173. package/lib/cjs/TableExportAction.js +0 -180
  174. package/lib/cjs/bootstrap.js +0 -26
  175. package/lib/cjs/components/CellsEditor/CellsEditor.js +0 -30
  176. package/lib/cjs/components/CellsEditor/index.js +0 -30
  177. package/lib/cjs/components/ColumnsEditor/ColumnEditor.js +0 -289
  178. package/lib/cjs/components/ColumnsEditor/ColumnEditorContainer.js +0 -152
  179. package/lib/cjs/components/ColumnsEditor/ColumnsEditor.js +0 -108
  180. package/lib/cjs/components/ColumnsEditor/DataLinkEditorDialog.js +0 -139
  181. package/lib/cjs/components/ColumnsEditor/EmbeddedPanelOptionsEditor.js +0 -124
  182. package/lib/cjs/components/ColumnsEditor/index.js +0 -32
  183. package/lib/cjs/components/ConditionalPanel.js +0 -367
  184. package/lib/cjs/components/EmbeddedPanel.js +0 -52
  185. package/lib/cjs/components/TableCellsEditor.js +0 -36
  186. package/lib/cjs/components/TableColumnsEditor.js +0 -36
  187. package/lib/cjs/components/TableItemSelectionActionsEditor.js +0 -44
  188. package/lib/cjs/components/TablePanel.js +0 -845
  189. package/lib/cjs/components/TableSettingsEditor.js +0 -144
  190. package/lib/cjs/components/TableTransformsEditor.js +0 -36
  191. package/lib/cjs/components/index.js +0 -38
  192. package/lib/cjs/env.d.js +0 -14
  193. package/lib/cjs/getPluginModule.js +0 -39
  194. package/lib/cjs/index-federation.js +0 -55
  195. package/lib/cjs/index.js +0 -39
  196. package/lib/cjs/models/index.js +0 -31
  197. package/lib/cjs/models/model.js +0 -16
  198. package/lib/cjs/models/table-model.js +0 -278
  199. package/lib/cjs/setup-tests.js +0 -19
  200. package/lib/cjs/table-data-utils.js +0 -84
  201. package/lib/cjs/test/mock-query-results.js +0 -524
  202. /package/__mf/css/async/{4014.85c2cbf6.css → 11.85c2cbf6.css} +0 -0
  203. /package/__mf/js/async/{4121.e7df36d6.js.LICENSE.txt → 121.b3a4c6cf.js.LICENSE.txt} +0 -0
  204. /package/__mf/js/async/{6274.8edae86d.js.LICENSE.txt → 274.f7dabfa6.js.LICENSE.txt} +0 -0
  205. /package/__mf/js/async/{392.b6035b41.js.LICENSE.txt → 392.e853a818.js.LICENSE.txt} +0 -0
  206. /package/__mf/js/async/{8470.b9762117.js.LICENSE.txt → 470.21434f20.js.LICENSE.txt} +0 -0
  207. /package/__mf/js/async/{7984.a8edc213.js.LICENSE.txt → 522.d6a7c203.js.LICENSE.txt} +0 -0
  208. /package/__mf/js/async/{868.507e984c.js.LICENSE.txt → 741.7feaa0ba.js.LICENSE.txt} +0 -0
  209. /package/__mf/js/async/{5481.6496fac9.js.LICENSE.txt → 862.4c658639.js.LICENSE.txt} +0 -0
  210. /package/__mf/js/async/{941.cc458a98.js.LICENSE.txt → 941.08c16cb2.js.LICENSE.txt} +0 -0
  211. /package/__mf/js/async/{lib-router.3493bbf9.js.LICENSE.txt → lib-router.020a2a16.js.LICENSE.txt} +0 -0
@@ -11,10 +11,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { LinkEditorForm } from '@perses-dev/components';
15
- import { IconButton, Stack, Typography } from '@mui/material';
16
- import PlusIcon from 'mdi-material-ui/Plus';
17
- import MinusIcon from 'mdi-material-ui/Minus';
14
+ import { IconButton, Stack, Typography } from "@mui/material";
15
+ import { LinkEditorForm } from "@perses-dev/components";
16
+ import MinusIcon from "mdi-material-ui/Minus";
17
+ import PlusIcon from "mdi-material-ui/Plus";
18
18
  export const DataLinkEditor = (props)=>{
19
19
  const { onChange, column, column: { dataLink } } = props;
20
20
  if (!dataLink) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/ColumnsEditor/DataLinkEditorDialog.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { LinkEditorForm } from '@perses-dev/components';\nimport { ReactElement } from 'react';\nimport { IconButton, Stack, Typography } from '@mui/material';\nimport PlusIcon from 'mdi-material-ui/Plus';\nimport MinusIcon from 'mdi-material-ui/Minus';\nimport { ColumnEditorProps } from './ColumnEditor';\n\nexport type Props = Pick<ColumnEditorProps, 'onChange' | 'column'>;\n\nexport const DataLinkEditor = (props: Props): ReactElement => {\n const {\n onChange,\n column,\n column: { dataLink },\n } = props;\n\n if (!dataLink) {\n return (\n <Stack sx={{ width: '100%', alignItems: 'center' }} direction=\"row\">\n <Typography flex={1} variant=\"subtitle1\" mb={2} fontStyle=\"italic\">\n No link defined\n </Typography>\n <IconButton\n style={{ width: 'fit-content', height: 'fit-content' }}\n onClick={() => onChange({ ...column, dataLink: { url: '', openNewTab: true, title: '' } })}\n >\n <PlusIcon />\n </IconButton>\n </Stack>\n );\n }\n\n const { url, openNewTab, title } = dataLink;\n\n return (\n <Stack sx={{ width: '100%', alignItems: 'center' }} direction=\"row\">\n <LinkEditorForm\n mode=\"inline\"\n url={{\n label: 'Url',\n onChange: (url) => {\n onChange({ ...column, dataLink: { ...dataLink, url } });\n },\n value: url,\n placeholder: 'URL',\n error: { hasError: false, helperText: '' },\n }}\n name={{\n label: 'Name',\n onChange: (title) => {\n onChange({ ...column, dataLink: { ...dataLink, title } });\n },\n value: title ?? '',\n placeholder: 'Name',\n }}\n newTabOpen={{\n label: 'Open in new tab',\n onChange: (openNewTab) => {\n onChange({ ...column, dataLink: { ...dataLink, openNewTab } });\n },\n value: openNewTab,\n }}\n />\n <IconButton\n style={{ width: 'fit-content', height: 'fit-content' }}\n onClick={() => {\n onChange({ ...column, dataLink: undefined });\n }}\n >\n <MinusIcon />\n </IconButton>\n </Stack>\n );\n};\n"],"names":["LinkEditorForm","IconButton","Stack","Typography","PlusIcon","MinusIcon","DataLinkEditor","props","onChange","column","dataLink","sx","width","alignItems","direction","flex","variant","mb","fontStyle","style","height","onClick","url","openNewTab","title","mode","label","value","placeholder","error","hasError","helperText","name","newTabOpen","undefined"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,cAAc,QAAQ,yBAAyB;AAExD,SAASC,UAAU,EAAEC,KAAK,EAAEC,UAAU,QAAQ,gBAAgB;AAC9D,OAAOC,cAAc,uBAAuB;AAC5C,OAAOC,eAAe,wBAAwB;AAK9C,OAAO,MAAMC,iBAAiB,CAACC;IAC7B,MAAM,EACJC,QAAQ,EACRC,MAAM,EACNA,QAAQ,EAAEC,QAAQ,EAAE,EACrB,GAAGH;IAEJ,IAAI,CAACG,UAAU;QACb,qBACE,MAACR;YAAMS,IAAI;gBAAEC,OAAO;gBAAQC,YAAY;YAAS;YAAGC,WAAU;;8BAC5D,KAACX;oBAAWY,MAAM;oBAAGC,SAAQ;oBAAYC,IAAI;oBAAGC,WAAU;8BAAS;;8BAGnE,KAACjB;oBACCkB,OAAO;wBAAEP,OAAO;wBAAeQ,QAAQ;oBAAc;oBACrDC,SAAS,IAAMb,SAAS;4BAAE,GAAGC,MAAM;4BAAEC,UAAU;gCAAEY,KAAK;gCAAIC,YAAY;gCAAMC,OAAO;4BAAG;wBAAE;8BAExF,cAAA,KAACpB;;;;IAIT;IAEA,MAAM,EAAEkB,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAE,GAAGd;IAEnC,qBACE,MAACR;QAAMS,IAAI;YAAEC,OAAO;YAAQC,YAAY;QAAS;QAAGC,WAAU;;0BAC5D,KAACd;gBACCyB,MAAK;gBACLH,KAAK;oBACHI,OAAO;oBACPlB,UAAU,CAACc;wBACTd,SAAS;4BAAE,GAAGC,MAAM;4BAAEC,UAAU;gCAAE,GAAGA,QAAQ;gCAAEY;4BAAI;wBAAE;oBACvD;oBACAK,OAAOL;oBACPM,aAAa;oBACbC,OAAO;wBAAEC,UAAU;wBAAOC,YAAY;oBAAG;gBAC3C;gBACAC,MAAM;oBACJN,OAAO;oBACPlB,UAAU,CAACgB;wBACThB,SAAS;4BAAE,GAAGC,MAAM;4BAAEC,UAAU;gCAAE,GAAGA,QAAQ;gCAAEc;4BAAM;wBAAE;oBACzD;oBACAG,OAAOH,SAAS;oBAChBI,aAAa;gBACf;gBACAK,YAAY;oBACVP,OAAO;oBACPlB,UAAU,CAACe;wBACTf,SAAS;4BAAE,GAAGC,MAAM;4BAAEC,UAAU;gCAAE,GAAGA,QAAQ;gCAAEa;4BAAW;wBAAE;oBAC9D;oBACAI,OAAOJ;gBACT;;0BAEF,KAACtB;gBACCkB,OAAO;oBAAEP,OAAO;oBAAeQ,QAAQ;gBAAc;gBACrDC,SAAS;oBACPb,SAAS;wBAAE,GAAGC,MAAM;wBAAEC,UAAUwB;oBAAU;gBAC5C;0BAEA,cAAA,KAAC7B;;;;AAIT,EAAE"}
1
+ {"version":3,"sources":["../../../../src/components/ColumnsEditor/DataLinkEditorDialog.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { IconButton, Stack, Typography } from '@mui/material';\nimport { LinkEditorForm } from '@perses-dev/components';\nimport MinusIcon from 'mdi-material-ui/Minus';\nimport PlusIcon from 'mdi-material-ui/Plus';\nimport type { ReactElement } from 'react';\n\nimport type { ColumnEditorProps } from './ColumnEditor';\n\nexport type Props = Pick<ColumnEditorProps, 'onChange' | 'column'>;\n\nexport const DataLinkEditor = (props: Props): ReactElement => {\n const {\n onChange,\n column,\n column: { dataLink },\n } = props;\n\n if (!dataLink) {\n return (\n <Stack sx={{ width: '100%', alignItems: 'center' }} direction=\"row\">\n <Typography flex={1} variant=\"subtitle1\" mb={2} fontStyle=\"italic\">\n No link defined\n </Typography>\n <IconButton\n style={{ width: 'fit-content', height: 'fit-content' }}\n onClick={() => onChange({ ...column, dataLink: { url: '', openNewTab: true, title: '' } })}\n >\n <PlusIcon />\n </IconButton>\n </Stack>\n );\n }\n\n const { url, openNewTab, title } = dataLink;\n\n return (\n <Stack sx={{ width: '100%', alignItems: 'center' }} direction=\"row\">\n <LinkEditorForm\n mode=\"inline\"\n url={{\n label: 'Url',\n onChange: (url) => {\n onChange({ ...column, dataLink: { ...dataLink, url } });\n },\n value: url,\n placeholder: 'URL',\n error: { hasError: false, helperText: '' },\n }}\n name={{\n label: 'Name',\n onChange: (title) => {\n onChange({ ...column, dataLink: { ...dataLink, title } });\n },\n value: title ?? '',\n placeholder: 'Name',\n }}\n newTabOpen={{\n label: 'Open in new tab',\n onChange: (openNewTab) => {\n onChange({ ...column, dataLink: { ...dataLink, openNewTab } });\n },\n value: openNewTab,\n }}\n />\n <IconButton\n style={{ width: 'fit-content', height: 'fit-content' }}\n onClick={() => {\n onChange({ ...column, dataLink: undefined });\n }}\n >\n <MinusIcon />\n </IconButton>\n </Stack>\n );\n};\n"],"names":["IconButton","Stack","Typography","LinkEditorForm","MinusIcon","PlusIcon","DataLinkEditor","props","onChange","column","dataLink","sx","width","alignItems","direction","flex","variant","mb","fontStyle","style","height","onClick","url","openNewTab","title","mode","label","value","placeholder","error","hasError","helperText","name","newTabOpen","undefined"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AACl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AAM;oBACJN,OAAO;oBACPlB,UAAU,CAACgB;wBACThB,SAAS;4BAAE,GAAGC,MAAM;4BAAEC,UAAU;gCAAE,GAAGA,QAAQ;gCAAEc;4BAAM;wBAAE;oBACzD;oBACAG,OAAOH,SAAS;oBAChBI,aAAa;gBACf;gBACAK,YAAY;oBACVP,OAAO;oBACPlB,UAAU,CAACe;wBACTf,SAAS;4BAAE,GAAGC,MAAM;4BAAEC,UAAU;gCAAE,GAAGA,QAAQ;gCAAEa;4BAAW;wBAAE;oBAC9D;oBACAI,OAAOJ;gBACT;;0BAEF,KAACvB;gBACCmB,OAAO;oBAAEP,OAAO;oBAAeQ,QAAQ;gBAAc;gBACrDC,SAAS;oBACPb,SAAS;wBAAE,GAAGC,MAAM;wBAAEC,UAAUwB;oBAAU;gBAC5C;0BAEA,cAAA,KAAC9B;;;;AAIT,EAAE"}
@@ -1,5 +1,5 @@
1
- import { UnknownSpec } from '@perses-dev/spec';
2
- import { ReactElement } from 'react';
1
+ import type { UnknownSpec } from '@perses-dev/spec';
2
+ import type { ReactElement } from 'react';
3
3
  export interface EmbeddedPanelOptionsEditorProps {
4
4
  kind: string;
5
5
  spec: UnknownSpec;
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddedPanelOptionsEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/ColumnsEditor/EmbeddedPanelOptionsEditor.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,YAAY,EAA8B,MAAM,OAAO,CAAC;AAEjE,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CACvC;AAaD;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,+BAA+B,GAAG,YAAY,CAyElH"}
1
+ {"version":3,"file":"EmbeddedPanelOptionsEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/ColumnsEditor/EmbeddedPanelOptionsEditor.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;CACvC;AAaD;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,+BAA+B,GAAG,YAAY,CAyElH"}
@@ -11,10 +11,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  // See the License for the specific language governing permissions and
13
13
  // limitations under the License.
14
- import { CircularProgress, Stack, Typography } from '@mui/material';
15
- import { OptionsEditorTabs, usePlugin } from '@perses-dev/plugin-system';
16
- import merge from 'lodash/merge';
17
- import { useEffect, useMemo, useRef } from 'react';
14
+ import { CircularProgress, Stack, Typography } from "@mui/material";
15
+ import { OptionsEditorTabs, usePlugin } from "@perses-dev/plugin-system";
16
+ import merge from "lodash/merge";
17
+ import { useEffect, useMemo, useRef } from "react";
18
18
  function isSpecEmpty(spec) {
19
19
  if (spec === undefined || spec === null) return true;
20
20
  if (typeof spec !== 'object') return false;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/ColumnsEditor/EmbeddedPanelOptionsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { CircularProgress, Stack, Typography } from '@mui/material';\nimport { OptionsEditorTabs, PanelPlugin, usePlugin } from '@perses-dev/plugin-system';\nimport { UnknownSpec } from '@perses-dev/spec';\nimport merge from 'lodash/merge';\nimport { ReactElement, useEffect, useMemo, useRef } from 'react';\n\nexport interface EmbeddedPanelOptionsEditorProps {\n kind: string;\n spec: UnknownSpec;\n onChange: (next: UnknownSpec) => void;\n}\n\nfunction isSpecEmpty(spec: UnknownSpec | undefined): boolean {\n if (spec === undefined || spec === null) return true;\n if (typeof spec !== 'object') return false;\n return Object.keys(spec as object).length === 0;\n}\n\nfunction mergeWithPluginDefaults(plugin: PanelPlugin, spec: UnknownSpec | undefined): UnknownSpec {\n const initial = plugin.createInitialOptions() ?? {};\n return merge({}, initial, spec ?? {}) as UnknownSpec;\n}\n\n/**\n * Renders a panel plugin's settings tabs (thresholds, units, colors, …).\n * Used for embedded GaugeChart columns only; other embedded panel kinds use defaults.\n */\nexport function EmbeddedPanelOptionsEditor({ kind, spec, onChange }: EmbeddedPanelOptionsEditorProps): ReactElement {\n const { data: plugin, isLoading, isError, error } = usePlugin('Panel', kind);\n\n const panelPlugin = plugin as PanelPlugin | undefined;\n\n const mergedSpec = useMemo(() => {\n if (!panelPlugin) {\n return spec;\n }\n return mergeWithPluginDefaults(panelPlugin, spec);\n }, [panelPlugin, spec]);\n\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n\n // Persist plugin defaults when the column still has an empty spec (e.g. after switching panel kind).\n useEffect(() => {\n if (!panelPlugin || !isSpecEmpty(spec)) {\n return;\n }\n onChangeRef.current(mergeWithPluginDefaults(panelPlugin, spec));\n }, [panelPlugin, kind, spec]);\n\n if (isLoading) {\n return (\n <Stack direction=\"row\" alignItems=\"center\" spacing={1} sx={{ py: 1 }}>\n <CircularProgress size={22} />\n <Typography variant=\"body2\" color=\"text.secondary\">\n Loading panel settings…\n </Typography>\n </Stack>\n );\n }\n\n if (isError || !plugin) {\n return (\n <Typography variant=\"body2\" color=\"error\">\n {error?.message ?? 'Could not load panel plugin.'}\n </Typography>\n );\n }\n\n const loadedPlugin = plugin as PanelPlugin;\n const editorTabs = loadedPlugin.panelOptionsEditorComponents ?? [];\n\n if (editorTabs.length === 0) {\n return (\n <Typography variant=\"body2\" color=\"text.secondary\">\n This visualization has no editable settings.\n </Typography>\n );\n }\n\n return (\n <Stack spacing={2.5} sx={{ width: '100%', py: 1 }}>\n <OptionsEditorTabs\n tabs={editorTabs.map((tab) => {\n const Content = tab.content;\n return {\n label: tab.label,\n content: (\n <Content\n value={mergedSpec}\n onChange={(next) => {\n onChange(next as UnknownSpec);\n }}\n />\n ),\n };\n })}\n />\n </Stack>\n );\n}\n"],"names":["CircularProgress","Stack","Typography","OptionsEditorTabs","usePlugin","merge","useEffect","useMemo","useRef","isSpecEmpty","spec","undefined","Object","keys","length","mergeWithPluginDefaults","plugin","initial","createInitialOptions","EmbeddedPanelOptionsEditor","kind","onChange","data","isLoading","isError","error","panelPlugin","mergedSpec","onChangeRef","current","direction","alignItems","spacing","sx","py","size","variant","color","message","loadedPlugin","editorTabs","panelOptionsEditorComponents","width","tabs","map","tab","Content","content","label","value","next"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,gBAAgB,EAAEC,KAAK,EAAEC,UAAU,QAAQ,gBAAgB;AACpE,SAASC,iBAAiB,EAAeC,SAAS,QAAQ,4BAA4B;AAEtF,OAAOC,WAAW,eAAe;AACjC,SAAuBC,SAAS,EAAEC,OAAO,EAAEC,MAAM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EA,MAAMC,eAAevB;IACrB,MAAMwB,aAAaD,aAAaE,4BAA4B,IAAI,EAAE;IAElE,IAAID,WAAW1B,MAAM,KAAK,GAAG;QAC3B,qBACE,KAACZ;YAAWkC,SAAQ;YAAQC,OAAM;sBAAiB;;IAIvD;IAEA,qBACE,KAACpC;QAAM+B,SAAS;QAAKC,IAAI;YAAES,OAAO;YAAQR,IAAI;QAAE;kBAC9C,cAAA,KAAC/B;YACCwC,MAAMH,WAAWI,GAAG,CAAC,CAACC;gBACpB,MAAMC,UAAUD,IAAIE,OAAO;gBAC3B,OAAO;oBACLC,OAAOH,IAAIG,KAAK;oBAChBD,uBACE,KAACD;wBACCG,OAAOtB;wBACPN,UAAU,CAAC6B;4BACT7B,SAAS6B;wBACX;;gBAGN;YACF;;;AAIR"}
1
+ {"version":3,"sources":["../../../../src/components/ColumnsEditor/EmbeddedPanelOptionsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { CircularProgress, Stack, Typography } from '@mui/material';\nimport type { PanelPlugin } from '@perses-dev/plugin-system';\nimport { OptionsEditorTabs, usePlugin } from '@perses-dev/plugin-system';\nimport type { UnknownSpec } from '@perses-dev/spec';\nimport merge from 'lodash/merge';\nimport type { ReactElement } from 'react';\nimport { useEffect, useMemo, useRef } from 'react';\n\nexport interface EmbeddedPanelOptionsEditorProps {\n kind: string;\n spec: UnknownSpec;\n onChange: (next: UnknownSpec) => void;\n}\n\nfunction isSpecEmpty(spec: UnknownSpec | undefined): boolean {\n if (spec === undefined || spec === null) return true;\n if (typeof spec !== 'object') return false;\n return Object.keys(spec as object).length === 0;\n}\n\nfunction mergeWithPluginDefaults(plugin: PanelPlugin, spec: UnknownSpec | undefined): UnknownSpec {\n const initial = plugin.createInitialOptions() ?? {};\n return merge({}, initial, spec ?? {}) as UnknownSpec;\n}\n\n/**\n * Renders a panel plugin's settings tabs (thresholds, units, colors, …).\n * Used for embedded GaugeChart columns only; other embedded panel kinds use defaults.\n */\nexport function EmbeddedPanelOptionsEditor({ kind, spec, onChange }: EmbeddedPanelOptionsEditorProps): ReactElement {\n const { data: plugin, isLoading, isError, error } = usePlugin('Panel', kind);\n\n const panelPlugin = plugin as PanelPlugin | undefined;\n\n const mergedSpec = useMemo(() => {\n if (!panelPlugin) {\n return spec;\n }\n return mergeWithPluginDefaults(panelPlugin, spec);\n }, [panelPlugin, spec]);\n\n const onChangeRef = useRef(onChange);\n onChangeRef.current = onChange;\n\n // Persist plugin defaults when the column still has an empty spec (e.g. after switching panel kind).\n useEffect(() => {\n if (!panelPlugin || !isSpecEmpty(spec)) {\n return;\n }\n onChangeRef.current(mergeWithPluginDefaults(panelPlugin, spec));\n }, [panelPlugin, kind, spec]);\n\n if (isLoading) {\n return (\n <Stack direction=\"row\" alignItems=\"center\" spacing={1} sx={{ py: 1 }}>\n <CircularProgress size={22} />\n <Typography variant=\"body2\" color=\"text.secondary\">\n Loading panel settings…\n </Typography>\n </Stack>\n );\n }\n\n if (isError || !plugin) {\n return (\n <Typography variant=\"body2\" color=\"error\">\n {error?.message ?? 'Could not load panel plugin.'}\n </Typography>\n );\n }\n\n const loadedPlugin = plugin as PanelPlugin;\n const editorTabs = loadedPlugin.panelOptionsEditorComponents ?? [];\n\n if (editorTabs.length === 0) {\n return (\n <Typography variant=\"body2\" color=\"text.secondary\">\n This visualization has no editable settings.\n </Typography>\n );\n }\n\n return (\n <Stack spacing={2.5} sx={{ width: '100%', py: 1 }}>\n <OptionsEditorTabs\n tabs={editorTabs.map((tab) => {\n const Content = tab.content;\n return {\n label: tab.label,\n content: (\n <Content\n value={mergedSpec}\n onChange={(next) => {\n onChange(next as UnknownSpec);\n }}\n />\n ),\n };\n })}\n />\n </Stack>\n );\n}\n"],"names":["CircularProgress","Stack","Typography","OptionsEditorTabs","usePlugin","merge","useEffect","useMemo","useRef","isSpecEmpty","spec","undefined","Object","keys","length","mergeWithPluginDefaults","plugin","initial","createInitialOptions","EmbeddedPanelOptionsEditor","kind","onChange","data","isLoading","isError","error","panelPlugin","mergedSpec","onChangeRef","current","direction","alignItems","spacing","sx","py","size","variant","color","message","loadedPlugin","editorTabs","panelOptionsEditorComponents","width","tabs","map","tab","Content","content","label","value","next"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,gBAAgB,EAAEC,KAAK,EAAEC,UAAU,QAAQ,gBAAgB;AAEpE,SAASC,iBAAiB,EAAEC,SAAS,QAAQ,4BAA4B;AAEzE,OAAOC,WAAW,eAAe;AAEjC,SAASC,SAAS,EAAEC,OAAO,EAAEC,MAAM,QAAQ,QAAQ;AAQnD,SAASC,YAAYC,IAA6B;IAChD,IAAIA,SAASC,aAAaD,SAAS,MAAM,OAAO;IAChD,IAAI,OAAOA,SAAS,UAAU,OAAO;IACrC,OAAOE,OAAOC,IAAI,CAACH,MAAgBI,MAAM,KAAK;AAChD;AAEA,SAASC,wBAAwBC,MAAmB,EAAEN,IAA6B;IACjF,MAAMO,UAAUD,OAAOE,oBAAoB,MAAM,CAAC;IAClD,OAAOb,MAAM,CAAC,GAAGY,SAASP,QAAQ,CAAC;AACrC;AAEA;;;CAGC,GACD,OAAO,SAASS,2BAA2B,EAAEC,IAAI,EAAEV,IAAI,EAAEW,QAAQ,EAAmC;IAClG,MAAM,EAAEC,MAAMN,MAAM,EAAEO,SAAS,EAAEC,OAAO,EAAEC,KAAK,EAAE,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10,8 +10,8 @@
10
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
- export * from './ColumnEditor';
14
- export * from './ColumnEditorContainer';
15
- export * from './ColumnsEditor';
13
+ export * from "./ColumnEditor.js";
14
+ export * from "./ColumnEditorContainer.js";
15
+ export * from "./ColumnsEditor.js";
16
16
 
17
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/ColumnsEditor/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColumnEditor';\nexport * from './ColumnEditorContainer';\nexport * from './ColumnsEditor';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,iBAAiB;AAC/B,cAAc,0BAA0B;AACxC,cAAc,kBAAkB"}
1
+ {"version":3,"sources":["../../../../src/components/ColumnsEditor/index.ts"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nexport * from './ColumnEditor';\nexport * from './ColumnEditorContainer';\nexport * from './ColumnsEditor';\n"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,cAAc,oBAAiB;AAC/B,cAAc,6BAA0B;AACxC,cAAc,qBAAkB"}
@@ -1,6 +1,6 @@
1
- import { ReactElement } from 'react';
2
- import { Grid2Props as GridProps } from '@mui/material';
3
- import { CellSettings } from '../models';
1
+ import type { Grid2Props as GridProps } from '@mui/material';
2
+ import type { ReactElement } from 'react';
3
+ import type { CellSettings } from '../models';
4
4
  export interface ConditionalRuleProps extends Omit<GridProps, 'onChange'> {
5
5
  cell: CellSettings;
6
6
  onChange: (cell: CellSettings) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConditionalPanel.tsx"],"names":[],"mappings":"AAaA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAGL,UAAU,IAAI,SAAS,EAQxB,MAAM,eAAe,CAAC;AAIvB,OAAO,EAAE,YAAY,EAAyB,MAAM,WAAW,CAAC;AAGhE,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACvE,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,GAAG,YAAY,CAyH1G;AAGD,MAAM,WAAW,qBAAqB;IACpC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,QAAQ,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,YAAiB,EACjB,QAAQ,EACR,aAAwC,GACzC,EAAE,qBAAqB,GAAG,YAAY,CAmDtC"}
1
+ {"version":3,"file":"ConditionalPanel.d.ts","sourceRoot":"","sources":["../../../src/components/ConditionalPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,IAAI,SAAS,EAAE,MAAM,eAAe,CAAC;AAe7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAI9C,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IACvE,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,GAAG,YAAY,CAyH1G;AAGD,MAAM,WAAW,qBAAqB;IACpC,YAAY,CAAC,EAAE,YAAY,EAAE,CAAC;IAC9B,QAAQ,EAAE,CAAC,YAAY,EAAE,YAAY,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IAC7D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,YAAiB,EACjB,QAAQ,EACR,aAAwC,GACzC,EAAE,qBAAqB,GAAG,YAAY,CAmDtC"}
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  // Copyright The Perses Authors
3
2
  // Licensed under the Apache License, Version 2.0 (the \"License\");
4
3
  // you may not use this file except in compliance with the License.
@@ -11,12 +10,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
11
  // See the License for the specific language governing permissions and
13
12
  // limitations under the License.
14
- import React from 'react';
15
- import { Button, Divider, IconButton, MenuItem, Stack, TextField, Tooltip, Typography, Grid2 as Grid } from '@mui/material';
16
- import DeleteIcon from 'mdi-material-ui/DeleteOutline';
17
- import AddIcon from 'mdi-material-ui/Plus';
18
- import { OptionsColorPicker } from '@perses-dev/components';
19
- import { renderConditionEditor } from '../models';
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { Button, Divider, IconButton, MenuItem, Stack, TextField, Tooltip, Typography, Grid2 as Grid } from "@mui/material";
15
+ import { OptionsColorPicker } from "@perses-dev/components";
16
+ import DeleteIcon from "mdi-material-ui/DeleteOutline";
17
+ import AddIcon from "mdi-material-ui/Plus";
18
+ import React from "react";
19
+ import { renderConditionEditor } from "../models/index.js";
20
20
  export function ConditionalRule({ cell, onChange, onDelete, ...props }) {
21
21
  return /*#__PURE__*/ _jsxs(Grid, {
22
22
  container: true,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ConditionalPanel.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport React, { ReactElement } from 'react';\nimport {\n Button,\n Divider,\n Grid2Props as GridProps,\n IconButton,\n MenuItem,\n Stack,\n TextField,\n Tooltip,\n Typography,\n Grid2 as Grid,\n} from '@mui/material';\nimport DeleteIcon from 'mdi-material-ui/DeleteOutline';\nimport AddIcon from 'mdi-material-ui/Plus';\nimport { OptionsColorPicker } from '@perses-dev/components';\nimport { CellSettings, renderConditionEditor } from '../models';\n\n// Individual conditional formatting rule component\nexport interface ConditionalRuleProps extends Omit<GridProps, 'onChange'> {\n cell: CellSettings;\n onChange: (cell: CellSettings) => void;\n onDelete: () => void;\n}\n\nexport function ConditionalRule({ cell, onChange, onDelete, ...props }: ConditionalRuleProps): ReactElement {\n return (\n <Grid container spacing={2} {...props}>\n <Grid size={{ xs: 5 }}>\n <Stack direction=\"row\" gap={1} width=\"100%\">\n <TextField\n select\n label=\"Type\"\n value={cell.condition.kind}\n onChange={(e) => onChange({ ...cell, condition: { kind: e.target.value } } as CellSettings)}\n required\n sx={{ width: '120px' }}\n >\n <MenuItem value=\"Value\">\n <Stack>\n <Typography>Value</Typography>\n {cell.condition.kind !== 'Value' && (\n <Typography variant=\"caption\">Matches an exact text value</Typography>\n )}\n </Stack>\n </MenuItem>\n <MenuItem value=\"Range\">\n <Stack>\n <Typography>Range</Typography>\n {cell.condition.kind !== 'Range' && (\n <Typography variant=\"caption\">Matches against a numerical range</Typography>\n )}\n </Stack>\n </MenuItem>\n <MenuItem value=\"Regex\">\n <Stack>\n <Typography>Regex</Typography>\n {cell.condition.kind !== 'Regex' && (\n <Typography variant=\"caption\">Matches against a regular expression</Typography>\n )}\n </Stack>\n </MenuItem>\n <MenuItem value=\"Misc\">\n <Stack>\n <Typography>Misc</Typography>\n {cell.condition.kind !== 'Misc' && (\n <Typography variant=\"caption\">Matches against empty, null and NaN values</Typography>\n )}\n </Stack>\n </MenuItem>\n </TextField>\n {renderConditionEditor(\n cell.condition,\n (updatedCondition) => onChange({ ...cell, condition: updatedCondition }),\n 'small'\n )}\n </Stack>\n </Grid>\n <Grid size={{ xs: 4 }}>\n <Stack spacing={1}>\n <TextField\n label=\"Display text\"\n value={cell.text}\n onChange={(e) => onChange({ ...cell, text: e.target.value })}\n fullWidth\n size=\"small\"\n />\n <Stack direction=\"row\" spacing={1}>\n <TextField\n label=\"Prefix\"\n placeholder=\"$\"\n value={cell.prefix ?? ''}\n onChange={(e) => onChange({ ...cell, prefix: e.target.value })}\n size=\"small\"\n />\n <TextField\n label=\"Suffix\"\n placeholder=\"%\"\n value={cell.suffix ?? ''}\n onChange={(e) => onChange({ ...cell, suffix: e.target.value })}\n size=\"small\"\n />\n </Stack>\n </Stack>\n </Grid>\n <Grid size={{ xs: 1 }}>\n <Stack direction=\"row\" justifyContent=\"center\" gap={1}>\n {cell.textColor ? (\n <OptionsColorPicker\n label=\"Text Color\"\n color={cell.textColor ?? '#000'}\n onColorChange={(color) => onChange({ ...cell, textColor: color } as CellSettings)}\n onClear={() => onChange({ ...cell, textColor: undefined } as CellSettings)}\n />\n ) : (\n <IconButton onClick={() => onChange({ ...cell, textColor: '#000' })}>\n <AddIcon />\n </IconButton>\n )}\n </Stack>\n </Grid>\n <Grid size={{ xs: 1 }}>\n <Stack direction=\"row\" justifyContent=\"center\">\n {cell.backgroundColor ? (\n <OptionsColorPicker\n label=\"Background Color\"\n color={cell.backgroundColor ?? '#fff'}\n onColorChange={(color) => onChange({ ...cell, backgroundColor: color } as CellSettings)}\n onClear={() => onChange({ ...cell, backgroundColor: undefined } as CellSettings)}\n />\n ) : (\n <IconButton onClick={() => onChange({ ...cell, backgroundColor: '#000' })}>\n <AddIcon />\n </IconButton>\n )}\n </Stack>\n </Grid>\n <Grid size={{ xs: 1 }} textAlign=\"end\">\n <Tooltip title=\"Remove cell settings\" placement=\"top\">\n <IconButton size=\"small\" sx={{ marginLeft: 'auto' }} onClick={onDelete} key=\"delete-cell-button\">\n <DeleteIcon />\n </IconButton>\n </Tooltip>\n </Grid>\n </Grid>\n );\n}\n\n// Complete conditional formatting panel with headers and list management\nexport interface ConditionalPanelProps {\n cellSettings?: CellSettings[];\n onChange: (cellSettings: CellSettings[] | undefined) => void;\n addButtonText?: string;\n}\n\nexport function ConditionalPanel({\n cellSettings = [],\n onChange,\n addButtonText = 'Add Conditional Format',\n}: ConditionalPanelProps): ReactElement {\n const handleCellChange = (index: number, updatedCell: CellSettings): void => {\n const updatedCells = [...cellSettings];\n updatedCells[index] = updatedCell;\n onChange(updatedCells);\n };\n\n const handleCellDelete = (index: number): void => {\n const updatedCells = [...cellSettings];\n updatedCells.splice(index, 1);\n onChange(updatedCells.length > 0 ? updatedCells : undefined);\n };\n\n const handleAddCell = (): void => {\n const updatedCells = [...cellSettings];\n updatedCells.push({ condition: { kind: 'Value', spec: { value: '' } } });\n onChange(updatedCells);\n };\n\n return (\n <Stack spacing={3} sx={{ mt: 2 }}>\n <Grid container spacing={3}>\n <Grid size={{ xs: 5 }}>\n <Typography variant=\"subtitle1\">Condition</Typography>\n </Grid>\n <Grid size={{ xs: 4 }}>\n <Typography variant=\"subtitle1\">Display Text</Typography>\n </Grid>\n <Grid size={{ xs: 1 }} textAlign=\"center\">\n <Typography variant=\"subtitle1\">Color</Typography>\n </Grid>\n <Grid size={{ xs: 1 }} textAlign=\"center\">\n <Typography variant=\"subtitle1\">Background</Typography>\n </Grid>\n <Grid size={{ xs: 1 }}></Grid>\n </Grid>\n <Stack gap={1.5} divider={<Divider flexItem orientation=\"horizontal\" />}>\n {cellSettings.map((cell, i) => (\n <ConditionalRule\n key={i}\n cell={cell}\n onChange={(updatedCell: CellSettings) => handleCellChange(i, updatedCell)}\n onDelete={() => handleCellDelete(i)}\n />\n ))}\n </Stack>\n <Button variant=\"outlined\" startIcon={<AddIcon />} sx={{ marginTop: 1 }} onClick={handleAddCell}>\n {addButtonText}\n </Button>\n </Stack>\n );\n}\n"],"names":["React","Button","Divider","IconButton","MenuItem","Stack","TextField","Tooltip","Typography","Grid2","Grid","DeleteIcon","AddIcon","OptionsColorPicker","renderConditionEditor","ConditionalRule","cell","onChange","onDelete","props","container","spacing","size","xs","direction","gap","width","select","label","value","condition","kind","e","target","required","sx","variant","updatedCondition","text","fullWidth","placeholder","prefix","suffix","justifyContent","textColor","color","onColorChange","onClear","undefined","onClick","backgroundColor","textAlign","title","placement","marginLeft","ConditionalPanel","cellSettings","addButtonText","handleCellChange","index","updatedCell","updatedCells","handleCellDelete","splice","length","handleAddCell","push","spec","mt","divider","flexItem","orientation","map","i","startIcon","marginTop"],"mappings":";AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,sEAAsE;AACtE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,OAAOA,WAA6B,QAAQ;AAC5C,SACEC,MAAM,EACNC,OAAO,EAEPC,UAAU,EACVC,QAAQ,EACRC,KAAK,EACLC,SAAS,EACTC,OAAO,EACPC,UAAU,EACVC,SAASC,IAAI,QACR,gBAAgB;AACvB,OAAOC,gBAAgB,gCAAgC;AACvD,OAAOC,aAAa,uBAAuB;AAC3C,SAASC,kBAAkB,QAAQ,yBAAyB;AAC5D,SAAuBC,qBAAqB,QAAQ,YAAY;AAShE,OAAO,SAASC,gBAAgB,EAAEC,IAAI,EAAEC,QAAQ,EAAEC,QAAQ,EAAE,GAAGC,OAA6B;IAC1F,qBACE,MAACT;QAAKU,SAAS;QAACC,SAAS;QAAI,GAAGF,KAAK;;0BACnC,KAACT;gBAAKY,MAAM;oBAAEC,IAAI;gBAAE;0BAClB,cAAA,MAAClB;oBAAMmB,WAAU;oBAAMC,KAAK;oBAAGC,OAAM;;sCACnC,MAACpB;4BACCqB,MAAM;4BACNC,OAAM;4BACNC,OAAOb,KAAKc,SAAS,CAACC,IAAI;4BAC1Bd,UAAU,CAACe,IAAMf,SAAS;oCAAE,GAAGD,IAAI;oCAAEc,WAAW;wCAAEC,MAAMC,EAAEC,MAAM,CAACJ,KAAK;oCAAC;gCAAE;4BACzEK,QAAQ;4BACRC,IAAI;gCAAET,OAAO;4BAAQ;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U;kCAC/B,cAAA,KAAC3C;4BAAW4B,SAAQ;sCAAY;;;kCAElC,KAAC1B;wBAAKY,MAAM;4BAAEC,IAAI;wBAAE;;;;0BAEtB,KAAClB;gBAAMoB,KAAK;gBAAK4C,uBAAS,KAACnE;oBAAQoE,QAAQ;oBAACC,aAAY;;0BACrDf,aAAagB,GAAG,CAAC,CAACxD,MAAMyD,kBACvB,KAAC1D;wBAECC,MAAMA;wBACNC,UAAU,CAAC2C,cAA8BF,iBAAiBe,GAAGb;wBAC7D1C,UAAU,IAAM4C,iBAAiBW;uBAH5BA;;0BAOX,KAACxE;gBAAOmC,SAAQ;gBAAWsC,yBAAW,KAAC9D;gBAAYuB,IAAI;oBAAEwC,WAAW;gBAAE;gBAAG1B,SAASgB;0BAC/ER;;;;AAIT"}
1
+ {"version":3,"sources":["../../../src/components/ConditionalPanel.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { Grid2Props as GridProps } from '@mui/material';\nimport {\n Button,\n Divider,\n IconButton,\n MenuItem,\n Stack,\n TextField,\n Tooltip,\n Typography,\n Grid2 as Grid,\n} from '@mui/material';\nimport { OptionsColorPicker } from '@perses-dev/components';\nimport DeleteIcon from 'mdi-material-ui/DeleteOutline';\nimport AddIcon from 'mdi-material-ui/Plus';\nimport type { ReactElement } from 'react';\nimport React from 'react';\n\nimport type { CellSettings } from '../models';\nimport { renderConditionEditor } from '../models';\n\n// Individual conditional formatting rule component\nexport interface ConditionalRuleProps extends Omit<GridProps, 'onChange'> {\n cell: CellSettings;\n onChange: (cell: CellSettings) => void;\n onDelete: () => void;\n}\n\nexport function ConditionalRule({ cell, onChange, onDelete, ...props }: ConditionalRuleProps): ReactElement {\n return (\n <Grid container spacing={2} {...props}>\n <Grid size={{ xs: 5 }}>\n <Stack direction=\"row\" gap={1} width=\"100%\">\n <TextField\n select\n label=\"Type\"\n value={cell.condition.kind}\n onChange={(e) => onChange({ ...cell, condition: { kind: e.target.value } } as CellSettings)}\n required\n sx={{ width: '120px' }}\n >\n <MenuItem value=\"Value\">\n <Stack>\n <Typography>Value</Typography>\n {cell.condition.kind !== 'Value' && (\n <Typography variant=\"caption\">Matches an exact text value</Typography>\n )}\n </Stack>\n </MenuItem>\n <MenuItem value=\"Range\">\n <Stack>\n <Typography>Range</Typography>\n {cell.condition.kind !== 'Range' && (\n <Typography variant=\"caption\">Matches against a numerical range</Typography>\n )}\n </Stack>\n </MenuItem>\n <MenuItem value=\"Regex\">\n <Stack>\n <Typography>Regex</Typography>\n {cell.condition.kind !== 'Regex' && (\n <Typography variant=\"caption\">Matches against a regular expression</Typography>\n )}\n </Stack>\n </MenuItem>\n <MenuItem value=\"Misc\">\n <Stack>\n <Typography>Misc</Typography>\n {cell.condition.kind !== 'Misc' && (\n <Typography variant=\"caption\">Matches against empty, null and NaN values</Typography>\n )}\n </Stack>\n </MenuItem>\n </TextField>\n {renderConditionEditor(\n cell.condition,\n (updatedCondition) => onChange({ ...cell, condition: updatedCondition }),\n 'small',\n )}\n </Stack>\n </Grid>\n <Grid size={{ xs: 4 }}>\n <Stack spacing={1}>\n <TextField\n label=\"Display text\"\n value={cell.text}\n onChange={(e) => onChange({ ...cell, text: e.target.value })}\n fullWidth\n size=\"small\"\n />\n <Stack direction=\"row\" spacing={1}>\n <TextField\n label=\"Prefix\"\n placeholder=\"$\"\n value={cell.prefix ?? ''}\n onChange={(e) => onChange({ ...cell, prefix: e.target.value })}\n size=\"small\"\n />\n <TextField\n label=\"Suffix\"\n placeholder=\"%\"\n value={cell.suffix ?? ''}\n onChange={(e) => onChange({ ...cell, suffix: e.target.value })}\n size=\"small\"\n />\n </Stack>\n </Stack>\n </Grid>\n <Grid size={{ xs: 1 }}>\n <Stack direction=\"row\" justifyContent=\"center\" gap={1}>\n {cell.textColor ? (\n <OptionsColorPicker\n label=\"Text Color\"\n color={cell.textColor ?? '#000'}\n onColorChange={(color) => onChange({ ...cell, textColor: color } as CellSettings)}\n onClear={() => onChange({ ...cell, textColor: undefined } as CellSettings)}\n />\n ) : (\n <IconButton onClick={() => onChange({ ...cell, textColor: '#000' })}>\n <AddIcon />\n </IconButton>\n )}\n </Stack>\n </Grid>\n <Grid size={{ xs: 1 }}>\n <Stack direction=\"row\" justifyContent=\"center\">\n {cell.backgroundColor ? (\n <OptionsColorPicker\n label=\"Background Color\"\n color={cell.backgroundColor ?? '#fff'}\n onColorChange={(color) => onChange({ ...cell, backgroundColor: color } as CellSettings)}\n onClear={() => onChange({ ...cell, backgroundColor: undefined } as CellSettings)}\n />\n ) : (\n <IconButton onClick={() => onChange({ ...cell, backgroundColor: '#000' })}>\n <AddIcon />\n </IconButton>\n )}\n </Stack>\n </Grid>\n <Grid size={{ xs: 1 }} textAlign=\"end\">\n <Tooltip title=\"Remove cell settings\" placement=\"top\">\n <IconButton size=\"small\" sx={{ marginLeft: 'auto' }} onClick={onDelete} key=\"delete-cell-button\">\n <DeleteIcon />\n </IconButton>\n </Tooltip>\n </Grid>\n </Grid>\n );\n}\n\n// Complete conditional formatting panel with headers and list management\nexport interface ConditionalPanelProps {\n cellSettings?: CellSettings[];\n onChange: (cellSettings: CellSettings[] | undefined) => void;\n addButtonText?: string;\n}\n\nexport function ConditionalPanel({\n cellSettings = [],\n onChange,\n addButtonText = 'Add Conditional Format',\n}: ConditionalPanelProps): ReactElement {\n const handleCellChange = (index: number, updatedCell: CellSettings): void => {\n const updatedCells = [...cellSettings];\n updatedCells[index] = updatedCell;\n onChange(updatedCells);\n };\n\n const handleCellDelete = (index: number): void => {\n const updatedCells = [...cellSettings];\n updatedCells.splice(index, 1);\n onChange(updatedCells.length > 0 ? updatedCells : undefined);\n };\n\n const handleAddCell = (): void => {\n const updatedCells = [...cellSettings];\n updatedCells.push({ condition: { kind: 'Value', spec: { value: '' } } });\n onChange(updatedCells);\n };\n\n return (\n <Stack spacing={3} sx={{ mt: 2 }}>\n <Grid container spacing={3}>\n <Grid size={{ xs: 5 }}>\n <Typography variant=\"subtitle1\">Condition</Typography>\n </Grid>\n <Grid size={{ xs: 4 }}>\n <Typography variant=\"subtitle1\">Display Text</Typography>\n </Grid>\n <Grid size={{ xs: 1 }} textAlign=\"center\">\n <Typography variant=\"subtitle1\">Color</Typography>\n </Grid>\n <Grid size={{ xs: 1 }} textAlign=\"center\">\n <Typography variant=\"subtitle1\">Background</Typography>\n </Grid>\n <Grid size={{ xs: 1 }}></Grid>\n </Grid>\n <Stack gap={1.5} divider={<Divider flexItem orientation=\"horizontal\" />}>\n {cellSettings.map((cell, i) => (\n <ConditionalRule\n key={i}\n cell={cell}\n onChange={(updatedCell: CellSettings) => handleCellChange(i, updatedCell)}\n onDelete={() => handleCellDelete(i)}\n />\n ))}\n </Stack>\n <Button variant=\"outlined\" startIcon={<AddIcon />} sx={{ marginTop: 1 }} onClick={handleAddCell}>\n {addButtonText}\n </Button>\n </Stack>\n );\n}\n"],"names":["Button","Divider","IconButton","MenuItem","Stack","TextField","Tooltip","Typography","Grid2","Grid","OptionsColorPicker","DeleteIcon","AddIcon","React","renderConditionEditor","ConditionalRule","cell","onChange","onDelete","props","container","spacing","size","xs","direction","gap","width","select","label","value","condition","kind","e","target","required","sx","variant","updatedCondition","text","fullWidth","placeholder","prefix","suffix","justifyContent","textColor","color","onColorChange","onClear","undefined","onClick","backgroundColor","textAlign","title","placement","marginLeft","ConditionalPanel","cellSettings","addButtonText","handleCellChange","index","updatedCell","updatedCells","handleCellDelete","splice","length","handleAddCell","push","spec","mt","divider","flexItem","orientation","map","i","startIcon","marginTop"],"mappings":"AAAA,+BAA+B;AAC/B,oEAAoE;AACpE,mEAAmE;AACnE,0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AAC2C,cAA8BF,iBAAiBe,GAAGb;wBAC7D1C,UAAU,IAAM4C,iBAAiBW;uBAH5BA;;0BAOX,KAACzE;gBAAOoC,SAAQ;gBAAWsC,yBAAW,KAAC9D;gBAAYuB,IAAI;oBAAEwC,WAAW;gBAAE;gBAAG1B,SAASgB;0BAC/ER;;;;AAIT"}
@@ -1,6 +1,6 @@
1
- import { PanelData } from '@perses-dev/plugin-system';
2
- import { ReactElement } from 'react';
3
- import { QueryDataType, UnknownSpec } from '@perses-dev/spec';
1
+ import type { PanelData } from '@perses-dev/plugin-system';
2
+ import type { QueryDataType, UnknownSpec } from '@perses-dev/spec';
3
+ import type { ReactElement } from 'react';
4
4
  interface EmbeddedPanelProps {
5
5
  kind: string;
6
6
  spec: UnknownSpec;
@@ -1 +1 @@
1
- {"version":3,"file":"EmbeddedPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmbeddedPanel.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAItD,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE9D,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;CAC/C;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,kBAAkB,GAAG,YAAY,CAS5F"}
1
+ {"version":3,"file":"EmbeddedPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmbeddedPanel.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAG1C,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,WAAW,CAAC;IAClB,YAAY,EAAE,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;CAC/C;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,kBAAkB,GAAG,YAAY,CAS5F"}
@@ -1,3 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
1
2
  // Copyright The Perses Authors
2
3
  // Licensed under the Apache License, Version 2.0 (the "License");
3
4
  // you may not use this file except in compliance with the License.
@@ -10,10 +11,9 @@
10
11
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
12
  // See the License for the specific language governing permissions and
12
13
  // limitations under the License.
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- import { PanelPluginLoader } from '@perses-dev/dashboards';
15
- import useResizeObserver from 'use-resize-observer';
16
- import { ErrorAlert, ErrorBoundary } from '@perses-dev/components';
14
+ import { ErrorAlert, ErrorBoundary } from "@perses-dev/components";
15
+ import { PanelPluginLoader } from "@perses-dev/dashboards";
16
+ import useResizeObserver from "use-resize-observer";
17
17
  export function EmbeddedPanel({ kind, spec, queryResults }) {
18
18
  const { ref, width = 1, height = 1 } = useResizeObserver();
19
19
  return /*#__PURE__*/ _jsx("div", {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/EmbeddedPanel.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { PanelData } from '@perses-dev/plugin-system';\nimport { PanelPluginLoader } from '@perses-dev/dashboards';\nimport useResizeObserver from 'use-resize-observer';\nimport { ErrorAlert, ErrorBoundary } from '@perses-dev/components';\nimport { ReactElement } from 'react';\nimport { QueryDataType, UnknownSpec } from '@perses-dev/spec';\n\ninterface EmbeddedPanelProps {\n kind: string;\n spec: UnknownSpec;\n queryResults: Array<PanelData<QueryDataType>>;\n}\n\nexport function EmbeddedPanel({ kind, spec, queryResults }: EmbeddedPanelProps): ReactElement {\n const { ref, width = 1, height = 1 } = useResizeObserver<HTMLDivElement>();\n return (\n <div ref={ref} style={{ height: '100%' }}>\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <PanelPluginLoader kind={kind} contentDimensions={{ width, height }} spec={spec} queryResults={queryResults} />\n </ErrorBoundary>\n </div>\n );\n}\n"],"names":["PanelPluginLoader","useResizeObserver","ErrorAlert","ErrorBoundary","EmbeddedPanel","kind","spec","queryResults","ref","width","height","div","style","FallbackComponent","contentDimensions"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,iBAAiB,QAAQ,yBAAyB;AAC3D,OAAOC,uBAAuB,sBAAsB;AACpD,SAASC,UAAU,EAAEC,aAAa,QAAQ,yBAAyB;AAUnE,OAAO,SAASC,cAAc,EAAEC,IAAI,EAAEC,IAAI,EAAEC,YAAY,EAAsB;IAC5E,MAAM,EAAEC,GAAG,EAAEC,QAAQ,CAAC,EAAEC,SAAS,CAAC,EAAE,GAAGT;IACvC,qBACE,KAACU;QAAIH,KAAKA;QAAKI,OAAO;YAAEF,QAAQ;QAAO;kBACrC,cAAA,KAACP;YAAcU,mBAAmBX;sBAChC,cAAA,KAACF;gBAAkBK,MAAMA;gBAAMS,mBAAmB;oBAAEL;oBAAOC;gBAAO;gBAAGJ,MAAMA;gBAAMC,cAAcA;;;;AAIvG"}
1
+ {"version":3,"sources":["../../../src/components/EmbeddedPanel.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ErrorAlert, ErrorBoundary } from '@perses-dev/components';\nimport { PanelPluginLoader } from '@perses-dev/dashboards';\nimport type { PanelData } from '@perses-dev/plugin-system';\nimport type { QueryDataType, UnknownSpec } from '@perses-dev/spec';\nimport type { ReactElement } from 'react';\nimport useResizeObserver from 'use-resize-observer';\n\ninterface EmbeddedPanelProps {\n kind: string;\n spec: UnknownSpec;\n queryResults: Array<PanelData<QueryDataType>>;\n}\n\nexport function EmbeddedPanel({ kind, spec, queryResults }: EmbeddedPanelProps): ReactElement {\n const { ref, width = 1, height = 1 } = useResizeObserver<HTMLDivElement>();\n return (\n <div ref={ref} style={{ height: '100%' }}>\n <ErrorBoundary FallbackComponent={ErrorAlert}>\n <PanelPluginLoader kind={kind} contentDimensions={{ width, height }} spec={spec} queryResults={queryResults} />\n </ErrorBoundary>\n </div>\n );\n}\n"],"names":["ErrorAlert","ErrorBoundary","PanelPluginLoader","useResizeObserver","EmbeddedPanel","kind","spec","queryResults","ref","width","height","div","style","FallbackComponent","contentDimensions"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,UAAU,EAAEC,aAAa,QAAQ,yBAAyB;AACnE,SAASC,iBAAiB,QAAQ,yBAAyB;AAI3D,OAAOC,uBAAuB,sBAAsB;AAQpD,OAAO,SAASC,cAAc,EAAEC,IAAI,EAAEC,IAAI,EAAEC,YAAY,EAAsB;IAC5E,MAAM,EAAEC,GAAG,EAAEC,QAAQ,CAAC,EAAEC,SAAS,CAAC,EAAE,GAAGP;IACvC,qBACE,KAACQ;QAAIH,KAAKA;QAAKI,OAAO;YAAEF,QAAQ;QAAO;kBACrC,cAAA,KAACT;YAAcY,mBAAmBb;sBAChC,cAAA,KAACE;gBAAkBG,MAAMA;gBAAMS,mBAAmB;oBAAEL;oBAAOC;gBAAO;gBAAGJ,MAAMA;gBAAMC,cAAcA;;;;AAIvG"}
@@ -1,6 +1,6 @@
1
- import { OptionsEditorProps } from '@perses-dev/plugin-system';
2
- import { ReactElement } from 'react';
3
- import { TableOptions } from '../models';
1
+ import type { OptionsEditorProps } from '@perses-dev/plugin-system';
2
+ import type { ReactElement } from 'react';
3
+ import type { TableOptions } from '../models';
4
4
  export type TableCellsEditorProps = OptionsEditorProps<TableOptions>;
5
5
  export declare function TableCellsEditor({ onChange, value }: TableCellsEditorProps): ReactElement;
6
6
  //# sourceMappingURL=TableCellsEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableCellsEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TableCellsEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAgB,YAAY,EAAE,MAAM,WAAW,CAAC;AAGvD,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAErE,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,qBAAqB,GAAG,YAAY,CAMzF"}
1
+ {"version":3,"file":"TableCellsEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TableCellsEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,WAAW,CAAC;AAG5D,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAErE,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,qBAAqB,GAAG,YAAY,CAMzF"}
@@ -11,7 +11,7 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
- import { CellsEditor } from './CellsEditor';
14
+ import { CellsEditor } from "./CellsEditor/index.js";
15
15
  export function TableCellsEditor({ onChange, value }) {
16
16
  function handleCellsChange(cells) {
17
17
  onChange({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/TableCellsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { CellSettings, TableOptions } from '../models';\nimport { CellsEditor } from './CellsEditor';\n\nexport type TableCellsEditorProps = OptionsEditorProps<TableOptions>;\n\nexport function TableCellsEditor({ onChange, value }: TableCellsEditorProps): ReactElement {\n function handleCellsChange(cells: CellSettings[]): void {\n onChange({ ...value, cellSettings: cells });\n }\n\n return <CellsEditor cellSettings={value.cellSettings ?? []} onChange={handleCellsChange} />;\n}\n"],"names":["CellsEditor","TableCellsEditor","onChange","value","handleCellsChange","cells","cellSettings"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAKjC,SAASA,WAAW,QAAQ,gBAAgB;AAI5C,OAAO,SAASC,iBAAiB,EAAEC,QAAQ,EAAEC,KAAK,EAAyB;IACzE,SAASC,kBAAkBC,KAAqB;QAC9CH,SAAS;YAAE,GAAGC,KAAK;YAAEG,cAAcD;QAAM;IAC3C;IAEA,qBAAO,KAACL;QAAYM,cAAcH,MAAMG,YAAY,IAAI,EAAE;QAAEJ,UAAUE;;AACxE"}
1
+ {"version":3,"sources":["../../../src/components/TableCellsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport type { ReactElement } from 'react';\n\nimport type { CellSettings, TableOptions } from '../models';\nimport { CellsEditor } from './CellsEditor';\n\nexport type TableCellsEditorProps = OptionsEditorProps<TableOptions>;\n\nexport function TableCellsEditor({ onChange, value }: TableCellsEditorProps): ReactElement {\n function handleCellsChange(cells: CellSettings[]): void {\n onChange({ ...value, cellSettings: cells });\n }\n\n return <CellsEditor cellSettings={value.cellSettings ?? []} onChange={handleCellsChange} />;\n}\n"],"names":["CellsEditor","TableCellsEditor","onChange","value","handleCellsChange","cells","cellSettings"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAMjC,SAASA,WAAW,QAAQ,yBAAgB;AAI5C,OAAO,SAASC,iBAAiB,EAAEC,QAAQ,EAAEC,KAAK,EAAyB;IACzE,SAASC,kBAAkBC,KAAqB;QAC9CH,SAAS;YAAE,GAAGC,KAAK;YAAEG,cAAcD;QAAM;IAC3C;IAEA,qBAAO,KAACL;QAAYM,cAAcH,MAAMG,YAAY,IAAI,EAAE;QAAEJ,UAAUE;;AACxE"}
@@ -1,6 +1,6 @@
1
- import { OptionsEditorProps } from '@perses-dev/plugin-system';
2
- import { ReactElement } from 'react';
3
- import { TableOptions } from '../models';
1
+ import type { OptionsEditorProps } from '@perses-dev/plugin-system';
2
+ import type { ReactElement } from 'react';
3
+ import type { TableOptions } from '../models';
4
4
  export type TableColumnsEditorProps = OptionsEditorProps<TableOptions>;
5
5
  export declare function TableColumnsEditor({ onChange, value }: TableColumnsEditorProps): ReactElement;
6
6
  //# sourceMappingURL=TableColumnsEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableColumnsEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TableColumnsEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAkB,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzD,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,uBAAuB,GAAG,YAAY,CAM7F"}
1
+ {"version":3,"file":"TableColumnsEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TableColumnsEditor.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,WAAW,CAAC;AAG9D,MAAM,MAAM,uBAAuB,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAEvE,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,uBAAuB,GAAG,YAAY,CAY7F"}
@@ -11,7 +11,7 @@
11
11
  // See the License for the specific language governing permissions and
12
12
  // limitations under the License.
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
- import { ColumnsEditor } from './ColumnsEditor';
14
+ import { ColumnsEditor } from "./ColumnsEditor/index.js";
15
15
  export function TableColumnsEditor({ onChange, value }) {
16
16
  function handleColumnsChange(columns) {
17
17
  onChange({
@@ -21,7 +21,8 @@ export function TableColumnsEditor({ onChange, value }) {
21
21
  }
22
22
  return /*#__PURE__*/ _jsx(ColumnsEditor, {
23
23
  columnSettings: value.columnSettings ?? [],
24
- onChange: handleColumnsChange
24
+ onChange: handleColumnsChange,
25
+ defaultEnableSorting: value.enableSorting
25
26
  });
26
27
  }
27
28
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/TableColumnsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { ColumnSettings, TableOptions } from '../models';\nimport { ColumnsEditor } from './ColumnsEditor';\n\nexport type TableColumnsEditorProps = OptionsEditorProps<TableOptions>;\n\nexport function TableColumnsEditor({ onChange, value }: TableColumnsEditorProps): ReactElement {\n function handleColumnsChange(columns: ColumnSettings[]): void {\n onChange({ ...value, columnSettings: columns });\n }\n\n return <ColumnsEditor columnSettings={value.columnSettings ?? []} onChange={handleColumnsChange} />;\n}\n"],"names":["ColumnsEditor","TableColumnsEditor","onChange","value","handleColumnsChange","columns","columnSettings"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAKjC,SAASA,aAAa,QAAQ,kBAAkB;AAIhD,OAAO,SAASC,mBAAmB,EAAEC,QAAQ,EAAEC,KAAK,EAA2B;IAC7E,SAASC,oBAAoBC,OAAyB;QACpDH,SAAS;YAAE,GAAGC,KAAK;YAAEG,gBAAgBD;QAAQ;IAC/C;IAEA,qBAAO,KAACL;QAAcM,gBAAgBH,MAAMG,cAAc,IAAI,EAAE;QAAEJ,UAAUE;;AAC9E"}
1
+ {"version":3,"sources":["../../../src/components/TableColumnsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { OptionsEditorProps } from '@perses-dev/plugin-system';\nimport type { ReactElement } from 'react';\n\nimport type { ColumnSettings, TableOptions } from '../models';\nimport { ColumnsEditor } from './ColumnsEditor';\n\nexport type TableColumnsEditorProps = OptionsEditorProps<TableOptions>;\n\nexport function TableColumnsEditor({ onChange, value }: TableColumnsEditorProps): ReactElement {\n function handleColumnsChange(columns: ColumnSettings[]): void {\n onChange({ ...value, columnSettings: columns });\n }\n\n return (\n <ColumnsEditor\n columnSettings={value.columnSettings ?? []}\n onChange={handleColumnsChange}\n defaultEnableSorting={value.enableSorting}\n />\n );\n}\n"],"names":["ColumnsEditor","TableColumnsEditor","onChange","value","handleColumnsChange","columns","columnSettings","defaultEnableSorting","enableSorting"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAMjC,SAASA,aAAa,QAAQ,2BAAkB;AAIhD,OAAO,SAASC,mBAAmB,EAAEC,QAAQ,EAAEC,KAAK,EAA2B;IAC7E,SAASC,oBAAoBC,OAAyB;QACpDH,SAAS;YAAE,GAAGC,KAAK;YAAEG,gBAAgBD;QAAQ;IAC/C;IAEA,qBACE,KAACL;QACCM,gBAAgBH,MAAMG,cAAc,IAAI,EAAE;QAC1CJ,UAAUE;QACVG,sBAAsBJ,MAAMK,aAAa;;AAG/C"}
@@ -1,4 +1,4 @@
1
- import { ReactElement } from 'react';
2
- import { TableSettingsEditorProps } from '../models';
1
+ import type { ReactElement } from 'react';
2
+ import type { TableSettingsEditorProps } from '../models';
3
3
  export declare function TableItemSelectionActionsEditor({ value, onChange }: TableSettingsEditorProps): ReactElement;
4
4
  //# sourceMappingURL=TableItemSelectionActionsEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TableItemSelectionActionsEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TableItemSelectionActionsEditor.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,wBAAgB,+BAA+B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,wBAAwB,GAAG,YAAY,CAiB3G"}
1
+ {"version":3,"file":"TableItemSelectionActionsEditor.d.ts","sourceRoot":"","sources":["../../../src/components/TableItemSelectionActionsEditor.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAE1D,wBAAgB,+BAA+B,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,wBAAwB,GAAG,YAAY,CAiB3G"}
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  // Copyright The Perses Authors
3
2
  // Licensed under the Apache License, Version 2.0 (the "License");
4
3
  // you may not use this file except in compliance with the License.
@@ -11,7 +10,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
10
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
11
  // See the License for the specific language governing permissions and
13
12
  // limitations under the License.
14
- import { ItemSelectionActionsEditor } from '@perses-dev/plugin-system';
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import { ItemSelectionActionsEditor } from "@perses-dev/plugin-system";
15
15
  export function TableItemSelectionActionsEditor({ value, onChange }) {
16
16
  function handleActionsChange(actions) {
17
17
  onChange({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/TableItemSelectionActionsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { ActionOptions, ItemSelectionActionsEditor, SelectionOptions } from '@perses-dev/plugin-system';\nimport { ReactElement } from 'react';\nimport { TableSettingsEditorProps } from '../models';\n\nexport function TableItemSelectionActionsEditor({ value, onChange }: TableSettingsEditorProps): ReactElement {\n function handleActionsChange(actions: ActionOptions | undefined): void {\n onChange({ ...value, actions: actions });\n }\n\n function handleSelectionChange(selection: SelectionOptions | undefined): void {\n onChange({ ...value, selection: selection });\n }\n\n return (\n <ItemSelectionActionsEditor\n actionOptions={value.actions}\n onChangeActions={handleActionsChange}\n selectionOptions={value.selection}\n onChangeSelection={handleSelectionChange}\n />\n );\n}\n"],"names":["ItemSelectionActionsEditor","TableItemSelectionActionsEditor","value","onChange","handleActionsChange","actions","handleSelectionChange","selection","actionOptions","onChangeActions","selectionOptions","onChangeSelection"],"mappings":";AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAAwBA,0BAA0B,QAA0B,4BAA4B;AAIxG,OAAO,SAASC,gCAAgC,EAAEC,KAAK,EAAEC,QAAQ,EAA4B;IAC3F,SAASC,oBAAoBC,OAAkC;QAC7DF,SAAS;YAAE,GAAGD,KAAK;YAAEG,SAASA;QAAQ;IACxC;IAEA,SAASC,sBAAsBC,SAAuC;QACpEJ,SAAS;YAAE,GAAGD,KAAK;YAAEK,WAAWA;QAAU;IAC5C;IAEA,qBACE,KAACP;QACCQ,eAAeN,MAAMG,OAAO;QAC5BI,iBAAiBL;QACjBM,kBAAkBR,MAAMK,SAAS;QACjCI,mBAAmBL;;AAGzB"}
1
+ {"version":3,"sources":["../../../src/components/TableItemSelectionActionsEditor.tsx"],"sourcesContent":["// Copyright The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport type { ActionOptions, SelectionOptions } from '@perses-dev/plugin-system';\nimport { ItemSelectionActionsEditor } from '@perses-dev/plugin-system';\nimport type { ReactElement } from 'react';\n\nimport type { TableSettingsEditorProps } from '../models';\n\nexport function TableItemSelectionActionsEditor({ value, onChange }: TableSettingsEditorProps): ReactElement {\n function handleActionsChange(actions: ActionOptions | undefined): void {\n onChange({ ...value, actions: actions });\n }\n\n function handleSelectionChange(selection: SelectionOptions | undefined): void {\n onChange({ ...value, selection: selection });\n }\n\n return (\n <ItemSelectionActionsEditor\n actionOptions={value.actions}\n onChangeActions={handleActionsChange}\n selectionOptions={value.selection}\n onChangeSelection={handleSelectionChange}\n />\n );\n}\n"],"names":["ItemSelectionActionsEditor","TableItemSelectionActionsEditor","value","onChange","handleActionsChange","actions","handleSelectionChange","selection","actionOptions","onChangeActions","selectionOptions","onChangeSelection"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,0BAA0B,QAAQ,4BAA4B;AAKvE,OAAO,SAASC,gCAAgC,EAAEC,KAAK,EAAEC,QAAQ,EAA4B;IAC3F,SAASC,oBAAoBC,OAAkC;QAC7DF,SAAS;YAAE,GAAGD,KAAK;YAAEG,SAASA;QAAQ;IACxC;IAEA,SAASC,sBAAsBC,SAAuC;QACpEJ,SAAS;YAAE,GAAGD,KAAK;YAAEK,WAAWA;QAAU;IAC5C;IAEA,qBACE,KAACP;QACCQ,eAAeN,MAAMG,OAAO;QAC5BI,iBAAiBL;QACjBM,kBAAkBR,MAAMK,SAAS;QACjCI,mBAAmBL;;AAGzB"}
@@ -1,7 +1,7 @@
1
- import { PanelProps } from '@perses-dev/plugin-system';
2
- import { ReactElement } from 'react';
3
- import { TimeSeriesData } from '@perses-dev/spec';
4
- import { TableOptions } from '../models';
1
+ import type { PanelProps } from '@perses-dev/plugin-system';
2
+ import type { TimeSeriesData } from '@perses-dev/spec';
3
+ import type { ReactElement } from 'react';
4
+ import type { TableOptions } from '../models';
5
5
  export declare function getTablePanelQueryOptions(spec: TableOptions): {
6
6
  mode: 'instant' | 'range';
7
7
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TablePanel.d.ts","sourceRoot":"","sources":["../../../src/components/TablePanel.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAIL,UAAU,EAIX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAqD,MAAM,OAAO,CAAC;AACxF,OAAO,EAAiB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAA+D,YAAY,EAAE,MAAM,WAAW,CAAC;AAqVtG,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAA;CAAE,CAK3F;AAED,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAElE,wBAAgB,UAAU,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,UAAU,GAAG,YAAY,GAAG,IAAI,CAgerG"}
1
+ {"version":3,"file":"TablePanel.d.ts","sourceRoot":"","sources":["../../../src/components/TablePanel.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAA4B,UAAU,EAAoB,MAAM,2BAA2B,CAAC;AAExG,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAI1C,OAAO,KAAK,EAAgC,YAAY,EAAE,MAAM,WAAW,CAAC;AAsV5E,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,YAAY,GAAG;IAAE,IAAI,EAAE,SAAS,GAAG,OAAO,CAAA;CAAE,CAK3F;AAED,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;AAElE,wBAAgB,UAAU,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,YAAY,EAAE,EAAE,UAAU,GAAG,YAAY,GAAG,IAAI,CAilBrG"}