@shipengine/elements 1.4.0 → 1.5.0

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/index.cjs CHANGED
@@ -2836,6 +2836,11 @@ const featureFlags = {
2836
2836
  * `<PurchaseLabel />` element.
2837
2837
  */
2838
2838
  shipmentForm: {
2839
+ /**
2840
+ * `addOns` enables the `Add-Ons` section of the shipment form. This allows users to
2841
+ * add additional services to their shipment such as delivery confirmation and insurance.
2842
+ */
2843
+ addOns: true,
2839
2844
  /**
2840
2845
  * `browseRates` enables the `browse rates` button in the shipment form. This allows users
2841
2846
  * to browse rates for a shipment with varying shipment configurations. This is useful for
@@ -15307,7 +15312,7 @@ const Component$8 = ({
15307
15312
  }, [isAddingCarrier, connectedCarriersFetching]);
15308
15313
  const carrierList = React.useMemo(() => {
15309
15314
  const carriers = [];
15310
- connectedCarriers === null || connectedCarriers === void 0 ? void 0 : connectedCarriers.forEach(carrier => {
15315
+ connectedCarriers === null || connectedCarriers === void 0 ? void 0 : connectedCarriers.filter(carrier => !carrier.requiresFundedAmount).forEach(carrier => {
15311
15316
  const metadata = carrierMetadata === null || carrierMetadata === void 0 ? void 0 : carrierMetadata.find(m => m.carrierName === carrier.carrierCode);
15312
15317
  if (metadata) {
15313
15318
  carriers.push({
@@ -16366,24 +16371,19 @@ const ManageWarehouses = ({
16366
16371
  }),
16367
16372
  submitButtonTitle: t("actions.save")
16368
16373
  })
16369
- })) : jsxRuntime.jsx(ButtonGroup, Object.assign({
16370
- justify: "end"
16371
- }, {
16372
- children: jsxRuntime.jsxs(giger.Button, Object.assign({
16373
- bold: false,
16374
- onClick: () => toggleShowAddNewWarehouseForm(true),
16375
- type: "button",
16376
- variant: giger.ButtonVariant.TEXT
16374
+ })) : jsxRuntime.jsxs(jsxRuntime.Fragment, {
16375
+ children: [jsxRuntime.jsx(ButtonGroup, Object.assign({
16376
+ justify: "end"
16377
16377
  }, {
16378
- children: [t("manage-warehouses:addNew"), jsxRuntime.jsx(giger.Icon, {
16379
- css: {
16380
- paddingLeft: 6
16381
- },
16382
- name: gigerTheme.IconNames.ADD,
16383
- size: giger.IconSize.SIZE_SMALL
16384
- })]
16385
- }))
16386
- })), jsxRuntime.jsx("div", Object.assign({
16378
+ children: jsxRuntime.jsx(LinkAction, {
16379
+ icon: "add",
16380
+ onClick: () => toggleShowAddNewWarehouseForm(true),
16381
+ title: t("manage-warehouses:addNew")
16382
+ })
16383
+ })), jsxRuntime.jsx(Spacer, {
16384
+ multiplier: 2
16385
+ })]
16386
+ }), jsxRuntime.jsx("div", Object.assign({
16387
16387
  css: styles$i.cardSpacing
16388
16388
  }, {
16389
16389
  children: warehouses.map(warehouse => {
@@ -19123,6 +19123,7 @@ const ShipmentForm = ({
19123
19123
  }) => {
19124
19124
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19125
19125
  features = Object.assign({
19126
+ addOns: true,
19126
19127
  browseRates: true,
19127
19128
  includeShipsuranceInsurance: true,
19128
19129
  includeThirdPartyInsurance: true,
@@ -19808,82 +19809,84 @@ const ShipmentForm = ({
19808
19809
  hint: t("purchase-label:hints.contentDescription"),
19809
19810
  label: t("purchase-label:fields.contentDescription"),
19810
19811
  name: "packages.0.contentDescription"
19811
- }), jsxRuntime.jsx(giger.Divider, {}), jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsxs(FieldLabel, Object.assign({
19812
- label: "purchase-label:fields.addOns"
19813
- }, {
19814
- children: [jsxRuntime.jsx(Switch, Object.assign({
19815
- defaultChecked: ((_g = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _g !== void 0 ? _g : "none") !== "none",
19816
- label: t("purchase-label:fields.confirmation"),
19817
- name: "confirmationEnabled",
19818
- onChange: e => form.setValue("confirmation", e.target.checked ? alchemy.SE.ConfirmationType.DELIVERY : undefined, {
19819
- shouldDirty: true
19820
- }),
19821
- shouldUnmount: true,
19822
- value: ((_h = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _h !== void 0 ? _h : "none") !== "none"
19812
+ }), features.addOns && jsxRuntime.jsxs(jsxRuntime.Fragment, {
19813
+ children: [jsxRuntime.jsx(giger.Divider, {}), jsxRuntime.jsx(Spacer, {}), jsxRuntime.jsxs(FieldLabel, Object.assign({
19814
+ label: "purchase-label:fields.addOns"
19823
19815
  }, {
19824
- children: jsxRuntime.jsx(Select, {
19825
- control: form.control,
19826
- defaultValue: alchemy.SE.ConfirmationType.DELIVERY,
19827
- displayLabel: false,
19816
+ children: [jsxRuntime.jsx(Switch, Object.assign({
19817
+ defaultChecked: ((_g = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _g !== void 0 ? _g : "none") !== "none",
19828
19818
  label: t("purchase-label:fields.confirmation"),
19829
- name: "confirmation",
19830
- options: confirmationOptions,
19831
- shouldUnregister: true
19832
- })
19833
- })), jsxRuntime.jsxs(Switch, Object.assign({
19834
- defaultChecked: ((_j = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _j !== void 0 ? _j : "none") !== "none",
19835
- label: t("purchase-label:fields.insurance"),
19836
- name: "insuranceEnabled",
19837
- onChange: e => {
19838
- setInsuranceEnabled(e.target.checked);
19839
- form.setValue("insuranceProvider", e.target.checked ? alchemy.SE.InsuranceProviderType.CARRIER : undefined, {
19819
+ name: "confirmationEnabled",
19820
+ onChange: e => form.setValue("confirmation", e.target.checked ? alchemy.SE.ConfirmationType.DELIVERY : undefined, {
19840
19821
  shouldDirty: true
19841
- });
19842
- },
19843
- shouldUnmount: true,
19844
- value: ((_k = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _k !== void 0 ? _k : "none") !== "none"
19845
- }, {
19846
- children: [insuranceProviderOptions.length === 1 && insuranceProviderOptions[0].value === "carrier" ? null : jsxRuntime.jsx(Select, {
19847
- control: form.control,
19848
- defaultValue: insuranceEnabled ? alchemy.SE.InsuranceProviderType.CARRIER : alchemy.SE.InsuranceProviderType.NONE,
19849
- displayLabel: false,
19850
- label: t("purchase-label:fields.insuranceProvider"),
19851
- name: "insuranceProvider",
19852
- options: insuranceProviderOptions,
19853
- shouldUnregister: true
19854
- }), jsxRuntime.jsx(MoneyInput, {
19855
- control: form.control,
19856
- defaultValue: {
19857
- amount: undefined,
19858
- currency
19822
+ }),
19823
+ shouldUnmount: true,
19824
+ value: ((_h = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _h !== void 0 ? _h : "none") !== "none"
19825
+ }, {
19826
+ children: jsxRuntime.jsx(Select, {
19827
+ control: form.control,
19828
+ defaultValue: alchemy.SE.ConfirmationType.DELIVERY,
19829
+ displayLabel: false,
19830
+ label: t("purchase-label:fields.confirmation"),
19831
+ name: "confirmation",
19832
+ options: confirmationOptions,
19833
+ shouldUnregister: true
19834
+ })
19835
+ })), jsxRuntime.jsxs(Switch, Object.assign({
19836
+ defaultChecked: ((_j = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _j !== void 0 ? _j : "none") !== "none",
19837
+ label: t("purchase-label:fields.insurance"),
19838
+ name: "insuranceEnabled",
19839
+ onChange: e => {
19840
+ setInsuranceEnabled(e.target.checked);
19841
+ form.setValue("insuranceProvider", e.target.checked ? alchemy.SE.InsuranceProviderType.CARRIER : undefined, {
19842
+ shouldDirty: true
19843
+ });
19859
19844
  },
19860
- displayLabel: false,
19861
- label: t("purchase-label:fields.insuredValue"),
19862
- name: "packages.0.insuredValue",
19863
- placeholder: t("purchase-label:fields.insuredValue"),
19864
- shouldUnregister: true,
19865
- showCurrencySymbol: true
19845
+ shouldUnmount: true,
19846
+ value: ((_k = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _k !== void 0 ? _k : "none") !== "none"
19847
+ }, {
19848
+ children: [insuranceProviderOptions.length === 1 && insuranceProviderOptions[0].value === "carrier" ? null : jsxRuntime.jsx(Select, {
19849
+ control: form.control,
19850
+ defaultValue: insuranceEnabled ? alchemy.SE.InsuranceProviderType.CARRIER : alchemy.SE.InsuranceProviderType.NONE,
19851
+ displayLabel: false,
19852
+ label: t("purchase-label:fields.insuranceProvider"),
19853
+ name: "insuranceProvider",
19854
+ options: insuranceProviderOptions,
19855
+ shouldUnregister: true
19856
+ }), jsxRuntime.jsx(MoneyInput, {
19857
+ control: form.control,
19858
+ defaultValue: {
19859
+ amount: undefined,
19860
+ currency
19861
+ },
19862
+ displayLabel: false,
19863
+ label: t("purchase-label:fields.insuredValue"),
19864
+ name: "packages.0.insuredValue",
19865
+ placeholder: t("purchase-label:fields.insuredValue"),
19866
+ shouldUnregister: true,
19867
+ showCurrencySymbol: true
19868
+ })]
19869
+ })), hasUpsOptions && jsxRuntime.jsx(Switch, {
19870
+ defaultChecked: ((_l = shipment === null || shipment === void 0 ? void 0 : shipment.advancedOptions) === null || _l === void 0 ? void 0 : _l.additionalHandling) || false,
19871
+ label: jsxRuntime.jsx(reactI18next.Trans, {
19872
+ components: {
19873
+ Link: jsxRuntime.jsx(giger.Link, {
19874
+ href: "https://help.paypal.shipstation.com/hc/en-us/articles/13823149193755-UPS-Additional-Handling",
19875
+ rel: "noopener noreferrer",
19876
+ target: "_blank"
19877
+ })
19878
+ },
19879
+ i18nKey: "purchase-label:fields.requires-additional-handling",
19880
+ t: t
19881
+ }),
19882
+ name: "advancedOptions.additionalHandling",
19883
+ onChange: e => form.setValue("advancedOptions.additionalHandling", e.target.checked, {
19884
+ shouldDirty: true
19885
+ }),
19886
+ value: form.getValues("advancedOptions.additionalHandling") || false
19866
19887
  })]
19867
- })), hasUpsOptions && jsxRuntime.jsx(Switch, {
19868
- defaultChecked: ((_l = shipment === null || shipment === void 0 ? void 0 : shipment.advancedOptions) === null || _l === void 0 ? void 0 : _l.additionalHandling) || false,
19869
- label: jsxRuntime.jsx(reactI18next.Trans, {
19870
- components: {
19871
- Link: jsxRuntime.jsx(giger.Link, {
19872
- href: "https://help.paypal.shipstation.com/hc/en-us/articles/13823149193755-UPS-Additional-Handling",
19873
- rel: "noopener noreferrer",
19874
- target: "_blank"
19875
- })
19876
- },
19877
- i18nKey: "purchase-label:fields.requires-additional-handling",
19878
- t: t
19879
- }),
19880
- name: "advancedOptions.additionalHandling",
19881
- onChange: e => form.setValue("advancedOptions.additionalHandling", e.target.checked, {
19882
- shouldDirty: true
19883
- }),
19884
- value: form.getValues("advancedOptions.additionalHandling") || false
19885
- })]
19886
- })), jsxRuntime.jsx("div", Object.assign({
19888
+ }))]
19889
+ }), jsxRuntime.jsx("div", Object.assign({
19887
19890
  css: {
19888
19891
  display: "flex",
19889
19892
  justifyContent: "flex-end"
package/index.js CHANGED
@@ -2802,6 +2802,11 @@ const featureFlags = {
2802
2802
  * `<PurchaseLabel />` element.
2803
2803
  */
2804
2804
  shipmentForm: {
2805
+ /**
2806
+ * `addOns` enables the `Add-Ons` section of the shipment form. This allows users to
2807
+ * add additional services to their shipment such as delivery confirmation and insurance.
2808
+ */
2809
+ addOns: true,
2805
2810
  /**
2806
2811
  * `browseRates` enables the `browse rates` button in the shipment form. This allows users
2807
2812
  * to browse rates for a shipment with varying shipment configurations. This is useful for
@@ -15273,7 +15278,7 @@ const Component$8 = ({
15273
15278
  }, [isAddingCarrier, connectedCarriersFetching]);
15274
15279
  const carrierList = useMemo(() => {
15275
15280
  const carriers = [];
15276
- connectedCarriers === null || connectedCarriers === void 0 ? void 0 : connectedCarriers.forEach(carrier => {
15281
+ connectedCarriers === null || connectedCarriers === void 0 ? void 0 : connectedCarriers.filter(carrier => !carrier.requiresFundedAmount).forEach(carrier => {
15277
15282
  const metadata = carrierMetadata === null || carrierMetadata === void 0 ? void 0 : carrierMetadata.find(m => m.carrierName === carrier.carrierCode);
15278
15283
  if (metadata) {
15279
15284
  carriers.push({
@@ -16332,24 +16337,19 @@ const ManageWarehouses = ({
16332
16337
  }),
16333
16338
  submitButtonTitle: t("actions.save")
16334
16339
  })
16335
- })) : jsx(ButtonGroup, Object.assign({
16336
- justify: "end"
16337
- }, {
16338
- children: jsxs(Button, Object.assign({
16339
- bold: false,
16340
- onClick: () => toggleShowAddNewWarehouseForm(true),
16341
- type: "button",
16342
- variant: ButtonVariant.TEXT
16340
+ })) : jsxs(Fragment, {
16341
+ children: [jsx(ButtonGroup, Object.assign({
16342
+ justify: "end"
16343
16343
  }, {
16344
- children: [t("manage-warehouses:addNew"), jsx(Icon, {
16345
- css: {
16346
- paddingLeft: 6
16347
- },
16348
- name: IconNames.ADD,
16349
- size: IconSize.SIZE_SMALL
16350
- })]
16351
- }))
16352
- })), jsx("div", Object.assign({
16344
+ children: jsx(LinkAction, {
16345
+ icon: "add",
16346
+ onClick: () => toggleShowAddNewWarehouseForm(true),
16347
+ title: t("manage-warehouses:addNew")
16348
+ })
16349
+ })), jsx(Spacer, {
16350
+ multiplier: 2
16351
+ })]
16352
+ }), jsx("div", Object.assign({
16353
16353
  css: styles$i.cardSpacing
16354
16354
  }, {
16355
16355
  children: warehouses.map(warehouse => {
@@ -19089,6 +19089,7 @@ const ShipmentForm = ({
19089
19089
  }) => {
19090
19090
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
19091
19091
  features = Object.assign({
19092
+ addOns: true,
19092
19093
  browseRates: true,
19093
19094
  includeShipsuranceInsurance: true,
19094
19095
  includeThirdPartyInsurance: true,
@@ -19774,82 +19775,84 @@ const ShipmentForm = ({
19774
19775
  hint: t("purchase-label:hints.contentDescription"),
19775
19776
  label: t("purchase-label:fields.contentDescription"),
19776
19777
  name: "packages.0.contentDescription"
19777
- }), jsx(Divider, {}), jsx(Spacer, {}), jsxs(FieldLabel, Object.assign({
19778
- label: "purchase-label:fields.addOns"
19779
- }, {
19780
- children: [jsx(Switch, Object.assign({
19781
- defaultChecked: ((_g = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _g !== void 0 ? _g : "none") !== "none",
19782
- label: t("purchase-label:fields.confirmation"),
19783
- name: "confirmationEnabled",
19784
- onChange: e => form.setValue("confirmation", e.target.checked ? SE.ConfirmationType.DELIVERY : undefined, {
19785
- shouldDirty: true
19786
- }),
19787
- shouldUnmount: true,
19788
- value: ((_h = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _h !== void 0 ? _h : "none") !== "none"
19778
+ }), features.addOns && jsxs(Fragment, {
19779
+ children: [jsx(Divider, {}), jsx(Spacer, {}), jsxs(FieldLabel, Object.assign({
19780
+ label: "purchase-label:fields.addOns"
19789
19781
  }, {
19790
- children: jsx(Select, {
19791
- control: form.control,
19792
- defaultValue: SE.ConfirmationType.DELIVERY,
19793
- displayLabel: false,
19782
+ children: [jsx(Switch, Object.assign({
19783
+ defaultChecked: ((_g = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _g !== void 0 ? _g : "none") !== "none",
19794
19784
  label: t("purchase-label:fields.confirmation"),
19795
- name: "confirmation",
19796
- options: confirmationOptions,
19797
- shouldUnregister: true
19798
- })
19799
- })), jsxs(Switch, Object.assign({
19800
- defaultChecked: ((_j = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _j !== void 0 ? _j : "none") !== "none",
19801
- label: t("purchase-label:fields.insurance"),
19802
- name: "insuranceEnabled",
19803
- onChange: e => {
19804
- setInsuranceEnabled(e.target.checked);
19805
- form.setValue("insuranceProvider", e.target.checked ? SE.InsuranceProviderType.CARRIER : undefined, {
19785
+ name: "confirmationEnabled",
19786
+ onChange: e => form.setValue("confirmation", e.target.checked ? SE.ConfirmationType.DELIVERY : undefined, {
19806
19787
  shouldDirty: true
19807
- });
19808
- },
19809
- shouldUnmount: true,
19810
- value: ((_k = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _k !== void 0 ? _k : "none") !== "none"
19811
- }, {
19812
- children: [insuranceProviderOptions.length === 1 && insuranceProviderOptions[0].value === "carrier" ? null : jsx(Select, {
19813
- control: form.control,
19814
- defaultValue: insuranceEnabled ? SE.InsuranceProviderType.CARRIER : SE.InsuranceProviderType.NONE,
19815
- displayLabel: false,
19816
- label: t("purchase-label:fields.insuranceProvider"),
19817
- name: "insuranceProvider",
19818
- options: insuranceProviderOptions,
19819
- shouldUnregister: true
19820
- }), jsx(MoneyInput, {
19821
- control: form.control,
19822
- defaultValue: {
19823
- amount: undefined,
19824
- currency
19788
+ }),
19789
+ shouldUnmount: true,
19790
+ value: ((_h = shipment === null || shipment === void 0 ? void 0 : shipment.confirmation) !== null && _h !== void 0 ? _h : "none") !== "none"
19791
+ }, {
19792
+ children: jsx(Select, {
19793
+ control: form.control,
19794
+ defaultValue: SE.ConfirmationType.DELIVERY,
19795
+ displayLabel: false,
19796
+ label: t("purchase-label:fields.confirmation"),
19797
+ name: "confirmation",
19798
+ options: confirmationOptions,
19799
+ shouldUnregister: true
19800
+ })
19801
+ })), jsxs(Switch, Object.assign({
19802
+ defaultChecked: ((_j = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _j !== void 0 ? _j : "none") !== "none",
19803
+ label: t("purchase-label:fields.insurance"),
19804
+ name: "insuranceEnabled",
19805
+ onChange: e => {
19806
+ setInsuranceEnabled(e.target.checked);
19807
+ form.setValue("insuranceProvider", e.target.checked ? SE.InsuranceProviderType.CARRIER : undefined, {
19808
+ shouldDirty: true
19809
+ });
19825
19810
  },
19826
- displayLabel: false,
19827
- label: t("purchase-label:fields.insuredValue"),
19828
- name: "packages.0.insuredValue",
19829
- placeholder: t("purchase-label:fields.insuredValue"),
19830
- shouldUnregister: true,
19831
- showCurrencySymbol: true
19811
+ shouldUnmount: true,
19812
+ value: ((_k = shipment === null || shipment === void 0 ? void 0 : shipment.insuranceProvider) !== null && _k !== void 0 ? _k : "none") !== "none"
19813
+ }, {
19814
+ children: [insuranceProviderOptions.length === 1 && insuranceProviderOptions[0].value === "carrier" ? null : jsx(Select, {
19815
+ control: form.control,
19816
+ defaultValue: insuranceEnabled ? SE.InsuranceProviderType.CARRIER : SE.InsuranceProviderType.NONE,
19817
+ displayLabel: false,
19818
+ label: t("purchase-label:fields.insuranceProvider"),
19819
+ name: "insuranceProvider",
19820
+ options: insuranceProviderOptions,
19821
+ shouldUnregister: true
19822
+ }), jsx(MoneyInput, {
19823
+ control: form.control,
19824
+ defaultValue: {
19825
+ amount: undefined,
19826
+ currency
19827
+ },
19828
+ displayLabel: false,
19829
+ label: t("purchase-label:fields.insuredValue"),
19830
+ name: "packages.0.insuredValue",
19831
+ placeholder: t("purchase-label:fields.insuredValue"),
19832
+ shouldUnregister: true,
19833
+ showCurrencySymbol: true
19834
+ })]
19835
+ })), hasUpsOptions && jsx(Switch, {
19836
+ defaultChecked: ((_l = shipment === null || shipment === void 0 ? void 0 : shipment.advancedOptions) === null || _l === void 0 ? void 0 : _l.additionalHandling) || false,
19837
+ label: jsx(Trans, {
19838
+ components: {
19839
+ Link: jsx(Link, {
19840
+ href: "https://help.paypal.shipstation.com/hc/en-us/articles/13823149193755-UPS-Additional-Handling",
19841
+ rel: "noopener noreferrer",
19842
+ target: "_blank"
19843
+ })
19844
+ },
19845
+ i18nKey: "purchase-label:fields.requires-additional-handling",
19846
+ t: t
19847
+ }),
19848
+ name: "advancedOptions.additionalHandling",
19849
+ onChange: e => form.setValue("advancedOptions.additionalHandling", e.target.checked, {
19850
+ shouldDirty: true
19851
+ }),
19852
+ value: form.getValues("advancedOptions.additionalHandling") || false
19832
19853
  })]
19833
- })), hasUpsOptions && jsx(Switch, {
19834
- defaultChecked: ((_l = shipment === null || shipment === void 0 ? void 0 : shipment.advancedOptions) === null || _l === void 0 ? void 0 : _l.additionalHandling) || false,
19835
- label: jsx(Trans, {
19836
- components: {
19837
- Link: jsx(Link, {
19838
- href: "https://help.paypal.shipstation.com/hc/en-us/articles/13823149193755-UPS-Additional-Handling",
19839
- rel: "noopener noreferrer",
19840
- target: "_blank"
19841
- })
19842
- },
19843
- i18nKey: "purchase-label:fields.requires-additional-handling",
19844
- t: t
19845
- }),
19846
- name: "advancedOptions.additionalHandling",
19847
- onChange: e => form.setValue("advancedOptions.additionalHandling", e.target.checked, {
19848
- shouldDirty: true
19849
- }),
19850
- value: form.getValues("advancedOptions.additionalHandling") || false
19851
- })]
19852
- })), jsx("div", Object.assign({
19854
+ }))]
19855
+ }), jsx("div", Object.assign({
19853
19856
  css: {
19854
19857
  display: "flex",
19855
19858
  justifyContent: "flex-end"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipengine/elements",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "peerDependencies": {
5
5
  "@shipengine/alchemy": "5.x.x",
6
6
  "@emotion/react": "11.x",
@@ -9,6 +9,7 @@ export type OnChangeAddressOptions = {
9
9
  };
10
10
  export type ShipmentFormMode = "browse_rates" | "select_service";
11
11
  export type ShipmentFormFeatures = {
12
+ addOns?: boolean;
12
13
  browseRates?: boolean;
13
14
  includeShipsuranceInsurance?: boolean;
14
15
  includeThirdPartyInsurance?: boolean;
@@ -1,5 +1,8 @@
1
1
  import React from "react";
2
2
  import { Shipment } from "@shipengine/js-api";
3
+ import { PurchaseLabel } from "../purchase-label";
4
+ import { ViewShipment } from "../view-shipment";
5
+ import { VoidLabel } from "../void-label";
3
6
  /**
4
7
  * @internal
5
8
  *
@@ -26,7 +29,7 @@ export type LabelWorkflowProps = {
26
29
  /**
27
30
  * `features` is a set of feature flags you would like to enable or disable in this component.
28
31
  */
29
- features: any;
32
+ features: PurchaseLabel.PurchaseLabelCommonProps["features"] & ViewShipment.ComponentProps["features"] & VoidLabel.ComponentProps["features"];
30
33
  /**
31
34
  * `labelId` is the unique identifier for the label you wish to view.
32
35
  */
@@ -115,6 +115,11 @@ export declare const featureFlags: {
115
115
  * `<PurchaseLabel />` element.
116
116
  */
117
117
  readonly shipmentForm: {
118
+ /**
119
+ * `addOns` enables the `Add-Ons` section of the shipment form. This allows users to
120
+ * add additional services to their shipment such as delivery confirmation and insurance.
121
+ */
122
+ readonly addOns: true;
118
123
  /**
119
124
  * `browseRates` enables the `browse rates` button in the shipment form. This allows users
120
125
  * to browse rates for a shipment with varying shipment configurations. This is useful for