@interopio/groups-ui-react 2.7.0 → 2.7.1

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 (60) hide show
  1. package/dist/cjs/GroupWrapper.d.ts +2 -1
  2. package/dist/cjs/index.js +272 -177
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/tests/buttons/BaseButton.test.d.ts +1 -0
  5. package/dist/cjs/tests/buttons/CloneButton.test.d.ts +1 -0
  6. package/dist/cjs/tests/buttons/CloseButton.test.d.ts +1 -0
  7. package/dist/cjs/tests/buttons/CustomButton.test.d.ts +1 -0
  8. package/dist/cjs/tests/buttons/ExtractButton.test.d.ts +1 -0
  9. package/dist/cjs/tests/buttons/FeedbackButton.test.d.ts +1 -0
  10. package/dist/cjs/tests/buttons/LockButtons.test.d.ts +1 -0
  11. package/dist/cjs/tests/buttons/MaximizeButton.test.d.ts +1 -0
  12. package/dist/cjs/tests/buttons/MinimizeButton.test.d.ts +1 -0
  13. package/dist/cjs/tests/buttons/OverflowButton.test.d.ts +1 -0
  14. package/dist/cjs/tests/buttons/RestoreButton.test.d.ts +1 -0
  15. package/dist/cjs/tests/buttons/StickyButton.test.d.ts +1 -0
  16. package/dist/cjs/tests/buttons/UnlockButton.test.d.ts +1 -0
  17. package/dist/cjs/tests/captionEditor/CaptionEditor.test.d.ts +1 -0
  18. package/dist/cjs/tests/channelSelector/BaseChannelSelector.test.d.ts +1 -0
  19. package/dist/cjs/tests/flatCaptionBar/FlatCaptionBar.test.d.ts +1 -0
  20. package/dist/cjs/tests/groupCaptionBar/GroupCaptionBar.test.d.ts +1 -0
  21. package/dist/cjs/tests/htmlButtonBar/HtmlButtonBar.test.d.ts +1 -0
  22. package/dist/cjs/tests/popups/TabOverflowPopup.test.d.ts +1 -0
  23. package/dist/cjs/tests/tabs/Tab.test.d.ts +1 -0
  24. package/dist/cjs/types/api.d.ts +10 -1
  25. package/dist/cjs/types/defaultComponents.d.ts +0 -1
  26. package/dist/cjs/types/internal.d.ts +21 -0
  27. package/dist/cjs/webGroupsManager.d.ts +4 -1
  28. package/dist/esm/GroupWrapper.d.ts +2 -1
  29. package/dist/esm/index.js +285 -190
  30. package/dist/esm/index.js.map +1 -1
  31. package/dist/esm/tests/buttons/BaseButton.test.d.ts +1 -0
  32. package/dist/esm/tests/buttons/CloneButton.test.d.ts +1 -0
  33. package/dist/esm/tests/buttons/CloseButton.test.d.ts +1 -0
  34. package/dist/esm/tests/buttons/CustomButton.test.d.ts +1 -0
  35. package/dist/esm/tests/buttons/ExtractButton.test.d.ts +1 -0
  36. package/dist/esm/tests/buttons/FeedbackButton.test.d.ts +1 -0
  37. package/dist/esm/tests/buttons/LockButtons.test.d.ts +1 -0
  38. package/dist/esm/tests/buttons/MaximizeButton.test.d.ts +1 -0
  39. package/dist/esm/tests/buttons/MinimizeButton.test.d.ts +1 -0
  40. package/dist/esm/tests/buttons/OverflowButton.test.d.ts +1 -0
  41. package/dist/esm/tests/buttons/RestoreButton.test.d.ts +1 -0
  42. package/dist/esm/tests/buttons/StickyButton.test.d.ts +1 -0
  43. package/dist/esm/tests/buttons/UnlockButton.test.d.ts +1 -0
  44. package/dist/esm/tests/captionEditor/CaptionEditor.test.d.ts +1 -0
  45. package/dist/esm/tests/channelSelector/BaseChannelSelector.test.d.ts +1 -0
  46. package/dist/esm/tests/flatCaptionBar/FlatCaptionBar.test.d.ts +1 -0
  47. package/dist/esm/tests/groupCaptionBar/GroupCaptionBar.test.d.ts +1 -0
  48. package/dist/esm/tests/htmlButtonBar/HtmlButtonBar.test.d.ts +1 -0
  49. package/dist/esm/tests/popups/TabOverflowPopup.test.d.ts +1 -0
  50. package/dist/esm/tests/tabs/Tab.test.d.ts +1 -0
  51. package/dist/esm/types/api.d.ts +10 -1
  52. package/dist/esm/types/defaultComponents.d.ts +0 -1
  53. package/dist/esm/types/internal.d.ts +21 -0
  54. package/dist/esm/webGroupsManager.d.ts +4 -1
  55. package/package.json +33 -25
  56. package/dist/cjs/useGDWindow.d.ts +0 -2
  57. package/dist/esm/useGDWindow.d.ts +0 -2
  58. package/dist/styles/fonts.css +0 -2
  59. package/dist/styles/styles.css +0 -679
  60. package/dist/styles/themes.css +0 -155
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { Bounds, ButtonProps, Location, OverflowedTabInfo, ToggleButtonProps } from "./internal";
2
+ import { Bounds, ButtonProps, Location, OverflowedTabInfo, StylesOptions, ToggleButtonProps } from "./internal";
3
3
  import { CustomButtonProps } from "./defaultComponents";
4
4
  export interface ChannelProps {
5
5
  visible: boolean;
@@ -171,6 +171,15 @@ export interface GroupProps {
171
171
  Buttons?: React.ComponentType<HtmlButtonsProps>;
172
172
  };
173
173
  };
174
+ styles?: {
175
+ tabs?: {
176
+ header?: StylesOptions;
177
+ moveArea?: StylesOptions;
178
+ };
179
+ frame?: {
180
+ element?: StylesOptions;
181
+ };
182
+ };
174
183
  }
175
184
  export interface MoveAreaProps {
176
185
  elementId: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { Bounds, ButtonProps, TargetType, ToggleButtonProps } from "./internal";
3
2
  export interface CaptionEditorProps {
4
3
  targetId: string;
@@ -1,4 +1,8 @@
1
1
  import React from "react";
2
+ declare type NonMethodKeys<T> = ({
3
+ [P in keyof T]: T[P] extends Function ? never : P;
4
+ })[keyof T];
5
+ declare type NonMethods<T> = Pick<T, NonMethodKeys<T>>;
2
6
  export interface PortalProps {
3
7
  parentElement: HTMLElement;
4
8
  children?: React.ReactNode;
@@ -58,6 +62,15 @@ export interface GroupWrapperProps {
58
62
  onHideCaptionEditorRequested?: (targetType: TargetType, targetId: string) => void;
59
63
  onShowLoadingAnimationRequested?: (targetType: TargetType, targetId: string) => void;
60
64
  onHideLoadingAnimationRequested?: (targetType: TargetType, targetId: string) => void;
65
+ styles?: {
66
+ tabs?: {
67
+ header?: StylesOptions;
68
+ moveArea?: StylesOptions;
69
+ };
70
+ frame?: {
71
+ element?: StylesOptions;
72
+ };
73
+ };
61
74
  }
62
75
  export interface CreateGroupCaptionBarRequestOptions extends CreateElementRequestOptions {
63
76
  moveAreaId: string;
@@ -310,6 +323,9 @@ export interface ExternalLibraryFactory {
310
323
  onCaptionEditorVisibleChanged(targetType: TargetType, targetId: string, visible: boolean): void;
311
324
  onCaptionEditorBoundsChanged(targetType: TargetType, targetId: string, bounds: Bounds): void;
312
325
  commitCaptionEditing(targetType: TargetType, targetId: string, text: string): void;
326
+ updateTabHeaderStyles(styles: StylesOptions): void;
327
+ updateTabMoveAreaStyles(styles: StylesOptions): void;
328
+ updateFrameStyles(styles: StylesOptions): void;
313
329
  selectTab(windowId: string): void;
314
330
  openTabOverflowPopup(frameId: string, location: Location): void;
315
331
  addTabContainerClass(windowId: string, className: string): void;
@@ -333,5 +349,10 @@ export interface Location {
333
349
  left: number;
334
350
  top: number;
335
351
  }
352
+ export interface StylesOptions {
353
+ css?: Partial<NonMethods<CSSStyleDeclaration>>;
354
+ classes?: string[];
355
+ }
336
356
  export interface Bounds extends Size, Location {
337
357
  }
358
+ export {};
@@ -1,4 +1,4 @@
1
- import { Bounds, Location, TargetType } from "./types/internal";
1
+ import { Bounds, Location, StylesOptions, TargetType } from "./types/internal";
2
2
  declare class WebGroupsManagerDecorator {
3
3
  private readonly registry;
4
4
  readonly skipFocusStyle = "t42-skip-focus";
@@ -35,6 +35,9 @@ declare class WebGroupsManagerDecorator {
35
35
  commitCaptionEditing(targetType: TargetType, targetId: string, text: string): void;
36
36
  onCommitCaptionEditingRequested(targetType: TargetType, targetId: string, callback: () => void): () => void;
37
37
  requestCommitCaptionEditing(targetType: TargetType, targetId: string): void;
38
+ updateTabHeaderStyles(styles: StylesOptions): void;
39
+ updateTabMoveAreaStyles(styles: StylesOptions): void;
40
+ updateFrameStyles(styles: StylesOptions): void;
38
41
  selectTab(windowId: string): void;
39
42
  addTabContainerClass(windowId: string, className: string): void;
40
43
  removeTabContainerClass(windowId: string, className: string): void;
package/package.json CHANGED
@@ -1,38 +1,36 @@
1
1
  {
2
2
  "name": "@interopio/groups-ui-react",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "description": "React library for building a Web Group App for io.Connect Desktop.",
5
+ "keywords": [
6
+ "interop",
7
+ "interop.io",
8
+ "desktop",
9
+ "groups",
10
+ "react"
11
+ ],
12
+ "homepage": "https://interop.io/",
13
+ "repository": "https://github.com/InteropIO/groups-ui-react",
14
+ "license": "MIT",
5
15
  "author": {
6
16
  "name": "interop.io",
7
17
  "url": "https://interop.io/"
8
18
  },
9
- "license": "MIT",
10
19
  "main": "dist/cjs/index.js",
11
20
  "module": "dist/esm/index.js",
12
21
  "source": "src/index.tsx",
13
- "homepage": "https://interop.io/",
14
- "repository": "https://github.com/InteropIO/groups-ui-react",
15
- "engines": {
16
- "node": ">=10"
17
- },
18
- "keywords": [
19
- "interop",
20
- "interop.io",
21
- "desktop",
22
- "groups",
23
- "react"
22
+ "files": [
23
+ "dist"
24
24
  ],
25
25
  "scripts": {
26
26
  "build": "rollup -c ./rollup.config.js",
27
+ "test": "jest",
27
28
  "bundle:css": "node ./scripts/bundlecss.js",
28
29
  "prepublishOnly": "npm run build",
29
30
  "preversion": "npm run build",
30
31
  "version": "npm run build",
31
32
  "clean": "rimraf ./node_modules/react && rimraf ./node_modules/react-dom && rimraf ./node_modules/@interopio/react-hooks"
32
33
  },
33
- "publishConfig": {
34
- "access": "public"
35
- },
36
34
  "dependencies": {
37
35
  "@interopio/theme": "2.1.32",
38
36
  "callback-registry": "^2.7.2",
@@ -40,16 +38,16 @@
40
38
  "overlayscrollbars": "^2.8.3",
41
39
  "use-sync-external-store": "^1.2.0"
42
40
  },
43
- "peerDependencies": {
44
- "@interopio/react-hooks": "^3.0.2",
45
- "react": ">=16.8.0",
46
- "react-dom": ">=16.8.0"
47
- },
48
41
  "devDependencies": {
49
42
  "@rollup/plugin-commonjs": "^15.1.0",
50
43
  "@rollup/plugin-node-resolve": "^9.0.0",
51
44
  "@rollup/plugin-typescript": "^6.0.0",
52
45
  "@svgr/rollup": "^6.2.1",
46
+ "@swc/jest": "^0.2.37",
47
+ "@testing-library/jest-dom": "^6.2.0",
48
+ "@testing-library/react": "^16.0.1",
49
+ "@testing-library/user-event": "^14.4.3",
50
+ "@types/jest": "^29.2.4",
53
51
  "@types/node": "^12.12.38",
54
52
  "@types/react": "^18.0.9",
55
53
  "@types/react-dom": "^18.0.4",
@@ -68,6 +66,8 @@
68
66
  "eslint-plugin-promise": "^4.2.1",
69
67
  "eslint-plugin-react": "^7.17.0",
70
68
  "eslint-plugin-standard": "^4.0.1",
69
+ "jest": "^29.7.0",
70
+ "jest-environment-jsdom": "^29.7.0",
71
71
  "npm-run-all": "^4.1.5",
72
72
  "postcss": "^8.4.29",
73
73
  "postcss-import": "^15.1.0",
@@ -81,7 +81,15 @@
81
81
  "rollup-plugin-typescript2": "^0.29.0",
82
82
  "typescript": "^3.7.5"
83
83
  },
84
- "files": [
85
- "dist"
86
- ]
87
- }
84
+ "peerDependencies": {
85
+ "@interopio/react-hooks": "^3.0.2",
86
+ "react": ">=16.8.0",
87
+ "react-dom": ">=16.8.0"
88
+ },
89
+ "engines": {
90
+ "node": ">=10"
91
+ },
92
+ "publishConfig": {
93
+ "access": "public"
94
+ }
95
+ }
@@ -1,2 +0,0 @@
1
- declare function useGDWindow(windowId: string): any;
2
- export default useGDWindow;
@@ -1,2 +0,0 @@
1
- declare function useGDWindow(windowId: string): any;
2
- export default useGDWindow;