@orchestrator-ui/orchestrator-ui-components 1.30.2 → 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.2 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 680ms
13
- DTS ⚡️ Build success in 14518ms
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.2 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.2 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
10
+ PASS Wfo-UI Tests src/utils/getProductNamesFromProcess.spec.ts
11
11
  PASS Wfo-UI Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
12
12
  PASS Wfo-UI Tests src/utils/string.spec.ts
13
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
16
+ PASS Wfo-UI Tests src/components/WfoTable/utils/tableUtils.spec.ts
17
17
  PASS Wfo-UI Tests src/utils/resultFlattener.spec.ts
18
18
  PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoSidebar/utils/menuItemIsAllowed.spec.ts
19
19
  PASS Wfo-UI Tests src/utils/getEnvironmentVariables.spec.ts
20
- PASS Wfo-UI Tests src/messages/getTranslationMessages.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
- PASS Wfo-UI Tests src/utils/sortObjectKeys.spec.ts
25
24
  PASS Wfo-UI Tests src/utils/filterData.spec.ts
25
+ PASS Wfo-UI Tests src/utils/sortObjectKeys.spec.ts
26
26
  PASS Wfo-UI Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
27
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.938 s
39
+ Time: 3.844 s
40
40
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
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
+
3
9
  ## 1.30.2
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -43946,12 +43946,10 @@ function Vlan(_a) {
43946
43946
  (_item, index) => index.toString() !== nameArray.slice(-2, -1)[0]
43947
43947
  ).filter((item) => get6(item, subscriptionFieldName) === subscriptionId).map((item) => get6(item, selfName)).join(",");
43948
43948
  useEffect15(() => {
43949
- if (subscriptionId && isFetched && !portIsTagged && value !== "0") {
43950
- onChange("0");
43951
- } else if (!disabled && (!subscriptionId && value !== "" || subscriptionId && portIsTagged && value === "0")) {
43949
+ if (!initialValue) {
43952
43950
  onChange("");
43953
43951
  }
43954
- }, [onChange, subscriptionId, value, isFetched, portIsTagged]);
43952
+ }, [initialValue, onChange, subscriptionId, isFetched]);
43955
43953
  const [usedVlansInIms, setUsedVlansInIms] = useState25([]);
43956
43954
  const [missingInIms, setMissingInIms] = useState25(false);
43957
43955
  const {
@@ -43974,7 +43972,7 @@ function Vlan(_a) {
43974
43972
  setMissingInIms(true);
43975
43973
  setUsedVlansInIms([]);
43976
43974
  }
43977
- }, [data, error, fetchError, isLoading, nsiVlansOnly, subscriptionId]);
43975
+ }, [data, fetchError]);
43978
43976
  const currentVlans = getAllNumbersForVlanRange(initialValue);
43979
43977
  const usedVlans = numbersFromGroupedArray(usedVlansInIms).filter(
43980
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.2",
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);