@abpjs/saas 2.7.0 → 3.0.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 +480 -27
- package/dist/index.d.ts +480 -27
- package/dist/index.js +470 -143
- package/dist/index.mjs +353 -54
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -20,18 +20,104 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
DEFAULT_EDITIONS_CREATE_FORM_PROPS: () => DEFAULT_EDITIONS_CREATE_FORM_PROPS,
|
|
24
|
+
DEFAULT_EDITIONS_EDIT_FORM_PROPS: () => DEFAULT_EDITIONS_EDIT_FORM_PROPS,
|
|
25
|
+
DEFAULT_EDITIONS_ENTITY_ACTIONS: () => DEFAULT_EDITIONS_ENTITY_ACTIONS,
|
|
26
|
+
DEFAULT_EDITIONS_ENTITY_PROPS: () => DEFAULT_EDITIONS_ENTITY_PROPS,
|
|
27
|
+
DEFAULT_EDITIONS_TOOLBAR_ACTIONS: () => DEFAULT_EDITIONS_TOOLBAR_ACTIONS,
|
|
28
|
+
DEFAULT_SAAS_CREATE_FORM_PROPS: () => DEFAULT_SAAS_CREATE_FORM_PROPS,
|
|
29
|
+
DEFAULT_SAAS_EDIT_FORM_PROPS: () => DEFAULT_SAAS_EDIT_FORM_PROPS,
|
|
30
|
+
DEFAULT_SAAS_ENTITY_ACTIONS: () => DEFAULT_SAAS_ENTITY_ACTIONS,
|
|
31
|
+
DEFAULT_SAAS_ENTITY_PROPS: () => DEFAULT_SAAS_ENTITY_PROPS,
|
|
32
|
+
DEFAULT_SAAS_TOOLBAR_ACTIONS: () => DEFAULT_SAAS_TOOLBAR_ACTIONS,
|
|
33
|
+
DEFAULT_TENANTS_CREATE_FORM_PROPS: () => DEFAULT_TENANTS_CREATE_FORM_PROPS,
|
|
34
|
+
DEFAULT_TENANTS_EDIT_FORM_PROPS: () => DEFAULT_TENANTS_EDIT_FORM_PROPS,
|
|
35
|
+
DEFAULT_TENANTS_ENTITY_ACTIONS: () => DEFAULT_TENANTS_ENTITY_ACTIONS,
|
|
36
|
+
DEFAULT_TENANTS_ENTITY_PROPS: () => DEFAULT_TENANTS_ENTITY_PROPS,
|
|
37
|
+
DEFAULT_TENANTS_TOOLBAR_ACTIONS: () => DEFAULT_TENANTS_TOOLBAR_ACTIONS,
|
|
23
38
|
EditionsComponent: () => EditionsComponent,
|
|
39
|
+
SAAS_CREATE_FORM_PROP_CONTRIBUTORS: () => SAAS_CREATE_FORM_PROP_CONTRIBUTORS,
|
|
40
|
+
SAAS_EDIT_FORM_PROP_CONTRIBUTORS: () => SAAS_EDIT_FORM_PROP_CONTRIBUTORS,
|
|
41
|
+
SAAS_ENTITY_ACTION_CONTRIBUTORS: () => SAAS_ENTITY_ACTION_CONTRIBUTORS,
|
|
42
|
+
SAAS_ENTITY_PROP_CONTRIBUTORS: () => SAAS_ENTITY_PROP_CONTRIBUTORS,
|
|
24
43
|
SAAS_ROUTES: () => SAAS_ROUTES,
|
|
44
|
+
SAAS_ROUTE_CONFIG: () => SAAS_ROUTE_CONFIG,
|
|
45
|
+
SAAS_ROUTE_PROVIDERS: () => SAAS_ROUTE_PROVIDERS,
|
|
46
|
+
SAAS_TOOLBAR_ACTION_CONTRIBUTORS: () => SAAS_TOOLBAR_ACTION_CONTRIBUTORS,
|
|
47
|
+
SaasExtensionsGuard: () => SaasExtensionsGuard,
|
|
25
48
|
SaasService: () => SaasService,
|
|
26
49
|
SaasStateService: () => SaasStateService,
|
|
27
50
|
TenantsComponent: () => TenantsComponent,
|
|
51
|
+
configureRoutes: () => configureRoutes,
|
|
28
52
|
eSaasComponents: () => eSaasComponents,
|
|
53
|
+
eSaasPolicyNames: () => eSaasPolicyNames,
|
|
29
54
|
eSaasRouteNames: () => eSaasRouteNames,
|
|
55
|
+
initializeSaasRoutes: () => initializeSaasRoutes,
|
|
56
|
+
saasExtensionsGuard: () => saasExtensionsGuard,
|
|
30
57
|
useEditions: () => useEditions,
|
|
58
|
+
useSaasExtensionsGuard: () => useSaasExtensionsGuard,
|
|
31
59
|
useTenants: () => useTenants
|
|
32
60
|
});
|
|
33
61
|
module.exports = __toCommonJS(index_exports);
|
|
34
62
|
|
|
63
|
+
// src/config/enums/policy-names.ts
|
|
64
|
+
var eSaasPolicyNames = {
|
|
65
|
+
/** Policy for SaaS module (Tenants OR Editions) */
|
|
66
|
+
Saas: "Saas.Tenants || Saas.Editions",
|
|
67
|
+
/** Policy for Tenants management */
|
|
68
|
+
Tenants: "Saas.Tenants",
|
|
69
|
+
/** Policy for Editions management */
|
|
70
|
+
Editions: "Saas.Editions"
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// src/config/enums/route-names.ts
|
|
74
|
+
var eSaasRouteNames = {
|
|
75
|
+
/** SaaS menu route name */
|
|
76
|
+
Saas: "Saas::Menu:Saas",
|
|
77
|
+
/** Tenants route name */
|
|
78
|
+
Tenants: "Saas::Tenants",
|
|
79
|
+
/** Editions route name */
|
|
80
|
+
Editions: "Saas::Editions"
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// src/config/providers/route.provider.ts
|
|
84
|
+
var SAAS_ROUTE_CONFIG = {
|
|
85
|
+
path: "/saas",
|
|
86
|
+
name: eSaasRouteNames.Saas,
|
|
87
|
+
iconClass: "fas fa-building",
|
|
88
|
+
order: 2,
|
|
89
|
+
requiredPolicy: "Saas.Tenants || Saas.Editions",
|
|
90
|
+
children: [
|
|
91
|
+
{
|
|
92
|
+
path: "tenants",
|
|
93
|
+
name: eSaasRouteNames.Tenants,
|
|
94
|
+
requiredPolicy: "Saas.Tenants",
|
|
95
|
+
order: 1
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
path: "editions",
|
|
99
|
+
name: eSaasRouteNames.Editions,
|
|
100
|
+
requiredPolicy: "Saas.Editions",
|
|
101
|
+
order: 2
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
};
|
|
105
|
+
function configureRoutes(routes) {
|
|
106
|
+
return () => {
|
|
107
|
+
routes.add([SAAS_ROUTE_CONFIG]);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function initializeSaasRoutes(routes) {
|
|
111
|
+
const configure = configureRoutes(routes);
|
|
112
|
+
configure();
|
|
113
|
+
}
|
|
114
|
+
var SAAS_ROUTE_PROVIDERS = {
|
|
115
|
+
/** Configure function factory */
|
|
116
|
+
useFactory: configureRoutes,
|
|
117
|
+
/** Dependencies required by the factory */
|
|
118
|
+
deps: ["RoutesService"]
|
|
119
|
+
};
|
|
120
|
+
|
|
35
121
|
// src/constants/routes.ts
|
|
36
122
|
var SAAS_ROUTES = {
|
|
37
123
|
routes: [
|
|
@@ -64,12 +150,45 @@ var eSaasComponents = {
|
|
|
64
150
|
Tenants: "Saas.TenantsComponent"
|
|
65
151
|
};
|
|
66
152
|
|
|
67
|
-
// src/
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
153
|
+
// src/guards/extensions.guard.ts
|
|
154
|
+
var import_react = require("react");
|
|
155
|
+
async function saasExtensionsGuard() {
|
|
156
|
+
return Promise.resolve(true);
|
|
157
|
+
}
|
|
158
|
+
function useSaasExtensionsGuard() {
|
|
159
|
+
const [isLoaded, setIsLoaded] = (0, import_react.useState)(false);
|
|
160
|
+
const [loading, setLoading] = (0, import_react.useState)(true);
|
|
161
|
+
(0, import_react.useEffect)(() => {
|
|
162
|
+
let cancelled = false;
|
|
163
|
+
const checkExtensions = async () => {
|
|
164
|
+
try {
|
|
165
|
+
const result = await saasExtensionsGuard();
|
|
166
|
+
if (!cancelled) {
|
|
167
|
+
setIsLoaded(result);
|
|
168
|
+
setLoading(false);
|
|
169
|
+
}
|
|
170
|
+
} catch {
|
|
171
|
+
if (!cancelled) {
|
|
172
|
+
setIsLoaded(false);
|
|
173
|
+
setLoading(false);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
checkExtensions();
|
|
178
|
+
return () => {
|
|
179
|
+
cancelled = true;
|
|
180
|
+
};
|
|
181
|
+
}, []);
|
|
182
|
+
return { isLoaded, loading };
|
|
183
|
+
}
|
|
184
|
+
var SaasExtensionsGuard = class {
|
|
185
|
+
/**
|
|
186
|
+
* Check if the route can be activated
|
|
187
|
+
* @returns Promise<boolean> - True if navigation should proceed
|
|
188
|
+
*/
|
|
189
|
+
async canActivate() {
|
|
190
|
+
return saasExtensionsGuard();
|
|
191
|
+
}
|
|
73
192
|
};
|
|
74
193
|
|
|
75
194
|
// src/services/saas.service.ts
|
|
@@ -451,24 +570,204 @@ var SaasStateService = class {
|
|
|
451
570
|
}
|
|
452
571
|
};
|
|
453
572
|
|
|
573
|
+
// src/tokens/extensions.token.ts
|
|
574
|
+
var DEFAULT_EDITIONS_ENTITY_ACTIONS = [
|
|
575
|
+
{
|
|
576
|
+
text: "AbpUi::Edit",
|
|
577
|
+
permission: "Saas.Editions.Update",
|
|
578
|
+
icon: "fa fa-edit"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
text: "Saas::Permission:ManageFeatures",
|
|
582
|
+
permission: "Saas.Editions.ManageFeatures",
|
|
583
|
+
icon: "fa fa-cog"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
text: "AbpUi::Delete",
|
|
587
|
+
permission: "Saas.Editions.Delete",
|
|
588
|
+
icon: "fa fa-trash"
|
|
589
|
+
}
|
|
590
|
+
];
|
|
591
|
+
var DEFAULT_TENANTS_ENTITY_ACTIONS = [
|
|
592
|
+
{
|
|
593
|
+
text: "AbpUi::Edit",
|
|
594
|
+
permission: "Saas.Tenants.Update",
|
|
595
|
+
icon: "fa fa-edit"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
text: "Saas::Permission:ManageFeatures",
|
|
599
|
+
permission: "Saas.Tenants.ManageFeatures",
|
|
600
|
+
icon: "fa fa-cog"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
text: "Saas::ConnectionStrings",
|
|
604
|
+
permission: "Saas.Tenants.ManageConnectionStrings",
|
|
605
|
+
icon: "fa fa-database"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
text: "AbpUi::Delete",
|
|
609
|
+
permission: "Saas.Tenants.Delete",
|
|
610
|
+
icon: "fa fa-trash"
|
|
611
|
+
}
|
|
612
|
+
];
|
|
613
|
+
var DEFAULT_SAAS_ENTITY_ACTIONS = {
|
|
614
|
+
[eSaasComponents.Editions]: DEFAULT_EDITIONS_ENTITY_ACTIONS,
|
|
615
|
+
[eSaasComponents.Tenants]: DEFAULT_TENANTS_ENTITY_ACTIONS
|
|
616
|
+
};
|
|
617
|
+
var DEFAULT_EDITIONS_TOOLBAR_ACTIONS = [
|
|
618
|
+
{
|
|
619
|
+
text: "Saas::NewEdition",
|
|
620
|
+
permission: "Saas.Editions.Create",
|
|
621
|
+
icon: "fa fa-plus"
|
|
622
|
+
}
|
|
623
|
+
];
|
|
624
|
+
var DEFAULT_TENANTS_TOOLBAR_ACTIONS = [
|
|
625
|
+
{
|
|
626
|
+
text: "Saas::NewTenant",
|
|
627
|
+
permission: "Saas.Tenants.Create",
|
|
628
|
+
icon: "fa fa-plus"
|
|
629
|
+
}
|
|
630
|
+
];
|
|
631
|
+
var DEFAULT_SAAS_TOOLBAR_ACTIONS = {
|
|
632
|
+
[eSaasComponents.Editions]: DEFAULT_EDITIONS_TOOLBAR_ACTIONS,
|
|
633
|
+
[eSaasComponents.Tenants]: DEFAULT_TENANTS_TOOLBAR_ACTIONS
|
|
634
|
+
};
|
|
635
|
+
var DEFAULT_EDITIONS_ENTITY_PROPS = [
|
|
636
|
+
{
|
|
637
|
+
name: "displayName",
|
|
638
|
+
displayName: "Saas::EditionName",
|
|
639
|
+
sortable: true
|
|
640
|
+
}
|
|
641
|
+
];
|
|
642
|
+
var DEFAULT_TENANTS_ENTITY_PROPS = [
|
|
643
|
+
{
|
|
644
|
+
name: "name",
|
|
645
|
+
displayName: "Saas::TenantName",
|
|
646
|
+
sortable: true
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
name: "editionName",
|
|
650
|
+
displayName: "Saas::EditionName",
|
|
651
|
+
sortable: false
|
|
652
|
+
}
|
|
653
|
+
];
|
|
654
|
+
var DEFAULT_SAAS_ENTITY_PROPS = {
|
|
655
|
+
[eSaasComponents.Editions]: DEFAULT_EDITIONS_ENTITY_PROPS,
|
|
656
|
+
[eSaasComponents.Tenants]: DEFAULT_TENANTS_ENTITY_PROPS
|
|
657
|
+
};
|
|
658
|
+
var DEFAULT_EDITIONS_CREATE_FORM_PROPS = [
|
|
659
|
+
{
|
|
660
|
+
name: "displayName",
|
|
661
|
+
displayName: "Saas::EditionName",
|
|
662
|
+
type: "string",
|
|
663
|
+
validators: [
|
|
664
|
+
{ type: "required", message: "Saas::EditionNameIsRequired" },
|
|
665
|
+
{ type: "maxLength", value: 256 }
|
|
666
|
+
]
|
|
667
|
+
}
|
|
668
|
+
];
|
|
669
|
+
var DEFAULT_TENANTS_CREATE_FORM_PROPS = [
|
|
670
|
+
{
|
|
671
|
+
name: "name",
|
|
672
|
+
displayName: "Saas::TenantName",
|
|
673
|
+
type: "string",
|
|
674
|
+
validators: [
|
|
675
|
+
{ type: "required", message: "Saas::TenantNameIsRequired" },
|
|
676
|
+
{ type: "maxLength", value: 256 }
|
|
677
|
+
]
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
name: "editionId",
|
|
681
|
+
displayName: "Saas::Edition",
|
|
682
|
+
type: "select",
|
|
683
|
+
options: []
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
name: "adminEmailAddress",
|
|
687
|
+
displayName: "Saas::AdminEmailAddress",
|
|
688
|
+
type: "string",
|
|
689
|
+
validators: [
|
|
690
|
+
{ type: "required", message: "Saas::AdminEmailAddressIsRequired" },
|
|
691
|
+
{ type: "email" }
|
|
692
|
+
]
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
name: "adminPassword",
|
|
696
|
+
displayName: "Saas::AdminPassword",
|
|
697
|
+
type: "string",
|
|
698
|
+
validators: [{ type: "required", message: "Saas::AdminPasswordIsRequired" }]
|
|
699
|
+
}
|
|
700
|
+
];
|
|
701
|
+
var DEFAULT_SAAS_CREATE_FORM_PROPS = {
|
|
702
|
+
[eSaasComponents.Editions]: DEFAULT_EDITIONS_CREATE_FORM_PROPS,
|
|
703
|
+
[eSaasComponents.Tenants]: DEFAULT_TENANTS_CREATE_FORM_PROPS
|
|
704
|
+
};
|
|
705
|
+
var DEFAULT_EDITIONS_EDIT_FORM_PROPS = [
|
|
706
|
+
{
|
|
707
|
+
name: "displayName",
|
|
708
|
+
displayName: "Saas::EditionName",
|
|
709
|
+
type: "string",
|
|
710
|
+
validators: [
|
|
711
|
+
{ type: "required", message: "Saas::EditionNameIsRequired" },
|
|
712
|
+
{ type: "maxLength", value: 256 }
|
|
713
|
+
]
|
|
714
|
+
}
|
|
715
|
+
];
|
|
716
|
+
var DEFAULT_TENANTS_EDIT_FORM_PROPS = [
|
|
717
|
+
{
|
|
718
|
+
name: "name",
|
|
719
|
+
displayName: "Saas::TenantName",
|
|
720
|
+
type: "string",
|
|
721
|
+
validators: [
|
|
722
|
+
{ type: "required", message: "Saas::TenantNameIsRequired" },
|
|
723
|
+
{ type: "maxLength", value: 256 }
|
|
724
|
+
]
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
name: "editionId",
|
|
728
|
+
displayName: "Saas::Edition",
|
|
729
|
+
type: "select",
|
|
730
|
+
options: []
|
|
731
|
+
}
|
|
732
|
+
];
|
|
733
|
+
var DEFAULT_SAAS_EDIT_FORM_PROPS = {
|
|
734
|
+
[eSaasComponents.Editions]: DEFAULT_EDITIONS_EDIT_FORM_PROPS,
|
|
735
|
+
[eSaasComponents.Tenants]: DEFAULT_TENANTS_EDIT_FORM_PROPS
|
|
736
|
+
};
|
|
737
|
+
var SAAS_ENTITY_ACTION_CONTRIBUTORS = /* @__PURE__ */ Symbol(
|
|
738
|
+
"SAAS_ENTITY_ACTION_CONTRIBUTORS"
|
|
739
|
+
);
|
|
740
|
+
var SAAS_TOOLBAR_ACTION_CONTRIBUTORS = /* @__PURE__ */ Symbol(
|
|
741
|
+
"SAAS_TOOLBAR_ACTION_CONTRIBUTORS"
|
|
742
|
+
);
|
|
743
|
+
var SAAS_ENTITY_PROP_CONTRIBUTORS = /* @__PURE__ */ Symbol(
|
|
744
|
+
"SAAS_ENTITY_PROP_CONTRIBUTORS"
|
|
745
|
+
);
|
|
746
|
+
var SAAS_CREATE_FORM_PROP_CONTRIBUTORS = /* @__PURE__ */ Symbol(
|
|
747
|
+
"SAAS_CREATE_FORM_PROP_CONTRIBUTORS"
|
|
748
|
+
);
|
|
749
|
+
var SAAS_EDIT_FORM_PROP_CONTRIBUTORS = /* @__PURE__ */ Symbol(
|
|
750
|
+
"SAAS_EDIT_FORM_PROP_CONTRIBUTORS"
|
|
751
|
+
);
|
|
752
|
+
|
|
454
753
|
// src/hooks/useTenants.ts
|
|
455
|
-
var
|
|
754
|
+
var import_react2 = require("react");
|
|
456
755
|
var import_core = require("@abpjs/core");
|
|
457
756
|
function useTenants() {
|
|
458
757
|
const restService = (0, import_core.useRestService)();
|
|
459
|
-
const service = (0,
|
|
460
|
-
const [tenants, setTenants] = (0,
|
|
461
|
-
const [totalCount, setTotalCount] = (0,
|
|
462
|
-
const [selectedTenant, setSelectedTenant] = (0,
|
|
463
|
-
const [isLoading, setIsLoading] = (0,
|
|
464
|
-
const [error, setError] = (0,
|
|
465
|
-
const [sortKey, setSortKey] = (0,
|
|
466
|
-
const [sortOrder, setSortOrder] = (0,
|
|
467
|
-
const [defaultConnectionString, setDefaultConnectionString] = (0,
|
|
468
|
-
const [useSharedDatabase, setUseSharedDatabase] = (0,
|
|
469
|
-
const [visibleFeatures, setVisibleFeatures] = (0,
|
|
470
|
-
const [featuresProviderKey, setFeaturesProviderKey] = (0,
|
|
471
|
-
const fetchTenants = (0,
|
|
758
|
+
const service = (0, import_react2.useMemo)(() => new SaasService(restService), [restService]);
|
|
759
|
+
const [tenants, setTenants] = (0, import_react2.useState)([]);
|
|
760
|
+
const [totalCount, setTotalCount] = (0, import_react2.useState)(0);
|
|
761
|
+
const [selectedTenant, setSelectedTenant] = (0, import_react2.useState)(null);
|
|
762
|
+
const [isLoading, setIsLoading] = (0, import_react2.useState)(false);
|
|
763
|
+
const [error, setError] = (0, import_react2.useState)(null);
|
|
764
|
+
const [sortKey, setSortKey] = (0, import_react2.useState)("name");
|
|
765
|
+
const [sortOrder, setSortOrder] = (0, import_react2.useState)("");
|
|
766
|
+
const [defaultConnectionString, setDefaultConnectionString] = (0, import_react2.useState)("");
|
|
767
|
+
const [useSharedDatabase, setUseSharedDatabase] = (0, import_react2.useState)(true);
|
|
768
|
+
const [visibleFeatures, setVisibleFeatures] = (0, import_react2.useState)(false);
|
|
769
|
+
const [featuresProviderKey, setFeaturesProviderKey] = (0, import_react2.useState)("");
|
|
770
|
+
const fetchTenants = (0, import_react2.useCallback)(
|
|
472
771
|
async (params) => {
|
|
473
772
|
setIsLoading(true);
|
|
474
773
|
setError(null);
|
|
@@ -487,7 +786,7 @@ function useTenants() {
|
|
|
487
786
|
},
|
|
488
787
|
[service]
|
|
489
788
|
);
|
|
490
|
-
const getTenantById = (0,
|
|
789
|
+
const getTenantById = (0, import_react2.useCallback)(
|
|
491
790
|
async (id) => {
|
|
492
791
|
setIsLoading(true);
|
|
493
792
|
setError(null);
|
|
@@ -505,7 +804,7 @@ function useTenants() {
|
|
|
505
804
|
},
|
|
506
805
|
[service]
|
|
507
806
|
);
|
|
508
|
-
const createTenant = (0,
|
|
807
|
+
const createTenant = (0, import_react2.useCallback)(
|
|
509
808
|
async (tenant) => {
|
|
510
809
|
setIsLoading(true);
|
|
511
810
|
setError(null);
|
|
@@ -522,7 +821,7 @@ function useTenants() {
|
|
|
522
821
|
},
|
|
523
822
|
[service]
|
|
524
823
|
);
|
|
525
|
-
const updateTenant = (0,
|
|
824
|
+
const updateTenant = (0, import_react2.useCallback)(
|
|
526
825
|
async (tenant) => {
|
|
527
826
|
setIsLoading(true);
|
|
528
827
|
setError(null);
|
|
@@ -539,7 +838,7 @@ function useTenants() {
|
|
|
539
838
|
},
|
|
540
839
|
[service]
|
|
541
840
|
);
|
|
542
|
-
const deleteTenant = (0,
|
|
841
|
+
const deleteTenant = (0, import_react2.useCallback)(
|
|
543
842
|
async (id) => {
|
|
544
843
|
setIsLoading(true);
|
|
545
844
|
setError(null);
|
|
@@ -556,7 +855,7 @@ function useTenants() {
|
|
|
556
855
|
},
|
|
557
856
|
[service]
|
|
558
857
|
);
|
|
559
|
-
const getDefaultConnectionString = (0,
|
|
858
|
+
const getDefaultConnectionString = (0, import_react2.useCallback)(
|
|
560
859
|
async (id) => {
|
|
561
860
|
setError(null);
|
|
562
861
|
try {
|
|
@@ -572,7 +871,7 @@ function useTenants() {
|
|
|
572
871
|
},
|
|
573
872
|
[service]
|
|
574
873
|
);
|
|
575
|
-
const updateDefaultConnectionString = (0,
|
|
874
|
+
const updateDefaultConnectionString = (0, import_react2.useCallback)(
|
|
576
875
|
async (payload) => {
|
|
577
876
|
setIsLoading(true);
|
|
578
877
|
setError(null);
|
|
@@ -591,7 +890,7 @@ function useTenants() {
|
|
|
591
890
|
},
|
|
592
891
|
[service]
|
|
593
892
|
);
|
|
594
|
-
const deleteDefaultConnectionString = (0,
|
|
893
|
+
const deleteDefaultConnectionString = (0, import_react2.useCallback)(
|
|
595
894
|
async (id) => {
|
|
596
895
|
setIsLoading(true);
|
|
597
896
|
setError(null);
|
|
@@ -610,17 +909,17 @@ function useTenants() {
|
|
|
610
909
|
},
|
|
611
910
|
[service]
|
|
612
911
|
);
|
|
613
|
-
const onVisibleFeaturesChange = (0,
|
|
912
|
+
const onVisibleFeaturesChange = (0, import_react2.useCallback)((value) => {
|
|
614
913
|
setVisibleFeatures(value);
|
|
615
914
|
if (!value) {
|
|
616
915
|
setFeaturesProviderKey("");
|
|
617
916
|
}
|
|
618
917
|
}, []);
|
|
619
|
-
const openFeaturesModal = (0,
|
|
918
|
+
const openFeaturesModal = (0, import_react2.useCallback)((providerKey) => {
|
|
620
919
|
setFeaturesProviderKey(providerKey);
|
|
621
920
|
setVisibleFeatures(true);
|
|
622
921
|
}, []);
|
|
623
|
-
const reset = (0,
|
|
922
|
+
const reset = (0, import_react2.useCallback)(() => {
|
|
624
923
|
setTenants([]);
|
|
625
924
|
setTotalCount(0);
|
|
626
925
|
setSelectedTenant(null);
|
|
@@ -663,22 +962,22 @@ function useTenants() {
|
|
|
663
962
|
}
|
|
664
963
|
|
|
665
964
|
// src/hooks/useEditions.ts
|
|
666
|
-
var
|
|
965
|
+
var import_react3 = require("react");
|
|
667
966
|
var import_core2 = require("@abpjs/core");
|
|
668
967
|
function useEditions() {
|
|
669
968
|
const restService = (0, import_core2.useRestService)();
|
|
670
|
-
const service = (0,
|
|
671
|
-
const [editions, setEditions] = (0,
|
|
672
|
-
const [totalCount, setTotalCount] = (0,
|
|
673
|
-
const [selectedEdition, setSelectedEdition] = (0,
|
|
674
|
-
const [isLoading, setIsLoading] = (0,
|
|
675
|
-
const [error, setError] = (0,
|
|
676
|
-
const [sortKey, setSortKey] = (0,
|
|
677
|
-
const [sortOrder, setSortOrder] = (0,
|
|
678
|
-
const [usageStatistics, setUsageStatistics] = (0,
|
|
679
|
-
const [visibleFeatures, setVisibleFeatures] = (0,
|
|
680
|
-
const [featuresProviderKey, setFeaturesProviderKey] = (0,
|
|
681
|
-
const fetchEditions = (0,
|
|
969
|
+
const service = (0, import_react3.useMemo)(() => new SaasService(restService), [restService]);
|
|
970
|
+
const [editions, setEditions] = (0, import_react3.useState)([]);
|
|
971
|
+
const [totalCount, setTotalCount] = (0, import_react3.useState)(0);
|
|
972
|
+
const [selectedEdition, setSelectedEdition] = (0, import_react3.useState)(null);
|
|
973
|
+
const [isLoading, setIsLoading] = (0, import_react3.useState)(false);
|
|
974
|
+
const [error, setError] = (0, import_react3.useState)(null);
|
|
975
|
+
const [sortKey, setSortKey] = (0, import_react3.useState)("displayName");
|
|
976
|
+
const [sortOrder, setSortOrder] = (0, import_react3.useState)("");
|
|
977
|
+
const [usageStatistics, setUsageStatistics] = (0, import_react3.useState)({});
|
|
978
|
+
const [visibleFeatures, setVisibleFeatures] = (0, import_react3.useState)(false);
|
|
979
|
+
const [featuresProviderKey, setFeaturesProviderKey] = (0, import_react3.useState)("");
|
|
980
|
+
const fetchEditions = (0, import_react3.useCallback)(
|
|
682
981
|
async (params) => {
|
|
683
982
|
setIsLoading(true);
|
|
684
983
|
setError(null);
|
|
@@ -697,7 +996,7 @@ function useEditions() {
|
|
|
697
996
|
},
|
|
698
997
|
[service]
|
|
699
998
|
);
|
|
700
|
-
const getEditionById = (0,
|
|
999
|
+
const getEditionById = (0, import_react3.useCallback)(
|
|
701
1000
|
async (id) => {
|
|
702
1001
|
setIsLoading(true);
|
|
703
1002
|
setError(null);
|
|
@@ -715,7 +1014,7 @@ function useEditions() {
|
|
|
715
1014
|
},
|
|
716
1015
|
[service]
|
|
717
1016
|
);
|
|
718
|
-
const createEdition = (0,
|
|
1017
|
+
const createEdition = (0, import_react3.useCallback)(
|
|
719
1018
|
async (edition) => {
|
|
720
1019
|
setIsLoading(true);
|
|
721
1020
|
setError(null);
|
|
@@ -732,7 +1031,7 @@ function useEditions() {
|
|
|
732
1031
|
},
|
|
733
1032
|
[service]
|
|
734
1033
|
);
|
|
735
|
-
const updateEdition = (0,
|
|
1034
|
+
const updateEdition = (0, import_react3.useCallback)(
|
|
736
1035
|
async (edition) => {
|
|
737
1036
|
setIsLoading(true);
|
|
738
1037
|
setError(null);
|
|
@@ -749,7 +1048,7 @@ function useEditions() {
|
|
|
749
1048
|
},
|
|
750
1049
|
[service]
|
|
751
1050
|
);
|
|
752
|
-
const deleteEdition = (0,
|
|
1051
|
+
const deleteEdition = (0, import_react3.useCallback)(
|
|
753
1052
|
async (id) => {
|
|
754
1053
|
setIsLoading(true);
|
|
755
1054
|
setError(null);
|
|
@@ -766,7 +1065,7 @@ function useEditions() {
|
|
|
766
1065
|
},
|
|
767
1066
|
[service]
|
|
768
1067
|
);
|
|
769
|
-
const fetchUsageStatistics = (0,
|
|
1068
|
+
const fetchUsageStatistics = (0, import_react3.useCallback)(
|
|
770
1069
|
async () => {
|
|
771
1070
|
setError(null);
|
|
772
1071
|
try {
|
|
@@ -781,17 +1080,17 @@ function useEditions() {
|
|
|
781
1080
|
},
|
|
782
1081
|
[service]
|
|
783
1082
|
);
|
|
784
|
-
const onVisibleFeaturesChange = (0,
|
|
1083
|
+
const onVisibleFeaturesChange = (0, import_react3.useCallback)((value) => {
|
|
785
1084
|
setVisibleFeatures(value);
|
|
786
1085
|
if (!value) {
|
|
787
1086
|
setFeaturesProviderKey("");
|
|
788
1087
|
}
|
|
789
1088
|
}, []);
|
|
790
|
-
const openFeaturesModal = (0,
|
|
1089
|
+
const openFeaturesModal = (0, import_react3.useCallback)((providerKey) => {
|
|
791
1090
|
setFeaturesProviderKey(providerKey);
|
|
792
1091
|
setVisibleFeatures(true);
|
|
793
1092
|
}, []);
|
|
794
|
-
const reset = (0,
|
|
1093
|
+
const reset = (0, import_react3.useCallback)(() => {
|
|
795
1094
|
setEditions([]);
|
|
796
1095
|
setTotalCount(0);
|
|
797
1096
|
setSelectedEdition(null);
|
|
@@ -830,11 +1129,11 @@ function useEditions() {
|
|
|
830
1129
|
}
|
|
831
1130
|
|
|
832
1131
|
// src/components/Tenants/TenantsComponent.tsx
|
|
833
|
-
var
|
|
1132
|
+
var import_react4 = require("react");
|
|
834
1133
|
var import_core3 = require("@abpjs/core");
|
|
835
1134
|
var import_theme_shared = require("@abpjs/theme-shared");
|
|
836
|
-
var import_react4 = require("@chakra-ui/react");
|
|
837
1135
|
var import_react5 = require("@chakra-ui/react");
|
|
1136
|
+
var import_react6 = require("@chakra-ui/react");
|
|
838
1137
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
839
1138
|
function TenantsComponent({
|
|
840
1139
|
onTenantCreated,
|
|
@@ -860,19 +1159,19 @@ function TenantsComponent({
|
|
|
860
1159
|
setSelectedTenant
|
|
861
1160
|
} = useTenants();
|
|
862
1161
|
const { editions, fetchEditions } = useEditions();
|
|
863
|
-
const [modalType, setModalType] = (0,
|
|
864
|
-
const [modalVisible, setModalVisible] = (0,
|
|
865
|
-
const [modalBusy, setModalBusy] = (0,
|
|
866
|
-
const [page, setPage] = (0,
|
|
1162
|
+
const [modalType, setModalType] = (0, import_react4.useState)(null);
|
|
1163
|
+
const [modalVisible, setModalVisible] = (0, import_react4.useState)(false);
|
|
1164
|
+
const [modalBusy, setModalBusy] = (0, import_react4.useState)(false);
|
|
1165
|
+
const [page, setPage] = (0, import_react4.useState)(0);
|
|
867
1166
|
const pageSize = 10;
|
|
868
|
-
const [filter, setFilter] = (0,
|
|
869
|
-
const [tenantName, setTenantName] = (0,
|
|
870
|
-
const [tenantEditionId, setTenantEditionId] = (0,
|
|
871
|
-
const [adminEmailAddress, setAdminEmailAddress] = (0,
|
|
872
|
-
const [adminPassword, setAdminPassword] = (0,
|
|
873
|
-
const [connStringUseShared, setConnStringUseShared] = (0,
|
|
874
|
-
const [connString, setConnString] = (0,
|
|
875
|
-
(0,
|
|
1167
|
+
const [filter, setFilter] = (0, import_react4.useState)("");
|
|
1168
|
+
const [tenantName, setTenantName] = (0, import_react4.useState)("");
|
|
1169
|
+
const [tenantEditionId, setTenantEditionId] = (0, import_react4.useState)("");
|
|
1170
|
+
const [adminEmailAddress, setAdminEmailAddress] = (0, import_react4.useState)("");
|
|
1171
|
+
const [adminPassword, setAdminPassword] = (0, import_react4.useState)("");
|
|
1172
|
+
const [connStringUseShared, setConnStringUseShared] = (0, import_react4.useState)(true);
|
|
1173
|
+
const [connString, setConnString] = (0, import_react4.useState)("");
|
|
1174
|
+
(0, import_react4.useEffect)(() => {
|
|
876
1175
|
fetchTenants({
|
|
877
1176
|
skipCount: page * pageSize,
|
|
878
1177
|
maxResultCount: pageSize,
|
|
@@ -880,10 +1179,10 @@ function TenantsComponent({
|
|
|
880
1179
|
getEditionNames: true
|
|
881
1180
|
});
|
|
882
1181
|
}, [page, pageSize, fetchTenants]);
|
|
883
|
-
(0,
|
|
1182
|
+
(0, import_react4.useEffect)(() => {
|
|
884
1183
|
fetchEditions();
|
|
885
1184
|
}, [fetchEditions]);
|
|
886
|
-
const handleSearch = (0,
|
|
1185
|
+
const handleSearch = (0, import_react4.useCallback)(() => {
|
|
887
1186
|
setPage(0);
|
|
888
1187
|
fetchTenants({
|
|
889
1188
|
skipCount: 0,
|
|
@@ -892,7 +1191,7 @@ function TenantsComponent({
|
|
|
892
1191
|
getEditionNames: true
|
|
893
1192
|
});
|
|
894
1193
|
}, [filter, pageSize, fetchTenants]);
|
|
895
|
-
const handleAddTenant = (0,
|
|
1194
|
+
const handleAddTenant = (0, import_react4.useCallback)(() => {
|
|
896
1195
|
setSelectedTenant(null);
|
|
897
1196
|
setTenantName("");
|
|
898
1197
|
setTenantEditionId("");
|
|
@@ -901,7 +1200,7 @@ function TenantsComponent({
|
|
|
901
1200
|
setModalType("tenant");
|
|
902
1201
|
setModalVisible(true);
|
|
903
1202
|
}, [setSelectedTenant]);
|
|
904
|
-
const handleEditTenant = (0,
|
|
1203
|
+
const handleEditTenant = (0, import_react4.useCallback)(
|
|
905
1204
|
async (id) => {
|
|
906
1205
|
const result = await getTenantById(id);
|
|
907
1206
|
if (result.success && result.data) {
|
|
@@ -913,7 +1212,7 @@ function TenantsComponent({
|
|
|
913
1212
|
},
|
|
914
1213
|
[getTenantById]
|
|
915
1214
|
);
|
|
916
|
-
const handleEditConnectionString = (0,
|
|
1215
|
+
const handleEditConnectionString = (0, import_react4.useCallback)(
|
|
917
1216
|
async (id) => {
|
|
918
1217
|
const tenantResult = await getTenantById(id);
|
|
919
1218
|
if (tenantResult.success) {
|
|
@@ -926,13 +1225,13 @@ function TenantsComponent({
|
|
|
926
1225
|
},
|
|
927
1226
|
[getTenantById, getDefaultConnectionString]
|
|
928
1227
|
);
|
|
929
|
-
const handleDeleteTenant = (0,
|
|
1228
|
+
const handleDeleteTenant = (0, import_react4.useCallback)(
|
|
930
1229
|
async (tenant) => {
|
|
931
1230
|
const status = await warn(
|
|
932
1231
|
t("Saas::TenantDeletionConfirmationMessage").replace("{0}", tenant.name),
|
|
933
1232
|
t("Saas::AreYouSure")
|
|
934
1233
|
);
|
|
935
|
-
if (status === import_theme_shared.
|
|
1234
|
+
if (status === import_theme_shared.Confirmation.Status.confirm) {
|
|
936
1235
|
const result = await deleteTenant(tenant.id);
|
|
937
1236
|
if (result.success) {
|
|
938
1237
|
onTenantDeleted?.(tenant.id);
|
|
@@ -947,7 +1246,7 @@ function TenantsComponent({
|
|
|
947
1246
|
},
|
|
948
1247
|
[warn, t, deleteTenant, onTenantDeleted, fetchTenants, page, pageSize, filter]
|
|
949
1248
|
);
|
|
950
|
-
const handleSaveTenant = (0,
|
|
1249
|
+
const handleSaveTenant = (0, import_react4.useCallback)(async () => {
|
|
951
1250
|
if (!tenantName.trim()) return;
|
|
952
1251
|
setModalBusy(true);
|
|
953
1252
|
try {
|
|
@@ -1004,7 +1303,7 @@ function TenantsComponent({
|
|
|
1004
1303
|
pageSize,
|
|
1005
1304
|
filter
|
|
1006
1305
|
]);
|
|
1007
|
-
const handleSaveConnectionString = (0,
|
|
1306
|
+
const handleSaveConnectionString = (0, import_react4.useCallback)(async () => {
|
|
1008
1307
|
if (!selectedTenant?.id) return;
|
|
1009
1308
|
setModalBusy(true);
|
|
1010
1309
|
try {
|
|
@@ -1027,14 +1326,14 @@ function TenantsComponent({
|
|
|
1027
1326
|
deleteDefaultConnectionString,
|
|
1028
1327
|
updateDefaultConnectionString
|
|
1029
1328
|
]);
|
|
1030
|
-
const handleSave = (0,
|
|
1329
|
+
const handleSave = (0, import_react4.useCallback)(() => {
|
|
1031
1330
|
if (modalType === "tenant") {
|
|
1032
1331
|
handleSaveTenant();
|
|
1033
1332
|
} else if (modalType === "connectionString") {
|
|
1034
1333
|
handleSaveConnectionString();
|
|
1035
1334
|
}
|
|
1036
1335
|
}, [modalType, handleSaveTenant, handleSaveConnectionString]);
|
|
1037
|
-
const handleCloseModal = (0,
|
|
1336
|
+
const handleCloseModal = (0, import_react4.useCallback)(() => {
|
|
1038
1337
|
setModalVisible(false);
|
|
1039
1338
|
setModalType(null);
|
|
1040
1339
|
setSelectedTenant(null);
|
|
@@ -1046,14 +1345,14 @@ function TenantsComponent({
|
|
|
1046
1345
|
}
|
|
1047
1346
|
return selectedTenant?.id ? t("Saas::Edit") : t("Saas::NewTenant");
|
|
1048
1347
|
};
|
|
1049
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1050
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1051
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Box, { id: "saas-tenants-wrapper", className: "card", children: [
|
|
1349
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Flex, { justifyContent: "space-between", alignItems: "center", mb: 4, children: [
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Text, { fontSize: "xl", fontWeight: "bold", children: t("Saas::Tenants") }),
|
|
1052
1351
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.Button, { colorPalette: "blue", onClick: handleAddTenant, children: t("Saas::NewTenant") })
|
|
1053
1352
|
] }),
|
|
1054
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1353
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Flex, { gap: 2, mb: 4, children: [
|
|
1055
1354
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1056
|
-
|
|
1355
|
+
import_react5.Input,
|
|
1057
1356
|
{
|
|
1058
1357
|
value: filter,
|
|
1059
1358
|
onChange: (e) => setFilter(e.target.value),
|
|
@@ -1063,17 +1362,17 @@ function TenantsComponent({
|
|
|
1063
1362
|
),
|
|
1064
1363
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.Button, { onClick: handleSearch, children: t("AbpUi::Search") })
|
|
1065
1364
|
] }),
|
|
1066
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1067
|
-
isLoading && tenants.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1068
|
-
!isLoading && tenants.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1069
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1070
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1071
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1072
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1073
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1365
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Box, { mb: 4, p: 3, bg: "red.100", borderRadius: "md", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Text, { color: "red.800", children: error }) }),
|
|
1366
|
+
isLoading && tenants.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Flex, { justifyContent: "center", p: 8, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Spinner, { size: "lg" }) }),
|
|
1367
|
+
!isLoading && tenants.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Text, { textAlign: "center", p: 8, color: "gray.500", children: t("Saas::NoTenantsFound") }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Box, { borderWidth: "1px", borderRadius: "md", overflow: "hidden", children: [
|
|
1368
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Table.Root, { children: [
|
|
1369
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Table.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Table.Row, { children: [
|
|
1370
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Table.ColumnHeader, { children: t("Saas::Actions") }),
|
|
1371
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Table.ColumnHeader, { children: t("Saas::TenantName") }),
|
|
1372
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Table.ColumnHeader, { children: t("Saas::EditionName") })
|
|
1074
1373
|
] }) }),
|
|
1075
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1076
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1374
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Table.Body, { children: tenants.map((tenant) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Table.Row, { children: [
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Table.Cell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Flex, { gap: 1, children: [
|
|
1077
1376
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1078
1377
|
import_theme_shared.Button,
|
|
1079
1378
|
{
|
|
@@ -1104,13 +1403,13 @@ function TenantsComponent({
|
|
|
1104
1403
|
}
|
|
1105
1404
|
)
|
|
1106
1405
|
] }) }),
|
|
1107
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1108
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1406
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Table.Cell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Text, { fontWeight: "medium", children: tenant.name }) }),
|
|
1407
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Table.Cell, { children: tenant.editionName ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Badge, { colorPalette: "blue", children: tenant.editionName }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Text, { color: "gray.500", children: "-" }) })
|
|
1109
1408
|
] }, tenant.id)) })
|
|
1110
1409
|
] }),
|
|
1111
|
-
totalCount > pageSize && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1112
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1113
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1410
|
+
totalCount > pageSize && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Flex, { justifyContent: "space-between", alignItems: "center", p: 4, borderTopWidth: "1px", children: [
|
|
1411
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react5.Text, { fontSize: "sm", children: `${page * pageSize + 1} - ${Math.min((page + 1) * pageSize, totalCount)} / ${totalCount}` }),
|
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Flex, { gap: 2, children: [
|
|
1114
1413
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1115
1414
|
import_theme_shared.Button,
|
|
1116
1415
|
{
|
|
@@ -1138,14 +1437,14 @@ function TenantsComponent({
|
|
|
1138
1437
|
visible: modalVisible,
|
|
1139
1438
|
onVisibleChange: setModalVisible,
|
|
1140
1439
|
header: getModalTitle(),
|
|
1141
|
-
footer: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1440
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Flex, { gap: 2, children: [
|
|
1142
1441
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.Button, { variant: "outline", onClick: handleCloseModal, children: t("Saas::Cancel") }),
|
|
1143
1442
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.Button, { colorPalette: "blue", onClick: handleSave, loading: modalBusy, children: t("AbpIdentity::Save") })
|
|
1144
1443
|
] }),
|
|
1145
1444
|
children: [
|
|
1146
|
-
modalType === "tenant" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1445
|
+
modalType === "tenant" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.VStack, { gap: 4, align: "stretch", children: [
|
|
1147
1446
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.FormField, { label: t("Saas::TenantName"), required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1148
|
-
|
|
1447
|
+
import_react5.Input,
|
|
1149
1448
|
{
|
|
1150
1449
|
value: tenantName,
|
|
1151
1450
|
onChange: (e) => setTenantName(e.target.value),
|
|
@@ -1153,8 +1452,8 @@ function TenantsComponent({
|
|
|
1153
1452
|
autoFocus: true
|
|
1154
1453
|
}
|
|
1155
1454
|
) }),
|
|
1156
|
-
editions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.FormField, { label: t("Saas::Edition"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1157
|
-
|
|
1455
|
+
editions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.FormField, { label: t("Saas::Edition"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react6.NativeSelectRoot, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1456
|
+
import_react6.NativeSelectField,
|
|
1158
1457
|
{
|
|
1159
1458
|
value: tenantEditionId,
|
|
1160
1459
|
onChange: (e) => setTenantEditionId(e.target.value),
|
|
@@ -1166,7 +1465,7 @@ function TenantsComponent({
|
|
|
1166
1465
|
) }) }),
|
|
1167
1466
|
!selectedTenant && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1168
1467
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.FormField, { label: t("Saas::AdminEmailAddress"), required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1169
|
-
|
|
1468
|
+
import_react5.Input,
|
|
1170
1469
|
{
|
|
1171
1470
|
type: "email",
|
|
1172
1471
|
value: adminEmailAddress,
|
|
@@ -1175,7 +1474,7 @@ function TenantsComponent({
|
|
|
1175
1474
|
}
|
|
1176
1475
|
) }),
|
|
1177
1476
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.FormField, { label: t("Saas::AdminPassword"), required: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1178
|
-
|
|
1477
|
+
import_react5.Input,
|
|
1179
1478
|
{
|
|
1180
1479
|
type: "password",
|
|
1181
1480
|
value: adminPassword,
|
|
@@ -1185,8 +1484,8 @@ function TenantsComponent({
|
|
|
1185
1484
|
) })
|
|
1186
1485
|
] })
|
|
1187
1486
|
] }),
|
|
1188
|
-
modalType === "connectionString" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1189
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1487
|
+
modalType === "connectionString" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.VStack, { gap: 4, align: "stretch", children: [
|
|
1488
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react5.Flex, { alignItems: "center", gap: 2, children: [
|
|
1190
1489
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1191
1490
|
"input",
|
|
1192
1491
|
{
|
|
@@ -1199,7 +1498,7 @@ function TenantsComponent({
|
|
|
1199
1498
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: "useSharedDatabase", children: t("Saas::DisplayName:UseSharedDatabase") })
|
|
1200
1499
|
] }),
|
|
1201
1500
|
!connStringUseShared && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_theme_shared.FormField, { label: t("Saas::DisplayName:DefaultConnectionString"), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1202
|
-
|
|
1501
|
+
import_react5.Input,
|
|
1203
1502
|
{
|
|
1204
1503
|
value: connString,
|
|
1205
1504
|
onChange: (e) => setConnString(e.target.value),
|
|
@@ -1214,10 +1513,10 @@ function TenantsComponent({
|
|
|
1214
1513
|
}
|
|
1215
1514
|
|
|
1216
1515
|
// src/components/Editions/EditionsComponent.tsx
|
|
1217
|
-
var
|
|
1516
|
+
var import_react7 = require("react");
|
|
1218
1517
|
var import_core4 = require("@abpjs/core");
|
|
1219
1518
|
var import_theme_shared2 = require("@abpjs/theme-shared");
|
|
1220
|
-
var
|
|
1519
|
+
var import_react8 = require("@chakra-ui/react");
|
|
1221
1520
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
1222
1521
|
function EditionsComponent({
|
|
1223
1522
|
onEditionCreated,
|
|
@@ -1240,20 +1539,20 @@ function EditionsComponent({
|
|
|
1240
1539
|
deleteEdition,
|
|
1241
1540
|
setSelectedEdition
|
|
1242
1541
|
} = useEditions();
|
|
1243
|
-
const [modalVisible, setModalVisible] = (0,
|
|
1244
|
-
const [modalBusy, setModalBusy] = (0,
|
|
1245
|
-
const [page, setPage] = (0,
|
|
1542
|
+
const [modalVisible, setModalVisible] = (0, import_react7.useState)(false);
|
|
1543
|
+
const [modalBusy, setModalBusy] = (0, import_react7.useState)(false);
|
|
1544
|
+
const [page, setPage] = (0, import_react7.useState)(0);
|
|
1246
1545
|
const pageSize = 10;
|
|
1247
|
-
const [filter, setFilter] = (0,
|
|
1248
|
-
const [displayName, setDisplayName] = (0,
|
|
1249
|
-
(0,
|
|
1546
|
+
const [filter, setFilter] = (0, import_react7.useState)("");
|
|
1547
|
+
const [displayName, setDisplayName] = (0, import_react7.useState)("");
|
|
1548
|
+
(0, import_react7.useEffect)(() => {
|
|
1250
1549
|
fetchEditions({
|
|
1251
1550
|
skipCount: page * pageSize,
|
|
1252
1551
|
maxResultCount: pageSize,
|
|
1253
1552
|
filter: filter || void 0
|
|
1254
1553
|
});
|
|
1255
1554
|
}, [page, pageSize, fetchEditions]);
|
|
1256
|
-
const handleSearch = (0,
|
|
1555
|
+
const handleSearch = (0, import_react7.useCallback)(() => {
|
|
1257
1556
|
setPage(0);
|
|
1258
1557
|
fetchEditions({
|
|
1259
1558
|
skipCount: 0,
|
|
@@ -1261,12 +1560,12 @@ function EditionsComponent({
|
|
|
1261
1560
|
filter: filter || void 0
|
|
1262
1561
|
});
|
|
1263
1562
|
}, [filter, pageSize, fetchEditions]);
|
|
1264
|
-
const handleAddEdition = (0,
|
|
1563
|
+
const handleAddEdition = (0, import_react7.useCallback)(() => {
|
|
1265
1564
|
setSelectedEdition(null);
|
|
1266
1565
|
setDisplayName("");
|
|
1267
1566
|
setModalVisible(true);
|
|
1268
1567
|
}, [setSelectedEdition]);
|
|
1269
|
-
const handleEditEdition = (0,
|
|
1568
|
+
const handleEditEdition = (0, import_react7.useCallback)(
|
|
1270
1569
|
async (id) => {
|
|
1271
1570
|
const result = await getEditionById(id);
|
|
1272
1571
|
if (result.success && result.data) {
|
|
@@ -1276,13 +1575,13 @@ function EditionsComponent({
|
|
|
1276
1575
|
},
|
|
1277
1576
|
[getEditionById]
|
|
1278
1577
|
);
|
|
1279
|
-
const handleDeleteEdition = (0,
|
|
1578
|
+
const handleDeleteEdition = (0, import_react7.useCallback)(
|
|
1280
1579
|
async (edition) => {
|
|
1281
1580
|
const status = await warn(
|
|
1282
1581
|
t("Saas::EditionDeletionConfirmationMessage").replace("{0}", edition.displayName),
|
|
1283
1582
|
t("Saas::AreYouSure")
|
|
1284
1583
|
);
|
|
1285
|
-
if (status === import_theme_shared2.
|
|
1584
|
+
if (status === import_theme_shared2.Confirmation.Status.confirm) {
|
|
1286
1585
|
const result = await deleteEdition(edition.id);
|
|
1287
1586
|
if (result.success) {
|
|
1288
1587
|
onEditionDeleted?.(edition.id);
|
|
@@ -1296,13 +1595,13 @@ function EditionsComponent({
|
|
|
1296
1595
|
},
|
|
1297
1596
|
[warn, t, deleteEdition, onEditionDeleted, fetchEditions, page, pageSize, filter]
|
|
1298
1597
|
);
|
|
1299
|
-
const handleManageFeatures = (0,
|
|
1598
|
+
const handleManageFeatures = (0, import_react7.useCallback)(
|
|
1300
1599
|
(editionId) => {
|
|
1301
1600
|
onManageFeatures?.(editionId);
|
|
1302
1601
|
},
|
|
1303
1602
|
[onManageFeatures]
|
|
1304
1603
|
);
|
|
1305
|
-
const handleSave = (0,
|
|
1604
|
+
const handleSave = (0, import_react7.useCallback)(async () => {
|
|
1306
1605
|
if (!displayName.trim()) return;
|
|
1307
1606
|
setModalBusy(true);
|
|
1308
1607
|
try {
|
|
@@ -1350,19 +1649,19 @@ function EditionsComponent({
|
|
|
1350
1649
|
pageSize,
|
|
1351
1650
|
filter
|
|
1352
1651
|
]);
|
|
1353
|
-
const handleCloseModal = (0,
|
|
1652
|
+
const handleCloseModal = (0, import_react7.useCallback)(() => {
|
|
1354
1653
|
setModalVisible(false);
|
|
1355
1654
|
setSelectedEdition(null);
|
|
1356
1655
|
}, [setSelectedEdition]);
|
|
1357
1656
|
const totalPages = Math.ceil(totalCount / pageSize);
|
|
1358
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1359
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1360
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1657
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Box, { id: "saas-editions-wrapper", className: "card", children: [
|
|
1658
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Flex, { justifyContent: "space-between", alignItems: "center", mb: 4, children: [
|
|
1659
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Text, { fontSize: "xl", fontWeight: "bold", children: t("Saas::Editions") }),
|
|
1361
1660
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_theme_shared2.Button, { colorPalette: "blue", onClick: handleAddEdition, children: t("Saas::NewEdition") })
|
|
1362
1661
|
] }),
|
|
1363
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1662
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Flex, { gap: 2, mb: 4, children: [
|
|
1364
1663
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1365
|
-
|
|
1664
|
+
import_react8.Input,
|
|
1366
1665
|
{
|
|
1367
1666
|
value: filter,
|
|
1368
1667
|
onChange: (e) => setFilter(e.target.value),
|
|
@@ -1372,16 +1671,16 @@ function EditionsComponent({
|
|
|
1372
1671
|
),
|
|
1373
1672
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_theme_shared2.Button, { onClick: handleSearch, children: t("AbpUi::Search") })
|
|
1374
1673
|
] }),
|
|
1375
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1376
|
-
isLoading && editions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1377
|
-
!isLoading && editions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1378
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1379
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1380
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1381
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1674
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Box, { mb: 4, p: 3, bg: "red.100", borderRadius: "md", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Text, { color: "red.800", children: error }) }),
|
|
1675
|
+
isLoading && editions.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Flex, { justifyContent: "center", p: 8, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Spinner, { size: "lg" }) }),
|
|
1676
|
+
!isLoading && editions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Text, { textAlign: "center", p: 8, color: "gray.500", children: t("Saas::NoEditionsFound") }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Box, { borderWidth: "1px", borderRadius: "md", overflow: "hidden", children: [
|
|
1677
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Table.Root, { children: [
|
|
1678
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Table.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Table.Row, { children: [
|
|
1679
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Table.ColumnHeader, { children: t("Saas::Actions") }),
|
|
1680
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Table.ColumnHeader, { children: t("Saas::EditionName") })
|
|
1382
1681
|
] }) }),
|
|
1383
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1384
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1682
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Table.Body, { children: editions.map((edition) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Table.Row, { children: [
|
|
1683
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Table.Cell, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Flex, { gap: 1, children: [
|
|
1385
1684
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1386
1685
|
import_theme_shared2.Button,
|
|
1387
1686
|
{
|
|
@@ -1412,12 +1711,12 @@ function EditionsComponent({
|
|
|
1412
1711
|
}
|
|
1413
1712
|
)
|
|
1414
1713
|
] }) }),
|
|
1415
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1714
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Table.Cell, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Text, { fontWeight: "medium", children: edition.displayName }) })
|
|
1416
1715
|
] }, edition.id)) })
|
|
1417
1716
|
] }),
|
|
1418
|
-
totalCount > pageSize && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1419
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1420
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1717
|
+
totalCount > pageSize && /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Flex, { justifyContent: "space-between", alignItems: "center", p: 4, borderTopWidth: "1px", children: [
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.Text, { fontSize: "sm", children: `${page * pageSize + 1} - ${Math.min((page + 1) * pageSize, totalCount)} / ${totalCount}` }),
|
|
1719
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Flex, { gap: 2, children: [
|
|
1421
1720
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1422
1721
|
import_theme_shared2.Button,
|
|
1423
1722
|
{
|
|
@@ -1445,12 +1744,12 @@ function EditionsComponent({
|
|
|
1445
1744
|
visible: modalVisible,
|
|
1446
1745
|
onVisibleChange: setModalVisible,
|
|
1447
1746
|
header: selectedEdition?.id ? t("Saas::Edit") : t("Saas::NewEdition"),
|
|
1448
|
-
footer: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
1747
|
+
footer: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_react8.Flex, { gap: 2, children: [
|
|
1449
1748
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_theme_shared2.Button, { variant: "outline", onClick: handleCloseModal, children: t("Saas::Cancel") }),
|
|
1450
1749
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_theme_shared2.Button, { colorPalette: "blue", onClick: handleSave, loading: modalBusy, children: t("AbpIdentity::Save") })
|
|
1451
1750
|
] }),
|
|
1452
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1453
|
-
|
|
1751
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react8.VStack, { gap: 4, align: "stretch", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_theme_shared2.FormField, { label: t("Saas::EditionName"), required: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1752
|
+
import_react8.Input,
|
|
1454
1753
|
{
|
|
1455
1754
|
value: displayName,
|
|
1456
1755
|
onChange: (e) => setDisplayName(e.target.value),
|
|
@@ -1464,13 +1763,41 @@ function EditionsComponent({
|
|
|
1464
1763
|
}
|
|
1465
1764
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1466
1765
|
0 && (module.exports = {
|
|
1766
|
+
DEFAULT_EDITIONS_CREATE_FORM_PROPS,
|
|
1767
|
+
DEFAULT_EDITIONS_EDIT_FORM_PROPS,
|
|
1768
|
+
DEFAULT_EDITIONS_ENTITY_ACTIONS,
|
|
1769
|
+
DEFAULT_EDITIONS_ENTITY_PROPS,
|
|
1770
|
+
DEFAULT_EDITIONS_TOOLBAR_ACTIONS,
|
|
1771
|
+
DEFAULT_SAAS_CREATE_FORM_PROPS,
|
|
1772
|
+
DEFAULT_SAAS_EDIT_FORM_PROPS,
|
|
1773
|
+
DEFAULT_SAAS_ENTITY_ACTIONS,
|
|
1774
|
+
DEFAULT_SAAS_ENTITY_PROPS,
|
|
1775
|
+
DEFAULT_SAAS_TOOLBAR_ACTIONS,
|
|
1776
|
+
DEFAULT_TENANTS_CREATE_FORM_PROPS,
|
|
1777
|
+
DEFAULT_TENANTS_EDIT_FORM_PROPS,
|
|
1778
|
+
DEFAULT_TENANTS_ENTITY_ACTIONS,
|
|
1779
|
+
DEFAULT_TENANTS_ENTITY_PROPS,
|
|
1780
|
+
DEFAULT_TENANTS_TOOLBAR_ACTIONS,
|
|
1467
1781
|
EditionsComponent,
|
|
1782
|
+
SAAS_CREATE_FORM_PROP_CONTRIBUTORS,
|
|
1783
|
+
SAAS_EDIT_FORM_PROP_CONTRIBUTORS,
|
|
1784
|
+
SAAS_ENTITY_ACTION_CONTRIBUTORS,
|
|
1785
|
+
SAAS_ENTITY_PROP_CONTRIBUTORS,
|
|
1468
1786
|
SAAS_ROUTES,
|
|
1787
|
+
SAAS_ROUTE_CONFIG,
|
|
1788
|
+
SAAS_ROUTE_PROVIDERS,
|
|
1789
|
+
SAAS_TOOLBAR_ACTION_CONTRIBUTORS,
|
|
1790
|
+
SaasExtensionsGuard,
|
|
1469
1791
|
SaasService,
|
|
1470
1792
|
SaasStateService,
|
|
1471
1793
|
TenantsComponent,
|
|
1794
|
+
configureRoutes,
|
|
1472
1795
|
eSaasComponents,
|
|
1796
|
+
eSaasPolicyNames,
|
|
1473
1797
|
eSaasRouteNames,
|
|
1798
|
+
initializeSaasRoutes,
|
|
1799
|
+
saasExtensionsGuard,
|
|
1474
1800
|
useEditions,
|
|
1801
|
+
useSaasExtensionsGuard,
|
|
1475
1802
|
useTenants
|
|
1476
1803
|
});
|