+ {!loading &&
+ availableOptions &&
+ availableOptions.map((item, index) => (
+
updateItem(index)}
+ >
+ {item.label}
+
+ ))}
+ {loading && (
+
+
+
+
+
{OptionsListStrings.popover.getLoadingMessage()}
+
+
+ )}
+
+ {!loading && (!availableOptions || availableOptions.length === 0) && (
+
+
+
+
+
{OptionsListStrings.popover.getEmptyMessage()}
+
+
+ )}
+
+ >
+ );
+};
diff --git a/src/plugins/presentation_util/public/components/input_controls/control_types/options_list/options_list_strings.ts b/src/plugins/presentation_util/public/components/input_controls/control_types/options_list/options_list_strings.ts
new file mode 100644
index 0000000000000..2211ae14cb9bd
--- /dev/null
+++ b/src/plugins/presentation_util/public/components/input_controls/control_types/options_list/options_list_strings.ts
@@ -0,0 +1,32 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { i18n } from '@kbn/i18n';
+
+export const OptionsListStrings = {
+ summary: {
+ getSeparator: () =>
+ i18n.translate('presentationUtil.inputControls.optionsList.summary.separator', {
+ defaultMessage: ', ',
+ }),
+ getPlaceholder: () =>
+ i18n.translate('presentationUtil.inputControls.optionsList.summary.placeholder', {
+ defaultMessage: 'Select...',
+ }),
+ },
+ popover: {
+ getLoadingMessage: () =>
+ i18n.translate('presentationUtil.inputControls.optionsList.popover.loading', {
+ defaultMessage: 'Loading filters',
+ }),
+ getEmptyMessage: () =>
+ i18n.translate('presentationUtil.inputControls.optionsList.popover.empty', {
+ defaultMessage: 'No filters found',
+ }),
+ },
+};
diff --git a/src/plugins/presentation_util/public/components/input_controls/embeddable/types.ts b/src/plugins/presentation_util/public/components/input_controls/embeddable/types.ts
new file mode 100644
index 0000000000000..00be17932ba1f
--- /dev/null
+++ b/src/plugins/presentation_util/public/components/input_controls/embeddable/types.ts
@@ -0,0 +1,23 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0 and the Server Side Public License, v 1; you may not use this file except
+ * in compliance with, at your election, the Elastic License 2.0 or the Server
+ * Side Public License, v 1.
+ */
+
+import { Filter, Query, TimeRange } from '../../../../../data/public';
+import { EmbeddableInput, EmbeddableOutput, IEmbeddable } from '../../../../../embeddable/public';
+
+export type InputControlInput = EmbeddableInput & {
+ filters?: Filter[];
+ query?: Query;
+ timeRange?: TimeRange;
+ twoLineLayout?: boolean;
+};
+
+export type InputControlOutput = EmbeddableOutput & {
+ filters?: Filter[];
+};
+
+export type InputControlEmbeddable = IEmbeddable