@cryptlex/web-components 1.3.2 → 1.3.4
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/dist/components/data-table/column-picker.es.js +78 -0
- package/dist/components/data-table/column-picker.es.js.map +1 -0
- package/dist/components/data-table/data-table.es.js +197 -0
- package/dist/components/data-table/data-table.es.js.map +1 -0
- package/dist/components/data-table/page-size.es.js +23 -0
- package/dist/components/data-table/page-size.es.js.map +1 -0
- package/dist/components/data-table/paginator.es.js +63 -0
- package/dist/components/data-table/paginator.es.js.map +1 -0
- package/dist/components/data-table/table-actions.es.js +78 -0
- package/dist/components/data-table/table-actions.es.js.map +1 -0
- package/dist/components/data-table/table-commons.es.js +52 -0
- package/dist/components/data-table/table-commons.es.js.map +1 -0
- package/dist/components/data-table/table-content.es.js +46 -0
- package/dist/components/data-table/table-content.es.js.map +1 -0
- package/dist/components/data-table/table-utils/constants.es.js +274 -0
- package/dist/components/data-table/table-utils/constants.es.js.map +1 -0
- package/dist/components/data-table/table-utils/createTableFetchFn.es.js +24 -0
- package/dist/components/data-table/table-utils/createTableFetchFn.es.js.map +1 -0
- package/dist/components/data-table/table-utils/date.es.js +12 -0
- package/dist/components/data-table/table-utils/date.es.js.map +1 -0
- package/dist/components/data-table/table-utils/link-display.es.js +21 -0
- package/dist/components/data-table/table-utils/link-display.es.js.map +1 -0
- package/dist/components/data-table/table-utils/string.es.js +19 -0
- package/dist/components/data-table/table-utils/string.es.js.map +1 -0
- package/dist/components/data-table/table-utils/types.es.js +5 -0
- package/dist/components/data-table/table-utils/types.es.js.map +1 -0
- package/dist/components/info-card/info-card.es.js +71 -0
- package/dist/components/info-card/info-card.es.js.map +1 -0
- package/dist/components/sidebar/app-layout.es.js +83 -0
- package/dist/components/sidebar/app-layout.es.js.map +1 -0
- package/dist/components/sidebar/nav-main.es.js +76 -0
- package/dist/components/sidebar/nav-main.es.js.map +1 -0
- package/dist/components/sidebar/sidebar.es.js +10 -0
- package/dist/components/sidebar/sidebar.es.js.map +1 -0
- package/dist/components/static-data-table/data-table.es.js +30 -0
- package/dist/components/static-data-table/data-table.es.js.map +1 -0
- package/dist/components/ui/avatar.es.js +12 -14
- package/dist/components/ui/avatar.es.js.map +1 -1
- package/dist/components/ui/button.es.js +12 -22
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/chart.es.js +40 -51
- package/dist/components/ui/chart.es.js.map +1 -1
- package/dist/components/ui/collapsible.es.js +1 -0
- package/dist/components/ui/collapsible.es.js.map +1 -1
- package/dist/components/ui/dialog.es.js +23 -22
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +16 -48
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/form.es.js +28 -29
- package/dist/components/ui/form.es.js.map +1 -1
- package/dist/components/ui/mutli-select.es.js +195 -0
- package/dist/components/ui/mutli-select.es.js.map +1 -0
- package/dist/components/ui/password-input.es.js +9 -8
- package/dist/components/ui/password-input.es.js.map +1 -1
- package/dist/components/ui/search-input.es.js +42 -0
- package/dist/components/ui/search-input.es.js.map +1 -0
- package/dist/components/ui/select.es.js +4 -9
- package/dist/components/ui/select.es.js.map +1 -1
- package/dist/components/ui/separator.es.js +17 -18
- package/dist/components/ui/separator.es.js.map +1 -1
- package/dist/components/ui/sheet.es.js +12 -37
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +286 -264
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/sonner.es.js +3 -2
- package/dist/components/ui/sonner.es.js.map +1 -1
- package/dist/components/ui/table-page-layout.es.js +14 -0
- package/dist/components/ui/table-page-layout.es.js.map +1 -0
- package/dist/components/ui/tooltip.es.js +9 -8
- package/dist/components/ui/tooltip.es.js.map +1 -1
- package/dist/index.es.d.ts +248 -2
- package/dist/index.es.js +247 -200
- package/dist/index.es.js.map +1 -1
- package/dist/utils/index.es.js +13 -8
- package/dist/utils/index.es.js.map +1 -1
- package/package.json +13 -3
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { intervalToDuration as i } from "date-fns";
|
|
2
|
+
import { convertCamelCaseToTitleCase as l } from "./string.es.js";
|
|
3
|
+
const m = [
|
|
4
|
+
"objectString",
|
|
5
|
+
"string",
|
|
6
|
+
"number",
|
|
7
|
+
"objectNumber",
|
|
8
|
+
"boolean",
|
|
9
|
+
"objectDate",
|
|
10
|
+
"licenseType",
|
|
11
|
+
"product",
|
|
12
|
+
"product-version",
|
|
13
|
+
"user",
|
|
14
|
+
"webhook",
|
|
15
|
+
"automated-email",
|
|
16
|
+
"organization",
|
|
17
|
+
"country",
|
|
18
|
+
"tag",
|
|
19
|
+
"resource",
|
|
20
|
+
"resourceId",
|
|
21
|
+
"reseller",
|
|
22
|
+
"role"
|
|
23
|
+
], p = {
|
|
24
|
+
createdAt: "objectDate",
|
|
25
|
+
updatedAt: "objectDate"
|
|
26
|
+
}, g = [
|
|
27
|
+
"eq",
|
|
28
|
+
"ne",
|
|
29
|
+
"cn",
|
|
30
|
+
"nc",
|
|
31
|
+
"sw",
|
|
32
|
+
"ew",
|
|
33
|
+
"in",
|
|
34
|
+
"nin",
|
|
35
|
+
"gt",
|
|
36
|
+
"gte",
|
|
37
|
+
"lt",
|
|
38
|
+
"lte"
|
|
39
|
+
], f = {
|
|
40
|
+
eq: "equal to",
|
|
41
|
+
ne: "not equal to",
|
|
42
|
+
cn: "contains",
|
|
43
|
+
nc: "does not contain",
|
|
44
|
+
sw: "starts with",
|
|
45
|
+
ew: "ends with",
|
|
46
|
+
in: "includes",
|
|
47
|
+
nin: "does not include",
|
|
48
|
+
gt: "greater than",
|
|
49
|
+
gte: "greater than or equal to",
|
|
50
|
+
lt: "less than",
|
|
51
|
+
lte: "less than or equal to"
|
|
52
|
+
}, h = {
|
|
53
|
+
objectString: ["eq", "ne", "cn", "nc", "sw", "ew", "in", "nin"],
|
|
54
|
+
objectDate: ["gt", "lt", "eq"],
|
|
55
|
+
objectNumber: ["eq", "ne", "gt", "gte", "lt", "lte"],
|
|
56
|
+
tag: ["in", "nin"],
|
|
57
|
+
string: ["eq"],
|
|
58
|
+
number: ["eq"],
|
|
59
|
+
boolean: ["eq"],
|
|
60
|
+
licenseType: ["in", "nin"],
|
|
61
|
+
product: ["in", "nin"],
|
|
62
|
+
"product-version": ["in", "nin"],
|
|
63
|
+
user: ["eq"],
|
|
64
|
+
reseller: ["eq"],
|
|
65
|
+
webhook: ["in", "nin"],
|
|
66
|
+
"automated-email": ["in", "nin"],
|
|
67
|
+
organization: ["eq"],
|
|
68
|
+
country: ["in", "nin"],
|
|
69
|
+
resource: ["in", "nin"],
|
|
70
|
+
resourceId: ["eq", "ne", "in", "nin"],
|
|
71
|
+
role: ["in", "nin"]
|
|
72
|
+
}, n = {
|
|
73
|
+
"product.displayName": "Product"
|
|
74
|
+
}, y = [
|
|
75
|
+
"access-token",
|
|
76
|
+
"account",
|
|
77
|
+
"activation",
|
|
78
|
+
"activation-log",
|
|
79
|
+
"admin-role",
|
|
80
|
+
"audit-log",
|
|
81
|
+
"automated-email",
|
|
82
|
+
"automated-email-event-log",
|
|
83
|
+
"card",
|
|
84
|
+
"feature-flag",
|
|
85
|
+
"invoice",
|
|
86
|
+
"license",
|
|
87
|
+
"license-template",
|
|
88
|
+
"maintenance-policy",
|
|
89
|
+
"organization",
|
|
90
|
+
"plan",
|
|
91
|
+
"product",
|
|
92
|
+
"product-version",
|
|
93
|
+
"profile",
|
|
94
|
+
"release",
|
|
95
|
+
"release-channel",
|
|
96
|
+
"release-file",
|
|
97
|
+
"release-platform",
|
|
98
|
+
"report",
|
|
99
|
+
"role",
|
|
100
|
+
"role-claim",
|
|
101
|
+
"saml-configuration",
|
|
102
|
+
"segment",
|
|
103
|
+
"sending-domain",
|
|
104
|
+
"setting",
|
|
105
|
+
"tag",
|
|
106
|
+
"team-member",
|
|
107
|
+
"trial",
|
|
108
|
+
"trial-policy",
|
|
109
|
+
"user",
|
|
110
|
+
"user-group",
|
|
111
|
+
"webhook",
|
|
112
|
+
"webhook-event-log",
|
|
113
|
+
"webhook-trigger",
|
|
114
|
+
"reseller",
|
|
115
|
+
"oidc-configuration",
|
|
116
|
+
"organization-claim",
|
|
117
|
+
"reseller-claim"
|
|
118
|
+
], A = {
|
|
119
|
+
account: "Your organization account.",
|
|
120
|
+
product: "Products are the software products you want to license",
|
|
121
|
+
license: "Licenses represent a purchase of your software. These can be linked to customers, and the license key is required to use the product.",
|
|
122
|
+
"access-token": "Access Tokens are used to authenticate your API requests.",
|
|
123
|
+
activation: "Activations, also known as devices/machines/seats are the devices consuming licenses.",
|
|
124
|
+
"activation-log": "Activation Log is a log entry of activation/deactivation of a particular license.",
|
|
125
|
+
trial: "Trial/Trial Activation is a device that has activated a trial of your product.",
|
|
126
|
+
"audit-log": "Audit logs contain all the changes made to your account.",
|
|
127
|
+
"automated-email": "Automated Email allow you to send marketing emails based on events on the linked product.",
|
|
128
|
+
"automated-email-event-log": "Automated email event log is the log of all the automated email events for your product.",
|
|
129
|
+
card: "The payment card for your account.",
|
|
130
|
+
"feature-flag": "Feature flags define features that make up tiers for your products.",
|
|
131
|
+
invoice: "",
|
|
132
|
+
"license-template": "License templates are a blueprint for the licenses you create for your customers and prevent repetition when creating licenses.",
|
|
133
|
+
"maintenance-policy": "Maintenance policies represent support contracts and can be linked to licenses.",
|
|
134
|
+
plan: "",
|
|
135
|
+
"product-version": "Product Versions are sets of Feature Flags that define the tiers of your products.",
|
|
136
|
+
"release-channel": "Release channel is the release channel for your product.",
|
|
137
|
+
"release-file": "Release files are files within your created releases.",
|
|
138
|
+
"release-platform": 'Release Platforms differentiate the target platform for your release. Common platforms include "Windows", "macOS", and "Linux".',
|
|
139
|
+
release: "Releases help you to manage different versions of your app, and secure distribute it to licensed users.",
|
|
140
|
+
report: "Analytics data for your account",
|
|
141
|
+
"role-claim": "",
|
|
142
|
+
role: "Roles define permissions for your team.",
|
|
143
|
+
"saml-configuration": "",
|
|
144
|
+
segment: "Sets of filters that can be saved to filter resources.",
|
|
145
|
+
"trial-policy": "Trial policies are templates for creating trials for your products.",
|
|
146
|
+
"webhook-event-log": "Webhook Event Logs are logs of events that have occured on webhooks.",
|
|
147
|
+
"webhook-trigger": "",
|
|
148
|
+
webhook: "Webhooks are HTTP callbacks which are triggered by specific events.",
|
|
149
|
+
organization: "",
|
|
150
|
+
profile: "",
|
|
151
|
+
setting: "",
|
|
152
|
+
tag: "Tags allow you to manage your licenses and customers on the dashboard.",
|
|
153
|
+
"team-member": "Team members can access the account based on their roles.",
|
|
154
|
+
user: "A user refers to your customer whom you want to license your product.",
|
|
155
|
+
"sending-domain": "Allows Cryptlex to send emails on your behalf using your From Email address",
|
|
156
|
+
"admin-role": "Roles that have type admin",
|
|
157
|
+
"user-group": "Groups of users that you can assign licenses to.",
|
|
158
|
+
reseller: "Resellers allow you to delegate user management to third parties or partners",
|
|
159
|
+
"oidc-configuration": "",
|
|
160
|
+
"organization-claim": "",
|
|
161
|
+
"reseller-claim": ""
|
|
162
|
+
}, r = {
|
|
163
|
+
id: "ID",
|
|
164
|
+
createdAt: "Creation Date",
|
|
165
|
+
scopes: "Permissions",
|
|
166
|
+
updatedAt: "Last Updated",
|
|
167
|
+
expiresAt: "Expiration Date",
|
|
168
|
+
lastSeenAt: "Last Seen",
|
|
169
|
+
os: "OS",
|
|
170
|
+
osVersion: "OS Version",
|
|
171
|
+
key: "License Key",
|
|
172
|
+
vmName: "VM Name",
|
|
173
|
+
container: "Container",
|
|
174
|
+
allowedIpRange: "Allowed IP Range",
|
|
175
|
+
allowedIpRanges: "Allowed IP Ranges",
|
|
176
|
+
allowedIpAddresses: "Allowed IP Addresses",
|
|
177
|
+
disallowedIpAddresses: "Disallowed IP Addresses",
|
|
178
|
+
allowVmActivation: "Allow VM Activation",
|
|
179
|
+
disableGeoLocation: "Disable Geolocation",
|
|
180
|
+
"user.id": "User ID",
|
|
181
|
+
userId: "User",
|
|
182
|
+
productId: "Product",
|
|
183
|
+
downloads: "Total Downloads",
|
|
184
|
+
claims: "Permissions",
|
|
185
|
+
googleSsoEnabled: "Google Login Enabled",
|
|
186
|
+
lastAttemptedAt: "Last Attempt Date",
|
|
187
|
+
url: "URL",
|
|
188
|
+
"trialPolicy.name": "Trial Policy Name",
|
|
189
|
+
"licensePolicy.name": "License Template Name",
|
|
190
|
+
licensePolicy: "License Template",
|
|
191
|
+
eventLog: "Audit Log",
|
|
192
|
+
cc: "CC Recepients",
|
|
193
|
+
bcc: "BCC Recepients",
|
|
194
|
+
ipAddress: "IP Address",
|
|
195
|
+
resellerId: "Reseller",
|
|
196
|
+
productVersionId: "Product Version",
|
|
197
|
+
releaseId: "Release",
|
|
198
|
+
maintenancePolicyId: "Maintenance Policy",
|
|
199
|
+
webhookId: "Webhook",
|
|
200
|
+
automatedEmailId: "Automated Email",
|
|
201
|
+
"location.countryName": "Country",
|
|
202
|
+
"location.ipAddress": "IP Address",
|
|
203
|
+
"location.countryCode": "Country",
|
|
204
|
+
organizationId: "Organization",
|
|
205
|
+
"address.country": "Country",
|
|
206
|
+
"address.addressLine1": "Address Line 1",
|
|
207
|
+
"address.addressLine2": "Address Line 2",
|
|
208
|
+
responseStatusCode: "HTTP Status Code",
|
|
209
|
+
resourceId: "Resource ID",
|
|
210
|
+
Sso: "SAML SSO 2.0",
|
|
211
|
+
"reseller.name": "Reseller",
|
|
212
|
+
sendingDomain: "Email Sending Domain"
|
|
213
|
+
};
|
|
214
|
+
function w(e, t) {
|
|
215
|
+
return t !== "admin-portal" && e in n ? n[e] : e in r ? r[e] : l(e);
|
|
216
|
+
}
|
|
217
|
+
function b(e) {
|
|
218
|
+
const t = e.expiresAt && new Date(e.expiresAt) < /* @__PURE__ */ new Date();
|
|
219
|
+
switch (!0) {
|
|
220
|
+
case (e.revoked && e.suspended && t):
|
|
221
|
+
return "Revoked, Suspended, Expired";
|
|
222
|
+
case (e.revoked && e.suspended):
|
|
223
|
+
return "Revoked, Suspended";
|
|
224
|
+
case (e.revoked && t):
|
|
225
|
+
return "Revoked, Expired";
|
|
226
|
+
case (e.suspended && t):
|
|
227
|
+
return "Suspended, Expired";
|
|
228
|
+
case e.suspended:
|
|
229
|
+
return "Suspended";
|
|
230
|
+
case e.revoked:
|
|
231
|
+
return "Revoked";
|
|
232
|
+
case t:
|
|
233
|
+
return "Expired";
|
|
234
|
+
default:
|
|
235
|
+
return "Active";
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function v(e) {
|
|
239
|
+
return e === 0 || !e ? "Lifetime" : c(e);
|
|
240
|
+
}
|
|
241
|
+
function c(e) {
|
|
242
|
+
const t = i({
|
|
243
|
+
start: 0,
|
|
244
|
+
end: e * 1e3
|
|
245
|
+
});
|
|
246
|
+
return [
|
|
247
|
+
t.years && `${t.years}y`,
|
|
248
|
+
t.months && `${t.months}m`,
|
|
249
|
+
t.days && `${t.days}d`,
|
|
250
|
+
t.hours && `${t.hours}h`
|
|
251
|
+
].filter(Boolean).join(" ").trim();
|
|
252
|
+
}
|
|
253
|
+
function R(e, t) {
|
|
254
|
+
const a = t.toString().split(".");
|
|
255
|
+
let o = e;
|
|
256
|
+
for (const s of a)
|
|
257
|
+
o = o == null ? void 0 : o[s];
|
|
258
|
+
return o;
|
|
259
|
+
}
|
|
260
|
+
export {
|
|
261
|
+
f as COMPARISON_OPERATOR_LABELS,
|
|
262
|
+
p as DEFAULT_FILTERABLE_FIELDS,
|
|
263
|
+
m as FILTERABLE_PROPERTY_TYPES,
|
|
264
|
+
g as FILTER_COMPARISON_OPERATORS,
|
|
265
|
+
h as OPERATORS_FOR_FILTER_TYPE,
|
|
266
|
+
A as RESOURCE_DEFINITIONS,
|
|
267
|
+
y as RESOURCE_NAMES,
|
|
268
|
+
b as getLicenseStatus,
|
|
269
|
+
w as getResourceDisplayName,
|
|
270
|
+
v as getValidityDisplay,
|
|
271
|
+
R as getValueFromData,
|
|
272
|
+
c as secondsToDuration
|
|
273
|
+
};
|
|
274
|
+
//# sourceMappingURL=constants.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.es.js","sources":["../../../../lib/components/data-table/table-utils/constants.ts"],"sourcesContent":["import { intervalToDuration } from 'date-fns';\nimport { convertCamelCaseToTitleCase } from './string';\n\nexport const FILTERABLE_PROPERTY_TYPES = [\n 'objectString',\n 'string',\n 'number',\n 'objectNumber',\n 'boolean',\n 'objectDate',\n 'licenseType',\n 'product',\n 'product-version',\n 'user',\n 'webhook',\n 'automated-email',\n 'organization',\n 'country',\n 'tag',\n 'resource',\n 'resourceId',\n 'reseller',\n 'role',\n] as const;\nexport type FilterablePropertyType = (typeof FILTERABLE_PROPERTY_TYPES)[number];\nexport type FilterableProperties = {\n [filterProperty: string]: FilterablePropertyType;\n};\n\nexport const DEFAULT_FILTERABLE_FIELDS: FilterableProperties = {\n createdAt: 'objectDate',\n updatedAt: 'objectDate',\n};\nexport const FILTER_COMPARISON_OPERATORS = [\n 'eq',\n 'ne',\n 'cn',\n 'nc',\n 'sw',\n 'ew',\n 'in',\n 'nin',\n 'gt',\n 'gte',\n 'lt',\n 'lte',\n] as const;\nexport type FilterComparisonOperator = (typeof FILTER_COMPARISON_OPERATORS)[number];\nexport type OperatorsForFilterType = Record<FilterablePropertyType, FilterComparisonOperator[]>;\nexport const COMPARISON_OPERATOR_LABELS: Record<FilterComparisonOperator, string> = {\n eq: 'equal to',\n ne: 'not equal to',\n cn: 'contains',\n nc: 'does not contain',\n sw: 'starts with',\n ew: 'ends with',\n in: 'includes',\n nin: 'does not include',\n gt: 'greater than',\n gte: 'greater than or equal to',\n lt: 'less than',\n lte: 'less than or equal to',\n};\n\nexport const OPERATORS_FOR_FILTER_TYPE: OperatorsForFilterType = {\n 'objectString': ['eq', 'ne', 'cn', 'nc', 'sw', 'ew', 'in', 'nin'],\n 'objectDate': ['gt', 'lt', 'eq'],\n 'objectNumber': ['eq', 'ne', 'gt', 'gte', 'lt', 'lte'],\n 'tag': ['in', 'nin'],\n 'string': ['eq'],\n 'number': ['eq'],\n 'boolean': ['eq'],\n 'licenseType': ['in', 'nin'],\n 'product': ['in', 'nin'],\n 'product-version': ['in', 'nin'],\n 'user': ['eq'],\n 'reseller': ['eq'],\n 'webhook': ['in', 'nin'],\n 'automated-email': ['in', 'nin'],\n 'organization': ['eq'],\n 'country': ['in', 'nin'],\n 'resource': ['in', 'nin'],\n 'resourceId': ['eq', 'ne', 'in', 'nin'],\n 'role': ['in', 'nin'],\n};\n\n/** Application Names */\nexport type CtxProjectName =\n | 'admin-portal'\n | 'customer-portal'\n | 'internal-portal'\n | 'reseller-portal';\n// Display names specific to customer and reseller portal\nconst OTHER_PORTALS_DISPLAY_NAME: Record<string, string> = {\n 'product.displayName': 'Product',\n};\n\n/** Resource Name should ALWAYS be in singular form */\nexport const RESOURCE_NAMES = [\n 'access-token',\n 'account',\n 'activation',\n 'activation-log',\n 'admin-role',\n 'audit-log',\n 'automated-email',\n 'automated-email-event-log',\n 'card',\n 'feature-flag',\n 'invoice',\n 'license',\n 'license-template',\n 'maintenance-policy',\n 'organization',\n 'plan',\n 'product',\n 'product-version',\n 'profile',\n 'release',\n 'release-channel',\n 'release-file',\n 'release-platform',\n 'report',\n 'role',\n 'role-claim',\n 'saml-configuration',\n 'segment',\n 'sending-domain',\n 'setting',\n 'tag',\n 'team-member',\n 'trial',\n 'trial-policy',\n 'user',\n 'user-group',\n 'webhook',\n 'webhook-event-log',\n 'webhook-trigger',\n 'reseller',\n 'oidc-configuration',\n 'organization-claim',\n 'reseller-claim',\n] as const;\nexport type ResourceName = (typeof RESOURCE_NAMES)[number];\nexport const RESOURCE_DEFINITIONS: Record<ResourceName, string> = {\n 'account': 'Your organization account.',\n 'product': 'Products are the software products you want to license',\n 'license':\n 'Licenses represent a purchase of your software. These can be linked to customers, and the license key is required to use the product.',\n 'access-token': 'Access Tokens are used to authenticate your API requests.',\n 'activation':\n 'Activations, also known as devices/machines/seats are the devices consuming licenses.',\n 'activation-log':\n 'Activation Log is a log entry of activation/deactivation of a particular license.',\n 'trial': 'Trial/Trial Activation is a device that has activated a trial of your product.',\n 'audit-log': 'Audit logs contain all the changes made to your account.',\n 'automated-email':\n 'Automated Email allow you to send marketing emails based on events on the linked product.',\n 'automated-email-event-log':\n 'Automated email event log is the log of all the automated email events for your product.',\n 'card': 'The payment card for your account.',\n 'feature-flag': 'Feature flags define features that make up tiers for your products.',\n 'invoice': '',\n 'license-template':\n 'License templates are a blueprint for the licenses you create for your customers and prevent repetition when creating licenses.',\n 'maintenance-policy':\n 'Maintenance policies represent support contracts and can be linked to licenses.',\n 'plan': '',\n 'product-version':\n 'Product Versions are sets of Feature Flags that define the tiers of your products.',\n 'release-channel': 'Release channel is the release channel for your product.',\n 'release-file': 'Release files are files within your created releases.',\n 'release-platform':\n 'Release Platforms differentiate the target platform for your release. Common platforms include \"Windows\", \"macOS\", and \"Linux\".',\n 'release':\n 'Releases help you to manage different versions of your app, and secure distribute it to licensed users.',\n 'report': 'Analytics data for your account',\n 'role-claim': '',\n 'role': 'Roles define permissions for your team.',\n 'saml-configuration': '',\n 'segment': 'Sets of filters that can be saved to filter resources.',\n 'trial-policy': 'Trial policies are templates for creating trials for your products.',\n 'webhook-event-log': 'Webhook Event Logs are logs of events that have occured on webhooks.',\n 'webhook-trigger': '',\n 'webhook': 'Webhooks are HTTP callbacks which are triggered by specific events.',\n 'organization': '',\n 'profile': '',\n 'setting': '',\n 'tag': 'Tags allow you to manage your licenses and customers on the dashboard.',\n 'team-member': 'Team members can access the account based on their roles.',\n 'user': 'A user refers to your customer whom you want to license your product.',\n 'sending-domain': 'Allows Cryptlex to send emails on your behalf using your From Email address',\n 'admin-role': 'Roles that have type admin',\n 'user-group': 'Groups of users that you can assign licenses to.',\n 'reseller': 'Resellers allow you to delegate user management to third parties or partners',\n 'oidc-configuration': '',\n 'organization-claim': '',\n 'reseller-claim': '',\n};\n\nconst RESOURCE_DISPLAY_NAMES: Record<string, string> = {\n 'id': 'ID',\n 'createdAt': 'Creation Date',\n 'scopes': 'Permissions',\n 'updatedAt': 'Last Updated',\n 'expiresAt': 'Expiration Date',\n 'lastSeenAt': 'Last Seen',\n 'os': 'OS',\n 'osVersion': 'OS Version',\n 'key': 'License Key',\n 'vmName': 'VM Name',\n 'container': 'Container',\n 'allowedIpRange': 'Allowed IP Range',\n 'allowedIpRanges': 'Allowed IP Ranges',\n 'allowedIpAddresses': 'Allowed IP Addresses',\n 'disallowedIpAddresses': 'Disallowed IP Addresses',\n 'allowVmActivation': 'Allow VM Activation',\n 'disableGeoLocation': 'Disable Geolocation',\n 'user.id': 'User ID',\n 'userId': 'User',\n 'productId': 'Product',\n 'downloads': 'Total Downloads',\n 'claims': 'Permissions',\n 'googleSsoEnabled': 'Google Login Enabled',\n 'lastAttemptedAt': 'Last Attempt Date',\n 'url': 'URL',\n 'trialPolicy.name': 'Trial Policy Name',\n 'licensePolicy.name': 'License Template Name',\n 'licensePolicy': 'License Template',\n 'eventLog': 'Audit Log',\n 'cc': 'CC Recepients',\n 'bcc': 'BCC Recepients',\n 'ipAddress': 'IP Address',\n 'resellerId': 'Reseller',\n 'productVersionId': 'Product Version',\n 'releaseId': 'Release',\n 'maintenancePolicyId': 'Maintenance Policy',\n 'webhookId': 'Webhook',\n 'automatedEmailId': 'Automated Email',\n 'location.countryName': 'Country',\n 'location.ipAddress': 'IP Address',\n 'location.countryCode': 'Country',\n 'organizationId': 'Organization',\n 'address.country': 'Country',\n 'address.addressLine1': 'Address Line 1',\n 'address.addressLine2': 'Address Line 2',\n 'responseStatusCode': 'HTTP Status Code',\n 'resourceId': 'Resource ID',\n 'Sso': 'SAML SSO 2.0',\n 'reseller.name': 'Reseller',\n 'sendingDomain': 'Email Sending Domain',\n};\nexport function getResourceDisplayName(resourceName: string, portal: CtxProjectName) {\n if (portal !== 'admin-portal' && resourceName in OTHER_PORTALS_DISPLAY_NAME) {\n return OTHER_PORTALS_DISPLAY_NAME[resourceName];\n } else if (resourceName in RESOURCE_DISPLAY_NAMES) {\n return RESOURCE_DISPLAY_NAMES[resourceName];\n } else {\n return convertCamelCaseToTitleCase(resourceName);\n }\n}\n\n/**\n * Format multiple license parameters (expired, suspended, revoked) into a single status\n */\nexport function getLicenseStatus(license: any): string {\n const licenseExpired = license.expiresAt && new Date(license.expiresAt) < new Date();\n // Status Column\n switch (true) {\n case license.revoked && license.suspended && licenseExpired:\n return 'Revoked, Suspended, Expired';\n case license.revoked && license.suspended:\n return 'Revoked, Suspended';\n case license.revoked && licenseExpired:\n return 'Revoked, Expired';\n case license.suspended && licenseExpired:\n return 'Suspended, Expired';\n case license.suspended:\n return 'Suspended';\n case license.revoked:\n return 'Revoked';\n case licenseExpired:\n return 'Expired';\n default:\n return 'Active';\n }\n}\n\nexport function getValidityDisplay(validity: number | undefined) {\n if (validity === 0 || !validity) {\n return 'Lifetime';\n } else {\n return secondsToDuration(validity);\n }\n}\nexport function secondsToDuration(seconds: number): string {\n const duration = intervalToDuration({\n start: 0,\n end: seconds * 1000,\n });\n\n const parts = [\n duration.years && `${duration.years}y`,\n duration.months && `${duration.months}m`,\n duration.days && `${duration.days}d`,\n duration.hours && `${duration.hours}h`,\n ];\n\n // Filter out undefined values and join\n return parts.filter(Boolean).join(' ').trim();\n}\n\nexport function getValueFromData(data: any, accessor: string | number | symbol) {\n const accessors = accessor.toString().split('.');\n let value = data;\n for (const acc of accessors) {\n value = value?.[acc];\n }\n return value;\n}\n"],"names":["FILTERABLE_PROPERTY_TYPES","DEFAULT_FILTERABLE_FIELDS","FILTER_COMPARISON_OPERATORS","COMPARISON_OPERATOR_LABELS","OPERATORS_FOR_FILTER_TYPE","OTHER_PORTALS_DISPLAY_NAME","RESOURCE_NAMES","RESOURCE_DEFINITIONS","RESOURCE_DISPLAY_NAMES","getResourceDisplayName","resourceName","portal","convertCamelCaseToTitleCase","getLicenseStatus","license","licenseExpired","getValidityDisplay","validity","secondsToDuration","seconds","duration","intervalToDuration","getValueFromData","data","accessor","accessors","value","acc"],"mappings":";;AAGO,MAAMA,IAA4B;AAAA,E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AA,gBAAAA,EAAQC;AAEX,SAAAD;AACT;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { merge as d } from "lodash-es";
|
|
2
|
+
function f(e, n, a) {
|
|
3
|
+
return async (t, o, u, s) => {
|
|
4
|
+
const c = {
|
|
5
|
+
params: {
|
|
6
|
+
query: {
|
|
7
|
+
page: t.pageIndex + 1,
|
|
8
|
+
limit: t.pageSize,
|
|
9
|
+
sort: p(o[0]),
|
|
10
|
+
query: u,
|
|
11
|
+
...s
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}, i = d(c, a);
|
|
15
|
+
return e.GET(n, i).then((r) => ({ total: parseInt(r.response.headers.get("Pagination-Count") || "0"), data: r.data }));
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function p(e) {
|
|
19
|
+
return e ? e.desc ? `-${e.id}` : `+${e.id}` : "-createdAt";
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
f as createTableFetchFn
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=createTableFetchFn.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTableFetchFn.es.js","sources":["../../../../lib/components/data-table/table-utils/createTableFetchFn.ts"],"sourcesContent":["import type { paths } from '@cryptlex/web-api-types';\nimport { merge } from 'lodash-es';\nimport createClient, { ParamsOption } from 'openapi-fetch';\nimport { type TableFetchFn } from './types';\n\ninterface Params {\n query: Record<string, string | number | boolean | Record<string, string | number | boolean>>;\n}\n\ntype Client = ReturnType<typeof createClient<paths>>;\n\n// Helper type to extract valid GET paths\ntype GetPaths = {\n [P in keyof paths]: paths[P] extends { get: any } ? P : never;\n}[keyof paths];\n\nexport function createTableFetchFn<_any, Return>(\n ctxclient: Client,\n path: GetPaths,\n // TODO: Use generic type instead\n params?: ParamsOption<any>,\n): TableFetchFn<Return> {\n return async (pagination, sorting, searching, filtering) => {\n const ab: { params: Params } = {\n params: {\n query: {\n page: pagination.pageIndex + 1,\n limit: pagination.pageSize,\n sort: generateSortParam(sorting[0]),\n query: searching,\n ...filtering,\n },\n },\n };\n\n const pathParams = merge(ab, params) as { params: Params };\n\n return ctxclient.GET(path, pathParams).then((value) => {\n const rowCount = parseInt(value.response.headers.get('Pagination-Count') || '0');\n return { total: rowCount, data: value.data };\n });\n };\n}\n\nfunction generateSortParam(sort: { id: string; desc: boolean } | undefined): string {\n if (sort) {\n if (sort.desc) {\n return `-${sort.id}`;\n } else {\n return `+${sort.id}`;\n }\n } else {\n return '-createdAt';\n }\n}\n"],"names":["createTableFetchFn","ctxclient","path","params","pagination","sorting","searching","filtering","ab","generateSortParam","pathParams","merge","value","sort"],"mappings":";AAgBgB,SAAAA,EACdC,GACAC,GAEAC,GACsB;AACtB,SAAO,OAAOC,GAAYC,GAASC,GAAWC,MAAc;AAC1D,UAAMC,IAAyB;AAAA,MAC7B,QAAQ;AAAA,QACN,OAAO;AAAA,UACL,MAAMJ,EAAW,YAAY;AAAA,UAC7B,OAAOA,EAAW;AAAA,UAClB,MAAMK,EAAkBJ,EAAQ,CAAC,CAAC;AAAA,UAClC,OAAOC;AAAA,UACP,GAAGC;AAAA,QAAA;AAAA,MACL;AAAA,IAEJ,GAEMG,IAAaC,EAAMH,GAAIL,CAAM;AAEnC,WAAOF,EAAU,IAAIC,GAAMQ,CAAU,EAAE,KAAK,CAACE,OAEpC,EAAE,OADQ,SAASA,EAAM,SAAS,QAAQ,IAAI,kBAAkB,KAAK,GAAG,GACrD,MAAMA,EAAM,KAAK,EAC5C;AAAA,EACH;AACF;AAEA,SAASH,EAAkBI,GAAyD;AAClF,SAAIA,IACEA,EAAK,OACA,IAAIA,EAAK,EAAE,KAEX,IAAIA,EAAK,EAAE,KAGb;AAEX;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.es.js","sources":["../../../../lib/components/data-table/table-utils/date.ts"],"sourcesContent":["export function FormatDate(date: string | null | undefined) {\n if (!date) return null;\n const _date = new Date(date);\n return new Intl.DateTimeFormat(undefined, {\n dateStyle: 'medium',\n timeStyle: 'short',\n }).format(_date);\n}\n"],"names":["FormatDate","date","_date"],"mappings":"AAAO,SAASA,EAAWC,GAAiC;AACtD,MAAA,CAACA,EAAa,QAAA;AACZ,QAAAC,IAAQ,IAAI,KAAKD,CAAI;AACpB,SAAA,IAAI,KAAK,eAAe,QAAW;AAAA,IACxC,WAAW;AAAA,IACX,WAAW;AAAA,EAAA,CACZ,EAAE,OAAOC,CAAK;AACjB;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Link as i } from "@tanstack/react-router";
|
|
3
|
+
function a(t, r, e) {
|
|
4
|
+
const n = {
|
|
5
|
+
key: "",
|
|
6
|
+
stateData: e
|
|
7
|
+
};
|
|
8
|
+
return /* @__PURE__ */ o(
|
|
9
|
+
i,
|
|
10
|
+
{
|
|
11
|
+
to: `/${r}`,
|
|
12
|
+
state: n,
|
|
13
|
+
className: "text-primary underline font-bold",
|
|
14
|
+
children: t
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
a as getLinkDisplay
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=link-display.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-display.es.js","sources":["../../../../lib/components/data-table/table-utils/link-display.tsx"],"sourcesContent":["import { Link } from '@tanstack/react-router';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n/**\n * This helps in passing the state data from one page to another, showing different text for a link\n * @param display String that needs to be displayed\n * @param url actual url for the a tag\n * @param stateData data to be passed to the next page\n * @returns\n */\nexport function getLinkDisplay(display: string, url: string, stateData?: any) {\n // including key, because the state overwrites the key in the state.\n const state = {\n key: '',\n stateData,\n };\n\n return (\n <Link\n to={`/${url}`}\n state={state} // Spread the row object to preserve its key\n className=\"text-primary underline font-bold\"\n >\n {display}\n </Link>\n );\n}\n"],"names":["getLinkDisplay","display","url","stateData","state","jsx","Link"],"mappings":";;AAUgB,SAAAA,EAAeC,GAAiBC,GAAaC,GAAiB;AAE5E,QAAMC,IAAQ;AAAA,IACZ,KAAK;AAAA,IACL,WAAAD;AAAA,EACF;AAGE,SAAA,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI,IAAIJ,CAAG;AAAA,MACX,OAAAE;AAAA,MACA,WAAU;AAAA,MAET,UAAAH;AAAA,IAAA;AAAA,EACH;AAEJ;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function a(e) {
|
|
2
|
+
return e.replace(/([A-Z])/g, " $1").trim().split(" ").map((t) => t.charAt(0).toUpperCase() + t.slice(1).toLowerCase()).join(" ");
|
|
3
|
+
}
|
|
4
|
+
function n(e, t) {
|
|
5
|
+
return t > 1 ? /y$/.test(e) ? e === "Day" ? "Days" : e.replace(/y$/, "ies") : e.concat("s") : e;
|
|
6
|
+
}
|
|
7
|
+
function c(e) {
|
|
8
|
+
if (e) {
|
|
9
|
+
const t = e.replace(/([A-Z])/g, " $1");
|
|
10
|
+
return t.charAt(0).toUpperCase().concat(t.slice(1)).replace(/\.[a-z]/, (r) => r.replace(".", " ").toUpperCase());
|
|
11
|
+
} else
|
|
12
|
+
return e;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
c as convertCamelCaseToTitleCase,
|
|
16
|
+
a as convertToTitleCase,
|
|
17
|
+
n as pluralizeTimes
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=string.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.es.js","sources":["../../../../lib/components/data-table/table-utils/string.ts"],"sourcesContent":["/**\n *\n * @param input camelCase\n * @returns title case for the camelCase string\n */\nexport function convertToTitleCase(input: string): string {\n return input\n .replace(/([A-Z])/g, ' $1') // Insert space before capital letters\n .trim() // Remove any leading/trailing spaces\n .split(' ') // Split into words\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) // Capitalize each word\n .join(' '); // Join back into a single string\n}\nexport function pluralizeTimes(resourceName: string, count: number) {\n if (count > 1) {\n if (/y$/.test(resourceName)) {\n if (resourceName === 'Day') return 'Days';\n return resourceName.replace(/y$/, 'ies');\n } else {\n return resourceName.concat('s');\n }\n } else return resourceName;\n}\n\n/**\n * Converts a string from 'camelCase' to 'Title Case'\n * @param string String to convert to `Title Case`\n */\nexport function convertCamelCaseToTitleCase(string: string) {\n if (string) {\n const spacedString = string.replace(/([A-Z])/g, ' $1');\n return spacedString\n .charAt(0)\n .toUpperCase()\n .concat(spacedString.slice(1))\n .replace(/\\.[a-z]/, (substr: string) => {\n return substr.replace('.', ' ').toUpperCase();\n });\n } else {\n return string;\n }\n}\n"],"names":["convertToTitleCase","input","word","pluralizeTimes","resourceName","count","convertCamelCaseToTitleCase","string","spacedString","substr"],"mappings":"AAKO,SAASA,EAAmBC,GAAuB;AACjD,SAAAA,EACJ,QAAQ,YAAY,KAAK,EACzB,KAAK,EACL,MAAM,GAAG,EACT,IAAI,CAACC,MAASA,EAAK,OAAO,CAAC,EAAE,YAAY,IAAIA,EAAK,MAAM,CAAC,EAAE,YAAY,CAAC,EACxE,KAAK,GAAG;AACb;AACgB,SAAAC,EAAeC,GAAsBC,GAAe;AAClE,SAAIA,IAAQ,IACN,KAAK,KAAKD,CAAY,IACpBA,MAAiB,QAAc,SAC5BA,EAAa,QAAQ,MAAM,KAAK,IAEhCA,EAAa,OAAO,GAAG,IAEpBA;AAChB;AAMO,SAASE,EAA4BC,GAAgB;AAC1D,MAAIA,GAAQ;AACV,UAAMC,IAAeD,EAAO,QAAQ,YAAY,KAAK;AACrD,WAAOC,EACJ,OAAO,CAAC,EACR,YACA,EAAA,OAAOA,EAAa,MAAM,CAAC,CAAC,EAC5B,QAAQ,WAAW,CAACC,MACZA,EAAO,QAAQ,KAAK,GAAG,EAAE,YAAY,CAC7C;AAAA,EAAA;AAEI,WAAAF;AAEX;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.es.js","sources":["../../../../lib/components/data-table/table-utils/types.ts"],"sourcesContent":["import { components } from '@cryptlex/web-api-types';\nimport { PaginationState, SortingState } from '@tanstack/react-table';\n// export type RoutePath = RoutePaths<typeof routeTree>;\nexport type fieldsToDisplay = {\n display: string;\n accessor: string;\n};\n[];\nexport enum DYNAMIC_INPUT_TARGET {\n USER,\n ORGANIZATION,\n RESELLER,\n}\nexport type VisibilityState<T> = {\n [K in keyof T]?: boolean;\n};\nexport type TableActions = {\n /** True if reading this resource is allowed. */\n read: boolean;\n\n /** True if creation of resource from dashboard is allowed. */\n create: boolean;\n\n /** True if the resource can be updated */\n update: boolean;\n\n /** True if the resource can be deleted */\n delete: boolean;\n\n /** True if the resource can be exported */\n export: boolean;\n\n /** True if the resource can be linked to tags. */\n tag: boolean;\n\n /** True if searching is supported. Search is defined by the `query` QueryParameter in the Web API */\n search: boolean;\n\n /** True if selection using checkboxes is allowed */\n selection: boolean;\n\n /** True if the resource has support for segments */\n segments: boolean;\n};\n\nexport type MetadataDto = components['schemas']['MetadataDto'];\n\nexport type TableFetchFn<TData> = (\n p: PaginationState,\n s: SortingState,\n q: string,\n f: any,\n) => Promise<{\n total: number;\n data: TData[] | undefined;\n}>;\n/*** Type for hide some of the columns based on the dto of the particular page\n ** `id`, `updatedAt` are by default hidden\n */\nexport type DefaultVisibilityState<T> = {\n [K in keyof T]?: boolean;\n};\n"],"names":["DYNAMIC_INPUT_TARGET","DYNAMIC_INPUT_TARGET2"],"mappings":"AAQY,IAAAA,sBAAAA,OACVA,EAAAC,EAAA,OAAA,CAAA,IAAA,QACAD,EAAAC,EAAA,eAAA,CAAA,IAAA,gBACAD,EAAAC,EAAA,WAAA,CAAA,IAAA,YAHUD,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { Badge as n } from "../ui/badge.es.js";
|
|
3
|
+
import "../ui/accordion.es.js";
|
|
4
|
+
import "../ui/avatar.es.js";
|
|
5
|
+
import "../ui/breadcrumb.es.js";
|
|
6
|
+
import "../ui/button.es.js";
|
|
7
|
+
import "../ui/calendar.es.js";
|
|
8
|
+
import { Card as c, CardHeader as d, CardTitle as f, CardContent as x } from "../ui/card.es.js";
|
|
9
|
+
import "../ui/chart.es.js";
|
|
10
|
+
import "../ui/checkbox.es.js";
|
|
11
|
+
import "@radix-ui/react-collapsible";
|
|
12
|
+
import "../ui/command.es.js";
|
|
13
|
+
import "../ui/dialog.es.js";
|
|
14
|
+
import "../ui/drawer.es.js";
|
|
15
|
+
import "../ui/dropdown-menu.es.js";
|
|
16
|
+
import "../ui/form.es.js";
|
|
17
|
+
import "../ui/input.es.js";
|
|
18
|
+
import "../ui/input-otp.es.js";
|
|
19
|
+
import "../ui/label.es.js";
|
|
20
|
+
import "lucide-react";
|
|
21
|
+
import "../ui/mutli-select.es.js";
|
|
22
|
+
import "../ui/navigation-menu.es.js";
|
|
23
|
+
import "../ui/pagination.es.js";
|
|
24
|
+
import "../ui/password-input.es.js";
|
|
25
|
+
import "../ui/popover.es.js";
|
|
26
|
+
import "../ui/radio-group.es.js";
|
|
27
|
+
import "react";
|
|
28
|
+
import "../ui/select.es.js";
|
|
29
|
+
import "../ui/separator.es.js";
|
|
30
|
+
import "../ui/sheet.es.js";
|
|
31
|
+
import "../ui/sidebar.es.js";
|
|
32
|
+
import { Skeleton as u } from "../ui/skeleton.es.js";
|
|
33
|
+
import "sonner";
|
|
34
|
+
import "../ui/table.es.js";
|
|
35
|
+
import "../ui/tabs.es.js";
|
|
36
|
+
import "../ui/tooltip.es.js";
|
|
37
|
+
const Z = ({ data: p, label: s, fields: e }) => {
|
|
38
|
+
const l = (r, t) => {
|
|
39
|
+
if (r.transform)
|
|
40
|
+
return r.transform(t);
|
|
41
|
+
switch (r.type) {
|
|
42
|
+
case "badge":
|
|
43
|
+
return /* @__PURE__ */ o("div", { className: "flex flex-wrap gap-1", children: Array.isArray(t) ? t.map((i, m) => /* @__PURE__ */ o(n, { variant: "secondary", children: typeof i == "object" ? i.name || i.id : i }, m)) : t });
|
|
44
|
+
case "boolean":
|
|
45
|
+
return t.toString();
|
|
46
|
+
default:
|
|
47
|
+
return t ?? "";
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return /* @__PURE__ */ a(c, { children: [
|
|
51
|
+
/* @__PURE__ */ o(d, { children: /* @__PURE__ */ o(f, { children: s }) }),
|
|
52
|
+
/* @__PURE__ */ o(x, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-1", children: p ? e.map((r) => {
|
|
53
|
+
const t = r.accessor ? r.accessor.split(".").reduce((i, m) => i == null ? void 0 : i[m], p) : null;
|
|
54
|
+
return /* @__PURE__ */ a(
|
|
55
|
+
"div",
|
|
56
|
+
{
|
|
57
|
+
className: "flex w-full flex-col md:flex-row justify-between first:pt-0 last:pb-0",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ o("p", { className: "text-sm flex w-full justify-start font-semibold text-muted-foreground col-span-1", children: r.display }),
|
|
60
|
+
/* @__PURE__ */ o("div", { className: "text-sm flex w-full justify-start text-wrap", children: l(r, t) })
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
r.display
|
|
64
|
+
);
|
|
65
|
+
}) : e.map((r, t) => /* @__PURE__ */ o(u, { className: "h-12 w-full" }, t)) }) })
|
|
66
|
+
] });
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
Z as InfoCard
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=info-card.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info-card.es.js","sources":["../../../lib/components/info-card/info-card.tsx"],"sourcesContent":["import { Badge } from '@/components/ui/badge';\nimport { Card, CardContent, CardHeader, CardTitle, Skeleton } from '@/index';\n\nexport type DisplayField = {\n display: string;\n accessor: string;\n type?: 'text' | 'badge' | 'boolean';\n transform?: (value: any) => React.ReactNode;\n};\n\nexport interface InfoCardProps {\n data: Record<string, any>;\n label: string;\n fields: DisplayField[];\n className?: string;\n}\n\nexport const InfoCard: React.FC<InfoCardProps> = ({ data, label, fields }) => {\n const renderValue = (field: DisplayField, value: any) => {\n // Custom transform if provided\n if (field.transform) {\n return field.transform(value);\n }\n\n // Handle specific types\n switch (field.type) {\n case 'badge':\n return (\n <div className=\"flex flex-wrap gap-1\">\n {Array.isArray(value)\n ? value.map((item, index) => (\n <Badge key={index} variant=\"secondary\">\n {typeof item === 'object' ? item.name || item.id : item}\n </Badge>\n ))\n : value}\n </div>\n );\n\n case 'boolean':\n return value.toString();\n default:\n return value ?? '';\n }\n };\n\n return (\n <Card>\n <CardHeader>\n <CardTitle>{label}</CardTitle>\n </CardHeader>\n <CardContent>\n <div className=\"flex flex-col gap-1\">\n {data\n ? fields.map((field) => {\n const value = field.accessor\n ? field.accessor.split('.').reduce((obj, key) => obj?.[key], data)\n : null;\n\n return (\n <div\n key={field.display}\n className=\"flex w-full flex-col md:flex-row justify-between first:pt-0 last:pb-0\"\n >\n <p className=\"text-sm flex w-full justify-start font-semibold text-muted-foreground col-span-1\">\n {field.display}\n </p>\n <div className=\"text-sm flex w-full justify-start text-wrap\">\n {renderValue(field, value)}\n </div>\n </div>\n );\n })\n : fields.map((_, index) => <Skeleton key={index} className=\"h-12 w-full\" />)}\n </div>\n </CardContent>\n </Card>\n );\n};\n"],"names":["InfoCard","data","label","fields","renderValue","field","value","jsx","item","index","Badge","Card","CardHeader","CardTitle","CardContent","obj","key","jsxs","_","Skeleton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBO,MAAMA,IAAoC,CAAC,EAAE,MAAAC,GAAM,OAAAC,GAAO,QAAAC,QAAa;AACtE,QAAAC,IAAc,CAACC,GAAqBC,MAAe;AAEvD,QAAID,EAAM;AACD,aAAAA,EAAM,UAAUC,CAAK;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83 @@
|
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { SideBar as p } from "./sidebar.es.js";
|
|
3
|
+
import { SidebarProvider as l, SidebarTrigger as c } from "../ui/sidebar.es.js";
|
|
4
|
+
import "../ui/accordion.es.js";
|
|
5
|
+
import { Avatar as a, AvatarImage as n, AvatarFallback as d } from "../ui/avatar.es.js";
|
|
6
|
+
import "../ui/badge.es.js";
|
|
7
|
+
import "../ui/breadcrumb.es.js";
|
|
8
|
+
import { Button as s } from "../ui/button.es.js";
|
|
9
|
+
import "../ui/calendar.es.js";
|
|
10
|
+
import "../ui/card.es.js";
|
|
11
|
+
import "../ui/chart.es.js";
|
|
12
|
+
import "../ui/checkbox.es.js";
|
|
13
|
+
import "@radix-ui/react-collapsible";
|
|
14
|
+
import "../ui/command.es.js";
|
|
15
|
+
import "../ui/dialog.es.js";
|
|
16
|
+
import "../ui/drawer.es.js";
|
|
17
|
+
import { DropdownMenu as h, DropdownMenuTrigger as f, DropdownMenuContent as g, DropdownMenuItem as v } from "../ui/dropdown-menu.es.js";
|
|
18
|
+
import "../ui/form.es.js";
|
|
19
|
+
import "../ui/input.es.js";
|
|
20
|
+
import "../ui/input-otp.es.js";
|
|
21
|
+
import "../ui/label.es.js";
|
|
22
|
+
import { logout as x } from "../../utils/index.es.js";
|
|
23
|
+
import { LogOut as N } from "lucide-react";
|
|
24
|
+
import "../ui/mutli-select.es.js";
|
|
25
|
+
import "../ui/navigation-menu.es.js";
|
|
26
|
+
import "../ui/pagination.es.js";
|
|
27
|
+
import "../ui/password-input.es.js";
|
|
28
|
+
import "../ui/popover.es.js";
|
|
29
|
+
import "../ui/radio-group.es.js";
|
|
30
|
+
import "react";
|
|
31
|
+
import "../ui/select.es.js";
|
|
32
|
+
import "../ui/separator.es.js";
|
|
33
|
+
import "../ui/sheet.es.js";
|
|
34
|
+
import "sonner";
|
|
35
|
+
import "../ui/table.es.js";
|
|
36
|
+
import "../ui/tabs.es.js";
|
|
37
|
+
import "../ui/tooltip.es.js";
|
|
38
|
+
import { Outlet as w } from "@tanstack/react-router";
|
|
39
|
+
function mr({ data: e, user: o }) {
|
|
40
|
+
var i, m;
|
|
41
|
+
return /* @__PURE__ */ t("div", { className: "h-screen", children: [
|
|
42
|
+
/* @__PURE__ */ t(l, { children: [
|
|
43
|
+
/* @__PURE__ */ r(p, { data: e }),
|
|
44
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col h-screen w-full overflow-auto", children: [
|
|
45
|
+
/* @__PURE__ */ t("header", { className: "h-[7vh] sticky top-0 bg-card flex items-center justify-between p-4 pl-0 border-b z-10", children: [
|
|
46
|
+
/* @__PURE__ */ t("div", { className: "flex gap-1 items-center", children: [
|
|
47
|
+
/* @__PURE__ */ r(c, {}),
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
|
+
"img",
|
|
50
|
+
{
|
|
51
|
+
src: "https://assets.cryptlex.com/images/logos/cryptlex-logo.svg",
|
|
52
|
+
alt: "logo",
|
|
53
|
+
className: "m-0"
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ t(h, { children: [
|
|
58
|
+
/* @__PURE__ */ r(f, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "cursor-pointer", children: /* @__PURE__ */ t(a, { className: "justify-center items-center", children: [
|
|
59
|
+
/* @__PURE__ */ r(
|
|
60
|
+
n,
|
|
61
|
+
{
|
|
62
|
+
src: (o == null ? void 0 : o.logoUrl) ?? "https://app.dev.cryptlex.com/favicon.ico",
|
|
63
|
+
alt: "icon"
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
/* @__PURE__ */ t(d, { className: "uppercase", children: [
|
|
67
|
+
(i = o == null ? void 0 : o.firstName) == null ? void 0 : i.charAt(0),
|
|
68
|
+
(m = o == null ? void 0 : o.lastName) == null ? void 0 : m.charAt(0)
|
|
69
|
+
] })
|
|
70
|
+
] }) }) }),
|
|
71
|
+
/* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(s, { icon: N, onClick: () => x(), children: "Log Out" }) }) })
|
|
72
|
+
] })
|
|
73
|
+
] }),
|
|
74
|
+
/* @__PURE__ */ r("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ r(w, {}) })
|
|
75
|
+
] })
|
|
76
|
+
] }),
|
|
77
|
+
" "
|
|
78
|
+
] });
|
|
79
|
+
}
|
|
80
|
+
export {
|
|
81
|
+
mr as AppLayout
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=app-layout.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-layout.es.js","sources":["../../../lib/components/sidebar/app-layout.tsx"],"sourcesContent":["import type { NavItem } from '@/components/sidebar/nav-main';\nimport { SideBar } from '@/components/sidebar/sidebar';\nimport { SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar';\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n logout,\n} from '@/index';\nimport { Outlet } from '@tanstack/react-router';\nimport { LogOut } from 'lucide-react';\n\nexport interface AppLayoutProps {\n data: NavItem[]; // Navigation items\n user?: {\n firstName?: string;\n lastName?: string;\n logoUrl?: string;\n }; // Optional user information\n}\n\nexport function AppLayout({ data, user }: AppLayoutProps) {\n return (\n <div className=\"h-screen\">\n <SidebarProvider>\n {/* Sidebar */}\n <SideBar data={data} />\n\n {/* Main Content */}\n <div className=\"flex flex-col h-screen w-full overflow-auto\">\n {/* Header */}\n <header className=\"h-[7vh] sticky top-0 bg-card flex items-center justify-between p-4 pl-0 border-b z-10\">\n {/* Sidebar Trigger */}\n <div className=\"flex gap-1 items-center\">\n <SidebarTrigger />\n {/* //TODO: Will be replaced with dynamic url */}\n <img\n src=\"https://assets.cryptlex.com/images/logos/cryptlex-logo.svg\"\n alt=\"logo\"\n className=\"m-0\"\n />\n </div>\n\n {/* User Dropdown */}\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <div className=\"cursor-pointer\">\n {/* //TODO: Image url to be replaced by the dynamic url from /account/config */}\n <Avatar className=\"justify-center items-center\">\n <AvatarImage\n src={user?.logoUrl ?? 'https://app.dev.cryptlex.com/favicon.ico'}\n alt=\"icon\"\n />\n <AvatarFallback className=\"uppercase\">\n {user?.firstName?.charAt(0)}\n {user?.lastName?.charAt(0)}\n </AvatarFallback>\n </Avatar>\n </div>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent>\n <DropdownMenuItem>\n <Button icon={LogOut} onClick={() => logout()}>\n Log Out\n </Button>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </header>\n\n {/* Scrollable Content */}\n <div className=\"flex-1 overflow-auto p-4\">\n <Outlet />\n </div>\n </div>\n </SidebarProvider>{' '}\n </div>\n );\n}\n"],"names":["AppLayout","data","user","jsxs","SidebarProvider","jsx","SideBar","SidebarTrigger","DropdownMenu","DropdownMenuTrigger","Avatar","AvatarImage","AvatarFallback","_a","_b","DropdownMenuContent","DropdownMenuItem","Button","LogOut","logout","Outlet"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,SAASA,GAAU,EAAE,MAAAC,GAAM,MAAAC,KAAwB;;AAEtD,SAAA,gBAAAC,EAAC,OAAI,EAAA,WAAU,YACb,UAAA;AAAA,IAAA,gBAAAA,EAACC,GAEC,EAAA,UAAA;AAAA,MAAA,gBAAAC,EAACC,KAAQ,MAAAL,GAAY;AAAA,MAGrB,gBAAAE,EAAC,OAAI,EAAA,WAAU,+CAEb,UAAA;AAAA,QAAC,gBAAAA,EAAA,UAAA,EAAO,WAAU,0FAEhB,UAAA;AAAA,UAAC,gBAAAA,EAAA,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,YAAA,gBAAAE,EAACE,GAAe,EAAA;AAAA,YAEhB,gBAAAF;AAAA,cAAC;AAAA,cAAA;A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