diff --git a/scripts/build_component_index.py b/scripts/build_component_index.py index a288cf4a92..86dca78f03 100644 --- a/scripts/build_component_index.py +++ b/scripts/build_component_index.py @@ -65,25 +65,6 @@ def _strip_dynamic_fields(obj): return obj -def _strip_realtime_refresh_options(obj): - """Strip options from fields that have real_time_refresh=True. - - These fields populate their options dynamically at runtime via update_build_config, - so including them in the index creates unnecessary churn when external data changes - (e.g., LiteLLM model lists). - """ - if isinstance(obj, dict): - # Check if this is a field with real_time_refresh=True - if obj.get("real_time_refresh") is True and "options" in obj: - # Return a copy with options cleared - return {k: _strip_realtime_refresh_options(v) if k != "options" else [] for k, v in obj.items()} - # Recurse into all dict values - return {k: _strip_realtime_refresh_options(v) for k, v in obj.items()} - if isinstance(obj, list): - return [_strip_realtime_refresh_options(item) for item in obj] - return obj - - def _import_components() -> tuple[dict, int]: """Import all lfx components using the async import function. @@ -156,11 +137,6 @@ def build_component_index() -> dict: print("\nStripping dynamic fields from component metadata...") index = _strip_dynamic_fields(index) - # Strip options from fields with real_time_refresh=True - # These fields populate their options dynamically at runtime - print("Stripping options from real_time_refresh fields...") - index = _strip_realtime_refresh_options(index) - # Normalize the entire structure for deterministic output index = _normalize_for_determinism(index) @@ -201,7 +177,6 @@ def main(): output_path.parent.mkdir(parents=True, exist_ok=True) # Pretty-print for readable git diffs and resolvable merge conflicts - # With dynamic options stripped, the file is stable and conflicts are manageable print(f"\nWriting formatted index to {output_path}") json_bytes = orjson.dumps(index, option=orjson.OPT_SORT_KEYS | orjson.OPT_INDENT_2) output_path.write_text(json_bytes.decode("utf-8"), encoding="utf-8") diff --git a/src/lfx/src/lfx/_assets/component_index.json b/src/lfx/src/lfx/_assets/component_index.json index 6b185b936b..57cf39cb8b 100644 --- a/src/lfx/src/lfx/_assets/component_index.json +++ b/src/lfx/src/lfx/_assets/component_index.json @@ -2471,7 +2471,10 @@ "info": "The provider of the language model that the agent will use to generate responses.", "input_types": [], "name": "agent_llm", - "options": [], + "options": [ + "Anthropic", + "OpenAI" + ], "options_metadata": [ { "icon": "Anthropic" @@ -11691,7 +11694,9 @@ "external_options": {}, "info": "The model to use for chat completion", "name": "model_name", - "options": [], + "options": [ + "Select a model" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -54863,7 +54868,10 @@ "info": "The provider of the language model that the agent will use to generate responses.", "input_types": [], "name": "agent_llm", - "options": [], + "options": [ + "OpenAI", + "Custom" + ], "options_metadata": [ { "icon": "OpenAI" @@ -55774,7 +55782,13 @@ "external_options": {}, "info": "The HTTP method to use.", "name": "method", - "options": [], + "options": [ + "GET", + "POST", + "PATCH", + "PUT", + "DELETE" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -55796,7 +55810,10 @@ "dynamic": false, "info": "Enable cURL mode to populate fields from a cURL command.", "name": "mode", - "options": [], + "options": [ + "URL", + "cURL" + ], "override_skip": false, "placeholder": "", "real_time_refresh": true, @@ -57501,7 +57518,11 @@ "dynamic": false, "info": "Choose search mode: Web (DuckDuckGo), News (Google News), or RSS (Feed Reader)", "name": "search_mode", - "options": [], + "options": [ + "Web", + "News", + "RSS" + ], "override_skip": false, "placeholder": "", "real_time_refresh": true, @@ -59159,7 +59180,11 @@ "external_options": {}, "info": "The environment for the Astra DB API Endpoint.", "name": "environment", - "options": [], + "options": [ + "prod", + "test", + "dev" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -59322,7 +59347,10 @@ "external_options": {}, "info": "Determine how your content is matched: Vector finds semantic similarity, and Hybrid Search (suggested) combines both approaches with a reranker.", "name": "search_method", - "options": [], + "options": [ + "Hybrid Search", + "Vector Search" + ], "options_metadata": [ { "icon": "SearchHybrid" @@ -59894,7 +59922,11 @@ "external_options": {}, "info": "The environment for the Astra DB API Endpoint.", "name": "environment", - "options": [], + "options": [ + "prod", + "test", + "dev" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -60558,7 +60590,11 @@ "external_options": {}, "info": "The environment for the Astra DB API Endpoint.", "name": "environment", - "options": [], + "options": [ + "prod", + "test", + "dev" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -61059,7 +61095,11 @@ "external_options": {}, "info": "The environment for the Astra DB API Endpoint.", "name": "environment", - "options": [], + "options": [ + "prod", + "test", + "dev" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -61720,7 +61760,11 @@ "external_options": {}, "info": "The environment for the Astra DB API Endpoint.", "name": "environment", - "options": [], + "options": [ + "prod", + "test", + "dev" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -63845,7 +63889,10 @@ "external_options": {}, "info": "Which chunker to use.", "name": "chunker", - "options": [], + "options": [ + "HybridChunker", + "HierarchicalChunker" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -63998,7 +64045,10 @@ "external_options": {}, "info": "Which tokenizer provider.", "name": "provider", - "options": [], + "options": [ + "Hugging Face", + "OpenAI" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -64937,7 +64987,12 @@ "external_options": {}, "info": "Select the export format to convert the input.", "name": "export_format", - "options": [], + "options": [ + "Markdown", + "HTML", + "Plaintext", + "DocTags" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -65703,7 +65758,10 @@ "external_options": {}, "info": "Authentication method: 'basic' for username/password authentication, or 'jwt' for JSON Web Token (Bearer) authentication.", "name": "auth_mode", - "options": [], + "options": [ + "basic", + "jwt" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -66342,7 +66400,10 @@ "external_options": {}, "info": "Authentication method: 'basic' for username/password authentication, or 'jwt' for JSON Web Token (Bearer) authentication.", "name": "auth_mode", - "options": [], + "options": [ + "basic", + "jwt" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -68141,7 +68202,10 @@ "external_options": {}, "info": "Docling pipeline to use", "name": "pipeline", - "options": [], + "options": [ + "standard", + "vlm" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -68245,7 +68309,20 @@ "info": "Choose where to read the file from.", "limit": 1, "name": "storage_location", - "options": [], + "options": [ + { + "icon": "hard-drive", + "name": "Local" + }, + { + "icon": "Amazon", + "name": "AWS" + }, + { + "icon": "google", + "name": "Google Drive" + } + ], "override_skip": false, "placeholder": "Select Location", "real_time_refresh": true, @@ -69317,7 +69394,20 @@ "info": "Choose where to save the file.", "limit": 1, "name": "storage_location", - "options": [], + "options": [ + { + "icon": "hard-drive", + "name": "Local" + }, + { + "icon": "Amazon", + "name": "AWS" + }, + { + "icon": "google", + "name": "Google Drive" + } + ], "override_skip": false, "placeholder": "Select Location", "real_time_refresh": true, @@ -70380,7 +70470,18 @@ "external_options": {}, "info": "The operator to apply for comparing the texts.", "name": "operator", - "options": [], + "options": [ + "equals", + "not equals", + "contains", + "starts with", + "ends with", + "regex", + "less than", + "less than or equal", + "greater than", + "greater than or equal" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -71895,7 +71996,10 @@ "external_options": {}, "info": "Select whether to use a local repo path or clone from a remote URL.", "name": "repo_source", - "options": [], + "options": [ + "Local", + "Remote" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -74879,7 +74983,16 @@ "external_options": {}, "info": "Select a model from Hugging Face Hub", "name": "model_id", - "options": [], + "options": [ + "meta-llama/Llama-3.3-70B-Instruct", + "mistralai/Mixtral-8x7B-Instruct-v0.1", + "mistralai/Mistral-7B-Instruct-v0.3", + "meta-llama/Llama-3.1-8B-Instruct", + "Qwen/Qwen2.5-Coder-32B-Instruct", + "Qwen/QwQ-32B-Preview", + "openai-community/gpt2", + "custom" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -75258,7 +75371,14 @@ "external_options": {}, "info": "The base URL of the API.", "name": "base_url", - "options": [], + "options": [ + "https://us-south.ml.cloud.ibm.com", + "https://eu-de.ml.cloud.ibm.com", + "https://eu-gb.ml.cloud.ibm.com", + "https://au-syd.ml.cloud.ibm.com", + "https://jp-tok.ml.cloud.ibm.com", + "https://ca-tor.ml.cloud.ibm.com" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -75870,7 +75990,14 @@ "external_options": {}, "info": "The base URL of the API.", "name": "url", - "options": [], + "options": [ + "https://us-south.ml.cloud.ibm.com", + "https://eu-de.ml.cloud.ibm.com", + "https://eu-gb.ml.cloud.ibm.com", + "https://au-syd.ml.cloud.ibm.com", + "https://jp-tok.ml.cloud.ibm.com", + "https://ca-tor.ml.cloud.ibm.com" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -89085,7 +89212,14 @@ "external_options": {}, "info": "The base URL of the API (IBM watsonx.ai only)", "name": "base_url_ibm_watsonx", - "options": [], + "options": [ + "https://us-south.ml.cloud.ibm.com", + "https://eu-de.ml.cloud.ibm.com", + "https://eu-gb.ml.cloud.ibm.com", + "https://au-syd.ml.cloud.ibm.com", + "https://jp-tok.ml.cloud.ibm.com", + "https://ca-tor.ml.cloud.ibm.com" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -89454,7 +89588,14 @@ "external_options": {}, "info": "The base URL of the API (IBM watsonx.ai only)", "name": "base_url_ibm_watsonx", - "options": [], + "options": [ + "https://us-south.ml.cloud.ibm.com", + "https://eu-de.ml.cloud.ibm.com", + "https://eu-gb.ml.cloud.ibm.com", + "https://au-syd.ml.cloud.ibm.com", + "https://jp-tok.ml.cloud.ibm.com", + "https://ca-tor.ml.cloud.ibm.com" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -90089,7 +90230,10 @@ "dynamic": false, "info": "Operation mode: Store messages or Retrieve messages.", "name": "mode", - "options": [], + "options": [ + "Retrieve", + "Store" + ], "override_skip": false, "placeholder": "", "real_time_refresh": true, @@ -94128,7 +94272,11 @@ "external_options": {}, "info": "Enable/disable Mirostat sampling for controlling perplexity.", "name": "mirostat", - "options": [], + "options": [ + "Disabled", + "Mirostat", + "Mirostat 2.0" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -95413,7 +95561,20 @@ "external_options": {}, "info": "", "name": "model_name", - "options": [], + "options": [ + "gpt-4o-mini", + "gpt-4o", + "gpt-4-turbo", + "gpt-4-turbo-preview", + "gpt-4", + "gpt-3.5-turbo", + "gpt-5.1", + "gpt-5", + "gpt-5-mini", + "gpt-5-nano", + "gpt-5-chat-latest", + "o1" + ], "options_metadata": [], "override_skip": false, "placeholder": "", @@ -97713,7 +97874,48 @@ "info": "Select the DataFrame operation to perform.", "limit": 1, "name": "operation", - "options": [], + "options": [ + { + "icon": "plus", + "name": "Add Column" + }, + { + "icon": "minus", + "name": "Drop Column" + }, + { + "icon": "filter", + "name": "Filter" + }, + { + "icon": "arrow-up", + "name": "Head" + }, + { + "icon": "pencil", + "name": "Rename Column" + }, + { + "icon": "replace", + "name": "Replace Value" + }, + { + "icon": "columns", + "name": "Select Columns" + }, + { + "icon": "arrow-up-down", + "name": "Sort" + }, + { + "icon": "arrow-down", + "name": "Tail" + }, + { + "icon": "copy-x", + "name": "Drop Duplicates" + } + ], "override_skip": false, "placeholder": "Select Operation", "real_time_refresh": true, @@ -98022,7 +98224,44 @@ "info": "List of operations to perform on the data.", "limit": 1, "name": "operations", - "options": [], + "options": [ + { + "icon": "lasso-select", + "name": "Select Keys" + }, + { + "icon": "braces", + "name": "Literal Eval" + }, + { + "icon": "merge", + "name": "Combine" + }, + { + "icon": "filter", + "name": "Filter Values" + }, + { + "icon": "circle-plus", + "name": "Append or Update" + }, + { + "icon": "eraser", + "name": "Remove Keys" + }, + { + "icon": "pencil-line", + "name": "Rename Keys" + }, + { + "icon": "mouse-pointer", + "name": "Path Selection" + }, + { + "icon": "terminal", + "name": "JQ Expression" + } + ], "override_skip": false, "placeholder": "Select Operation", "real_time_refresh": true, @@ -99941,7 +100180,10 @@ "dynamic": false, "info": "Convert into raw string instead of using a template.", "name": "mode", - "options": [], + "options": [ + "Parser", + "Stringify" + ], "override_skip": false, "placeholder": "", "real_time_refresh": true, @@ -100964,7 +101206,48 @@ "info": "Select the text operation to perform.", "limit": 1, "name": "operation", - "options": [], + "options": [ + { + "icon": "hash", + "name": "Word Count" + }, + { + "icon": "type", + "name": "Case Conversion" + }, + { + "icon": "replace", + "name": "Text Replace" + }, + { + "icon": "search", + "name": "Text Extract" + }, + { + "icon": "chevron-left", + "name": "Text Head" + }, + { + "icon": "chevron-right", + "name": "Text Tail" + }, + { + "icon": "minus", + "name": "Text Strip" + }, + { + "icon": "link", + "name": "Text Join" + }, + { + "icon": "sparkles", + "name": "Text Clean" + }, + { + "icon": "table", + "name": "Text to DataFrame" + } + ], "override_skip": false, "placeholder": "Select Operation", "real_time_refresh": true, @@ -101381,7 +101664,11 @@ "dynamic": false, "info": "Select the desired output data type", "name": "output_type", - "options": [], + "options": [ + "Message", + "Data", + "DataFrame" + ], "override_skip": false, "placeholder": "", "real_time_refresh": true, @@ -109351,7 +109638,7 @@ "icon": "clock", "legacy": false, "metadata": { - "code_hash": "8311e820e80c", + "code_hash": "4a93d7b489e6", "dependencies": { "dependencies": [ { @@ -109400,7 +109687,7 @@ "show": true, "title_case": false, "type": "code", - "value": "from datetime import datetime\nfrom zoneinfo import ZoneInfo, available_timezones\n\nfrom lfx.custom.custom_component.component import Component\nfrom lfx.io import DropdownInput, Output\nfrom lfx.log.logger import logger\nfrom lfx.schema.message import Message\n\n\nclass CurrentDateComponent(Component):\n display_name = \"Current Date\"\n description = \"Returns the current date and time in the selected timezone.\"\n documentation: str = \"https://docs.langflow.org/current-date\"\n icon = \"clock\"\n name = \"CurrentDate\"\n\n inputs = [\n DropdownInput(\n name=\"timezone\",\n display_name=\"Timezone\",\n options=sorted(tz for tz in available_timezones() if tz != \"localtime\"),\n value=\"UTC\",\n info=\"Select the timezone for the current date and time.\",\n tool_mode=True,\n ),\n ]\n outputs = [\n Output(display_name=\"Current Date\", name=\"current_date\", method=\"get_current_date\"),\n ]\n\n def get_current_date(self) -> Message:\n try:\n tz = ZoneInfo(self.timezone)\n current_date = datetime.now(tz).strftime(\"%Y-%m-%d %H:%M:%S %Z\")\n result = f\"Current date and time in {self.timezone}: {current_date}\"\n self.status = result\n return Message(text=result)\n except Exception as e: # noqa: BLE001\n logger.debug(\"Error getting current date\", exc_info=True)\n error_message = f\"Error: {e}\"\n self.status = error_message\n return Message(text=error_message)\n" + "value": "from datetime import datetime\nfrom zoneinfo import ZoneInfo, available_timezones\n\nfrom lfx.custom.custom_component.component import Component\nfrom lfx.io import DropdownInput, Output\nfrom lfx.log.logger import logger\nfrom lfx.schema.message import Message\n\n\nclass CurrentDateComponent(Component):\n display_name = \"Current Date\"\n description = \"Returns the current date and time in the selected timezone.\"\n documentation: str = \"https://docs.langflow.org/current-date\"\n icon = \"clock\"\n name = \"CurrentDate\"\n\n inputs = [\n DropdownInput(\n name=\"timezone\",\n display_name=\"Timezone\",\n options=[], # Options loaded dynamically via update_build_config\n value=\"UTC\",\n info=\"Select the timezone for the current date and time.\",\n tool_mode=True,\n real_time_refresh=True,\n ),\n ]\n\n def update_build_config(self, build_config: dict, field_value: str, field_name: str | None = None): # noqa: ARG002\n \"\"\"Dynamically update build config with timezone options.\"\"\"\n if field_name == \"timezone\" or field_name is None:\n build_config[\"timezone\"][\"options\"] = sorted(tz for tz in available_timezones() if tz != \"localtime\")\n return build_config\n\n outputs = [\n Output(display_name=\"Current Date\", name=\"current_date\", method=\"get_current_date\"),\n ]\n\n def get_current_date(self) -> Message:\n try:\n tz = ZoneInfo(self.timezone)\n current_date = datetime.now(tz).strftime(\"%Y-%m-%d %H:%M:%S %Z\")\n result = f\"Current date and time in {self.timezone}: {current_date}\"\n self.status = result\n return Message(text=result)\n except Exception as e: # noqa: BLE001\n logger.debug(\"Error getting current date\", exc_info=True)\n error_message = f\"Error: {e}\"\n self.status = error_message\n return Message(text=error_message)\n" }, "timezone": { "_input_type": "DropdownInput", @@ -109412,609 +109699,11 @@ "external_options": {}, "info": "Select the timezone for the current date and time.", "name": "timezone", - "options": [ - "Africa/Abidjan", - "Africa/Accra", - "Africa/Addis_Ababa", - "Africa/Algiers", - "Africa/Asmara", - "Africa/Asmera", - "Africa/Bamako", - "Africa/Bangui", - "Africa/Banjul", - "Africa/Bissau", - "Africa/Blantyre", - "Africa/Brazzaville", - "Africa/Bujumbura", - "Africa/Cairo", - "Africa/Casablanca", - "Africa/Ceuta", - "Africa/Conakry", - "Africa/Dakar", - "Africa/Dar_es_Salaam", - "Africa/Djibouti", - "Africa/Douala", - "Africa/El_Aaiun", - "Africa/Freetown", - "Africa/Gaborone", - "Africa/Harare", - "Africa/Johannesburg", - "Africa/Juba", - "Africa/Kampala", - "Africa/Khartoum", - "Africa/Kigali", - "Africa/Kinshasa", - "Africa/Lagos", - "Africa/Libreville", - "Africa/Lome", - "Africa/Luanda", - "Africa/Lubumbashi", - "Africa/Lusaka", - "Africa/Malabo", - "Africa/Maputo", - "Africa/Maseru", - "Africa/Mbabane", - "Africa/Mogadishu", - "Africa/Monrovia", - "Africa/Nairobi", - "Africa/Ndjamena", - "Africa/Niamey", - "Africa/Nouakchott", - "Africa/Ouagadougou", - "Africa/Porto-Novo", - "Africa/Sao_Tome", - "Africa/Timbuktu", - "Africa/Tripoli", - "Africa/Tunis", - "Africa/Windhoek", - "America/Adak", - "America/Anchorage", - "America/Anguilla", - "America/Antigua", - "America/Araguaina", - "America/Argentina/Buenos_Aires", - "America/Argentina/Catamarca", - "America/Argentina/ComodRivadavia", - "America/Argentina/Cordoba", - "America/Argentina/Jujuy", - "America/Argentina/La_Rioja", - "America/Argentina/Mendoza", - "America/Argentina/Rio_Gallegos", - "America/Argentina/Salta", - "America/Argentina/San_Juan", - "America/Argentina/San_Luis", - "America/Argentina/Tucuman", - "America/Argentina/Ushuaia", - "America/Aruba", - "America/Asuncion", - "America/Atikokan", - "America/Atka", - "America/Bahia", - "America/Bahia_Banderas", - "America/Barbados", - "America/Belem", - "America/Belize", - "America/Blanc-Sablon", - "America/Boa_Vista", - "America/Bogota", - "America/Boise", - "America/Buenos_Aires", - "America/Cambridge_Bay", - "America/Campo_Grande", - "America/Cancun", - "America/Caracas", - "America/Catamarca", - "America/Cayenne", - "America/Cayman", - "America/Chicago", - "America/Chihuahua", - "America/Ciudad_Juarez", - "America/Coral_Harbour", - "America/Cordoba", - "America/Costa_Rica", - "America/Coyhaique", - "America/Creston", - "America/Cuiaba", - "America/Curacao", - "America/Danmarkshavn", - "America/Dawson", - "America/Dawson_Creek", - "America/Denver", - "America/Detroit", - "America/Dominica", - "America/Edmonton", - "America/Eirunepe", - "America/El_Salvador", - "America/Ensenada", - "America/Fort_Nelson", - "America/Fort_Wayne", - "America/Fortaleza", - "America/Glace_Bay", - "America/Godthab", - "America/Goose_Bay", - "America/Grand_Turk", - "America/Grenada", - "America/Guadeloupe", - "America/Guatemala", - "America/Guayaquil", - "America/Guyana", - "America/Halifax", - "America/Havana", - "America/Hermosillo", - "America/Indiana/Indianapolis", - "America/Indiana/Knox", - "America/Indiana/Marengo", - "America/Indiana/Petersburg", - "America/Indiana/Tell_City", - "America/Indiana/Vevay", - "America/Indiana/Vincennes", - "America/Indiana/Winamac", - "America/Indianapolis", - "America/Inuvik", - "America/Iqaluit", - "America/Jamaica", - "America/Jujuy", - "America/Juneau", - "America/Kentucky/Louisville", - "America/Kentucky/Monticello", - "America/Knox_IN", - "America/Kralendijk", - "America/La_Paz", - "America/Lima", - "America/Los_Angeles", - "America/Louisville", - "America/Lower_Princes", - "America/Maceio", - "America/Managua", - "America/Manaus", - "America/Marigot", - "America/Martinique", - "America/Matamoros", - "America/Mazatlan", - "America/Mendoza", - "America/Menominee", - "America/Merida", - "America/Metlakatla", - "America/Mexico_City", - "America/Miquelon", - "America/Moncton", - "America/Monterrey", - "America/Montevideo", - "America/Montreal", - "America/Montserrat", - "America/Nassau", - "America/New_York", - "America/Nipigon", - "America/Nome", - "America/Noronha", - "America/North_Dakota/Beulah", - "America/North_Dakota/Center", - "America/North_Dakota/New_Salem", - "America/Nuuk", - "America/Ojinaga", - "America/Panama", - "America/Pangnirtung", - "America/Paramaribo", - "America/Phoenix", - "America/Port-au-Prince", - "America/Port_of_Spain", - "America/Porto_Acre", - "America/Porto_Velho", - "America/Puerto_Rico", - "America/Punta_Arenas", - "America/Rainy_River", - "America/Rankin_Inlet", - "America/Recife", - "America/Regina", - "America/Resolute", - "America/Rio_Branco", - "America/Rosario", - "America/Santa_Isabel", - "America/Santarem", - "America/Santiago", - "America/Santo_Domingo", - "America/Sao_Paulo", - "America/Scoresbysund", - "America/Shiprock", - "America/Sitka", - "America/St_Barthelemy", - "America/St_Johns", - "America/St_Kitts", - "America/St_Lucia", - "America/St_Thomas", - "America/St_Vincent", - "America/Swift_Current", - "America/Tegucigalpa", - "America/Thule", - "America/Thunder_Bay", - "America/Tijuana", - "America/Toronto", - "America/Tortola", - "America/Vancouver", - "America/Virgin", - "America/Whitehorse", - "America/Winnipeg", - "America/Yakutat", - "America/Yellowknife", - "Antarctica/Casey", - "Antarctica/Davis", - "Antarctica/DumontDUrville", - "Antarctica/Macquarie", - "Antarctica/Mawson", - "Antarctica/McMurdo", - "Antarctica/Palmer", - "Antarctica/Rothera", - "Antarctica/South_Pole", - "Antarctica/Syowa", - "Antarctica/Troll", - "Antarctica/Vostok", - "Arctic/Longyearbyen", - "Asia/Aden", - "Asia/Almaty", - "Asia/Amman", - "Asia/Anadyr", - "Asia/Aqtau", - "Asia/Aqtobe", - "Asia/Ashgabat", - "Asia/Ashkhabad", - "Asia/Atyrau", - "Asia/Baghdad", - "Asia/Bahrain", - "Asia/Baku", - "Asia/Bangkok", - "Asia/Barnaul", - "Asia/Beirut", - "Asia/Bishkek", - "Asia/Brunei", - "Asia/Calcutta", - "Asia/Chita", - "Asia/Choibalsan", - "Asia/Chongqing", - "Asia/Chungking", - "Asia/Colombo", - "Asia/Dacca", - "Asia/Damascus", - "Asia/Dhaka", - "Asia/Dili", - "Asia/Dubai", - "Asia/Dushanbe", - "Asia/Famagusta", - "Asia/Gaza", - "Asia/Harbin", - "Asia/Hebron", - "Asia/Ho_Chi_Minh", - "Asia/Hong_Kong", - "Asia/Hovd", - "Asia/Irkutsk", - "Asia/Istanbul", - "Asia/Jakarta", - "Asia/Jayapura", - "Asia/Jerusalem", - "Asia/Kabul", - "Asia/Kamchatka", - "Asia/Karachi", - "Asia/Kashgar", - "Asia/Kathmandu", - "Asia/Katmandu", - "Asia/Khandyga", - "Asia/Kolkata", - "Asia/Krasnoyarsk", - "Asia/Kuala_Lumpur", - "Asia/Kuching", - "Asia/Kuwait", - "Asia/Macao", - "Asia/Macau", - "Asia/Magadan", - "Asia/Makassar", - "Asia/Manila", - "Asia/Muscat", - "Asia/Nicosia", - "Asia/Novokuznetsk", - "Asia/Novosibirsk", - "Asia/Omsk", - "Asia/Oral", - "Asia/Phnom_Penh", - "Asia/Pontianak", - "Asia/Pyongyang", - "Asia/Qatar", - "Asia/Qostanay", - "Asia/Qyzylorda", - "Asia/Rangoon", - "Asia/Riyadh", - "Asia/Saigon", - "Asia/Sakhalin", - "Asia/Samarkand", - "Asia/Seoul", - "Asia/Shanghai", - "Asia/Singapore", - "Asia/Srednekolymsk", - "Asia/Taipei", - "Asia/Tashkent", - "Asia/Tbilisi", - "Asia/Tehran", - "Asia/Tel_Aviv", - "Asia/Thimbu", - "Asia/Thimphu", - "Asia/Tokyo", - "Asia/Tomsk", - "Asia/Ujung_Pandang", - "Asia/Ulaanbaatar", - "Asia/Ulan_Bator", - "Asia/Urumqi", - "Asia/Ust-Nera", - "Asia/Vientiane", - "Asia/Vladivostok", - "Asia/Yakutsk", - "Asia/Yangon", - "Asia/Yekaterinburg", - "Asia/Yerevan", - "Atlantic/Azores", - "Atlantic/Bermuda", - "Atlantic/Canary", - "Atlantic/Cape_Verde", - "Atlantic/Faeroe", - "Atlantic/Faroe", - "Atlantic/Jan_Mayen", - "Atlantic/Madeira", - "Atlantic/Reykjavik", - "Atlantic/South_Georgia", - "Atlantic/St_Helena", - "Atlantic/Stanley", - "Australia/ACT", - "Australia/Adelaide", - "Australia/Brisbane", - "Australia/Broken_Hill", - "Australia/Canberra", - "Australia/Currie", - "Australia/Darwin", - "Australia/Eucla", - "Australia/Hobart", - "Australia/LHI", - "Australia/Lindeman", - "Australia/Lord_Howe", - "Australia/Melbourne", - "Australia/NSW", - "Australia/North", - "Australia/Perth", - "Australia/Queensland", - "Australia/South", - "Australia/Sydney", - "Australia/Tasmania", - "Australia/Victoria", - "Australia/West", - "Australia/Yancowinna", - "Brazil/Acre", - "Brazil/DeNoronha", - "Brazil/East", - "Brazil/West", - "CET", - "CST6CDT", - "Canada/Atlantic", - "Canada/Central", - "Canada/Eastern", - "Canada/Mountain", - "Canada/Newfoundland", - "Canada/Pacific", - "Canada/Saskatchewan", - "Canada/Yukon", - "Chile/Continental", - "Chile/EasterIsland", - "Cuba", - "EET", - "EST", - "EST5EDT", - "Egypt", - "Eire", - "Etc/GMT", - "Etc/GMT+0", - "Etc/GMT+1", - "Etc/GMT+10", - "Etc/GMT+11", - "Etc/GMT+12", - "Etc/GMT+2", - "Etc/GMT+3", - "Etc/GMT+4", - "Etc/GMT+5", - "Etc/GMT+6", - "Etc/GMT+7", - "Etc/GMT+8", - "Etc/GMT+9", - "Etc/GMT-0", - "Etc/GMT-1", - "Etc/GMT-10", - "Etc/GMT-11", - "Etc/GMT-12", - "Etc/GMT-13", - "Etc/GMT-14", - "Etc/GMT-2", - "Etc/GMT-3", - "Etc/GMT-4", - "Etc/GMT-5", - "Etc/GMT-6", - "Etc/GMT-7", - "Etc/GMT-8", - "Etc/GMT-9", - "Etc/GMT0", - "Etc/Greenwich", - "Etc/UCT", - "Etc/UTC", - "Etc/Universal", - "Etc/Zulu", - "Europe/Amsterdam", - "Europe/Andorra", - "Europe/Astrakhan", - "Europe/Athens", - "Europe/Belfast", - "Europe/Belgrade", - "Europe/Berlin", - "Europe/Bratislava", - "Europe/Brussels", - "Europe/Bucharest", - "Europe/Budapest", - "Europe/Busingen", - "Europe/Chisinau", - "Europe/Copenhagen", - "Europe/Dublin", - "Europe/Gibraltar", - "Europe/Guernsey", - "Europe/Helsinki", - "Europe/Isle_of_Man", - "Europe/Istanbul", - "Europe/Jersey", - "Europe/Kaliningrad", - "Europe/Kiev", - "Europe/Kirov", - "Europe/Kyiv", - "Europe/Lisbon", - "Europe/Ljubljana", - "Europe/London", - "Europe/Luxembourg", - "Europe/Madrid", - "Europe/Malta", - "Europe/Mariehamn", - "Europe/Minsk", - "Europe/Monaco", - "Europe/Moscow", - "Europe/Nicosia", - "Europe/Oslo", - "Europe/Paris", - "Europe/Podgorica", - "Europe/Prague", - "Europe/Riga", - "Europe/Rome", - "Europe/Samara", - "Europe/San_Marino", - "Europe/Sarajevo", - "Europe/Saratov", - "Europe/Simferopol", - "Europe/Skopje", - "Europe/Sofia", - "Europe/Stockholm", - "Europe/Tallinn", - "Europe/Tirane", - "Europe/Tiraspol", - "Europe/Ulyanovsk", - "Europe/Uzhgorod", - "Europe/Vaduz", - "Europe/Vatican", - "Europe/Vienna", - "Europe/Vilnius", - "Europe/Volgograd", - "Europe/Warsaw", - "Europe/Zagreb", - "Europe/Zaporozhye", - "Europe/Zurich", - "Factory", - "GB", - "GB-Eire", - "GMT", - "GMT+0", - "GMT-0", - "GMT0", - "Greenwich", - "HST", - "Hongkong", - "Iceland", - "Indian/Antananarivo", - "Indian/Chagos", - "Indian/Christmas", - "Indian/Cocos", - "Indian/Comoro", - "Indian/Kerguelen", - "Indian/Mahe", - "Indian/Maldives", - "Indian/Mauritius", - "Indian/Mayotte", - "Indian/Reunion", - "Iran", - "Israel", - "Jamaica", - "Japan", - "Kwajalein", - "Libya", - "MET", - "MST", - "MST7MDT", - "Mexico/BajaNorte", - "Mexico/BajaSur", - "Mexico/General", - "NZ", - "NZ-CHAT", - "Navajo", - "PRC", - "PST8PDT", - "Pacific/Apia", - "Pacific/Auckland", - "Pacific/Bougainville", - "Pacific/Chatham", - "Pacific/Chuuk", - "Pacific/Easter", - "Pacific/Efate", - "Pacific/Enderbury", - "Pacific/Fakaofo", - "Pacific/Fiji", - "Pacific/Funafuti", - "Pacific/Galapagos", - "Pacific/Gambier", - "Pacific/Guadalcanal", - "Pacific/Guam", - "Pacific/Honolulu", - "Pacific/Johnston", - "Pacific/Kanton", - "Pacific/Kiritimati", - "Pacific/Kosrae", - "Pacific/Kwajalein", - "Pacific/Majuro", - "Pacific/Marquesas", - "Pacific/Midway", - "Pacific/Nauru", - "Pacific/Niue", - "Pacific/Norfolk", - "Pacific/Noumea", - "Pacific/Pago_Pago", - "Pacific/Palau", - "Pacific/Pitcairn", - "Pacific/Pohnpei", - "Pacific/Ponape", - "Pacific/Port_Moresby", - "Pacific/Rarotonga", - "Pacific/Saipan", - "Pacific/Samoa", - "Pacific/Tahiti", - "Pacific/Tarawa", - "Pacific/Tongatapu", - "Pacific/Truk", - "Pacific/Wake", - "Pacific/Wallis", - "Pacific/Yap", - "Poland", - "Portugal", - "ROC", - "ROK", - "Singapore", - "Turkey", - "UCT", - "US/Alaska", - "US/Aleutian", - "US/Arizona", - "US/Central", - "US/East-Indiana", - "US/Eastern", - "US/Hawaii", - "US/Indiana-Starke", - "US/Michigan", - "US/Mountain", - "US/Pacific", - "US/Samoa", - "UTC", - "Universal", - "W-SU", - "WET", - "Zulu" - ], + "options": [], "options_metadata": [], "override_skip": false, "placeholder": "", + "real_time_refresh": true, "required": false, "show": true, "title_case": false, @@ -111177,7 +110866,10 @@ "dynamic": false, "info": "Select the operation mode", "name": "mode", - "options": [], + "options": [ + "Ingest", + "Retrieve" + ], "override_skip": false, "placeholder": "", "real_time_refresh": true, @@ -115976,6 +115668,6 @@ "num_components": 355, "num_modules": 95 }, - "sha256": "349bed46f0e91ed326c632cc84d88d32f6a070685e0b6c1f1982b57ea191c5b2", + "sha256": "805a0b2a148b737fc06b518e423c19ec0aceafaa7fb8cfec53f671ddcdda26e1", "version": "0.3.0" } \ No newline at end of file diff --git a/src/lfx/src/lfx/_assets/stable_hash_history.json b/src/lfx/src/lfx/_assets/stable_hash_history.json index 1da7aada6f..54840aac53 100644 --- a/src/lfx/src/lfx/_assets/stable_hash_history.json +++ b/src/lfx/src/lfx/_assets/stable_hash_history.json @@ -1651,7 +1651,7 @@ }, "CurrentDate": { "versions": { - "0.3.0": "8311e820e80c" + "0.3.0": "4a93d7b489e6" } }, "IDGenerator": { diff --git a/src/lfx/src/lfx/components/utilities/current_date.py b/src/lfx/src/lfx/components/utilities/current_date.py index 105ee14ff7..4ea9b918ff 100644 --- a/src/lfx/src/lfx/components/utilities/current_date.py +++ b/src/lfx/src/lfx/components/utilities/current_date.py @@ -18,12 +18,20 @@ class CurrentDateComponent(Component): DropdownInput( name="timezone", display_name="Timezone", - options=sorted(tz for tz in available_timezones() if tz != "localtime"), + options=[], # Options loaded dynamically via update_build_config value="UTC", info="Select the timezone for the current date and time.", tool_mode=True, + real_time_refresh=True, ), ] + + def update_build_config(self, build_config: dict, field_value: str, field_name: str | None = None): # noqa: ARG002 + """Dynamically update build config with timezone options.""" + if field_name == "timezone" or field_name is None: + build_config["timezone"]["options"] = sorted(tz for tz in available_timezones() if tz != "localtime") + return build_config + outputs = [ Output(display_name="Current Date", name="current_date", method="get_current_date"), ]