@inceptionbg/main 3.1.15 → 3.1.16

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.ts CHANGED
@@ -1,14 +1,16 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosResponse } from 'axios';
3
3
  export { AxiosError } from 'axios';
4
- import { ISimpleObjectWithCode, ISimpleObject, ISelectData, IPagination, ToastContainerProps, IHeaderUserMenuDialogsProps, IAnyObject, INotificationsProps, IReportTemplateData, IReportTemplate as IReportTemplate$1, IRoute } from '@inceptionbg/iui';
4
+ import * as _inceptionbg_iui from '@inceptionbg/iui';
5
+ import { ISimpleObjectWithCode, ISimpleObject, ISelectData, IPagination, IReportTemplate, ToastContainerProps, IHeaderUserMenuDialogsProps, IAnyObject, INotificationsProps, IHeaderUserMenuProps, IReportTemplateData, ITableTemplateData, ITableItemDeleteData, IRoute } from '@inceptionbg/iui';
5
6
  import { IconDefinition as IconDefinition$1 } from '@fortawesome/fontawesome-svg-core';
6
7
  import { IconDefinition } from '@fortawesome/fontawesome-common-types';
8
+ import * as _tanstack_react_query from '@tanstack/react-query';
7
9
  import { UseMutationResult, QueryClient } from '@tanstack/react-query';
8
- import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
9
10
  import { FC, ReactNode, Dispatch, SetStateAction } from 'react';
10
11
  import * as react_jsx_runtime from 'react/jsx-runtime';
11
- import * as _tanstack_query_core_build_legacy_hydration_DgUcX5FN from '@tanstack/query-core/build/legacy/hydration-DgUcX5FN';
12
+ import * as _tanstack_query_core from '@tanstack/query-core';
13
+ import * as zustand from 'zustand';
12
14
 
13
15
  declare const moduleIds: readonly ["DASHBOARD", "ADMIN", "EARCHIVE", "ERDS", "EINVOICE", "EFORMS", "EDMS", "ESIGN", "EVALIDATION", "EPROCUREMENT", "EREGISTER", "PAM", "DISPATCH_ADVICE", "TELEGRAM_MNGMNT", "VAT_EVIDENCE", "VEOSP", "ERP_CASH_REGISTER", "ERP_FIXED_ASSETS", "ERP_RIF", "ERP_MAT_ACC", "ERP_SMALL_INVENTORY", "ERP_WMS", "JISUSZ_BACKOFFICE", "MONITORING"];
14
16
  declare const moduleIcon: {
@@ -22,6 +24,12 @@ type IModule = {
22
24
  url: string;
23
25
  disabled?: boolean;
24
26
  };
27
+ interface IModuleIdsObj {
28
+ availableModules: IModuleId[];
29
+ userModules: IModuleId[];
30
+ organizationModules: IModuleId[];
31
+ activeModules: IModuleId[];
32
+ }
25
33
 
26
34
  interface IRole {
27
35
  uuid: string;
@@ -1226,7 +1234,7 @@ type IDeleteItemMutation = (props: {
1226
1234
  }, unknown>;
1227
1235
 
1228
1236
  declare const useGetMyOrganizations: ({ enabled, pagination, filters, }: {
1229
- enabled?: boolean | undefined;
1237
+ enabled?: boolean;
1230
1238
  pagination: IPagination;
1231
1239
  filters: {
1232
1240
  status?: OrganizationStatus;
@@ -1234,10 +1242,10 @@ declare const useGetMyOrganizations: ({ enabled, pagination, filters, }: {
1234
1242
  subsystem?: IModuleId | null;
1235
1243
  excludeOrganizationUuid?: string;
1236
1244
  };
1237
- }) => _tanstack_react_query_build_legacy_types.UseQueryResult<{
1245
+ }) => _tanstack_react_query.UseQueryResult<{
1238
1246
  organizations: IOrganization[];
1239
1247
  totalRows: number;
1240
- subsystems: ("DASHBOARD" | "ADMIN" | "EARCHIVE" | "ERDS" | "EINVOICE" | "EFORMS" | "EDMS" | "ESIGN" | "EVALIDATION" | "EPROCUREMENT" | "EREGISTER" | "PAM" | "DISPATCH_ADVICE" | "TELEGRAM_MNGMNT" | "VAT_EVIDENCE" | "VEOSP" | "ERP_CASH_REGISTER" | "ERP_FIXED_ASSETS" | "ERP_RIF" | "ERP_MAT_ACC" | "ERP_SMALL_INVENTORY" | "ERP_WMS" | "JISUSZ_BACKOFFICE" | "MONITORING")[];
1248
+ subsystems: IModuleId[];
1241
1249
  }, Error>;
1242
1250
 
1243
1251
  type IReportTemplatesFetchOption = 'SORT' | 'FILTER_VALUES' | 'COLUMNS' | 'CREATED_BY' | 'ORGANIZATION' | 'OPTIONS';
@@ -1250,19 +1258,24 @@ type IReportTemplatesProps = {
1250
1258
  };
1251
1259
  fetchOptions?: IReportTemplatesFetchOption[];
1252
1260
  };
1253
- declare const useGetReportTemplates: (params: IReportTemplatesProps, enabled: boolean) => _tanstack_react_query_build_legacy_types.UseQueryResult<{
1261
+ declare const useGetReportTemplates: (params: IReportTemplatesProps, enabled: boolean) => _tanstack_react_query.UseQueryResult<{
1254
1262
  templates: IReportTemplate[];
1255
1263
  totalRows: number;
1256
1264
  }, Error>;
1257
- declare const useCreateReportTemplate: () => _tanstack_react_query_build_legacy_types.UseMutationResult<axios.AxiosResponse<any, any>, Error, IReportTemplate, unknown>;
1265
+ declare const useCreateReportTemplate: () => _tanstack_react_query.UseMutationResult<axios.AxiosResponse<any, any, {}>, Error, Partial<IReportTemplate>, unknown>;
1258
1266
  declare const useDeleteReportTemplates: IDeleteItemMutation;
1259
1267
 
1260
- declare const useGetUserSettings: (setUserSettings: (data: IUserSettings) => void) => _tanstack_react_query_build_legacy_types.UseQueryResult<IUserSettings, Error>;
1268
+ interface IUserSettingsUpdateOptions {
1269
+ noToast?: boolean;
1270
+ refetchQueries?: boolean;
1271
+ onSuccess?: () => void;
1272
+ }
1273
+ declare const useGetUserSettings: (setUserSettings: (data: IUserSettings) => void) => _tanstack_react_query.UseQueryResult<IUserSettings, Error>;
1261
1274
  declare const useGetUserSettingsItem: (filters: {
1262
1275
  key: string;
1263
1276
  subsystemOrNull?: string;
1264
1277
  organizationUuidOrNull?: string;
1265
- }) => _tanstack_react_query_build_legacy_types.UseQueryResult<IUserSettingsItem, Error>;
1278
+ }) => _tanstack_react_query.UseQueryResult<IUserSettingsItem, Error>;
1266
1279
 
1267
1280
  interface Props$7 {
1268
1281
  toastProps?: ToastContainerProps;
@@ -1350,7 +1363,7 @@ interface IUseUserMenuPropsOptions {
1350
1363
  declare const useUserMenuProps: ({ myAccount, changeOrganization, }?: IUseUserMenuPropsOptions) => IHeaderUserMenuProps;
1351
1364
 
1352
1365
  declare const useDefaultTemplate: (identifier: string) => {
1353
- defaultTemplate: any;
1366
+ defaultTemplate: _inceptionbg_iui.IReportTemplate | undefined;
1354
1367
  isLoadingDefaultTemplate: boolean;
1355
1368
  };
1356
1369
 
@@ -1359,7 +1372,7 @@ interface Props$2 {
1359
1372
  data: IReportTemplateData;
1360
1373
  limit?: number;
1361
1374
  allowPublicCreate?: boolean;
1362
- defaultTemplate?: IReportTemplate$1;
1375
+ defaultTemplate?: IReportTemplate;
1363
1376
  fetchOptions?: IReportTemplatesFetchOption[];
1364
1377
  }
1365
1378
  declare const useReportTemplates: ({ identifier, data, limit, allowPublicCreate, defaultTemplate, fetchOptions, }: Props$2) => ITableTemplateData;
@@ -1374,13 +1387,13 @@ declare const useTableItemsDelete: ({ hasAccess, textId, useDeleteItemsMutation,
1374
1387
 
1375
1388
  declare const useOrgInvites: ({ enabled, pagination, fetchOptions, }: {
1376
1389
  enabled: boolean;
1377
- pagination?: IPagination | undefined;
1378
- fetchOptions?: IOrganizationInvitesFetchOption[] | undefined;
1390
+ pagination?: IPagination;
1391
+ fetchOptions?: IOrganizationInvitesFetchOption[];
1379
1392
  }) => {
1380
1393
  invites: IOrganizationInvite[];
1381
1394
  count: number;
1382
1395
  isFetching: boolean;
1383
- refetch: (options?: _tanstack_query_core_build_legacy_hydration_DgUcX5FN.af | undefined) => Promise<_tanstack_query_core_build_legacy_hydration_DgUcX5FN.av<{
1396
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
1384
1397
  organizationInvites: IOrganizationInvite[];
1385
1398
  totalRows: number;
1386
1399
  }, Error>>;
@@ -1392,15 +1405,67 @@ interface Props {
1392
1405
  }
1393
1406
  declare const RolesWithPrivileges: FC<Props>;
1394
1407
 
1395
- declare const useOrganizationStore: any;
1396
- declare const useModules: () => any;
1397
-
1398
- declare const getToken: () => any;
1399
-
1400
- declare const useUserStore: any;
1408
+ interface OrganizationData {
1409
+ organization: IOrganization | null;
1410
+ orgSettings: IOrganizationSettings;
1411
+ modules: IModuleIdsObj;
1412
+ privileges: Record<string, boolean>;
1413
+ }
1414
+ interface OrganizationState extends OrganizationData {
1415
+ setOrganizationData: (data: OrganizationData) => void;
1416
+ updateOrgSettings: (data: IOrganizationSettings) => void;
1417
+ reset: () => void;
1418
+ }
1419
+ declare const useOrganizationStore: zustand.UseBoundStore<Omit<zustand.StoreApi<OrganizationState>, "setState" | "devtools"> & {
1420
+ setState(partial: OrganizationState | Partial<OrganizationState> | ((state: OrganizationState) => OrganizationState | Partial<OrganizationState>), replace?: false | undefined, action?: (string | {
1421
+ [x: string]: unknown;
1422
+ [x: number]: unknown;
1423
+ [x: symbol]: unknown;
1424
+ type: string;
1425
+ }) | undefined): void;
1426
+ setState(state: OrganizationState | ((state: OrganizationState) => OrganizationState), replace: true, action?: (string | {
1427
+ [x: string]: unknown;
1428
+ [x: number]: unknown;
1429
+ [x: symbol]: unknown;
1430
+ type: string;
1431
+ }) | undefined): void;
1432
+ devtools: {
1433
+ cleanup: () => void;
1434
+ };
1435
+ }>;
1436
+ declare const useModules: () => IModuleIdsObj;
1437
+
1438
+ declare const getToken: () => string | null;
1439
+
1440
+ interface UserState {
1441
+ user: IUser | null;
1442
+ userSettings: IUserSettings;
1443
+ isUpdatingUserSettings: boolean;
1444
+ setUser: (user: IUser | null) => void;
1445
+ setUserSettings: (userSettings: IUserSettings) => void;
1446
+ updateUserSettings: <T extends string = string & {}>(data: IUserSettingsItem<T>, options?: IUserSettingsUpdateOptions) => void;
1447
+ deleteUserSettingsItem: <T extends string = string & {}>(data: Omit<IUserSettingsItem<T>, 'value'>, options?: IUserSettingsUpdateOptions) => void;
1448
+ }
1449
+ declare const useUserStore: zustand.UseBoundStore<Omit<zustand.StoreApi<UserState>, "setState" | "devtools"> & {
1450
+ setState(partial: UserState | Partial<UserState> | ((state: UserState) => UserState | Partial<UserState>), replace?: false | undefined, action?: (string | {
1451
+ [x: string]: unknown;
1452
+ [x: number]: unknown;
1453
+ [x: symbol]: unknown;
1454
+ type: string;
1455
+ }) | undefined): void;
1456
+ setState(state: UserState | ((state: UserState) => UserState), replace: true, action?: (string | {
1457
+ [x: string]: unknown;
1458
+ [x: number]: unknown;
1459
+ [x: symbol]: unknown;
1460
+ type: string;
1461
+ }) | undefined): void;
1462
+ devtools: {
1463
+ cleanup: () => void;
1464
+ };
1465
+ }>;
1401
1466
  declare const useUserSettings: <T extends string = string & {}>() => {
1402
1467
  userSettings: IUserSettings<T>;
1403
- isUpdatingUserSettings: any;
1468
+ isUpdatingUserSettings: boolean;
1404
1469
  updateUserSettings: (data: IUserSettingsItem<T>) => void;
1405
1470
  deleteUserSettingsItem: (data: Omit<IUserSettingsItem<T>, "value">) => void;
1406
1471
  };
@@ -1408,18 +1473,18 @@ declare const useActiveOrgUuid: () => any;
1408
1473
  declare const getActiveOrgUuid: () => any;
1409
1474
  declare const changeOrganization: (uuid: string, updateDefaultOrg?: boolean) => void;
1410
1475
  declare const clearActiveOrg: ({ onSuccess }?: {
1411
- onSuccess?: (() => void) | undefined;
1412
- }) => any;
1476
+ onSuccess?: () => void;
1477
+ }) => void;
1413
1478
 
1414
1479
  declare const login: () => void;
1415
1480
  declare const logout: (options?: {
1416
1481
  appRedirectUrl?: boolean;
1417
1482
  clearData?: boolean;
1418
1483
  }) => void;
1419
- declare const decodeToken: (token?: string | null) => any;
1484
+ declare const decodeToken: (token?: string | null) => IToken | undefined;
1420
1485
  declare const checkToken: (token?: string | null) => {
1421
- token: any;
1422
- isTokenExpired: any;
1486
+ token: string | null;
1487
+ isTokenExpired: boolean | undefined;
1423
1488
  };
1424
1489
 
1425
1490
  declare const debugLog: (...args: any[]) => void;
@@ -2137,4 +2202,5 @@ declare const ssGet: (key: LocalStorageItem) => string | null;
2137
2202
  declare const ssSet: (key: LocalStorageItem, value: string) => void;
2138
2203
  declare const ssRemove: (key: LocalStorageItem) => void;
2139
2204
 
2140
- export { AppWrapper, ApprovalStatus, ArticlesPage, BusinessYearChooser, BusinessYearPage, BusinessYearProvider, Constraints, DeleteItemsDialog, DocumentApprovalFetchOption, DocumentFetchOption, DocumentFileFetchOptions, DocumentIndicies, DocumentSendFetchOption, DocumentStatuses, HeaderUserMenuDialogs, IApproval, IApprovalSearch, IApprovalStep, IApprovalStepSearch, IBankAccount, IBankAccountSearch, ICondition, IConditionIndexData, IConstraint, IContactPerson, IDeleteItemMutation, IDocument, IDocumentAny, IDocumentApproval, IDocumentApprovalStep, IDocumentApprovalVote, IDocumentFile, IDocumentFileParams, IDocumentIndex, IDocumentSearch, IDocumentSend, IDocumentSendSearch, IDocumentType, IEnv, IFile, IFileSignData, IFileType, IFileUpload, IInvoice, IInvoiceItem, ILatestApprovalProcess, IModule, IModuleId, IMutationSuccess, INote, INoteSearch, IOrganization, IOrganizationFetchOption, IOrganizationSearch, IOrganizationSettings, IPartner, IPartnerGroup, IPartnerType, IPartnersSearch, IPhaseGroup, IPhaseGroupSearch, IRole, IRolePrivilege, IServiceApi, IToken, IUploadDocumentType, IUseMutationData, IUser, IUserSettings, IVoteSearch, IndexDataSearch, LastArticlesWidget, OrganizationStatus, OrganizationStatuses, PartnerGroupType, ReactQueryProvider, RolePrivilegeGroup, RolesWithPrivileges, UserFetchOption, changeOrganization, checkToken, clearActiveOrg, debugLog, decodeToken, envVars, getActiveOrgUuid, getToken, i18nMainCyrilic, i18nMainLatin, i18nMainME, login, logout, mainFullScreenRoutes, moduleIcon, moduleIds, queryClient, setBusinessYearContext, ssGet, ssRemove, ssSet, useActiveOrgUuid, useBusinessYearContext, useCreateReportTemplate, useDefaultTemplate, useDeleteReportTemplates, useErrorContext, useGetMyOrganizations, useGetReportTemplates, useGetUserSettings, useGetUserSettingsItem, useModuleSelect, useModules, useNotificationsProps, useOrgInvites, useOrganizationStore, useReportTemplates, useTableItemsDelete, useUserMenuProps, useUserSettings, useUserStore, useUserMenuProps as userMenuProps };
2205
+ export { AppWrapper, ArticlesPage, BusinessYearChooser, BusinessYearPage, BusinessYearProvider, Constraints, DeleteItemsDialog, DocumentStatuses, HeaderUserMenuDialogs, IndexDataSearch, LastArticlesWidget, OrganizationStatuses, ReactQueryProvider, RolesWithPrivileges, changeOrganization, checkToken, clearActiveOrg, debugLog, decodeToken, envVars, getActiveOrgUuid, getToken, i18nMainCyrilic, i18nMainLatin, i18nMainME, login, logout, mainFullScreenRoutes, moduleIcon, moduleIds, queryClient, setBusinessYearContext, ssGet, ssRemove, ssSet, useActiveOrgUuid, useBusinessYearContext, useCreateReportTemplate, useDefaultTemplate, useDeleteReportTemplates, useErrorContext, useGetMyOrganizations, useGetReportTemplates, useGetUserSettings, useGetUserSettingsItem, useModuleSelect, useModules, useNotificationsProps, useOrgInvites, useOrganizationStore, useReportTemplates, useTableItemsDelete, useUserMenuProps, useUserSettings, useUserStore, useUserMenuProps as userMenuProps };
2206
+ export type { ApprovalStatus, DocumentApprovalFetchOption, DocumentFetchOption, DocumentFileFetchOptions, DocumentIndicies, DocumentSendFetchOption, IApproval, IApprovalSearch, IApprovalStep, IApprovalStepSearch, IBankAccount, IBankAccountSearch, ICondition, IConditionIndexData, IConstraint, IContactPerson, IDeleteItemMutation, IDocument, IDocumentAny, IDocumentApproval, IDocumentApprovalStep, IDocumentApprovalVote, IDocumentFile, IDocumentFileParams, IDocumentIndex, IDocumentSearch, IDocumentSend, IDocumentSendSearch, IDocumentType, IEnv, IFile, IFileSignData, IFileType, IFileUpload, IInvoice, IInvoiceItem, ILatestApprovalProcess, IModule, IModuleId, IMutationSuccess, INote, INoteSearch, IOrganization, IOrganizationFetchOption, IOrganizationSearch, IOrganizationSettings, IPartner, IPartnerGroup, IPartnerType, IPartnersSearch, IPhaseGroup, IPhaseGroupSearch, IRole, IRolePrivilege, IServiceApi, IToken, IUploadDocumentType, IUseMutationData, IUser, IUserSettings, IVoteSearch, OrganizationStatus, PartnerGroupType, RolePrivilegeGroup, UserFetchOption };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export{W as AppWrapper,A as ArticlesPage,x as BusinessYearChooser,y as BusinessYearPage,B as BusinessYearProvider,X as DeleteItemsDialog,H as HeaderUserMenuDialogs,Y as IndexDataSearch,L as LastArticlesWidget,_ as ReactQueryProvider,R as RolesWithPrivileges,c as changeOrganization,K as checkToken,g as clearActiveOrg,M as debugLog,N as decodeToken,P as envVars,h as getActiveOrgUuid,m as getToken,F as i18nMainCyrilic,E as i18nMainLatin,G as i18nMainME,Q as login,l as logout,I as mainFullScreenRoutes,S as moduleIcon,J as moduleIds,Z as queryClient,w as setBusinessYearContext,s as ssGet,f as ssRemove,e as ssSet,d as useActiveOrgUuid,v as useBusinessYearContext,T as useCreateReportTemplate,q as useDefaultTemplate,V as useDeleteReportTemplates,p as useErrorContext,b as useGetMyOrganizations,U as useGetReportTemplates,n as useGetUserSettings,o as useGetUserSettingsItem,z as useModuleSelect,k as useModules,D as useNotificationsProps,a as useOrgInvites,j as useOrganizationStore,r as useReportTemplates,t as useTableItemsDelete,C as useUserMenuProps,i as useUserSettings,u as useUserStore,C as userMenuProps}from"./index-9a41643d.js";import"@inceptionbg/iui";import"@tanstack/react-query";import"zustand";import"zustand/middleware";import"react-router";import"react/jsx-runtime";import"axios";import"react";import"crypto-js";import"jwt-decode";import"react-i18next";import"@inceptionbg/icons";import"@inceptionbg/icons/regular";
1
+ export{A as AppWrapper,e as ArticlesPage,B as BusinessYearChooser,f as BusinessYearPage,g as BusinessYearProvider,D as DeleteItemsDialog,H as HeaderUserMenuDialogs,I as IndexDataSearch,L as LastArticlesWidget,R as ReactQueryProvider,h as RolesWithPrivileges,c as changeOrganization,i as checkToken,j as clearActiveOrg,k as debugLog,m as decodeToken,n as envVars,o as getActiveOrgUuid,p as getToken,q as i18nMainCyrilic,r as i18nMainLatin,s as i18nMainME,t as login,l as logout,v as mainFullScreenRoutes,w as moduleIcon,x as moduleIds,y as queryClient,z as setBusinessYearContext,C as ssGet,E as ssRemove,F as ssSet,d as useActiveOrgUuid,G as useBusinessYearContext,J as useCreateReportTemplate,K as useDefaultTemplate,M as useDeleteReportTemplates,N as useErrorContext,b as useGetMyOrganizations,P as useGetReportTemplates,Q as useGetUserSettings,S as useGetUserSettingsItem,T as useModuleSelect,U as useModules,V as useNotificationsProps,a as useOrgInvites,W as useOrganizationStore,X as useReportTemplates,Y as useTableItemsDelete,Z as useUserMenuProps,_ as useUserSettings,u as useUserStore,Z as userMenuProps}from"./index-DdcYXoKX.js";import"@inceptionbg/iui";import"@tanstack/react-query";import"zustand";import"zustand/middleware";import"react-router";import"react/jsx-runtime";import"axios";import"react";import"crypto-js";import"jwt-decode";import"react-i18next";import"@inceptionbg/icons";import"@inceptionbg/icons/regular";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,141 +1,141 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
 
3
- declare const moduleIds = [
4
- 'DASHBOARD',
5
- 'ADMIN',
6
- 'EARCHIVE',
7
- 'ERDS',
8
- 'EINVOICE',
9
- 'EFORMS',
10
- 'EDMS',
11
- 'ESIGN',
12
- 'EVALIDATION',
13
- 'EPROCUREMENT',
14
- 'EREGISTER',
15
- 'PAM',
16
- 'DISPATCH_ADVICE',
17
- 'TELEGRAM_MNGMNT',
18
- 'VAT_EVIDENCE',
19
- 'VEOSP',
20
- // ERP
21
- 'ERP_CASH_REGISTER',
22
- 'ERP_FIXED_ASSETS',
23
- 'ERP_RIF',
24
- 'ERP_MAT_ACC',
25
- 'ERP_SMALL_INVENTORY',
26
- 'ERP_WMS',
27
- // PRIVATE
28
- 'JISUSZ_BACKOFFICE',
29
- 'MONITORING',
30
-
31
- // 'ERP',
32
- // 'FINANCES',
33
- // 'CONTRACTS',
34
- // 'IDM',
35
- // 'REGISTRATION',
36
- // 'QC_REGISTRATION',
37
- // 'SETTINGS',
3
+ declare const moduleIds = [
4
+ 'DASHBOARD',
5
+ 'ADMIN',
6
+ 'EARCHIVE',
7
+ 'ERDS',
8
+ 'EINVOICE',
9
+ 'EFORMS',
10
+ 'EDMS',
11
+ 'ESIGN',
12
+ 'EVALIDATION',
13
+ 'EPROCUREMENT',
14
+ 'EREGISTER',
15
+ 'PAM',
16
+ 'DISPATCH_ADVICE',
17
+ 'TELEGRAM_MNGMNT',
18
+ 'VAT_EVIDENCE',
19
+ 'VEOSP',
20
+ // ERP
21
+ 'ERP_CASH_REGISTER',
22
+ 'ERP_FIXED_ASSETS',
23
+ 'ERP_RIF',
24
+ 'ERP_MAT_ACC',
25
+ 'ERP_SMALL_INVENTORY',
26
+ 'ERP_WMS',
27
+ // PRIVATE
28
+ 'JISUSZ_BACKOFFICE',
29
+ 'MONITORING',
30
+
31
+ // 'ERP',
32
+ // 'FINANCES',
33
+ // 'CONTRACTS',
34
+ // 'IDM',
35
+ // 'REGISTRATION',
36
+ // 'QC_REGISTRATION',
37
+ // 'SETTINGS',
38
38
  ] as const;
39
39
 
40
40
  type IModuleId = (typeof moduleIds)[number];
41
41
 
42
- type IEnv =
43
- | 'DEV'
44
- | 'TEST'
45
- | 'PROD'
46
- | 'LOCAL'
47
- | 'UAT'
48
- | 'TEST_PPLCG'
49
- | 'PROD_PPLCG'
50
- | 'TEST_MSP'
51
- | 'PROD_MSP'
52
- | 'TEST_LOCAL_MSP'
53
- | 'TEST_PTT'
54
- | 'PROD_PTT';
55
-
56
- type IRequiredServiceApi = 'auth' | 'idm' | 'registration' | 'userSettings';
57
-
58
- type IOptionalServiceApi =
59
- | 'codebook'
60
- | 'auditLog'
61
- | 'notifications'
62
- | 'indexData'
63
- | 'reportTemplates'
64
- | 'approvalProcess'
65
- | 'procurement'
66
- | 'archive'
67
- | 'invoice'
68
- | 'delivery'
69
- | 'edms'
70
- | 'rif'
71
- | 'cashRegister'
72
- | 'jisuszProxy'
73
- | 'fosterCare'
74
- | 'article'
75
- | 'approval'
76
- | 'messenger'
77
- | 'veosp'
78
- | 'fixedAssets'
79
- | 'dispatchAdvice'
80
- | 'tasks'
81
- | 'nbs';
82
-
42
+ type IEnv =
43
+ | 'DEV'
44
+ | 'TEST'
45
+ | 'PROD'
46
+ | 'LOCAL'
47
+ | 'UAT'
48
+ | 'TEST_PPLCG'
49
+ | 'PROD_PPLCG'
50
+ | 'TEST_MSP'
51
+ | 'PROD_MSP'
52
+ | 'TEST_LOCAL_MSP'
53
+ | 'TEST_PTT'
54
+ | 'PROD_PTT';
55
+
56
+ type IRequiredServiceApi = 'auth' | 'idm' | 'registration' | 'userSettings';
57
+
58
+ type IOptionalServiceApi =
59
+ | 'codebook'
60
+ | 'auditLog'
61
+ | 'notifications'
62
+ | 'indexData'
63
+ | 'reportTemplates'
64
+ | 'approvalProcess'
65
+ | 'procurement'
66
+ | 'archive'
67
+ | 'invoice'
68
+ | 'delivery'
69
+ | 'edms'
70
+ | 'rif'
71
+ | 'cashRegister'
72
+ | 'jisuszProxy'
73
+ | 'fosterCare'
74
+ | 'article'
75
+ | 'approval'
76
+ | 'messenger'
77
+ | 'veosp'
78
+ | 'fixedAssets'
79
+ | 'dispatchAdvice'
80
+ | 'tasks'
81
+ | 'nbs';
82
+
83
83
  type IServiceApi$1 = IRequiredServiceApi | IOptionalServiceApi;
84
84
 
85
- declare module 'axios' {
86
- interface AxiosRequestConfig {
87
- public?: boolean;
88
- service?: IServiceApi$1;
89
- token?: string;
90
- noToast?: boolean;
91
- noErrors?: boolean;
92
- }
93
- }
94
-
95
- declare module '*.scss' {
96
- const classes: { readonly [key: string]: string };
97
- export { classes };
98
- }
99
- declare module '*.png' {
100
- const src: string;
101
- export { src };
102
- }
103
-
104
- declare module '*.svg' {
105
- const src: string;
106
- export { src };
107
- }
108
-
109
- declare module '*.json' {
110
- const data: any;
111
- export { data };
85
+ declare module 'axios' {
86
+ interface AxiosRequestConfig {
87
+ public?: boolean;
88
+ service?: IServiceApi$1;
89
+ token?: string;
90
+ noToast?: boolean;
91
+ noErrors?: boolean;
92
+ }
112
93
  }
113
94
 
114
- declare module '*.mp3' {
115
- const src: string;
116
- export { src };
95
+ declare module '*.scss' {
96
+ const classes: { readonly [key: string]: string };
97
+ export { classes };
98
+ }
99
+ declare module '*.png' {
100
+ const src: string;
101
+ export { src };
102
+ }
103
+
104
+ declare module '*.svg' {
105
+ const src: string;
106
+ export { src };
107
+ }
108
+
109
+ declare module '*.json' {
110
+ const data: any;
111
+ export { data };
112
+ }
113
+
114
+ declare module '*.mp3' {
115
+ const src: string;
116
+ export { src };
117
117
  }
118
118
 
119
- declare global {
120
- var environment: IEnv;
121
- var moduleId: IModuleId | null;
122
- var moduleUrls: {
123
- [id in IModuleId]?: string;
124
- };
125
- var axiosInstance: AxiosInstance;
126
- var appVersion: string | undefined;
127
- var api: {
128
- apiUrl: string;
129
- clientId: string;
130
- authScope?: string;
131
- additionalScopes?: string[];
132
- redirectUrl?: string;
133
- };
134
- var serviceApiUrls: Partial<Record<IServiceApi, string>> | undefined;
135
- var zE: {
136
- show: () => void;
137
- hide: () => void;
138
- activate: () => void;
139
- setLocale: (locale: string) => void;
140
- };
119
+ declare global {
120
+ var environment: IEnv;
121
+ var moduleId: IModuleId | null;
122
+ var moduleUrls: {
123
+ [id in IModuleId]?: string;
124
+ };
125
+ var axiosInstance: AxiosInstance;
126
+ var appVersion: string | undefined;
127
+ var api: {
128
+ apiUrl: string;
129
+ clientId: string;
130
+ authScope?: string;
131
+ additionalScopes?: string[];
132
+ redirectUrl?: string;
133
+ };
134
+ var serviceApiUrls: Partial<Record<IServiceApi, string>> | undefined;
135
+ var zE: {
136
+ show: () => void;
137
+ hide: () => void;
138
+ activate: () => void;
139
+ setLocale: (locale: string) => void;
140
+ };
141
141
  }
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "@inceptionbg/main",
3
- "version": "3.1.15",
4
- "description": "Main app wrapper for Inception ecosystem",
5
- "type": "module",
6
- "files": [
7
- "dist"
8
- ],
9
- "main": "dist/index.js",
10
- "types": "dist/index.d.ts",
11
- "scripts": {
12
- "build": "rollup -c",
13
- "tsc": "tsc --noEmit",
14
- "lint": "eslint --max-warnings=0 src",
15
- "link-i": "npm link @inceptionbg/iui",
16
- "update-i": "npm i @inceptionbg/iui@latest",
17
- "update-ic": "npm i @inceptionbg/icons@latest",
18
- "release": "npm version patch && npm run build && npm publish"
19
- },
20
- "author": "Aleksandar Sadzak",
21
- "license": "ISC",
22
- "dependencies": {
23
- "axios": "^1.13.5",
24
- "crypto-js": "^4.2.0",
25
- "jwt-decode": "^4.0.0"
26
- },
27
- "devDependencies": {
28
- "@rollup/plugin-commonjs": "^29.0.0",
29
- "@rollup/plugin-image": "^3.0.3",
30
- "@rollup/plugin-terser": "^1.0.0",
31
- "@rollup/plugin-typescript": "^12.3.0",
32
- "@rollup/plugin-url": "^8.0.2",
33
- "@types/crypto-js": "^4.2.2",
34
- "@types/react": "^19.2.14",
35
- "@types/react-dom": "^19.2.3",
36
- "rollup": "^4.57.1",
37
- "rollup-plugin-delete": "^3.0.2",
38
- "rollup-plugin-dts": "^6.3.0",
39
- "rollup-plugin-postcss": "^4.0.2",
40
- "tslib": "^2.8.1"
41
- },
42
- "peerDependencies": {
43
- "@fortawesome/fontawesome-svg-core": ">=7.2.0",
44
- "@inceptionbg/icons": "^1.0.8",
45
- "@inceptionbg/iui": "^2.0.62",
46
- "@tanstack/react-query": ">=5.90.21",
47
- "i18next": ">=26.3.0",
48
- "react": ">=19.2.4 <20",
49
- "react-dom": ">=19.2.4 <20",
50
- "react-i18next": ">=17.0.8",
51
- "react-router": ">=7.17.0",
52
- "sass": ">=1.97.3",
53
- "zustand": ">=5.0.12"
54
- }
55
- }
1
+ {
2
+ "name": "@inceptionbg/main",
3
+ "version": "3.1.16",
4
+ "description": "Main app wrapper for Inception ecosystem",
5
+ "type": "module",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "main": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "scripts": {
12
+ "build": "rollup -c",
13
+ "tsc": "tsc --noEmit",
14
+ "lint": "eslint --max-warnings=0 src",
15
+ "link-i": "npm link @inceptionbg/iui",
16
+ "update-i": "npm i @inceptionbg/iui@latest",
17
+ "update-ic": "npm i @inceptionbg/icons@latest",
18
+ "release": "npm version patch && npm run build && npm publish"
19
+ },
20
+ "author": "Aleksandar Sadzak",
21
+ "license": "ISC",
22
+ "dependencies": {
23
+ "axios": "^1.13.5",
24
+ "crypto-js": "^4.2.0",
25
+ "jwt-decode": "^4.0.0"
26
+ },
27
+ "devDependencies": {
28
+ "@rollup/plugin-commonjs": "^29.0.0",
29
+ "@rollup/plugin-image": "^3.0.3",
30
+ "@rollup/plugin-terser": "^1.0.0",
31
+ "@rollup/plugin-typescript": "^12.3.0",
32
+ "@rollup/plugin-url": "^8.0.2",
33
+ "@types/crypto-js": "^4.2.2",
34
+ "@types/react": "^19.2.14",
35
+ "@types/react-dom": "^19.2.3",
36
+ "rollup": "^4.57.1",
37
+ "rollup-plugin-delete": "^3.0.2",
38
+ "rollup-plugin-dts": "^6.3.0",
39
+ "rollup-plugin-postcss": "^4.0.2",
40
+ "tslib": "^2.8.1"
41
+ },
42
+ "peerDependencies": {
43
+ "@fortawesome/fontawesome-svg-core": ">=7.2.0",
44
+ "@inceptionbg/icons": "^1.0.8",
45
+ "@inceptionbg/iui": "^2.0.62",
46
+ "@tanstack/react-query": ">=5.90.21",
47
+ "i18next": ">=26.3.0",
48
+ "react": ">=19.2.4 <20",
49
+ "react-dom": ">=19.2.4 <20",
50
+ "react-i18next": ">=17.0.8",
51
+ "react-router": ">=7.17.0",
52
+ "sass": ">=1.97.3",
53
+ "zustand": ">=5.0.12"
54
+ }
55
+ }
@@ -1,2 +0,0 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useTranslation as i}from"react-i18next";import{useNavigate as a,Navigate as r}from"react-router";import{u as n,a as o,O as l,b as s,l as c,c as m,d}from"./index-9a41643d.js";import{usePopupControl as u,Alert as p,Button as f,SearchInput as g,List as v,Checkbox as h}from"@inceptionbg/iui";import{useState as b}from"react";import"@tanstack/react-query";import"zustand";import"zustand/middleware";import"axios";import"crypto-js";import"jwt-decode";import"@inceptionbg/icons";import"@inceptionbg/icons/regular";const x=()=>{const{t:a}=i(),r=n((e=>e.user)),{count:s,refetch:c}=o({enabled:!!r}),m=u();return s>0?e("div",{className:"flex align-center column gap-4",children:[t(p,{text:a("YouHaveNewInvites",{count:s}),severity:"info"}),t(f,{label:a("OrganizationInvite"),onClick:m.onOpen,variant:"solid"}),t(l,{popupController:m,refetchInvites:c})]}):null},N=({moduleId:r=globalThis.moduleId})=>{const[n,o]=b(""),[l,d]=b(!1),[u,p]=b(null),{t:x}=i(),N=a(),{data:{organizations:k=[]}={}}=s({pagination:{limit:500,offset:0},filters:{status:"APPROVED",nameLike:n,subsystem:r}});return e("div",{className:"select-org",children:[t(g,{onSearch:o}),t(v,{items:k.map((e=>({id:e.uuid,label:e.name??`${e.firstName??""} ${e.lastName??""}`,onClick:()=>p(e.uuid),active:u===e.uuid})))}),t(h,{label:x("SetOrgAsDefault"),value:l,setValue:d}),e("div",{className:"flex gap-2 center mt-3",children:[t(f,{label:x("SignInWithDifferentAccount"),onClick:()=>c({clearData:!0}),variant:"simple"}),t(f,{label:x("Confirm"),onClick:()=>{u&&(m(u,l),N("/"))},disabled:!u,variant:"solid"})]})]})},k=()=>{const{t:a}=i();return d()?t(r,{to:"/",replace:!0}):e("div",{className:"select-org-page",children:[t("h1",{children:a("SelectAccount")}),t("h2",{children:a("SelectOrgDesc")}),e("div",{className:"org-page-content",children:[t(N,{}),t(x,{})]})]})};export{k as default};
2
- //# sourceMappingURL=SelectOrgPage-28095b43.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectOrgPage-28095b43.js","sources":["../src/pages/SelectOrg/components/OrgInvites.tsx","../src/pages/SelectOrg/components/SelectOrganization.tsx","../src/pages/SelectOrg/SelectOrgPage.tsx"],"sourcesContent":[null,null,null],"names":["OrgInvites","t","useTranslation","user","useUserStore","state","count","refetch","useOrgInvites","enabled","controls","usePopupControl","_jsxs","className","children","_jsx","Alert","text","severity","Button","label","onClick","onOpen","variant","OrganizationInvitesPopup","popupController","refetchInvites","SelectOrganization","moduleId","globalThis","nameLike","setNameLike","useState","defaultOrg","setDefaultOrg","selectedItemId","setSelectedItemId","navigate","useNavigate","data","organizations","useGetMyOrganizations","pagination","limit","offset","filters","status","subsystem","SearchInput","onSearch","List","items","map","e","id","uuid","name","firstName","lastName","active","Checkbox","value","setValue","logout","clearData","changeOrganization","disabled","SelectOrgPage","useActiveOrgUuid","Navigate","to","replace"],"mappings":"qjBAOO,MAAMA,EAAiB,KAC5B,MAAMC,EAAEA,GAAMC,IACRC,EAAOC,GAAaC,GAASA,EAAMF,QACnCG,MAAEA,EAAKC,QAAEA,GAAYC,EAAc,CAAEC,UAAWN,IAChDO,EAAWC,IAEjB,OAAOL,EAAQ,EACbM,EAAK,MAAA,CAAAC,UAAU,iCACbC,SAAA,CAAAC,EAACC,EAAM,CAAAC,KAAMhB,EAAE,oBAAqB,CAAEK,UAAUY,SAAS,SACzDH,EAACI,EAAM,CAACC,MAAOnB,EAAE,sBAAuBoB,QAASX,EAASY,OAAQC,QAAQ,UAC1ER,EAACS,EAAyB,CAAAC,gBAAiBf,EAAUgB,eAAgBnB,OAErE,IAAI,ECLGoB,EAAkD,EAC7DC,WAAWC,WAAWD,aAEtB,MAAOE,EAAUC,GAAeC,EAAS,KAClCC,EAAYC,GAAiBF,GAAS,IACtCG,EAAgBC,GAAqBJ,EAAwB,OAE9D/B,EAAEA,GAAMC,IACRmC,EAAWC,KAETC,MAAMC,cAAEA,EAAgB,IAAO,CAAA,GAAOC,EAAsB,CAClEC,WAAY,CAAEC,MAAO,IAAKC,OAAQ,GAClCC,QAAS,CAAEC,OAAQ,WAAYhB,WAAUiB,UAAWnB,KAUtD,OACEhB,EAAK,MAAA,CAAAC,UAAU,aACbC,SAAA,CAAAC,EAACiC,EAAW,CAACC,SAAUlB,IACvBhB,EAACmC,EAAI,CACHC,MAAOX,EAAcY,KAAIC,IAAM,CAC7BC,GAAID,EAAEE,KACNnC,MAAOiC,EAAEG,MAAQ,GAAGH,EAAEI,WAAa,MAAMJ,EAAEK,UAAY,KACvDrC,QAAS,IAAMe,EAAkBiB,EAAEE,MACnCI,OAAQxB,IAAmBkB,EAAEE,WAGjCxC,EAAC6C,GACCxC,MAAOnB,EAAE,mBACT4D,MAAO5B,EACP6B,SAAU5B,IAEZtB,EAAK,MAAA,CAAAC,UAAU,yBAAwBC,SAAA,CACrCC,EAACI,EAAM,CACLC,MAAOnB,EAAE,8BACToB,QAAS,IAAM0C,EAAO,CAAEC,WAAW,IACnCzC,QAAQ,WAEVR,EAACI,EAAM,CACLC,MAAOnB,EAAE,WACToB,QA/ByB,KAC3Bc,IACF8B,EAAmB9B,EAAgBF,GACnCI,EAAS,KACV,EA4BK6B,UAAW/B,EACXZ,QAAQ,eAId,EC3DE4C,EAAoB,KACxB,MAAMlE,EAAEA,GAAMC,IAKd,OAHyBkE,IAIhBrD,EAACsD,EAAS,CAAAC,GAAG,IAAIC,SAAO,IAI/B3D,EAAA,MAAA,CAAKC,UAAU,kBACbC,SAAA,CAAAC,EAAA,KAAA,CAAAD,SAAKb,EAAE,mBACPc,EAAA,KAAA,CAAAD,SAAKb,EAAE,mBAEPW,EAAK,MAAA,CAAAC,UAAU,6BACbE,EAACY,EAAqB,CAAA,GACtBZ,EAACf,EAAU,CAAA,QAGf"}