@interopio/workspaces-api 4.1.1 → 4.1.2

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.
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2020 Tick42
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2020 Tick42
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/changelog.md CHANGED
@@ -1,172 +1,174 @@
1
- 4.1.1
2
- feat: G4E-9762 Implemented the frame visibility methods
3
- 4.1.0
4
- feat: io.Connect Browser 4.1
5
- 4.0.2
6
- fix: Optimized the closing of a workspace
7
- 4.0.0
8
- feat: io.Connect Browser 4.0
9
- 3.5.7
10
- feat: G4 e 8073 workspace frame on closing event prevention master
11
- feat: G4E-8009 Setting taskbar icon for workspace frame api
12
- 3.5.6
13
- feat: ability to embed a loading strategy within a workspaces layout upon saving
14
- 3.5.5
15
- feat: setup a workspace to open only once
16
- 3.5.4
17
- chore: Increased the interop timeout to 2mins
18
- 3.5.2
19
- feat: drag applications contained within workspace
20
- 3.5.1
21
- chore: Added the defaults in the WorkspaceConfig interface
22
- 3.5.0
23
- chore: io.CB 3.5 bump
24
- 3.4.3
25
- feat: Enable Workspaces API for Node.js
26
- 3.4.0
27
- chore: io.CB 3.4 bump
28
- 3.3.3
29
- chore: unified repo bump
30
- 3.3.2
31
- feat: added activate frame options when creating a workspace
32
- 3.2.3
33
- chore: io.CB 3.2 bump
34
- 3.1.0
35
- fix: workspaces leaking transition indicators and memory leak in workspaces api
36
- 3.0.3
37
- chore: updated .d.ts information
38
- 3.0.2
39
- chore: updated .npmignore
40
- 3.0.1
41
- feat: Introduce the new IO Connect Workspaces API
42
- 1.24.1
43
- chore: bump due to dependencies update
44
- 1.24.0
45
- feat: added allowSystemHibernation as a new lock option and added it to the config decoder
46
- 1.23.0
47
- chore: bump due to dependencies update
48
- 1.22.0
49
- feat: added onHibernated/Resumed events for workspaces
50
- chore: updated the workspaces.d.ts with the new onWindowSelected events
51
- fix: workspaceWindow.isLoaded returns undefined instead of false
52
- 1.21.0
53
- feat: added onWindowSelected events
54
- chore: updated the temp.ts types
55
- 1.20.5
56
- chore: bump due to dependencies update
57
- 1.20.4
58
- chore: bump due to dependencies update
59
- 1.20.3
60
- chore: bump due to dependencies update
61
- 1.20.2
62
- chore: bump due to dependencies update
63
- 1.20.1
64
- feat: added bundleTo methods to the group
65
- 1.20.0
66
- feat: updated all dependencies to the latest major versions
67
- 1.19.0
68
- fix: layouts import in Enterprise now uses a new operation to import all layouts instead of one by one
69
- feat: added isSelected to the workspace window typings and enabled the focused property for Core and Core+
70
- feat: adds support for layoutComponentId
71
- fix: closing a workspace now checks if this is the last workspace in a platform frame
72
- 1.18.2
73
- chore: bump due to dependencies update
74
- 1.18.1
75
- fix: layouts import in Enterprise price is now reverted back to operating on top of the bridge protocol
76
- 1.18.0
77
- chore: updated the typings
78
- 1.17.3
79
- chore: updated rollup build to use a clean dist dir
80
- 1.17.2
81
- fix: dedicated the layouts import to the underlying glue, instead of transmitting a dedicated workspaces protocol message
82
- 1.17.1
83
- feat: optimized the performance of glue.workspaces.getMyWorkspace()
84
- chore: removed unnecessary console.log
85
- 1.17.0
86
- feat: added workspace lock events
87
- 1.16.4
88
- feat: added version property to the top-level API
89
- 1.16.3
90
- feat: added workspace.show/hideLoadingAnimation and window.isSelected
91
- feat: added frame.onFocusChanged event
92
- 1.16.2
93
- feat: added the setMaximizationBoundary method
94
- 1.16.1
95
- feat: added support for allowReorder, allowWindowReorder and allowWorkspaceTabReorder
96
- feat: added frameBounds to the data provided to workspace and frame closed events
97
- 1.16.0
98
- feat: added support for allowWorkspaceTabExtract
99
- 1.15.5
100
- chore: moved the workspace application property
101
- 1.15.4
102
- chore: bump due to dependencies update
103
- 1.15.3
104
- chore: bump due to dependencies update
105
- 1.15.2
106
- feat: added onWindowMaximized and onWindowRestored events
107
- 1.15.1
108
- fix: improved the typings of the box definitions
109
- 1.15.0
110
- feat: added support for maximization boundaries
111
- 1.14.0
112
- feat: added support for shortcuts in Enterprise
113
- 1.13.0
114
- feat: added support for application name when restoring a workspace in Enterprise
115
- 1.12.2
116
- fix: fixes the breaking change introduced in 1.12.0 which caused incompatibility between 1.12.X platform and api clients prior to 1.12.0
117
- 1.12.1
118
- chore: bump due to dependencies update
119
- 1.12.0
120
- feat: added improvements for the connection transport switch functionality
121
- 1.11.1
122
- chore: bump due to dependencies update
123
- 1.11.0
124
- chore: updated the workspaces typings with the latest features
125
- 1.10.6
126
- chore: updated the decoders to pass isMaximized in window layout items
127
- 1.10.5
128
- chore: bump due to dependencies update
129
- 1.10.4
130
- feat: added positionIndex property as a config when opening workspaces
131
- feat: added a WorkspacePinOptions interface for better extensibility
132
- 1.10.3
133
- feat: added createFrame, frame.init, frame.isInitialized and frame.onInitializationRequested
134
- 1.10.2
135
- feat: added isSelected support
136
- feat: pinned tabs support and workspace icons
137
- 1.10.1
138
- feat: saveLayout() now can also save meta data
139
- 1.10.0
140
- feat: added support for GDX (Glue42 Developer Extension)
141
- 1.9.1
142
- chore: bump due to dependencies update
143
- 1.9.0
144
- feat: added waitForFrame method and updated to the latest core
145
- 1.8.2
146
- chore: bump due to dependencies update
147
- 1.8.1
148
- chore: added noTabHeader to the workspace restore options
149
- 1.8.0
150
- feat: updated all typings to be inline with Enterprise 3.12
151
- feat: added isSelected to the workspace object
152
- feat: implemented the maximization of containers
153
- 1.7.5
154
- feat: added allowSplitters to rows and columns and allowDropLeft, allowDropTop, allowDropRight, allowDropBottom, allowDropHeader to the groups
155
- fix: started firing open and close workspace events when the last workspace in a frame acting like a platform has been closed
156
- chore: Resolved dependency vulnerabilities
157
- 1.7.4
158
- feat: added getWorkspaceById method and made internal performance optimizations
159
- 1.7.3
160
- chore: bump due to dependencies update
161
- 1.7.2
162
- chore: bump due to dependencies update
163
- 1.7.1
164
- fix: fixed allowDropLeft, allowDropTop, allowDropRight, allowDropBottom in the workspaces config object by adding them to the decoders
165
- 1.7.0
166
- feat: added getBounds for workspaces frames
167
- feat: added support for workspaces constraints
168
- feat: added support for workspaces elements sizes
169
- 1.6.2
170
- fix: improved compatibility with GD 3.11 by allowing for an optional isSelected workspaceConfig in the protocol
171
- 1.6.1
172
- chore: Resolved dependency vulnerabilities
1
+ 4.1.2
2
+ feat: G4E-9244 implement frame.showDialog feature for io.CD
3
+ 4.1.1
4
+ feat: G4E-9762 Implemented the frame visibility methods
5
+ 4.1.0
6
+ feat: io.Connect Browser 4.1
7
+ 4.0.2
8
+ fix: Optimized the closing of a workspace
9
+ 4.0.0
10
+ feat: io.Connect Browser 4.0
11
+ 3.5.7
12
+ feat: G4 e 8073 workspace frame on closing event prevention master
13
+ feat: G4E-8009 Setting taskbar icon for workspace frame api
14
+ 3.5.6
15
+ feat: ability to embed a loading strategy within a workspaces layout upon saving
16
+ 3.5.5
17
+ feat: setup a workspace to open only once
18
+ 3.5.4
19
+ chore: Increased the interop timeout to 2mins
20
+ 3.5.2
21
+ feat: drag applications contained within workspace
22
+ 3.5.1
23
+ chore: Added the defaults in the WorkspaceConfig interface
24
+ 3.5.0
25
+ chore: io.CB 3.5 bump
26
+ 3.4.3
27
+ feat: Enable Workspaces API for Node.js
28
+ 3.4.0
29
+ chore: io.CB 3.4 bump
30
+ 3.3.3
31
+ chore: unified repo bump
32
+ 3.3.2
33
+ feat: added activate frame options when creating a workspace
34
+ 3.2.3
35
+ chore: io.CB 3.2 bump
36
+ 3.1.0
37
+ fix: workspaces leaking transition indicators and memory leak in workspaces api
38
+ 3.0.3
39
+ chore: updated .d.ts information
40
+ 3.0.2
41
+ chore: updated .npmignore
42
+ 3.0.1
43
+ feat: Introduce the new IO Connect Workspaces API
44
+ 1.24.1
45
+ chore: bump due to dependencies update
46
+ 1.24.0
47
+ feat: added allowSystemHibernation as a new lock option and added it to the config decoder
48
+ 1.23.0
49
+ chore: bump due to dependencies update
50
+ 1.22.0
51
+ feat: added onHibernated/Resumed events for workspaces
52
+ chore: updated the workspaces.d.ts with the new onWindowSelected events
53
+ fix: workspaceWindow.isLoaded returns undefined instead of false
54
+ 1.21.0
55
+ feat: added onWindowSelected events
56
+ chore: updated the temp.ts types
57
+ 1.20.5
58
+ chore: bump due to dependencies update
59
+ 1.20.4
60
+ chore: bump due to dependencies update
61
+ 1.20.3
62
+ chore: bump due to dependencies update
63
+ 1.20.2
64
+ chore: bump due to dependencies update
65
+ 1.20.1
66
+ feat: added bundleTo methods to the group
67
+ 1.20.0
68
+ feat: updated all dependencies to the latest major versions
69
+ 1.19.0
70
+ fix: layouts import in Enterprise now uses a new operation to import all layouts instead of one by one
71
+ feat: added isSelected to the workspace window typings and enabled the focused property for Core and Core+
72
+ feat: adds support for layoutComponentId
73
+ fix: closing a workspace now checks if this is the last workspace in a platform frame
74
+ 1.18.2
75
+ chore: bump due to dependencies update
76
+ 1.18.1
77
+ fix: layouts import in Enterprise price is now reverted back to operating on top of the bridge protocol
78
+ 1.18.0
79
+ chore: updated the typings
80
+ 1.17.3
81
+ chore: updated rollup build to use a clean dist dir
82
+ 1.17.2
83
+ fix: dedicated the layouts import to the underlying glue, instead of transmitting a dedicated workspaces protocol message
84
+ 1.17.1
85
+ feat: optimized the performance of glue.workspaces.getMyWorkspace()
86
+ chore: removed unnecessary console.log
87
+ 1.17.0
88
+ feat: added workspace lock events
89
+ 1.16.4
90
+ feat: added version property to the top-level API
91
+ 1.16.3
92
+ feat: added workspace.show/hideLoadingAnimation and window.isSelected
93
+ feat: added frame.onFocusChanged event
94
+ 1.16.2
95
+ feat: added the setMaximizationBoundary method
96
+ 1.16.1
97
+ feat: added support for allowReorder, allowWindowReorder and allowWorkspaceTabReorder
98
+ feat: added frameBounds to the data provided to workspace and frame closed events
99
+ 1.16.0
100
+ feat: added support for allowWorkspaceTabExtract
101
+ 1.15.5
102
+ chore: moved the workspace application property
103
+ 1.15.4
104
+ chore: bump due to dependencies update
105
+ 1.15.3
106
+ chore: bump due to dependencies update
107
+ 1.15.2
108
+ feat: added onWindowMaximized and onWindowRestored events
109
+ 1.15.1
110
+ fix: improved the typings of the box definitions
111
+ 1.15.0
112
+ feat: added support for maximization boundaries
113
+ 1.14.0
114
+ feat: added support for shortcuts in Enterprise
115
+ 1.13.0
116
+ feat: added support for application name when restoring a workspace in Enterprise
117
+ 1.12.2
118
+ fix: fixes the breaking change introduced in 1.12.0 which caused incompatibility between 1.12.X platform and api clients prior to 1.12.0
119
+ 1.12.1
120
+ chore: bump due to dependencies update
121
+ 1.12.0
122
+ feat: added improvements for the connection transport switch functionality
123
+ 1.11.1
124
+ chore: bump due to dependencies update
125
+ 1.11.0
126
+ chore: updated the workspaces typings with the latest features
127
+ 1.10.6
128
+ chore: updated the decoders to pass isMaximized in window layout items
129
+ 1.10.5
130
+ chore: bump due to dependencies update
131
+ 1.10.4
132
+ feat: added positionIndex property as a config when opening workspaces
133
+ feat: added a WorkspacePinOptions interface for better extensibility
134
+ 1.10.3
135
+ feat: added createFrame, frame.init, frame.isInitialized and frame.onInitializationRequested
136
+ 1.10.2
137
+ feat: added isSelected support
138
+ feat: pinned tabs support and workspace icons
139
+ 1.10.1
140
+ feat: saveLayout() now can also save meta data
141
+ 1.10.0
142
+ feat: added support for GDX (Glue42 Developer Extension)
143
+ 1.9.1
144
+ chore: bump due to dependencies update
145
+ 1.9.0
146
+ feat: added waitForFrame method and updated to the latest core
147
+ 1.8.2
148
+ chore: bump due to dependencies update
149
+ 1.8.1
150
+ chore: added noTabHeader to the workspace restore options
151
+ 1.8.0
152
+ feat: updated all typings to be inline with Enterprise 3.12
153
+ feat: added isSelected to the workspace object
154
+ feat: implemented the maximization of containers
155
+ 1.7.5
156
+ feat: added allowSplitters to rows and columns and allowDropLeft, allowDropTop, allowDropRight, allowDropBottom, allowDropHeader to the groups
157
+ fix: started firing open and close workspace events when the last workspace in a frame acting like a platform has been closed
158
+ chore: Resolved dependency vulnerabilities
159
+ 1.7.4
160
+ feat: added getWorkspaceById method and made internal performance optimizations
161
+ 1.7.3
162
+ chore: bump due to dependencies update
163
+ 1.7.2
164
+ chore: bump due to dependencies update
165
+ 1.7.1
166
+ fix: fixed allowDropLeft, allowDropTop, allowDropRight, allowDropBottom in the workspaces config object by adding them to the decoders
167
+ 1.7.0
168
+ feat: added getBounds for workspaces frames
169
+ feat: added support for workspaces constraints
170
+ feat: added support for workspaces elements sizes
171
+ 1.6.2
172
+ fix: improved compatibility with GD 3.11 by allowing for an optional isSelected workspaceConfig in the protocol
173
+ 1.6.1
174
+ chore: Resolved dependency vulnerabilities
@@ -1563,6 +1563,38 @@ const changeFrameVisibilityConfigDecoder = object({
1563
1563
  activate: optional(boolean()),
1564
1564
  isVisible: boolean()
1565
1565
  });
1566
+ const sizeDecoder = object({
1567
+ width: positiveNumberDecoder,
1568
+ height: positiveNumberDecoder
1569
+ });
1570
+ const frameDialogOptionsDecoder = object({
1571
+ mode: optional(oneOf(constant("Global"), constant("WindowContainer"))),
1572
+ type: string(),
1573
+ size: optional(sizeDecoder),
1574
+ message: nonEmptyStringDecoder,
1575
+ messageTitle: optional(nonEmptyStringDecoder),
1576
+ movable: optional(boolean()),
1577
+ transparent: optional(boolean()),
1578
+ title: nonEmptyStringDecoder,
1579
+ context: optional(anyJson()),
1580
+ affirmativeButtonName: optional(nonEmptyStringDecoder),
1581
+ showAffirmativeButton: optional(boolean()),
1582
+ cancelButtonName: optional(nonEmptyStringDecoder),
1583
+ showCancelButton: optional(boolean()),
1584
+ negativeButtonName: optional(nonEmptyStringDecoder),
1585
+ showNegativeButton: optional(boolean()),
1586
+ defaultAction: optional(oneOf(constant("affirmative"), constant("negative"), constant("cancel"))),
1587
+ timerDuration: optional(positiveNumberDecoder),
1588
+ showTimer: optional(boolean()),
1589
+ inputMaxLength: optional(positiveNumberDecoder),
1590
+ inputPattern: optional(nonEmptyStringDecoder),
1591
+ inputPatternErrorMessage: optional(nonEmptyStringDecoder),
1592
+ inputPlaceholder: optional(string())
1593
+ });
1594
+ const showFrameDialogConfigDecoder = object({
1595
+ frameId: nonEmptyStringDecoder,
1596
+ options: frameDialogOptionsDecoder
1597
+ });
1566
1598
 
1567
1599
  const webPlatformMethodName = "T42.Web.Platform.Control";
1568
1600
  const webPlatformWspStreamName = "T42.Web.Platform.WSP.Stream";
@@ -1644,7 +1676,8 @@ const OPERATIONS = {
1644
1676
  setTaskbarIcon: { name: "setTaskbarIcon", argsDecoder: setIconArgumentsDecoder, resultDecoder: voidResultDecoder },
1645
1677
  subscribeToFrameClosing: { name: "subscribeToFrameClosing", argsDecoder: simpleItemConfigDecoder, resultDecoder: voidResultDecoder },
1646
1678
  changeFrameVisibility: { name: "changeFrameVisibility", argsDecoder: changeFrameVisibilityConfigDecoder, resultDecoder: voidResultDecoder },
1647
- getFrameVisibility: { name: "getFrameVisibility", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameVisibilityResultDecoder }
1679
+ getFrameVisibility: { name: "getFrameVisibility", argsDecoder: simpleItemConfigDecoder, resultDecoder: frameVisibilityResultDecoder },
1680
+ showFrameDialog: { name: "showFrameDialog", argsDecoder: showFrameDialogConfigDecoder, resultDecoder: anyJson() }
1648
1681
  };
1649
1682
 
1650
1683
  class PromiseWrapper {
@@ -3581,6 +3614,13 @@ class Frame {
3581
3614
  }
3582
3615
  return getData$1(this).controller.hideFrame(this.id);
3583
3616
  }
3617
+ async showDialog(options) {
3618
+ if (!isDesktop()) {
3619
+ throw new Error("The showModal operation is not supported in IO Connect Browser");
3620
+ }
3621
+ frameDialogOptionsDecoder.runWithException(options);
3622
+ return getData$1(this).controller.showFrameDialog(this.id, options);
3623
+ }
3584
3624
  async onClosing(callback) {
3585
3625
  if (!isDesktop()) {
3586
3626
  throw new Error("Frame closing operations are not supported in io.Connect Browser");
@@ -4517,6 +4557,10 @@ class BaseController {
4517
4557
  const result = await this.bridge.send(OPERATIONS.getFrameVisibility.name, { itemId: frameId });
4518
4558
  return result.isVisible;
4519
4559
  }
4560
+ async showFrameDialog(frameId, options) {
4561
+ const result = await this.bridge.send(OPERATIONS.showFrameDialog.name, { frameId, options });
4562
+ return result;
4563
+ }
4520
4564
  async isOperationSupported(operation) {
4521
4565
  if (isDesktop()) {
4522
4566
  return { isSupported: true };
@@ -4883,6 +4927,9 @@ class MainController {
4883
4927
  async getFrameVisibility(frameId) {
4884
4928
  return this.base.getFrameVisibility(frameId);
4885
4929
  }
4930
+ async showFrameDialog(frameId, options) {
4931
+ return this.base.showFrameDialog(frameId, options);
4932
+ }
4886
4933
  async handleCoreLocalSubscription(config, levelId) {
4887
4934
  await this.bridge.createCoreEventSubscription();
4888
4935
  config.scopeId = config.scopeId || levelId;
@@ -5187,7 +5234,7 @@ class IoC {
5187
5234
  }
5188
5235
  }
5189
5236
 
5190
- var version = "4.1.1";
5237
+ var version = "4.1.2";
5191
5238
 
5192
5239
  const composeAPI = (glue, ioc) => {
5193
5240
  const controller = ioc.controller;