@orchestrator-ui/orchestrator-ui-components 3.0.0 → 3.0.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.
@@ -1,12 +1,12 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@3.0.0 build
2
+ > @orchestrator-ui/orchestrator-ui-components@3.0.1 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.1 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 137ms
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 582ms
20
+ DTS ⚡️ Build success in 16218ms
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.1 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.1 test
3
3
  > jest
4
4
 
5
- PASS Wfo-UI Tests src/components/WfoForms/formFields/utils.spec.ts
6
5
  PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
7
6
  PASS Wfo-UI Tests src/components/WfoSubscription/utils/utils.spec.ts
7
+ PASS Wfo-UI Tests src/components/WfoForms/formFields/utils.spec.ts
8
+ PASS Wfo-UI Tests src/utils/date.spec.ts
8
9
  PASS Wfo-UI Tests src/utils/string.spec.ts
9
10
  PASS Wfo-UI Tests src/pages/processes/timelineUtils.spec.ts
10
- PASS Wfo-UI Tests src/utils/date.spec.ts
11
- PASS Wfo-UI Tests src/components/WfoTable/WfoTable/WfoGroupedTable/utils.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
@@ -27,17 +27,17 @@ PASS Wfo-UI Tests src/utils/toObjectWithSerializedValues.spec.ts
27
27
  PASS Wfo-UI Tests src/components/WfoWorkflowSteps/stepListUtils.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
- PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
35
34
  PASS Wfo-UI Tests src/utils/getQueryVariablesForExport.spec.ts
35
+ PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.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.183 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.097 s
43
43
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @orchestrator-ui/orchestrator-ui-components
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 4bd9869: 1146 Allow workflow to start with additional prefilled variables - LIR prefixes page
8
+
3
9
  ## 3.0.0
4
10
 
5
11
  ### 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.1";
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.1";
26796
26796
 
26797
26797
  // src/types/types.ts
26798
26798
  var EngineStatus = /* @__PURE__ */ ((EngineStatus3) => {
@@ -43096,6 +43096,7 @@ function AutoFields({
43096
43096
  // src/components/WfoForms/UserInputForm.tsx
43097
43097
  import { useContext as useContext7, useState as useState31 } from "react";
43098
43098
  import invariant from "invariant";
43099
+ import { isObject } from "lodash";
43099
43100
  import cloneDeep2 from "lodash/cloneDeep";
43100
43101
  import get8 from "lodash/get";
43101
43102
  import { useTranslations as useTranslations48 } from "next-intl";
@@ -46538,15 +46539,27 @@ function fillPreselection(form, router) {
46538
46539
  });
46539
46540
  if (queryParams.prefix && queryParams.prefixlen) {
46540
46541
  if (form && form.properties.ip_prefix) {
46541
- const ipPrefixInput = form.properties.ip_prefix;
46542
+ const ipPrefix = isObject(form.properties.ip_prefix) ? form.properties.ip_prefix : {};
46543
+ const ipPrefixInput = {
46544
+ ...ipPrefix,
46545
+ uniforms: { prefixMin: 0 },
46546
+ default: {}
46547
+ };
46542
46548
  if (!ipPrefixInput.uniforms) {
46543
- ipPrefixInput.uniforms = {};
46549
+ ipPrefixInput.uniforms = { prefixMin: 0 };
46544
46550
  }
46545
46551
  ipPrefixInput.default = `${queryParams.prefix}/${queryParams.prefixlen}`;
46546
46552
  ipPrefixInput.uniforms.prefixMin = parseInt(
46547
46553
  queryParams.prefix_min ?? queryParams.prefixlen,
46548
46554
  10
46549
46555
  );
46556
+ return {
46557
+ ...form,
46558
+ properties: {
46559
+ ...form.properties,
46560
+ ip_prefix: ipPrefixInput
46561
+ }
46562
+ };
46550
46563
  }
46551
46564
  }
46552
46565
  }
@@ -49485,17 +49498,26 @@ var WfoStepListHeader = ({
49485
49498
  import { jsx as jsx202, jsxs as jsxs108 } from "@emotion/react/jsx-runtime";
49486
49499
  var getInitialProcessPayload = ({
49487
49500
  productId,
49488
- subscriptionId
49501
+ subscriptionId,
49502
+ prefix,
49503
+ prefixlen,
49504
+ prefix_min
49489
49505
  }) => {
49490
- if (productId) {
49491
- return {
49492
- product: productId
49493
- };
49494
- }
49495
49506
  if (subscriptionId) {
49496
49507
  return {
49497
49508
  subscription_id: subscriptionId
49498
49509
  };
49510
+ } else if (productId && prefix && prefixlen && prefix_min) {
49511
+ return {
49512
+ product: productId,
49513
+ prefix,
49514
+ prefixlen,
49515
+ prefix_min
49516
+ };
49517
+ } else if (productId) {
49518
+ return {
49519
+ product: productId
49520
+ };
49499
49521
  }
49500
49522
  return void 0;
49501
49523
  };
@@ -49508,7 +49530,7 @@ var WfoStartProcessPage = ({
49508
49530
  const [hasError, setHasError] = useState45(false);
49509
49531
  const { theme } = useOrchestratorTheme();
49510
49532
  const [form, setForm] = useState45({});
49511
- const { productId, subscriptionId } = router.query;
49533
+ const { productId, subscriptionId, prefix, prefixlen, prefix_min } = router.query;
49512
49534
  const {
49513
49535
  data: subscriptionDetail,
49514
49536
  isLoading: isLoadingSubscriptionDetail,
@@ -49524,8 +49546,14 @@ var WfoStartProcessPage = ({
49524
49546
  });
49525
49547
  const [startProcess] = useStartProcessMutation();
49526
49548
  const startProcessPayload = useMemo5(
49527
- () => getInitialProcessPayload({ productId, subscriptionId }),
49528
- [productId, subscriptionId]
49549
+ () => getInitialProcessPayload({
49550
+ productId,
49551
+ subscriptionId,
49552
+ prefix,
49553
+ prefixlen,
49554
+ prefix_min
49555
+ }),
49556
+ [productId, subscriptionId, prefix, prefixlen, prefix_min]
49529
49557
  );
49530
49558
  const { stepUserInput, hasNext } = form;
49531
49559
  const { getStepHeaderStyle, stepListContentBoldTextStyle } = useWithOrchestratorTheme(getStyles14);