@orchestrator-ui/orchestrator-ui-components 1.30.1 → 1.30.3

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,5 +1,5 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.30.1 build
2
+ > @orchestrator-ui/orchestrator-ui-components@1.30.3 build
3
3
  > tsup src/index.ts --format esm --dts --tsconfig tsconfig.build.json
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -8,7 +8,7 @@
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  DTS Build start
11
- ESM dist/index.js 1.87 MB
12
- ESM ⚡️ Build success in 712ms
13
- DTS ⚡️ Build success in 14761ms
11
+ ESM dist/index.js 1.86 MB
12
+ ESM ⚡️ Build success in 743ms
13
+ DTS ⚡️ Build success in 13941ms
14
14
  DTS dist/index.d.ts 174.58 KB
@@ -1,10 +1,4 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.30.1 lint
2
+ > @orchestrator-ui/orchestrator-ui-components@1.30.3 lint
3
3
  > eslint "src/**/*.ts*"
4
4
 
5
-
6
- /home/runner/work/orchestrator-ui-library/orchestrator-ui-library/packages/orchestrator-ui-components/src/components/WfoForms/formFields/deprecated/VlanField.tsx
7
- 168:8 warning React Hook useEffect has a missing dependency: 'disabled'. Either include it or remove the dependency array react-hooks/exhaustive-deps
8
-
9
- ✖ 1 problem (0 errors, 1 warning)
10
-
@@ -1,40 +1,40 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.30.1 test
2
+ > @orchestrator-ui/orchestrator-ui-components@1.30.3 test
3
3
  > jest
4
4
 
5
5
  PASS Wfo-UI Tests src/components/WfoForms/formFields/utils.spec.ts
6
6
  PASS Wfo-UI Tests src/components/WfoSubscription/utils/utils.spec.ts
7
7
  PASS Wfo-UI Tests src/utils/date.spec.ts
8
- PASS Wfo-UI Tests src/utils/getProductNamesFromProcess.spec.ts
9
8
  PASS Wfo-UI Tests src/pages/processes/timelineUtils.spec.ts
10
9
  PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
11
- PASS Wfo-UI Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
12
- PASS Wfo-UI Tests src/utils/string.spec.ts
10
+ PASS Wfo-UI Tests src/utils/getProductNamesFromProcess.spec.ts
13
11
  PASS Wfo-UI Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
12
+ PASS Wfo-UI Tests src/utils/string.spec.ts
13
+ PASS Wfo-UI Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
14
14
  PASS Wfo-UI Tests src/components/WfoTable/utils/tableConfigPersistence.spec.ts
15
- PASS Wfo-UI Tests src/components/WfoTable/utils/tableUtils.spec.ts
16
15
  PASS Wfo-UI Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
17
- PASS Wfo-UI Tests src/utils/getEnvironmentVariables.spec.ts
18
- PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoSidebar/utils/menuItemIsAllowed.spec.ts
16
+ PASS Wfo-UI Tests src/components/WfoTable/utils/tableUtils.spec.ts
19
17
  PASS Wfo-UI Tests src/utils/resultFlattener.spec.ts
20
- PASS Wfo-UI Tests src/messages/getTranslationMessages.spec.ts
18
+ PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoSidebar/utils/menuItemIsAllowed.spec.ts
19
+ PASS Wfo-UI Tests src/utils/getEnvironmentVariables.spec.ts
21
20
  PASS Wfo-UI Tests src/utils/getToastMessage.spec.ts
21
+ PASS Wfo-UI Tests src/messages/getTranslationMessages.spec.ts
22
22
  PASS Wfo-UI Tests src/utils/optionalArray.spec.ts
23
23
  PASS Wfo-UI Tests src/components/WfoTable/utils/columns.spec.ts
24
24
  PASS Wfo-UI Tests src/utils/filterData.spec.ts
25
25
  PASS Wfo-UI Tests src/utils/sortObjectKeys.spec.ts
26
- PASS Wfo-UI Tests src/utils/getTokenName.spec.ts
27
26
  PASS Wfo-UI Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
27
+ PASS Wfo-UI Tests src/utils/getTokenName.spec.ts
28
28
  PASS Wfo-UI Tests src/utils/environmentVariables.spec.ts
29
- PASS Wfo-UI Tests src/utils/onlyUnique.spec.ts
30
29
  PASS Wfo-UI Tests src/utils/uuid.spec.ts
30
+ PASS Wfo-UI Tests src/utils/onlyUnique.spec.ts
31
31
  PASS Wfo-UI Tests src/utils/getTypedFieldFromObject.spec.ts
32
32
  PASS Wfo-UI Tests src/utils/cacheTag.spec.ts
33
- PASS Wfo-UI Tests src/utils/getQueryVariablesForExport.spec.ts
34
33
  PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
34
+ PASS Wfo-UI Tests src/utils/getQueryVariablesForExport.spec.ts
35
35
 
36
36
  Test Suites: 30 passed, 30 total
37
37
  Tests: 169 passed, 169 total
38
38
  Snapshots: 0 total
39
- Time: 3.969 s
39
+ Time: 3.844 s
40
40
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @orchestrator-ui/orchestrator-ui-components
2
2
 
3
+ ## 1.30.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 679ae6c: Fix for vlan field not showing initial value on 2nd page on modify workflow
8
+
9
+ ## 1.30.2
10
+
11
+ ### Patch Changes
12
+
13
+ - fe3e991: Fixes websocket connection without authorization
14
+
3
15
  ## 1.30.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -33951,8 +33951,14 @@ var getToastMessage = (type, text, title) => {
33951
33951
  // src/rtk/endpoints/streamMessages.ts
33952
33952
  var getWebSocket = (url) => __async(void 0, null, function* () {
33953
33953
  const session = yield getSession2();
33954
- const token = (session == null ? void 0 : session.accessToken) ? ["base64.bearer.token", session == null ? void 0 : session.accessToken] : "";
33955
- return new WebSocket(url, token);
33954
+ if (session == null ? void 0 : session.accessToken) {
33955
+ return new WebSocket(url, [
33956
+ "base64.bearer.token",
33957
+ session == null ? void 0 : session.accessToken
33958
+ ]);
33959
+ } else {
33960
+ return new WebSocket(url);
33961
+ }
33956
33962
  });
33957
33963
  var PING_INTERVAL_MS = 45e3;
33958
33964
  var DEBOUNCE_CLOSE_INTERVAL_MS = 6e4;
@@ -43940,12 +43946,10 @@ function Vlan(_a) {
43940
43946
  (_item, index) => index.toString() !== nameArray.slice(-2, -1)[0]
43941
43947
  ).filter((item) => get6(item, subscriptionFieldName) === subscriptionId).map((item) => get6(item, selfName)).join(",");
43942
43948
  useEffect15(() => {
43943
- if (subscriptionId && isFetched && !portIsTagged && value !== "0") {
43944
- onChange("0");
43945
- } else if (!disabled && (!subscriptionId && value !== "" || subscriptionId && portIsTagged && value === "0")) {
43949
+ if (!initialValue) {
43946
43950
  onChange("");
43947
43951
  }
43948
- }, [onChange, subscriptionId, value, isFetched, portIsTagged]);
43952
+ }, [initialValue, onChange, subscriptionId, isFetched]);
43949
43953
  const [usedVlansInIms, setUsedVlansInIms] = useState25([]);
43950
43954
  const [missingInIms, setMissingInIms] = useState25(false);
43951
43955
  const {
@@ -43968,7 +43972,7 @@ function Vlan(_a) {
43968
43972
  setMissingInIms(true);
43969
43973
  setUsedVlansInIms([]);
43970
43974
  }
43971
- }, [data, error, fetchError, isLoading, nsiVlansOnly, subscriptionId]);
43975
+ }, [data, fetchError]);
43972
43976
  const currentVlans = getAllNumbersForVlanRange(initialValue);
43973
43977
  const usedVlans = numbersFromGroupedArray(usedVlansInIms).filter(
43974
43978
  (n) => !currentVlans.includes(n)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "1.30.1",
3
+ "version": "1.30.3",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Library of UI Components used to display the workflow orchestrator frontend",
6
6
  "author": {
@@ -155,17 +155,14 @@ function Vlan({
155
155
  .map((item) => get(item, selfName))
156
156
  .join(',');
157
157
 
158
+ // Refactored to simpler logic, no need to check for untagged ports and removed setting value to 0
159
+ // If the subscriptionId is changed then we need to reset the value only if there wasn't an initial value already set
160
+ // In the create workflow we need to reset the value if the subscriptionId is changed, in the modify workflow we don't
158
161
  useEffect(() => {
159
- if (subscriptionId && isFetched && !portIsTagged && value !== '0') {
160
- onChange('0');
161
- } else if (
162
- !disabled &&
163
- ((!subscriptionId && value !== '') ||
164
- (subscriptionId && portIsTagged && value === '0'))
165
- ) {
162
+ if (!initialValue) {
166
163
  onChange('');
167
164
  }
168
- }, [onChange, subscriptionId, value, isFetched, portIsTagged]);
165
+ }, [initialValue, onChange, subscriptionId, isFetched]);
169
166
 
170
167
  const [usedVlansInIms, setUsedVlansInIms] = useState<VlanRange[]>([]);
171
168
  const [missingInIms, setMissingInIms] = useState(false);
@@ -190,7 +187,7 @@ function Vlan({
190
187
  setMissingInIms(true);
191
188
  setUsedVlansInIms([]);
192
189
  }
193
- }, [data, error, fetchError, isLoading, nsiVlansOnly, subscriptionId]);
190
+ }, [data, fetchError]);
194
191
 
195
192
  // Filter currently used vlans because they are probably from the current subscription
196
193
  const currentVlans = getAllNumbersForVlanRange(initialValue);
@@ -13,11 +13,15 @@ import { orchestratorApi } from '../api';
13
13
  const getWebSocket = async (url: string) => {
14
14
  const session = (await getSession()) as WfoSession;
15
15
 
16
- const token = session?.accessToken
17
- ? ['base64.bearer.token', session?.accessToken]
18
- : '';
19
- // Implemented authentication taking this into account: https://stackoverflow.com/questions/4361173/http-headers-in-websockets-client-api/77060459#77060459
20
- return new WebSocket(url, token);
16
+ if (session?.accessToken) {
17
+ // Implemented authentication taking this into account: https://stackoverflow.com/questions/4361173/http-headers-in-websockets-client-api/77060459#77060459
18
+ return new WebSocket(url, [
19
+ 'base64.bearer.token',
20
+ session?.accessToken,
21
+ ]);
22
+ } else {
23
+ return new WebSocket(url);
24
+ }
21
25
  };
22
26
 
23
27
  const PING_INTERVAL_MS = 45000; // Recommended values are between 30 and 60 seconds