@orchestrator-ui/orchestrator-ui-components 3.0.0 → 3.0.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.
@@ -1,12 +1,12 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@3.0.0 build
2
+ > @orchestrator-ui/orchestrator-ui-components@3.0.2 build
3
3
  > npm run generate-version && tsup src/index.ts
4
4
 
5
5
 
6
- > @orchestrator-ui/orchestrator-ui-components@3.0.0 generate-version
6
+ > @orchestrator-ui/orchestrator-ui-components@3.0.2 generate-version
7
7
  > node -p "'export const ORCHESTRATOR_UI_LIBRARY_VERSION = ' + JSON.stringify(require('./package.json').version) + ';'" > src/configuration/version.ts && prettier --write src/configuration/version.ts
8
8
 
9
- src/configuration/version.ts 135ms
9
+ src/configuration/version.ts 140ms
10
10
  CLI Building entry: src/index.ts
11
11
  CLI Using tsconfig: tsconfig.build.json
12
12
  CLI tsup v8.3.5
@@ -16,6 +16,6 @@ src/configuration/version.ts 135ms
16
16
  DTS Build start
17
17
  ESM dist/index.js 1.91 MB
18
18
  ESM dist/index.js.map 3.48 MB
19
- ESM ⚡️ Build success in 457ms
20
- DTS ⚡️ Build success in 15788ms
19
+ ESM ⚡️ Build success in 459ms
20
+ DTS ⚡️ Build success in 15903ms
21
21
  DTS dist/index.d.ts 654.18 KB
@@ -1,5 +1,5 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@3.0.0 lint
2
+ > @orchestrator-ui/orchestrator-ui-components@3.0.2 lint
3
3
  > eslint "src/**/*.ts*"
4
4
 
5
5
 
@@ -1,15 +1,15 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@3.0.0 test
2
+ > @orchestrator-ui/orchestrator-ui-components@3.0.2 test
3
3
  > jest
4
4
 
5
- PASS Wfo-UI Tests src/components/WfoForms/formFields/utils.spec.ts
6
- PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
7
5
  PASS Wfo-UI Tests src/components/WfoSubscription/utils/utils.spec.ts
8
- PASS Wfo-UI Tests src/utils/string.spec.ts
9
- PASS Wfo-UI Tests src/pages/processes/timelineUtils.spec.ts
6
+ PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
7
+ PASS Wfo-UI Tests src/components/WfoForms/formFields/utils.spec.ts
10
8
  PASS Wfo-UI Tests src/utils/date.spec.ts
11
- PASS Wfo-UI Tests src/components/WfoTable/WfoTable/WfoGroupedTable/utils.spec.ts
9
+ PASS Wfo-UI Tests src/pages/processes/timelineUtils.spec.ts
10
+ PASS Wfo-UI Tests src/utils/string.spec.ts
12
11
  PASS Wfo-UI Tests src/utils/getProductNamesFromProcess.spec.ts
12
+ PASS Wfo-UI Tests src/components/WfoTable/WfoTable/WfoGroupedTable/utils.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
15
  PASS Wfo-UI Tests src/components/WfoTable/utils/tableUtils.spec.ts
@@ -23,21 +23,21 @@ PASS Wfo-UI Tests src/utils/toSortedObjectKeys.spec.ts
23
23
  PASS Wfo-UI Tests src/utils/optionalArray.spec.ts
24
24
  PASS Wfo-UI Tests src/components/WfoTable/utils/columns.spec.ts
25
25
  PASS Wfo-UI Tests src/utils/filterData.spec.ts
26
- PASS Wfo-UI Tests src/utils/toObjectWithSerializedValues.spec.ts
27
26
  PASS Wfo-UI Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
27
+ PASS Wfo-UI Tests src/utils/toObjectWithSerializedValues.spec.ts
28
28
  PASS Wfo-UI Tests src/utils/getTokenName.spec.ts
29
29
  PASS Wfo-UI Tests src/utils/uuid.spec.ts
30
- PASS Wfo-UI Tests src/utils/onlyUnique.spec.ts
31
30
  PASS Wfo-UI Tests src/utils/environmentVariables.spec.ts
31
+ PASS Wfo-UI Tests src/utils/onlyUnique.spec.ts
32
32
  PASS Wfo-UI Tests src/utils/getTypedFieldFromObject.spec.ts
33
33
  PASS Wfo-UI Tests src/utils/cacheTag.spec.ts
34
34
  PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
35
35
  PASS Wfo-UI Tests src/utils/getQueryVariablesForExport.spec.ts
36
36
  PASS Wfo-UI Tests src/utils/getQueryUrl.spec.ts
37
- PASS Wfo-UI Tests src/components/WfoTable/WfoTable/utils.spec.ts (5.077 s)
37
+ PASS Wfo-UI Tests src/components/WfoTable/WfoTable/utils.spec.ts (5.032 s)
38
38
 
39
39
  Test Suites: 33 passed, 33 total
40
40
  Tests: 199 passed, 199 total
41
41
  Snapshots: 0 total
42
- Time: 7.013 s
42
+ Time: 7.156 s
43
43
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @orchestrator-ui/orchestrator-ui-components
2
2
 
3
+ ## 3.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - a4492fd: Fix 400 error in create lir prefix form
8
+ - 4baeff5: 1509 Remove toast for failed websocket connection that covers the next and back buttons in the forms.
9
+
10
+ ## 3.0.1
11
+
12
+ ### Patch Changes
13
+
14
+ - 4bd9869: 1146 Allow workflow to start with additional prefilled variables - LIR prefixes page
15
+
3
16
  ## 3.0.0
4
17
 
5
18
  ### Major Changes
package/dist/index.d.ts CHANGED
@@ -14479,7 +14479,7 @@ declare const IPAM_IP_BLOCKS_ENDPOINT = "surf/ipam/ip_blocks";
14479
14479
  declare const IPAM_FREE_SUBNETS_ENDPOINT = "surf/ipam/free_subnets";
14480
14480
  declare const SUBSCRIPTION_ACTIONS_ENDPOINT = "subscriptions/workflows";
14481
14481
 
14482
- declare const ORCHESTRATOR_UI_LIBRARY_VERSION = "3.0.0";
14482
+ declare const ORCHESTRATOR_UI_LIBRARY_VERSION = "3.0.2";
14483
14483
 
14484
14484
  declare const useGetTranslationMessages: (locale: string | undefined) => {
14485
14485
  pydanticForms: {
package/dist/index.js CHANGED
@@ -26792,7 +26792,7 @@ var PolicyResource = /* @__PURE__ */ ((PolicyResource2) => {
26792
26792
  })(PolicyResource || {});
26793
26793
 
26794
26794
  // src/configuration/version.ts
26795
- var ORCHESTRATOR_UI_LIBRARY_VERSION = "3.0.0";
26795
+ var ORCHESTRATOR_UI_LIBRARY_VERSION = "3.0.2";
26796
26796
 
26797
26797
  // src/types/types.ts
26798
26798
  var EngineStatus = /* @__PURE__ */ ((EngineStatus3) => {
@@ -34146,35 +34146,6 @@ var { useGetWorkflowOptionsQuery, useGetTaskOptionsQuery } = startButtonOptionsA
34146
34146
  // src/rtk/endpoints/streamMessages.ts
34147
34147
  import { debounce } from "lodash";
34148
34148
  import { getSession as getSession2 } from "next-auth/react";
34149
-
34150
- // src/utils/getToastMessage.ts
34151
- var getToastMessage = (type, text, title) => {
34152
- const getTypeProps = (type2) => {
34153
- switch (type2) {
34154
- case "ERROR" /* ERROR */:
34155
- return {
34156
- color: "danger",
34157
- iconType: "warning"
34158
- };
34159
- case "SUCCESS" /* SUCCESS */:
34160
- return {
34161
- color: "success",
34162
- iconType: "check"
34163
- };
34164
- }
34165
- };
34166
- const id = Math.floor(Math.random() * 1e7).toString();
34167
- const typeProps = getTypeProps(type);
34168
- const toast = {
34169
- id,
34170
- text,
34171
- title,
34172
- ...typeProps
34173
- };
34174
- return toast;
34175
- };
34176
-
34177
- // src/rtk/endpoints/streamMessages.ts
34178
34149
  var getWebSocket = async (url) => {
34179
34150
  const session = await getSession2();
34180
34151
  if (session?.accessToken) {
@@ -34203,12 +34174,6 @@ var streamMessagesApi = orchestratorApi.injectEndpoints({
34203
34174
  updateCachedData
34204
34175
  }) {
34205
34176
  const cleanUp = () => {
34206
- const message = getToastMessage(
34207
- "ERROR" /* ERROR */,
34208
- "Connection to the server was lost. Please click the websocket icon or refresh the page to reconnect.",
34209
- "WebSocket closed"
34210
- );
34211
- dispatch(addToastMessage(message));
34212
34177
  clearInterval(pingInterval);
34213
34178
  updateCachedData(() => false);
34214
34179
  };
@@ -34778,6 +34743,33 @@ import { useDispatch, useSelector } from "react-redux";
34778
34743
  var useAppDispatch = useDispatch;
34779
34744
  var useAppSelector = useSelector;
34780
34745
 
34746
+ // src/utils/getToastMessage.ts
34747
+ var getToastMessage = (type, text, title) => {
34748
+ const getTypeProps = (type2) => {
34749
+ switch (type2) {
34750
+ case "ERROR" /* ERROR */:
34751
+ return {
34752
+ color: "danger",
34753
+ iconType: "warning"
34754
+ };
34755
+ case "SUCCESS" /* SUCCESS */:
34756
+ return {
34757
+ color: "success",
34758
+ iconType: "check"
34759
+ };
34760
+ }
34761
+ };
34762
+ const id = Math.floor(Math.random() * 1e7).toString();
34763
+ const typeProps = getTypeProps(type);
34764
+ const toast = {
34765
+ id,
34766
+ text,
34767
+ title,
34768
+ ...typeProps
34769
+ };
34770
+ return toast;
34771
+ };
34772
+
34781
34773
  // src/hooks/useShowToastMessage.ts
34782
34774
  var useShowToastMessage = () => {
34783
34775
  const dispatch = useAppDispatch();
@@ -43096,6 +43088,7 @@ function AutoFields({
43096
43088
  // src/components/WfoForms/UserInputForm.tsx
43097
43089
  import { useContext as useContext7, useState as useState31 } from "react";
43098
43090
  import invariant from "invariant";
43091
+ import { isObject } from "lodash";
43099
43092
  import cloneDeep2 from "lodash/cloneDeep";
43100
43093
  import get8 from "lodash/get";
43101
43094
  import { useTranslations as useTranslations48 } from "next-intl";
@@ -46538,15 +46531,27 @@ function fillPreselection(form, router) {
46538
46531
  });
46539
46532
  if (queryParams.prefix && queryParams.prefixlen) {
46540
46533
  if (form && form.properties.ip_prefix) {
46541
- const ipPrefixInput = form.properties.ip_prefix;
46534
+ const ipPrefix = isObject(form.properties.ip_prefix) ? form.properties.ip_prefix : {};
46535
+ const ipPrefixInput = {
46536
+ ...ipPrefix,
46537
+ uniforms: { prefixMin: 0 },
46538
+ default: {}
46539
+ };
46542
46540
  if (!ipPrefixInput.uniforms) {
46543
- ipPrefixInput.uniforms = {};
46541
+ ipPrefixInput.uniforms = { prefixMin: 0 };
46544
46542
  }
46545
46543
  ipPrefixInput.default = `${queryParams.prefix}/${queryParams.prefixlen}`;
46546
46544
  ipPrefixInput.uniforms.prefixMin = parseInt(
46547
- queryParams.prefix_min ?? queryParams.prefixlen,
46545
+ queryParams.prefixlen,
46548
46546
  10
46549
46547
  );
46548
+ return {
46549
+ ...form,
46550
+ properties: {
46551
+ ...form.properties,
46552
+ ip_prefix: ipPrefixInput
46553
+ }
46554
+ };
46550
46555
  }
46551
46556
  }
46552
46557
  }
@@ -49487,15 +49492,14 @@ var getInitialProcessPayload = ({
49487
49492
  productId,
49488
49493
  subscriptionId
49489
49494
  }) => {
49490
- if (productId) {
49491
- return {
49492
- product: productId
49493
- };
49494
- }
49495
49495
  if (subscriptionId) {
49496
49496
  return {
49497
49497
  subscription_id: subscriptionId
49498
49498
  };
49499
+ } else if (productId) {
49500
+ return {
49501
+ product: productId
49502
+ };
49499
49503
  }
49500
49504
  return void 0;
49501
49505
  };
@@ -49524,8 +49528,10 @@ var WfoStartProcessPage = ({
49524
49528
  });
49525
49529
  const [startProcess] = useStartProcessMutation();
49526
49530
  const startProcessPayload = useMemo5(
49527
- () => getInitialProcessPayload({ productId, subscriptionId }),
49528
- [productId, subscriptionId]
49531
+ () => getInitialProcessPayload({
49532
+ productId
49533
+ }),
49534
+ [productId]
49529
49535
  );
49530
49536
  const { stepUserInput, hasNext } = form;
49531
49537
  const { getStepHeaderStyle, stepListContentBoldTextStyle } = useWithOrchestratorTheme(getStyles14);