@kitten-science/kitten-scientists 2.0.0-beta.10-20250403-28002ba → 2.0.0-beta.10-20250407-52a10b3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/BonfireManager.d.ts +3 -3
- package/lib/BonfireManager.d.ts.map +1 -1
- package/lib/BonfireManager.js +10 -10
- package/lib/BonfireManager.js.map +1 -1
- package/lib/Engine.d.ts +89 -89
- package/lib/Engine.d.ts.map +1 -1
- package/lib/Engine.js +17 -17
- package/lib/Engine.js.map +1 -1
- package/lib/KittenScientists.d.ts +1 -1
- package/lib/KittenScientists.d.ts.map +1 -1
- package/lib/KittenScientists.js +8 -8
- package/lib/KittenScientists.js.map +1 -1
- package/lib/ReligionManager.d.ts +2 -2
- package/lib/ReligionManager.d.ts.map +1 -1
- package/lib/ReligionManager.js +6 -6
- package/lib/ReligionManager.js.map +1 -1
- package/lib/ScienceManager.d.ts +2 -2
- package/lib/ScienceManager.d.ts.map +1 -1
- package/lib/ScienceManager.js +2 -2
- package/lib/ScienceManager.js.map +1 -1
- package/lib/SpaceManager.d.ts +2 -2
- package/lib/SpaceManager.d.ts.map +1 -1
- package/lib/SpaceManager.js +2 -2
- package/lib/SpaceManager.js.map +1 -1
- package/lib/TimeControlManager.d.ts +2 -2
- package/lib/TimeControlManager.d.ts.map +1 -1
- package/lib/TimeControlManager.js +3 -3
- package/lib/TimeControlManager.js.map +1 -1
- package/lib/TimeManager.d.ts +2 -2
- package/lib/TimeManager.d.ts.map +1 -1
- package/lib/TimeManager.js +3 -3
- package/lib/TimeManager.js.map +1 -1
- package/lib/TradeManager.d.ts +3 -3
- package/lib/TradeManager.d.ts.map +1 -1
- package/lib/TradeManager.js +4 -4
- package/lib/TradeManager.js.map +1 -1
- package/lib/UpgradeManager.js +3 -3
- package/lib/UpgradeManager.js.map +1 -1
- package/lib/VillageManager.d.ts +3 -3
- package/lib/VillageManager.d.ts.map +1 -1
- package/lib/VillageManager.js +2 -2
- package/lib/VillageManager.js.map +1 -1
- package/lib/WorkshopManager.d.ts +3 -3
- package/lib/WorkshopManager.d.ts.map +1 -1
- package/lib/WorkshopManager.js +4 -4
- package/lib/WorkshopManager.js.map +1 -1
- package/lib/helper/BulkPurchaseHelper.d.ts +1 -1
- package/lib/helper/BulkPurchaseHelper.d.ts.map +1 -1
- package/lib/helper/BulkPurchaseHelper.js +5 -5
- package/lib/helper/BulkPurchaseHelper.js.map +1 -1
- package/lib/i18n/en-US.json +20 -20
- package/lib/i18n/translations/da-DK.json +20 -20
- package/lib/i18n/translations/de-DE.json +20 -20
- package/lib/i18n/translations/fr-FR.json +20 -20
- package/lib/i18n/translations/he-IL.json +20 -20
- package/lib/i18n/translations/ko-KR.json +20 -20
- package/lib/i18n/translations/ru-RU.json +20 -20
- package/lib/i18n/translations/zh-CN.json +20 -20
- package/lib/images/Icons.d.ts +8 -8
- package/lib/images/Icons.d.ts.map +1 -1
- package/lib/images/Icons.js +8 -8
- package/lib/images/Icons.js.map +1 -1
- package/lib/settings/BonfireSettings.d.ts.map +1 -1
- package/lib/settings/BonfireSettings.js.map +1 -1
- package/lib/settings/BuildingUpgradeSettings.d.ts.map +1 -1
- package/lib/settings/BuildingUpgradeSettings.js.map +1 -1
- package/lib/settings/ElectLeaderSettings.d.ts.map +1 -1
- package/lib/settings/ElectLeaderSettings.js.map +1 -1
- package/lib/settings/EmbassySettings.d.ts.map +1 -1
- package/lib/settings/EmbassySettings.js.map +1 -1
- package/lib/settings/EngineSettings.d.ts.map +1 -1
- package/lib/settings/EngineSettings.js.map +1 -1
- package/lib/settings/LogFilterSettings.d.ts.map +1 -1
- package/lib/settings/LogFilterSettings.js.map +1 -1
- package/lib/settings/MissionSettings.d.ts.map +1 -1
- package/lib/settings/MissionSettings.js.map +1 -1
- package/lib/settings/PolicySettings.d.ts.map +1 -1
- package/lib/settings/PolicySettings.js.map +1 -1
- package/lib/settings/ReligionSettings.d.ts.map +1 -1
- package/lib/settings/ReligionSettings.js.map +1 -1
- package/lib/settings/ResetBonfireSettings.d.ts.map +1 -1
- package/lib/settings/ResetBonfireSettings.js.map +1 -1
- package/lib/settings/ResetReligionSettings.d.ts.map +1 -1
- package/lib/settings/ResetReligionSettings.js.map +1 -1
- package/lib/settings/ResetResourcesSettings.d.ts.map +1 -1
- package/lib/settings/ResetResourcesSettings.js.map +1 -1
- package/lib/settings/ResetSettings.d.ts.map +1 -1
- package/lib/settings/ResetSettings.js.map +1 -1
- package/lib/settings/ResetSpaceSettings.d.ts.map +1 -1
- package/lib/settings/ResetSpaceSettings.js.map +1 -1
- package/lib/settings/ResetTimeSettings.d.ts.map +1 -1
- package/lib/settings/ResetTimeSettings.js.map +1 -1
- package/lib/settings/ResetUpgradeSettings.d.ts.map +1 -1
- package/lib/settings/ResetUpgradeSettings.js.map +1 -1
- package/lib/settings/ResourcesSettings.d.ts.map +1 -1
- package/lib/settings/ResourcesSettings.js +1 -1
- package/lib/settings/ResourcesSettings.js.map +1 -1
- package/lib/settings/ScienceSettings.d.ts.map +1 -1
- package/lib/settings/ScienceSettings.js.map +1 -1
- package/lib/settings/Settings.d.ts.map +1 -1
- package/lib/settings/Settings.js.map +1 -1
- package/lib/settings/SpaceSettings.d.ts.map +1 -1
- package/lib/settings/SpaceSettings.js.map +1 -1
- package/lib/settings/StateSettings.d.ts.map +1 -1
- package/lib/settings/StateSettings.js.map +1 -1
- package/lib/settings/TechSettings.d.ts.map +1 -1
- package/lib/settings/TechSettings.js.map +1 -1
- package/lib/settings/TimeControlSettings.d.ts.map +1 -1
- package/lib/settings/TimeControlSettings.js.map +1 -1
- package/lib/settings/TimeSettings.d.ts.map +1 -1
- package/lib/settings/TimeSettings.js.map +1 -1
- package/lib/settings/TimeSkipHeatSettings.d.ts.map +1 -1
- package/lib/settings/TimeSkipHeatSettings.js.map +1 -1
- package/lib/settings/TimeSkipSettings.d.ts.map +1 -1
- package/lib/settings/TimeSkipSettings.js.map +1 -1
- package/lib/settings/TradeSettings.d.ts.map +1 -1
- package/lib/settings/TradeSettings.js +2 -2
- package/lib/settings/TradeSettings.js.map +1 -1
- package/lib/settings/UpgradeSettings.d.ts.map +1 -1
- package/lib/settings/UpgradeSettings.js.map +1 -1
- package/lib/settings/VillageSettings.d.ts.map +1 -1
- package/lib/settings/VillageSettings.js.map +1 -1
- package/lib/settings/WorkshopSettings.d.ts.map +1 -1
- package/lib/settings/WorkshopSettings.js.map +1 -1
- package/lib/tools/Log.d.ts +1 -1
- package/lib/tools/Log.d.ts.map +1 -1
- package/lib/tools/Log.js +4 -1
- package/lib/tools/Log.js.map +1 -1
- package/lib/types/game.d.ts +2 -2
- package/lib/types/game.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/village.d.ts.map +1 -1
- package/lib/ui/BonfireSettingsUi.d.ts +4 -5
- package/lib/ui/BonfireSettingsUi.d.ts.map +1 -1
- package/lib/ui/BonfireSettingsUi.js +100 -115
- package/lib/ui/BonfireSettingsUi.js.map +1 -1
- package/lib/ui/BuildSectionTools.d.ts +2 -26
- package/lib/ui/BuildSectionTools.d.ts.map +1 -1
- package/lib/ui/BuildSectionTools.js +50 -59
- package/lib/ui/BuildSectionTools.js.map +1 -1
- package/lib/ui/BuildingUpgradeSettingsUi.d.ts +2 -4
- package/lib/ui/BuildingUpgradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/BuildingUpgradeSettingsUi.js +16 -23
- package/lib/ui/BuildingUpgradeSettingsUi.js.map +1 -1
- package/lib/ui/EmbassySettingsUi.d.ts +4 -5
- package/lib/ui/EmbassySettingsUi.d.ts.map +1 -1
- package/lib/ui/EmbassySettingsUi.js +54 -67
- package/lib/ui/EmbassySettingsUi.js.map +1 -1
- package/lib/ui/EngineSettingsUi.d.ts +3 -3
- package/lib/ui/EngineSettingsUi.d.ts.map +1 -1
- package/lib/ui/EngineSettingsUi.js +11 -9
- package/lib/ui/EngineSettingsUi.js.map +1 -1
- package/lib/ui/InternalsUi.d.ts +2 -2
- package/lib/ui/InternalsUi.d.ts.map +1 -1
- package/lib/ui/InternalsUi.js +44 -54
- package/lib/ui/InternalsUi.js.map +1 -1
- package/lib/ui/LogFilterSettingsUi.d.ts +2 -4
- package/lib/ui/LogFilterSettingsUi.d.ts.map +1 -1
- package/lib/ui/LogFilterSettingsUi.js +24 -32
- package/lib/ui/LogFilterSettingsUi.js.map +1 -1
- package/lib/ui/MissionSettingsUi.d.ts +2 -4
- package/lib/ui/MissionSettingsUi.d.ts.map +1 -1
- package/lib/ui/MissionSettingsUi.js +15 -20
- package/lib/ui/MissionSettingsUi.js.map +1 -1
- package/lib/ui/PolicySettingsUi.d.ts +2 -4
- package/lib/ui/PolicySettingsUi.d.ts.map +1 -1
- package/lib/ui/PolicySettingsUi.js +15 -22
- package/lib/ui/PolicySettingsUi.js.map +1 -1
- package/lib/ui/ReligionSettingsUi.d.ts +4 -6
- package/lib/ui/ReligionSettingsUi.d.ts.map +1 -1
- package/lib/ui/ReligionSettingsUi.js +128 -152
- package/lib/ui/ReligionSettingsUi.js.map +1 -1
- package/lib/ui/ResetBonfireSettingsUi.d.ts +2 -2
- package/lib/ui/ResetBonfireSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetBonfireSettingsUi.js +33 -39
- package/lib/ui/ResetBonfireSettingsUi.js.map +1 -1
- package/lib/ui/ResetReligionSettingsUi.d.ts +2 -2
- package/lib/ui/ResetReligionSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetReligionSettingsUi.js +45 -54
- package/lib/ui/ResetReligionSettingsUi.js.map +1 -1
- package/lib/ui/ResetResourcesSettingsUi.d.ts +2 -2
- package/lib/ui/ResetResourcesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetResourcesSettingsUi.js +27 -34
- package/lib/ui/ResetResourcesSettingsUi.js.map +1 -1
- package/lib/ui/ResetSettingsUi.d.ts +2 -4
- package/lib/ui/ResetSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetSettingsUi.js +19 -24
- package/lib/ui/ResetSettingsUi.js.map +1 -1
- package/lib/ui/ResetSpaceSettingsUi.d.ts +2 -2
- package/lib/ui/ResetSpaceSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetSpaceSettingsUi.js +33 -42
- package/lib/ui/ResetSpaceSettingsUi.js.map +1 -1
- package/lib/ui/ResetTimeSettingsUi.d.ts +2 -2
- package/lib/ui/ResetTimeSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetTimeSettingsUi.js +35 -44
- package/lib/ui/ResetTimeSettingsUi.js.map +1 -1
- package/lib/ui/ResetUpgradesSettingsUi.d.ts +2 -2
- package/lib/ui/ResetUpgradesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResetUpgradesSettingsUi.js +12 -12
- package/lib/ui/ResetUpgradesSettingsUi.js.map +1 -1
- package/lib/ui/ResourcesSettingsUi.d.ts +2 -4
- package/lib/ui/ResourcesSettingsUi.d.ts.map +1 -1
- package/lib/ui/ResourcesSettingsUi.js +18 -22
- package/lib/ui/ResourcesSettingsUi.js.map +1 -1
- package/lib/ui/ScienceSettingsUi.d.ts +2 -5
- package/lib/ui/ScienceSettingsUi.d.ts.map +1 -1
- package/lib/ui/ScienceSettingsUi.js +26 -45
- package/lib/ui/ScienceSettingsUi.js.map +1 -1
- package/lib/ui/SpaceSettingsUi.d.ts +4 -5
- package/lib/ui/SpaceSettingsUi.d.ts.map +1 -1
- package/lib/ui/SpaceSettingsUi.js +47 -58
- package/lib/ui/SpaceSettingsUi.js.map +1 -1
- package/lib/ui/StateManagementUi.d.ts +2 -3
- package/lib/ui/StateManagementUi.d.ts.map +1 -1
- package/lib/ui/StateManagementUi.js +172 -179
- package/lib/ui/StateManagementUi.js.map +1 -1
- package/lib/ui/TechSettingsUi.d.ts +4 -5
- package/lib/ui/TechSettingsUi.d.ts.map +1 -1
- package/lib/ui/TechSettingsUi.js +56 -74
- package/lib/ui/TechSettingsUi.js.map +1 -1
- package/lib/ui/TimeControlSettingsUi.d.ts +3 -4
- package/lib/ui/TimeControlSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeControlSettingsUi.js +27 -39
- package/lib/ui/TimeControlSettingsUi.js.map +1 -1
- package/lib/ui/TimeSettingsUi.d.ts +4 -5
- package/lib/ui/TimeSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSettingsUi.js +58 -65
- package/lib/ui/TimeSettingsUi.js.map +1 -1
- package/lib/ui/TimeSkipHeatSettingsUi.d.ts +4 -5
- package/lib/ui/TimeSkipHeatSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSkipHeatSettingsUi.js +33 -49
- package/lib/ui/TimeSkipHeatSettingsUi.js.map +1 -1
- package/lib/ui/TimeSkipSettingsUi.d.ts +2 -4
- package/lib/ui/TimeSkipSettingsUi.d.ts.map +1 -1
- package/lib/ui/TimeSkipSettingsUi.js +78 -106
- package/lib/ui/TimeSkipSettingsUi.js.map +1 -1
- package/lib/ui/TradeSettingsUi.d.ts +4 -5
- package/lib/ui/TradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/TradeSettingsUi.js +113 -128
- package/lib/ui/TradeSettingsUi.js.map +1 -1
- package/lib/ui/UpgradeSettingsUi.d.ts +4 -5
- package/lib/ui/UpgradeSettingsUi.d.ts.map +1 -1
- package/lib/ui/UpgradeSettingsUi.js +55 -71
- package/lib/ui/UpgradeSettingsUi.js.map +1 -1
- package/lib/ui/UserInterface.d.ts +4 -2
- package/lib/ui/UserInterface.d.ts.map +1 -1
- package/lib/ui/UserInterface.js +38 -21
- package/lib/ui/UserInterface.js.map +1 -1
- package/lib/ui/VillageSettingsUi.d.ts +2 -4
- package/lib/ui/VillageSettingsUi.d.ts.map +1 -1
- package/lib/ui/VillageSettingsUi.js +94 -112
- package/lib/ui/VillageSettingsUi.js.map +1 -1
- package/lib/ui/WorkshopSettingsUi.d.ts +4 -5
- package/lib/ui/WorkshopSettingsUi.d.ts.map +1 -1
- package/lib/ui/WorkshopSettingsUi.js +89 -110
- package/lib/ui/WorkshopSettingsUi.js.map +1 -1
- package/lib/ui/components/Button.d.ts +9 -9
- package/lib/ui/components/Button.d.ts.map +1 -1
- package/lib/ui/components/Button.js +31 -26
- package/lib/ui/components/Button.js.map +1 -1
- package/lib/ui/components/ButtonListItem.d.ts +4 -4
- package/lib/ui/components/ButtonListItem.d.ts.map +1 -1
- package/lib/ui/components/ButtonListItem.js +2 -7
- package/lib/ui/components/ButtonListItem.js.map +1 -1
- package/lib/ui/components/CollapsiblePanel.d.ts +15 -12
- package/lib/ui/components/CollapsiblePanel.d.ts.map +1 -1
- package/lib/ui/components/CollapsiblePanel.js +42 -26
- package/lib/ui/components/CollapsiblePanel.js.map +1 -1
- package/lib/ui/components/Container.d.ts +6 -2
- package/lib/ui/components/Container.d.ts.map +1 -1
- package/lib/ui/components/Container.js +5 -3
- package/lib/ui/components/Container.js.map +1 -1
- package/lib/ui/components/CyclesList.d.ts +7 -8
- package/lib/ui/components/CyclesList.d.ts.map +1 -1
- package/lib/ui/components/CyclesList.js +34 -27
- package/lib/ui/components/CyclesList.js.map +1 -1
- package/lib/ui/components/Delimiter.d.ts +2 -2
- package/lib/ui/components/Delimiter.d.ts.map +1 -1
- package/lib/ui/components/Delimiter.js +5 -2
- package/lib/ui/components/Delimiter.js.map +1 -1
- package/lib/ui/components/Dialog.d.ts +13 -6
- package/lib/ui/components/Dialog.d.ts.map +1 -1
- package/lib/ui/components/Dialog.js +65 -40
- package/lib/ui/components/Dialog.js.map +1 -1
- package/lib/ui/components/ExplainerListItem.d.ts +4 -2
- package/lib/ui/components/ExplainerListItem.d.ts.map +1 -1
- package/lib/ui/components/ExplainerListItem.js +6 -4
- package/lib/ui/components/ExplainerListItem.js.map +1 -1
- package/lib/ui/components/Fieldset.d.ts +5 -4
- package/lib/ui/components/Fieldset.d.ts.map +1 -1
- package/lib/ui/components/Fieldset.js +5 -3
- package/lib/ui/components/Fieldset.js.map +1 -1
- package/lib/ui/components/HeaderListItem.d.ts +5 -3
- package/lib/ui/components/HeaderListItem.d.ts.map +1 -1
- package/lib/ui/components/HeaderListItem.js +5 -3
- package/lib/ui/components/HeaderListItem.js.map +1 -1
- package/lib/ui/components/IconButton.d.ts +8 -7
- package/lib/ui/components/IconButton.d.ts.map +1 -1
- package/lib/ui/components/IconButton.js +23 -19
- package/lib/ui/components/IconButton.js.map +1 -1
- package/lib/ui/components/IconSettingsPanel.d.ts +5 -4
- package/lib/ui/components/IconSettingsPanel.d.ts.map +1 -1
- package/lib/ui/components/IconSettingsPanel.js +4 -2
- package/lib/ui/components/IconSettingsPanel.js.map +1 -1
- package/lib/ui/components/Input.d.ts +5 -3
- package/lib/ui/components/Input.d.ts.map +1 -1
- package/lib/ui/components/Input.js +5 -3
- package/lib/ui/components/Input.js.map +1 -1
- package/lib/ui/components/LabelListItem.d.ts +10 -7
- package/lib/ui/components/LabelListItem.d.ts.map +1 -1
- package/lib/ui/components/LabelListItem.js +21 -10
- package/lib/ui/components/LabelListItem.js.map +1 -1
- package/lib/ui/components/ListItem.d.ts +8 -6
- package/lib/ui/components/ListItem.d.ts.map +1 -1
- package/lib/ui/components/ListItem.js +5 -3
- package/lib/ui/components/ListItem.js.map +1 -1
- package/lib/ui/components/OptionsListItem.d.ts +6 -6
- package/lib/ui/components/OptionsListItem.d.ts.map +1 -1
- package/lib/ui/components/OptionsListItem.js +17 -12
- package/lib/ui/components/OptionsListItem.js.map +1 -1
- package/lib/ui/components/Paragraph.d.ts +6 -2
- package/lib/ui/components/Paragraph.d.ts.map +1 -1
- package/lib/ui/components/Paragraph.js +5 -3
- package/lib/ui/components/Paragraph.js.map +1 -1
- package/lib/ui/components/RadioItem.d.ts +9 -8
- package/lib/ui/components/RadioItem.d.ts.map +1 -1
- package/lib/ui/components/RadioItem.js +13 -9
- package/lib/ui/components/RadioItem.js.map +1 -1
- package/lib/ui/components/SeasonsList.d.ts +7 -6
- package/lib/ui/components/SeasonsList.d.ts.map +1 -1
- package/lib/ui/components/SeasonsList.js +20 -13
- package/lib/ui/components/SeasonsList.js.map +1 -1
- package/lib/ui/components/SettingLimitedListItem.d.ts +8 -8
- package/lib/ui/components/SettingLimitedListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedListItem.js +8 -9
- package/lib/ui/components/SettingLimitedListItem.js.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts +8 -7
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.js +13 -12
- package/lib/ui/components/SettingLimitedTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingListItem.d.ts +11 -12
- package/lib/ui/components/SettingListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingListItem.js +38 -38
- package/lib/ui/components/SettingListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxListItem.d.ts +8 -8
- package/lib/ui/components/SettingMaxListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxListItem.js +13 -11
- package/lib/ui/components/SettingMaxListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts +11 -8
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.js +21 -16
- package/lib/ui/components/SettingMaxTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.d.ts +9 -8
- package/lib/ui/components/SettingTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.js +16 -13
- package/lib/ui/components/SettingTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingsList.d.ts +12 -11
- package/lib/ui/components/SettingsList.d.ts.map +1 -1
- package/lib/ui/components/SettingsList.js +14 -16
- package/lib/ui/components/SettingsList.js.map +1 -1
- package/lib/ui/components/SettingsPanel.d.ts +9 -8
- package/lib/ui/components/SettingsPanel.d.ts.map +1 -1
- package/lib/ui/components/SettingsPanel.js +10 -10
- package/lib/ui/components/SettingsPanel.js.map +1 -1
- package/lib/ui/components/TextButton.d.ts +7 -7
- package/lib/ui/components/TextButton.d.ts.map +1 -1
- package/lib/ui/components/TextButton.js +17 -13
- package/lib/ui/components/TextButton.js.map +1 -1
- package/lib/ui/components/ToolbarListItem.d.ts +6 -5
- package/lib/ui/components/ToolbarListItem.d.ts.map +1 -1
- package/lib/ui/components/ToolbarListItem.js +7 -12
- package/lib/ui/components/ToolbarListItem.js.map +1 -1
- package/lib/ui/components/UiComponent.d.ts +31 -19
- package/lib/ui/components/UiComponent.d.ts.map +1 -1
- package/lib/ui/components/UiComponent.js +84 -19
- package/lib/ui/components/UiComponent.js.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.d.ts +10 -9
- package/lib/ui/components/WorkshopCraftListItem.d.ts.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.js +20 -21
- package/lib/ui/components/WorkshopCraftListItem.js.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.d.ts +5 -3
- package/lib/ui/components/buttons/ConsumeButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.js +23 -30
- package/lib/ui/components/buttons/ConsumeButton.js.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.d.ts +6 -3
- package/lib/ui/components/buttons/ExpandoButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.js +20 -17
- package/lib/ui/components/buttons/ExpandoButton.js.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.d.ts +8 -8
- package/lib/ui/components/buttons/LimitedButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.js +27 -21
- package/lib/ui/components/buttons/LimitedButton.js.map +1 -1
- package/lib/ui/components/buttons/MaxButton.d.ts +5 -5
- package/lib/ui/components/buttons/MaxButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/MaxButton.js +5 -7
- package/lib/ui/components/buttons/MaxButton.js.map +1 -1
- package/lib/ui/components/buttons/PaddingButton.d.ts +4 -2
- package/lib/ui/components/buttons/PaddingButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/PaddingButton.js +5 -3
- package/lib/ui/components/buttons/PaddingButton.js.map +1 -1
- package/lib/ui/components/buttons/StockButton.d.ts +5 -3
- package/lib/ui/components/buttons/StockButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/StockButton.js +32 -40
- package/lib/ui/components/buttons/StockButton.js.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.d.ts +6 -6
- package/lib/ui/components/buttons/TriggerButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.js +16 -20
- package/lib/ui/components/buttons/TriggerButton.js.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.d.ts +6 -6
- package/lib/ui/components/buttons-text/BuyButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.js +23 -28
- package/lib/ui/components/buttons-text/BuyButton.js.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.d.ts +6 -6
- package/lib/ui/components/buttons-text/SellButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.js +23 -30
- package/lib/ui/components/buttons-text/SellButton.js.map +1 -1
- package/output/kitten-scientists.inject.js +7562 -7675
- package/package.json +7 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkshopCraftListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/WorkshopCraftListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"WorkshopCraftListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/WorkshopCraftListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI3D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACpF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,4BAA4B,GAAG,sBAAsB,GAC/D,6BAA6B,GAC7B,yBAAyB,GACzB,6BAA6B,GAC7B,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAElC,qBAAa,qBAAsB,SAAQ,eAAe,CAAC,iBAAiB,CAAC;IAC3E,SAAiB,OAAO,EAAE,4BAA4B,CAAC;IACvD,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACtC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;gBAGpC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,iBAAiB,EAC1B,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC,EACvC,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,4BAA4B;IAmCvC,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -1,48 +1,47 @@
|
|
|
1
1
|
import stylesButton from "./Button.module.css";
|
|
2
|
+
import { LimitedButton } from "./buttons/LimitedButton.js";
|
|
3
|
+
import { MaxButton } from "./buttons/MaxButton.js";
|
|
4
|
+
import { TriggerButton } from "./buttons/TriggerButton.js";
|
|
2
5
|
import { Container } from "./Container.js";
|
|
3
6
|
import stylesLabelListItem from "./LabelListItem.module.css";
|
|
4
7
|
import stylesListItem from "./ListItem.module.css";
|
|
5
8
|
import { SettingListItem } from "./SettingListItem.js";
|
|
6
|
-
import { LimitedButton } from "./buttons/LimitedButton.js";
|
|
7
|
-
import { MaxButton } from "./buttons/MaxButton.js";
|
|
8
|
-
import { TriggerButton } from "./buttons/TriggerButton.js";
|
|
9
9
|
export class WorkshopCraftListItem extends SettingListItem {
|
|
10
10
|
limitedButton;
|
|
11
11
|
maxButton;
|
|
12
12
|
triggerButton;
|
|
13
|
-
constructor(
|
|
14
|
-
super(
|
|
15
|
-
this.limitedButton = new LimitedButton(
|
|
13
|
+
constructor(parent, setting, locale, label, options) {
|
|
14
|
+
super(parent, setting, label, options);
|
|
15
|
+
this.limitedButton = new LimitedButton(parent, setting, {
|
|
16
16
|
...options,
|
|
17
17
|
classes: [stylesListItem.headAction],
|
|
18
18
|
});
|
|
19
|
-
this.maxButton = new MaxButton(
|
|
19
|
+
this.maxButton = new MaxButton(parent, setting, {
|
|
20
20
|
alignment: "right",
|
|
21
21
|
border: false,
|
|
22
22
|
classes: [stylesButton.headAction],
|
|
23
|
-
onClick:
|
|
24
|
-
onRefresh: options?.onRefreshMax ? () => options.onRefreshMax?.(this) : undefined,
|
|
23
|
+
onClick: () => options.onSetMax.call(this),
|
|
24
|
+
onRefresh: options?.onRefreshMax ? () => options.onRefreshMax?.call(this) : undefined,
|
|
25
25
|
});
|
|
26
|
-
this.triggerButton = new TriggerButton(
|
|
26
|
+
this.triggerButton = new TriggerButton(parent, setting, locale, {
|
|
27
27
|
border: false,
|
|
28
28
|
classes: [stylesButton.lastHeadAction],
|
|
29
|
-
onClick:
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
onClick: async () => {
|
|
30
|
+
await options.onSetTrigger.call(this);
|
|
31
|
+
this.requestRefresh();
|
|
32
|
+
},
|
|
33
|
+
onRefresh: options?.onRefreshTrigger ? () => options.onRefreshTrigger?.call(this) : undefined,
|
|
34
|
+
renderLabel: options?.renderLabelTrigger ?? true,
|
|
33
35
|
});
|
|
34
|
-
this.
|
|
35
|
-
new Container(
|
|
36
|
+
this.addChildrenHead([
|
|
37
|
+
new Container(parent, { classes: [stylesLabelListItem.fillSpace] }),
|
|
36
38
|
this.limitedButton,
|
|
37
39
|
this.maxButton,
|
|
38
40
|
this.triggerButton,
|
|
39
41
|
]);
|
|
40
42
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.limitedButton.refreshUi();
|
|
44
|
-
this.maxButton.refreshUi();
|
|
45
|
-
this.triggerButton.refreshUi();
|
|
43
|
+
toString() {
|
|
44
|
+
return `[${WorkshopCraftListItem.name}#${this.componentId}]`;
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
//# sourceMappingURL=WorkshopCraftListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkshopCraftListItem.js","sourceRoot":"","sources":["../../../source/ui/components/WorkshopCraftListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkshopCraftListItem.js","sourceRoot":"","sources":["../../../source/ui/components/WorkshopCraftListItem.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,eAAe,EAA+B,MAAM,sBAAsB,CAAC;AAWpF,MAAM,OAAO,qBAAsB,SAAQ,eAAkC;IAElE,aAAa,CAAgB;IAC7B,SAAS,CAAY;IACrB,aAAa,CAAgB;IAEtC,YACE,MAAmB,EACnB,OAA0B,EAC1B,MAAuC,EACvC,KAAa,EACb,OAAqC;QA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AE,EAAE,OAAO,EAAE,CAAC,mBAAmB,CAAC,SAAS,CAAC,EAAE,CAAC;YACnE,IAAI,CAAC,aAAa;YAClB,IAAI,CAAC,SAAS;YACd,IAAI,CAAC,aAAa;SACnB,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,qBAAqB,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IAC/D,CAAC;CACF"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { SupportedLocale } from "../../../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../../../KittenScientists.js";
|
|
3
2
|
import type { ResourcesSettingsItem } from "../../../settings/ResourcesSettings.js";
|
|
4
3
|
import type { SettingOptions } from "../../../settings/Settings.js";
|
|
5
4
|
import { Button, type ButtonOptions } from "../Button.js";
|
|
5
|
+
import type { UiComponent } from "../UiComponent.js";
|
|
6
|
+
export type ConsumeButtonOptions = ThisType<ConsumeButton> & ButtonOptions;
|
|
6
7
|
export declare class ConsumeButton extends Button {
|
|
8
|
+
readonly options: ConsumeButtonOptions;
|
|
7
9
|
readonly setting: ResourcesSettingsItem;
|
|
8
10
|
readonly resourceName: string;
|
|
9
|
-
constructor(
|
|
10
|
-
|
|
11
|
+
constructor(parent: UiComponent, setting: ResourcesSettingsItem, locale: SettingOptions<SupportedLocale>, resourceName: string, options: Omit<ConsumeButtonOptions, "onClick">);
|
|
12
|
+
toString(): string;
|
|
11
13
|
}
|
|
12
14
|
//# sourceMappingURL=ConsumeButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsumeButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/ConsumeButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConsumeButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/ConsumeButton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,aAAa,CAAC;AAE3E,qBAAa,aAAc,SAAQ,MAAM;IACvC,SAAiB,OAAO,EAAE,oBAAoB,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;gBAG5B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC,EACvC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAgDhD,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { redirectErrorsToConsole } from "@oliversalzburg/js-utils/errors/console.js";
|
|
2
1
|
import { Icons } from "../../../images/Icons.js";
|
|
3
2
|
import { Button } from "../Button.js";
|
|
4
3
|
import stylesButton from "../Button.module.css";
|
|
@@ -6,43 +5,37 @@ import { Dialog } from "../Dialog.js";
|
|
|
6
5
|
export class ConsumeButton extends Button {
|
|
7
6
|
setting;
|
|
8
7
|
resourceName;
|
|
9
|
-
constructor(
|
|
10
|
-
super(
|
|
8
|
+
constructor(parent, setting, locale, resourceName, options) {
|
|
9
|
+
super(parent, "", Icons.DataUsage, {
|
|
11
10
|
...options,
|
|
12
|
-
onClick: () => {
|
|
13
|
-
Dialog.prompt(
|
|
11
|
+
onClick: async () => {
|
|
12
|
+
const value = await Dialog.prompt(parent, parent.host.engine.i18n("resources.consume.prompt"), parent.host.engine.i18n("resources.consume.promptTitle", [
|
|
14
13
|
resourceName,
|
|
15
|
-
host.renderPercentage(setting.consume, locale.selected, true),
|
|
16
|
-
]), host.renderPercentage(setting.consume), host.engine.i18n("resources.consume.promptExplainer"))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.catch(redirectErrorsToConsole(console));
|
|
14
|
+
parent.host.renderPercentage(setting.consume, locale.selected, true),
|
|
15
|
+
]), parent.host.renderPercentage(setting.consume), parent.host.engine.i18n("resources.consume.promptExplainer"));
|
|
16
|
+
if (value === undefined) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (value === "" || value.startsWith("-")) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
setting.consume = parent.host.parsePercentage(value);
|
|
23
|
+
},
|
|
24
|
+
onRefresh: () => {
|
|
25
|
+
const consumeValue = this.host.renderPercentage(this.setting.consume, this.host.engine.settings.locale.selected, true);
|
|
26
|
+
const title = this.setting.consume === 0
|
|
27
|
+
? this.host.engine.i18n("resources.consume.titleZero", [this.resourceName])
|
|
28
|
+
: this.host.engine.i18n("resources.consume.title", [consumeValue, this.resourceName]);
|
|
29
|
+
this.updateTitle(title);
|
|
30
|
+
options?.onRefresh?.();
|
|
33
31
|
},
|
|
34
32
|
});
|
|
35
33
|
this.element.addClass(stylesButton.consumeButton);
|
|
36
34
|
this.resourceName = resourceName;
|
|
37
35
|
this.setting = setting;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const consumeValue = this._host.renderPercentage(this.setting.consume, this._host.engine.settings.locale.selected, true);
|
|
42
|
-
const title = this.setting.consume === 0
|
|
43
|
-
? this._host.engine.i18n("resources.consume.titleZero", [this.resourceName])
|
|
44
|
-
: this._host.engine.i18n("resources.consume.title", [consumeValue, this.resourceName]);
|
|
45
|
-
this.updateTitle(title);
|
|
37
|
+
toString() {
|
|
38
|
+
return `[${ConsumeButton.name}#${this.componentId}]`;
|
|
46
39
|
}
|
|
47
40
|
}
|
|
48
41
|
//# sourceMappingURL=ConsumeButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConsumeButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/ConsumeButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ConsumeButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/ConsumeButton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAGjD,OAAO,EAAE,MAAM,EAAsB,MAAM,cAAc,CAAC;AAC1D,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAKtC,MAAM,OAAO,aAAc,SAAQ,MAAM;IAE9B,OAAO,CAAwB;IAC/B,YAAY,CAAS;IAE9B,YACE,MAAmB,EACnB,OAA8B,EAC9B,MAAuC,EACvC,YAAoB,EACpB,OAA8C;QAE9C,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,EAAE;YACjC,GAAG,OAAO;YACV,OAAO,EAAE,KAAK,IAAI,EAAE;gBAClB,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,MAAM,CAC/B,MAAM,EACN,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,CAAC,EACnD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,+BAA+B,EAAE;oBACvD,YAAY;oBACZ,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC;iBACrE,CAAC,EACF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AAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../../KittenScientists.js";
|
|
2
1
|
import { UiComponent, type UiComponentOptions } from "../UiComponent.js";
|
|
2
|
+
export type ExpandoButtonOptions = ThisType<ExpandoButton> & UiComponentOptions & {
|
|
3
|
+
readonly onClick?: (event?: MouseEvent) => void | Promise<void>;
|
|
4
|
+
};
|
|
3
5
|
export declare class ExpandoButton extends UiComponent {
|
|
6
|
+
readonly options: ExpandoButtonOptions;
|
|
4
7
|
readonly element: JQuery;
|
|
5
8
|
ineffective: boolean;
|
|
6
9
|
/**
|
|
@@ -10,9 +13,9 @@ export declare class ExpandoButton extends UiComponent {
|
|
|
10
13
|
* @param host A reference to the host.
|
|
11
14
|
* @param options Options for this expando.
|
|
12
15
|
*/
|
|
13
|
-
constructor(
|
|
16
|
+
constructor(parent: UiComponent, options?: ExpandoButtonOptions);
|
|
17
|
+
toString(): string;
|
|
14
18
|
setCollapsed(): void;
|
|
15
19
|
setExpanded(): void;
|
|
16
|
-
refreshUi(): void;
|
|
17
20
|
}
|
|
18
21
|
//# sourceMappingURL=ExpandoButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandoButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/ExpandoButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpandoButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/ExpandoButton.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGzE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,GACxD,kBAAkB,GAAG;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC;AAE3F,qBAAa,aAAc,SAAQ,WAAW;IAC5C,SAAiB,OAAO,EAAE,oBAAoB,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IAErB;;;;;;OAMG;gBACS,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,oBAAoB;IA2B/D,QAAQ,IAAI,MAAM;IAIlB,YAAY;IAIZ,WAAW;CAIZ"}
|
|
@@ -12,37 +12,40 @@ export class ExpandoButton extends UiComponent {
|
|
|
12
12
|
* @param host A reference to the host.
|
|
13
13
|
* @param options Options for this expando.
|
|
14
14
|
*/
|
|
15
|
-
constructor(
|
|
16
|
-
super(
|
|
17
|
-
|
|
15
|
+
constructor(parent, options) {
|
|
16
|
+
super(parent, {
|
|
17
|
+
...options,
|
|
18
|
+
onRefresh: () => {
|
|
19
|
+
if (this.ineffective) {
|
|
20
|
+
this.element.addClass(stylesButton.ineffective);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
this.element.removeClass(stylesButton.ineffective);
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
this.element = $("<div/>", {
|
|
18
28
|
html: `
|
|
19
29
|
<svg style="width: 18px; height: 18px;" viewBox="0 -960 960 960" fill="currentColor" class="${styles.down}"><path d="${Icons.ExpandCircleDown}"/></svg>
|
|
20
30
|
<svg style="width: 18px; height: 18px;" viewBox="0 -960 960 960" fill="currentColor" class="${styles.up}"><path d="${Icons.ExpandCircleUp}"/></svg>
|
|
21
31
|
`,
|
|
22
|
-
title: host.engine.i18n("ui.itemsShow"),
|
|
32
|
+
title: parent.host.engine.i18n("ui.itemsShow"),
|
|
23
33
|
})
|
|
24
34
|
.addClass(stylesButton.iconButton)
|
|
25
35
|
.addClass(styles.expandoButton);
|
|
26
|
-
this.element
|
|
27
|
-
this.addChildren(options?.children);
|
|
36
|
+
this.element.on("click", () => options?.onClick?.call(this));
|
|
28
37
|
this.ineffective = false;
|
|
29
38
|
}
|
|
39
|
+
toString() {
|
|
40
|
+
return `[${ExpandoButton.name}#${this.componentId}]`;
|
|
41
|
+
}
|
|
30
42
|
setCollapsed() {
|
|
31
43
|
this.element.removeClass(styles.expanded);
|
|
32
|
-
this.element.prop("title", this.
|
|
44
|
+
this.element.prop("title", this.host.engine.i18n("ui.itemsShow"));
|
|
33
45
|
}
|
|
34
46
|
setExpanded() {
|
|
35
47
|
this.element.addClass(styles.expanded);
|
|
36
|
-
this.element.prop("title", this.
|
|
37
|
-
}
|
|
38
|
-
refreshUi() {
|
|
39
|
-
super.refreshUi();
|
|
40
|
-
if (this.ineffective) {
|
|
41
|
-
this.element.addClass(stylesButton.ineffective);
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
this.element.removeClass(stylesButton.ineffective);
|
|
45
|
-
}
|
|
48
|
+
this.element.prop("title", this.host.engine.i18n("ui.itemsHide"));
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
//# sourceMappingURL=ExpandoButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandoButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/ExpandoButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExpandoButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/ExpandoButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAA2B,MAAM,mBAAmB,CAAC;AACzE,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAKhD,MAAM,OAAO,aAAc,SAAQ,WAAW;IAEnC,OAAO,CAAS;IACzB,WAAW,CAAU;IAErB;;;;;;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pE,CAAC;IACD,WAAW;QACT,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IACpE,CAAC;CACF"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../../KittenScientists.js";
|
|
2
1
|
import type { SettingLimited } from "../../../settings/Settings.js";
|
|
3
|
-
import { Button } from "../Button.js";
|
|
4
|
-
import type {
|
|
5
|
-
export type LimitedButtonOptions =
|
|
6
|
-
readonly onLimitedCheck
|
|
7
|
-
readonly onLimitedUnCheck
|
|
2
|
+
import { Button, type ButtonOptions } from "../Button.js";
|
|
3
|
+
import type { UiComponent } from "../UiComponent.js";
|
|
4
|
+
export type LimitedButtonOptions = ThisType<LimitedButton> & ButtonOptions & {
|
|
5
|
+
readonly onLimitedCheck?: () => void;
|
|
6
|
+
readonly onLimitedUnCheck?: () => void;
|
|
8
7
|
};
|
|
9
8
|
export declare class LimitedButton extends Button {
|
|
9
|
+
readonly options: LimitedButtonOptions;
|
|
10
10
|
readonly setting: SettingLimited;
|
|
11
|
-
constructor(
|
|
12
|
-
|
|
11
|
+
constructor(parent: UiComponent, setting: SettingLimited, options: Omit<LimitedButtonOptions, "onClick">);
|
|
12
|
+
toString(): string;
|
|
13
13
|
}
|
|
14
14
|
//# sourceMappingURL=LimitedButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LimitedButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/LimitedButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LimitedButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/LimitedButton.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,GACxD,aAAa,GAAG;IACd,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CACxC,CAAC;AAEJ,qBAAa,aAAc,SAAQ,MAAM;IACvC,SAAiB,OAAO,EAAE,oBAAoB,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;gBAG/B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAoChD,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -3,32 +3,38 @@ import { Button } from "../Button.js";
|
|
|
3
3
|
import stylesButton from "../Button.module.css";
|
|
4
4
|
export class LimitedButton extends Button {
|
|
5
5
|
setting;
|
|
6
|
-
constructor(
|
|
7
|
-
super(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
constructor(parent, setting, options) {
|
|
7
|
+
super(parent, "", Icons.Eco, {
|
|
8
|
+
...options,
|
|
9
|
+
border: false,
|
|
10
|
+
classes: [],
|
|
11
|
+
onClick: () => {
|
|
12
|
+
this.setting.limited = !this.setting.limited;
|
|
13
|
+
if (this.setting.limited) {
|
|
14
|
+
options?.onLimitedCheck?.call(this);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
options?.onLimitedUnCheck?.call(this);
|
|
18
|
+
}
|
|
19
|
+
this.requestRefresh();
|
|
20
|
+
},
|
|
21
|
+
onRefresh: () => {
|
|
22
|
+
this.updateTitle(this.host.engine.i18n(this.setting.limited ? "ui.limited.on" : "ui.limited.off"));
|
|
23
|
+
if (this.setting.limited && !this.inactive) {
|
|
24
|
+
this.element.removeClass(stylesButton.inactive);
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
this.element.addClass(stylesButton.inactive);
|
|
28
|
+
}
|
|
29
|
+
},
|
|
18
30
|
});
|
|
31
|
+
this.setting = setting;
|
|
19
32
|
for (const className of options?.classes ?? []) {
|
|
20
33
|
this.element.addClass(className);
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.updateTitle(this._host.engine.i18n(this.setting.limited ? "ui.limited.on" : "ui.limited.off"));
|
|
26
|
-
if (this.setting.limited && !this.inactive) {
|
|
27
|
-
this.element.removeClass(stylesButton.inactive);
|
|
28
|
-
}
|
|
29
|
-
else {
|
|
30
|
-
this.element.addClass(stylesButton.inactive);
|
|
31
|
-
}
|
|
36
|
+
toString() {
|
|
37
|
+
return `[${LimitedButton.name}#${this.componentId}]`;
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
//# sourceMappingURL=LimitedButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LimitedButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/LimitedButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LimitedButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/LimitedButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAsB,MAAM,cAAc,CAAC;AAC1D,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAShD,MAAM,OAAO,aAAc,SAAQ,MAAM;IAE9B,OAAO,CAAiB;IAEjC,YACE,MAAmB,EACnB,OAAuB,EACvB,OAA8C;QAE9C,KAAK,CAAC,MAAM,EAAE,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C,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../../KittenScientists.js";
|
|
2
1
|
import type { SettingMax } from "../../../settings/Settings.js";
|
|
3
2
|
import { Button, type ButtonOptions } from "../Button.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
3
|
+
import type { UiComponent } from "../UiComponent.js";
|
|
4
|
+
export type MaxButtonOptions = ThisType<MaxButton> & ButtonOptions;
|
|
7
5
|
export declare class MaxButton extends Button {
|
|
6
|
+
readonly options: MaxButtonOptions;
|
|
8
7
|
readonly setting: SettingMax;
|
|
9
|
-
constructor(
|
|
8
|
+
constructor(parent: UiComponent, setting: SettingMax, options: MaxButtonOptions);
|
|
9
|
+
toString(): string;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=MaxButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaxButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/MaxButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MaxButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/MaxButton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC;AAEnE,qBAAa,SAAU,SAAQ,MAAM;IACnC,SAAiB,OAAO,EAAE,gBAAgB,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;gBAEjB,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,gBAAgB;IAS/E,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { isNil } from "@oliversalzburg/js-utils/data/nil.js";
|
|
2
|
-
import { InvalidOperationError } from "@oliversalzburg/js-utils/errors/InvalidOperationError.js";
|
|
3
1
|
import { Button } from "../Button.js";
|
|
4
2
|
import styles from "./MaxButton.module.css";
|
|
5
3
|
export class MaxButton extends Button {
|
|
6
4
|
setting;
|
|
7
|
-
constructor(
|
|
8
|
-
super(
|
|
5
|
+
constructor(parent, setting, options) {
|
|
6
|
+
super(parent, "", null, {
|
|
9
7
|
...options,
|
|
10
8
|
classes: [styles.maxButton, ...(options?.classes ?? [])],
|
|
11
9
|
});
|
|
12
|
-
if (isNil(options?.onClick)) {
|
|
13
|
-
throw new InvalidOperationError("Missing click handler on MaxButton.");
|
|
14
|
-
}
|
|
15
10
|
this.setting = setting;
|
|
16
11
|
}
|
|
12
|
+
toString() {
|
|
13
|
+
return `[${MaxButton.name}#${this.componentId}]`;
|
|
14
|
+
}
|
|
17
15
|
}
|
|
18
16
|
//# sourceMappingURL=MaxButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaxButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/MaxButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MaxButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/MaxButton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAsB,MAAM,cAAc,CAAC;AAE1D,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAI5C,MAAM,OAAO,SAAU,SAAQ,MAAM;IAE1B,OAAO,CAAa;IAE7B,YAAY,MAAmB,EAAE,OAAmB,EAAE,OAAyB;QAC7E,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE;YACtB,GAAG,OAAO;YACV,OAAO,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,CAAC,CAAC;SACzD,CAAC,CAAC;QAEH,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,SAAS,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IACnD,CAAC;CACF"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../../KittenScientists.js";
|
|
2
1
|
import { UiComponent, type UiComponentOptions } from "../UiComponent.js";
|
|
2
|
+
export type PaddingButtonOptions = ThisType<PaddingButton> & UiComponentOptions;
|
|
3
3
|
export declare class PaddingButton extends UiComponent {
|
|
4
|
+
readonly options: PaddingButtonOptions;
|
|
4
5
|
readonly element: JQuery;
|
|
5
6
|
/**
|
|
6
7
|
* Constructs an empty element that provides padding identical to an icon button.
|
|
@@ -8,6 +9,7 @@ export declare class PaddingButton extends UiComponent {
|
|
|
8
9
|
* @param host - A reference to the host.
|
|
9
10
|
* @param options - Options for this button.
|
|
10
11
|
*/
|
|
11
|
-
constructor(
|
|
12
|
+
constructor(parent: UiComponent, options?: PaddingButtonOptions);
|
|
13
|
+
toString(): string;
|
|
12
14
|
}
|
|
13
15
|
//# sourceMappingURL=PaddingButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaddingButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/PaddingButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaddingButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/PaddingButton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,kBAAkB,CAAC;AAEhF,qBAAa,aAAc,SAAQ,WAAW;IAC5C,SAAiB,OAAO,EAAE,oBAAoB,CAAC;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;gBACS,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,oBAAoB;IAU/D,QAAQ,IAAI,MAAM;CAGnB"}
|
|
@@ -8,13 +8,15 @@ export class PaddingButton extends UiComponent {
|
|
|
8
8
|
* @param host - A reference to the host.
|
|
9
9
|
* @param options - Options for this button.
|
|
10
10
|
*/
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
11
|
+
constructor(parent, options) {
|
|
12
|
+
super(parent, { ...options });
|
|
13
13
|
const element = $("<div/>", {
|
|
14
14
|
html: `<svg style="width: 18px; height: 18px;"></svg>`,
|
|
15
15
|
}).addClass(stylesButton.iconButton);
|
|
16
16
|
this.element = element;
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
toString() {
|
|
19
|
+
return `[${PaddingButton.name}#${this.componentId}]`;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
//# sourceMappingURL=PaddingButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaddingButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/PaddingButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaddingButton.js","sourceRoot":"","sources":["../../../../source/ui/components/buttons/PaddingButton.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAA2B,MAAM,mBAAmB,CAAC;AAIzE,MAAM,OAAO,aAAc,SAAQ,WAAW;IAEnC,OAAO,CAAS;IAEzB;;;;;OAKG;IACH,YAAY,MAAmB,EAAE,OAA8B;QAC7D,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,MAAM,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE;YAC1B,IAAI,EAAE,gDAAgD;SACvD,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAErC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { SupportedLocale } from "../../../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../../../KittenScientists.js";
|
|
3
2
|
import type { ResourcesSettingsItem } from "../../../settings/ResourcesSettings.js";
|
|
4
3
|
import type { SettingOptions } from "../../../settings/Settings.js";
|
|
5
4
|
import { Button, type ButtonOptions } from "../Button.js";
|
|
5
|
+
import type { UiComponent } from "../UiComponent.js";
|
|
6
|
+
export type StockButtonOptions = ThisType<StockButton> & ButtonOptions;
|
|
6
7
|
export declare class StockButton extends Button {
|
|
8
|
+
readonly options: StockButtonOptions;
|
|
7
9
|
readonly setting: ResourcesSettingsItem;
|
|
8
10
|
readonly resourceName: string;
|
|
9
|
-
constructor(
|
|
10
|
-
|
|
11
|
+
constructor(parent: UiComponent, setting: ResourcesSettingsItem, locale: SettingOptions<SupportedLocale>, resourceName: string, options: Omit<StockButtonOptions, "onClick">);
|
|
12
|
+
toString(): string;
|
|
11
13
|
}
|
|
12
14
|
//# sourceMappingURL=StockButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StockButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/StockButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StockButton.d.ts","sourceRoot":"","sources":["../../../../source/ui/components/buttons/StockButton.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,cAAc,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,WAAW,CAAC,GAAG,aAAa,CAAC;AAEvE,qBAAa,WAAY,SAAQ,MAAM;IACrC,SAAiB,OAAO,EAAE,kBAAkB,CAAC;IAC7C,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;gBAG5B,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,qBAAqB,EAC9B,MAAM,EAAE,cAAc,CAAC,eAAe,CAAC,EACvC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC;IAoD9C,QAAQ,IAAI,MAAM;CAGnB"}
|