@forge/react 1.1.0-next.0 → 1.1.0

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/out/__test__/styles.test.d.ts +2 -0
  3. package/out/__test__/styles.test.d.ts.map +1 -0
  4. package/out/__test__/styles.test.js +88 -0
  5. package/out/components.d.ts +44 -0
  6. package/out/components.d.ts.map +1 -0
  7. package/out/components.js +45 -0
  8. package/{src/index.ts → out/index.d.ts} +2 -1
  9. package/out/index.d.ts.map +1 -0
  10. package/out/index.js +7 -0
  11. package/out/reconciler.d.ts +5 -0
  12. package/out/reconciler.d.ts.map +1 -0
  13. package/out/reconciler.js +143 -0
  14. package/out/styles/index.d.ts +28 -0
  15. package/out/styles/index.d.ts.map +1 -0
  16. package/out/styles/index.js +152 -0
  17. package/out/types/components.d.ts +369 -0
  18. package/out/types/components.d.ts.map +1 -0
  19. package/out/types/components.js +2 -0
  20. package/out/types/effect.d.ts +57 -0
  21. package/out/types/effect.d.ts.map +1 -0
  22. package/out/types/effect.js +19 -0
  23. package/out/types/extension.d.ts +10 -0
  24. package/out/types/extension.d.ts.map +1 -0
  25. package/out/types/extension.js +2 -0
  26. package/out/types/forge.d.ts +146 -0
  27. package/out/types/forge.d.ts.map +1 -0
  28. package/out/types/forge.js +21 -0
  29. package/out/types/icons.d.ts +2 -0
  30. package/out/types/icons.d.ts.map +1 -0
  31. package/out/types/icons.js +2 -0
  32. package/out/types/index.d.ts +11 -0
  33. package/out/types/index.d.ts.map +1 -0
  34. package/out/types/index.js +27 -0
  35. package/out/types/legacy-effect.d.ts +40 -0
  36. package/out/types/legacy-effect.d.ts.map +1 -0
  37. package/out/types/legacy-effect.js +21 -0
  38. package/out/types/styles.d.ts +134 -0
  39. package/out/types/styles.d.ts.map +1 -0
  40. package/out/types/styles.js +2 -0
  41. package/package.json +1 -1
  42. package/tsconfig.tsbuildinfo +1078 -0
  43. package/build/bundle-types.sh +0 -21
  44. package/src/__test__/styles.test.tsx +0 -112
  45. package/src/globals.d.ts +0 -12
  46. package/src/reconciler.ts +0 -219
  47. package/src/styles/index.ts +0 -174
  48. package/tsconfig.json +0 -9
@@ -0,0 +1,369 @@
1
+ import { ForgeChildren, ForgeNode, ForgeElement, CustomFieldValue } from './forge';
2
+ import { Icon } from './icons';
3
+ import { StyleProps } from './styles';
4
+ export interface AKOption {
5
+ label: string;
6
+ value: any;
7
+ }
8
+ export interface AuxPipelineUserVisibleError extends Error {
9
+ errorMessage?: string;
10
+ errorDetails?: string;
11
+ }
12
+ export interface BadgeProps {
13
+ appearance?: 'added' | 'default' | 'important' | 'primary' | 'removed';
14
+ text: string;
15
+ }
16
+ export declare type ButtonAppearance = 'default' | 'danger' | 'link' | 'primary' | 'subtle' | 'subtle-link' | 'warning';
17
+ export interface ButtonProps {
18
+ appearance?: ButtonAppearance;
19
+ text: string;
20
+ disabled?: boolean;
21
+ onClick: () => Promise<void> | void;
22
+ icon?: Icon;
23
+ iconPosition?: 'before' | 'after';
24
+ }
25
+ export interface ButtonSetProps {
26
+ children: ForgeChildren;
27
+ }
28
+ export interface ColumnsProps {
29
+ children: ForgeChildren;
30
+ }
31
+ export declare type Align = 'start' | 'center' | 'end';
32
+ export interface ColumnProps {
33
+ width?: number;
34
+ align?: Align;
35
+ children: ForgeChildren;
36
+ }
37
+ export interface ErrorPanelProps {
38
+ error: AuxPipelineUserVisibleError;
39
+ }
40
+ export declare type FormData = Record<string, any>;
41
+ export interface FormProps<T extends FormData> {
42
+ children: ForgeChildren;
43
+ onSubmit: (data: T) => Promise<void> | void;
44
+ submitButtonText?: string;
45
+ submitButtonAppearance?: 'default' | 'primary';
46
+ actionButtons?: ForgeElement<ButtonProps>[];
47
+ }
48
+ export interface FormConditionProps {
49
+ when: string;
50
+ is: boolean | string | Array<string>;
51
+ areChildrenPersisted?: boolean;
52
+ children: ForgeChildren;
53
+ }
54
+ export interface ConfigFormProps {
55
+ children: ForgeChildren;
56
+ }
57
+ export interface CustomFieldPrimitiveProps {
58
+ children: ForgeChildren;
59
+ }
60
+ export declare type ModalDialogWidth = 'small' | 'medium' | 'large' | 'x-large';
61
+ export interface CustomFieldEditPrimitiveProps {
62
+ children: ForgeChildren;
63
+ fieldValue: {
64
+ value: CustomFieldValue;
65
+ updated: boolean;
66
+ };
67
+ isModalOpen: boolean;
68
+ }
69
+ export interface CustomFieldContextConfigPrimitiveProps {
70
+ children: ForgeChildren;
71
+ data?: Record<string, any>;
72
+ }
73
+ export interface DashboardGadgetPrimitiveProps {
74
+ children: ForgeChildren;
75
+ }
76
+ export interface DashboardGadgetEditPrimitiveProps {
77
+ children: ForgeChildren;
78
+ formData: FormData;
79
+ }
80
+ export declare type ImageSizes = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
81
+ export interface ImageProps {
82
+ src: string;
83
+ alt: string;
84
+ size?: ImageSizes;
85
+ }
86
+ export interface NativeToggleProps extends ToggleProps {
87
+ onChange?: (value: boolean) => void;
88
+ }
89
+ export interface NativeImageProps extends StyleProps {
90
+ src: string;
91
+ alt?: string;
92
+ }
93
+ export interface NativeTextProps extends StyleProps {
94
+ children?: ForgeChildren<ForgeNode | string | number>;
95
+ }
96
+ export interface NativeBoxProps extends StyleProps {
97
+ children?: ForgeChildren;
98
+ }
99
+ export interface NativeLinkProps extends StyleProps {
100
+ href: string;
101
+ openNewTab?: boolean;
102
+ children?: ForgeChildren;
103
+ }
104
+ export interface NativeButtonProps {
105
+ appearance?: ButtonAppearance;
106
+ text: string;
107
+ disabled?: boolean;
108
+ onClick: () => Promise<void> | void;
109
+ icon?: Icon;
110
+ iconPosition?: 'before' | 'after';
111
+ }
112
+ export interface FrameProps {
113
+ resource: string;
114
+ }
115
+ export interface InlineDialogProps {
116
+ children: ForgeChildren;
117
+ }
118
+ export interface ModalDialogProps {
119
+ appearance?: 'danger' | 'warning';
120
+ children: ForgeChildren;
121
+ closeButtonText?: string;
122
+ header: string;
123
+ onClose: () => Promise<void> | void;
124
+ width?: ModalDialogWidth;
125
+ }
126
+ export declare type ContainerProps = {};
127
+ declare type LayoutTemplate = 'grid-2' | 'grid-3' | 'sidebar-left' | 'sidebar-right';
128
+ export declare type LayoutProps = {
129
+ template: LayoutTemplate;
130
+ children: ForgeChildren;
131
+ };
132
+ export interface OptionProps {
133
+ defaultSelected?: boolean;
134
+ label: string;
135
+ value: any;
136
+ }
137
+ export interface SelectProps {
138
+ children?: ForgeChildren;
139
+ isMulti?: boolean;
140
+ label: string;
141
+ name: string;
142
+ description?: string;
143
+ isRequired?: boolean;
144
+ placeholder?: string;
145
+ }
146
+ export interface NativeSelectProps extends SelectProps {
147
+ onChange?: (option: AKOption | AKOption[]) => void;
148
+ }
149
+ export interface TabsProps {
150
+ children: ForgeChildren;
151
+ }
152
+ export interface TabProps {
153
+ label: string;
154
+ children: ForgeChildren;
155
+ }
156
+ export interface CheckboxProps {
157
+ label: string;
158
+ value: string;
159
+ defaultChecked?: boolean;
160
+ isRequired?: boolean;
161
+ }
162
+ export interface NativeCheckboxProps extends CheckboxProps {
163
+ onChange?: (value: boolean) => void;
164
+ }
165
+ export interface CheckboxGroupProps {
166
+ label: string;
167
+ name: string;
168
+ description?: string;
169
+ children: ForgeChildren;
170
+ }
171
+ export interface NativeCheckboxGroupProps extends CheckboxGroupProps {
172
+ onChange?: (option: {
173
+ label: string;
174
+ value: boolean;
175
+ }) => void;
176
+ }
177
+ export declare type CodeLanguages = 'abap' | 'actionscript' | 'ada' | 'arduino' | 'autoit' | 'c' | 'c++' | 'coffeescript' | 'csharp' | 'css' | 'cuda' | 'd' | 'dart' | 'delphi' | 'elixir' | 'erlang' | 'fortran' | 'foxpro' | 'go' | 'graphql' | 'groovy' | 'haskell' | 'haxe' | 'html' | 'java' | 'javascript' | 'json' | 'julia' | 'kotlin' | 'latex' | 'livescript' | 'lua' | 'mathematica' | 'matlab' | 'objective-c' | 'objective-j' | 'objectpascal' | 'ocaml' | 'octave' | 'perl' | 'php' | 'powershell' | 'prolog' | 'puppet' | 'python' | 'qml' | 'r' | 'racket' | 'restructuredtext' | 'ruby' | 'rust' | 'sass' | 'scala' | 'scheme' | 'shell' | 'smalltalk' | 'sql' | 'standardml' | 'swift' | 'tcl' | 'tex' | 'text' | 'typescript' | 'vala' | 'vbnet' | 'verilog' | 'vhdl' | 'xml' | 'xquery';
178
+ export interface CodeProps {
179
+ text: string;
180
+ language?: CodeLanguages;
181
+ showLineNumbers?: boolean;
182
+ }
183
+ export interface DateLozengeProps {
184
+ value: number;
185
+ }
186
+ export interface DatePickerProps {
187
+ name: string;
188
+ label: string;
189
+ defaultValue?: string;
190
+ description?: string;
191
+ isRequired?: boolean;
192
+ placeholder?: string;
193
+ }
194
+ export interface NativeDatePickerProps extends DatePickerProps {
195
+ onChange?: (value: string) => void;
196
+ }
197
+ export declare type StatusLozengeAppearance = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
198
+ export interface StatusLozengeProps {
199
+ appearance?: StatusLozengeAppearance;
200
+ text: string;
201
+ }
202
+ export interface MentionProps {
203
+ accountId: string;
204
+ }
205
+ export declare type TextFieldType = 'email' | 'number' | 'tel' | 'text' | 'password';
206
+ export interface TextFieldProps {
207
+ type?: TextFieldType;
208
+ name: string;
209
+ label: string;
210
+ isRequired?: boolean;
211
+ defaultValue?: string;
212
+ description?: string;
213
+ placeholder?: string;
214
+ autoComplete?: 'off';
215
+ }
216
+ export declare type NativeTextFieldProps = TextFieldProps & TextInputProps;
217
+ export declare type HeadingProps = {
218
+ size?: 'small' | 'medium' | 'large';
219
+ children: ForgeChildren<string>;
220
+ };
221
+ export declare type MarkupProps = {
222
+ children: ForgeChildren<ForgeNode | string | number>;
223
+ };
224
+ export declare type LinkProps = {
225
+ href: string;
226
+ openNewTab?: boolean;
227
+ appearance?: 'primary-button' | 'button' | 'link';
228
+ } & MarkupProps;
229
+ export declare type StringProps = {
230
+ text: string;
231
+ };
232
+ export interface ThreeLOPromptProps {
233
+ message?: string;
234
+ promptText?: string;
235
+ authUrl: string;
236
+ }
237
+ export interface RadioProps {
238
+ defaultChecked?: boolean;
239
+ label: string;
240
+ value: string;
241
+ }
242
+ export interface RadioGroupProps {
243
+ children?: ForgeChildren;
244
+ isRequired?: boolean;
245
+ label: string;
246
+ description?: string;
247
+ name: string;
248
+ }
249
+ export interface NativeRadioGroupProps extends RadioGroupProps {
250
+ onChange?: (option: {
251
+ label: string;
252
+ value: string;
253
+ }) => void;
254
+ }
255
+ export interface RangeProps {
256
+ label: string;
257
+ name: string;
258
+ defaultValue?: number;
259
+ min?: number;
260
+ max?: number;
261
+ step?: number;
262
+ }
263
+ export interface NativeRangeProps extends RangeProps {
264
+ onChange?: (v: number) => void;
265
+ }
266
+ export interface SectionMessageProps {
267
+ title?: string;
268
+ appearance?: 'info' | 'warning' | 'error' | 'confirmation' | 'change';
269
+ children: ForgeChildren;
270
+ }
271
+ export declare type TagColor = 'default' | 'green' | 'blue' | 'red' | 'purple' | 'grey' | 'teal' | 'yellow' | 'green-light' | 'blue-light' | 'red-light' | 'purple-light' | 'grey-light' | 'teal-light' | 'yellow-light';
272
+ export interface TagProps {
273
+ color?: TagColor;
274
+ text: string;
275
+ }
276
+ export interface TagGroupProps {
277
+ children: ForgeChildren;
278
+ }
279
+ interface TextInputProps {
280
+ onChange?: (text: string) => void;
281
+ value?: string;
282
+ }
283
+ export interface TextAreaProps {
284
+ name: string;
285
+ label: string;
286
+ defaultValue?: string;
287
+ isMonospaced?: boolean;
288
+ isRequired?: boolean;
289
+ description?: string;
290
+ placeholder?: string;
291
+ spellCheck?: boolean;
292
+ }
293
+ export declare type NativeTextAreaProps = TextAreaProps & TextInputProps;
294
+ export interface ToggleProps {
295
+ name: string;
296
+ label: string;
297
+ defaultChecked?: boolean;
298
+ }
299
+ export interface TooltipProps {
300
+ text: string;
301
+ children: ForgeNode;
302
+ }
303
+ export interface UserPickerProps {
304
+ name: string;
305
+ label: string;
306
+ description?: string;
307
+ placeholder?: string;
308
+ isRequired?: boolean;
309
+ isMulti?: boolean;
310
+ defaultValue?: string | string[];
311
+ includeUsers?: boolean;
312
+ includeGroups?: boolean;
313
+ baseUrl?: string;
314
+ }
315
+ interface UserPickerValue {
316
+ id: string;
317
+ type: string;
318
+ avatarUrl: string;
319
+ name: string;
320
+ email: string;
321
+ }
322
+ export interface NativeUserPickerProps extends UserPickerProps {
323
+ onChange?: (user: UserPickerValue) => void;
324
+ }
325
+ interface TextProps {
326
+ format?: 'plaintext' | 'markup';
327
+ align?: 'start' | 'center' | 'end';
328
+ }
329
+ interface TextPropsWithContent extends TextProps {
330
+ content: string;
331
+ }
332
+ interface TextPropsWithChildren extends TextProps {
333
+ children: ForgeChildren<ForgeNode | string | number>;
334
+ }
335
+ export declare type JsxTextProps = TextPropsWithContent | TextPropsWithChildren;
336
+ export declare type TextAlign = 'start' | 'center' | 'end';
337
+ export declare type RenderedTextProps = {
338
+ content?: undefined;
339
+ align: TextAlign;
340
+ format: 'markup';
341
+ } | {
342
+ content: string;
343
+ format?: 'plaintext';
344
+ };
345
+ export interface TableProps {
346
+ rowsPerPage?: number;
347
+ children: ForgeChildren;
348
+ }
349
+ export interface HeadProps {
350
+ children: ForgeChildren;
351
+ }
352
+ export interface RowProps {
353
+ children: ForgeChildren;
354
+ }
355
+ export interface CellProps {
356
+ children?: ForgeChildren;
357
+ }
358
+ export declare type UserProps = {
359
+ accountId: string;
360
+ };
361
+ export declare type UserGroupProps = {
362
+ children: ForgeChildren;
363
+ };
364
+ export interface IssuePanelActionProps {
365
+ text: string;
366
+ onClick: () => Promise<void> | void;
367
+ }
368
+ export {};
369
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/types/components.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,SAAS,EACT,YAAY,EACZ,gBAAgB,EACjB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,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AsB,SAAQ,SAAS;IAC/C,QAAQ,EAAE,aAAa,CAAC,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC;CACtD;AAED,oBAAY,YAAY,GAAG,oBAAoB,GAAG,qBAAqB,CAAC;AAExE,oBAAY,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEnD,oBAAY,iBAAiB,GACzB;IACE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;CAClB,GACD;IACE,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,CAAC;AAGN,MAAM,WAAW,UAAU;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,aAAa,CAAC;CACzB;AACD,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,aAAa,CAAC;CACzB;AACD,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,aAAa,CAAC;CACzB;AACD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B;AAGD,oBAAY,SAAS,GAAG;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oBAAY,cAAc,GAAG;IAC3B,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC;AAEF,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CACrC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,57 @@
1
+ import { RenderState, Handler, ForgeDoc } from './forge';
2
+ export interface BackendRuntimePayload {
3
+ effects: BackendEffect[];
4
+ }
5
+ export declare type ExtensionData = {
6
+ [k: string]: any;
7
+ };
8
+ export declare type ExtensionPayload = {
9
+ [k: string]: any;
10
+ };
11
+ export interface CoreData {
12
+ cloudId?: string;
13
+ localId: string;
14
+ environmentId?: string;
15
+ environmentType?: string;
16
+ }
17
+ export interface CoreDataInner extends CoreData {
18
+ moduleKey: string;
19
+ siteUrl: string;
20
+ }
21
+ export interface EventEffect {
22
+ type: 'event';
23
+ state: RenderState;
24
+ coreData: CoreData;
25
+ extensionData: ExtensionData;
26
+ handler: Handler;
27
+ args: any[];
28
+ }
29
+ export interface ActionEffect {
30
+ type: 'action';
31
+ state: RenderState;
32
+ coreData: CoreData;
33
+ extensionData: ExtensionData;
34
+ hookIndex: number;
35
+ componentKey: string;
36
+ payload?: any;
37
+ }
38
+ export interface RenderEffect {
39
+ type: 'render';
40
+ state: RenderState;
41
+ coreData: CoreData;
42
+ extensionData: ExtensionData;
43
+ }
44
+ export interface ResultEffect {
45
+ type: 'result';
46
+ forgeDoc: ForgeDoc;
47
+ state: RenderState;
48
+ }
49
+ export declare type BackendEffect = RenderEffect | ActionEffect | EventEffect;
50
+ export declare type ClientEffect = ResultEffect;
51
+ export declare type Effect = BackendEffect | ClientEffect;
52
+ export declare const isEventEffect: (effect: Effect) => effect is EventEffect;
53
+ export declare const isActionEffect: (effect: Effect) => effect is ActionEffect;
54
+ export declare const isRenderEffect: (effect: Effect) => effect is RenderEffect;
55
+ export declare const isResultEffect: (effect: Effect) => effect is ResultEffect;
56
+ export declare function isBackendEffect(effect: Effect): effect is BackendEffect;
57
+ //# sourceMappingURL=effect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effect.d.ts","sourceRoot":"","sources":["../../src/types/effect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEzD,MAAM,WAAW,qBAAqB;IAEpC,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B;AAED,oBAAY,aAAa,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC;AA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aAAa,GAAG,YAAY,CAAC;AAElD,eAAO,MAAM,aAAa,WAAY,MAAM,0BAE3C,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,MAAM,2BAE5C,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,MAAM,2BAE5C,CAAC;AAEF,eAAO,MAAM,cAAc,WAAY,MAAM,2BAE5C,CAAC;AAEF,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,aAAa,CAIvE"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isBackendEffect = exports.isResultEffect = exports.isRenderEffect = exports.isActionEffect = exports.isEventEffect = void 0;
4
+ exports.isEventEffect = (effect) => {
5
+ return effect.type === 'event';
6
+ };
7
+ exports.isActionEffect = (effect) => {
8
+ return effect.type === 'action';
9
+ };
10
+ exports.isRenderEffect = (effect) => {
11
+ return effect.type === 'render';
12
+ };
13
+ exports.isResultEffect = (effect) => {
14
+ return effect.type === 'result';
15
+ };
16
+ function isBackendEffect(effect) {
17
+ return (exports.isActionEffect(effect) || exports.isEventEffect(effect) || exports.isRenderEffect(effect));
18
+ }
19
+ exports.isBackendEffect = isBackendEffect;
@@ -0,0 +1,10 @@
1
+ export interface BackendRuntimeContext {
2
+ principal?: {
3
+ accountId?: string;
4
+ };
5
+ installContext?: string;
6
+ license?: {
7
+ isActive: boolean;
8
+ };
9
+ }
10
+ //# sourceMappingURL=extension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extension.d.ts","sourceRoot":"","sources":["../../src/types/extension.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE;QACV,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IAEF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE;QACR,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;CACH"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,146 @@
1
+ export interface ComponentState {
2
+ [hookIndex: number]: any;
3
+ }
4
+ export interface RenderState {
5
+ [componentKey: string]: ComponentState;
6
+ }
7
+ export interface Handler {
8
+ componentKey: string;
9
+ prop: string;
10
+ }
11
+ export declare type ForgeProps = {
12
+ [key: string]: any;
13
+ };
14
+ export interface ForgeDoc {
15
+ children: ForgeDoc[];
16
+ key?: string;
17
+ props?: ForgeProps;
18
+ type: string;
19
+ }
20
+ export declare type ForgeElement<P = Record<string, any>> = PrimitiveElement<P> | FunctionElement<P>;
21
+ export interface PrimitiveElement<P = Record<string, any>> {
22
+ type: string;
23
+ key: number | string | null;
24
+ props: P & {
25
+ children: ForgeNode[];
26
+ };
27
+ }
28
+ export interface FunctionElement<P = Record<string, any>> {
29
+ type: (props: P) => ForgeElement;
30
+ key: number | string | null;
31
+ props: P & {
32
+ children: ForgeNode[];
33
+ };
34
+ }
35
+ export declare const isForgeElement: (auxNode: ForgeNode) => auxNode is ForgeElement<Record<string, any>>;
36
+ export declare type ForgeNode = ForgeElement | null | boolean | undefined;
37
+ export declare type ForgeChildren<T = ForgeNode> = T | (T | T[])[];
38
+ export interface PlatformContext {
39
+ type: string;
40
+ }
41
+ export interface ExtensionContext {
42
+ type: string;
43
+ }
44
+ export interface LicenseState {
45
+ isActive?: boolean;
46
+ }
47
+ export interface ProductContext {
48
+ accountId?: string;
49
+ cloudId?: string;
50
+ localId?: string;
51
+ installContext?: string;
52
+ extension?: ExtensionContext;
53
+ license?: LicenseState;
54
+ moduleKey?: string;
55
+ siteUrl?: string;
56
+ environmentId?: string;
57
+ environmentType?: string;
58
+ }
59
+ export interface ExtensionConfiguration {
60
+ [key: string]: any;
61
+ }
62
+ export interface User {
63
+ accountId: string;
64
+ }
65
+ export declare type CustomFieldValue = string | number | User | null;
66
+ export interface JiraExtensionContext extends ExtensionContext {
67
+ type: string;
68
+ issue?: {
69
+ id: number;
70
+ key: string;
71
+ type: string;
72
+ };
73
+ project?: {
74
+ id: string;
75
+ key: string;
76
+ type: string;
77
+ };
78
+ }
79
+ export declare const isJiraExtensionContext: (extensionContext: ExtensionContext) => extensionContext is JiraExtensionContext;
80
+ export interface ConfluenceExtensionContext extends ExtensionContext {
81
+ type: string;
82
+ content?: {
83
+ id: string;
84
+ type: string;
85
+ };
86
+ space?: {
87
+ key: string;
88
+ };
89
+ }
90
+ export declare const isConfluenceExtensionContext: (extensionContext: ExtensionContext) => extensionContext is ConfluenceExtensionContext;
91
+ export interface IssuePanelExtensionContext extends JiraExtensionContext {
92
+ type: 'jira:issuePanel';
93
+ isNewToIssue: boolean;
94
+ }
95
+ export declare const isIssuePanelExtensionContext: (extensionContext: ExtensionContext) => extensionContext is IssuePanelExtensionContext;
96
+ export interface CustomFieldContextConfigExtensionContext extends ExtensionContext {
97
+ type: 'contextConfig';
98
+ fieldId: string;
99
+ fieldType: string;
100
+ contextId: number;
101
+ configuration?: any;
102
+ schema?: {
103
+ [key: string]: any;
104
+ };
105
+ }
106
+ export declare const isCustomFieldContextConfigExtensionContext: (extensionContext: ExtensionContext) => extensionContext is CustomFieldContextConfigExtensionContext;
107
+ export interface CustomFieldExtensionContext extends JiraExtensionContext {
108
+ type: 'jira:customField' | 'jira:customFieldType';
109
+ fieldValue: CustomFieldValue;
110
+ fieldId: string;
111
+ fieldType: string;
112
+ isInline?: boolean;
113
+ }
114
+ export declare const isCustomFieldExtensionContext: (extensionContext: ExtensionContext) => extensionContext is CustomFieldExtensionContext;
115
+ export interface ContextMenuExtensionContext extends ConfluenceExtensionContext {
116
+ type: 'confluence:contextMenu';
117
+ selectedText: string;
118
+ }
119
+ export interface ContentActionExtensionContext extends ConfluenceExtensionContext {
120
+ type: 'confluence:contentAction';
121
+ }
122
+ export declare const isContextMenuExtensionContext: (extensionContext: ExtensionContext) => extensionContext is ContextMenuExtensionContext;
123
+ export declare const isContentActionExtensionContext: (extensionContext: ExtensionContext) => extensionContext is ContentActionExtensionContext;
124
+ export interface DashboardGadgetExtensionContext extends ExtensionContext {
125
+ type: 'dashboardGadget';
126
+ gadgetConfiguration: Record<string, any>;
127
+ }
128
+ export declare const isDashboardGadgetExtensionContext: (extensionContext: ExtensionContext) => extensionContext is DashboardGadgetExtensionContext;
129
+ export declare enum CompassContextTypes {
130
+ AdminPage = "compass:adminPage",
131
+ ComponentPage = "compass:componentPage",
132
+ TeamPage = "compass:teamPage"
133
+ }
134
+ export interface CompassComponentPageExtensionContext extends ExtensionContext {
135
+ type: CompassContextTypes.ComponentPage;
136
+ componentId: string;
137
+ }
138
+ export interface CompassAdminPageExtensionContext extends ExtensionContext {
139
+ type: CompassContextTypes.AdminPage;
140
+ url: string;
141
+ }
142
+ export interface CompassTeamPageExtensionContext extends ExtensionContext {
143
+ type: CompassContextTypes.TeamPage;
144
+ teamId: string;
145
+ }
146
+ //# sourceMappingURL=forge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forge.d.ts","sourceRoot":"","sources":["../../src/types/forge.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,cAAc;IAC7B,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,CAAC;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC;CACxC;AAED,MAAM,WAAW,OAAO;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oBAAY,UAAU,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC;AAEhD,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,oBAAY,YAAY,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAA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AAW,oCAAqC,SAAQ,gBAAgB;IAC5E,IAAI,EAAE,mBAAmB,CAAC,aAAa,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gCAAiC,SAAQ,gBAAgB;IACxE,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC;IACpC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,+BAAgC,SAAQ,gBAAgB;IACvE,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompassContextTypes = exports.isDashboardGadgetExtensionContext = exports.isContentActionExtensionContext = exports.isContextMenuExtensionContext = exports.isCustomFieldExtensionContext = exports.isCustomFieldContextConfigExtensionContext = exports.isIssuePanelExtensionContext = exports.isConfluenceExtensionContext = exports.isJiraExtensionContext = exports.isForgeElement = void 0;
4
+ exports.isForgeElement = (auxNode) => {
5
+ return (auxNode !== null && typeof auxNode !== 'boolean' && auxNode !== undefined);
6
+ };
7
+ exports.isJiraExtensionContext = (extensionContext) => extensionContext.type.startsWith('jira:');
8
+ exports.isConfluenceExtensionContext = (extensionContext) => extensionContext.type.startsWith('confluence:');
9
+ exports.isIssuePanelExtensionContext = (extensionContext) => extensionContext.type === 'jira:issuePanel';
10
+ exports.isCustomFieldContextConfigExtensionContext = (extensionContext) => extensionContext.type === 'contextConfig';
11
+ exports.isCustomFieldExtensionContext = (extensionContext) => extensionContext.type === 'jira:customField' ||
12
+ extensionContext.type === 'jira:customFieldType';
13
+ exports.isContextMenuExtensionContext = (extensionContext) => extensionContext.type === 'confluence:contextMenu';
14
+ exports.isContentActionExtensionContext = (extensionContext) => extensionContext.type === 'confluence:contentAction';
15
+ exports.isDashboardGadgetExtensionContext = (extensionContext) => extensionContext.type === 'jira:dashboardGadget';
16
+ var CompassContextTypes;
17
+ (function (CompassContextTypes) {
18
+ CompassContextTypes["AdminPage"] = "compass:adminPage";
19
+ CompassContextTypes["ComponentPage"] = "compass:componentPage";
20
+ CompassContextTypes["TeamPage"] = "compass:teamPage";
21
+ })(CompassContextTypes = exports.CompassContextTypes || (exports.CompassContextTypes = {}));