@tesouro/embedded-components-react 0.11.100 → 0.11.102

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.
Files changed (71) hide show
  1. package/dist/experimental/QuickViewWidget.d.ts +62 -2
  2. package/dist/experimental/index.d.ts +62 -2
  3. package/dist/index.css +21 -17
  4. package/dist/index.d.ts +10 -6
  5. package/dist/lib/CardDetailsWidget.d.ts +6 -4
  6. package/dist/lib/CreditCardsWidget.d.ts +6 -4
  7. package/dist/lib/DebitCardsWidget.d.ts +6 -4
  8. package/dist/lib/SettingsWidget.d.ts +2 -1
  9. package/dist/lib/WidgetSuite.d.ts +8 -5
  10. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +199 -168
  11. package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +1 -0
  12. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +44 -43
  13. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +9 -9
  15. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +2 -2
  16. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +25 -284
  17. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index7.js +291 -0
  18. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +3 -3
  19. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +28 -17
  20. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +21 -34
  21. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +71 -78
  22. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +71 -77
  23. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +43 -49
  24. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js +8 -1
  26. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/accounts/ui/dist/index2.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index2.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/data-access/dist/index.js +1 -0
  29. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/data-access/dist/index2.js +98 -0
  30. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/index.js +3 -0
  31. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/CardsQuickViewWidgetFeature.js +80 -0
  32. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/labels.js +27 -0
  33. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/summarizeCardSpend.js +17 -0
  34. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/testIds.js +7 -0
  35. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/useCardSpendSummary.js +29 -0
  36. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/analytics/events.js +4 -0
  37. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index.js +3 -0
  38. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index2.js +8 -0
  39. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index3.js +31 -0
  40. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/QuickViewWidget.js +57 -44
  41. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/labels.js +6 -3
  42. package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/ui/dist/index2.js +1 -1
  43. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +98 -91
  44. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +24 -21
  45. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +14 -8
  46. package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +2 -2
  47. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +87 -81
  48. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +63 -44
  49. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +9 -6
  50. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +302 -276
  51. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +10 -10
  52. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +36 -36
  53. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +27 -13
  54. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsSectionContent.js +22 -0
  55. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +6 -7
  56. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +39 -37
  57. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -9
  58. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +39 -35
  59. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +59 -61
  60. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index4.js +2 -2
  61. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index6.js +2 -2
  62. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +3 -3
  63. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -103
  64. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +43 -43
  65. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +22 -18
  66. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +97 -97
  67. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +166 -154
  68. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  69. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/index.js +12 -12
  70. package/dist/packages/shared-ui-shadcn/dist/index.js +18 -15
  71. package/package.json +1 -1
@@ -4,102 +4,100 @@ import { ApproverGroupsBuilder as c } from "./index14.js";
4
4
  import { PolicyCardDefaultLabels as l } from "./index15.js";
5
5
  import { Fragment as u, useMemo as d } from "react";
6
6
  import { jsx as f, jsxs as p } from "react/jsx-runtime";
7
- import { SquarePen as m, Trash2 as h } from "lucide-react";
7
+ import { Trash2 as m } from "lucide-react";
8
8
  // ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js
9
- var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, amountCondition: x, onAmountConditionChange: S, onAmountFieldBlur: C, amountConditionErrors: w, onApproverStepsChange: T, onAddApproverStep: E, onRemoveApproverStep: D, approverErrors: O, addApproverStepDisabled: k, isEditing: A, onEdit: j, onCancel: M, onSave: N, onDelete: P, saveDisabled: F, saveDisabledReasons: I, disabled: L, labels: R, ref: z, testIds: B }) => {
10
- let V = d(() => ({
9
+ var h = ({ id: h, title: g, sentence: _, approverSteps: v, approverOptions: y, amountCondition: b, onAmountConditionChange: x, onAmountFieldBlur: S, amountConditionErrors: C, onApproverStepsChange: w, onAddApproverStep: T, onRemoveApproverStep: E, approverErrors: D, addApproverStepDisabled: O, isEditing: k, onEdit: A, onCancel: j, onSave: M, onDelete: N, saveDisabled: P, saveDisabledReasons: F, disabled: I, labels: L, ref: R, testIds: z }) => {
10
+ let B = d(() => ({
11
11
  ...l,
12
- ...R,
12
+ ...L,
13
13
  AmountConditionBuilder: {
14
14
  ...l.AmountConditionBuilder,
15
- ...R?.AmountConditionBuilder
15
+ ...L?.AmountConditionBuilder
16
16
  },
17
17
  ApproverGroupsBuilder: {
18
18
  ...l.ApproverGroupsBuilder,
19
- ...R?.ApproverGroupsBuilder
19
+ ...L?.ApproverGroupsBuilder
20
20
  }
21
- }), [R]), H = /* @__PURE__ */ f(t, {
21
+ }), [L]), V = /* @__PURE__ */ f(t, {
22
22
  type: "button",
23
- onClick: N,
24
- disabled: L || F,
25
- "data-testid": `policy-card-save-button-${g}`,
26
- children: V.Save
27
- }), U = {
28
- steps: y,
29
- options: b,
30
- onStepsChange: T,
31
- onAddStep: E,
32
- onRemoveStep: D,
33
- errors: O,
34
- addStepDisabled: k,
35
- disabled: L,
36
- labels: V.ApproverGroupsBuilder,
37
- testIds: B?.approverGroupsBuilder
23
+ onClick: M,
24
+ disabled: I || P,
25
+ "data-testid": `policy-card-save-button-${h}`,
26
+ children: B.Save
27
+ }), H = {
28
+ steps: v,
29
+ options: y,
30
+ onStepsChange: w,
31
+ onAddStep: T,
32
+ onRemoveStep: E,
33
+ errors: D,
34
+ addStepDisabled: O,
35
+ disabled: I,
36
+ labels: B.ApproverGroupsBuilder,
37
+ testIds: z?.approverGroupsBuilder
38
38
  };
39
39
  return /* @__PURE__ */ p("div", {
40
- ref: z,
41
- "data-testid": `policy-card-${g}`,
42
- className: `ttw:flex ttw:w-full ttw:flex-col ttw:gap-4 ttw:rounded-xl ttw:border ttw:bg-card ttw:p-6 ${A ? "ttw:border-primary" : "ttw:border-border"}`,
43
- children: [A ? null : /* @__PURE__ */ p("div", {
40
+ ref: R,
41
+ "data-testid": `policy-card-${h}`,
42
+ className: `ttw:flex ttw:w-full ttw:flex-col ttw:gap-4 ttw:rounded-xl ttw:border ttw:bg-card ttw:p-6 ${k ? "ttw:border-primary" : "ttw:border-border"}`,
43
+ children: [k ? null : /* @__PURE__ */ p("div", {
44
44
  className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
45
45
  children: [/* @__PURE__ */ f(o, {
46
46
  variant: "body1",
47
- children: _
47
+ children: g
48
48
  }), /* @__PURE__ */ f(t, {
49
49
  type: "button",
50
50
  variant: "ghost",
51
- size: "icon-sm",
52
- "aria-label": V.EditAriaLabel,
53
- onClick: j,
54
- disabled: L,
55
- "data-testid": `policy-card-edit-button-${g}`,
56
- children: /* @__PURE__ */ f(m, {})
51
+ onClick: A,
52
+ disabled: I,
53
+ "data-testid": `policy-card-edit-button-${h}`,
54
+ children: B.EditAriaLabel
57
55
  })]
58
- }), A ? /* @__PURE__ */ p("div", {
56
+ }), k ? /* @__PURE__ */ p("div", {
59
57
  className: "ttw:flex ttw:flex-col ttw:gap-4",
60
58
  children: [
61
59
  /* @__PURE__ */ f(s, {
62
- value: x,
63
- onChange: S,
64
- onFieldBlur: C,
65
- errors: w,
66
- disabled: L,
67
- labels: V.AmountConditionBuilder,
68
- testIds: B?.amountConditionBuilder
60
+ value: b,
61
+ onChange: x,
62
+ onFieldBlur: S,
63
+ errors: C,
64
+ disabled: I,
65
+ labels: B.AmountConditionBuilder,
66
+ testIds: z?.amountConditionBuilder
69
67
  }),
70
- /* @__PURE__ */ f(c, { ...U }),
68
+ /* @__PURE__ */ f(c, { ...H }),
71
69
  /* @__PURE__ */ p("div", {
72
70
  className: "ttw:flex ttw:items-center ttw:gap-4 ttw:pt-2",
73
- children: [P ? /* @__PURE__ */ p(t, {
71
+ children: [N ? /* @__PURE__ */ p(t, {
74
72
  type: "button",
75
73
  variant: "ghost",
76
- onClick: P,
77
- disabled: L,
74
+ onClick: N,
75
+ disabled: I,
78
76
  className: "ttw:w-fit ttw:px-0 ttw:text-destructive ttw:hover:text-destructive",
79
- "data-testid": `policy-card-delete-button-${g}`,
80
- children: [/* @__PURE__ */ f(h, {}), V.Delete]
77
+ "data-testid": `policy-card-delete-button-${h}`,
78
+ children: [/* @__PURE__ */ f(m, {}), B.Delete]
81
79
  }) : null, /* @__PURE__ */ p("div", {
82
80
  className: "ttw:ml-auto ttw:flex ttw:items-center ttw:gap-2",
83
81
  children: [/* @__PURE__ */ f(t, {
84
82
  type: "button",
85
83
  variant: "outline",
86
- onClick: M,
87
- disabled: L,
88
- "data-testid": `policy-card-cancel-button-${g}`,
89
- children: V.Cancel
90
- }), F && I?.length ? /* @__PURE__ */ f(i, { children: /* @__PURE__ */ p(n, { children: [/* @__PURE__ */ f(a, {
84
+ onClick: j,
85
+ disabled: I,
86
+ "data-testid": `policy-card-cancel-button-${h}`,
87
+ children: B.Cancel
88
+ }), P && F?.length ? /* @__PURE__ */ f(i, { children: /* @__PURE__ */ p(n, { children: [/* @__PURE__ */ f(a, {
91
89
  asChild: !0,
92
90
  children: /* @__PURE__ */ f("span", {
93
91
  tabIndex: 0,
94
92
  className: "ttw:inline-flex ttw:cursor-not-allowed ttw:rounded-md",
95
- "data-testid": `policy-card-save-blocked-${g}`,
96
- children: H
93
+ "data-testid": `policy-card-save-blocked-${h}`,
94
+ children: V
97
95
  })
98
96
  }), /* @__PURE__ */ f(r, {
99
97
  side: "top",
100
98
  className: "ttw:flex ttw:flex-col ttw:gap-1",
101
- children: I.map((e) => /* @__PURE__ */ f("span", { children: e }, e))
102
- })] }) }) : H]
99
+ children: F.map((e) => /* @__PURE__ */ f("span", { children: e }, e))
100
+ })] }) }) : V]
103
101
  })]
104
102
  })
105
103
  ]
@@ -109,20 +107,20 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
109
107
  variant: "body2",
110
108
  color: "muted",
111
109
  className: "ttw:font-medium",
112
- children: v
113
- }), y.map((t, n) => /* @__PURE__ */ p(u, { children: [n > 0 ? /* @__PURE__ */ p("div", {
110
+ children: _
111
+ }), v.map((t, n) => /* @__PURE__ */ p(u, { children: [n > 0 ? /* @__PURE__ */ p("div", {
114
112
  className: "ttw:flex ttw:items-center ttw:gap-2.5 ttw:pl-1",
115
113
  children: [/* @__PURE__ */ f(o, {
116
114
  variant: "caption",
117
115
  color: "muted",
118
- children: V.GroupConnector
116
+ children: B.GroupConnector
119
117
  }), /* @__PURE__ */ f("div", { className: "ttw:h-px ttw:flex-1 ttw:bg-border" })]
120
118
  }) : null, /* @__PURE__ */ f("div", {
121
119
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-1.5",
122
120
  children: t.selectedItems.map((t, n) => /* @__PURE__ */ p(u, { children: [n > 0 ? /* @__PURE__ */ f(o, {
123
121
  variant: "body2",
124
122
  color: "muted",
125
- children: V.ApproverConnector
123
+ children: B.ApproverConnector
126
124
  }) : null, /* @__PURE__ */ f(e, {
127
125
  variant: "secondary",
128
126
  children: t.label
@@ -131,4 +129,4 @@ var g = ({ id: g, title: _, sentence: v, approverSteps: y, approverOptions: b, a
131
129
  })]
132
130
  });
133
131
  };
134
- export { g as PolicyCard };
132
+ export { h as PolicyCard };
@@ -1,9 +1,9 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index4.js
2
2
  var e = {
3
3
  Title: "No rules created yet",
4
- Body: "Without approval rules in place, or if a gap in coverage exists, a company admin approval will be required.",
4
+ Body: "Company admin approval is required when no rule covers a bill amount.",
5
5
  TitleWithUnlistedRules: "No rules to show here",
6
- BodyWithUnlistedRules: "Where no rule covers a bill amount, a company admin approval will be required.",
6
+ BodyWithUnlistedRules: "Company admin approval is required when no rule covers a bill amount.",
7
7
  CreateRule: "Create rule"
8
8
  };
9
9
  export { e as NoPolicyBannerDefaultLabels };
@@ -1,6 +1,6 @@
1
1
  // ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index6.js
2
2
  var e = {
3
- Title: "No rules exist for the following bill amount ranges",
4
- Footer: "When a bill has no assigned approver, a company admin approval will be required."
3
+ Title: "No rules cover the following bill amount ranges",
4
+ Footer: "Company admin approval is required when a bill has no assigned approver."
5
5
  };
6
6
  export { e as GapCoverageAlertDefaultLabels };
@@ -19,15 +19,15 @@ var p = ({ gaps: p, onSelectGap: m, disabled: h, labels: g, testIds: _ }) => {
19
19
  /* @__PURE__ */ u(t, { children: [/* @__PURE__ */ l("ul", {
20
20
  className: "ttw:my-1.5 ttw:list-disc ttw:space-y-1 ttw:pl-5",
21
21
  children: p.map((e) => {
22
- let t = /* @__PURE__ */ u("button", {
22
+ let t = m ? /* @__PURE__ */ u("button", {
23
23
  type: "button",
24
24
  className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:text-primary ttw:disabled:pointer-events-none ttw:disabled:opacity-60 ttw:hover:underline",
25
25
  disabled: h || e.blockedReason !== void 0,
26
26
  onClick: () => m(e.id),
27
27
  "data-testid": `gap-coverage-link-${e.id}`,
28
28
  children: [e.label, /* @__PURE__ */ l(d, { className: "ttw:size-3" })]
29
- });
30
- return /* @__PURE__ */ l("li", { children: e.blockedReason ? /* @__PURE__ */ l(a, { children: /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(o, {
29
+ }) : /* @__PURE__ */ l("span", { children: e.label });
30
+ return /* @__PURE__ */ l("li", { children: e.blockedReason && m ? /* @__PURE__ */ l(a, { children: /* @__PURE__ */ u(r, { children: [/* @__PURE__ */ l(o, {
31
31
  asChild: !0,
32
32
  children: /* @__PURE__ */ l("span", {
33
33
  tabIndex: 0,