Initial commit: Plane
Some checks failed
Branch Build CE / Build Setup (push) Has been cancelled
Branch Build CE / Build-Push Admin Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Web Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Space Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Live Collaboration Docker Image (push) Has been cancelled
Branch Build CE / Build-Push API Server Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Proxy Docker Image (push) Has been cancelled
Branch Build CE / Build-Push AIO Docker Image (push) Has been cancelled
Branch Build CE / Upload Build Assets (push) Has been cancelled
Branch Build CE / Build Release (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
Sync Repositories / sync_changes (push) Has been cancelled
Some checks failed
Branch Build CE / Build Setup (push) Has been cancelled
Branch Build CE / Build-Push Admin Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Web Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Space Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Live Collaboration Docker Image (push) Has been cancelled
Branch Build CE / Build-Push API Server Docker Image (push) Has been cancelled
Branch Build CE / Build-Push Proxy Docker Image (push) Has been cancelled
Branch Build CE / Build-Push AIO Docker Image (push) Has been cancelled
Branch Build CE / Upload Build Assets (push) Has been cancelled
Branch Build CE / Build Release (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Codespell / Check for spelling errors (push) Has been cancelled
Sync Repositories / sync_changes (push) Has been cancelled
Synced from upstream: 8853637e981ed7d8a6cff32bd98e7afe20f54362
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// core
|
||||
import type { TPowerKModalPageDetails } from "@/components/power-k/ui/modal/constants";
|
||||
// local imports
|
||||
import type { TPowerKPageTypeExtended } from "./types";
|
||||
|
||||
export const POWER_K_MODAL_PAGE_DETAILS_EXTENDED: Record<TPowerKPageTypeExtended, TPowerKModalPageDetails> = {};
|
||||
@@ -0,0 +1,5 @@
|
||||
import type { Params } from "next/dist/shared/lib/router/utils/route-matcher";
|
||||
// local imports
|
||||
import type { TPowerKContextTypeExtended } from "./types";
|
||||
|
||||
export const detectExtendedContextFromURL = (_params: Params): TPowerKContextTypeExtended | null => null;
|
||||
@@ -0,0 +1,8 @@
|
||||
// local imports
|
||||
import type { TPowerKContextTypeExtended } from "../types";
|
||||
|
||||
type TArgs = {
|
||||
activeContext: TPowerKContextTypeExtended | null;
|
||||
};
|
||||
|
||||
export const useExtendedContextIndicator = (_args: TArgs): string | null => null;
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./root";
|
||||
@@ -0,0 +1,11 @@
|
||||
// components
|
||||
import type { TPowerKCommandConfig } from "@/components/power-k/core/types";
|
||||
import type { ContextBasedActionsProps, TContextEntityMap } from "@/components/power-k/ui/pages/context-based";
|
||||
// local imports
|
||||
import type { TPowerKContextTypeExtended } from "../../types";
|
||||
|
||||
export const CONTEXT_ENTITY_MAP_EXTENDED: Record<TPowerKContextTypeExtended, TContextEntityMap> = {};
|
||||
|
||||
export const PowerKContextBasedActionsExtended: React.FC<ContextBasedActionsProps> = () => null;
|
||||
|
||||
export const usePowerKContextBasedExtendedActions = (): TPowerKCommandConfig[] => [];
|
||||
@@ -0,0 +1,34 @@
|
||||
"use client";
|
||||
|
||||
import { observer } from "mobx-react";
|
||||
// plane types
|
||||
import { StateGroupIcon } from "@plane/propel/icons";
|
||||
import type { IState } from "@plane/types";
|
||||
// components
|
||||
import { PowerKModalCommandItem } from "@/components/power-k/ui/modal/command-item";
|
||||
|
||||
export type TPowerKProjectStatesMenuItemsProps = {
|
||||
handleSelect: (stateId: string) => void;
|
||||
projectId: string | undefined;
|
||||
selectedStateId: string | undefined;
|
||||
states: IState[];
|
||||
workspaceSlug: string;
|
||||
};
|
||||
|
||||
export const PowerKProjectStatesMenuItems: React.FC<TPowerKProjectStatesMenuItemsProps> = observer((props) => {
|
||||
const { handleSelect, selectedStateId, states } = props;
|
||||
|
||||
return (
|
||||
<>
|
||||
{states.map((state) => (
|
||||
<PowerKModalCommandItem
|
||||
key={state.id}
|
||||
iconNode={<StateGroupIcon stateGroup={state.group} color={state.color} className="shrink-0 size-3.5" />}
|
||||
label={state.name}
|
||||
isSelected={state.id === selectedStateId}
|
||||
onSelect={() => handleSelect(state.id)}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
});
|
||||
@@ -0,0 +1,36 @@
|
||||
import { Command } from "cmdk";
|
||||
import { Search } from "lucide-react";
|
||||
// plane imports
|
||||
import { useTranslation } from "@plane/i18n";
|
||||
// components
|
||||
import type { TPowerKContext } from "@/components/power-k/core/types";
|
||||
// plane web imports
|
||||
import { PowerKModalCommandItem } from "@/components/power-k/ui/modal/command-item";
|
||||
|
||||
export type TPowerKModalNoSearchResultsCommandProps = {
|
||||
context: TPowerKContext;
|
||||
searchTerm: string;
|
||||
updateSearchTerm: (value: string) => void;
|
||||
};
|
||||
|
||||
export const PowerKModalNoSearchResultsCommand: React.FC<TPowerKModalNoSearchResultsCommandProps> = (props) => {
|
||||
const { updateSearchTerm } = props;
|
||||
// translation
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Command.Group>
|
||||
<PowerKModalCommandItem
|
||||
icon={Search}
|
||||
value="no-results"
|
||||
label={
|
||||
<p className="flex items-center gap-2">
|
||||
{t("power_k.search_menu.no_results")}{" "}
|
||||
<span className="shrink-0 text-sm text-custom-text-300">{t("power_k.search_menu.clear_search")}</span>
|
||||
</p>
|
||||
}
|
||||
onSelect={() => updateSearchTerm("")}
|
||||
/>
|
||||
</Command.Group>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
"use client";
|
||||
|
||||
// components
|
||||
import type { TPowerKSearchResultGroupDetails } from "@/components/power-k/ui/modal/search-results-map";
|
||||
// local imports
|
||||
import type { TPowerKSearchResultsKeysExtended } from "../types";
|
||||
|
||||
type TSearchResultsGroupsMapExtended = Record<TPowerKSearchResultsKeysExtended, TPowerKSearchResultGroupDetails>;
|
||||
|
||||
export const SEARCH_RESULTS_GROUPS_MAP_EXTENDED: TSearchResultsGroupsMapExtended = {};
|
||||
5
apps/web/ce/components/command-palette/power-k/types.ts
Normal file
5
apps/web/ce/components/command-palette/power-k/types.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export type TPowerKContextTypeExtended = never;
|
||||
|
||||
export type TPowerKPageTypeExtended = never;
|
||||
|
||||
export type TPowerKSearchResultsKeysExtended = never;
|
||||
Reference in New Issue
Block a user