@inceptionbg/main 3.1.21 → 3.1.24

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", "ERP_HR", "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" | "ERP_HR" | "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;
@@ -1354,7 +1367,7 @@ interface IUseUserMenuPropsOptions {
1354
1367
  declare const useUserMenuProps: ({ myAccount, changeOrganization, }?: IUseUserMenuPropsOptions) => IHeaderUserMenuProps;
1355
1368
 
1356
1369
  declare const useDefaultTemplate: (identifier: string) => {
1357
- defaultTemplate: any;
1370
+ defaultTemplate: _inceptionbg_iui.IReportTemplate | undefined;
1358
1371
  isLoadingDefaultTemplate: boolean;
1359
1372
  };
1360
1373
 
@@ -1363,7 +1376,7 @@ interface Props$2 {
1363
1376
  data: IReportTemplateData;
1364
1377
  limit?: number;
1365
1378
  allowPublicCreate?: boolean;
1366
- defaultTemplate?: IReportTemplate$1;
1379
+ defaultTemplate?: IReportTemplate;
1367
1380
  fetchOptions?: IReportTemplatesFetchOption[];
1368
1381
  }
1369
1382
  declare const useReportTemplates: ({ identifier, data, limit, allowPublicCreate, defaultTemplate, fetchOptions, }: Props$2) => ITableTemplateData;
@@ -1378,13 +1391,13 @@ declare const useTableItemsDelete: ({ hasAccess, textId, useDeleteItemsMutation,
1378
1391
 
1379
1392
  declare const useOrgInvites: ({ enabled, pagination, fetchOptions, }: {
1380
1393
  enabled: boolean;
1381
- pagination?: IPagination | undefined;
1382
- fetchOptions?: IOrganizationInvitesFetchOption[] | undefined;
1394
+ pagination?: IPagination;
1395
+ fetchOptions?: IOrganizationInvitesFetchOption[];
1383
1396
  }) => {
1384
1397
  invites: IOrganizationInvite[];
1385
1398
  count: number;
1386
1399
  isFetching: boolean;
1387
- refetch: (options?: _tanstack_query_core_build_legacy_hydration_DgUcX5FN.af | undefined) => Promise<_tanstack_query_core_build_legacy_hydration_DgUcX5FN.av<{
1400
+ refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
1388
1401
  organizationInvites: IOrganizationInvite[];
1389
1402
  totalRows: number;
1390
1403
  }, Error>>;
@@ -1396,15 +1409,67 @@ interface Props {
1396
1409
  }
1397
1410
  declare const RolesWithPrivileges: FC<Props>;
1398
1411
 
1399
- declare const useOrganizationStore: any;
1400
- declare const useModules: () => any;
1401
-
1402
- declare const getToken: () => any;
1403
-
1404
- declare const useUserStore: any;
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
+ }>;
1405
1470
  declare const useUserSettings: <T extends string = string & {}>() => {
1406
1471
  userSettings: IUserSettings<T>;
1407
- isUpdatingUserSettings: any;
1472
+ isUpdatingUserSettings: boolean;
1408
1473
  updateUserSettings: (data: IUserSettingsItem<T>) => void;
1409
1474
  deleteUserSettingsItem: (data: Omit<IUserSettingsItem<T>, "value">) => void;
1410
1475
  };
@@ -1412,18 +1477,18 @@ declare const useActiveOrgUuid: () => any;
1412
1477
  declare const getActiveOrgUuid: () => any;
1413
1478
  declare const changeOrganization: (uuid: string, updateDefaultOrg?: boolean) => void;
1414
1479
  declare const clearActiveOrg: ({ onSuccess }?: {
1415
- onSuccess?: (() => void) | undefined;
1416
- }) => any;
1480
+ onSuccess?: () => void;
1481
+ }) => void;
1417
1482
 
1418
1483
  declare const login: () => void;
1419
1484
  declare const logout: (options?: {
1420
1485
  appRedirectUrl?: boolean;
1421
1486
  clearData?: boolean;
1422
1487
  }) => void;
1423
- declare const decodeToken: (token?: string | null) => any;
1488
+ declare const decodeToken: (token?: string | null) => IToken | undefined;
1424
1489
  declare const checkToken: (token?: string | null) => {
1425
- token: any;
1426
- isTokenExpired: any;
1490
+ token: string | null;
1491
+ isTokenExpired: boolean | undefined;
1427
1492
  };
1428
1493
 
1429
1494
  declare const debugLog: (...args: any[]) => void;
@@ -1452,6 +1517,7 @@ declare const i18nMainCyrilic: {
1452
1517
  ERP_MAT_ACC: string;
1453
1518
  ERP_SMALL_INVENTORY: string;
1454
1519
  ERP_WMS: string;
1520
+ ERP_HR: string;
1455
1521
  DASHBOARD: string;
1456
1522
  MONTORING: string;
1457
1523
  Basic: string;
@@ -1684,6 +1750,7 @@ declare const i18nMainLatin: {
1684
1750
  ERP_MAT_ACC: string;
1685
1751
  ERP_SMALL_INVENTORY: string;
1686
1752
  ERP_WMS: string;
1753
+ ERP_HR: string;
1687
1754
  DASHBOARD: string;
1688
1755
  MONITORING: string;
1689
1756
  JISUSZ_BACKOFFICE: string;
@@ -1920,6 +1987,7 @@ declare const i18nMainME: {
1920
1987
  ERP_MAT_ACC: string;
1921
1988
  ERP_SMALL_INVENTORY: string;
1922
1989
  ERP_WMS: string;
1990
+ ERP_HR: string;
1923
1991
  DASHBOARD: string;
1924
1992
  MONITORING: string;
1925
1993
  JISUSZ_BACKOFFICE: string;
@@ -2141,4 +2209,5 @@ declare const ssGet: (key: LocalStorageItem) => string | null;
2141
2209
  declare const ssSet: (key: LocalStorageItem, value: string) => void;
2142
2210
  declare const ssRemove: (key: LocalStorageItem) => void;
2143
2211
 
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 };
2212
+ 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 };
2213
+ 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-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";
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-TIGIQB9k.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,142 +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
- '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',
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',
39
39
  ] as const;
40
40
 
41
41
  type IModuleId = (typeof moduleIds)[number];
42
42
 
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
-
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
+
84
84
  type IServiceApi$1 = IRequiredServiceApi | IOptionalServiceApi;
85
85
 
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 };
86
+ declare module 'axios' {
87
+ interface AxiosRequestConfig {
88
+ public?: boolean;
89
+ service?: IServiceApi$1;
90
+ token?: string;
91
+ noToast?: boolean;
92
+ noErrors?: boolean;
93
+ }
113
94
  }
114
95
 
115
- declare module '*.mp3' {
116
- const src: string;
117
- export { src };
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 };
113
+ }
114
+
115
+ declare module '*.mp3' {
116
+ const src: string;
117
+ export { src };
118
118
  }
119
119
 
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
- };
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
+ };
142
142
  }
package/package.json CHANGED
@@ -1,55 +1,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
+ "name": "@inceptionbg/main",
3
+ "version": "3.1.24",
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-5c709bc8.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-728ad9e2.js.map