@inceptionbg/main 3.1.19 → 3.1.21

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,18 +1,16 @@
1
1
  import * as axios from 'axios';
2
2
  import { AxiosResponse } from 'axios';
3
3
  export { AxiosError } from 'axios';
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';
4
+ import { ISimpleObjectWithCode, ISimpleObject, ISelectData, IPagination, ToastContainerProps, IHeaderUserMenuDialogsProps, IAnyObject, INotificationsProps, IReportTemplateData, IReportTemplate as IReportTemplate$1, IRoute } from '@inceptionbg/iui';
6
5
  import { IconDefinition as IconDefinition$1 } from '@fortawesome/fontawesome-svg-core';
7
6
  import { IconDefinition } from '@fortawesome/fontawesome-common-types';
8
- import * as _tanstack_react_query from '@tanstack/react-query';
9
7
  import { UseMutationResult, QueryClient } from '@tanstack/react-query';
8
+ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
10
9
  import { FC, ReactNode, Dispatch, SetStateAction } from 'react';
11
10
  import * as react_jsx_runtime from 'react/jsx-runtime';
12
- import * as _tanstack_query_core from '@tanstack/query-core';
13
- import * as zustand from 'zustand';
11
+ import * as _tanstack_query_core_build_legacy_hydration_DgUcX5FN from '@tanstack/query-core/build/legacy/hydration-DgUcX5FN';
14
12
 
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"];
13
+ 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", "ERP_HR", "JISUSZ_BACKOFFICE", "MONITORING"];
16
14
  declare const moduleIcon: {
17
15
  [id in IModuleId]: IconDefinition;
18
16
  };
@@ -24,12 +22,6 @@ type IModule = {
24
22
  url: string;
25
23
  disabled?: boolean;
26
24
  };
27
- interface IModuleIdsObj {
28
- availableModules: IModuleId[];
29
- userModules: IModuleId[];
30
- organizationModules: IModuleId[];
31
- activeModules: IModuleId[];
32
- }
33
25
 
34
26
  interface IRole {
35
27
  uuid: string;
@@ -1234,7 +1226,7 @@ type IDeleteItemMutation = (props: {
1234
1226
  }, unknown>;
1235
1227
 
1236
1228
  declare const useGetMyOrganizations: ({ enabled, pagination, filters, }: {
1237
- enabled?: boolean;
1229
+ enabled?: boolean | undefined;
1238
1230
  pagination: IPagination;
1239
1231
  filters: {
1240
1232
  status?: OrganizationStatus;
@@ -1242,10 +1234,10 @@ declare const useGetMyOrganizations: ({ enabled, pagination, filters, }: {
1242
1234
  subsystem?: IModuleId | null;
1243
1235
  excludeOrganizationUuid?: string;
1244
1236
  };
1245
- }) => _tanstack_react_query.UseQueryResult<{
1237
+ }) => _tanstack_react_query_build_legacy_types.UseQueryResult<{
1246
1238
  organizations: IOrganization[];
1247
1239
  totalRows: number;
1248
- subsystems: IModuleId[];
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" | "ERP_HR" | "JISUSZ_BACKOFFICE" | "MONITORING")[];
1249
1241
  }, Error>;
1250
1242
 
1251
1243
  type IReportTemplatesFetchOption = 'SORT' | 'FILTER_VALUES' | 'COLUMNS' | 'CREATED_BY' | 'ORGANIZATION' | 'OPTIONS';
@@ -1258,24 +1250,19 @@ type IReportTemplatesProps = {
1258
1250
  };
1259
1251
  fetchOptions?: IReportTemplatesFetchOption[];
1260
1252
  };
1261
- declare const useGetReportTemplates: (params: IReportTemplatesProps, enabled: boolean) => _tanstack_react_query.UseQueryResult<{
1253
+ declare const useGetReportTemplates: (params: IReportTemplatesProps, enabled: boolean) => _tanstack_react_query_build_legacy_types.UseQueryResult<{
1262
1254
  templates: IReportTemplate[];
1263
1255
  totalRows: number;
1264
1256
  }, Error>;
1265
- declare const useCreateReportTemplate: () => _tanstack_react_query.UseMutationResult<axios.AxiosResponse<any, any, {}>, Error, Partial<IReportTemplate>, unknown>;
1257
+ declare const useCreateReportTemplate: () => _tanstack_react_query_build_legacy_types.UseMutationResult<axios.AxiosResponse<any, any>, Error, IReportTemplate, unknown>;
1266
1258
  declare const useDeleteReportTemplates: IDeleteItemMutation;
1267
1259
 
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>;
1260
+ declare const useGetUserSettings: (setUserSettings: (data: IUserSettings) => void) => _tanstack_react_query_build_legacy_types.UseQueryResult<IUserSettings, Error>;
1274
1261
  declare const useGetUserSettingsItem: (filters: {
1275
1262
  key: string;
1276
1263
  subsystemOrNull?: string;
1277
1264
  organizationUuidOrNull?: string;
1278
- }) => _tanstack_react_query.UseQueryResult<IUserSettingsItem, Error>;
1265
+ }) => _tanstack_react_query_build_legacy_types.UseQueryResult<IUserSettingsItem, Error>;
1279
1266
 
1280
1267
  interface Props$7 {
1281
1268
  toastProps?: ToastContainerProps;
@@ -1367,7 +1354,7 @@ interface IUseUserMenuPropsOptions {
1367
1354
  declare const useUserMenuProps: ({ myAccount, changeOrganization, }?: IUseUserMenuPropsOptions) => IHeaderUserMenuProps;
1368
1355
 
1369
1356
  declare const useDefaultTemplate: (identifier: string) => {
1370
- defaultTemplate: _inceptionbg_iui.IReportTemplate | undefined;
1357
+ defaultTemplate: any;
1371
1358
  isLoadingDefaultTemplate: boolean;
1372
1359
  };
1373
1360
 
@@ -1376,7 +1363,7 @@ interface Props$2 {
1376
1363
  data: IReportTemplateData;
1377
1364
  limit?: number;
1378
1365
  allowPublicCreate?: boolean;
1379
- defaultTemplate?: IReportTemplate;
1366
+ defaultTemplate?: IReportTemplate$1;
1380
1367
  fetchOptions?: IReportTemplatesFetchOption[];
1381
1368
  }
1382
1369
  declare const useReportTemplates: ({ identifier, data, limit, allowPublicCreate, defaultTemplate, fetchOptions, }: Props$2) => ITableTemplateData;
@@ -1391,13 +1378,13 @@ declare const useTableItemsDelete: ({ hasAccess, textId, useDeleteItemsMutation,
1391
1378
 
1392
1379
  declare const useOrgInvites: ({ enabled, pagination, fetchOptions, }: {
1393
1380
  enabled: boolean;
1394
- pagination?: IPagination;
1395
- fetchOptions?: IOrganizationInvitesFetchOption[];
1381
+ pagination?: IPagination | undefined;
1382
+ fetchOptions?: IOrganizationInvitesFetchOption[] | undefined;
1396
1383
  }) => {
1397
1384
  invites: IOrganizationInvite[];
1398
1385
  count: number;
1399
1386
  isFetching: boolean;
1400
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
1387
+ refetch: (options?: _tanstack_query_core_build_legacy_hydration_DgUcX5FN.af | undefined) => Promise<_tanstack_query_core_build_legacy_hydration_DgUcX5FN.av<{
1401
1388
  organizationInvites: IOrganizationInvite[];
1402
1389
  totalRows: number;
1403
1390
  }, Error>>;
@@ -1409,67 +1396,15 @@ interface Props {
1409
1396
  }
1410
1397
  declare const RolesWithPrivileges: FC<Props>;
1411
1398
 
1412
- interface OrganizationData {
1413
- organization: IOrganization | null;
1414
- orgSettings: IOrganizationSettings;
1415
- modules: IModuleIdsObj;
1416
- privileges: Record<string, boolean>;
1417
- }
1418
- interface OrganizationState extends OrganizationData {
1419
- setOrganizationData: (data: OrganizationData) => void;
1420
- updateOrgSettings: (data: IOrganizationSettings) => void;
1421
- reset: () => void;
1422
- }
1423
- declare const useOrganizationStore: zustand.UseBoundStore<Omit<zustand.StoreApi<OrganizationState>, "setState" | "devtools"> & {
1424
- setState(partial: OrganizationState | Partial<OrganizationState> | ((state: OrganizationState) => OrganizationState | Partial<OrganizationState>), replace?: false | undefined, action?: (string | {
1425
- [x: string]: unknown;
1426
- [x: number]: unknown;
1427
- [x: symbol]: unknown;
1428
- type: string;
1429
- }) | undefined): void;
1430
- setState(state: OrganizationState | ((state: OrganizationState) => OrganizationState), replace: true, action?: (string | {
1431
- [x: string]: unknown;
1432
- [x: number]: unknown;
1433
- [x: symbol]: unknown;
1434
- type: string;
1435
- }) | undefined): void;
1436
- devtools: {
1437
- cleanup: () => void;
1438
- };
1439
- }>;
1440
- declare const useModules: () => IModuleIdsObj;
1441
-
1442
- declare const getToken: () => string | null;
1443
-
1444
- interface UserState {
1445
- user: IUser | null;
1446
- userSettings: IUserSettings;
1447
- isUpdatingUserSettings: boolean;
1448
- setUser: (user: IUser | null) => void;
1449
- setUserSettings: (userSettings: IUserSettings) => void;
1450
- updateUserSettings: <T extends string = string & {}>(data: IUserSettingsItem<T>, options?: IUserSettingsUpdateOptions) => void;
1451
- deleteUserSettingsItem: <T extends string = string & {}>(data: Omit<IUserSettingsItem<T>, 'value'>, options?: IUserSettingsUpdateOptions) => void;
1452
- }
1453
- declare const useUserStore: zustand.UseBoundStore<Omit<zustand.StoreApi<UserState>, "setState" | "devtools"> & {
1454
- setState(partial: UserState | Partial<UserState> | ((state: UserState) => UserState | Partial<UserState>), replace?: false | undefined, action?: (string | {
1455
- [x: string]: unknown;
1456
- [x: number]: unknown;
1457
- [x: symbol]: unknown;
1458
- type: string;
1459
- }) | undefined): void;
1460
- setState(state: UserState | ((state: UserState) => UserState), replace: true, action?: (string | {
1461
- [x: string]: unknown;
1462
- [x: number]: unknown;
1463
- [x: symbol]: unknown;
1464
- type: string;
1465
- }) | undefined): void;
1466
- devtools: {
1467
- cleanup: () => void;
1468
- };
1469
- }>;
1399
+ declare const useOrganizationStore: any;
1400
+ declare const useModules: () => any;
1401
+
1402
+ declare const getToken: () => any;
1403
+
1404
+ declare const useUserStore: any;
1470
1405
  declare const useUserSettings: <T extends string = string & {}>() => {
1471
1406
  userSettings: IUserSettings<T>;
1472
- isUpdatingUserSettings: boolean;
1407
+ isUpdatingUserSettings: any;
1473
1408
  updateUserSettings: (data: IUserSettingsItem<T>) => void;
1474
1409
  deleteUserSettingsItem: (data: Omit<IUserSettingsItem<T>, "value">) => void;
1475
1410
  };
@@ -1477,18 +1412,18 @@ declare const useActiveOrgUuid: () => any;
1477
1412
  declare const getActiveOrgUuid: () => any;
1478
1413
  declare const changeOrganization: (uuid: string, updateDefaultOrg?: boolean) => void;
1479
1414
  declare const clearActiveOrg: ({ onSuccess }?: {
1480
- onSuccess?: () => void;
1481
- }) => void;
1415
+ onSuccess?: (() => void) | undefined;
1416
+ }) => any;
1482
1417
 
1483
1418
  declare const login: () => void;
1484
1419
  declare const logout: (options?: {
1485
1420
  appRedirectUrl?: boolean;
1486
1421
  clearData?: boolean;
1487
1422
  }) => void;
1488
- declare const decodeToken: (token?: string | null) => IToken | undefined;
1423
+ declare const decodeToken: (token?: string | null) => any;
1489
1424
  declare const checkToken: (token?: string | null) => {
1490
- token: string | null;
1491
- isTokenExpired: boolean | undefined;
1425
+ token: any;
1426
+ isTokenExpired: any;
1492
1427
  };
1493
1428
 
1494
1429
  declare const debugLog: (...args: any[]) => void;
@@ -2206,5 +2141,4 @@ declare const ssGet: (key: LocalStorageItem) => string | null;
2206
2141
  declare const ssSet: (key: LocalStorageItem, value: string) => void;
2207
2142
  declare const ssRemove: (key: LocalStorageItem) => void;
2208
2143
 
2209
- 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 };
2210
- 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 };
2144
+ 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 };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
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-cg_k5HEO.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{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-5c709bc8.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,142 @@
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
+ 'ERP_HR',
28
+ // PRIVATE
29
+ 'JISUSZ_BACKOFFICE',
30
+ 'MONITORING',
31
+
32
+ // 'ERP',
33
+ // 'FINANCES',
34
+ // 'CONTRACTS',
35
+ // 'IDM',
36
+ // 'REGISTRATION',
37
+ // 'QC_REGISTRATION',
38
+ // 'SETTINGS',
38
39
  ] as const;
39
40
 
40
41
  type IModuleId = (typeof moduleIds)[number];
41
42
 
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
-
43
+ type IEnv =
44
+ | 'DEV'
45
+ | 'TEST'
46
+ | 'PROD'
47
+ | 'LOCAL'
48
+ | 'UAT'
49
+ | 'TEST_PPLCG'
50
+ | 'PROD_PPLCG'
51
+ | 'TEST_MSP'
52
+ | 'PROD_MSP'
53
+ | 'TEST_LOCAL_MSP'
54
+ | 'TEST_PTT'
55
+ | 'PROD_PTT';
56
+
57
+ type IRequiredServiceApi = 'auth' | 'idm' | 'registration' | 'userSettings';
58
+
59
+ type IOptionalServiceApi =
60
+ | 'codebook'
61
+ | 'auditLog'
62
+ | 'notifications'
63
+ | 'indexData'
64
+ | 'reportTemplates'
65
+ | 'approvalProcess'
66
+ | 'procurement'
67
+ | 'archive'
68
+ | 'invoice'
69
+ | 'delivery'
70
+ | 'edms'
71
+ | 'rif'
72
+ | 'cashRegister'
73
+ | 'jisuszProxy'
74
+ | 'fosterCare'
75
+ | 'article'
76
+ | 'approval'
77
+ | 'messenger'
78
+ | 'veosp'
79
+ | 'fixedAssets'
80
+ | 'dispatchAdvice'
81
+ | 'tasks'
82
+ | 'nbs';
83
+
83
84
  type IServiceApi$1 = IRequiredServiceApi | IOptionalServiceApi;
84
85
 
85
- declare module 'axios' {
86
- interface AxiosRequestConfig {
87
- public?: boolean;
88
- service?: IServiceApi$1;
89
- token?: string;
90
- noToast?: boolean;
91
- noErrors?: boolean;
92
- }
86
+ declare module 'axios' {
87
+ interface AxiosRequestConfig {
88
+ public?: boolean;
89
+ service?: IServiceApi$1;
90
+ token?: string;
91
+ noToast?: boolean;
92
+ noErrors?: boolean;
93
+ }
94
+ }
95
+
96
+ declare module '*.scss' {
97
+ const classes: { readonly [key: string]: string };
98
+ export { classes };
99
+ }
100
+ declare module '*.png' {
101
+ const src: string;
102
+ export { src };
103
+ }
104
+
105
+ declare module '*.svg' {
106
+ const src: string;
107
+ export { src };
108
+ }
109
+
110
+ declare module '*.json' {
111
+ const data: any;
112
+ export { data };
93
113
  }
94
114
 
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 };
115
+ declare module '*.mp3' {
116
+ const src: string;
117
+ export { src };
117
118
  }
118
119
 
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
- };
120
+ declare global {
121
+ var environment: IEnv;
122
+ var moduleId: IModuleId | null;
123
+ var moduleUrls: {
124
+ [id in IModuleId]?: string;
125
+ };
126
+ var axiosInstance: AxiosInstance;
127
+ var appVersion: string | undefined;
128
+ var api: {
129
+ apiUrl: string;
130
+ clientId: string;
131
+ authScope?: string;
132
+ additionalScopes?: string[];
133
+ redirectUrl?: string;
134
+ };
135
+ var serviceApiUrls: Partial<Record<IServiceApi, string>> | undefined;
136
+ var zE: {
137
+ show: () => void;
138
+ hide: () => void;
139
+ activate: () => void;
140
+ setLocale: (locale: string) => void;
141
+ };
141
142
  }
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "@inceptionbg/main",
3
- "version": "3.1.19",
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.21",
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 s,b as l,c,l as m,d as u}from"./index-cg_k5HEO.js";import{usePopupControl as d,Alert as p,Button as g,SearchInput as f,List as h,Checkbox as v}from"@inceptionbg/iui";import{useState as b,useEffect as S}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:l,refetch:c}=o({enabled:!!r}),m=d();return l>0?e("div",{className:"flex align-center column gap-4",children:[t(p,{text:a("YouHaveNewInvites",{count:l}),severity:"info"}),t(g,{label:a("OrganizationInvite"),onClick:m.onOpen,variant:"solid"}),t(s,{popupController:m,refetchInvites:c})]}):null},N=({moduleId:r=globalThis.moduleId})=>{const[o,s]=b(""),[u,d]=b(!1),[p,x]=b(null),{t:N}=i(),O=a(),{data:{organizations:k=[]}={},isFetching:C}=l({pagination:{limit:500,offset:0},filters:{status:"APPROVED",nameLike:o,subsystem:r}});S(()=>{if(!C&&!o&&1===k.length){const e=k[0].uuid;c(e,!0),n.getState().setUserSettings({...n.getState().userSettings,activeOrgUuid:e})}},[C,o,k]);return e("div",{className:"select-org",children:[t(f,{onSearch:s}),t(h,{items:k.map(e=>({id:e.uuid,label:e.name??`${e.firstName??""} ${e.lastName??""}`,onClick:()=>x(e.uuid),active:p===e.uuid}))}),t(v,{label:N("SetOrgAsDefault"),value:u,setValue:d}),e("div",{className:"flex gap-2 center mt-3",children:[t(g,{label:N("SignInWithDifferentAccount"),onClick:()=>m({clearData:!0}),variant:"simple"}),t(g,{label:N("Confirm"),onClick:()=>{p&&(c(p,u),O("/"))},disabled:!p,variant:"solid"})]})]})},O=()=>{const{t:a}=i();return u()?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{O as default};
2
- //# sourceMappingURL=SelectOrgPage-BOm4RVhs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectOrgPage-BOm4RVhs.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","isFetching","useGetMyOrganizations","pagination","limit","offset","filters","status","subsystem","useEffect","length","orgUuid","uuid","changeOrganization","getState","setUserSettings","userSettings","activeOrgUuid","SearchInput","onSearch","List","items","map","e","id","name","firstName","lastName","active","Checkbox","value","setValue","logout","clearData","disabled","SelectOrgPage","useActiveOrgUuid","Navigate","to","replace"],"mappings":"okBAOO,MAAMA,EAAiB,KAC5B,MAAMC,EAAEA,GAAMC,IACRC,EAAOC,EAAaC,GAASA,EAAMF,OACnCG,MAAEA,EAAKC,QAAEA,GAAYC,EAAc,CAAEC,UAAWN,IAChDO,EAAWC,IAEjB,OAAOL,EAAQ,EACbM,EAAA,MAAA,CAAKC,UAAU,iCAAgCC,SAAA,CAC7CC,EAACC,EAAK,CAACC,KAAMhB,EAAE,oBAAqB,CAAEK,UAAUY,SAAS,SACzDH,EAACI,EAAM,CAACC,MAAOnB,EAAE,sBAAuBoB,QAASX,EAASY,OAAQC,QAAQ,UAC1ER,EAACS,EAAwB,CAACC,gBAAiBf,EAAUgB,eAAgBnB,OAErE,MCLOoB,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,GAAEC,WAAEA,GAAeC,EAAsB,CAC9EC,WAAY,CAAEC,MAAO,IAAKC,OAAQ,GAClCC,QAAS,CAAEC,OAAQ,WAAYjB,WAAUkB,UAAWpB,KAGtDqB,EAAU,KACR,IAAKR,IAAeX,GAAqC,IAAzBU,EAAcU,OAAc,CAC1D,MAAMC,EAAUX,EAAc,GAAGY,KACjCC,EAAmBF,GAAS,GAE5B/C,EAAakD,WAAWC,gBAAgB,IACnCnD,EAAakD,WAAWE,aAC3BC,cAAeN,GAEnB,GACC,CAACV,EAAYX,EAAUU,IAS1B,OACE5B,EAAA,MAAA,CAAKC,UAAU,aAAYC,SAAA,CACzBC,EAAC2C,EAAW,CAACC,SAAU5B,IACvBhB,EAAC6C,EAAI,CACHC,MAAOrB,EAAcsB,IAAIC,IAAC,CACxBC,GAAID,EAAEX,KACNhC,MAAO2C,EAAEE,MAAQ,GAAGF,EAAEG,WAAa,MAAMH,EAAEI,UAAY,KACvD9C,QAAS,IAAMe,EAAkB2B,EAAEX,MACnCgB,OAAQjC,IAAmB4B,EAAEX,UAGjCrC,EAACsD,GACCjD,MAAOnB,EAAE,mBACTqE,MAAOrC,EACPsC,SAAUrC,IAEZtB,EAAA,MAAA,CAAKC,UAAU,yBAAwBC,SAAA,CACrCC,EAACI,EAAM,CACLC,MAAOnB,EAAE,8BACToB,QAAS,IAAMmD,EAAO,CAAEC,WAAW,IACnClD,QAAQ,WAEVR,EAACI,EAAM,CACLC,MAAOnB,EAAE,WACToB,QA/ByB,KAC3Bc,IACFkB,EAAmBlB,EAAgBF,GACnCI,EAAS,OA6BLqC,UAAWvC,EACXZ,QAAQ,iBCnEZoD,EAAoB,KACxB,MAAM1E,EAAEA,GAAMC,IAKd,OAHyB0E,IAIhB7D,EAAC8D,EAAQ,CAACC,GAAG,IAAIC,SAAO,IAI/BnE,EAAA,MAAA,CAAKC,UAAU,kBAAiBC,SAAA,CAC9BC,EAAA,KAAA,CAAAD,SAAKb,EAAE,mBACPc,EAAA,KAAA,CAAAD,SAAKb,EAAE,mBAEPW,EAAA,MAAA,CAAKC,UAAU,6BACbE,EAACY,EAAkB,CAAA,GACnBZ,EAACf,EAAU,CAAA"}