@abpjs/saas 2.0.0 → 2.2.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/dist/index.d.mts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +36 -0
- package/dist/index.mjs +36 -0
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -396,6 +396,10 @@ interface UseTenantsReturn {
|
|
|
396
396
|
defaultConnectionString: string;
|
|
397
397
|
/** Whether the tenant uses shared database */
|
|
398
398
|
useSharedDatabase: boolean;
|
|
399
|
+
/** Whether features modal is visible @since 2.2.0 */
|
|
400
|
+
visibleFeatures: boolean;
|
|
401
|
+
/** Provider key for features modal @since 2.2.0 */
|
|
402
|
+
featuresProviderKey: string;
|
|
399
403
|
/** Fetch all tenants with optional pagination/filtering */
|
|
400
404
|
fetchTenants: (params?: Saas.TenantsQueryParams) => Promise<TenantOperationResult<Saas.TenantsResponse>>;
|
|
401
405
|
/** Get a tenant by ID and set it as selected */
|
|
@@ -418,6 +422,10 @@ interface UseTenantsReturn {
|
|
|
418
422
|
setSortKey: (key: string) => void;
|
|
419
423
|
/** Set sort order */
|
|
420
424
|
setSortOrder: (order: SortOrder$1) => void;
|
|
425
|
+
/** Handle features modal visibility change @since 2.2.0 */
|
|
426
|
+
onVisibleFeaturesChange: (value: boolean) => void;
|
|
427
|
+
/** Open features modal for a tenant @since 2.2.0 */
|
|
428
|
+
openFeaturesModal: (providerKey: string) => void;
|
|
421
429
|
/** Reset state */
|
|
422
430
|
reset: () => void;
|
|
423
431
|
}
|
|
@@ -495,6 +503,10 @@ interface UseEditionsReturn {
|
|
|
495
503
|
sortOrder: SortOrder;
|
|
496
504
|
/** Usage statistics for editions */
|
|
497
505
|
usageStatistics: Record<string, number>;
|
|
506
|
+
/** Whether features modal is visible @since 2.2.0 */
|
|
507
|
+
visibleFeatures: boolean;
|
|
508
|
+
/** Provider key for features modal @since 2.2.0 */
|
|
509
|
+
featuresProviderKey: string;
|
|
498
510
|
/** Fetch all editions with optional pagination/filtering */
|
|
499
511
|
fetchEditions: (params?: Saas.EditionsQueryParams) => Promise<EditionOperationResult<Saas.EditionsResponse>>;
|
|
500
512
|
/** Get an edition by ID and set it as selected */
|
|
@@ -513,6 +525,10 @@ interface UseEditionsReturn {
|
|
|
513
525
|
setSortKey: (key: string) => void;
|
|
514
526
|
/** Set sort order */
|
|
515
527
|
setSortOrder: (order: SortOrder) => void;
|
|
528
|
+
/** Handle features modal visibility change @since 2.2.0 */
|
|
529
|
+
onVisibleFeaturesChange: (value: boolean) => void;
|
|
530
|
+
/** Open features modal for an edition @since 2.2.0 */
|
|
531
|
+
openFeaturesModal: (providerKey: string) => void;
|
|
516
532
|
/** Reset state */
|
|
517
533
|
reset: () => void;
|
|
518
534
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -396,6 +396,10 @@ interface UseTenantsReturn {
|
|
|
396
396
|
defaultConnectionString: string;
|
|
397
397
|
/** Whether the tenant uses shared database */
|
|
398
398
|
useSharedDatabase: boolean;
|
|
399
|
+
/** Whether features modal is visible @since 2.2.0 */
|
|
400
|
+
visibleFeatures: boolean;
|
|
401
|
+
/** Provider key for features modal @since 2.2.0 */
|
|
402
|
+
featuresProviderKey: string;
|
|
399
403
|
/** Fetch all tenants with optional pagination/filtering */
|
|
400
404
|
fetchTenants: (params?: Saas.TenantsQueryParams) => Promise<TenantOperationResult<Saas.TenantsResponse>>;
|
|
401
405
|
/** Get a tenant by ID and set it as selected */
|
|
@@ -418,6 +422,10 @@ interface UseTenantsReturn {
|
|
|
418
422
|
setSortKey: (key: string) => void;
|
|
419
423
|
/** Set sort order */
|
|
420
424
|
setSortOrder: (order: SortOrder$1) => void;
|
|
425
|
+
/** Handle features modal visibility change @since 2.2.0 */
|
|
426
|
+
onVisibleFeaturesChange: (value: boolean) => void;
|
|
427
|
+
/** Open features modal for a tenant @since 2.2.0 */
|
|
428
|
+
openFeaturesModal: (providerKey: string) => void;
|
|
421
429
|
/** Reset state */
|
|
422
430
|
reset: () => void;
|
|
423
431
|
}
|
|
@@ -495,6 +503,10 @@ interface UseEditionsReturn {
|
|
|
495
503
|
sortOrder: SortOrder;
|
|
496
504
|
/** Usage statistics for editions */
|
|
497
505
|
usageStatistics: Record<string, number>;
|
|
506
|
+
/** Whether features modal is visible @since 2.2.0 */
|
|
507
|
+
visibleFeatures: boolean;
|
|
508
|
+
/** Provider key for features modal @since 2.2.0 */
|
|
509
|
+
featuresProviderKey: string;
|
|
498
510
|
/** Fetch all editions with optional pagination/filtering */
|
|
499
511
|
fetchEditions: (params?: Saas.EditionsQueryParams) => Promise<EditionOperationResult<Saas.EditionsResponse>>;
|
|
500
512
|
/** Get an edition by ID and set it as selected */
|
|
@@ -513,6 +525,10 @@ interface UseEditionsReturn {
|
|
|
513
525
|
setSortKey: (key: string) => void;
|
|
514
526
|
/** Set sort order */
|
|
515
527
|
setSortOrder: (order: SortOrder) => void;
|
|
528
|
+
/** Handle features modal visibility change @since 2.2.0 */
|
|
529
|
+
onVisibleFeaturesChange: (value: boolean) => void;
|
|
530
|
+
/** Open features modal for an edition @since 2.2.0 */
|
|
531
|
+
openFeaturesModal: (providerKey: string) => void;
|
|
516
532
|
/** Reset state */
|
|
517
533
|
reset: () => void;
|
|
518
534
|
}
|
package/dist/index.js
CHANGED
|
@@ -445,6 +445,8 @@ function useTenants() {
|
|
|
445
445
|
const [sortOrder, setSortOrder] = (0, import_react.useState)("");
|
|
446
446
|
const [defaultConnectionString, setDefaultConnectionString] = (0, import_react.useState)("");
|
|
447
447
|
const [useSharedDatabase, setUseSharedDatabase] = (0, import_react.useState)(true);
|
|
448
|
+
const [visibleFeatures, setVisibleFeatures] = (0, import_react.useState)(false);
|
|
449
|
+
const [featuresProviderKey, setFeaturesProviderKey] = (0, import_react.useState)("");
|
|
448
450
|
const fetchTenants = (0, import_react.useCallback)(
|
|
449
451
|
async (params) => {
|
|
450
452
|
setIsLoading(true);
|
|
@@ -587,6 +589,16 @@ function useTenants() {
|
|
|
587
589
|
},
|
|
588
590
|
[service]
|
|
589
591
|
);
|
|
592
|
+
const onVisibleFeaturesChange = (0, import_react.useCallback)((value) => {
|
|
593
|
+
setVisibleFeatures(value);
|
|
594
|
+
if (!value) {
|
|
595
|
+
setFeaturesProviderKey("");
|
|
596
|
+
}
|
|
597
|
+
}, []);
|
|
598
|
+
const openFeaturesModal = (0, import_react.useCallback)((providerKey) => {
|
|
599
|
+
setFeaturesProviderKey(providerKey);
|
|
600
|
+
setVisibleFeatures(true);
|
|
601
|
+
}, []);
|
|
590
602
|
const reset = (0, import_react.useCallback)(() => {
|
|
591
603
|
setTenants([]);
|
|
592
604
|
setTotalCount(0);
|
|
@@ -597,6 +609,8 @@ function useTenants() {
|
|
|
597
609
|
setSortOrder("");
|
|
598
610
|
setDefaultConnectionString("");
|
|
599
611
|
setUseSharedDatabase(true);
|
|
612
|
+
setVisibleFeatures(false);
|
|
613
|
+
setFeaturesProviderKey("");
|
|
600
614
|
}, []);
|
|
601
615
|
return {
|
|
602
616
|
tenants,
|
|
@@ -608,6 +622,8 @@ function useTenants() {
|
|
|
608
622
|
sortOrder,
|
|
609
623
|
defaultConnectionString,
|
|
610
624
|
useSharedDatabase,
|
|
625
|
+
visibleFeatures,
|
|
626
|
+
featuresProviderKey,
|
|
611
627
|
fetchTenants,
|
|
612
628
|
getTenantById,
|
|
613
629
|
createTenant,
|
|
@@ -619,6 +635,8 @@ function useTenants() {
|
|
|
619
635
|
setSelectedTenant,
|
|
620
636
|
setSortKey,
|
|
621
637
|
setSortOrder,
|
|
638
|
+
onVisibleFeaturesChange,
|
|
639
|
+
openFeaturesModal,
|
|
622
640
|
reset
|
|
623
641
|
};
|
|
624
642
|
}
|
|
@@ -637,6 +655,8 @@ function useEditions() {
|
|
|
637
655
|
const [sortKey, setSortKey] = (0, import_react2.useState)("displayName");
|
|
638
656
|
const [sortOrder, setSortOrder] = (0, import_react2.useState)("");
|
|
639
657
|
const [usageStatistics, setUsageStatistics] = (0, import_react2.useState)({});
|
|
658
|
+
const [visibleFeatures, setVisibleFeatures] = (0, import_react2.useState)(false);
|
|
659
|
+
const [featuresProviderKey, setFeaturesProviderKey] = (0, import_react2.useState)("");
|
|
640
660
|
const fetchEditions = (0, import_react2.useCallback)(
|
|
641
661
|
async (params) => {
|
|
642
662
|
setIsLoading(true);
|
|
@@ -740,6 +760,16 @@ function useEditions() {
|
|
|
740
760
|
},
|
|
741
761
|
[service]
|
|
742
762
|
);
|
|
763
|
+
const onVisibleFeaturesChange = (0, import_react2.useCallback)((value) => {
|
|
764
|
+
setVisibleFeatures(value);
|
|
765
|
+
if (!value) {
|
|
766
|
+
setFeaturesProviderKey("");
|
|
767
|
+
}
|
|
768
|
+
}, []);
|
|
769
|
+
const openFeaturesModal = (0, import_react2.useCallback)((providerKey) => {
|
|
770
|
+
setFeaturesProviderKey(providerKey);
|
|
771
|
+
setVisibleFeatures(true);
|
|
772
|
+
}, []);
|
|
743
773
|
const reset = (0, import_react2.useCallback)(() => {
|
|
744
774
|
setEditions([]);
|
|
745
775
|
setTotalCount(0);
|
|
@@ -749,6 +779,8 @@ function useEditions() {
|
|
|
749
779
|
setSortKey("displayName");
|
|
750
780
|
setSortOrder("");
|
|
751
781
|
setUsageStatistics({});
|
|
782
|
+
setVisibleFeatures(false);
|
|
783
|
+
setFeaturesProviderKey("");
|
|
752
784
|
}, []);
|
|
753
785
|
return {
|
|
754
786
|
editions,
|
|
@@ -759,6 +791,8 @@ function useEditions() {
|
|
|
759
791
|
sortKey,
|
|
760
792
|
sortOrder,
|
|
761
793
|
usageStatistics,
|
|
794
|
+
visibleFeatures,
|
|
795
|
+
featuresProviderKey,
|
|
762
796
|
fetchEditions,
|
|
763
797
|
getEditionById,
|
|
764
798
|
createEdition,
|
|
@@ -768,6 +802,8 @@ function useEditions() {
|
|
|
768
802
|
setSelectedEdition,
|
|
769
803
|
setSortKey,
|
|
770
804
|
setSortOrder,
|
|
805
|
+
onVisibleFeaturesChange,
|
|
806
|
+
openFeaturesModal,
|
|
771
807
|
reset
|
|
772
808
|
};
|
|
773
809
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -413,6 +413,8 @@ function useTenants() {
|
|
|
413
413
|
const [sortOrder, setSortOrder] = useState("");
|
|
414
414
|
const [defaultConnectionString, setDefaultConnectionString] = useState("");
|
|
415
415
|
const [useSharedDatabase, setUseSharedDatabase] = useState(true);
|
|
416
|
+
const [visibleFeatures, setVisibleFeatures] = useState(false);
|
|
417
|
+
const [featuresProviderKey, setFeaturesProviderKey] = useState("");
|
|
416
418
|
const fetchTenants = useCallback(
|
|
417
419
|
async (params) => {
|
|
418
420
|
setIsLoading(true);
|
|
@@ -555,6 +557,16 @@ function useTenants() {
|
|
|
555
557
|
},
|
|
556
558
|
[service]
|
|
557
559
|
);
|
|
560
|
+
const onVisibleFeaturesChange = useCallback((value) => {
|
|
561
|
+
setVisibleFeatures(value);
|
|
562
|
+
if (!value) {
|
|
563
|
+
setFeaturesProviderKey("");
|
|
564
|
+
}
|
|
565
|
+
}, []);
|
|
566
|
+
const openFeaturesModal = useCallback((providerKey) => {
|
|
567
|
+
setFeaturesProviderKey(providerKey);
|
|
568
|
+
setVisibleFeatures(true);
|
|
569
|
+
}, []);
|
|
558
570
|
const reset = useCallback(() => {
|
|
559
571
|
setTenants([]);
|
|
560
572
|
setTotalCount(0);
|
|
@@ -565,6 +577,8 @@ function useTenants() {
|
|
|
565
577
|
setSortOrder("");
|
|
566
578
|
setDefaultConnectionString("");
|
|
567
579
|
setUseSharedDatabase(true);
|
|
580
|
+
setVisibleFeatures(false);
|
|
581
|
+
setFeaturesProviderKey("");
|
|
568
582
|
}, []);
|
|
569
583
|
return {
|
|
570
584
|
tenants,
|
|
@@ -576,6 +590,8 @@ function useTenants() {
|
|
|
576
590
|
sortOrder,
|
|
577
591
|
defaultConnectionString,
|
|
578
592
|
useSharedDatabase,
|
|
593
|
+
visibleFeatures,
|
|
594
|
+
featuresProviderKey,
|
|
579
595
|
fetchTenants,
|
|
580
596
|
getTenantById,
|
|
581
597
|
createTenant,
|
|
@@ -587,6 +603,8 @@ function useTenants() {
|
|
|
587
603
|
setSelectedTenant,
|
|
588
604
|
setSortKey,
|
|
589
605
|
setSortOrder,
|
|
606
|
+
onVisibleFeaturesChange,
|
|
607
|
+
openFeaturesModal,
|
|
590
608
|
reset
|
|
591
609
|
};
|
|
592
610
|
}
|
|
@@ -605,6 +623,8 @@ function useEditions() {
|
|
|
605
623
|
const [sortKey, setSortKey] = useState2("displayName");
|
|
606
624
|
const [sortOrder, setSortOrder] = useState2("");
|
|
607
625
|
const [usageStatistics, setUsageStatistics] = useState2({});
|
|
626
|
+
const [visibleFeatures, setVisibleFeatures] = useState2(false);
|
|
627
|
+
const [featuresProviderKey, setFeaturesProviderKey] = useState2("");
|
|
608
628
|
const fetchEditions = useCallback2(
|
|
609
629
|
async (params) => {
|
|
610
630
|
setIsLoading(true);
|
|
@@ -708,6 +728,16 @@ function useEditions() {
|
|
|
708
728
|
},
|
|
709
729
|
[service]
|
|
710
730
|
);
|
|
731
|
+
const onVisibleFeaturesChange = useCallback2((value) => {
|
|
732
|
+
setVisibleFeatures(value);
|
|
733
|
+
if (!value) {
|
|
734
|
+
setFeaturesProviderKey("");
|
|
735
|
+
}
|
|
736
|
+
}, []);
|
|
737
|
+
const openFeaturesModal = useCallback2((providerKey) => {
|
|
738
|
+
setFeaturesProviderKey(providerKey);
|
|
739
|
+
setVisibleFeatures(true);
|
|
740
|
+
}, []);
|
|
711
741
|
const reset = useCallback2(() => {
|
|
712
742
|
setEditions([]);
|
|
713
743
|
setTotalCount(0);
|
|
@@ -717,6 +747,8 @@ function useEditions() {
|
|
|
717
747
|
setSortKey("displayName");
|
|
718
748
|
setSortOrder("");
|
|
719
749
|
setUsageStatistics({});
|
|
750
|
+
setVisibleFeatures(false);
|
|
751
|
+
setFeaturesProviderKey("");
|
|
720
752
|
}, []);
|
|
721
753
|
return {
|
|
722
754
|
editions,
|
|
@@ -727,6 +759,8 @@ function useEditions() {
|
|
|
727
759
|
sortKey,
|
|
728
760
|
sortOrder,
|
|
729
761
|
usageStatistics,
|
|
762
|
+
visibleFeatures,
|
|
763
|
+
featuresProviderKey,
|
|
730
764
|
fetchEditions,
|
|
731
765
|
getEditionById,
|
|
732
766
|
createEdition,
|
|
@@ -736,6 +770,8 @@ function useEditions() {
|
|
|
736
770
|
setSelectedEdition,
|
|
737
771
|
setSortKey,
|
|
738
772
|
setSortOrder,
|
|
773
|
+
onVisibleFeaturesChange,
|
|
774
|
+
openFeaturesModal,
|
|
739
775
|
reset
|
|
740
776
|
};
|
|
741
777
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abpjs/saas",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "ABP Framework SaaS components for React - translated from @volo/abp.ng.saas",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@chakra-ui/react": "^3.2.0",
|
|
29
29
|
"@emotion/react": "^11.11.0",
|
|
30
|
-
"@abpjs/core": "2.
|
|
31
|
-
"@abpjs/theme-shared": "2.
|
|
32
|
-
"@abpjs/feature-management": "2.
|
|
30
|
+
"@abpjs/core": "2.2.0",
|
|
31
|
+
"@abpjs/theme-shared": "2.2.0",
|
|
32
|
+
"@abpjs/feature-management": "2.2.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@volo/abp.ng.saas": "2.
|
|
35
|
+
"@volo/abp.ng.saas": "2.2.0",
|
|
36
36
|
"@testing-library/jest-dom": "^6.9.1",
|
|
37
37
|
"@testing-library/react": "^14.0.0",
|
|
38
38
|
"@testing-library/user-event": "^14.6.1",
|