@kitten-science/kitten-scientists 2.0.0-beta.10-20250403-28002ba → 2.0.0-beta.10-dev-2a02d77
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/KittenScientists.d.ts +1 -1
- package/lib/KittenScientists.d.ts.map +1 -1
- package/lib/KittenScientists.js +6 -6
- package/lib/KittenScientists.js.map +1 -1
- package/lib/ReligionManager.js +1 -1
- package/lib/ReligionManager.js.map +1 -1
- package/lib/TimeControlManager.js +2 -2
- package/lib/TimeControlManager.js.map +1 -1
- package/lib/TradeManager.d.ts.map +1 -1
- package/lib/TradeManager.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/ui/BonfireSettingsUi.d.ts +4 -5
- package/lib/ui/BonfireSettingsUi.d.ts.map +1 -1
- package/lib/ui/BonfireSettingsUi.js +96 -111
- 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 +47 -56
- 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 +13 -20
- 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 +48 -61
- package/lib/ui/EmbassySettingsUi.js.map +1 -1
- package/lib/ui/EngineSettingsUi.d.ts +2 -2
- package/lib/ui/EngineSettingsUi.d.ts.map +1 -1
- package/lib/ui/EngineSettingsUi.js +10 -8
- 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 +43 -53
- 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 +13 -18
- 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 +13 -20
- package/lib/ui/PolicySettingsUi.js.map +1 -1
- package/lib/ui/ReligionSettingsUi.d.ts +4 -5
- package/lib/ui/ReligionSettingsUi.d.ts.map +1 -1
- package/lib/ui/ReligionSettingsUi.js +108 -132
- 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 +30 -36
- 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 +42 -51
- 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 +24 -31
- 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 +14 -19
- 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 +30 -39
- 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 +32 -41
- 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 +16 -20
- package/lib/ui/ResourcesSettingsUi.js.map +1 -1
- package/lib/ui/ScienceSettingsUi.d.ts +2 -4
- package/lib/ui/ScienceSettingsUi.d.ts.map +1 -1
- package/lib/ui/ScienceSettingsUi.js +16 -35
- 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 +43 -54
- package/lib/ui/SpaceSettingsUi.js.map +1 -1
- package/lib/ui/StateManagementUi.d.ts +2 -2
- package/lib/ui/StateManagementUi.d.ts.map +1 -1
- package/lib/ui/StateManagementUi.js +162 -169
- 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 +51 -69
- 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 +22 -34
- 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 +55 -62
- 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 +28 -44
- 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 +75 -103
- 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 +102 -115
- 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 +50 -66
- package/lib/ui/UpgradeSettingsUi.js.map +1 -1
- package/lib/ui/UserInterface.d.ts +3 -0
- package/lib/ui/UserInterface.d.ts.map +1 -1
- package/lib/ui/UserInterface.js +37 -19
- 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 +87 -105
- 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 +82 -103
- package/lib/ui/WorkshopSettingsUi.js.map +1 -1
- package/lib/ui/components/Button.d.ts +9 -8
- package/lib/ui/components/Button.d.ts.map +1 -1
- package/lib/ui/components/Button.js +8 -6
- 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 -11
- package/lib/ui/components/CollapsiblePanel.d.ts.map +1 -1
- package/lib/ui/components/CollapsiblePanel.js +42 -25
- package/lib/ui/components/CollapsiblePanel.js.map +1 -1
- package/lib/ui/components/Container.d.ts +7 -2
- package/lib/ui/components/Container.d.ts.map +1 -1
- package/lib/ui/components/Container.js +6 -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 +3 -2
- package/lib/ui/components/Delimiter.d.ts.map +1 -1
- package/lib/ui/components/Delimiter.js +6 -2
- package/lib/ui/components/Delimiter.js.map +1 -1
- package/lib/ui/components/Dialog.d.ts +14 -6
- package/lib/ui/components/Dialog.d.ts.map +1 -1
- package/lib/ui/components/Dialog.js +66 -40
- package/lib/ui/components/Dialog.js.map +1 -1
- package/lib/ui/components/ExplainerListItem.d.ts +5 -2
- package/lib/ui/components/ExplainerListItem.d.ts.map +1 -1
- package/lib/ui/components/ExplainerListItem.js +7 -4
- package/lib/ui/components/ExplainerListItem.js.map +1 -1
- package/lib/ui/components/Fieldset.d.ts +6 -4
- package/lib/ui/components/Fieldset.d.ts.map +1 -1
- package/lib/ui/components/Fieldset.js +6 -3
- package/lib/ui/components/Fieldset.js.map +1 -1
- package/lib/ui/components/HeaderListItem.d.ts +6 -3
- package/lib/ui/components/HeaderListItem.d.ts.map +1 -1
- package/lib/ui/components/HeaderListItem.js +6 -3
- package/lib/ui/components/HeaderListItem.js.map +1 -1
- package/lib/ui/components/IconButton.d.ts +8 -6
- package/lib/ui/components/IconButton.d.ts.map +1 -1
- package/lib/ui/components/IconButton.js +6 -5
- 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 +6 -3
- package/lib/ui/components/Input.d.ts.map +1 -1
- package/lib/ui/components/Input.js +6 -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 +9 -6
- package/lib/ui/components/ListItem.d.ts.map +1 -1
- package/lib/ui/components/ListItem.js +6 -3
- package/lib/ui/components/ListItem.js.map +1 -1
- package/lib/ui/components/OptionsListItem.d.ts +6 -5
- package/lib/ui/components/OptionsListItem.d.ts.map +1 -1
- package/lib/ui/components/OptionsListItem.js +7 -5
- package/lib/ui/components/OptionsListItem.js.map +1 -1
- package/lib/ui/components/Paragraph.d.ts +7 -2
- package/lib/ui/components/Paragraph.d.ts.map +1 -1
- package/lib/ui/components/Paragraph.js +6 -3
- package/lib/ui/components/Paragraph.js.map +1 -1
- package/lib/ui/components/RadioItem.d.ts +9 -7
- package/lib/ui/components/RadioItem.d.ts.map +1 -1
- package/lib/ui/components/RadioItem.js +9 -7
- 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 +7 -7
- package/lib/ui/components/SettingLimitedListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedListItem.js +7 -8
- package/lib/ui/components/SettingLimitedListItem.js.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts +7 -6
- package/lib/ui/components/SettingLimitedTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingLimitedTriggerListItem.js +12 -11
- package/lib/ui/components/SettingLimitedTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingListItem.d.ts +11 -11
- package/lib/ui/components/SettingListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingListItem.js +16 -20
- package/lib/ui/components/SettingListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxListItem.d.ts +7 -7
- package/lib/ui/components/SettingMaxListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxListItem.js +12 -10
- package/lib/ui/components/SettingMaxListItem.js.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts +9 -6
- package/lib/ui/components/SettingMaxTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingMaxTriggerListItem.js +19 -14
- package/lib/ui/components/SettingMaxTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.d.ts +8 -7
- package/lib/ui/components/SettingTriggerListItem.d.ts.map +1 -1
- package/lib/ui/components/SettingTriggerListItem.js +15 -12
- package/lib/ui/components/SettingTriggerListItem.js.map +1 -1
- package/lib/ui/components/SettingsList.d.ts +13 -11
- package/lib/ui/components/SettingsList.d.ts.map +1 -1
- package/lib/ui/components/SettingsList.js +15 -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 -6
- package/lib/ui/components/TextButton.d.ts.map +1 -1
- package/lib/ui/components/TextButton.js +7 -5
- 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 +32 -18
- package/lib/ui/components/UiComponent.d.ts.map +1 -1
- package/lib/ui/components/UiComponent.js +50 -19
- package/lib/ui/components/UiComponent.js.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.d.ts +8 -7
- package/lib/ui/components/WorkshopCraftListItem.d.ts.map +1 -1
- package/lib/ui/components/WorkshopCraftListItem.js +17 -18
- package/lib/ui/components/WorkshopCraftListItem.js.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.d.ts +5 -2
- package/lib/ui/components/buttons/ConsumeButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ConsumeButton.js +19 -26
- package/lib/ui/components/buttons/ConsumeButton.js.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.d.ts +6 -2
- package/lib/ui/components/buttons/ExpandoButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/ExpandoButton.js +10 -9
- package/lib/ui/components/buttons/ExpandoButton.js.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.d.ts +8 -7
- package/lib/ui/components/buttons/LimitedButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/LimitedButton.js +20 -13
- 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 +5 -2
- package/lib/ui/components/buttons/PaddingButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/PaddingButton.js +6 -3
- package/lib/ui/components/buttons/PaddingButton.js.map +1 -1
- package/lib/ui/components/buttons/StockButton.d.ts +5 -2
- package/lib/ui/components/buttons/StockButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/StockButton.js +25 -32
- package/lib/ui/components/buttons/StockButton.js.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.d.ts +6 -5
- package/lib/ui/components/buttons/TriggerButton.d.ts.map +1 -1
- package/lib/ui/components/buttons/TriggerButton.js +11 -12
- package/lib/ui/components/buttons/TriggerButton.js.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.d.ts +6 -5
- package/lib/ui/components/buttons-text/BuyButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/BuyButton.js +19 -26
- package/lib/ui/components/buttons-text/BuyButton.js.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.d.ts +6 -5
- package/lib/ui/components/buttons-text/SellButton.d.ts.map +1 -1
- package/lib/ui/components/buttons-text/SellButton.js +19 -28
- package/lib/ui/components/buttons-text/SellButton.js.map +1 -1
- package/output/kitten-scientists.inject.js +2427 -2536
- package/package.json +4 -4
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { TranslatedString } from "../../Engine.js";
|
|
2
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
3
2
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
3
|
+
export type ExplainerListItemOptions<TKittenGameLiteral extends `$${string}`> = UiComponentOptions & ThisType<ExplainerListItem<TKittenGameLiteral>>;
|
|
4
4
|
export declare class ExplainerListItem<TKittenGameLiteral extends `$${string}`> extends UiComponent {
|
|
5
|
+
readonly options: ExplainerListItemOptions<TKittenGameLiteral>;
|
|
5
6
|
readonly element: JQuery;
|
|
6
7
|
/**
|
|
7
8
|
* Construct an element to explain an area of the UI.
|
|
@@ -11,6 +12,8 @@ export declare class ExplainerListItem<TKittenGameLiteral extends `$${string}`>
|
|
|
11
12
|
* @param key - The i18n key for the text to appear on the element.
|
|
12
13
|
* @param options - Options for this explainer.
|
|
13
14
|
*/
|
|
14
|
-
constructor(
|
|
15
|
+
constructor(parent: UiComponent, key: TranslatedString<TKittenGameLiteral>, options?: ExplainerListItemOptions<TKittenGameLiteral>);
|
|
16
|
+
toString(): string;
|
|
17
|
+
refreshUi(): void;
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=ExplainerListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplainerListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/ExplainerListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ExplainerListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/ExplainerListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,wBAAwB,CAAC,kBAAkB,SAAS,IAAI,MAAM,EAAE,IAAI,kBAAkB,GAChG,QAAQ,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAElD,qBAAa,iBAAiB,CAAC,kBAAkB,SAAS,IAAI,MAAM,EAAE,CAAE,SAAQ,WAAW;IACzF,SAAiB,OAAO,EAAE,wBAAwB,CAAC,kBAAkB,CAAC,CAAC;IACvE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;;OAOG;gBAED,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,EACzC,OAAO,CAAC,EAAE,wBAAwB,CAAC,kBAAkB,CAAC;IASxD,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,IAAI;CAClB"}
|
|
@@ -10,11 +10,14 @@ export class ExplainerListItem extends UiComponent {
|
|
|
10
10
|
* @param key - The i18n key for the text to appear on the element.
|
|
11
11
|
* @param options - Options for this explainer.
|
|
12
12
|
*/
|
|
13
|
-
constructor(
|
|
14
|
-
super(
|
|
15
|
-
const element = $("<li/>", { text: host.engine.i18n(key) }).addClass(styles.explainer);
|
|
13
|
+
constructor(parent, key, options) {
|
|
14
|
+
super(parent, { ...options });
|
|
15
|
+
const element = $("<li/>", { text: parent.host.engine.i18n(key) }).addClass(styles.explainer);
|
|
16
16
|
this.element = element;
|
|
17
|
-
this.addChildren(options?.children);
|
|
18
17
|
}
|
|
18
|
+
toString() {
|
|
19
|
+
return `[${ExplainerListItem.name}#${this.componentId}]`;
|
|
20
|
+
}
|
|
21
|
+
refreshUi() { }
|
|
19
22
|
}
|
|
20
23
|
//# sourceMappingURL=ExplainerListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExplainerListItem.js","sourceRoot":"","sources":["../../../source/ui/components/ExplainerListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExplainerListItem.js","sourceRoot":"","sources":["../../../source/ui/components/ExplainerListItem.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAKxE,MAAM,OAAO,iBAA2D,SAAQ,WAAW;IAEhF,OAAO,CAAS;IAEzB;;;;;;;OAOG;IACH,YACE,MAAmB,EACnB,GAAyC,EACzC,OAAsD;QAEtD,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QAE9F,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,iBAAiB,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IAC3D,CAAC;IAED,SAAS,KAAU,CAAC;CACrB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
3
|
-
export type FieldsetOptions = UiComponentOptions & {
|
|
4
|
-
readonly delimiter
|
|
2
|
+
export type FieldsetOptions = ThisType<Fieldset> & UiComponentOptions & {
|
|
3
|
+
readonly delimiter?: boolean;
|
|
5
4
|
};
|
|
6
5
|
export declare class Fieldset extends UiComponent {
|
|
6
|
+
readonly options: FieldsetOptions;
|
|
7
7
|
readonly element: JQuery;
|
|
8
8
|
/**
|
|
9
9
|
* Constructs a `Fieldset`.
|
|
@@ -12,6 +12,8 @@ export declare class Fieldset extends UiComponent {
|
|
|
12
12
|
* @param label The label on the fieldset.
|
|
13
13
|
* @param options Options for the fieldset.
|
|
14
14
|
*/
|
|
15
|
-
constructor(
|
|
15
|
+
constructor(parent: UiComponent, label: string, options?: FieldsetOptions);
|
|
16
|
+
toString(): string;
|
|
17
|
+
refreshUi(): void;
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=Fieldset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Fieldset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Fieldset.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Fieldset.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAC9C,kBAAkB,GAAG;IACnB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEJ,qBAAa,QAAS,SAAQ,WAAW;IACvC,SAAiB,OAAO,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;;OAMG;gBACS,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe;IAazE,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,IAAI;CAClB"}
|
|
@@ -11,8 +11,8 @@ export class Fieldset extends UiComponent {
|
|
|
11
11
|
* @param label The label on the fieldset.
|
|
12
12
|
* @param options Options for the fieldset.
|
|
13
13
|
*/
|
|
14
|
-
constructor(
|
|
15
|
-
super(
|
|
14
|
+
constructor(parent, label, options) {
|
|
15
|
+
super(parent, { ...options });
|
|
16
16
|
const element = $("<fieldset/>").addClass(styles.fieldset);
|
|
17
17
|
if (options?.delimiter) {
|
|
18
18
|
element.addClass(stylesDelimiter.delimiter);
|
|
@@ -20,7 +20,10 @@ export class Fieldset extends UiComponent {
|
|
|
20
20
|
const legend = $("<legend/>").text(label).addClass(stylesLabel.label);
|
|
21
21
|
element.append(legend);
|
|
22
22
|
this.element = element;
|
|
23
|
-
this.addChildren(options?.children);
|
|
24
23
|
}
|
|
24
|
+
toString() {
|
|
25
|
+
return `[${Fieldset.name}#${this.componentId}]`;
|
|
26
|
+
}
|
|
27
|
+
refreshUi() { }
|
|
25
28
|
}
|
|
26
29
|
//# sourceMappingURL=Fieldset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fieldset.js","sourceRoot":"","sources":["../../../source/ui/components/Fieldset.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Fieldset.js","sourceRoot":"","sources":["../../../source/ui/components/Fieldset.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,MAAM,MAAM,uBAAuB,CAAC;AAC3C,OAAO,WAAW,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAOxE,MAAM,OAAO,QAAS,SAAQ,WAAW;IAE9B,OAAO,CAAS;IAEzB;;;;;;OAMG;IACH,YAAY,MAAmB,EAAE,KAAa,EAAE,OAAyB;QACvE,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,MAAM,OAAO,GAAG,CAAC,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC3D,IAAI,OAAO,EAAE,SAAS,EAAE,CAAC;YACvB,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAC9C,CAAC;QACD,MAAM,MAAM,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACtE,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IAClD,CAAC;IAED,SAAS,KAAU,CAAC;CACrB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import type { ListItem, ListItemOptions } from "./ListItem.js";
|
|
3
2
|
import { UiComponent } from "./UiComponent.js";
|
|
4
|
-
export
|
|
3
|
+
export type HeaderListItemOptions = ThisType<HeaderListItem> & ListItemOptions;
|
|
4
|
+
export declare class HeaderListItem extends UiComponent implements ListItem {
|
|
5
|
+
readonly options: ListItemOptions;
|
|
5
6
|
readonly element: JQuery;
|
|
6
7
|
get elementLabel(): JQuery<HTMLElement>;
|
|
7
8
|
/**
|
|
@@ -12,6 +13,8 @@ export declare class HeaderListItem<TOptions extends ListItemOptions<UiComponent
|
|
|
12
13
|
* @param text The text to appear on the header element.
|
|
13
14
|
* @param options Options for the header.
|
|
14
15
|
*/
|
|
15
|
-
constructor(
|
|
16
|
+
constructor(parent: UiComponent, text: string, options?: ListItemOptions);
|
|
17
|
+
toString(): string;
|
|
18
|
+
refreshUi(): void;
|
|
16
19
|
}
|
|
17
20
|
//# sourceMappingURL=HeaderListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/HeaderListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/HeaderListItem.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC,cAAc,CAAC,GAAG,eAAe,CAAC;AAE/E,qBAAa,cAAe,SAAQ,WAAY,YAAW,QAAQ;IACjE,SAAiB,OAAO,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,IAAI,YAAY,wBAEf;IAED;;;;;;;OAOG;gBACS,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe;IAQxE,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,IAAI;CAClB"}
|
|
@@ -13,11 +13,14 @@ export class HeaderListItem extends UiComponent {
|
|
|
13
13
|
* @param text The text to appear on the header element.
|
|
14
14
|
* @param options Options for the header.
|
|
15
15
|
*/
|
|
16
|
-
constructor(
|
|
17
|
-
super(
|
|
16
|
+
constructor(parent, text, options) {
|
|
17
|
+
super(parent, { ...options });
|
|
18
18
|
const element = $("<li/>", { text }).addClass(styles.header);
|
|
19
19
|
this.element = element;
|
|
20
|
-
this.addChildren(options?.children);
|
|
21
20
|
}
|
|
21
|
+
toString() {
|
|
22
|
+
return `[${HeaderListItem.name}#${this.componentId}]: '${this.elementLabel.text()}'`;
|
|
23
|
+
}
|
|
24
|
+
refreshUi() { }
|
|
22
25
|
}
|
|
23
26
|
//# sourceMappingURL=HeaderListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderListItem.js","sourceRoot":"","sources":["../../../source/ui/components/HeaderListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderListItem.js","sourceRoot":"","sources":["../../../source/ui/components/HeaderListItem.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,6BAA6B,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI/C,MAAM,OAAO,cAAe,SAAQ,WAAW;IAEpC,OAAO,CAAS;IACzB,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED;;;;;;;OAOG;IACH,YAAY,MAAmB,EAAE,IAAY,EAAE,OAAyB;QACtE,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAE7D,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,cAAc,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;IACvF,CAAC;IAED,SAAS,KAAU,CAAC;CACrB"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
3
|
-
export type IconButtonOptions = UiComponentOptions & {
|
|
4
|
-
readonly readOnly
|
|
5
|
-
readonly inactive
|
|
2
|
+
export type IconButtonOptions = ThisType<IconButton> & UiComponentOptions & {
|
|
3
|
+
readonly readOnly?: boolean;
|
|
4
|
+
readonly inactive?: boolean;
|
|
5
|
+
readonly onClick: (event?: MouseEvent) => void | Promise<void>;
|
|
6
6
|
};
|
|
7
7
|
/**
|
|
8
8
|
* A button that is visually represented through an SVG element.
|
|
9
9
|
*/
|
|
10
10
|
export declare class IconButton extends UiComponent {
|
|
11
|
+
readonly options: IconButtonOptions;
|
|
11
12
|
readonly element: JQuery;
|
|
12
13
|
readOnly: boolean;
|
|
13
14
|
inactive: boolean;
|
|
@@ -19,8 +20,9 @@ export declare class IconButton extends UiComponent {
|
|
|
19
20
|
* @param title The `title` of the element.
|
|
20
21
|
* @param options Options for the icon button.
|
|
21
22
|
*/
|
|
22
|
-
constructor(
|
|
23
|
-
|
|
23
|
+
constructor(parent: UiComponent, pathData: string, title: string, options?: IconButtonOptions);
|
|
24
|
+
toString(): string;
|
|
25
|
+
click(): void | Promise<void>;
|
|
24
26
|
refreshUi(): void;
|
|
25
27
|
}
|
|
26
28
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../source/ui/components/IconButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../source/ui/components/IconButton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,UAAU,CAAC,GAClD,kBAAkB,GAAG;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,UAAU,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE,CAAC;AAEJ;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC,SAAiB,OAAO,EAAE,iBAAiB,CAAC;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;;;;OAOG;gBACS,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB;IAiB7F,QAAQ,IAAI,MAAM;IAIlB,KAAK;IAQL,SAAS,IAAI,IAAI;CAalB"}
|
|
@@ -15,28 +15,29 @@ export class IconButton extends UiComponent {
|
|
|
15
15
|
* @param title The `title` of the element.
|
|
16
16
|
* @param options Options for the icon button.
|
|
17
17
|
*/
|
|
18
|
-
constructor(
|
|
19
|
-
super(
|
|
18
|
+
constructor(parent, pathData, title, options) {
|
|
19
|
+
super(parent, { ...options });
|
|
20
20
|
const element = $("<div/>", {
|
|
21
21
|
html: `<svg style="width: 18px; height: 18px;" viewBox="0 -960 960 960" fill="currentColor"><path d="${pathData}"/></svg>`,
|
|
22
22
|
title,
|
|
23
23
|
}).addClass(stylesButton.iconButton);
|
|
24
24
|
this.element = element;
|
|
25
|
-
this.addChildren(options?.children);
|
|
26
25
|
this.readOnly = options?.readOnly ?? false;
|
|
27
26
|
this.inactive = options?.inactive ?? false;
|
|
28
27
|
this.element.on("click", () => {
|
|
29
28
|
this.click();
|
|
30
29
|
});
|
|
31
30
|
}
|
|
31
|
+
toString() {
|
|
32
|
+
return `[${IconButton.name}#${this.componentId}]`;
|
|
33
|
+
}
|
|
32
34
|
click() {
|
|
33
35
|
if (this.readOnly) {
|
|
34
36
|
return;
|
|
35
37
|
}
|
|
36
|
-
|
|
38
|
+
return this.options?.onClick?.call(this);
|
|
37
39
|
}
|
|
38
40
|
refreshUi() {
|
|
39
|
-
super.refreshUi();
|
|
40
41
|
if (this.readOnly) {
|
|
41
42
|
this.element.addClass(stylesButton.readonly);
|
|
42
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../source/ui/components/IconButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../source/ui/components/IconButton.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AASxE;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IAEhC,OAAO,CAAS;IACzB,QAAQ,CAAU;IAClB,QAAQ,CAAU;IAElB;;;;;;;OAOG;IACH,YAAY,MAAmB,EAAE,QAAgB,EAAE,KAAa,EAAE,OAA2B;QAC3F,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,MAAM,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE;YAC1B,IAAI,EAAE,iGAAiG,QAAQ,WAAW;YAC1H,KAAK;SACN,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;QAErC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,KAAK,CAAC;QAC3C,IAAI,CAAC,QAAQ,GAAG,OAAO,EAAE,QAAQ,IAAI,KAAK,CAAC;QAE3C,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;YAC5B,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,UAAU,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IACpD,CAAC;IAED,KAAK;QACH,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO;QACT,CAAC;QAED,OAAO,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,SAAS;QACP,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAClD,CAAC;QAED,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import type { Setting } from "../../settings/Settings.js";
|
|
3
|
-
import { CollapsiblePanel, type
|
|
2
|
+
import { CollapsiblePanel, type CollapsiblePanelOptions } from "./CollapsiblePanel.js";
|
|
4
3
|
import { type LabelListItemOptions } from "./LabelListItem.js";
|
|
5
|
-
|
|
4
|
+
import type { UiComponent } from "./UiComponent.js";
|
|
5
|
+
export type IconSettingsPanelOptions = ThisType<IconSettingsPanel> & LabelListItemOptions & CollapsiblePanelOptions & {
|
|
6
6
|
/**
|
|
7
7
|
* When set to an SVG path, will be used as an icon on the panel.
|
|
8
8
|
*/
|
|
9
9
|
readonly icon: string;
|
|
10
10
|
};
|
|
11
11
|
export declare class IconSettingsPanel<TSetting extends Setting = Setting> extends CollapsiblePanel {
|
|
12
|
+
readonly options: IconSettingsPanelOptions;
|
|
12
13
|
readonly setting: TSetting;
|
|
13
14
|
/**
|
|
14
15
|
* Constructs a settings panel that can have an icon.
|
|
@@ -18,6 +19,6 @@ export declare class IconSettingsPanel<TSetting extends Setting = Setting> exten
|
|
|
18
19
|
* @param setting An setting for which this is the settings panel.
|
|
19
20
|
* @param options Options for the panel.
|
|
20
21
|
*/
|
|
21
|
-
constructor(
|
|
22
|
+
constructor(parent: UiComponent, label: string, setting: TSetting, options?: IconSettingsPanelOptions);
|
|
22
23
|
}
|
|
23
24
|
//# sourceMappingURL=IconSettingsPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSettingsPanel.d.ts","sourceRoot":"","sources":["../../../source/ui/components/IconSettingsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"IconSettingsPanel.d.ts","sourceRoot":"","sources":["../../../source/ui/components/IconSettingsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAiB,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC,iBAAiB,CAAC,GAChE,oBAAoB,GACpB,uBAAuB,GAAG;IACxB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB,CAAC;AAEJ,qBAAa,iBAAiB,CAAC,QAAQ,SAAS,OAAO,GAAG,OAAO,CAAE,SAAQ,gBAAgB;IACzF,SAAiB,OAAO,EAAE,wBAAwB,CAAC;IACnD,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAE3B;;;;;;;OAOG;gBAED,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,QAAQ,EACjB,OAAO,CAAC,EAAE,wBAAwB;CAarC"}
|
|
@@ -10,8 +10,10 @@ export class IconSettingsPanel extends CollapsiblePanel {
|
|
|
10
10
|
* @param setting An setting for which this is the settings panel.
|
|
11
11
|
* @param options Options for the panel.
|
|
12
12
|
*/
|
|
13
|
-
constructor(
|
|
14
|
-
super(
|
|
13
|
+
constructor(parent, label, setting, options) {
|
|
14
|
+
super(parent, new LabelListItem(parent, label, {
|
|
15
|
+
icon: options?.icon,
|
|
16
|
+
}), {
|
|
15
17
|
initiallyExpanded: options?.initiallyExpanded,
|
|
16
18
|
});
|
|
17
19
|
this.setting = setting;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconSettingsPanel.js","sourceRoot":"","sources":["../../../source/ui/components/IconSettingsPanel.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IconSettingsPanel.js","sourceRoot":"","sources":["../../../source/ui/components/IconSettingsPanel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAgC,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,aAAa,EAA6B,MAAM,oBAAoB,CAAC;AAY9E,MAAM,OAAO,iBAAsD,SAAQ,gBAAgB;IAEhF,OAAO,CAAW;IAE3B;;;;;;;OAOG;IACH,YACE,MAAmB,EACnB,KAAa,EACb,OAAiB,EACjB,OAAkC;QAElC,KAAK,CACH,MAAM,EACN,IAAI,aAAa,CAAC,MAAM,EAAE,KAAK,EAAE;YAC/B,IAAI,EAAE,OAAO,EAAE,IAAI;SACpB,CAAC,EACF;YACE,iBAAiB,EAAE,OAAO,EAAE,iBAAiB;SAC9C,CACF,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
3
|
-
export type InputOptions = UiComponentOptions & {
|
|
2
|
+
export type InputOptions = ThisType<Input> & UiComponentOptions & {
|
|
4
3
|
readonly onChange?: (value: string) => void;
|
|
5
4
|
readonly onEnter?: (currentValue: string) => void;
|
|
6
5
|
readonly onEscape?: (currentValue: string) => void;
|
|
7
6
|
readonly selected?: boolean;
|
|
8
7
|
readonly value?: string;
|
|
8
|
+
readonly classes?: Array<string>;
|
|
9
9
|
};
|
|
10
10
|
export declare class Input extends UiComponent {
|
|
11
|
+
readonly options: InputOptions;
|
|
11
12
|
readonly element: JQuery<HTMLInputElement>;
|
|
12
13
|
/**
|
|
13
14
|
* Constructs an input field.
|
|
@@ -16,6 +17,8 @@ export declare class Input extends UiComponent {
|
|
|
16
17
|
* @param label - The label on the input element.
|
|
17
18
|
* @param options - Options for the UI element.
|
|
18
19
|
*/
|
|
19
|
-
constructor(
|
|
20
|
+
constructor(parent: UiComponent, options?: InputOptions);
|
|
21
|
+
toString(): string;
|
|
22
|
+
refreshUi(): void;
|
|
20
23
|
}
|
|
21
24
|
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Input.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../source/ui/components/Input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAC,GACxC,kBAAkB,GAAG;IACnB,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAClC,CAAC;AAEJ,qBAAa,KAAM,SAAQ,WAAW;IACpC,SAAiB,OAAO,EAAE,YAAY,CAAC;IACvC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAE3C;;;;;;OAMG;gBACS,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,YAAY;IAkCvD,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,IAAI;CAClB"}
|
|
@@ -8,8 +8,8 @@ export class Input extends UiComponent {
|
|
|
8
8
|
* @param label - The label on the input element.
|
|
9
9
|
* @param options - Options for the UI element.
|
|
10
10
|
*/
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
11
|
+
constructor(parent, options) {
|
|
12
|
+
super(parent, { ...options });
|
|
13
13
|
this.element = $('<input type="text"/>').addClass("ks-input");
|
|
14
14
|
for (const className of options?.classes ?? []) {
|
|
15
15
|
this.element.addClass(className);
|
|
@@ -34,7 +34,10 @@ export class Input extends UiComponent {
|
|
|
34
34
|
break;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
this.addChildren(options?.children);
|
|
38
37
|
}
|
|
38
|
+
toString() {
|
|
39
|
+
return `[${Input.name}#${this.componentId}]`;
|
|
40
|
+
}
|
|
41
|
+
refreshUi() { }
|
|
39
42
|
}
|
|
40
43
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../source/ui/components/Input.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../source/ui/components/Input.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAYxE,MAAM,OAAO,KAAM,SAAQ,WAAW;IAE3B,OAAO,CAA2B;IAE3C;;;;;;OAMG;IACH,YAAY,MAAmB,EAAE,OAAsB;QACrD,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAmB,sBAAsB,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAEhF,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;YAC/C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACnC,CAAC;QAED,IAAI,OAAO,EAAE,QAAQ,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7E,CAAC;QAED,IAAI,OAAO,EAAE,KAAK,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QACxC,CAAC;QAED,IAAI,OAAO,EAAE,QAAQ,EAAE,CAAC;YACtB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,GAAG,CAAC,CAAC;YACnC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;QACpC,CAAC;QAED,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAwB,EAAE,EAAE;YACpD,QAAQ,KAAK,CAAC,GAAG,EAAE,CAAC;gBAClB,KAAK,OAAO;oBACV,OAAO,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;oBAC1C,MAAM;gBACR,KAAK,QAAQ;oBACX,OAAO,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;oBAC3C,MAAM;YACV,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IAC/C,CAAC;IAED,SAAS,KAAU,CAAC;CACrB"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import { Container } from "./Container.js";
|
|
3
2
|
import { ListItem, type ListItemOptions } from "./ListItem.js";
|
|
4
3
|
import type { UiComponent, UiComponentInterface } from "./UiComponent.js";
|
|
5
|
-
export type LabelListItemOptions
|
|
6
|
-
readonly childrenHead: Array<UiComponent>;
|
|
4
|
+
export type LabelListItemOptions = ThisType<LabelListItem> & ListItemOptions & {
|
|
7
5
|
/**
|
|
8
6
|
* When set to an SVG path, will be used as an icon on the label.
|
|
9
7
|
*/
|
|
10
|
-
readonly icon
|
|
8
|
+
readonly icon?: string;
|
|
11
9
|
/**
|
|
12
10
|
* Should an indicator be rendered in front of the element,
|
|
13
11
|
* to indicate that this is an upgrade of a prior setting?
|
|
14
12
|
*/
|
|
15
|
-
readonly upgradeIndicator
|
|
13
|
+
readonly upgradeIndicator?: boolean;
|
|
16
14
|
};
|
|
17
|
-
export declare class LabelListItem
|
|
15
|
+
export declare class LabelListItem extends ListItem {
|
|
16
|
+
readonly options: LabelListItemOptions;
|
|
18
17
|
readonly head: Container;
|
|
19
18
|
readonly elementLabel: JQuery;
|
|
20
19
|
/**
|
|
@@ -24,6 +23,10 @@ export declare class LabelListItem<TOptions extends LabelListItemOptions<UiCompo
|
|
|
24
23
|
* @param label The label on the setting element.
|
|
25
24
|
* @param options Options for the list item.
|
|
26
25
|
*/
|
|
27
|
-
constructor(
|
|
26
|
+
constructor(parent: UiComponent, label: string, options?: LabelListItemOptions);
|
|
27
|
+
toString(): string;
|
|
28
|
+
addChildHead(child: UiComponentInterface): this;
|
|
29
|
+
addChildrenHead(children?: Iterable<UiComponentInterface>): this;
|
|
30
|
+
requestRefresh(withChildren?: boolean, depth?: number): void;
|
|
28
31
|
}
|
|
29
32
|
//# sourceMappingURL=LabelListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/LabelListItem.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"LabelListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/LabelListItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE1E,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,GACxD,eAAe,GAAG;IAChB;;OAEG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAEJ,qBAAa,aAAc,SAAQ,QAAQ;IACzC,SAAiB,OAAO,EAAE,oBAAoB,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;;;;;OAMG;gBACS,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB;IAsB9E,QAAQ,IAAI,MAAM;IAIlB,YAAY,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI;IAI/C,eAAe,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,oBAAoB,CAAC,GAAG,IAAI;IAOhE,cAAc,CAAC,YAAY,UAAQ,EAAE,KAAK,SAAI;CAI/C"}
|
|
@@ -12,23 +12,17 @@ export class LabelListItem extends ListItem {
|
|
|
12
12
|
* @param label The label on the setting element.
|
|
13
13
|
* @param options Options for the list item.
|
|
14
14
|
*/
|
|
15
|
-
constructor(
|
|
16
|
-
super(
|
|
17
|
-
this.head = new Container(
|
|
15
|
+
constructor(parent, label, options) {
|
|
16
|
+
super(parent, options);
|
|
17
|
+
this.head = new Container(parent);
|
|
18
18
|
this.head.element.addClass(stylesListItem.head);
|
|
19
19
|
this.addChild(this.head);
|
|
20
20
|
this.elementLabel = $("<label/>", {
|
|
21
21
|
text: `${options?.upgradeIndicator === true ? "⮤ " : ""}${label}`,
|
|
22
22
|
})
|
|
23
23
|
.addClass(styles.label)
|
|
24
|
-
.addClass(stylesListItem.label)
|
|
25
|
-
.on("click", () => {
|
|
26
|
-
this.click();
|
|
27
|
-
});
|
|
24
|
+
.addClass(stylesListItem.label);
|
|
28
25
|
this.head.element.append(this.elementLabel);
|
|
29
|
-
for (const child of options?.childrenHead ?? []) {
|
|
30
|
-
this.head.addChild(child);
|
|
31
|
-
}
|
|
32
26
|
if (options?.icon) {
|
|
33
27
|
const iconElement = $("<div/>", {
|
|
34
28
|
html: `<svg style="width: 15px; height: 15px;" viewBox="0 -960 960 960" fill="currentColor"><path d="${options.icon}"/></svg>`,
|
|
@@ -36,5 +30,22 @@ export class LabelListItem extends ListItem {
|
|
|
36
30
|
this.elementLabel.prepend(iconElement);
|
|
37
31
|
}
|
|
38
32
|
}
|
|
33
|
+
toString() {
|
|
34
|
+
return `[${LabelListItem.name}#${this.componentId}]: '${this.elementLabel.text()}'`;
|
|
35
|
+
}
|
|
36
|
+
addChildHead(child) {
|
|
37
|
+
this.head.addChild(child);
|
|
38
|
+
return this;
|
|
39
|
+
}
|
|
40
|
+
addChildrenHead(children) {
|
|
41
|
+
for (const child of children ?? []) {
|
|
42
|
+
this.head.addChild(child);
|
|
43
|
+
}
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
requestRefresh(withChildren = false, depth = 0) {
|
|
47
|
+
super.requestRefresh(withChildren, depth);
|
|
48
|
+
this.head.requestRefresh(true, depth + 1);
|
|
49
|
+
}
|
|
39
50
|
}
|
|
40
51
|
//# sourceMappingURL=LabelListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelListItem.js","sourceRoot":"","sources":["../../../source/ui/components/LabelListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LabelListItem.js","sourceRoot":"","sources":["../../../source/ui/components/LabelListItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,MAAM,MAAM,4BAA4B,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAwB,MAAM,eAAe,CAAC;AAC/D,OAAO,cAAc,MAAM,uBAAuB,CAAC;AAiBnD,MAAM,OAAO,aAAc,SAAQ,QAAQ;IAEhC,IAAI,CAAY;IAChB,YAAY,CAAS;IAE9B;;;;;;OAMG;IACH,YAAY,MAAmB,EAAE,KAAa,EAAE,OAA8B;QAC5E,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAEvB,IAAI,CAAC,IAAI,GAAG,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEzB,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC,UAAU,EAAE;YAChC,IAAI,EAAE,GAAG,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE;SAClE,CAAC;aACC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC;aACtB,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAE5C,IAAI,OAAO,EAAE,IAAI,EAAE,CAAC;YAClB,MAAM,WAAW,GAAG,CAAC,CAAC,QAAQ,EAAE;gBAC9B,IAAI,EAAE,iGAAiG,OAAO,CAAC,IAAI,WAAW;aAC/H,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;YAC9B,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,aAAa,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,OAAO,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC;IACtF,CAAC;IAED,YAAY,CAAC,KAA2B;QACtC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,eAAe,CAAC,QAAyC;QACvD,KAAK,MAAM,KAAK,IAAI,QAAQ,IAAI,EAAE,EAAE,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,cAAc,CAAC,YAAY,GAAG,KAAK,EAAE,KAAK,GAAG,CAAC;QAC5C,KAAK,CAAC,cAAc,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC1C,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAC5C,CAAC;CACF"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type
|
|
2
|
-
|
|
3
|
-
export type ListItemOptions<TChild extends UiComponentInterface = UiComponentInterface> = UiComponentOptions<TChild> & {
|
|
1
|
+
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
2
|
+
export type ListItemOptions = ThisType<ListItem> & UiComponentOptions & {
|
|
4
3
|
/**
|
|
5
4
|
* Should there be additional padding below this element?
|
|
6
5
|
*/
|
|
7
|
-
readonly delimiter
|
|
6
|
+
readonly delimiter?: boolean;
|
|
7
|
+
readonly classes?: Array<string>;
|
|
8
8
|
};
|
|
9
|
-
export declare class ListItem
|
|
9
|
+
export declare class ListItem extends UiComponent {
|
|
10
|
+
readonly options: ListItemOptions;
|
|
10
11
|
readonly element: JQuery;
|
|
11
12
|
/**
|
|
12
13
|
* Construct a new simple list item with only a container element.
|
|
@@ -14,6 +15,8 @@ export declare class ListItem<TOptions extends ListItemOptions<UiComponent> = Li
|
|
|
14
15
|
* @param host The userscript instance.
|
|
15
16
|
* @param options Options for the list item.
|
|
16
17
|
*/
|
|
17
|
-
constructor(
|
|
18
|
+
constructor(parent: UiComponent, options?: ListItemOptions);
|
|
19
|
+
toString(): string;
|
|
20
|
+
refreshUi(): void;
|
|
18
21
|
}
|
|
19
22
|
//# sourceMappingURL=ListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/ListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/ListItem.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAC9C,kBAAkB,GAAG;IACnB;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAClC,CAAC;AAEJ,qBAAa,QAAS,SAAQ,WAAW;IACvC,SAAiB,OAAO,EAAE,eAAe,CAAC;IAC1C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB;;;;;OAKG;gBACS,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,eAAe;IAc1D,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,IAAI;CAClB"}
|
|
@@ -8,8 +8,8 @@ export class ListItem extends UiComponent {
|
|
|
8
8
|
* @param host The userscript instance.
|
|
9
9
|
* @param options Options for the list item.
|
|
10
10
|
*/
|
|
11
|
-
constructor(
|
|
12
|
-
super(
|
|
11
|
+
constructor(parent, options) {
|
|
12
|
+
super(parent, { ...options });
|
|
13
13
|
this.element = $("<li/>");
|
|
14
14
|
for (const className of options?.classes ?? []) {
|
|
15
15
|
this.element.addClass(className);
|
|
@@ -17,7 +17,10 @@ export class ListItem extends UiComponent {
|
|
|
17
17
|
if (options?.delimiter === true) {
|
|
18
18
|
this.element.addClass(stylesDelimiter.delimiter);
|
|
19
19
|
}
|
|
20
|
-
this.addChildren(options?.children);
|
|
21
20
|
}
|
|
21
|
+
toString() {
|
|
22
|
+
return `[${ListItem.name}#${this.componentId}]`;
|
|
23
|
+
}
|
|
24
|
+
refreshUi() { }
|
|
22
25
|
}
|
|
23
26
|
//# sourceMappingURL=ListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../source/ui/components/ListItem.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../source/ui/components/ListItem.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAA2B,MAAM,kBAAkB,CAAC;AAWxE,MAAM,OAAO,QAAS,SAAQ,WAAW;IAE9B,OAAO,CAAS;IAEzB;;;;;OAKG;IACH,YAAY,MAAmB,EAAE,OAAyB;QACxD,KAAK,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAE9B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;QAE1B,KAAK,MAAM,SAAS,IAAI,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,CAAC;YAC/C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACnC,CAAC;QAED,IAAI,OAAO,EAAE,SAAS,KAAK,IAAI,EAAE,CAAC;YAChC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,QAAQ,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC;IAClD,CAAC;IAED,SAAS,KAAU,CAAC;CACrB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { KittenScientists } from "../../KittenScientists.js";
|
|
2
1
|
import type { SettingOptions } from "../../settings/Settings.js";
|
|
3
2
|
import { Fieldset } from "./Fieldset.js";
|
|
4
3
|
import { RadioItem } from "./RadioItem.js";
|
|
5
4
|
import { UiComponent, type UiComponentOptions } from "./UiComponent.js";
|
|
6
|
-
export type OptionsListItemOptions = UiComponentOptions & {
|
|
7
|
-
readonly onCheck
|
|
8
|
-
readonly readOnly
|
|
5
|
+
export type OptionsListItemOptions = ThisType<OptionsListItem> & UiComponentOptions & {
|
|
6
|
+
readonly onCheck?: (isBatchProcess?: boolean) => void;
|
|
7
|
+
readonly readOnly?: boolean;
|
|
9
8
|
};
|
|
10
9
|
export declare class OptionsListItem<TSetting extends SettingOptions = SettingOptions> extends UiComponent {
|
|
10
|
+
readonly options: OptionsListItemOptions;
|
|
11
11
|
readonly fieldset: Fieldset;
|
|
12
12
|
readonly setting: TSetting;
|
|
13
13
|
readonly element: JQuery;
|
|
@@ -21,7 +21,8 @@ export declare class OptionsListItem<TSetting extends SettingOptions = SettingOp
|
|
|
21
21
|
* @param setting The setting this element is linked to.
|
|
22
22
|
* @param options Options for the list item.
|
|
23
23
|
*/
|
|
24
|
-
constructor(
|
|
24
|
+
constructor(parent: UiComponent, label: string, setting: TSetting, options?: OptionsListItemOptions);
|
|
25
|
+
toString(): string;
|
|
25
26
|
refreshUi(): void;
|
|
26
27
|
}
|
|
27
28
|
//# sourceMappingURL=OptionsListItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionsListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/OptionsListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"OptionsListItem.d.ts","sourceRoot":"","sources":["../../../source/ui/components/OptionsListItem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAExE,MAAM,MAAM,sBAAsB,GAAG,QAAQ,CAAC,eAAe,CAAC,GAC5D,kBAAkB,GAAG;IACnB,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,cAAc,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B,CAAC;AAEJ,qBAAa,eAAe,CAAC,QAAQ,SAAS,cAAc,GAAG,cAAc,CAAE,SAAQ,WAAW;IAChG,SAAiB,OAAO,EAAE,sBAAsB,CAAC;IACjD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAElC;;;;;;;;OAQG;gBAED,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,QAAQ,EACjB,OAAO,CAAC,EAAE,sBAAsB;IAuBlC,QAAQ,IAAI,MAAM;IAIlB,SAAS,IAAI,IAAI;CAQlB"}
|