@sparkelf/dsh-dataops-managed 0.3.22 → 0.3.23

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.
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { InjectFace } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { en } from './locales.ts';
4
+ import { type PlazaSkill } from './skill-plaza-client.ts';
4
5
  /** Values the skill center passes to a contributed section. */
5
6
  export interface SkillPlazaSectionInjected {
6
7
  /** Translate one DataOps plaza message key. */
@@ -16,6 +17,38 @@ export interface SkillPlazaSectionInjected {
16
17
  }
17
18
  /** Props accepted by the plaza section. */
18
19
  export type SkillPlazaSectionProps = Partial<InjectFace<SkillPlazaSectionInjected>>;
20
+ /** One department option derived from the rows the plaza can show. */
21
+ export interface PlazaDepartmentOption {
22
+ /** Value the select submits: the department code when the row carries one. */
23
+ code: string;
24
+ /** Label shown in the select; never empty. */
25
+ name: string;
26
+ }
27
+ /**
28
+ * The department a plaza row belongs to.
29
+ *
30
+ * The backend normally sends `departmentCode`; a legacy row may carry only a name or path, so the
31
+ * fallbacks keep those rows selectable instead of dropping them into an empty key.
32
+ * @param skill - one plaza row.
33
+ * @returns the code, the name, or the deepest path name; empty when the row says nothing.
34
+ */
35
+ export declare function departmentKeyOf(skill: PlazaSkill): string;
36
+ /**
37
+ * The department choices present in the visible rows.
38
+ *
39
+ * The label falls back from the row's own name to the deepest path name and finally to the code,
40
+ * so a department the backend can no longer name still renders as a readable option.
41
+ * @param skills - every row the current query returned.
42
+ * @returns distinct departments, sorted by label.
43
+ */
44
+ export declare function departmentOptionsOf(skills: readonly PlazaSkill[]): PlazaDepartmentOption[];
45
+ /**
46
+ * The rows the department tab shows.
47
+ * @param skills - every row the current query returned.
48
+ * @param code - selected department key, or an empty string for all of them.
49
+ * @returns the department-shared rows, narrowed to `code` when it is set.
50
+ */
51
+ export declare function filterByDepartment(skills: readonly PlazaSkill[], code: string): PlazaSkill[];
19
52
  /**
20
53
  * Browse, share, and install skills other users published.
21
54
  *
@@ -23,7 +23,6 @@ export declare const en: {
23
23
  readonly defaultsNeverPublished: "Not published yet";
24
24
  readonly defaultsNotAdmin: "Administrators only";
25
25
  readonly plazaTitle: "Skill plaza";
26
- readonly plazaAllTags: "All tags";
27
26
  readonly plazaMine: "Shared by me";
28
27
  readonly plazaShowDetail: "Details";
29
28
  readonly plazaClose: "Close";
@@ -42,6 +41,10 @@ export declare const en: {
42
41
  readonly plazaTabApproved: "Approved";
43
42
  readonly plazaTabPending: "Pending";
44
43
  readonly plazaTabAll: "All";
44
+ readonly plazaTabDepartment: "Department";
45
+ readonly plazaDepartment: "Department";
46
+ readonly plazaDepartmentAll: "All departments";
47
+ readonly plazaDepartmentEmpty: "No department-shared skills yet.";
45
48
  readonly plazaSharedTag: "Shared";
46
49
  readonly plazaReview: "Review";
47
50
  readonly plazaPendingEmpty: "No skills are waiting for review.";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkelf/dsh-dataops-managed",
3
- "version": "0.3.22",
3
+ "version": "0.3.23",
4
4
  "description": "DataOps JWT intake and credential-backed MCP tools for managed DeepSeek Harness workspaces.",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",