@connectedxm/admin 2.2.2 → 2.2.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/index.cjs +8 -8
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +8 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -18546,18 +18546,18 @@ function MergeInfinitePages(data) {
|
|
|
18546
18546
|
}
|
|
18547
18547
|
|
|
18548
18548
|
// src/utilities/TransformPrice.ts
|
|
18549
|
-
var TransformPrice = (value,
|
|
18549
|
+
var TransformPrice = (value, currency) => {
|
|
18550
18550
|
if (typeof value !== "number") return void 0;
|
|
18551
|
-
const
|
|
18551
|
+
const formatter = new Intl.NumberFormat(void 0, {
|
|
18552
|
+
style: "currency",
|
|
18553
|
+
currency,
|
|
18552
18554
|
minimumFractionDigits: 2,
|
|
18553
18555
|
maximumFractionDigits: 2
|
|
18554
18556
|
});
|
|
18555
|
-
if (value === 0) return
|
|
18556
|
-
if (
|
|
18557
|
-
return
|
|
18558
|
-
|
|
18559
|
-
return dollarUSLocale.format(value / 100);
|
|
18560
|
-
}
|
|
18557
|
+
if (value === 0) return "--.--";
|
|
18558
|
+
if (value < 0)
|
|
18559
|
+
return formatter.format(-value / 100).replace(currency, `-${currency}`);
|
|
18560
|
+
return formatter.format(value / 100);
|
|
18561
18561
|
};
|
|
18562
18562
|
|
|
18563
18563
|
// src/queries/threads/useGetThreadMessages.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -1313,6 +1313,7 @@ interface BaseOrganization {
|
|
|
1313
1313
|
icon: BaseImage | null;
|
|
1314
1314
|
domain: string | null;
|
|
1315
1315
|
locale: string;
|
|
1316
|
+
currency: string;
|
|
1316
1317
|
}
|
|
1317
1318
|
interface Organization extends BaseOrganization {
|
|
1318
1319
|
email: string | null;
|
|
@@ -1326,7 +1327,6 @@ interface Organization extends BaseOrganization {
|
|
|
1326
1327
|
zip: string | null;
|
|
1327
1328
|
primaryColor: string | null;
|
|
1328
1329
|
secondaryColor: string | null;
|
|
1329
|
-
currency: string | null;
|
|
1330
1330
|
facebook: string | null;
|
|
1331
1331
|
twitter: string | null;
|
|
1332
1332
|
instagram: string | null;
|
|
@@ -2380,6 +2380,7 @@ interface BaseFile {
|
|
|
2380
2380
|
source: FileSource;
|
|
2381
2381
|
kilobytes: number;
|
|
2382
2382
|
url?: string;
|
|
2383
|
+
public: boolean;
|
|
2383
2384
|
createdAt: string;
|
|
2384
2385
|
updatedAt: string;
|
|
2385
2386
|
}
|
|
@@ -3974,6 +3975,7 @@ interface EventUpdateInputs {
|
|
|
3974
3975
|
interface FileUpdateInputs {
|
|
3975
3976
|
name?: string;
|
|
3976
3977
|
source?: FileSource;
|
|
3978
|
+
public?: boolean;
|
|
3977
3979
|
}
|
|
3978
3980
|
interface GroupCreateInputs {
|
|
3979
3981
|
name: string;
|
|
@@ -5070,7 +5072,7 @@ declare const isUUID: (id: string) => boolean;
|
|
|
5070
5072
|
|
|
5071
5073
|
declare function MergeInfinitePages<TData>(data: InfiniteData<ConnectedXMResponse<TData[]>>): TData[];
|
|
5072
5074
|
|
|
5073
|
-
declare const TransformPrice: (value: number,
|
|
5075
|
+
declare const TransformPrice: (value: number, currency: string) => string | undefined;
|
|
5074
5076
|
|
|
5075
5077
|
interface AdminApiParams {
|
|
5076
5078
|
apiUrl: "https://admin-api.connected.dev" | "https://staging-admin-api.connected.dev" | "http://localhost:4001";
|
package/dist/index.d.ts
CHANGED
|
@@ -1313,6 +1313,7 @@ interface BaseOrganization {
|
|
|
1313
1313
|
icon: BaseImage | null;
|
|
1314
1314
|
domain: string | null;
|
|
1315
1315
|
locale: string;
|
|
1316
|
+
currency: string;
|
|
1316
1317
|
}
|
|
1317
1318
|
interface Organization extends BaseOrganization {
|
|
1318
1319
|
email: string | null;
|
|
@@ -1326,7 +1327,6 @@ interface Organization extends BaseOrganization {
|
|
|
1326
1327
|
zip: string | null;
|
|
1327
1328
|
primaryColor: string | null;
|
|
1328
1329
|
secondaryColor: string | null;
|
|
1329
|
-
currency: string | null;
|
|
1330
1330
|
facebook: string | null;
|
|
1331
1331
|
twitter: string | null;
|
|
1332
1332
|
instagram: string | null;
|
|
@@ -2380,6 +2380,7 @@ interface BaseFile {
|
|
|
2380
2380
|
source: FileSource;
|
|
2381
2381
|
kilobytes: number;
|
|
2382
2382
|
url?: string;
|
|
2383
|
+
public: boolean;
|
|
2383
2384
|
createdAt: string;
|
|
2384
2385
|
updatedAt: string;
|
|
2385
2386
|
}
|
|
@@ -3974,6 +3975,7 @@ interface EventUpdateInputs {
|
|
|
3974
3975
|
interface FileUpdateInputs {
|
|
3975
3976
|
name?: string;
|
|
3976
3977
|
source?: FileSource;
|
|
3978
|
+
public?: boolean;
|
|
3977
3979
|
}
|
|
3978
3980
|
interface GroupCreateInputs {
|
|
3979
3981
|
name: string;
|
|
@@ -5070,7 +5072,7 @@ declare const isUUID: (id: string) => boolean;
|
|
|
5070
5072
|
|
|
5071
5073
|
declare function MergeInfinitePages<TData>(data: InfiniteData<ConnectedXMResponse<TData[]>>): TData[];
|
|
5072
5074
|
|
|
5073
|
-
declare const TransformPrice: (value: number,
|
|
5075
|
+
declare const TransformPrice: (value: number, currency: string) => string | undefined;
|
|
5074
5076
|
|
|
5075
5077
|
interface AdminApiParams {
|
|
5076
5078
|
apiUrl: "https://admin-api.connected.dev" | "https://staging-admin-api.connected.dev" | "http://localhost:4001";
|
package/dist/index.js
CHANGED
|
@@ -15843,18 +15843,18 @@ function MergeInfinitePages(data) {
|
|
|
15843
15843
|
}
|
|
15844
15844
|
|
|
15845
15845
|
// src/utilities/TransformPrice.ts
|
|
15846
|
-
var TransformPrice = (value,
|
|
15846
|
+
var TransformPrice = (value, currency) => {
|
|
15847
15847
|
if (typeof value !== "number") return void 0;
|
|
15848
|
-
const
|
|
15848
|
+
const formatter = new Intl.NumberFormat(void 0, {
|
|
15849
|
+
style: "currency",
|
|
15850
|
+
currency,
|
|
15849
15851
|
minimumFractionDigits: 2,
|
|
15850
15852
|
maximumFractionDigits: 2
|
|
15851
15853
|
});
|
|
15852
|
-
if (value === 0) return
|
|
15853
|
-
if (
|
|
15854
|
-
return
|
|
15855
|
-
|
|
15856
|
-
return dollarUSLocale.format(value / 100);
|
|
15857
|
-
}
|
|
15854
|
+
if (value === 0) return "--.--";
|
|
15855
|
+
if (value < 0)
|
|
15856
|
+
return formatter.format(-value / 100).replace(currency, `-${currency}`);
|
|
15857
|
+
return formatter.format(value / 100);
|
|
15858
15858
|
};
|
|
15859
15859
|
|
|
15860
15860
|
// src/queries/threads/useGetThreadMessages.ts
|