@inceptionbg/main 3.1.9 → 3.1.10

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,16 +1,14 @@
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
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", "JISUSZ_BACKOFFICE", "MONITORING"];
16
14
  declare const moduleIcon: {
@@ -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;
@@ -1178,7 +1170,7 @@ interface IConditionIndexData {
1178
1170
 
1179
1171
  type IEnv = 'DEV' | 'TEST' | 'PROD' | 'LOCAL' | 'UAT' | 'TEST_PPLCG' | 'PROD_PPLCG' | 'TEST_MSP' | 'PROD_MSP' | 'TEST_LOCAL_MSP' | 'TEST_PTT' | 'PROD_PTT';
1180
1172
  type IRequiredServiceApi = 'auth' | 'idm' | 'registration' | 'userSettings';
1181
- type IOptionalServiceApi = 'codebook' | 'auditLog' | 'notifications' | 'indexData' | 'reportTemplates' | 'approvalProcess' | 'procurement' | 'archive' | 'invoice' | 'delivery' | 'edms' | 'rif' | 'cashRegister' | 'jisuszProxy' | 'fosterCare' | 'article' | 'approval' | 'messenger' | 'veosp' | 'fixedAssets' | 'dispatchAdvice';
1173
+ type IOptionalServiceApi = 'codebook' | 'auditLog' | 'notifications' | 'indexData' | 'reportTemplates' | 'approvalProcess' | 'procurement' | 'archive' | 'invoice' | 'delivery' | 'edms' | 'rif' | 'cashRegister' | 'jisuszProxy' | 'fosterCare' | 'article' | 'approval' | 'messenger' | 'veosp' | 'fixedAssets' | 'dispatchAdvice' | 'tasks' | 'nbs';
1182
1174
  type IServiceApi = IRequiredServiceApi | IOptionalServiceApi;
1183
1175
  type IEnvVar = {
1184
1176
  [env in IEnv]: {
@@ -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" | "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;
@@ -1363,7 +1350,7 @@ interface IUseUserMenuPropsOptions {
1363
1350
  declare const useUserMenuProps: ({ myAccount, changeOrganization, }?: IUseUserMenuPropsOptions) => IHeaderUserMenuProps;
1364
1351
 
1365
1352
  declare const useDefaultTemplate: (identifier: string) => {
1366
- defaultTemplate: _inceptionbg_iui.IReportTemplate | undefined;
1353
+ defaultTemplate: any;
1367
1354
  isLoadingDefaultTemplate: boolean;
1368
1355
  };
1369
1356
 
@@ -1372,7 +1359,7 @@ interface Props$2 {
1372
1359
  data: IReportTemplateData;
1373
1360
  limit?: number;
1374
1361
  allowPublicCreate?: boolean;
1375
- defaultTemplate?: IReportTemplate;
1362
+ defaultTemplate?: IReportTemplate$1;
1376
1363
  fetchOptions?: IReportTemplatesFetchOption[];
1377
1364
  }
1378
1365
  declare const useReportTemplates: ({ identifier, data, limit, allowPublicCreate, defaultTemplate, fetchOptions, }: Props$2) => ITableTemplateData;
@@ -1387,13 +1374,13 @@ declare const useTableItemsDelete: ({ hasAccess, textId, useDeleteItemsMutation,
1387
1374
 
1388
1375
  declare const useOrgInvites: ({ enabled, pagination, fetchOptions, }: {
1389
1376
  enabled: boolean;
1390
- pagination?: IPagination;
1391
- fetchOptions?: IOrganizationInvitesFetchOption[];
1377
+ pagination?: IPagination | undefined;
1378
+ fetchOptions?: IOrganizationInvitesFetchOption[] | undefined;
1392
1379
  }) => {
1393
1380
  invites: IOrganizationInvite[];
1394
1381
  count: number;
1395
1382
  isFetching: boolean;
1396
- refetch: (options?: _tanstack_query_core.RefetchOptions) => Promise<_tanstack_query_core.QueryObserverResult<{
1383
+ refetch: (options?: _tanstack_query_core_build_legacy_hydration_DgUcX5FN.af | undefined) => Promise<_tanstack_query_core_build_legacy_hydration_DgUcX5FN.av<{
1397
1384
  organizationInvites: IOrganizationInvite[];
1398
1385
  totalRows: number;
1399
1386
  }, Error>>;
@@ -1405,67 +1392,15 @@ interface Props {
1405
1392
  }
1406
1393
  declare const RolesWithPrivileges: FC<Props>;
1407
1394
 
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
- }>;
1395
+ declare const useOrganizationStore: any;
1396
+ declare const useModules: () => any;
1397
+
1398
+ declare const getToken: () => any;
1399
+
1400
+ declare const useUserStore: any;
1466
1401
  declare const useUserSettings: <T extends string = string & {}>() => {
1467
1402
  userSettings: IUserSettings<T>;
1468
- isUpdatingUserSettings: boolean;
1403
+ isUpdatingUserSettings: any;
1469
1404
  updateUserSettings: (data: IUserSettingsItem<T>) => void;
1470
1405
  deleteUserSettingsItem: (data: Omit<IUserSettingsItem<T>, "value">) => void;
1471
1406
  };
@@ -1473,18 +1408,18 @@ declare const useActiveOrgUuid: () => any;
1473
1408
  declare const getActiveOrgUuid: () => any;
1474
1409
  declare const changeOrganization: (uuid: string, updateDefaultOrg?: boolean) => void;
1475
1410
  declare const clearActiveOrg: ({ onSuccess }?: {
1476
- onSuccess?: () => void;
1477
- }) => void;
1411
+ onSuccess?: (() => void) | undefined;
1412
+ }) => any;
1478
1413
 
1479
1414
  declare const login: () => void;
1480
1415
  declare const logout: (options?: {
1481
1416
  appRedirectUrl?: boolean;
1482
1417
  clearData?: boolean;
1483
1418
  }) => void;
1484
- declare const decodeToken: (token?: string | null) => IToken | undefined;
1419
+ declare const decodeToken: (token?: string | null) => any;
1485
1420
  declare const checkToken: (token?: string | null) => {
1486
- token: string | null;
1487
- isTokenExpired: boolean | undefined;
1421
+ token: any;
1422
+ isTokenExpired: any;
1488
1423
  };
1489
1424
 
1490
1425
  declare const debugLog: (...args: any[]) => void;
@@ -2202,5 +2137,4 @@ declare const ssGet: (key: LocalStorageItem) => string | null;
2202
2137
  declare const ssSet: (key: LocalStorageItem, value: string) => void;
2203
2138
  declare const ssRemove: (key: LocalStorageItem) => void;
2204
2139
 
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 };
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 };
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-BH4BqT-2.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-d9fcffe1.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,139 +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
-
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
+
81
83
  type IServiceApi$1 = IRequiredServiceApi | IOptionalServiceApi;
82
84
 
83
- declare module 'axios' {
84
- interface AxiosRequestConfig {
85
- public?: boolean;
86
- service?: IServiceApi$1;
87
- token?: string;
88
- noToast?: boolean;
89
- noErrors?: boolean;
90
- }
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 };
91
112
  }
92
113
 
93
- declare module '*.scss' {
94
- const classes: { readonly [key: string]: string };
95
- export { classes };
96
- }
97
- declare module '*.png' {
98
- const src: string;
99
- export { src };
100
- }
101
-
102
- declare module '*.svg' {
103
- const src: string;
104
- export { src };
105
- }
106
-
107
- declare module '*.json' {
108
- const data: any;
109
- export { data };
110
- }
111
-
112
- declare module '*.mp3' {
113
- const src: string;
114
- export { src };
114
+ declare module '*.mp3' {
115
+ const src: string;
116
+ export { src };
115
117
  }
116
118
 
117
- declare global {
118
- var environment: IEnv;
119
- var moduleId: IModuleId | null;
120
- var moduleUrls: {
121
- [id in IModuleId]?: string;
122
- };
123
- var axiosInstance: AxiosInstance;
124
- var appVersion: string | undefined;
125
- var api: {
126
- apiUrl: string;
127
- clientId: string;
128
- authScope?: string;
129
- additionalScopes?: string[];
130
- redirectUrl?: string;
131
- };
132
- var serviceApiUrls: Partial<Record<IServiceApi, string>> | undefined;
133
- var zE: {
134
- show: () => void;
135
- hide: () => void;
136
- activate: () => void;
137
- setLocale: (locale: string) => void;
138
- };
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
+ };
139
141
  }
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "@inceptionbg/main",
3
- "version": "3.1.9",
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.60",
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.10",
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.60",
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-BH4BqT-2.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--J7ZTbL7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectOrgPage--J7ZTbL7.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,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,CAAA,GAAOC,EAAsB,CAClEC,WAAY,CAAEC,MAAO,IAAKC,OAAQ,GAClCC,QAAS,CAAEC,OAAQ,WAAYhB,WAAUiB,UAAWnB,KAUtD,OACEhB,EAAA,MAAA,CAAKC,UAAU,aAAYC,SAAA,CACzBC,EAACiC,EAAW,CAACC,SAAUlB,IACvBhB,EAACmC,EAAI,CACHC,MAAOX,EAAcY,IAAIC,IAAC,CACxBC,GAAID,EAAEE,KACNnC,MAAOiC,EAAEG,MAAQ,GAAGH,EAAEI,WAAa,MAAMJ,EAAEK,UAAY,KACvDrC,QAAS,IAAMe,EAAkBiB,EAAEE,MACnCI,OAAQxB,IAAmBkB,EAAEE,UAGjCxC,EAAC6C,GACCxC,MAAOnB,EAAE,mBACT4D,MAAO5B,EACP6B,SAAU5B,IAEZtB,EAAA,MAAA,CAAKC,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,OA6BL6B,UAAW/B,EACXZ,QAAQ,iBCvDZ4C,EAAoB,KACxB,MAAMlE,EAAEA,GAAMC,IAKd,OAHyBkE,IAIhBrD,EAACsD,EAAQ,CAACC,GAAG,IAAIC,SAAO,IAI/B3D,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"}