@epam/ai-dial-chat-hooks 1.4.0-dev.122 → 1.4.0-dev.126

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,4 +1,5 @@
1
1
  import { OrgUnitNamespace } from '@epam/ai-dial-chat-shared';
2
+ import { PublishDependencyType } from '@epam/ai-dial-publish-panel';
2
3
  import { CatalogPublishEntityType } from '../catalog/publish';
3
4
  import { SaveDestinationRoot } from '../catalog/save-destination-root';
4
5
  import { OrgUnitsStatus } from './types';
@@ -61,4 +62,37 @@ export declare const buildFolderGuards: ({ purpose, isEnabled, status, namespace
61
62
  export declare const toPublishDisabledReason: (getDisabledReason: ((folderPath: string[]) => string | undefined) | undefined) => ((destination: {
62
63
  path: string[];
63
64
  }) => string | undefined) | undefined;
65
+ /**
66
+ * The kind of dependency whose resources live in `namespace`, or `undefined` for a namespace no dependency has.
67
+ * @param namespace - org-unit namespace
68
+ */
69
+ export declare const getDependencyTypeOfNamespace: (namespace: OrgUnitNamespace) => PublishDependencyType | undefined;
70
+ /**
71
+ * The org-unit namespaces a direct write must hold `write` on to copy the given
72
+ * dependencies, each once. A `file` has none: the files a schema marks travel
73
+ * with the application.
74
+ * @param dependencies - the dependencies the panel lists
75
+ */
76
+ export declare const getDependencyOrgUnitNamespaces: (dependencies: readonly {
77
+ type: PublishDependencyType;
78
+ }[]) => OrgUnitNamespace[];
79
+ /** Inputs of {@link getMissingDirectWriteNamespaces}. */
80
+ interface MissingDirectWriteNamespacesParams {
81
+ /** Whether the `orgUnitsEnabled` feature flag is on. */
82
+ isEnabled: boolean;
83
+ /** Load status from `useOrgUnits`. */
84
+ status: OrgUnitsStatus;
85
+ /** Strict check from `useOrgUnits`. */
86
+ canSaveDirectlyAt: OrgUnitRightCheck;
87
+ }
88
+ /**
89
+ * The namespaces, among those asked, the user may not write straight into the
90
+ * org unit that owns the folder. Empty while the rights are not known (flag
91
+ * off or status not `Ready`), so missing data never disables a folder.
92
+ * @param params - flag, status and the hook's strict check
93
+ * @param folderPath - the destination folder inside the Organization root
94
+ * @param namespaces - the namespaces the write needs
95
+ */
96
+ export declare const getMissingDirectWriteNamespaces: ({ isEnabled, status, canSaveDirectlyAt }: MissingDirectWriteNamespacesParams, folderPath: string[], namespaces: readonly OrgUnitNamespace[]) => OrgUnitNamespace[];
97
+ export {};
64
98
  //# sourceMappingURL=org-unit-guards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"org-unit-guards.d.ts","sourceRoot":"","sources":["../../src/org-units/org-unit-guards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAcnE;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,GAC9B,YAAY,wBAAwB,KACnC,gBAAgB,GAAG,SAAiD,CAAC;AAExE,wEAAwE;AACxE,oBAAY,yBAAyB;IACnC,sGAAsG;IACtG,IAAI,SAAS;IACb,6DAA6D;IAC7D,OAAO,YAAY;CACpB;AAED,2CAA2C;AAC3C,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,yBAAyB,CAAC;IACnC,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,MAAM,EAAE,cAAc,CAAC;IACvB,0GAA0G;IAC1G,SAAS,EAAE,gBAAgB,GAAG,SAAS,CAAC;IACxC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,YAAY,EAAE,iBAAiB,CAAC;IAChC,kFAAkF;IAClF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,+GAA+G;IAC/G,SAAS,CAAC,EAAE,CAAC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/B,uBAAuB,KAAG,YA8B5B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAClC,mBAAmB,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,MAAM,GAAG,SAAS,CAAC,GAAG,SAAS,KAC5E,CAAC,CAAC,WAAW,EAAE;IAAE,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,KAAK,MAAM,GAAG,SAAS,CAAC,GAAG,SACc,CAAC;AAc9E;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACvC,WAAW,gBAAgB,KAC1B,qBAAqB,GAAG,SAG6B,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,GACzC,cAAc,SAAS;IAAE,IAAI,EAAE,qBAAqB,CAAA;CAAE,EAAE,KACvD,gBAAgB,EAOlB,CAAC;AAEF,yDAAyD;AACzD,UAAU,kCAAkC;IAC1C,wDAAwD;IACxD,SAAS,EAAE,OAAO,CAAC;IACnB,sCAAsC;IACtC,MAAM,EAAE,cAAc,CAAC;IACvB,uCAAuC;IACvC,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,GAC1C,0CAA0C,kCAAkC,EAC5E,YAAY,MAAM,EAAE,EACpB,YAAY,SAAS,gBAAgB,EAAE,KACtC,gBAAgB,EAKZ,CAAC"}
@@ -23,6 +23,19 @@ var r = {
23
23
  canSaveDirectlyTo: c && ((t, n = e.Organization) => n === e.Organization && c(t.join("/"), a)),
24
24
  getDisabledReason: l && ((e, t) => d(e, t) ? void 0 : l(e))
25
25
  };
26
- }, s = (e) => e && ((t) => e(t.path));
26
+ }, s = (e) => e && ((t) => e(t.path)), c = {
27
+ application: n.Applications,
28
+ toolset: n.Toolsets,
29
+ prompt: n.Prompts,
30
+ skill: n.Skills,
31
+ file: void 0
32
+ }, l = (e) => Object.entries(c).find(([, t]) => t === e)?.[0], u = (e) => {
33
+ let t = /* @__PURE__ */ new Set();
34
+ for (let { type: n } of e) {
35
+ let e = c[n];
36
+ e != null && t.add(e);
37
+ }
38
+ return [...t];
39
+ }, d = ({ isEnabled: e, status: n, canSaveDirectlyAt: r }, i, a) => !e || n !== t.Ready ? [] : a.filter((e) => !r(i.join("/"), e));
27
40
  //#endregion
28
- export { a as OrgUnitFolderGuardPurpose, o as buildFolderGuards, i as getOrgUnitNamespace, s as toPublishDisabledReason };
41
+ export { a as OrgUnitFolderGuardPurpose, o as buildFolderGuards, u as getDependencyOrgUnitNamespaces, l as getDependencyTypeOfNamespace, d as getMissingDirectWriteNamespaces, i as getOrgUnitNamespace, s as toPublishDisabledReason };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-chat-hooks",
3
3
  "description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
4
- "version": "1.4.0-dev.122",
4
+ "version": "1.4.0-dev.126",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -131,7 +131,7 @@
131
131
  }
132
132
  },
133
133
  "dependencies": {
134
- "@epam/ai-dial-chat-api-client": "1.4.0-dev.122",
134
+ "@epam/ai-dial-chat-api-client": "1.4.0-dev.126",
135
135
  "dompurify": "3.4.17",
136
136
  "fflate": "^0.8.3",
137
137
  "lru-cache": "^10.4.3",
@@ -140,23 +140,23 @@
140
140
  },
141
141
  "peerDependencies": {
142
142
  "react": "^19.2.8",
143
- "@epam/ai-dial-attachment-canvas": "1.4.0-dev.122",
144
- "@epam/ai-dial-attachment-input": "1.4.0-dev.122",
145
- "@epam/ai-dial-catalog": "1.4.0-dev.122",
146
- "@epam/ai-dial-chat-overlay": "1.4.0-dev.122",
147
- "@epam/ai-dial-chat-shared": "1.4.0-dev.122",
148
- "@epam/ai-dial-conversation-input": "1.4.0-dev.122",
149
- "@epam/ai-dial-mcp-apps": "1.4.0-dev.122",
150
- "@epam/ai-dial-projects": "1.4.0-dev.122",
151
- "@epam/ai-dial-publish-panel": "1.4.0-dev.122",
152
- "@epam/ai-dial-quotations": "1.4.0-dev.122",
143
+ "@epam/ai-dial-attachment-canvas": "1.4.0-dev.126",
144
+ "@epam/ai-dial-attachment-input": "1.4.0-dev.126",
145
+ "@epam/ai-dial-catalog": "1.4.0-dev.126",
146
+ "@epam/ai-dial-chat-overlay": "1.4.0-dev.126",
147
+ "@epam/ai-dial-chat-shared": "1.4.0-dev.126",
148
+ "@epam/ai-dial-conversation-input": "1.4.0-dev.126",
149
+ "@epam/ai-dial-mcp-apps": "1.4.0-dev.126",
150
+ "@epam/ai-dial-projects": "1.4.0-dev.126",
151
+ "@epam/ai-dial-publish-panel": "1.4.0-dev.126",
152
+ "@epam/ai-dial-quotations": "1.4.0-dev.126",
153
153
  "@epam/ai-dial-react-file-manager": "^0.4.3",
154
- "@epam/ai-dial-scheduled-tasks": "1.4.0-dev.122",
155
- "@epam/ai-dial-share": "1.4.0-dev.122",
156
- "@epam/ai-dial-skill-editor": "1.4.0-dev.122",
157
- "@epam/ai-dial-source-panel": "1.4.0-dev.122",
154
+ "@epam/ai-dial-scheduled-tasks": "1.4.0-dev.126",
155
+ "@epam/ai-dial-share": "1.4.0-dev.126",
156
+ "@epam/ai-dial-skill-editor": "1.4.0-dev.126",
157
+ "@epam/ai-dial-source-panel": "1.4.0-dev.126",
158
158
  "@epam/ai-dial-ui-kit": "^0.16.0",
159
- "@epam/ai-dial-usage-dashboard": "1.4.0-dev.122",
159
+ "@epam/ai-dial-usage-dashboard": "1.4.0-dev.126",
160
160
  "@modelcontextprotocol/sdk": "^1.32.2",
161
161
  "@epam/pdf-highlighter-kit": "^0.0.23"
162
162
  },
@@ -1,6 +1,6 @@
1
1
  import { createChatStreamApi as e } from "../conversation/create-chat-stream-api.js";
2
- import { NO_CONVERSATION_LIST_SYNC as t } from "../conversation/conversation-data-source.js";
3
- import { getBrowserTimezone as n } from "../shared/browser-timezone.js";
2
+ import { getBrowserTimezone as t } from "../shared/browser-timezone.js";
3
+ import { NO_CONVERSATION_LIST_SYNC as n } from "../conversation/conversation-data-source.js";
4
4
  import { sleep as r } from "../shared/sleep.js";
5
5
  //#region src/project/project-conversation-data-source.ts
6
6
  var i = "projects/", a = 5, o = 2e3, s = 5e3, c = "data: {\"action\":\"UPDATE\"}\n\n", l = (e) => e.startsWith(i) ? e : `${i}${e}`, u = (e) => {
@@ -28,9 +28,9 @@ var i = "projects/", a = 5, o = 2e3, s = 5e3, c = "data: {\"action\":\"UPDATE\"}
28
28
  }, f = ({ projectId: r, canEdit: i, client: a, stream: o, routes: s, viewedWriter: c, notFoundMessageKey: f }) => {
29
29
  let { streamCompletion: p, stopCompletion: m } = e({
30
30
  ...o,
31
- getTimezone: n
31
+ getTimezone: t
32
32
  }), h = {
33
- ...t,
33
+ ...n,
34
34
  markUnread: (e) => c.drop(e),
35
35
  markViewed: async (e) => {
36
36
  try {
@@ -22,6 +22,30 @@ export interface ScheduledTaskScheduleLabels {
22
22
  /** Appends the task's zone to a schedule label, e.g. "Daily at 09:00 (Asia/Tokyo)". Omit to never show the zone. */
23
23
  withTimezone?: (label: string, timezone: string) => string;
24
24
  }
25
+ /** Host-translated zone suffix for a detail value, e.g. "{label} ({timezone})". */
26
+ export interface ScheduledTaskZoneLabels {
27
+ /** Appends `timezone` to an already formatted date or time. */
28
+ withTimezone: (label: string, timezone: string) => string;
29
+ }
30
+ /** Host-translated wording for a cron activity window. */
31
+ export interface ScheduledTaskActiveWindowLabels extends ScheduledTaskZoneLabels {
32
+ /** The window between two locale-formatted task-zone wall times, e.g. "{startDate} – {endDate}". */
33
+ range: (startDate: string, endDate: string) => string;
34
+ }
35
+ /** Locale and viewer zone used to format a task's next run. */
36
+ export interface ScheduledTaskNextRunOptions {
37
+ /** BCP 47 locale for the date and time. Defaults to the runtime default. */
38
+ locale?: string;
39
+ /** The viewer's IANA zone the instant is shown in and named after. Defaults to `getBrowserTimezone()`. */
40
+ browserTimezone?: string;
41
+ }
42
+ /** Why a task that is not completed still cannot be turned on. */
43
+ export declare enum ScheduledTaskActivationBlock {
44
+ /** A one-time (`date`) schedule with no next run has already fired. */
45
+ OneTimeFired = "oneTimeFired",
46
+ /** A recurring (`cron`) schedule's activity window `endDate` has passed. */
47
+ WindowEnded = "windowEnded"
48
+ }
25
49
  /** Host-translated duration units for a run. */
26
50
  export interface ScheduledTaskRunDurationLabels {
27
51
  /** `count` hours, e.g. "1h". */
@@ -117,4 +141,27 @@ export declare const toScheduledTaskRunItems: (runs: ScheduledTaskRunDto[], opti
117
141
  export declare const classifyScheduledTaskDeleteError: (status: number | undefined) => ScheduledTaskDeleteErrorKind;
118
142
  /** Returns the admin-consent message, else the scheduler's own trimmed reason, else the fallback. */
119
143
  export declare const selectScheduledTaskErrorMessage: (details: Pick<ApiErrorDetails, "code" | "upstreamMessage">, { adminConsentRequired, fallback }: ScheduledTaskErrorMessages) => string;
144
+ /**
145
+ * Formats a task's `nextRunTime`, an absolute instant, in the viewer's zone and
146
+ * names that zone, e.g. `Nov 19, 2026, 5:45 PM (Europe/Kyiv)`. The instant is
147
+ * formatted in the same zone the suffix names, so the two cannot disagree.
148
+ * Without a resolvable viewer zone the instant is shown in the runtime's
149
+ * default zone with no suffix.
150
+ */
151
+ export declare const formatScheduledTaskNextRunTime: (nextRunTime: string, labels: ScheduledTaskZoneLabels, { locale, browserTimezone, }?: ScheduledTaskNextRunOptions) => string;
152
+ /**
153
+ * Formats a cron activity window as task-zone wall times and always names the
154
+ * task's zone (`UTC` when it has none). Without an explicit start date the
155
+ * window begins at the next scheduled occurrence: the server's `nextRunTime`,
156
+ * or one computed from the cron fields when the server has none (e.g. an
157
+ * inactive task). Returns `undefined` when the window has no end date.
158
+ */
159
+ export declare const formatScheduledTaskActiveWindow: (task: Pick<ScheduledTaskDto, "trigger" | "timezone" | "nextRunTime">, labels: ScheduledTaskActiveWindowLabels, locale?: string) => string | undefined;
160
+ /**
161
+ * Returns why the task cannot be turned on, or `undefined` when it can. This is
162
+ * the fallback for tasks whose `isCompleted` is missing (a failed runs check)
163
+ * or whose last run is still in flight: a one-time schedule with no next run
164
+ * has already fired, and a cron schedule whose window ended cannot run again.
165
+ */
166
+ export declare const getScheduledTaskActivationBlock: (task: Pick<ScheduledTaskDto, "triggerType" | "nextRunTime" | "trigger">, now?: number) => ScheduledTaskActivationBlock | undefined;
120
167
  //# sourceMappingURL=scheduled-task-display.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled-task-display.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-display.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAe9D,mGAAmG;AACnG,MAAM,WAAW,2BAA2B;IAC1C,6CAA6C;IAC7C,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,mCAAmC;IACnC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,+CAA+C;IAC/C,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,yFAAyF;IACzF,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAClC,gGAAgG;IAChG,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAChD,qDAAqD;IACrD,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACjD,+CAA+C;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oHAAoH;IACp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eAAO,MAAM,gCAAgC,GAC3C,QAAQ,MAAM,GAAG,SAAS,KACzB,4BAKF,CAAC;AAEF,qGAAqG;AACrG,eAAO,MAAM,+BAA+B,GAC1C,SAAS,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,iBAAiB,CAAC,EAC1D,oCAAoC,0BAA0B,KAC7D,MAIF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,GACzC,aAAa,MAAM,EACnB,QAAQ,uBAAuB,EAC/B,+BAGG,2BAAgC,KAClC,MAOF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,+BAA+B,GAC1C,MAAM,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC,EACpE,QAAQ,+BAA+B,EACvC,SAAS,MAAM,KACd,MAAM,GAAG,SAgBX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,GAC1C,MAAM,IAAI,CAAC,gBAAgB,EAAE,aAAa,GAAG,aAAa,GAAG,SAAS,CAAC,EACvE,MAAK,MAAmB,KACvB,4BAA4B,GAAG,SAcjC,CAAC"}
@@ -1,65 +1,81 @@
1
1
  import { ScheduledTaskTriggerDescriptionKind as e, describeScheduledTaskTrigger as t } from "./scheduled-task-description.js";
2
- import { isSameTimezone as n } from "../shared/timezones.js";
3
- import { SCHEDULED_TASK_WALL_DATE_TIME_PATTERN as r, formatScheduledTaskClockTime as i, formatScheduledTaskRunDate as a, formatScheduledTaskRunTime as o, formatScheduledTaskWeekdays as s, formatZonedDateTime as c } from "./scheduled-task-time-format.js";
4
- import { ScheduledTaskErrorCode as l, ScheduledTaskRunDtoStatusEnum as u } from "@epam/ai-dial-chat-api-client";
5
- import { ScheduledTaskRunStatus as d, instantToZonedDateTime as f, isAbsoluteInstant as p } from "@epam/ai-dial-scheduled-tasks";
2
+ import { getBrowserTimezone as n } from "../shared/browser-timezone.js";
3
+ import { isSameTimezone as r } from "../shared/timezones.js";
4
+ import { getNextCronOccurrence as i, hasScheduledTaskWindowEnded as a } from "./scheduled-task-next-occurrence.js";
5
+ import { SCHEDULED_TASK_WALL_DATE_TIME_PATTERN as o, formatScheduledTaskClockTime as s, formatScheduledTaskInstant as c, formatScheduledTaskRunDate as l, formatScheduledTaskRunTime as u, formatScheduledTaskWeekdays as d, formatZonedDateTime as f } from "./scheduled-task-time-format.js";
6
+ import { ScheduledTaskDtoTriggerTypeEnum as p, ScheduledTaskErrorCode as m, ScheduledTaskRunDtoStatusEnum as h } from "@epam/ai-dial-chat-api-client";
7
+ import { ScheduledTaskRunStatus as g, instantToZonedDateTime as _, isAbsoluteInstant as v } from "@epam/ai-dial-scheduled-tasks";
6
8
  //#region src/scheduled-task/scheduled-task-display.ts
7
- var m = /* @__PURE__ */ function(e) {
9
+ var y = /* @__PURE__ */ function(e) {
10
+ return e.OneTimeFired = "oneTimeFired", e.WindowEnded = "windowEnded", e;
11
+ }({}), b = /* @__PURE__ */ function(e) {
8
12
  return e.NotFound = "notFound", e.Retryable = "retryable", e.Generic = "generic", e;
9
- }({}), h = 60, g = 3600, _ = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), v = (e, t, n) => {
10
- let i = p(e) ? f(e, t) : e.slice(0, 16);
11
- return !i || !r.test(i) ? e : c(i, n);
12
- }, y = (r, a, { locale: o, browserTimezone: l = Intl.DateTimeFormat().resolvedOptions().timeZone, alwaysShowTimezone: u = !1 } = {}) => {
13
- let d = r.timezone || "UTC", f = t(r.trigger, { timezone: d }), p = f.time ?? "", m = i(p, o), h = (e) => a.withTimezone && (u || !n(d, l)) ? a.withTimezone(e, d) : e;
14
- switch (f.kind) {
15
- case e.OneTime: return h(a.onceAt(c(f.dateTime ?? "", o)));
16
- case e.EveryNMinutes: return a.everyNMinutes(f.intervalMinutes ?? 0);
17
- case e.Hourly: return h(a.hourlyAt(p));
18
- case e.Daily: return h(a.dailyAt(m));
19
- case e.Weekly: return h(a.weeklyAt(s(f.daysOfWeek ?? [f.dayOfWeek ?? ""], o), m));
20
- case e.Monthly: return h(a.monthlyAt(f.dayOfMonth ?? "", m));
21
- case e.Invalid: return a.invalid;
22
- default: return a.recurringFallback;
13
+ }({}), x = 60, S = 3600, C = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), w = (e, t, n) => {
14
+ let r = v(e) ? _(e, t) : e.slice(0, 16);
15
+ return !r || !o.test(r) ? e : f(r, n);
16
+ }, T = (n, i, { locale: a, browserTimezone: o = Intl.DateTimeFormat().resolvedOptions().timeZone, alwaysShowTimezone: c = !1 } = {}) => {
17
+ let l = n.timezone || "UTC", u = t(n.trigger, { timezone: l }), p = u.time ?? "", m = s(p, a), h = (e) => i.withTimezone && (c || !r(l, o)) ? i.withTimezone(e, l) : e;
18
+ switch (u.kind) {
19
+ case e.OneTime: return h(i.onceAt(f(u.dateTime ?? "", a)));
20
+ case e.EveryNMinutes: return i.everyNMinutes(u.intervalMinutes ?? 0);
21
+ case e.Hourly: return h(i.hourlyAt(p));
22
+ case e.Daily: return h(i.dailyAt(m));
23
+ case e.Weekly: return h(i.weeklyAt(d(u.daysOfWeek ?? [u.dayOfWeek ?? ""], a), m));
24
+ case e.Monthly: return h(i.monthlyAt(u.dayOfMonth ?? "", m));
25
+ case e.Invalid: return i.invalid;
26
+ default: return i.recurringFallback;
23
27
  }
24
- }, b = (e, t, n) => ({
28
+ }, E = (e, t, n) => ({
25
29
  id: e.id,
26
30
  displayName: e.displayName,
27
31
  descriptionPreview: e.description,
28
- scheduleLabel: y(e, t, n),
32
+ scheduleLabel: T(e, t, n),
29
33
  isActive: e.isActive,
30
34
  isCompleted: e.isCompleted
31
- }), x = (e, t, n) => e.map((e) => b(e, t, n)), S = (e, t) => {
35
+ }), D = (e, t, n) => e.map((e) => E(e, t, n)), O = (e, t) => {
32
36
  if (e == null) return;
33
37
  let n = [
34
- [Math.floor(e / g), t.hours],
35
- [Math.floor(e % g / h), t.minutes],
36
- [e % h, t.seconds]
38
+ [Math.floor(e / S), t.hours],
39
+ [Math.floor(e % S / x), t.minutes],
40
+ [e % x, t.seconds]
37
41
  ].filter(([e]) => e > 0).map(([e, t]) => t(e));
38
42
  return t.suffix(n.length ? n.join(" ") : t.seconds(0));
39
- }, C = (e, t, n, { durationLabels: r, locale: i, now: s = /* @__PURE__ */ new Date() } = {}) => {
40
- let c = new Date(e), l = o(c, i), u = _(c, s) ? n.todayAt(l) : n.dateAt(a(c, i), l), d = r ? S(t, r) : void 0;
41
- return d ? `${u} ${d}` : u;
42
- }, w = (e) => {
43
+ }, k = (e, t, n, { durationLabels: r, locale: i, now: a = /* @__PURE__ */ new Date() } = {}) => {
44
+ let o = new Date(e), s = u(o, i), c = C(o, a) ? n.todayAt(s) : n.dateAt(l(o, i), s), d = r ? O(t, r) : void 0;
45
+ return d ? `${c} ${d}` : c;
46
+ }, A = (e) => {
43
47
  switch (e) {
44
- case u.Success: return d.Success;
45
- case u.Error: return d.Error;
46
- case u.InProgress: return d.InProgress;
47
- default: return d.Missed;
48
+ case h.Success: return g.Success;
49
+ case h.Error: return g.Error;
50
+ case h.InProgress: return g.InProgress;
51
+ default: return g.Missed;
48
52
  }
49
- }, T = (e, { timestampLabels: t, durationLabels: n, conversations: r, conversationIdsMatch: i, locale: a, now: o }) => {
53
+ }, j = (e, { timestampLabels: t, durationLabels: n, conversations: r, conversationIdsMatch: i, locale: a, now: o }) => {
50
54
  let { conversationId: s } = e, c = s ? r.find((e) => i(e.id, s)) : void 0;
51
55
  return {
52
56
  id: e.id,
53
- status: w(e.status),
54
- timestampLabel: C(e.startTime, void 0, t, {
57
+ status: A(e.status),
58
+ timestampLabel: k(e.startTime, void 0, t, {
55
59
  locale: a,
56
60
  now: o
57
61
  }),
58
- durationLabel: S(e.durationSeconds, n),
62
+ durationLabel: O(e.durationSeconds, n),
59
63
  conversationId: s,
60
64
  isUnread: c?.isUnread === !0,
61
65
  errorText: e.errorText
62
66
  };
63
- }, E = (e, t) => e.map((e) => T(e, t)), D = (e) => e === 404 || e === 409 ? "notFound" : e === 502 ? "retryable" : "generic", O = (e, { adminConsentRequired: t, fallback: n }) => e.code === l.ScheduledTaskAdminConsentRequired ? t : e.upstreamMessage?.trim() || n;
67
+ }, M = (e, t) => e.map((e) => j(e, t)), N = (e) => e === 404 || e === 409 ? "notFound" : e === 502 ? "retryable" : "generic", P = (e, { adminConsentRequired: t, fallback: n }) => e.code === m.ScheduledTaskAdminConsentRequired ? t : e.upstreamMessage?.trim() || n, F = (e, t, { locale: r, browserTimezone: i = n() } = {}) => {
68
+ let a = c(e, r, i);
69
+ return i ? t.withTimezone(a, i) : a;
70
+ }, I = (e, t, n) => {
71
+ let r = e.trigger.cron;
72
+ if (!r?.endDate) return;
73
+ let a = e.timezone || "UTC", o = r.startDate ?? e.nextRunTime ?? i(r, a);
74
+ if (o) return t.withTimezone(t.range(w(o, a, n), w(r.endDate, a, n)), a);
75
+ }, L = (e, t = Date.now()) => {
76
+ if (e.triggerType === p.Date && e.nextRunTime == null) return "oneTimeFired";
77
+ let n = e.trigger.cron?.endDate;
78
+ if (e.triggerType === p.Cron && n != null && a(n, t)) return "windowEnded";
79
+ };
64
80
  //#endregion
65
- export { m as ScheduledTaskDeleteErrorKind, D as classifyScheduledTaskDeleteError, S as formatScheduledTaskRunDuration, C as formatScheduledTaskRunTimestamp, y as formatScheduledTaskScheduleLabel, v as formatScheduledTaskTriggerTime, O as selectScheduledTaskErrorMessage, b as toScheduledTaskItem, x as toScheduledTaskItems, T as toScheduledTaskRunItem, E as toScheduledTaskRunItems };
81
+ export { y as ScheduledTaskActivationBlock, b as ScheduledTaskDeleteErrorKind, N as classifyScheduledTaskDeleteError, I as formatScheduledTaskActiveWindow, F as formatScheduledTaskNextRunTime, O as formatScheduledTaskRunDuration, k as formatScheduledTaskRunTimestamp, T as formatScheduledTaskScheduleLabel, w as formatScheduledTaskTriggerTime, L as getScheduledTaskActivationBlock, P as selectScheduledTaskErrorMessage, E as toScheduledTaskItem, D as toScheduledTaskItems, j as toScheduledTaskRunItem, M as toScheduledTaskRunItems };
@@ -15,10 +15,12 @@ export declare const formatScheduledTaskClockTime: (time: string, locale?: strin
15
15
  export declare const formatZonedDateTime: (dateTime: string, locale?: string) => string;
16
16
  /**
17
17
  * Formats an absolute instant (an ISO string such as `nextRunTime`) as a medium
18
- * date and short time in the viewer's zone. Returns the raw value when it is
19
- * not a date.
18
+ * date and short time in `timeZone`, or in the viewer's zone when it is
19
+ * omitted. A host that labels the value with a zone passes that same zone, so
20
+ * the clock time and the label cannot disagree. Returns the raw value when the
21
+ * instant is not a date or the zone is unknown.
20
22
  */
21
- export declare const formatScheduledTaskInstant: (instant: string, locale?: string) => string;
23
+ export declare const formatScheduledTaskInstant: (instant: string, locale?: string, timeZone?: string) => string;
22
24
  /** Formats the time of day of an instant as the locale's short time in the viewer's zone, e.g. `11:00 AM`. */
23
25
  export declare const formatScheduledTaskRunTime: (date: Date, locale?: string) => string;
24
26
  /** Formats the calendar day of an instant without a year in the viewer's zone, e.g. `Nov 17`. */
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled-task-time-format.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-time-format.ts"],"names":[],"mappings":"AAcA,mFAAmF;AACnF,eAAO,MAAM,qCAAqC,QACf,CAAC;AAIpC,+BAA+B;AAC/B,oBAAY,yBAAyB;IACnC,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GACvC,MAAM,MAAM,EACZ,SAAS,MAAM,KACd,MAUF,CAAC;AAEF,qHAAqH;AACrH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,EAChB,SAAS,MAAM,KACd,MAKqC,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,MAAM,EACf,SAAS,MAAM,KACd,MASF,CAAC;AAEF,8GAA8G;AAC9G,eAAO,MAAM,0BAA0B,GACrC,MAAM,IAAI,EACV,SAAS,MAAM,KACd,MACmE,CAAC;AAEvE,iGAAiG;AACjG,eAAO,MAAM,0BAA0B,GACrC,MAAM,IAAI,EACV,SAAS,MAAM,KACd,MAGA,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GACrC,WAAW,MAAM,GAAG,MAAM,GAAG,SAAS,EACtC,SAAS,MAAM,EACf,QAAO,yBAA0D,KAChE,MAGA,CAAC;AAEJ,oGAAoG;AACpG,eAAO,MAAM,2BAA2B,GACtC,YAAY,MAAM,EAAE,EACpB,SAAS,MAAM,KACd,MAKA,CAAC"}
1
+ {"version":3,"file":"scheduled-task-time-format.d.ts","sourceRoot":"","sources":["../../src/scheduled-task/scheduled-task-time-format.ts"],"names":[],"mappings":"AAcA,mFAAmF;AACnF,eAAO,MAAM,qCAAqC,QACf,CAAC;AAIpC,+BAA+B;AAC/B,oBAAY,yBAAyB;IACnC,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GACvC,MAAM,MAAM,EACZ,SAAS,MAAM,KACd,MAUF,CAAC;AAEF,qHAAqH;AACrH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,EAChB,SAAS,MAAM,KACd,MAKqC,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,MAAM,EACf,SAAS,MAAM,EACf,WAAW,MAAM,KAChB,MAUF,CAAC;AAEF,8GAA8G;AAC9G,eAAO,MAAM,0BAA0B,GACrC,MAAM,IAAI,EACV,SAAS,MAAM,KACd,MACmE,CAAC;AAEvE,iGAAiG;AACjG,eAAO,MAAM,0BAA0B,GACrC,MAAM,IAAI,EACV,SAAS,MAAM,KACd,MAGA,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,GACrC,WAAW,MAAM,GAAG,MAAM,GAAG,SAAS,EACtC,SAAS,MAAM,EACf,QAAO,yBAA0D,KAChE,MAGA,CAAC;AAEJ,oGAAoG;AACpG,eAAO,MAAM,2BAA2B,GACtC,YAAY,MAAM,EAAE,EACpB,SAAS,MAAM,KACd,MAKA,CAAC"}
@@ -13,11 +13,12 @@ var e = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/, t = /^(\d{1,2}):(\d{2})$/, n = /* @__
13
13
  dateStyle: "medium",
14
14
  timeStyle: "short",
15
15
  timeZone: "UTC"
16
- }).format(/* @__PURE__ */ new Date(`${e}:00Z`)), a = (e, t) => {
16
+ }).format(/* @__PURE__ */ new Date(`${e}:00Z`)), a = (e, t, n) => {
17
17
  try {
18
18
  return new Intl.DateTimeFormat(t, {
19
19
  dateStyle: "medium",
20
- timeStyle: "short"
20
+ timeStyle: "short",
21
+ timeZone: n
21
22
  }).format(new Date(e));
22
23
  } catch {
23
24
  return e;
@@ -1,17 +1,17 @@
1
1
  import { UnsupportedTriggerReason as e } from "./scheduled-task/scheduled-task-mapping.js";
2
2
  import { ScheduledTaskTriggerDescriptionKind as t, describeScheduledTaskTrigger as n } from "./scheduled-task/scheduled-task-description.js";
3
3
  import { UTC_TIMEZONE_ID as r, findTimezoneOption as i, getTimezoneOptions as a, isKnownTimezone as o, isSameTimezone as s } from "./shared/timezones.js";
4
- import { SCHEDULED_TASK_WALL_DATE_TIME_PATTERN as c, ScheduledTaskWeekdayStyle as l, formatScheduledTaskClockTime as u, formatScheduledTaskInstant as d, formatScheduledTaskRunDate as f, formatScheduledTaskRunTime as p, formatScheduledTaskWeekday as m, formatScheduledTaskWeekdays as h, formatZonedDateTime as g } from "./scheduled-task/scheduled-task-time-format.js";
5
- import { ScheduledTaskDeleteErrorKind as _, classifyScheduledTaskDeleteError as v, formatScheduledTaskRunDuration as y, formatScheduledTaskRunTimestamp as b, formatScheduledTaskScheduleLabel as x, formatScheduledTaskTriggerTime as S, selectScheduledTaskErrorMessage as C, toScheduledTaskItem as w, toScheduledTaskItems as T, toScheduledTaskRunItem as E, toScheduledTaskRunItems as D } from "./scheduled-task/scheduled-task-display.js";
6
- import { mapFormValuesToCreateBody as O, mapFormValuesToUpdateBody as k, mapScheduledTaskDtoToFormValues as A } from "./scheduled-task/scheduled-task-trigger.js";
7
- import { prepareScheduledTaskCreateBody as j, prepareScheduledTaskUpdateBody as M } from "./scheduled-task/scheduled-task-preparation.js";
8
- import { createScheduledTasksApiClient as N } from "./scheduled-task/scheduled-tasks-api-client.js";
9
- import { useScheduledTasks as P } from "./scheduled-task/use-scheduled-tasks.js";
10
- import { mergeRunsById as F, useScheduledTaskRuns as I } from "./scheduled-task/use-scheduled-task-runs.js";
11
- import { ScheduledTaskRunStatusFeedback as L, mergeScheduledTaskRuns as R, useStartScheduledTask as z } from "./scheduled-task/useStartScheduledTask.js";
12
- import { getNextCronOccurrence as B, hasScheduledTaskWindowEnded as V } from "./scheduled-task/scheduled-task-next-occurrence.js";
13
- import { checkScheduledTaskAuthSessionError as H } from "./scheduled-task/check-scheduled-task-auth-session-error.js";
14
- import { useScheduledTaskSkillDisplayNames as U } from "./scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js";
15
- import { ActiveScheduledTaskDetailState as W, ActiveScheduledTaskStatus as G, resolveActiveScheduledTask as K } from "./scheduled-task/active-scheduled-task.js";
16
- import { useActiveScheduledTaskDetails as q } from "./scheduled-task/useActiveScheduledTaskDetails.js";
17
- export { W as ActiveScheduledTaskDetailState, G as ActiveScheduledTaskStatus, c as SCHEDULED_TASK_WALL_DATE_TIME_PATTERN, _ as ScheduledTaskDeleteErrorKind, L as ScheduledTaskRunStatusFeedback, t as ScheduledTaskTriggerDescriptionKind, l as ScheduledTaskWeekdayStyle, r as UTC_TIMEZONE_ID, e as UnsupportedTriggerReason, H as checkScheduledTaskAuthSessionError, v as classifyScheduledTaskDeleteError, N as createScheduledTasksApiClient, n as describeScheduledTaskTrigger, i as findTimezoneOption, u as formatScheduledTaskClockTime, d as formatScheduledTaskInstant, f as formatScheduledTaskRunDate, y as formatScheduledTaskRunDuration, p as formatScheduledTaskRunTime, b as formatScheduledTaskRunTimestamp, x as formatScheduledTaskScheduleLabel, S as formatScheduledTaskTriggerTime, m as formatScheduledTaskWeekday, h as formatScheduledTaskWeekdays, g as formatZonedDateTime, B as getNextCronOccurrence, a as getTimezoneOptions, V as hasScheduledTaskWindowEnded, o as isKnownTimezone, s as isSameTimezone, O as mapFormValuesToCreateBody, k as mapFormValuesToUpdateBody, A as mapScheduledTaskDtoToFormValues, F as mergeRunsById, R as mergeScheduledTaskRuns, j as prepareScheduledTaskCreateBody, M as prepareScheduledTaskUpdateBody, K as resolveActiveScheduledTask, C as selectScheduledTaskErrorMessage, w as toScheduledTaskItem, T as toScheduledTaskItems, E as toScheduledTaskRunItem, D as toScheduledTaskRunItems, q as useActiveScheduledTaskDetails, I as useScheduledTaskRuns, U as useScheduledTaskSkillDisplayNames, P as useScheduledTasks, z as useStartScheduledTask };
4
+ import { getNextCronOccurrence as c, hasScheduledTaskWindowEnded as l } from "./scheduled-task/scheduled-task-next-occurrence.js";
5
+ import { SCHEDULED_TASK_WALL_DATE_TIME_PATTERN as u, ScheduledTaskWeekdayStyle as d, formatScheduledTaskClockTime as f, formatScheduledTaskInstant as p, formatScheduledTaskRunDate as m, formatScheduledTaskRunTime as h, formatScheduledTaskWeekday as g, formatScheduledTaskWeekdays as _, formatZonedDateTime as v } from "./scheduled-task/scheduled-task-time-format.js";
6
+ import { ScheduledTaskActivationBlock as y, ScheduledTaskDeleteErrorKind as b, classifyScheduledTaskDeleteError as x, formatScheduledTaskActiveWindow as S, formatScheduledTaskNextRunTime as C, formatScheduledTaskRunDuration as w, formatScheduledTaskRunTimestamp as T, formatScheduledTaskScheduleLabel as E, formatScheduledTaskTriggerTime as D, getScheduledTaskActivationBlock as O, selectScheduledTaskErrorMessage as k, toScheduledTaskItem as A, toScheduledTaskItems as j, toScheduledTaskRunItem as M, toScheduledTaskRunItems as N } from "./scheduled-task/scheduled-task-display.js";
7
+ import { mapFormValuesToCreateBody as P, mapFormValuesToUpdateBody as F, mapScheduledTaskDtoToFormValues as I } from "./scheduled-task/scheduled-task-trigger.js";
8
+ import { prepareScheduledTaskCreateBody as L, prepareScheduledTaskUpdateBody as R } from "./scheduled-task/scheduled-task-preparation.js";
9
+ import { createScheduledTasksApiClient as z } from "./scheduled-task/scheduled-tasks-api-client.js";
10
+ import { useScheduledTasks as B } from "./scheduled-task/use-scheduled-tasks.js";
11
+ import { mergeRunsById as V, useScheduledTaskRuns as H } from "./scheduled-task/use-scheduled-task-runs.js";
12
+ import { ScheduledTaskRunStatusFeedback as U, mergeScheduledTaskRuns as W, useStartScheduledTask as G } from "./scheduled-task/useStartScheduledTask.js";
13
+ import { checkScheduledTaskAuthSessionError as K } from "./scheduled-task/check-scheduled-task-auth-session-error.js";
14
+ import { useScheduledTaskSkillDisplayNames as q } from "./scheduled-task/useScheduledTaskSkillDisplayNames/useScheduledTaskSkillDisplayNames.js";
15
+ import { ActiveScheduledTaskDetailState as J, ActiveScheduledTaskStatus as Y, resolveActiveScheduledTask as X } from "./scheduled-task/active-scheduled-task.js";
16
+ import { useActiveScheduledTaskDetails as Z } from "./scheduled-task/useActiveScheduledTaskDetails.js";
17
+ export { J as ActiveScheduledTaskDetailState, Y as ActiveScheduledTaskStatus, u as SCHEDULED_TASK_WALL_DATE_TIME_PATTERN, y as ScheduledTaskActivationBlock, b as ScheduledTaskDeleteErrorKind, U as ScheduledTaskRunStatusFeedback, t as ScheduledTaskTriggerDescriptionKind, d as ScheduledTaskWeekdayStyle, r as UTC_TIMEZONE_ID, e as UnsupportedTriggerReason, K as checkScheduledTaskAuthSessionError, x as classifyScheduledTaskDeleteError, z as createScheduledTasksApiClient, n as describeScheduledTaskTrigger, i as findTimezoneOption, S as formatScheduledTaskActiveWindow, f as formatScheduledTaskClockTime, p as formatScheduledTaskInstant, C as formatScheduledTaskNextRunTime, m as formatScheduledTaskRunDate, w as formatScheduledTaskRunDuration, h as formatScheduledTaskRunTime, T as formatScheduledTaskRunTimestamp, E as formatScheduledTaskScheduleLabel, D as formatScheduledTaskTriggerTime, g as formatScheduledTaskWeekday, _ as formatScheduledTaskWeekdays, v as formatZonedDateTime, c as getNextCronOccurrence, O as getScheduledTaskActivationBlock, a as getTimezoneOptions, l as hasScheduledTaskWindowEnded, o as isKnownTimezone, s as isSameTimezone, P as mapFormValuesToCreateBody, F as mapFormValuesToUpdateBody, I as mapScheduledTaskDtoToFormValues, V as mergeRunsById, W as mergeScheduledTaskRuns, L as prepareScheduledTaskCreateBody, R as prepareScheduledTaskUpdateBody, X as resolveActiveScheduledTask, k as selectScheduledTaskErrorMessage, A as toScheduledTaskItem, j as toScheduledTaskItems, M as toScheduledTaskRunItem, N as toScheduledTaskRunItems, Z as useActiveScheduledTaskDetails, H as useScheduledTaskRuns, q as useScheduledTaskSkillDisplayNames, B as useScheduledTasks, G as useStartScheduledTask };
package/utils.js CHANGED
@@ -9,21 +9,21 @@ import { PromptSource as x, parsePromptResourceUrl as S } from "./prompt/prompt-
9
9
  import { getRunnerSchemas as C, isCustomAppSchema as w, isQuickAppSchema as T } from "./shared/application-schema.js";
10
10
  import { buildExternalServiceScopeId as E, getExternalServiceFallbackName as D, parseExternalServiceUrl as O } from "./shared/external-services.js";
11
11
  import { SaveDestinationRoot as k } from "./catalog/save-destination-root.js";
12
- import { buildPromptExportEnvelope as A, buildPromptExportFileName as j, serializePromptExport as M } from "./prompt/export-prompt.js";
13
- import { PROMPT_CONTENT_MAX_LENGTH as N, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as P, PROMPT_DESCRIPTION_MAX_LENGTH as F, PROMPT_FIELD_VALIDATORS as I, PROMPT_NAME_MAX_LENGTH as L, PromptFieldError as R, buildPromptPath as z, getRemainingCharacters as B, validatePromptContent as V, validatePromptDescription as H, validatePromptName as U } from "./prompt/prompt.js";
14
- import { usePromptsState as W } from "./prompt/usePromptsState/usePromptsState.js";
15
- import { getBrowserTimezone as G } from "./shared/browser-timezone.js";
16
- import { apSchedulerDayToJsDay as K, jsDayToApSchedulerDay as q } from "./shared/cron-weekday.js";
17
- import { isValidAbsoluteUrl as J, isValidFeaturesData as Y, parseFeaturesData as X } from "./shared/custom-apps.js";
18
- import { EXTERNAL_SERVICE_SIGNIN_METHOD as Z, PendingSigninEventKind as Q, TOOLSET_SIGNIN_METHOD as $ } from "./shared/client-channel.js";
19
- import { ColorScheme as ee, applyThemeColors as te, getOsPreferredTheme as ne } from "./shared/theme-colors.js";
20
- import { useUsageData as re } from "./usage/useUsageData/useUsageData.js";
21
- import { triggerBrowserDownload as ie } from "./files/browser-download.js";
22
- import { usePersistedState as ae } from "./shared/usePersistedState/usePersistedState.js";
23
- import { useAppVersionCheck as oe } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
24
- import { getCleanedLocationTarget as se } from "./shared/url-cleanup.js";
25
- import { OrgUnitsStatus as ce } from "./org-units/types.js";
26
- import { useOrgUnits as le } from "./org-units/useOrgUnits/useOrgUnits.js";
27
- import { OrgUnitFolderGuardPurpose as ue, buildFolderGuards as de, getOrgUnitNamespace as fe, toPublishDisabledReason as pe } from "./org-units/org-unit-guards.js";
28
- import { useFolderGuards as me } from "./org-units/useFolderGuards/useFolderGuards.js";
29
- export { ee as ColorScheme, Z as EXTERNAL_SERVICE_SIGNIN_METHOD, ue as OrgUnitFolderGuardPurpose, ce as OrgUnitsStatus, N as PROMPT_CONTENT_MAX_LENGTH, P as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, F as PROMPT_DESCRIPTION_MAX_LENGTH, I as PROMPT_FIELD_VALIDATORS, L as PROMPT_NAME_MAX_LENGTH, Q as PendingSigninEventKind, R as PromptFieldError, x as PromptSource, k as SaveDestinationRoot, $ as TOOLSET_SIGNIN_METHOD, K as apSchedulerDayToJsDay, p as appendLocaleCode, te as applyThemeColors, m as buildAdditionalLocaleOptions, E as buildExternalServiceScopeId, de as buildFolderGuards, A as buildPromptExportEnvelope, j as buildPromptExportFileName, z as buildPromptPath, h as composeLocalePayload, o as createCsrfMiddleware, s as createUnauthorizedMiddleware, g as decomposeLocalizedFields, y as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, G as getBrowserTimezone, se as getCleanedLocationTarget, D as getExternalServiceFallbackName, fe as getOrgUnitNamespace, ne as getOsPreferredTheme, B as getRemainingCharacters, C as getRunnerSchemas, c as includesIgnoreCase, i as isConversationNotFoundError, w as isCustomAppSchema, T as isQuickAppSchema, J as isValidAbsoluteUrl, Y as isValidFeaturesData, q as jsDayToApSchedulerDay, b as padTwoDigits, O as parseExternalServiceUrl, X as parseFeaturesData, S as parsePromptResourceUrl, _ as resolveLocalizedText, l as safeDecodeURI, u as safeDecodeURIComponent, M as serializePromptExport, d as stripSurroundingSlashes, f as stripTrailingSlashes, v as toBaseLocale, pe as toPublishDisabledReason, ie as triggerBrowserDownload, oe as useAppVersionCheck, me as useFolderGuards, le as useOrgUnits, ae as usePersistedState, W as usePromptsState, re as useUsageData, V as validatePromptContent, H as validatePromptDescription, U as validatePromptName, a as withApiErrorMapping };
12
+ import { OrgUnitsStatus as A } from "./org-units/types.js";
13
+ import { OrgUnitFolderGuardPurpose as j, buildFolderGuards as M, getDependencyOrgUnitNamespaces as N, getDependencyTypeOfNamespace as P, getMissingDirectWriteNamespaces as F, getOrgUnitNamespace as I, toPublishDisabledReason as L } from "./org-units/org-unit-guards.js";
14
+ import { buildPromptExportEnvelope as R, buildPromptExportFileName as z, serializePromptExport as B } from "./prompt/export-prompt.js";
15
+ import { PROMPT_CONTENT_MAX_LENGTH as V, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as H, PROMPT_DESCRIPTION_MAX_LENGTH as U, PROMPT_FIELD_VALIDATORS as W, PROMPT_NAME_MAX_LENGTH as G, PromptFieldError as K, buildPromptPath as q, getRemainingCharacters as J, validatePromptContent as Y, validatePromptDescription as X, validatePromptName as Z } from "./prompt/prompt.js";
16
+ import { usePromptsState as Q } from "./prompt/usePromptsState/usePromptsState.js";
17
+ import { getBrowserTimezone as $ } from "./shared/browser-timezone.js";
18
+ import { apSchedulerDayToJsDay as ee, jsDayToApSchedulerDay as te } from "./shared/cron-weekday.js";
19
+ import { isValidAbsoluteUrl as ne, isValidFeaturesData as re, parseFeaturesData as ie } from "./shared/custom-apps.js";
20
+ import { EXTERNAL_SERVICE_SIGNIN_METHOD as ae, PendingSigninEventKind as oe, TOOLSET_SIGNIN_METHOD as se } from "./shared/client-channel.js";
21
+ import { ColorScheme as ce, applyThemeColors as le, getOsPreferredTheme as ue } from "./shared/theme-colors.js";
22
+ import { useUsageData as de } from "./usage/useUsageData/useUsageData.js";
23
+ import { triggerBrowserDownload as fe } from "./files/browser-download.js";
24
+ import { usePersistedState as pe } from "./shared/usePersistedState/usePersistedState.js";
25
+ import { useAppVersionCheck as me } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
26
+ import { getCleanedLocationTarget as he } from "./shared/url-cleanup.js";
27
+ import { useOrgUnits as ge } from "./org-units/useOrgUnits/useOrgUnits.js";
28
+ import { useFolderGuards as _e } from "./org-units/useFolderGuards/useFolderGuards.js";
29
+ export { ce as ColorScheme, ae as EXTERNAL_SERVICE_SIGNIN_METHOD, j as OrgUnitFolderGuardPurpose, A as OrgUnitsStatus, V as PROMPT_CONTENT_MAX_LENGTH, H as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, U as PROMPT_DESCRIPTION_MAX_LENGTH, W as PROMPT_FIELD_VALIDATORS, G as PROMPT_NAME_MAX_LENGTH, oe as PendingSigninEventKind, K as PromptFieldError, x as PromptSource, k as SaveDestinationRoot, se as TOOLSET_SIGNIN_METHOD, ee as apSchedulerDayToJsDay, p as appendLocaleCode, le as applyThemeColors, m as buildAdditionalLocaleOptions, E as buildExternalServiceScopeId, M as buildFolderGuards, R as buildPromptExportEnvelope, z as buildPromptExportFileName, q as buildPromptPath, h as composeLocalePayload, o as createCsrfMiddleware, s as createUnauthorizedMiddleware, g as decomposeLocalizedFields, y as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, $ as getBrowserTimezone, he as getCleanedLocationTarget, N as getDependencyOrgUnitNamespaces, P as getDependencyTypeOfNamespace, D as getExternalServiceFallbackName, F as getMissingDirectWriteNamespaces, I as getOrgUnitNamespace, ue as getOsPreferredTheme, J as getRemainingCharacters, C as getRunnerSchemas, c as includesIgnoreCase, i as isConversationNotFoundError, w as isCustomAppSchema, T as isQuickAppSchema, ne as isValidAbsoluteUrl, re as isValidFeaturesData, te as jsDayToApSchedulerDay, b as padTwoDigits, O as parseExternalServiceUrl, ie as parseFeaturesData, S as parsePromptResourceUrl, _ as resolveLocalizedText, l as safeDecodeURI, u as safeDecodeURIComponent, B as serializePromptExport, d as stripSurroundingSlashes, f as stripTrailingSlashes, v as toBaseLocale, L as toPublishDisabledReason, fe as triggerBrowserDownload, me as useAppVersionCheck, _e as useFolderGuards, ge as useOrgUnits, pe as usePersistedState, Q as usePromptsState, de as useUsageData, Y as validatePromptContent, X as validatePromptDescription, Z as validatePromptName, a as withApiErrorMapping };