Skip to content

Commit d8e8d9e

Browse files
committed
remove export from class and move to the end of file
1 parent 56bedab commit d8e8d9e

File tree

3 files changed

+39
-29
lines changed

3 files changed

+39
-29
lines changed

src/IMSInterface.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
export class IMSInterface {
1+
class IMSInterface {
32
/**
43
* Establishes an IMS session. Must be called before any IMS access methods.
54
* This method is not thread safe.
@@ -146,7 +145,7 @@ export class IMSInterface {
146145
}
147146
}
148147

149-
export namespace IMSInterface {
148+
namespace IMSInterface {
150149
export enum Events {
151150
imsFetchAccessTokenWithStatus = "com.adobe.csxs.events.internal.ims.FetchAccessTokenWithStatus",
152151
imsFetchAccessToken = "com.adobe.csxs.events.internal.ims.FetchAccessToken",
@@ -219,4 +218,7 @@ export namespace IMSInterface {
219218
IMSMANAGER_ERROR_BROWSER_FAILED_TO_OPEN = "3003",
220219
IMS_UNKNOWN_ERROR = "0xFFFF"
221220
}
222-
}
221+
}
222+
223+
export { IMSInterface };
224+
export default IMSInterface;

src/v8.ts

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
/**
22
* Stores constants for the window types supported by the CSXS infrastructure.
33
*/
4-
export enum CSXSWindowType {
4+
import IMSInterface from "./IMSInterface";
5+
6+
enum CSXSWindowType {
57
_PANEL = "Panel",
68
_MODELESS = "Modeless",
79
_MODAL_DIALOG = "ModalDialog"
@@ -17,7 +19,7 @@ export const EvalScript_ErrMessage: string = 'EvalScript error.';
1719
* components. The major, minor and micro values are numeric; the special
1820
* value can be any string.
1921
*/
20-
export class Version {
22+
class Version {
2123
/**
2224
* The maximum value allowed for a numeric version component.
2325
* This reflects the maximum value allowed in PlugPlug and the manifest schema.
@@ -40,7 +42,7 @@ export class Version {
4042
* Defines a boundary for a version range, which associates a Version object
4143
* with a flag for whether it is an inclusive or exclusive boundary.
4244
*/
43-
export class VersionBound {
45+
class VersionBound {
4446
/**
4547
* @param version The Version object.
4648
* @param inclusive True if this boundary is inclusive, false if it is exclusive.
@@ -54,7 +56,7 @@ export class VersionBound {
5456
/**
5557
* Defines a range of versions using a lower boundary and optional upper boundary.
5658
*/
57-
export class VersionRange {
59+
class VersionRange {
5860
/**
5961
* @param lowerBound The VersionBound object.
6062
* @param upperBound The VersionBound object, or null for a range with no upper boundary.
@@ -70,7 +72,7 @@ export class VersionRange {
7072
* Extensions can declare dependencies on particular
7173
* CEP runtime versions in the extension manifest.
7274
*/
73-
export class Runtime {
75+
class Runtime {
7476
/**
7577
* @FIXME: Documentation tell us "version" but the Javascript say "versionRange"
7678
*/
@@ -98,7 +100,7 @@ export interface ExtensionDispatchInfo {
98100
* @FIXME: interface?
99101
* Encapsulates a CEP-based extension to an Adobe application.
100102
*/
101-
export class Extension {
103+
class Extension {
102104
/**
103105
* @param id The unique identifier of this extension.
104106
* @param name The localizable display name of this extension.
@@ -133,7 +135,7 @@ type EventScope = "GLOBAL" | "APPLICATION";
133135
/**
134136
* A standard JavaScript event, the base class for CEP events.
135137
*/
136-
export class CSEvent {
138+
class CSEvent {
137139
/**
138140
* Event-specific data.
139141
*/
@@ -153,7 +155,7 @@ export class CSEvent {
153155
* @FIXME: Interface / enum ?
154156
* Stores operating-system-specific location constants for use in the CSInterface.getSystemPath() method.
155157
*/
156-
export class SystemPath {
158+
class SystemPath {
157159
/**
158160
* The path to user data.
159161
*/
@@ -183,7 +185,7 @@ export class SystemPath {
183185
/**
184186
* Stores color-type constants.
185187
*/
186-
export enum ColorType {
188+
enum ColorType {
187189
/**
188190
* RGB color type.
189191
*/
@@ -209,7 +211,7 @@ type RGBNumber = number;
209211
* All values are in the range [0.0 to 255.0]. Invalid numeric values are
210212
* converted to numbers within this range.
211213
*/
212-
export class RGBColor {
214+
class RGBColor {
213215
/**
214216
* @param red The red value, in the range [0.0 to 255.0].
215217
* @param green The green value, in the range [0.0 to 255.0].
@@ -230,7 +232,7 @@ export class RGBColor {
230232
* or the x component is 0 and the y component is positive or negative for
231233
* an up or down direction.
232234
*/
233-
export class Direction {
235+
class Direction {
234236
/**
235237
* @param x The horizontal component of the point.
236238
* @param y The vertical component of the point.
@@ -249,7 +251,7 @@ type GradientOffset = number;
249251
/**
250252
* Stores gradient stop information.
251253
*/
252-
export class GradientStop {
254+
class GradientStop {
253255
/**
254256
* @param offset The offset of the gradient stop, in the range [0.0 to 1.0].
255257
* @param rgbColor The color of the gradient at this point, an RGBColor object.
@@ -263,7 +265,7 @@ export class GradientStop {
263265
/**
264266
* Stores gradient color information.
265267
*/
266-
export class GradientColor {
268+
class GradientColor {
267269
/**
268270
* @FIXME: Documentation tell us "gradientStopList" but the Javascript say "arrGradientStop"
269271
*/
@@ -288,7 +290,7 @@ export class GradientColor {
288290
*
289291
* @FIXME: use Conditional Type for the constructor
290292
*/
291-
export class UIColor {
293+
class UIColor {
292294
/**
293295
* @param type The color type, 1 for "rgb" and 2 for "gradient". The supplied color object must correspond to this type.
294296
* @param antialiasLevel The anti-alias level constant.
@@ -304,7 +306,7 @@ export class UIColor {
304306
/**
305307
* Stores window-skin properties, such as color and font. All color parameter values are UIColor objects except that systemHighlightColor is RGBColor object.
306308
*/
307-
export interface AppSkinInfo {
309+
interface AppSkinInfo {
308310
/**
309311
* The base font family of the application.
310312
*/
@@ -338,7 +340,7 @@ export interface AppSkinInfo {
338340
/**
339341
* Stores information about the environment in which the extension is loaded.
340342
*/
341-
export interface HostEnvironment {
343+
interface HostEnvironment {
342344
/**
343345
* The application's name.
344346
*/
@@ -372,7 +374,7 @@ export interface HostEnvironment {
372374
/**
373375
* Stores information about the host capabilities.
374376
*/
375-
export interface HostCapabilities {
377+
interface HostCapabilities {
376378
/**
377379
* EXTENDED_PANEL_MENU True if the application supports panel menu.
378380
*/
@@ -400,7 +402,7 @@ export interface HostCapabilities {
400402
*
401403
* @since 4.2.0
402404
*/
403-
export interface ApiVersion {
405+
interface ApiVersion {
404406
/**
405407
* The major version
406408
*/
@@ -420,7 +422,7 @@ export interface ApiVersion {
420422
*
421423
* @since 5.2.0
422424
*/
423-
export class MenuItemStatus {
425+
class MenuItemStatus {
424426
/**
425427
* @param menuItemLabel The menu item label.
426428
* @param enabled True if user wants to enable the menu item.
@@ -437,7 +439,7 @@ export class MenuItemStatus {
437439
*
438440
* @since 5.2.0
439441
*/
440-
export class ContextMenuItemStatus {
442+
class ContextMenuItemStatus {
441443
/**
442444
* @param menuItemID The menu item id.
443445
* @param enabled True if user wants to enable the menu item.
@@ -460,7 +462,7 @@ export class ContextMenuItemStatus {
460462
* </ul>
461463
*
462464
*/
463-
export default class CSInterface {
465+
class CSInterface {
464466

465467
static readonly THEME_COLOR_CHANGED_EVENT: string = "com.adobe.csxs.events.ThemeColorChanged";
466468
/**
@@ -863,6 +865,7 @@ export default class CSInterface {
863865
}
864866

865867
const itemStatus = new MenuItemStatus(menuItemLabel, enabled, checked);
868+
// @ts-ignore @FIXME: test return result
866869
return window.__adobe_cep__.invokeSync("updatePanelMenuItem", JSON.stringify(itemStatus));
867870
}
868871

@@ -1110,3 +1113,7 @@ export default class CSInterface {
11101113
return window.__adobe_cep__.invokeSync("getWindowTitle", "");
11111114
}
11121115
}
1116+
1117+
1118+
export { CSXSWindowType, Extension, CSInterface, RGBColor, UIColor, ColorType, Direction, GradientStop, GradientColor, CSEvent, ContextMenuItemStatus, MenuItemStatus, SystemPath, ApiVersion, HostCapabilities, HostEnvironment, AppSkinInfo };
1119+
export default CSInterface;

src/v9.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@
1313

1414
import CSInterfaceV8 from "./v8";
1515

16-
export * from './v8'
17-
1816
/**
1917
* CSInterface - v9.4.0
2018
*/
21-
export default class CSInterface extends CSInterfaceV8 {
19+
class CSInterface extends CSInterfaceV8 {
2220
/**
2321
* Retrieves the scale factor of Monitor.
2422
*
@@ -124,4 +122,7 @@ export default class CSInterface extends CSInterfaceV8 {
124122
//control should not come here
125123
return false;
126124
}
127-
}
125+
}
126+
127+
export * from './v8'
128+
export default CSInterface;

0 commit comments

Comments
 (0)