@pc-nexus/models 0.5.0-next.26 → 0.5.0-next.27
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pc-nexus-models.mjs","sources":["../../../../web/models/src/environment.ts","../../../../web/models/src/locale.ts","../../../../web/models/src/navigation.ts","../../../../web/models/src/notify.ts","../../../../web/models/src/richtext.ts","../../../../web/models/src/view.ts","../../../../web/models/src/workitem.ts","../../../../web/models/src/public-api.ts","../../../../web/models/src/pc-nexus-models.ts"],"sourcesContent":["export enum NexusAppEnvironment {\n Development = \"development\",\n Production = \"production\",\n}\n","export const SUPPORTED_LOCALE_CODES = [\"zh-CN\", \"en-US\"] as const;\n\nexport type SupportedLocaleCode = (typeof SUPPORTED_LOCALE_CODES)[number];\n\nexport interface Translator {\n translate: (key: string, params?: Record<string, any>) => TranslationsResourceContent | string;\n}\nexport interface GetTranslationsResult {\n locale: SupportedLocaleCode;\n translations: TranslationsResourceContent | null;\n}\n\nexport interface TranslationsResourceContent {\n [key: string]: string | TranslationsResourceContent;\n}\n","export enum NavigationTarget {\n Workitem = \"workitem\",\n Testcase = \"testcase\",\n Page = \"page\",\n Idea = \"idea\",\n Ticket = \"ticket\",\n Project = \"project\",\n Library = \"library\",\n Space = \"space\",\n Product = \"product\",\n}\n\ninterface NavigationTargetParams {\n target: NavigationTarget;\n id: string;\n}\n\nexport type NavigationLocation = NavigationTargetParams;\n","export enum NotifyType {\n Success = \"success\",\n Error = \"error\",\n Warning = \"warning\",\n Info = \"info\",\n}\n\nexport interface NotifyOptions {\n type: NotifyType;\n title?: string;\n description?: string;\n detail?: string | NotifyDetail;\n actions?: NotifyAction[];\n isAutoClose?: boolean;\n}\n\nexport interface NotifyRef {\n readonly close: () => void;\n}\n\nexport interface NotifyDetail {\n link?: string;\n content?: string;\n}\n\nexport interface NotifyAction {\n text: string;\n icon?: string;\n onClick: (event?: Event) => void;\n}\n","export const NEXUS_CONTENT_UPDATE_EVENT = \"nexus:content:update\";\nexport const NEXUS_CONTENT_CHANGE_EVENT = \"nexus:content:change\";\nexport const NEXUS_CONFIG_READY_EVENT = \"nexus:config:ready\";\n\nexport interface RichtextText {\n text: string;\n [key: string]: unknown;\n}\n\nexport interface RichtextElement {\n type: string;\n children: (RichtextDescendant | RichtextText)[];\n [key: string]: unknown;\n}\n\nexport type RichtextDescendant = RichtextElement;\nexport type RichtextContent = RichtextDescendant[];\n\nexport interface RichtextRendererRef {\n readonly iframe: HTMLIFrameElement;\n readonly update: (content: RichtextContent) => void;\n}\n\nexport interface RichtextEditorRef extends RichtextRendererRef {\n readonly destroy: () => void;\n}\n\nexport interface RichtextRendererOptions {\n content?: RichtextContent;\n}\n\nexport interface RichtextEditorOptions extends RichtextRendererOptions {\n onContentChange?: (content: RichtextContent) => void;\n}\n\nexport interface RichtextBridgeMessage {\n type: string;\n content?: any;\n timestamp?: number;\n source?: string;\n readonly?: boolean;\n}\n","export enum HistoryAction {\n Pop = \"POP\",\n Push = \"PUSH\",\n Replace = \"REPLACE\",\n}\n\nexport interface
|
|
1
|
+
{"version":3,"file":"pc-nexus-models.mjs","sources":["../../../../web/models/src/environment.ts","../../../../web/models/src/locale.ts","../../../../web/models/src/navigation.ts","../../../../web/models/src/notify.ts","../../../../web/models/src/richtext.ts","../../../../web/models/src/view.ts","../../../../web/models/src/workitem.ts","../../../../web/models/src/public-api.ts","../../../../web/models/src/pc-nexus-models.ts"],"sourcesContent":["export enum NexusAppEnvironment {\n Development = \"development\",\n Production = \"production\",\n}\n","export const SUPPORTED_LOCALE_CODES = [\"zh-CN\", \"en-US\"] as const;\n\nexport type SupportedLocaleCode = (typeof SUPPORTED_LOCALE_CODES)[number];\n\nexport interface Translator {\n translate: (key: string, params?: Record<string, any>) => TranslationsResourceContent | string;\n}\nexport interface GetTranslationsResult {\n locale: SupportedLocaleCode;\n translations: TranslationsResourceContent | null;\n}\n\nexport interface TranslationsResourceContent {\n [key: string]: string | TranslationsResourceContent;\n}\n","export enum NavigationTarget {\n Workitem = \"workitem\",\n Testcase = \"testcase\",\n Page = \"page\",\n Idea = \"idea\",\n Ticket = \"ticket\",\n Project = \"project\",\n Library = \"library\",\n Space = \"space\",\n Product = \"product\",\n}\n\ninterface NavigationTargetParams {\n target: NavigationTarget;\n id: string;\n}\n\nexport type NavigationLocation = NavigationTargetParams;\n","export enum NotifyType {\n Success = \"success\",\n Error = \"error\",\n Warning = \"warning\",\n Info = \"info\",\n}\n\nexport interface NotifyOptions {\n type: NotifyType;\n title?: string;\n description?: string;\n detail?: string | NotifyDetail;\n actions?: NotifyAction[];\n isAutoClose?: boolean;\n}\n\nexport interface NotifyRef {\n readonly close: () => void;\n}\n\nexport interface NotifyDetail {\n link?: string;\n content?: string;\n}\n\nexport interface NotifyAction {\n text: string;\n icon?: string;\n onClick: (event?: Event) => void;\n}\n","export const NEXUS_CONTENT_UPDATE_EVENT = \"nexus:content:update\";\nexport const NEXUS_CONTENT_CHANGE_EVENT = \"nexus:content:change\";\nexport const NEXUS_CONFIG_READY_EVENT = \"nexus:config:ready\";\n\nexport interface RichtextText {\n text: string;\n [key: string]: unknown;\n}\n\nexport interface RichtextElement {\n type: string;\n children: (RichtextDescendant | RichtextText)[];\n [key: string]: unknown;\n}\n\nexport type RichtextDescendant = RichtextElement;\nexport type RichtextContent = RichtextDescendant[];\n\nexport interface RichtextRendererRef {\n readonly iframe: HTMLIFrameElement;\n readonly update: (content: RichtextContent) => void;\n}\n\nexport interface RichtextEditorRef extends RichtextRendererRef {\n readonly destroy: () => void;\n}\n\nexport interface RichtextRendererOptions {\n content?: RichtextContent;\n}\n\nexport interface RichtextEditorOptions extends RichtextRendererOptions {\n onContentChange?: (content: RichtextContent) => void;\n}\n\nexport interface RichtextBridgeMessage {\n type: string;\n content?: any;\n timestamp?: number;\n source?: string;\n readonly?: boolean;\n}\n","export enum HistoryAction {\n Pop = \"POP\",\n Push = \"PUSH\",\n Replace = \"REPLACE\",\n}\n\nexport interface HistoryPath {\n pathname: string;\n search: string;\n hash: string;\n}\n\nexport type HistoryTo = string | Partial<HistoryPath>;\n\nexport type HistoryState = unknown;\n\nexport interface HistoryLocation extends HistoryPath {\n state: HistoryState;\n}\n\nexport interface HistoryUpdate {\n action: HistoryAction;\n location: HistoryLocation;\n}\n\nexport interface HistoryListener {\n (update: HistoryUpdate): void;\n}\n\nexport type UnlistenCallback = () => void;\n\nexport interface NexusHistory {\n action: HistoryAction;\n location: HistoryLocation;\n push(to: HistoryTo, state?: HistoryState): void;\n replace(to: HistoryTo, state?: HistoryState): void;\n go(delta: number): void;\n back(): void;\n forward(): void;\n listen(listener: HistoryListener): Promise<UnlistenCallback>;\n}\n","export enum WorkitemTypeGroup {\n Requirement = 1,\n Task = 2,\n Bug = 3,\n Issue = 4,\n Plan = 5,\n}\n\nexport interface Workitem {\n id: string;\n short_id: string;\n identifier: string;\n title: string;\n type_group?: WorkitemTypeGroup;\n type_id?: string;\n}\n\nexport interface WorkitemOpenCreateOptions {\n defaultValues?: {\n title?: string;\n project_id?: string;\n description?: string;\n };\n onSuccess?: (payload: Workitem) => void;\n}\n","/*\n * Public API Surface of models\n */\n\nexport * from \"./context\";\nexport * from \"./condition\";\nexport * from \"./dialog\";\nexport * from \"./environment\";\nexport * from \"./events\";\nexport * from \"./extension\";\nexport * from \"./invoke\";\nexport * from \"./locale\";\nexport * from \"./navigation\";\nexport * from \"./notify\";\nexport * from \"./processor\";\nexport * from \"./api\";\nexport * from \"./remote\";\nexport * from \"./richtext\";\nexport * from \"./user\";\nexport * from \"./view\";\nexport * from \"./viewport\";\nexport * from \"./workitem\";\nexport * from \"./idea\";\nexport * from \"./testcase\";\nexport * from \"./ticket\";\nexport * from \"./page\";\nexport * from \"./store\";\nexport * from \"./baseline\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"IAAY;AAAZ,CAAA,UAAY,mBAAmB,EAAA;AAC3B,IAAA,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aAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EAJW,aAAa,KAAb,aAAa,GAAA,EAAA,CAAA,CAAA;;ICAb;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AACzB,IAAA,iBAAA,CAAA,iBAAA,CAAA,aAAA,CAAA,GAAA,CAAA,CAAA,GAAA,aAAe;AACf,IAAA,iBAAA,CAAA,iBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,iBAAA,CAAA,iBAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAO;AACP,IAAA,iBAAA,CAAA,iBAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAS;AACT,IAAA,iBAAA,CAAA,iBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACZ,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;;ACA7B;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -303,24 +303,33 @@ declare enum HistoryAction {
|
|
|
303
303
|
Push = "PUSH",
|
|
304
304
|
Replace = "REPLACE"
|
|
305
305
|
}
|
|
306
|
-
interface
|
|
306
|
+
interface HistoryPath {
|
|
307
307
|
pathname: string;
|
|
308
|
-
search
|
|
309
|
-
hash
|
|
310
|
-
|
|
308
|
+
search: string;
|
|
309
|
+
hash: string;
|
|
310
|
+
}
|
|
311
|
+
type HistoryTo = string | Partial<HistoryPath>;
|
|
312
|
+
type HistoryState = unknown;
|
|
313
|
+
interface HistoryLocation extends HistoryPath {
|
|
314
|
+
state: HistoryState;
|
|
315
|
+
}
|
|
316
|
+
interface HistoryUpdate {
|
|
317
|
+
action: HistoryAction;
|
|
318
|
+
location: HistoryLocation;
|
|
319
|
+
}
|
|
320
|
+
interface HistoryListener {
|
|
321
|
+
(update: HistoryUpdate): void;
|
|
311
322
|
}
|
|
312
323
|
type UnlistenCallback = () => void;
|
|
313
324
|
interface NexusHistory {
|
|
314
325
|
action: HistoryAction;
|
|
315
|
-
location:
|
|
316
|
-
push(
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
replace(location: LocationDescriptor): void;
|
|
320
|
-
go(n: number): void;
|
|
326
|
+
location: HistoryLocation;
|
|
327
|
+
push(to: HistoryTo, state?: HistoryState): void;
|
|
328
|
+
replace(to: HistoryTo, state?: HistoryState): void;
|
|
329
|
+
go(delta: number): void;
|
|
321
330
|
back(): void;
|
|
322
331
|
forward(): void;
|
|
323
|
-
listen(listener:
|
|
332
|
+
listen(listener: HistoryListener): Promise<UnlistenCallback>;
|
|
324
333
|
}
|
|
325
334
|
|
|
326
335
|
declare enum WorkitemTypeGroup {
|
|
@@ -429,4 +438,4 @@ interface Baseline {
|
|
|
429
438
|
}
|
|
430
439
|
|
|
431
440
|
export { HistoryAction, NEXUS_CONFIG_READY_EVENT, NEXUS_CONTENT_CHANGE_EVENT, NEXUS_CONTENT_UPDATE_EVENT, NavigationTarget, NexusAppEnvironment, NotifyType, SUPPORTED_LOCALE_CODES, WorkitemTypeGroup };
|
|
432
|
-
export type { ApiInvokeOptions, Baseline, ConditionPrimitive, ConditionValue, Conditions, DialogConfirmOptions, DialogOpenOptions, DialogRef, DownloadResult, EgressItem, ExtensionData, ExtensionProperties, GetMetadataResult, GetTranslationsResult, Idea, IdeaOpenCreateOptions, InvokeFunctionParams, InvokeResponseData,
|
|
441
|
+
export type { ApiInvokeOptions, Baseline, ConditionPrimitive, ConditionValue, Conditions, DialogConfirmOptions, DialogOpenOptions, DialogRef, DownloadResult, EgressItem, ExtensionData, ExtensionProperties, GetMetadataResult, GetTranslationsResult, HistoryListener, HistoryLocation, HistoryPath, HistoryState, HistoryTo, HistoryUpdate, Idea, IdeaOpenCreateOptions, InvokeFunctionParams, InvokeResponseData, MultipleUserOpenPopoverOptions, NavigationLocation, NexusAppContext, NexusAppExtension, NexusHistory, NotifyAction, NotifyDetail, NotifyOptions, NotifyRef, Page, PageOpenCreateOptions, ProcessOptions, ProcessRef, RemoteInvokeOptions, RemoteRequestBody, RemoteRequestOptions, RemoteRequestPayload, RemoteRequestResponseData, RemoteRequestSerializedInit, RemoteSerializedBlob, RemoteSerializedFormDataEntry, RichtextBridgeMessage, RichtextContent, RichtextDescendant, RichtextEditorOptions, RichtextEditorRef, RichtextElement, RichtextRendererOptions, RichtextRendererRef, RichtextText, SingleUserOpenPopoverOptions, Subscription, SupportedLocaleCode, Testcase, TestcaseOpenCreateOptions, Ticket, TicketOpenCreateOptions, TranslationsResourceContent, Translator, UnlistenCallback, UploadResult, UserInfo, UserOpenDialogOptions, UserOpenDialogRef, UserOpenPopoverOptions, UserOpenPopoverRef, Viewport, ViewportSize, Workitem, WorkitemOpenCreateOptions };
|