@oneuptime/common 10.7.2 → 10.8.1
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/Models/DatabaseModels/CloudResource.ts +846 -0
- package/Models/DatabaseModels/CloudResourceInstance.ts +276 -0
- package/Models/DatabaseModels/CloudResourceLabelRule.ts +510 -0
- package/Models/DatabaseModels/CloudResourceOwnerRule.ts +592 -0
- package/Models/DatabaseModels/CloudResourceOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/CloudResourceOwnerUser.ts +486 -0
- package/Models/DatabaseModels/Host.ts +209 -0
- package/Models/DatabaseModels/Index.ts +36 -0
- package/Models/DatabaseModels/RumApplication.ts +731 -0
- package/Models/DatabaseModels/RumApplicationClient.ts +229 -0
- package/Models/DatabaseModels/RumApplicationLabelRule.ts +510 -0
- package/Models/DatabaseModels/RumApplicationOwnerRule.ts +592 -0
- package/Models/DatabaseModels/RumApplicationOwnerTeam.ts +486 -0
- package/Models/DatabaseModels/RumApplicationOwnerUser.ts +485 -0
- package/Models/DatabaseModels/ServerlessFunction.ts +881 -0
- package/Models/DatabaseModels/ServerlessFunctionInstance.ts +212 -0
- package/Models/DatabaseModels/ServerlessFunctionLabelRule.ts +510 -0
- package/Models/DatabaseModels/ServerlessFunctionOwnerRule.ts +592 -0
- package/Models/DatabaseModels/ServerlessFunctionOwnerTeam.ts +487 -0
- package/Models/DatabaseModels/ServerlessFunctionOwnerUser.ts +486 -0
- package/Models/DatabaseModels/Service.ts +268 -0
- package/Models/DatabaseModels/TelemetryException.ts +15 -1
- package/Models/DatabaseModels/WorkflowLog.ts +52 -0
- package/Server/API/TelemetryAPI.ts +78 -25
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780931746908-AddResumeStateToWorkflowLog.ts +21 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780931863719-AddTelemetryResourceMetadataColumns.ts +108 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780933132562-AddServerlessFunctionTables.ts +205 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780935387827-AddCloudResourceTables.ts +195 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780936579718-AddRumApplicationTables.ts +202 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780938407319-AddServerlessFunctionRuleTables.ts +156 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780940721814-AddCloudResourceRuleTables.ts +149 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780940998002-AddRumApplicationRuleTables.ts +149 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780941762204-AddTelemetryResourceInventoryTables.ts +95 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780985763463-AddRumApplicationSdkLanguage.ts +25 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1780987192743-RecastCloudResourcesByEnvironment.ts +30 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +22 -0
- package/Server/Infrastructure/Queue.ts +11 -0
- package/Server/Services/CloudResourceInstanceService.ts +76 -0
- package/Server/Services/CloudResourceLabelRuleEngineService.ts +175 -0
- package/Server/Services/CloudResourceLabelRuleService.ts +14 -0
- package/Server/Services/CloudResourceOwnerRuleEngineService.ts +192 -0
- package/Server/Services/CloudResourceOwnerRuleService.ts +14 -0
- package/Server/Services/CloudResourceOwnerTeamService.ts +10 -0
- package/Server/Services/CloudResourceOwnerUserService.ts +10 -0
- package/Server/Services/CloudResourceService.ts +342 -0
- package/Server/Services/ExceptionAggregationService.ts +3 -0
- package/Server/Services/HostService.ts +42 -0
- package/Server/Services/LogAggregationService.ts +44 -16
- package/Server/Services/MetricAggregationService.ts +3 -0
- package/Server/Services/OpenTelemetryIngestService.ts +148 -1
- package/Server/Services/RumApplicationClientService.ts +69 -0
- package/Server/Services/RumApplicationLabelRuleEngineService.ts +175 -0
- package/Server/Services/RumApplicationLabelRuleService.ts +14 -0
- package/Server/Services/RumApplicationOwnerRuleEngineService.ts +192 -0
- package/Server/Services/RumApplicationOwnerRuleService.ts +14 -0
- package/Server/Services/RumApplicationOwnerTeamService.ts +10 -0
- package/Server/Services/RumApplicationOwnerUserService.ts +10 -0
- package/Server/Services/RumApplicationService.ts +301 -0
- package/Server/Services/ServerlessFunctionInstanceService.ts +61 -0
- package/Server/Services/ServerlessFunctionLabelRuleEngineService.ts +182 -0
- package/Server/Services/ServerlessFunctionLabelRuleService.ts +14 -0
- package/Server/Services/ServerlessFunctionOwnerRuleEngineService.ts +199 -0
- package/Server/Services/ServerlessFunctionOwnerRuleService.ts +14 -0
- package/Server/Services/ServerlessFunctionOwnerTeamService.ts +10 -0
- package/Server/Services/ServerlessFunctionOwnerUserService.ts +10 -0
- package/Server/Services/ServerlessFunctionService.ts +351 -0
- package/Server/Services/ServiceService.ts +95 -8
- package/Server/Services/TraceAggregationService.ts +131 -4
- package/Server/Types/Database/Permissions/OwnerTableRegistry.ts +39 -0
- package/Server/Types/Workflow/ComponentCode.ts +9 -0
- package/Server/Types/Workflow/Components/Index.ts +2 -0
- package/Server/Types/Workflow/Components/Sleep.ts +105 -0
- package/Server/Types/Workflow/Workflow.ts +6 -0
- package/Server/Utils/Telemetry/ResourceFacetResolver.ts +150 -0
- package/Types/Permission.ts +692 -1
- package/Types/Telemetry/ServiceType.ts +3 -0
- package/Types/Workflow/ComponentID.ts +1 -0
- package/Types/Workflow/Components/Sleep.ts +71 -0
- package/Types/Workflow/Components.ts +2 -0
- package/Types/Workflow/WorkflowStatus.ts +1 -0
- package/UI/Components/BulkUpdate/BulkLabelActions.tsx +159 -32
- package/UI/Components/Navbar/NavBar.tsx +72 -123
- package/UI/Components/Navbar/NavBarMenuModal.tsx +642 -0
- package/UI/Components/Workflow/WorkflowStatus.tsx +3 -0
- package/build/dist/Models/DatabaseModels/CloudResource.js +871 -0
- package/build/dist/Models/DatabaseModels/CloudResource.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceInstance.js +300 -0
- package/build/dist/Models/DatabaseModels/CloudResourceInstance.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceLabelRule.js +520 -0
- package/build/dist/Models/DatabaseModels/CloudResourceLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceOwnerRule.js +601 -0
- package/build/dist/Models/DatabaseModels/CloudResourceOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/CloudResourceOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/CloudResourceOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/CloudResourceOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Host.js +215 -0
- package/build/dist/Models/DatabaseModels/Host.js.map +1 -1
- package/build/dist/Models/DatabaseModels/Index.js +36 -0
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/RumApplication.js +751 -0
- package/build/dist/Models/DatabaseModels/RumApplication.js.map +1 -0
- package/build/dist/Models/DatabaseModels/RumApplicationClient.js +252 -0
- package/build/dist/Models/DatabaseModels/RumApplicationClient.js.map +1 -0
- package/build/dist/Models/DatabaseModels/RumApplicationLabelRule.js +520 -0
- package/build/dist/Models/DatabaseModels/RumApplicationLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/RumApplicationOwnerRule.js +601 -0
- package/build/dist/Models/DatabaseModels/RumApplicationOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/RumApplicationOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/RumApplicationOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/RumApplicationOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/RumApplicationOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunction.js +908 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunction.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionInstance.js +234 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionInstance.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionLabelRule.js +520 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionLabelRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerRule.js +601 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerRule.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerTeam.js +503 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerTeam.js.map +1 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerUser.js +502 -0
- package/build/dist/Models/DatabaseModels/ServerlessFunctionOwnerUser.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Service.js +276 -0
- package/build/dist/Models/DatabaseModels/Service.js.map +1 -1
- package/build/dist/Models/DatabaseModels/TelemetryException.js +12 -1
- package/build/dist/Models/DatabaseModels/TelemetryException.js.map +1 -1
- package/build/dist/Models/DatabaseModels/WorkflowLog.js +53 -0
- package/build/dist/Models/DatabaseModels/WorkflowLog.js.map +1 -1
- package/build/dist/Server/API/TelemetryAPI.js +61 -23
- package/build/dist/Server/API/TelemetryAPI.js.map +1 -1
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931746908-AddResumeStateToWorkflowLog.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931746908-AddResumeStateToWorkflowLog.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931863719-AddTelemetryResourceMetadataColumns.js +53 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780931863719-AddTelemetryResourceMetadataColumns.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780933132562-AddServerlessFunctionTables.js +82 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780933132562-AddServerlessFunctionTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780935387827-AddCloudResourceTables.js +82 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780935387827-AddCloudResourceTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780936579718-AddRumApplicationTables.js +83 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780936579718-AddRumApplicationTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780938407319-AddServerlessFunctionRuleTables.js +67 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780938407319-AddServerlessFunctionRuleTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940721814-AddCloudResourceRuleTables.js +60 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940721814-AddCloudResourceRuleTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940998002-AddRumApplicationRuleTables.js +60 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780940998002-AddRumApplicationRuleTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780941762204-AddTelemetryResourceInventoryTables.js +45 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780941762204-AddTelemetryResourceInventoryTables.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780985763463-AddRumApplicationSdkLanguage.js +18 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780985763463-AddRumApplicationSdkLanguage.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780987192743-RecastCloudResourcesByEnvironment.js +27 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1780987192743-RecastCloudResourcesByEnvironment.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Infrastructure/Queue.js +3 -0
- package/build/dist/Server/Infrastructure/Queue.js.map +1 -1
- package/build/dist/Server/Services/CloudResourceInstanceService.js +76 -0
- package/build/dist/Server/Services/CloudResourceInstanceService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js +160 -0
- package/build/dist/Server/Services/CloudResourceLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceLabelRuleService.js +13 -0
- package/build/dist/Server/Services/CloudResourceLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js +179 -0
- package/build/dist/Server/Services/CloudResourceOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/CloudResourceOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/CloudResourceOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js +9 -0
- package/build/dist/Server/Services/CloudResourceOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/CloudResourceService.js +287 -0
- package/build/dist/Server/Services/CloudResourceService.js.map +1 -0
- package/build/dist/Server/Services/ExceptionAggregationService.js +3 -0
- package/build/dist/Server/Services/ExceptionAggregationService.js.map +1 -1
- package/build/dist/Server/Services/HostService.js +29 -1
- package/build/dist/Server/Services/HostService.js.map +1 -1
- package/build/dist/Server/Services/LogAggregationService.js +36 -10
- package/build/dist/Server/Services/LogAggregationService.js.map +1 -1
- package/build/dist/Server/Services/MetricAggregationService.js +3 -0
- package/build/dist/Server/Services/MetricAggregationService.js.map +1 -1
- package/build/dist/Server/Services/OpenTelemetryIngestService.js +98 -2
- package/build/dist/Server/Services/OpenTelemetryIngestService.js.map +1 -1
- package/build/dist/Server/Services/RumApplicationClientService.js +70 -0
- package/build/dist/Server/Services/RumApplicationClientService.js.map +1 -0
- package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js +160 -0
- package/build/dist/Server/Services/RumApplicationLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/RumApplicationLabelRuleService.js +13 -0
- package/build/dist/Server/Services/RumApplicationLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js +179 -0
- package/build/dist/Server/Services/RumApplicationOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/RumApplicationOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/RumApplicationOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/RumApplicationOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/RumApplicationOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/RumApplicationOwnerUserService.js +9 -0
- package/build/dist/Server/Services/RumApplicationOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/RumApplicationService.js +259 -0
- package/build/dist/Server/Services/RumApplicationService.js.map +1 -0
- package/build/dist/Server/Services/ServerlessFunctionInstanceService.js +64 -0
- package/build/dist/Server/Services/ServerlessFunctionInstanceService.js.map +1 -0
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js +160 -0
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleService.js +13 -0
- package/build/dist/Server/Services/ServerlessFunctionLabelRuleService.js.map +1 -0
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js +179 -0
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleEngineService.js.map +1 -0
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleService.js +13 -0
- package/build/dist/Server/Services/ServerlessFunctionOwnerRuleService.js.map +1 -0
- package/build/dist/Server/Services/ServerlessFunctionOwnerTeamService.js +9 -0
- package/build/dist/Server/Services/ServerlessFunctionOwnerTeamService.js.map +1 -0
- package/build/dist/Server/Services/ServerlessFunctionOwnerUserService.js +9 -0
- package/build/dist/Server/Services/ServerlessFunctionOwnerUserService.js.map +1 -0
- package/build/dist/Server/Services/ServerlessFunctionService.js +299 -0
- package/build/dist/Server/Services/ServerlessFunctionService.js.map +1 -0
- package/build/dist/Server/Services/ServiceService.js +63 -7
- package/build/dist/Server/Services/ServiceService.js.map +1 -1
- package/build/dist/Server/Services/TraceAggregationService.js +108 -4
- package/build/dist/Server/Services/TraceAggregationService.js.map +1 -1
- package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js +39 -0
- package/build/dist/Server/Types/Database/Permissions/OwnerTableRegistry.js.map +1 -1
- package/build/dist/Server/Types/Workflow/ComponentCode.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/Index.js +2 -0
- package/build/dist/Server/Types/Workflow/Components/Index.js.map +1 -1
- package/build/dist/Server/Types/Workflow/Components/Sleep.js +85 -0
- package/build/dist/Server/Types/Workflow/Components/Sleep.js.map +1 -0
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js +90 -0
- package/build/dist/Server/Utils/Telemetry/ResourceFacetResolver.js.map +1 -1
- package/build/dist/Types/Permission.js +609 -1
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/Types/Telemetry/ServiceType.js +3 -0
- package/build/dist/Types/Telemetry/ServiceType.js.map +1 -1
- package/build/dist/Types/Workflow/ComponentID.js +1 -0
- package/build/dist/Types/Workflow/ComponentID.js.map +1 -1
- package/build/dist/Types/Workflow/Components/Sleep.js +64 -0
- package/build/dist/Types/Workflow/Components/Sleep.js.map +1 -0
- package/build/dist/Types/Workflow/Components.js +2 -0
- package/build/dist/Types/Workflow/Components.js.map +1 -1
- package/build/dist/Types/Workflow/WorkflowStatus.js +1 -0
- package/build/dist/Types/Workflow/WorkflowStatus.js.map +1 -1
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js +113 -19
- package/build/dist/UI/Components/BulkUpdate/BulkLabelActions.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBar.js +34 -66
- package/build/dist/UI/Components/Navbar/NavBar.js.map +1 -1
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js +412 -0
- package/build/dist/UI/Components/Navbar/NavBarMenuModal.js.map +1 -0
- package/build/dist/UI/Components/Workflow/WorkflowStatus.js +3 -0
- package/build/dist/UI/Components/Workflow/WorkflowStatus.js.map +1 -1
- package/package.json +1 -1
- package/UI/Components/Navbar/NavBarMenu.tsx +0 -183
- package/UI/Components/Navbar/NavBarMenuItem.tsx +0 -146
- package/build/dist/UI/Components/Navbar/NavBarMenu.js +0 -82
- package/build/dist/UI/Components/Navbar/NavBarMenu.js.map +0 -1
- package/build/dist/UI/Components/Navbar/NavBarMenuItem.js +0 -109
- package/build/dist/UI/Components/Navbar/NavBarMenuItem.js.map +0 -1
|
@@ -14,6 +14,9 @@ enum ServiceType {
|
|
|
14
14
|
Host = "Host",
|
|
15
15
|
DockerHost = "DockerHost",
|
|
16
16
|
KubernetesCluster = "KubernetesCluster",
|
|
17
|
+
ServerlessFunction = "ServerlessFunction",
|
|
18
|
+
CloudResource = "CloudResource",
|
|
19
|
+
RealUserMonitor = "RealUserMonitor",
|
|
17
20
|
/*
|
|
18
21
|
* Telemetry that arrived without an OTel service.name and with no
|
|
19
22
|
* host / docker / k8s resource signal. Instead of synthesising a
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import IconProp from "../../Icon/IconProp";
|
|
2
|
+
import ComponentID from "../ComponentID";
|
|
3
|
+
import ComponentMetadata, {
|
|
4
|
+
ComponentInputType,
|
|
5
|
+
ComponentType,
|
|
6
|
+
} from "./../Component";
|
|
7
|
+
|
|
8
|
+
const components: Array<ComponentMetadata> = [
|
|
9
|
+
{
|
|
10
|
+
id: ComponentID.Sleep,
|
|
11
|
+
title: "Sleep",
|
|
12
|
+
category: "Utils",
|
|
13
|
+
description:
|
|
14
|
+
"Pause the workflow for a specified duration, then continue with the next steps. The workflow is suspended while sleeping and does not consume a worker — it resumes automatically when the sleep is over.",
|
|
15
|
+
iconProp: IconProp.Clock,
|
|
16
|
+
componentType: ComponentType.Component,
|
|
17
|
+
arguments: [
|
|
18
|
+
{
|
|
19
|
+
type: ComponentInputType.Number,
|
|
20
|
+
name: "Days",
|
|
21
|
+
description: "Number of days to sleep. Optional. Defaults to 0.",
|
|
22
|
+
required: false,
|
|
23
|
+
id: "days",
|
|
24
|
+
placeholder: "0",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: ComponentInputType.Number,
|
|
28
|
+
name: "Hours",
|
|
29
|
+
description: "Number of hours to sleep. Optional. Defaults to 0.",
|
|
30
|
+
required: false,
|
|
31
|
+
id: "hours",
|
|
32
|
+
placeholder: "0",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
type: ComponentInputType.Number,
|
|
36
|
+
name: "Minutes",
|
|
37
|
+
description: "Number of minutes to sleep. Optional. Defaults to 0.",
|
|
38
|
+
required: false,
|
|
39
|
+
id: "minutes",
|
|
40
|
+
placeholder: "0",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: ComponentInputType.Number,
|
|
44
|
+
name: "Seconds",
|
|
45
|
+
description: "Number of seconds to sleep. Optional. Defaults to 0.",
|
|
46
|
+
required: false,
|
|
47
|
+
id: "seconds",
|
|
48
|
+
placeholder: "0",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
returnValues: [],
|
|
52
|
+
inPorts: [
|
|
53
|
+
{
|
|
54
|
+
title: "In",
|
|
55
|
+
description:
|
|
56
|
+
"Please connect components to this port for this component to work.",
|
|
57
|
+
id: "in",
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
outPorts: [
|
|
61
|
+
{
|
|
62
|
+
title: "Out",
|
|
63
|
+
description:
|
|
64
|
+
"Connect components to this port to run them after the sleep is over.",
|
|
65
|
+
id: "out",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
|
|
71
|
+
export default components;
|
|
@@ -11,6 +11,7 @@ import ManualComponents from "./Components/Manual";
|
|
|
11
11
|
import MicrosoftTeamsComponents from "./Components/MicrosoftTeams";
|
|
12
12
|
import ScheduleComponents from "./Components/Schedule";
|
|
13
13
|
import SlackComponents from "./Components/Slack";
|
|
14
|
+
import SleepComponents from "./Components/Sleep";
|
|
14
15
|
import TelegramComponents from "./Components/Telegram";
|
|
15
16
|
import WebhookComponents from "./Components/Webhook";
|
|
16
17
|
import WorkflowComponents from "./Components/Workflow";
|
|
@@ -30,6 +31,7 @@ const components: Array<ComponentMetadata> = [
|
|
|
30
31
|
...WorkflowComponents,
|
|
31
32
|
...ManualComponents,
|
|
32
33
|
...MicrosoftTeamsComponents,
|
|
34
|
+
...SleepComponents,
|
|
33
35
|
];
|
|
34
36
|
|
|
35
37
|
export default components;
|
|
@@ -7,12 +7,15 @@ import IconProp from "../../../Types/Icon/IconProp";
|
|
|
7
7
|
import { LIMIT_PER_PROJECT } from "../../../Types/Database/LimitMax";
|
|
8
8
|
import SortOrder from "../../../Types/BaseDatabase/SortOrder";
|
|
9
9
|
import ListResult from "../../../Types/BaseDatabase/ListResult";
|
|
10
|
+
import Includes from "../../../Types/BaseDatabase/Includes";
|
|
10
11
|
import ObjectID from "../../../Types/ObjectID";
|
|
11
12
|
import API from "../../Utils/API/API";
|
|
12
13
|
import ModelAPI from "../../Utils/ModelAPI/ModelAPI";
|
|
13
14
|
import ProjectUtil from "../../Utils/Project";
|
|
14
15
|
import { ButtonStyleType } from "../Button/Button";
|
|
15
16
|
import BasicFormModal from "../FormModal/BasicFormModal";
|
|
17
|
+
import Modal from "../Modal/Modal";
|
|
18
|
+
import { DropdownOption } from "../Dropdown/Dropdown";
|
|
16
19
|
import FormFieldSchemaType from "../Forms/Types/FormFieldSchemaType";
|
|
17
20
|
import {
|
|
18
21
|
BulkActionButtonSchema,
|
|
@@ -50,6 +53,17 @@ function useBulkLabelActions<T extends BaseModel>(
|
|
|
50
53
|
const [bulkActionProps, setBulkActionProps] =
|
|
51
54
|
useState<BulkActionOnClickProps<T> | null>(null);
|
|
52
55
|
|
|
56
|
+
/*
|
|
57
|
+
* For "Remove Labels" we only want to offer labels that are actually
|
|
58
|
+
* attached to the selected items (not every label in the project). These
|
|
59
|
+
* are computed from the selected items each time the remove modal opens.
|
|
60
|
+
*/
|
|
61
|
+
const [removeLabelDropdownOptions, setRemoveLabelDropdownOptions] = useState<
|
|
62
|
+
Array<DropdownOption>
|
|
63
|
+
>([]);
|
|
64
|
+
const [isLoadingRemoveLabels, setIsLoadingRemoveLabels] =
|
|
65
|
+
useState<boolean>(false);
|
|
66
|
+
|
|
53
67
|
useEffect(() => {
|
|
54
68
|
const fetchLabels: () => Promise<void> = async (): Promise<void> => {
|
|
55
69
|
try {
|
|
@@ -187,13 +201,106 @@ function useBulkLabelActions<T extends BaseModel>(
|
|
|
187
201
|
setBulkActionProps(null);
|
|
188
202
|
};
|
|
189
203
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
204
|
+
/*
|
|
205
|
+
* Build the dropdown options for the "Remove Labels" modal from only the
|
|
206
|
+
* labels actually attached to the selected items. We fetch the selected
|
|
207
|
+
* items (by id) with their labels and take the de-duplicated union, so the
|
|
208
|
+
* modal offers only labels that can really be removed instead of every
|
|
209
|
+
* label in the project.
|
|
210
|
+
*/
|
|
211
|
+
const loadLabelsForSelectedItems: (
|
|
212
|
+
items: Array<T>,
|
|
213
|
+
) => Promise<void> = async (items: Array<T>): Promise<void> => {
|
|
214
|
+
setIsLoadingRemoveLabels(true);
|
|
215
|
+
|
|
216
|
+
try {
|
|
217
|
+
const itemIds: Array<string> = items
|
|
218
|
+
.map((item: T) => {
|
|
219
|
+
return item.id?.toString() || "";
|
|
220
|
+
})
|
|
221
|
+
.filter((id: string) => {
|
|
222
|
+
return id.length > 0;
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
if (itemIds.length === 0) {
|
|
226
|
+
setRemoveLabelDropdownOptions([]);
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
const result: ListResult<T> = await ModelAPI.getList<T>({
|
|
231
|
+
modelType: config.modelType,
|
|
232
|
+
query: {
|
|
233
|
+
_id: new Includes(itemIds),
|
|
234
|
+
} as any,
|
|
235
|
+
limit: LIMIT_PER_PROJECT,
|
|
236
|
+
skip: 0,
|
|
237
|
+
select: {
|
|
238
|
+
labels: {
|
|
239
|
+
_id: true,
|
|
240
|
+
name: true,
|
|
241
|
+
color: true,
|
|
242
|
+
},
|
|
243
|
+
} as any,
|
|
244
|
+
sort: {},
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
// Union of labels across all selected items, de-duplicated by id.
|
|
248
|
+
const labelById: Map<string, Label> = new Map<string, Label>();
|
|
249
|
+
|
|
250
|
+
for (const item of result.data) {
|
|
251
|
+
const itemLabels: Array<Label> =
|
|
252
|
+
((item as any).labels as Array<Label> | undefined) || [];
|
|
253
|
+
|
|
254
|
+
for (const label of itemLabels) {
|
|
255
|
+
const id: string = label._id?.toString() || "";
|
|
256
|
+
if (id.length > 0) {
|
|
257
|
+
labelById.set(id, label);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
const options: Array<DropdownOption> = Array.from(
|
|
263
|
+
labelById.values(),
|
|
264
|
+
).map((label: Label) => {
|
|
265
|
+
const option: DropdownOption = {
|
|
266
|
+
label: label.name || "",
|
|
267
|
+
value: label._id?.toString() || "",
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
if (label.color) {
|
|
271
|
+
option.color = label.color;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return option;
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
options.sort((a: DropdownOption, b: DropdownOption) => {
|
|
278
|
+
return a.label.localeCompare(b.label);
|
|
279
|
+
});
|
|
280
|
+
|
|
281
|
+
setRemoveLabelDropdownOptions(options);
|
|
282
|
+
} catch {
|
|
283
|
+
// on error, show no options rather than every label in the project
|
|
284
|
+
setRemoveLabelDropdownOptions([]);
|
|
285
|
+
} finally {
|
|
286
|
+
setIsLoadingRemoveLabels(false);
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
const labelDropdownOptions: Array<DropdownOption> = labels.map(
|
|
291
|
+
(label: Label) => {
|
|
292
|
+
const option: DropdownOption = {
|
|
193
293
|
label: label.name || "",
|
|
194
294
|
value: label._id?.toString() || "",
|
|
195
295
|
};
|
|
196
|
-
|
|
296
|
+
|
|
297
|
+
if (label.color) {
|
|
298
|
+
option.color = label.color;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
return option;
|
|
302
|
+
},
|
|
303
|
+
);
|
|
197
304
|
|
|
198
305
|
const addLabelsAction: BulkActionButtonSchema<T> = {
|
|
199
306
|
title: "Add Labels",
|
|
@@ -211,10 +318,21 @@ function useBulkLabelActions<T extends BaseModel>(
|
|
|
211
318
|
icon: IconProp.Close,
|
|
212
319
|
onClick: async (actionProps: BulkActionOnClickProps<T>): Promise<void> => {
|
|
213
320
|
setBulkActionProps(actionProps);
|
|
321
|
+
setRemoveLabelDropdownOptions([]);
|
|
214
322
|
setShowRemoveModal(true);
|
|
323
|
+
await loadLabelsForSelectedItems(actionProps.items);
|
|
215
324
|
},
|
|
216
325
|
};
|
|
217
326
|
|
|
327
|
+
const closeRemoveModal: () => void = (): void => {
|
|
328
|
+
setShowRemoveModal(false);
|
|
329
|
+
setBulkActionProps(null);
|
|
330
|
+
setRemoveLabelDropdownOptions([]);
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
const hasNoLabelsToRemove: boolean =
|
|
334
|
+
!isLoadingRemoveLabels && removeLabelDropdownOptions.length === 0;
|
|
335
|
+
|
|
218
336
|
const modals: ReactElement = (
|
|
219
337
|
<>
|
|
220
338
|
{showAddModal && (
|
|
@@ -247,35 +365,44 @@ function useBulkLabelActions<T extends BaseModel>(
|
|
|
247
365
|
/>
|
|
248
366
|
)}
|
|
249
367
|
|
|
250
|
-
{showRemoveModal &&
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
368
|
+
{showRemoveModal &&
|
|
369
|
+
(hasNoLabelsToRemove ? (
|
|
370
|
+
<Modal
|
|
371
|
+
title="No Labels to Remove"
|
|
372
|
+
description="The selected items don't have any labels to remove."
|
|
373
|
+
icon={IconProp.Label}
|
|
374
|
+
onClose={closeRemoveModal}
|
|
375
|
+
closeButtonText="Close"
|
|
376
|
+
>
|
|
377
|
+
<></>
|
|
378
|
+
</Modal>
|
|
379
|
+
) : (
|
|
380
|
+
<BasicFormModal
|
|
381
|
+
title="Remove Labels"
|
|
382
|
+
description="Select labels to remove from the selected items. Only labels currently applied to the selected items are shown."
|
|
383
|
+
isLoading={isLoadingRemoveLabels}
|
|
384
|
+
onClose={closeRemoveModal}
|
|
385
|
+
submitButtonText="Remove Labels"
|
|
386
|
+
onSubmit={async (formData: { labelIds: Array<string> }) => {
|
|
387
|
+
await applyLabels(formData.labelIds || [], "remove");
|
|
388
|
+
}}
|
|
389
|
+
formProps={{
|
|
390
|
+
fields: [
|
|
391
|
+
{
|
|
392
|
+
field: {
|
|
393
|
+
labelIds: true,
|
|
394
|
+
},
|
|
395
|
+
title: "Select Labels",
|
|
396
|
+
description:
|
|
397
|
+
"These labels will be removed from each selected item.",
|
|
398
|
+
fieldType: FormFieldSchemaType.MultiSelectDropdown,
|
|
399
|
+
required: true,
|
|
400
|
+
dropdownOptions: removeLabelDropdownOptions,
|
|
267
401
|
},
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
required: true,
|
|
273
|
-
dropdownOptions: labelDropdownOptions,
|
|
274
|
-
},
|
|
275
|
-
],
|
|
276
|
-
}}
|
|
277
|
-
/>
|
|
278
|
-
)}
|
|
402
|
+
],
|
|
403
|
+
}}
|
|
404
|
+
/>
|
|
405
|
+
))}
|
|
279
406
|
</>
|
|
280
407
|
);
|
|
281
408
|
|
|
@@ -3,14 +3,12 @@ import React, {
|
|
|
3
3
|
ReactElement,
|
|
4
4
|
useState,
|
|
5
5
|
useEffect,
|
|
6
|
-
useRef,
|
|
7
6
|
} from "react";
|
|
8
7
|
import Route from "../../../Types/API/Route";
|
|
9
8
|
import URL from "../../../Types/API/URL";
|
|
10
9
|
import IconProp from "../../../Types/Icon/IconProp";
|
|
11
10
|
import NavBarItem from "./NavBarItem";
|
|
12
|
-
import
|
|
13
|
-
import NavBarMenuItem from "./NavBarMenuItem";
|
|
11
|
+
import NavBarMenuModal from "./NavBarMenuModal";
|
|
14
12
|
import Button, { ButtonStyleType } from "../Button/Button";
|
|
15
13
|
import Navigation from "../../Utils/Navigation";
|
|
16
14
|
import useComponentOutsideClick from "../../Types/UseComponentOutsideClick";
|
|
@@ -41,6 +39,10 @@ export interface ComponentProps {
|
|
|
41
39
|
rightElement?: NavItem;
|
|
42
40
|
moreMenuItems?: MoreMenuItem[];
|
|
43
41
|
moreMenuTitle?: string; // Title for the more menu (default: "More")
|
|
42
|
+
moreMenuSearchPlaceholder?: string; // Placeholder for the menu search box
|
|
43
|
+
moreMenuNoResultsText?: string; // Empty-state text when search matches nothing
|
|
44
|
+
moreMenuKeyboardHint?: string; // Keyboard hint shown in the menu footer
|
|
45
|
+
moreMenuRecentLabel?: string; // Heading for the recently-visited products row
|
|
44
46
|
moreMenuFooter?: {
|
|
45
47
|
title: string;
|
|
46
48
|
description: string;
|
|
@@ -58,11 +60,6 @@ const Navbar: FunctionComponent<ComponentProps> = (
|
|
|
58
60
|
const [isMobileMenuVisible, setIsMobileMenuVisible] =
|
|
59
61
|
useState<boolean>(false);
|
|
60
62
|
const [isMoreMenuVisible, setIsMoreMenuVisible] = useState<boolean>(false);
|
|
61
|
-
const [moreMenuTimeout, setMoreMenuTimeout] = useState<ReturnType<
|
|
62
|
-
typeof setTimeout
|
|
63
|
-
> | null>(null);
|
|
64
|
-
const suppressShowRef: React.MutableRefObject<boolean> =
|
|
65
|
-
useRef<boolean>(false);
|
|
66
63
|
|
|
67
64
|
// Use the existing outside click hook for mobile menu
|
|
68
65
|
const {
|
|
@@ -90,41 +87,32 @@ const Navbar: FunctionComponent<ComponentProps> = (
|
|
|
90
87
|
};
|
|
91
88
|
}, []);
|
|
92
89
|
|
|
93
|
-
//
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
// Open/close the products menu with Cmd/Ctrl + K from anywhere.
|
|
91
|
+
useEffect(() => {
|
|
92
|
+
const handleGlobalKeyDown: (event: KeyboardEvent) => void = (
|
|
93
|
+
event: KeyboardEvent,
|
|
94
|
+
): void => {
|
|
95
|
+
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "k") {
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
setIsMoreMenuVisible((visible: boolean) => {
|
|
98
|
+
return !visible;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
};
|
|
99
102
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
document.addEventListener("keydown", handleGlobalKeyDown);
|
|
104
|
+
return () => {
|
|
105
|
+
document.removeEventListener("keydown", handleGlobalKeyDown);
|
|
106
|
+
};
|
|
107
|
+
}, []);
|
|
103
108
|
|
|
104
|
-
|
|
109
|
+
// More menu open/close.
|
|
110
|
+
const openMoreMenu: () => void = (): void => {
|
|
111
|
+
setIsMoreMenuVisible(true);
|
|
105
112
|
};
|
|
106
113
|
|
|
107
|
-
const
|
|
108
|
-
if (moreMenuTimeout) {
|
|
109
|
-
clearTimeout(moreMenuTimeout);
|
|
110
|
-
setMoreMenuTimeout(null);
|
|
111
|
-
}
|
|
112
|
-
|
|
114
|
+
const closeMoreMenu: () => void = (): void => {
|
|
113
115
|
setIsMoreMenuVisible(false);
|
|
114
|
-
suppressShowRef.current = true;
|
|
115
|
-
setTimeout(() => {
|
|
116
|
-
suppressShowRef.current = false;
|
|
117
|
-
}, 300);
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
const showMoreMenu: () => void = (): void => {
|
|
121
|
-
if (suppressShowRef.current) {
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
if (moreMenuTimeout) {
|
|
125
|
-
clearTimeout(moreMenuTimeout);
|
|
126
|
-
}
|
|
127
|
-
setIsMoreMenuVisible(true);
|
|
128
116
|
};
|
|
129
117
|
|
|
130
118
|
// Legacy support: if children are provided, render the old way
|
|
@@ -270,37 +258,6 @@ const Navbar: FunctionComponent<ComponentProps> = (
|
|
|
270
258
|
},
|
|
271
259
|
);
|
|
272
260
|
|
|
273
|
-
// Group items by category for the menu
|
|
274
|
-
const categories: Map<string, MoreMenuItem[]> = new Map();
|
|
275
|
-
props.moreMenuItems?.forEach((item: MoreMenuItem) => {
|
|
276
|
-
const cat: string = item.category || "Other";
|
|
277
|
-
if (!categories.has(cat)) {
|
|
278
|
-
categories.set(cat, []);
|
|
279
|
-
}
|
|
280
|
-
categories.get(cat)!.push(item);
|
|
281
|
-
});
|
|
282
|
-
|
|
283
|
-
// Convert to sections array for NavBarMenu
|
|
284
|
-
const sections: Array<{ title: string; items: Array<ReactElement> }> = [];
|
|
285
|
-
categories.forEach((items: MoreMenuItem[], category: string) => {
|
|
286
|
-
sections.push({
|
|
287
|
-
title: category,
|
|
288
|
-
items: items.map((item: MoreMenuItem) => {
|
|
289
|
-
return (
|
|
290
|
-
<NavBarMenuItem
|
|
291
|
-
key={item.title}
|
|
292
|
-
title={item.title}
|
|
293
|
-
description={item.description}
|
|
294
|
-
route={item.route}
|
|
295
|
-
icon={item.icon}
|
|
296
|
-
iconColor={item.iconColor}
|
|
297
|
-
onClick={forceHideMoreMenu}
|
|
298
|
-
/>
|
|
299
|
-
);
|
|
300
|
-
}),
|
|
301
|
-
});
|
|
302
|
-
});
|
|
303
|
-
|
|
304
261
|
/*
|
|
305
262
|
* Find Home item from navItems. Match by id so this keeps working when the
|
|
306
263
|
* title is translated to a non-English language.
|
|
@@ -336,34 +293,23 @@ const Navbar: FunctionComponent<ComponentProps> = (
|
|
|
336
293
|
{activeMoreItem && (
|
|
337
294
|
<>
|
|
338
295
|
<span className="text-gray-400 mx-1">/</span>
|
|
339
|
-
<
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
className="relative"
|
|
296
|
+
<button
|
|
297
|
+
onClick={openMoreMenu}
|
|
298
|
+
className="group bg-gray-100 text-gray-900 hover:bg-gray-200 rounded-md py-2 px-3 inline-flex items-center text-sm font-medium transition-colors cursor-pointer"
|
|
343
299
|
>
|
|
344
|
-
<
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
className="ml-1.5 h-3 w-3 text-gray-500"
|
|
358
|
-
/>
|
|
359
|
-
</button>
|
|
360
|
-
{isMoreMenuVisible && (
|
|
361
|
-
<NavBarMenu
|
|
362
|
-
sections={sections}
|
|
363
|
-
footer={props.moreMenuFooter}
|
|
364
|
-
/>
|
|
365
|
-
)}
|
|
366
|
-
</div>
|
|
300
|
+
<Icon
|
|
301
|
+
icon={activeMoreItem.icon}
|
|
302
|
+
className="mr-1.5 h-4 w-4 transition-transform duration-150 group-hover:scale-110"
|
|
303
|
+
thick={ThickProp.Thick}
|
|
304
|
+
/>
|
|
305
|
+
<span>{activeMoreItem.title}</span>
|
|
306
|
+
<Icon
|
|
307
|
+
icon={IconProp.ChevronDown}
|
|
308
|
+
className={`ml-1.5 h-3 w-3 text-gray-500 transition-transform duration-200 ${
|
|
309
|
+
isMoreMenuVisible ? "rotate-180" : ""
|
|
310
|
+
}`}
|
|
311
|
+
/>
|
|
312
|
+
</button>
|
|
367
313
|
</>
|
|
368
314
|
)}
|
|
369
315
|
|
|
@@ -373,34 +319,23 @@ const Navbar: FunctionComponent<ComponentProps> = (
|
|
|
373
319
|
props.moreMenuItems.length > 0 && (
|
|
374
320
|
<>
|
|
375
321
|
<span className="text-gray-400 mx-1">/</span>
|
|
376
|
-
<
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
className="relative"
|
|
322
|
+
<button
|
|
323
|
+
onClick={openMoreMenu}
|
|
324
|
+
className="group text-gray-500 hover:bg-gray-50 hover:text-gray-900 rounded-md py-2 px-3 inline-flex items-center text-sm font-medium transition-colors cursor-pointer"
|
|
380
325
|
>
|
|
381
|
-
<
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
className="ml-1.5 h-3 w-3 text-gray-400"
|
|
395
|
-
/>
|
|
396
|
-
</button>
|
|
397
|
-
{isMoreMenuVisible && (
|
|
398
|
-
<NavBarMenu
|
|
399
|
-
sections={sections}
|
|
400
|
-
footer={props.moreMenuFooter}
|
|
401
|
-
/>
|
|
402
|
-
)}
|
|
403
|
-
</div>
|
|
326
|
+
<Icon
|
|
327
|
+
icon={IconProp.Squares}
|
|
328
|
+
className="mr-1.5 h-4 w-4 transition-transform duration-150 group-hover:scale-110 group-hover:text-indigo-600"
|
|
329
|
+
thick={ThickProp.Thick}
|
|
330
|
+
/>
|
|
331
|
+
<span>{props.moreMenuTitle || "Products"}</span>
|
|
332
|
+
<Icon
|
|
333
|
+
icon={IconProp.ChevronDown}
|
|
334
|
+
className={`ml-1.5 h-3 w-3 text-gray-400 transition-transform duration-200 ${
|
|
335
|
+
isMoreMenuVisible ? "rotate-180" : ""
|
|
336
|
+
}`}
|
|
337
|
+
/>
|
|
338
|
+
</button>
|
|
404
339
|
</>
|
|
405
340
|
)}
|
|
406
341
|
</div>
|
|
@@ -432,6 +367,20 @@ const Navbar: FunctionComponent<ComponentProps> = (
|
|
|
432
367
|
/>
|
|
433
368
|
</div>
|
|
434
369
|
)}
|
|
370
|
+
|
|
371
|
+
{isMoreMenuVisible &&
|
|
372
|
+
props.moreMenuItems &&
|
|
373
|
+
props.moreMenuItems.length > 0 && (
|
|
374
|
+
<NavBarMenuModal
|
|
375
|
+
items={props.moreMenuItems}
|
|
376
|
+
footer={props.moreMenuFooter}
|
|
377
|
+
searchPlaceholder={props.moreMenuSearchPlaceholder}
|
|
378
|
+
noResultsText={props.moreMenuNoResultsText}
|
|
379
|
+
keyboardHint={props.moreMenuKeyboardHint}
|
|
380
|
+
recentLabel={props.moreMenuRecentLabel}
|
|
381
|
+
onClose={closeMoreMenu}
|
|
382
|
+
/>
|
|
383
|
+
)}
|
|
435
384
|
</nav>
|
|
436
385
|
);
|
|
437
386
|
};
|