@schandlergarcia/sf-web-components 2.3.17 → 2.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.
Files changed (94) hide show
  1. package/.a4drules/skills/command-center-builder/SKILL.md +3 -2
  2. package/.a4drules/skills/component-library/SKILL.md +50 -4
  3. package/.a4drules/skills/component-library/card-components.md +88 -0
  4. package/.a4drules/skills/component-library/when-to-use.md +1 -0
  5. package/CHANGELOG.md +40 -0
  6. package/CLAUDE.md +12 -13
  7. package/README.md +0 -15
  8. package/dist/components/library/cards/KanbanBoard.js +313 -0
  9. package/dist/components/library/cards/KanbanBoard.js.map +1 -0
  10. package/dist/components/library/index.js +60 -57
  11. package/dist/components/library/index.js.map +1 -1
  12. package/dist/components/workspace/ComponentRegistry.js +5 -2
  13. package/dist/components/workspace/ComponentRegistry.js.map +1 -1
  14. package/dist/index.js +84 -82
  15. package/dist/index.js.map +1 -1
  16. package/dist/styles/global.css +44 -57
  17. package/package.json +7 -2
  18. package/scripts/apply-brand.mjs +47 -30
  19. package/scripts/postinstall.mjs +1 -11
  20. package/src/components/library/cards/KanbanBoard.jsx +507 -0
  21. package/src/components/library/index.jsx +1 -0
  22. package/src/styles/global.css +44 -57
  23. package/brands/engine/PARTNER_HUB_PRD.md +0 -584
  24. package/brands/engine/agentApiConfig.ts +0 -36
  25. package/brands/engine/app/api/graphql-operations-types.ts +0 -11260
  26. package/brands/engine/app/api/graphqlClient.ts +0 -25
  27. package/brands/engine/app/api/partnerQueries.ts +0 -212
  28. package/brands/engine/app/appLayout.tsx +0 -5
  29. package/brands/engine/app/components/AgentPanel.tsx +0 -541
  30. package/brands/engine/app/components/AgentforceConversationClient.tsx +0 -201
  31. package/brands/engine/app/components/Data360Widget.tsx +0 -301
  32. package/brands/engine/app/components/__inherit_AgentforceConversationClient.tsx +0 -3
  33. package/brands/engine/app/components/alerts/status-alert.tsx +0 -49
  34. package/brands/engine/app/components/layouts/card-layout.tsx +0 -29
  35. package/brands/engine/app/components/workspace/CommandCenter.tsx +0 -16
  36. package/brands/engine/app/config/agentApi.ts +0 -36
  37. package/brands/engine/app/data/partner-hub-sample-data.js +0 -297
  38. package/brands/engine/app/features/object-search/__examples__/api/accountSearchService.ts +0 -46
  39. package/brands/engine/app/features/object-search/__examples__/api/query/distinctAccountIndustries.graphql +0 -19
  40. package/brands/engine/app/features/object-search/__examples__/api/query/distinctAccountTypes.graphql +0 -19
  41. package/brands/engine/app/features/object-search/__examples__/api/query/getAccountDetail.graphql +0 -121
  42. package/brands/engine/app/features/object-search/__examples__/api/query/searchAccounts.graphql +0 -51
  43. package/brands/engine/app/features/object-search/__examples__/pages/AccountObjectDetailPage.tsx +0 -357
  44. package/brands/engine/app/features/object-search/__examples__/pages/AccountSearch.tsx +0 -312
  45. package/brands/engine/app/features/object-search/__examples__/pages/Home.tsx +0 -34
  46. package/brands/engine/app/features/object-search/api/objectSearchService.ts +0 -84
  47. package/brands/engine/app/features/object-search/components/ActiveFilters.tsx +0 -89
  48. package/brands/engine/app/features/object-search/components/FilterContext.tsx +0 -83
  49. package/brands/engine/app/features/object-search/components/ObjectBreadcrumb.tsx +0 -66
  50. package/brands/engine/app/features/object-search/components/PaginationControls.tsx +0 -109
  51. package/brands/engine/app/features/object-search/components/SearchBar.tsx +0 -41
  52. package/brands/engine/app/features/object-search/components/SortControl.tsx +0 -143
  53. package/brands/engine/app/features/object-search/components/filters/BooleanFilter.tsx +0 -78
  54. package/brands/engine/app/features/object-search/components/filters/DateFilter.tsx +0 -128
  55. package/brands/engine/app/features/object-search/components/filters/DateRangeFilter.tsx +0 -70
  56. package/brands/engine/app/features/object-search/components/filters/FilterFieldWrapper.tsx +0 -33
  57. package/brands/engine/app/features/object-search/components/filters/MultiSelectFilter.tsx +0 -97
  58. package/brands/engine/app/features/object-search/components/filters/NumericRangeFilter.tsx +0 -163
  59. package/brands/engine/app/features/object-search/components/filters/SearchFilter.tsx +0 -50
  60. package/brands/engine/app/features/object-search/components/filters/SelectFilter.tsx +0 -97
  61. package/brands/engine/app/features/object-search/components/filters/TextFilter.tsx +0 -91
  62. package/brands/engine/app/features/object-search/hooks/useAsyncData.ts +0 -54
  63. package/brands/engine/app/features/object-search/hooks/useCachedAsyncData.ts +0 -184
  64. package/brands/engine/app/features/object-search/hooks/useDebouncedCallback.ts +0 -34
  65. package/brands/engine/app/features/object-search/hooks/useObjectSearchParams.ts +0 -252
  66. package/brands/engine/app/features/object-search/utils/debounce.ts +0 -25
  67. package/brands/engine/app/features/object-search/utils/fieldUtils.ts +0 -29
  68. package/brands/engine/app/features/object-search/utils/filterUtils.ts +0 -404
  69. package/brands/engine/app/features/object-search/utils/sortUtils.ts +0 -38
  70. package/brands/engine/app/hooks/useEngineLiveData.ts +0 -49
  71. package/brands/engine/app/hooks/useEvaAgent.ts +0 -288
  72. package/brands/engine/app/hooks/usePartnerDashboardData.ts +0 -141
  73. package/brands/engine/app/navigationMenu.tsx +0 -80
  74. package/brands/engine/app/pages/AccountObjectDetailPage.tsx +0 -361
  75. package/brands/engine/app/pages/AccountSearch.tsx +0 -305
  76. package/brands/engine/app/pages/BlankDashboard.tsx +0 -15
  77. package/brands/engine/app/pages/DataTest.tsx +0 -78
  78. package/brands/engine/app/pages/Home.tsx +0 -5
  79. package/brands/engine/app/pages/NotFound.tsx +0 -19
  80. package/brands/engine/app/pages/PartnerHubDashboard.tsx +0 -2760
  81. package/brands/engine/app/pages/Search.tsx +0 -13
  82. package/brands/engine/app/router-utils.tsx +0 -35
  83. package/brands/engine/app/routes.tsx +0 -39
  84. package/brands/engine/app/styles/global.css +0 -269
  85. package/brands/engine/brand.css +0 -40
  86. package/brands/engine/engine-command-center-prd.md +0 -575
  87. package/brands/engine/engine-live-data.js +0 -135
  88. package/brands/engine/engine-sample-data.js +0 -378
  89. package/brands/engine/engine_logo.png +0 -0
  90. package/brands/engine/global.css +0 -269
  91. package/brands/engine/partner-hub-sample-data.js +0 -281
  92. package/brands/engine/schema.graphql +0 -292
  93. package/brands/engine/useEngineLiveData.ts +0 -49
  94. package/brands/engine/useEvaAgent.ts +0 -288
@@ -1,25 +0,0 @@
1
- /**
2
- * Thin GraphQL client: createDataSDK + data.graphql with centralized error handling.
3
- * Use with gql-tagged queries and generated operation types for type-safe calls.
4
- */
5
- import { createDataSDK } from '@salesforce/sdk-data';
6
-
7
- export async function executeGraphQL<TData, TVariables>(
8
- query: string,
9
- variables?: TVariables
10
- ): Promise<TData> {
11
- const data = await createDataSDK();
12
- // SDK types graphql() first param as string; at runtime it may accept gql DocumentNode too
13
- const response = await data.graphql?.<TData, TVariables>(query, variables);
14
-
15
- if (!response) {
16
- throw new Error('GraphQL response is undefined');
17
- }
18
-
19
- if (response?.errors?.length) {
20
- const msg = response.errors.map(e => e.message).join('; ');
21
- throw new Error(`GraphQL Error: ${msg}`);
22
- }
23
-
24
- return response.data;
25
- }
@@ -1,212 +0,0 @@
1
- import { gql } from "@salesforce/sdk-data";
2
-
3
- /**
4
- * Partner Hub GraphQL Queries
5
- *
6
- * These queries fetch partner dashboard data from Salesforce using UI API GraphQL.
7
- * All custom fields use @optional to handle null values gracefully.
8
- */
9
-
10
- // Get current user
11
- export const GET_CURRENT_USER = gql`
12
- query GetCurrentUser {
13
- uiapi {
14
- currentUser {
15
- Id
16
- Name @optional { value }
17
- Email @optional { value }
18
- }
19
- }
20
- }
21
- `;
22
-
23
- // Get partner Account with custom fields
24
- export const GET_PARTNER_ACCOUNT = gql`
25
- query GetPartnerAccount($accountId: ID!) {
26
- uiapi {
27
- query {
28
- Account(where: { Id: { eq: $accountId } }, first: 1) {
29
- edges {
30
- node {
31
- Id
32
- Name @optional { value }
33
- Type @optional { value }
34
- Partner_Tier__c @optional { value }
35
- Commission_Rate__c @optional { value }
36
- Partner_Status__c @optional { value }
37
- Total_Properties__c @optional { value }
38
- Total_Reservations__c @optional { value }
39
- Total_Revenue__c @optional { value }
40
- Contract_Start_Date__c @optional { value }
41
- Contract_End_Date__c @optional { value }
42
- }
43
- }
44
- }
45
- }
46
- }
47
- }
48
- `;
49
-
50
- // Find first Partner account (when no partnerId provided)
51
- export const FIND_PARTNER_ACCOUNT = gql`
52
- query FindPartnerAccount {
53
- uiapi {
54
- query {
55
- Account(where: { Type: { eq: "Partner" } }, first: 1) {
56
- edges {
57
- node {
58
- Id
59
- Name @optional { value }
60
- }
61
- }
62
- }
63
- }
64
- }
65
- }
66
- `;
67
-
68
- // Get contracts for partner
69
- export const GET_CONTRACTS = gql`
70
- query GetContracts($accountId: ID!) {
71
- uiapi {
72
- query {
73
- Contract__c(where: { Hotel_Partner__c: { eq: $accountId } }, first: 50) {
74
- edges {
75
- node {
76
- Id
77
- Name @optional { value }
78
- Contract_Status__c @optional { value }
79
- Attrition_Calculation_Method__c @optional { value }
80
- Attrition_Threshold_Percentage__c @optional { value }
81
- Resale_Credit_Policy__c @optional { value }
82
- Resale_Credit_Percentage__c @optional { value }
83
- Commission_Rate__c @optional { value }
84
- Start_Date__c @optional { value }
85
- End_Date__c @optional { value }
86
- }
87
- }
88
- }
89
- }
90
- }
91
- }
92
- `;
93
-
94
- // Get invoices for partner
95
- export const GET_INVOICES = gql`
96
- query GetInvoices($accountId: ID!) {
97
- uiapi {
98
- query {
99
- Invoice__c(where: { Hotel_Partner__c: { eq: $accountId } }, first: 50, orderBy: { Invoice_Date__c: { order: DESC } }) {
100
- edges {
101
- node {
102
- Id
103
- Name @optional { value }
104
- Invoice_Status__c @optional { value }
105
- Invoice_Date__c @optional { value }
106
- Due_Date__c @optional { value }
107
- Invoice_Period_Start__c @optional { value }
108
- Invoice_Period_End__c @optional { value }
109
- Invoice_Total__c @optional { value }
110
- Total_Commission__c @optional { value }
111
- Total_Attrition_Penalties__c @optional { value }
112
- }
113
- }
114
- }
115
- }
116
- }
117
- }
118
- `;
119
-
120
- // Get attrition penalties for partner (via Contract relationship)
121
- export const GET_PENALTIES = gql`
122
- query GetPenalties($accountId: ID!) {
123
- uiapi {
124
- query {
125
- Attrition_Penalty__c(
126
- where: {
127
- Contract__r: { Hotel_Partner__c: { eq: $accountId } }
128
- }
129
- first: 50
130
- ) {
131
- edges {
132
- node {
133
- Id
134
- Name @optional { value }
135
- Penalty_Status__c @optional { value }
136
- Original_Room_Block__c @optional { value }
137
- Actual_Rooms_Used__c @optional { value }
138
- Unused_Rooms__c @optional { value }
139
- Room_Rate__c @optional { value }
140
- Number_of_Nights__c @optional { value }
141
- Rooms_Resold__c @optional { value }
142
- Penalty_Amount_Calculated__c @optional { value }
143
- Resale_Credit_Applied__c @optional { value }
144
- Final_Penalty_Amount__c @optional { value }
145
- Penalty_Date__c @optional { value }
146
- Contract__c @optional { value }
147
- Property__r @optional {
148
- Name @optional { value }
149
- Property_Name__c @optional { value }
150
- }
151
- Customer_Company__r @optional {
152
- Name @optional { value }
153
- }
154
- }
155
- }
156
- }
157
- }
158
- }
159
- }
160
- `;
161
-
162
- // Get disputes (Cases with Partner_Dispute RecordType)
163
- export const GET_DISPUTES = gql`
164
- query GetDisputes($accountId: ID!) {
165
- uiapi {
166
- query {
167
- Case(where: { AccountId: { eq: $accountId }, RecordType: { DeveloperName: { eq: "Partner_Dispute" } } }, first: 50) {
168
- edges {
169
- node {
170
- Id
171
- CaseNumber @optional { value }
172
- Subject @optional { value }
173
- Status @optional { value }
174
- Priority @optional { value }
175
- Dispute_Type__c @optional { value }
176
- Disputed_Amount__c @optional { value }
177
- Agent_Handled__c @optional { value }
178
- Escalation_Reason__c @optional { value }
179
- CreatedDate @optional { value }
180
- }
181
- }
182
- }
183
- }
184
- }
185
- }
186
- `;
187
-
188
- // Get properties for partner
189
- export const GET_PROPERTIES = gql`
190
- query GetProperties($accountId: ID!) {
191
- uiapi {
192
- query {
193
- Property__c(where: { Hotel_Partner__c: { eq: $accountId } }, first: 50) {
194
- edges {
195
- node {
196
- Id
197
- Name @optional { value }
198
- Property_Name__c @optional { value }
199
- Property_Type__c @optional { value }
200
- City__c @optional { value }
201
- State__c @optional { value }
202
- Country__c @optional { value }
203
- Star_Rating__c @optional { value }
204
- Total_Rooms__c @optional { value }
205
- Active__c @optional { value }
206
- }
207
- }
208
- }
209
- }
210
- }
211
- }
212
- `;
@@ -1,5 +0,0 @@
1
- import { Outlet } from "react-router";
2
-
3
- export default function AppLayout() {
4
- return <Outlet />;
5
- }