@elastic/eui 88.3.0 → 88.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/dist/eui_theme_dark.css +0 -142
  2. package/dist/eui_theme_dark.min.css +1 -1
  3. package/dist/eui_theme_light.css +0 -142
  4. package/dist/eui_theme_light.min.css +1 -1
  5. package/es/components/basic_table/in_memory_table.js +85 -34
  6. package/es/components/card/card.js +3 -3
  7. package/es/components/combo_box/combo_box.js +16 -4
  8. package/es/components/combo_box/combo_box_input/combo_box_input.js +4 -1
  9. package/es/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
  10. package/es/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
  11. package/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +59 -15
  12. package/es/components/datagrid/controls/column_selector.js +5 -3
  13. package/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
  14. package/es/components/description_list/description_list_title.js +0 -1
  15. package/es/components/description_list/description_list_title.styles.js +1 -1
  16. package/es/components/drag_and_drop/draggable.js +18 -23
  17. package/es/components/drag_and_drop/draggable.styles.js +56 -0
  18. package/es/components/drag_and_drop/droppable.js +24 -21
  19. package/es/components/drag_and_drop/droppable.styles.js +51 -0
  20. package/es/components/search_bar/search_box.js +54 -88
  21. package/es/components/table/table_pagination/table_pagination.js +1 -0
  22. package/es/test/rtl/custom_render.js +1 -1
  23. package/eui.d.ts +480 -420
  24. package/i18ntokens.json +142 -88
  25. package/lib/components/basic_table/in_memory_table.js +85 -34
  26. package/lib/components/card/card.js +3 -3
  27. package/lib/components/combo_box/combo_box.js +16 -4
  28. package/lib/components/combo_box/combo_box_input/combo_box_input.js +4 -1
  29. package/lib/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
  30. package/lib/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
  31. package/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +59 -15
  32. package/lib/components/datagrid/controls/column_selector.js +4 -2
  33. package/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
  34. package/lib/components/description_list/description_list_title.js +0 -1
  35. package/lib/components/description_list/description_list_title.styles.js +1 -1
  36. package/lib/components/drag_and_drop/draggable.js +17 -22
  37. package/lib/components/drag_and_drop/draggable.styles.js +62 -0
  38. package/lib/components/drag_and_drop/droppable.js +26 -22
  39. package/lib/components/drag_and_drop/droppable.styles.js +57 -0
  40. package/lib/components/search_bar/search_box.js +61 -93
  41. package/lib/components/table/table_pagination/table_pagination.js +1 -0
  42. package/lib/test/rtl/custom_render.js +2 -2
  43. package/optimize/es/components/basic_table/in_memory_table.js +62 -34
  44. package/optimize/es/components/card/card.js +3 -3
  45. package/optimize/es/components/combo_box/combo_box.js +6 -4
  46. package/optimize/es/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  47. package/optimize/es/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
  48. package/optimize/es/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -12
  49. package/optimize/es/components/datagrid/controls/column_selector.js +5 -3
  50. package/optimize/es/components/datagrid/controls/column_sorting_draggable.js +4 -1
  51. package/optimize/es/components/description_list/description_list_title.js +0 -1
  52. package/optimize/es/components/description_list/description_list_title.styles.js +1 -1
  53. package/optimize/es/components/drag_and_drop/draggable.js +17 -22
  54. package/optimize/es/components/drag_and_drop/draggable.styles.js +56 -0
  55. package/optimize/es/components/drag_and_drop/droppable.js +23 -20
  56. package/optimize/es/components/drag_and_drop/droppable.styles.js +51 -0
  57. package/optimize/es/components/search_bar/search_box.js +50 -83
  58. package/optimize/es/components/table/table_pagination/table_pagination.js +1 -0
  59. package/optimize/es/test/rtl/custom_render.js +1 -1
  60. package/optimize/lib/components/basic_table/in_memory_table.js +62 -34
  61. package/optimize/lib/components/card/card.js +3 -3
  62. package/optimize/lib/components/combo_box/combo_box.js +6 -4
  63. package/optimize/lib/components/combo_box/combo_box_input/combo_box_input.js +2 -1
  64. package/optimize/lib/components/combo_box/combo_box_input/combo_box_pill.js +3 -1
  65. package/optimize/lib/components/combo_box/combo_box_options_list/combo_box_options_list.js +49 -12
  66. package/optimize/lib/components/datagrid/controls/column_selector.js +4 -2
  67. package/optimize/lib/components/datagrid/controls/column_sorting_draggable.js +4 -1
  68. package/optimize/lib/components/description_list/description_list_title.js +0 -1
  69. package/optimize/lib/components/description_list/description_list_title.styles.js +1 -1
  70. package/optimize/lib/components/drag_and_drop/draggable.js +16 -21
  71. package/optimize/lib/components/drag_and_drop/draggable.styles.js +62 -0
  72. package/optimize/lib/components/drag_and_drop/droppable.js +25 -21
  73. package/optimize/lib/components/drag_and_drop/droppable.styles.js +57 -0
  74. package/optimize/lib/components/search_bar/search_box.js +57 -89
  75. package/optimize/lib/components/table/table_pagination/table_pagination.js +1 -0
  76. package/optimize/lib/test/rtl/custom_render.js +2 -2
  77. package/package.json +4 -4
  78. package/src/components/combo_box/combo_box_input/_combo_box_pill.scss +0 -1
  79. package/src/components/index.scss +0 -1
  80. package/src/themes/amsterdam/overrides/_index.scss +0 -1
  81. package/test-env/components/basic_table/in_memory_table.js +85 -34
  82. package/test-env/components/card/card.js +3 -3
  83. package/test-env/components/combo_box/combo_box.js +16 -4
  84. package/test-env/components/combo_box/combo_box_input/combo_box_input.js +4 -1
  85. package/test-env/components/combo_box/combo_box_input/combo_box_pill.js +5 -1
  86. package/test-env/components/combo_box/combo_box_options_list/combo_box_option.js +2 -0
  87. package/test-env/components/combo_box/combo_box_options_list/combo_box_options_list.js +58 -14
  88. package/test-env/components/datagrid/controls/column_selector.js +4 -2
  89. package/test-env/components/datagrid/controls/column_sorting_draggable.js +4 -1
  90. package/test-env/components/description_list/description_list_title.js +0 -1
  91. package/test-env/components/description_list/description_list_title.styles.js +1 -1
  92. package/test-env/components/drag_and_drop/draggable.js +17 -22
  93. package/test-env/components/drag_and_drop/draggable.styles.js +62 -0
  94. package/test-env/components/drag_and_drop/droppable.js +26 -22
  95. package/test-env/components/drag_and_drop/droppable.styles.js +57 -0
  96. package/test-env/components/search_bar/search_box.js +60 -88
  97. package/test-env/components/table/table_pagination/table_pagination.js +1 -0
  98. package/test-env/test/rtl/custom_render.js +2 -2
  99. package/src/components/drag_and_drop/_draggable.scss +0 -41
  100. package/src/components/drag_and_drop/_droppable.scss +0 -40
  101. package/src/components/drag_and_drop/_index.scss +0 -3
  102. package/src/components/drag_and_drop/_variables.scss +0 -5
  103. package/src/themes/amsterdam/overrides/_description_list.scss +0 -7
package/i18ntokens.json CHANGED
@@ -815,14 +815,14 @@
815
815
  "highlighting": "string",
816
816
  "loc": {
817
817
  "start": {
818
- "line": 83,
818
+ "line": 86,
819
819
  "column": 8,
820
- "index": 2072
820
+ "index": 2289
821
821
  },
822
822
  "end": {
823
- "line": 87,
823
+ "line": 90,
824
824
  "column": 9,
825
- "index": 2239
825
+ "index": 2456
826
826
  }
827
827
  },
828
828
  "filepath": "src/components/combo_box/combo_box_input/combo_box_pill.tsx"
@@ -833,14 +833,14 @@
833
833
  "highlighting": "string",
834
834
  "loc": {
835
835
  "start": {
836
- "line": 341,
836
+ "line": 408,
837
837
  "column": 12,
838
- "index": 10114
838
+ "index": 12031
839
839
  },
840
840
  "end": {
841
- "line": 344,
841
+ "line": 411,
842
842
  "column": 14,
843
- "index": 10237
843
+ "index": 12154
844
844
  }
845
845
  },
846
846
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -851,14 +851,14 @@
851
851
  "highlighting": "string",
852
852
  "loc": {
853
853
  "start": {
854
- "line": 354,
854
+ "line": 421,
855
855
  "column": 16,
856
- "index": 10676
856
+ "index": 12593
857
857
  },
858
858
  "end": {
859
- "line": 358,
859
+ "line": 425,
860
860
  "column": 18,
861
- "index": 10907
861
+ "index": 12824
862
862
  }
863
863
  },
864
864
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -869,14 +869,14 @@
869
869
  "highlighting": "string",
870
870
  "loc": {
871
871
  "start": {
872
- "line": 373,
872
+ "line": 440,
873
873
  "column": 16,
874
- "index": 11336
874
+ "index": 13253
875
875
  },
876
876
  "end": {
877
- "line": 379,
877
+ "line": 446,
878
878
  "column": 18,
879
- "index": 11609
879
+ "index": 13526
880
880
  }
881
881
  },
882
882
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -887,14 +887,14 @@
887
887
  "highlighting": "string",
888
888
  "loc": {
889
889
  "start": {
890
- "line": 408,
890
+ "line": 475,
891
891
  "column": 20,
892
- "index": 12600
892
+ "index": 14517
893
893
  },
894
894
  "end": {
895
- "line": 414,
895
+ "line": 481,
896
896
  "column": 22,
897
- "index": 12898
897
+ "index": 14815
898
898
  }
899
899
  },
900
900
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -905,14 +905,14 @@
905
905
  "highlighting": "string",
906
906
  "loc": {
907
907
  "start": {
908
- "line": 425,
908
+ "line": 492,
909
909
  "column": 12,
910
- "index": 13102
910
+ "index": 15019
911
911
  },
912
912
  "end": {
913
- "line": 429,
913
+ "line": 496,
914
914
  "column": 14,
915
- "index": 13323
915
+ "index": 15240
916
916
  }
917
917
  },
918
918
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -923,14 +923,14 @@
923
923
  "highlighting": "string",
924
924
  "loc": {
925
925
  "start": {
926
- "line": 436,
926
+ "line": 503,
927
927
  "column": 10,
928
- "index": 13442
928
+ "index": 15359
929
929
  },
930
930
  "end": {
931
- "line": 439,
931
+ "line": 506,
932
932
  "column": 12,
933
- "index": 13582
933
+ "index": 15499
934
934
  }
935
935
  },
936
936
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -941,14 +941,14 @@
941
941
  "highlighting": "string",
942
942
  "loc": {
943
943
  "start": {
944
- "line": 445,
944
+ "line": 512,
945
945
  "column": 10,
946
- "index": 13695
946
+ "index": 15612
947
947
  },
948
948
  "end": {
949
- "line": 448,
949
+ "line": 515,
950
950
  "column": 12,
951
- "index": 13838
951
+ "index": 15755
952
952
  }
953
953
  },
954
954
  "filepath": "src/components/combo_box/combo_box_options_list/combo_box_options_list.tsx"
@@ -959,14 +959,14 @@
959
959
  "highlighting": "string",
960
960
  "loc": {
961
961
  "start": {
962
- "line": 972,
962
+ "line": 984,
963
963
  "column": 10,
964
- "index": 27948
964
+ "index": 28518
965
965
  },
966
966
  "end": {
967
- "line": 975,
967
+ "line": 987,
968
968
  "column": 11,
969
- "index": 28073
969
+ "index": 28643
970
970
  }
971
971
  },
972
972
  "filepath": "src/components/combo_box/combo_box.tsx"
@@ -1303,12 +1303,12 @@
1303
1303
  "start": {
1304
1304
  "line": 120,
1305
1305
  "column": 30,
1306
- "index": 3633
1306
+ "index": 3622
1307
1307
  },
1308
1308
  "end": {
1309
1309
  "line": 123,
1310
1310
  "column": 3,
1311
- "index": 3711
1311
+ "index": 3700
1312
1312
  }
1313
1313
  },
1314
1314
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1321,12 +1321,12 @@
1321
1321
  "start": {
1322
1322
  "line": 126,
1323
1323
  "column": 4,
1324
- "index": 3739
1324
+ "index": 3728
1325
1325
  },
1326
1326
  "end": {
1327
1327
  "line": 126,
1328
1328
  "column": 66,
1329
- "index": 3801
1329
+ "index": 3790
1330
1330
  }
1331
1331
  },
1332
1332
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1339,12 +1339,12 @@
1339
1339
  "start": {
1340
1340
  "line": 131,
1341
1341
  "column": 6,
1342
- "index": 3869
1342
+ "index": 3858
1343
1343
  },
1344
1344
  "end": {
1345
1345
  "line": 135,
1346
1346
  "column": 8,
1347
- "index": 4038
1347
+ "index": 4027
1348
1348
  }
1349
1349
  },
1350
1350
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1357,12 +1357,12 @@
1357
1357
  "start": {
1358
1358
  "line": 139,
1359
1359
  "column": 6,
1360
- "index": 4112
1360
+ "index": 4101
1361
1361
  },
1362
1362
  "end": {
1363
1363
  "line": 143,
1364
1364
  "column": 8,
1365
- "index": 4280
1365
+ "index": 4269
1366
1366
  }
1367
1367
  },
1368
1368
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1375,12 +1375,12 @@
1375
1375
  "start": {
1376
1376
  "line": 172,
1377
1377
  "column": 14,
1378
- "index": 5066
1378
+ "index": 5055
1379
1379
  },
1380
1380
  "end": {
1381
1381
  "line": 178,
1382
1382
  "column": 15,
1383
- "index": 5290
1383
+ "index": 5279
1384
1384
  }
1385
1385
  },
1386
1386
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1393,12 +1393,12 @@
1393
1393
  "start": {
1394
1394
  "line": 172,
1395
1395
  "column": 14,
1396
- "index": 5066
1396
+ "index": 5055
1397
1397
  },
1398
1398
  "end": {
1399
1399
  "line": 178,
1400
1400
  "column": 15,
1401
- "index": 5290
1401
+ "index": 5279
1402
1402
  }
1403
1403
  },
1404
1404
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1409,14 +1409,14 @@
1409
1409
  "highlighting": "string",
1410
1410
  "loc": {
1411
1411
  "start": {
1412
- "line": 294,
1412
+ "line": 297,
1413
1413
  "column": 18,
1414
- "index": 10539
1414
+ "index": 10615
1415
1415
  },
1416
1416
  "end": {
1417
- "line": 297,
1417
+ "line": 300,
1418
1418
  "column": 20,
1419
- "index": 10663
1419
+ "index": 10739
1420
1420
  }
1421
1421
  },
1422
1422
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1427,14 +1427,14 @@
1427
1427
  "highlighting": "string",
1428
1428
  "loc": {
1429
1429
  "start": {
1430
- "line": 307,
1430
+ "line": 310,
1431
1431
  "column": 18,
1432
- "index": 11023
1432
+ "index": 11099
1433
1433
  },
1434
1434
  "end": {
1435
- "line": 310,
1435
+ "line": 313,
1436
1436
  "column": 20,
1437
- "index": 11145
1437
+ "index": 11221
1438
1438
  }
1439
1439
  },
1440
1440
  "filepath": "src/components/datagrid/controls/column_selector.tsx"
@@ -1445,14 +1445,14 @@
1445
1445
  "highlighting": "string",
1446
1446
  "loc": {
1447
1447
  "start": {
1448
- "line": 22,
1448
+ "line": 24,
1449
1449
  "column": 2,
1450
- "index": 982
1450
+ "index": 1020
1451
1451
  },
1452
1452
  "end": {
1453
- "line": 22,
1453
+ "line": 24,
1454
1454
  "column": 76,
1455
- "index": 1056
1455
+ "index": 1094
1456
1456
  }
1457
1457
  },
1458
1458
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
@@ -1463,14 +1463,14 @@
1463
1463
  "highlighting": "string",
1464
1464
  "loc": {
1465
1465
  "start": {
1466
- "line": 25,
1466
+ "line": 27,
1467
1467
  "column": 2,
1468
- "index": 1100
1468
+ "index": 1138
1469
1469
  },
1470
1470
  "end": {
1471
- "line": 25,
1471
+ "line": 27,
1472
1472
  "column": 77,
1473
- "index": 1175
1473
+ "index": 1213
1474
1474
  }
1475
1475
  },
1476
1476
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
@@ -1481,14 +1481,14 @@
1481
1481
  "highlighting": "string",
1482
1482
  "loc": {
1483
1483
  "start": {
1484
- "line": 66,
1484
+ "line": 68,
1485
1485
  "column": 30,
1486
- "index": 2139
1486
+ "index": 2177
1487
1487
  },
1488
1488
  "end": {
1489
- "line": 69,
1489
+ "line": 71,
1490
1490
  "column": 3,
1491
- "index": 2225
1491
+ "index": 2263
1492
1492
  }
1493
1493
  },
1494
1494
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
@@ -1499,14 +1499,14 @@
1499
1499
  "highlighting": "string",
1500
1500
  "loc": {
1501
1501
  "start": {
1502
- "line": 87,
1502
+ "line": 89,
1503
1503
  "column": 14,
1504
- "index": 2635
1504
+ "index": 2684
1505
1505
  },
1506
1506
  "end": {
1507
- "line": 91,
1507
+ "line": 93,
1508
1508
  "column": 15,
1509
- "index": 2824
1509
+ "index": 2873
1510
1510
  }
1511
1511
  },
1512
1512
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
@@ -1517,14 +1517,14 @@
1517
1517
  "highlighting": "string",
1518
1518
  "loc": {
1519
1519
  "start": {
1520
- "line": 103,
1520
+ "line": 105,
1521
1521
  "column": 14,
1522
- "index": 3216
1522
+ "index": 3265
1523
1523
  },
1524
1524
  "end": {
1525
- "line": 107,
1525
+ "line": 109,
1526
1526
  "column": 15,
1527
- "index": 3406
1527
+ "index": 3455
1528
1528
  }
1529
1529
  },
1530
1530
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
@@ -1535,14 +1535,14 @@
1535
1535
  "highlighting": "string",
1536
1536
  "loc": {
1537
1537
  "start": {
1538
- "line": 159,
1538
+ "line": 161,
1539
1539
  "column": 14,
1540
- "index": 5311
1540
+ "index": 5360
1541
1541
  },
1542
1542
  "end": {
1543
- "line": 163,
1543
+ "line": 165,
1544
1544
  "column": 15,
1545
- "index": 5497
1545
+ "index": 5546
1546
1546
  }
1547
1547
  },
1548
1548
  "filepath": "src/components/datagrid/controls/column_sorting_draggable.tsx"
@@ -6119,6 +6119,60 @@
6119
6119
  },
6120
6120
  "filepath": "src/components/resizable_container/resizable_panel.tsx"
6121
6121
  },
6122
+ {
6123
+ "token": "euiSearchBox.placeholder",
6124
+ "defString": "Search...",
6125
+ "highlighting": "string",
6126
+ "loc": {
6127
+ "start": {
6128
+ "line": 49,
6129
+ "column": 29,
6130
+ "index": 1421
6131
+ },
6132
+ "end": {
6133
+ "line": 52,
6134
+ "column": 3,
6135
+ "index": 1484
6136
+ }
6137
+ },
6138
+ "filepath": "src/components/search_bar/search_box.tsx"
6139
+ },
6140
+ {
6141
+ "token": "euiSearchBox.incrementalAriaLabel",
6142
+ "defString": "This is a search bar. As you type, the results lower in the page will automatically filter.",
6143
+ "highlighting": "string",
6144
+ "loc": {
6145
+ "start": {
6146
+ "line": 53,
6147
+ "column": 31,
6148
+ "index": 1517
6149
+ },
6150
+ "end": {
6151
+ "line": 56,
6152
+ "column": 3,
6153
+ "index": 1671
6154
+ }
6155
+ },
6156
+ "filepath": "src/components/search_bar/search_box.tsx"
6157
+ },
6158
+ {
6159
+ "token": "euiSearchBox.ariaLabel",
6160
+ "defString": "This is a search bar. After typing your query, hit enter to filter the results lower in the page.",
6161
+ "highlighting": "string",
6162
+ "loc": {
6163
+ "start": {
6164
+ "line": 57,
6165
+ "column": 25,
6166
+ "index": 1698
6167
+ },
6168
+ "end": {
6169
+ "line": 60,
6170
+ "column": 3,
6171
+ "index": 1847
6172
+ }
6173
+ },
6174
+ "filepath": "src/components/search_bar/search_box.tsx"
6175
+ },
6122
6176
  {
6123
6177
  "token": "euiSelectableListItem.checkedOption",
6124
6178
  "defString": "Checked option.",
@@ -7007,14 +7061,14 @@
7007
7061
  "highlighting": "string",
7008
7062
  "loc": {
7009
7063
  "start": {
7010
- "line": 126,
7064
+ "line": 129,
7011
7065
  "column": 12,
7012
- "index": 3723
7066
+ "index": 3829
7013
7067
  },
7014
7068
  "end": {
7015
- "line": 129,
7069
+ "line": 132,
7016
7070
  "column": 14,
7017
- "index": 3854
7071
+ "index": 3960
7018
7072
  }
7019
7073
  },
7020
7074
  "filepath": "src/components/table/table_pagination/table_pagination.tsx"
@@ -7025,14 +7079,14 @@
7025
7079
  "highlighting": "string",
7026
7080
  "loc": {
7027
7081
  "start": {
7028
- "line": 131,
7082
+ "line": 134,
7029
7083
  "column": 12,
7030
- "index": 3883
7084
+ "index": 3989
7031
7085
  },
7032
7086
  "end": {
7033
- "line": 135,
7087
+ "line": 138,
7034
7088
  "column": 14,
7035
- "index": 4067
7089
+ "index": 4173
7036
7090
  }
7037
7091
  },
7038
7092
  "filepath": "src/components/table/table_pagination/table_pagination.tsx"
@@ -9,13 +9,15 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _basic_table = require("./basic_table");
10
10
  var _predicate = require("../../services/predicate");
11
11
  var _sort2 = require("../../services/sort");
12
- var _search_bar = require("../search_bar");
12
+ var _search_bar = require("../search_bar/search_bar");
13
+ var _search_box = require("../search_bar/search_box");
13
14
  var _spacer = require("../spacer");
14
15
  var _table_pagination = require("../table/table_pagination");
15
16
  var _component_defaults = require("../provider/component_defaults");
16
17
  var _react2 = require("@emotion/react");
17
- var _excluded = ["onChange"],
18
- _excluded2 = ["columns", "loading", "message", "error", "selection", "isSelectable", "hasActions", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
18
+ var _excluded = ["schema"],
19
+ _excluded2 = ["onChange"],
20
+ _excluded3 = ["columns", "loading", "message", "error", "selection", "isSelectable", "hasActions", "compressed", "pagination", "sorting", "itemIdToExpandedRowMap", "itemId", "rowProps", "cellProps", "tableLayout", "items", "search", "searchFormat", "onTableChange", "executeQueryOptions", "allowNeutralSort", "childrenBetween"];
19
21
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
20
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -224,6 +226,15 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
224
226
  };
225
227
  });
226
228
  });
229
+ // Alternative to onQueryChange - allows consumers to specify they want the
230
+ // search bar to ignore EQL syntax and only use the searchbar for plain text
231
+ _defineProperty(_assertThisInitialized(_this), "onPlainTextSearch", function (searchValue) {
232
+ var escapedQueryText = searchValue.replace(/["\\]/g, '\\$&');
233
+ var finalQuery = "\"".concat(escapedQueryText, "\"");
234
+ _this.setState({
235
+ query: _search_bar.EuiSearchBar.Query.parse(finalQuery)
236
+ });
237
+ });
227
238
  var columns = props.columns,
228
239
  _search = props.search,
229
240
  _pagination = props.pagination,
@@ -267,12 +278,26 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
267
278
  }, {
268
279
  key: "renderSearchBar",
269
280
  value: function renderSearchBar() {
270
- var search = this.props.search;
271
- if (search) {
281
+ var _this$props = this.props,
282
+ search = _this$props.search,
283
+ searchFormat = _this$props.searchFormat;
284
+ if (!search) return;
285
+ var searchBar;
286
+ if (searchFormat === 'text') {
287
+ var _searchBoxProps = (search === null || search === void 0 ? void 0 : search.box) || {}; // Work around | boolean type
288
+ var schema = _searchBoxProps.schema,
289
+ searchBoxProps = _objectWithoutProperties(_searchBoxProps, _excluded); // Destructure `schema` so it doesn't get rendered to DOM
290
+
291
+ searchBar = (0, _react2.jsx)(_search_box.EuiSearchBox, _extends({
292
+ query: "" // Unused, passed to satisfy Typescript
293
+ }, searchBoxProps, {
294
+ onSearch: this.onPlainTextSearch
295
+ }));
296
+ } else {
272
297
  var searchBarProps = {};
273
298
  if (isEuiSearchBarProps(search)) {
274
299
  var onChange = search.onChange,
275
- _searchBarProps = _objectWithoutProperties(search, _excluded);
300
+ _searchBarProps = _objectWithoutProperties(search, _excluded2);
276
301
  searchBarProps = _searchBarProps;
277
302
  if (searchBarProps.box && searchBarProps.box.schema === true) {
278
303
  searchBarProps.box = _objectSpread(_objectSpread({}, searchBarProps.box), {}, {
@@ -280,12 +305,13 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
280
305
  });
281
306
  }
282
307
  }
283
- return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_search_bar.EuiSearchBar, _extends({
308
+ searchBar = (0, _react2.jsx)(_search_bar.EuiSearchBar, _extends({
284
309
  onChange: this.onQueryChange
285
- }, searchBarProps)), (0, _react2.jsx)(_spacer.EuiSpacer, {
286
- size: "l"
287
- }));
310
+ }, searchBarProps));
288
311
  }
312
+ return (0, _react2.jsx)(_react.default.Fragment, null, searchBar, (0, _react2.jsx)(_spacer.EuiSpacer, {
313
+ size: "l"
314
+ }));
289
315
  }
290
316
  }, {
291
317
  key: "resolveSearchSchema",
@@ -362,29 +388,30 @@ var EuiInMemoryTable = /*#__PURE__*/function (_Component) {
362
388
  }, {
363
389
  key: "render",
364
390
  value: function render() {
365
- var _this$props = this.props,
366
- columns = _this$props.columns,
367
- loading = _this$props.loading,
368
- message = _this$props.message,
369
- error = _this$props.error,
370
- selection = _this$props.selection,
371
- isSelectable = _this$props.isSelectable,
372
- hasActions = _this$props.hasActions,
373
- compressed = _this$props.compressed,
374
- hasPagination = _this$props.pagination,
375
- hasSorting = _this$props.sorting,
376
- itemIdToExpandedRowMap = _this$props.itemIdToExpandedRowMap,
377
- itemId = _this$props.itemId,
378
- rowProps = _this$props.rowProps,
379
- cellProps = _this$props.cellProps,
380
- tableLayout = _this$props.tableLayout,
381
- _unuseditems = _this$props.items,
382
- search = _this$props.search,
383
- onTableChange = _this$props.onTableChange,
384
- executeQueryOptions = _this$props.executeQueryOptions,
385
- allowNeutralSort = _this$props.allowNeutralSort,
386
- childrenBetween = _this$props.childrenBetween,
387
- rest = _objectWithoutProperties(_this$props, _excluded2);
391
+ var _this$props2 = this.props,
392
+ columns = _this$props2.columns,
393
+ loading = _this$props2.loading,
394
+ message = _this$props2.message,
395
+ error = _this$props2.error,
396
+ selection = _this$props2.selection,
397
+ isSelectable = _this$props2.isSelectable,
398
+ hasActions = _this$props2.hasActions,
399
+ compressed = _this$props2.compressed,
400
+ hasPagination = _this$props2.pagination,
401
+ hasSorting = _this$props2.sorting,
402
+ itemIdToExpandedRowMap = _this$props2.itemIdToExpandedRowMap,
403
+ itemId = _this$props2.itemId,
404
+ rowProps = _this$props2.rowProps,
405
+ cellProps = _this$props2.cellProps,
406
+ tableLayout = _this$props2.tableLayout,
407
+ _unuseditems = _this$props2.items,
408
+ search = _this$props2.search,
409
+ searchFormat = _this$props2.searchFormat,
410
+ onTableChange = _this$props2.onTableChange,
411
+ executeQueryOptions = _this$props2.executeQueryOptions,
412
+ allowNeutralSort = _this$props2.allowNeutralSort,
413
+ childrenBetween = _this$props2.childrenBetween,
414
+ rest = _objectWithoutProperties(_this$props2, _excluded3);
388
415
  var _this$state3 = this.state,
389
416
  pageIndex = _this$state3.pageIndex,
390
417
  pageSize = _this$state3.pageSize,
@@ -508,7 +535,8 @@ exports.EuiInMemoryTable = EuiInMemoryTable;
508
535
  _defineProperty(EuiInMemoryTable, "contextType", _component_defaults.EuiComponentDefaultsContext);
509
536
  _defineProperty(EuiInMemoryTable, "defaultProps", {
510
537
  responsive: true,
511
- tableLayout: 'fixed'
538
+ tableLayout: 'fixed',
539
+ searchFormat: 'eql'
512
540
  });
513
541
  EuiInMemoryTable.propTypes = {
514
542
  className: _propTypes.default.oneOfType([_propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.string]), _propTypes.default.string]),
@@ -997,6 +1025,29 @@ EuiInMemoryTable.propTypes = {
997
1025
  "data-test-subj": _propTypes.default.string,
998
1026
  css: _propTypes.default.any
999
1027
  }).isRequired]),
1028
+ /**
1029
+ * By default, tables use `eql` format for search which allows using advanced filters.
1030
+ *
1031
+ * However, certain special characters (such as quotes, parentheses, and colons)
1032
+ * are reserved for EQL syntax and will error if used.
1033
+ * If your table does not require filter search and instead requires searching for certain
1034
+ * symbols, use a plain `text` search format instead (note that filters will be ignored
1035
+ * in this format).
1036
+ *
1037
+ * @default "eql"
1038
+ */
1039
+ /**
1040
+ * By default, tables use `eql` format for search which allows using advanced filters.
1041
+ *
1042
+ * However, certain special characters (such as quotes, parentheses, and colons)
1043
+ * are reserved for EQL syntax and will error if used.
1044
+ * If your table does not require filter search and instead requires searching for certain
1045
+ * symbols, use a plain `text` search format instead (note that filters will be ignored
1046
+ * in this format).
1047
+ *
1048
+ * @default "eql"
1049
+ */
1050
+ searchFormat: _propTypes.default.oneOf(["eql", "text"]),
1000
1051
  /**
1001
1052
  * Configures #Pagination
1002
1053
  */