@admin-layout/client 1.0.3-alpha.130 → 1.0.3-alpha.149

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/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './interfaces';
2
2
  export * from './constants';
3
3
  export * from './redux';
4
+ export * from './utils';
package/lib/index.js CHANGED
@@ -212,6 +212,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
212
212
  __exportStar(__webpack_require__(/*! ./interfaces */ "./src/interfaces/index.ts"), exports);
213
213
  __exportStar(__webpack_require__(/*! ./constants */ "./src/constants/index.ts"), exports);
214
214
  __exportStar(__webpack_require__(/*! ./redux */ "./src/redux/index.ts"), exports);
215
+ __exportStar(__webpack_require__(/*! ./utils */ "./src/utils/index.ts"), exports);
215
216
 
216
217
 
217
218
  /***/ }),
@@ -240,39 +241,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
240
241
  "use strict";
241
242
 
242
243
  Object.defineProperty(exports, "__esModule", { value: true });
243
- exports.useGetOrgNameFromContextLazyQuery = exports.useGetOrgNameFromContextQuery = exports.GetOrgNameFromContextDocument = exports.OrgNameInContextFragmentDoc = exports.IVisibility = exports.IUserOrderBy = exports.ISettingValueType = exports.IRole = exports.IProjectType = exports.IPreDefinedRole = exports.IPortalLanguage = exports.IPermissionType = exports.IPermissionResource = exports.IPermissionAction = exports.IOrgUserRole = exports.IOrganizationContextPubSubEvents = exports.IOrgainizationInvitationRole = exports.IInviteStatus = exports.IConfigurationTarget = exports.IConfigurationScope = exports.IConfigFragmentName = exports.IConfigCollectionName = exports.IClientTypes = exports.IApplicationRoles = void 0;
244
+ exports.useGetOrgNameFromContextLazyQuery = exports.useGetOrgNameFromContextQuery = exports.GetOrgNameFromContextDocument = exports.OrgNameInContextFragmentDoc = exports.ISettingValueType = exports.IPreDefinedRole = exports.IPermissionType = exports.IPermissionResource = exports.IPermissionAction = exports.IOrganizationContextPubSubEvents = exports.IConfigurationTarget = exports.IConfigurationScope = exports.IConfigFragmentName = exports.IConfigCollectionName = exports.IApplicationRoles = void 0;
244
245
  const client_1 = __webpack_require__(/*! @apollo/client */ "@apollo/client");
245
246
  const Apollo = __webpack_require__(/*! @apollo/client */ "@apollo/client");
246
247
  const defaultOptions = {};
247
248
  var IApplicationRoles;
248
249
  (function (IApplicationRoles) {
250
+ /** User who is logged in */
251
+ IApplicationRoles["USER"] = "USER";
252
+ /** Owner of an Organization */
253
+ IApplicationRoles["OWNER"] = "OWNER";
249
254
  /** Admin of an Organization */
250
255
  IApplicationRoles["ADMIN"] = "ADMIN";
251
256
  /** Project Contributors */
252
257
  IApplicationRoles["CONTRIBUTORS"] = "CONTRIBUTORS";
253
- /** Guest */
254
- IApplicationRoles["GUEST"] = "GUEST";
255
- IApplicationRoles["MEMBER"] = "MEMBER";
256
- /** organization member */
257
- IApplicationRoles["ORGANIZATION_MANAGER"] = "ORGANIZATION_MANAGER";
258
- /** Owner of an Organization */
259
- IApplicationRoles["OWNER"] = "OWNER";
260
258
  /** Project Admin */
261
259
  IApplicationRoles["PROJECT_ADMIN"] = "PROJECT_ADMIN";
262
260
  /** Project Viewer */
263
261
  IApplicationRoles["PROJECT_VIEWER"] = "PROJECT_VIEWER";
264
- IApplicationRoles["TEAM_MAINTAINER"] = "TEAM_MAINTAINER";
265
- IApplicationRoles["TEAM_MEMBER"] = "TEAM_MEMBER";
266
- /** User who is logged in */
267
- IApplicationRoles["USER"] = "USER";
262
+ /** Guest */
263
+ IApplicationRoles["GUEST"] = "GUEST";
268
264
  })(IApplicationRoles = exports.IApplicationRoles || (exports.IApplicationRoles = {}));
269
265
  ;
270
- var IClientTypes;
271
- (function (IClientTypes) {
272
- IClientTypes["Business"] = "Business";
273
- IClientTypes["Individuals"] = "Individuals";
274
- })(IClientTypes = exports.IClientTypes || (exports.IClientTypes = {}));
275
- ;
276
266
  var IConfigCollectionName;
277
267
  (function (IConfigCollectionName) {
278
268
  IConfigCollectionName["application"] = "application";
@@ -332,30 +322,6 @@ var IConfigurationTarget;
332
322
  IConfigurationTarget["MEMORY"] = "MEMORY";
333
323
  })(IConfigurationTarget = exports.IConfigurationTarget || (exports.IConfigurationTarget = {}));
334
324
  ;
335
- var IInviteStatus;
336
- (function (IInviteStatus) {
337
- IInviteStatus["PENDING"] = "PENDING";
338
- IInviteStatus["ACCEPTED"] = "ACCEPTED";
339
- IInviteStatus["DECLINED"] = "DECLINED";
340
- })(IInviteStatus = exports.IInviteStatus || (exports.IInviteStatus = {}));
341
- ;
342
- /**
343
- * OrganizationInvitationRole: The possible organization invitation roles.
344
- *
345
- * @property
346
- * ADMIN: The user is invited to be an admin of the organization
347
- * BILLING_MANAGER: The user is invited to be a billing manager of the organization.
348
- * DIRECT_MEMBER: The user is invited to be a direct member of the organization.
349
- * REINSTATE: The user's previous role will be reinstated.
350
- */
351
- var IOrgainizationInvitationRole;
352
- (function (IOrgainizationInvitationRole) {
353
- IOrgainizationInvitationRole["ADMIN"] = "ADMIN";
354
- IOrgainizationInvitationRole["REINSTATE"] = "REINSTATE";
355
- IOrgainizationInvitationRole["DIRECT_MEMBER"] = "DIRECT_MEMBER";
356
- IOrgainizationInvitationRole["BILLING_MANAGER"] = "BILLING_MANAGER";
357
- })(IOrgainizationInvitationRole = exports.IOrgainizationInvitationRole || (exports.IOrgainizationInvitationRole = {}));
358
- ;
359
325
  /** Subscription event for context */
360
326
  var IOrganizationContextPubSubEvents;
361
327
  (function (IOrganizationContextPubSubEvents) {
@@ -365,32 +331,20 @@ var IOrganizationContextPubSubEvents;
365
331
  IOrganizationContextPubSubEvents["OrganizationPermissionUpdated"] = "OrganizationPermissionUpdated";
366
332
  })(IOrganizationContextPubSubEvents = exports.IOrganizationContextPubSubEvents || (exports.IOrganizationContextPubSubEvents = {}));
367
333
  ;
368
- var IOrgUserRole;
369
- (function (IOrgUserRole) {
370
- IOrgUserRole["BILLING_LEADER"] = "BILLING_LEADER";
371
- IOrgUserRole["MEMBER"] = "MEMBER";
372
- IOrgUserRole["ADMIN"] = "ADMIN";
373
- IOrgUserRole["OWNER"] = "OWNER";
374
- })(IOrgUserRole = exports.IOrgUserRole || (exports.IOrgUserRole = {}));
375
- ;
376
334
  var IPermissionAction;
377
335
  (function (IPermissionAction) {
336
+ IPermissionAction["View"] = "View";
378
337
  IPermissionAction["Create"] = "Create";
379
- IPermissionAction["Delete"] = "Delete";
380
338
  IPermissionAction["Edit"] = "Edit";
381
- IPermissionAction["Invite"] = "Invite";
339
+ IPermissionAction["Delete"] = "Delete";
382
340
  IPermissionAction["Manage"] = "Manage";
383
- IPermissionAction["View"] = "View";
384
341
  })(IPermissionAction = exports.IPermissionAction || (exports.IPermissionAction = {}));
385
342
  ;
386
343
  var IPermissionResource;
387
344
  (function (IPermissionResource) {
388
- IPermissionResource["Members"] = "Members";
389
- IPermissionResource["Organization"] = "Organization";
390
- IPermissionResource["Permissions"] = "Permissions";
391
345
  IPermissionResource["Roles"] = "Roles";
346
+ IPermissionResource["Permissions"] = "Permissions";
392
347
  IPermissionResource["Settings"] = "Settings";
393
- IPermissionResource["Teams"] = "Teams";
394
348
  })(IPermissionResource = exports.IPermissionResource || (exports.IPermissionResource = {}));
395
349
  ;
396
350
  var IPermissionType;
@@ -400,15 +354,6 @@ var IPermissionType;
400
354
  IPermissionType["NotSet"] = "NotSet";
401
355
  })(IPermissionType = exports.IPermissionType || (exports.IPermissionType = {}));
402
356
  ;
403
- var IPortalLanguage;
404
- (function (IPortalLanguage) {
405
- IPortalLanguage["English"] = "English";
406
- IPortalLanguage["Hindi"] = "Hindi";
407
- IPortalLanguage["Gujarati"] = "Gujarati";
408
- IPortalLanguage["Spanish"] = "Spanish";
409
- IPortalLanguage["Russian"] = "Russian";
410
- })(IPortalLanguage = exports.IPortalLanguage || (exports.IPortalLanguage = {}));
411
- ;
412
357
  var IPreDefinedRole;
413
358
  (function (IPreDefinedRole) {
414
359
  IPreDefinedRole["OWNER"] = "OWNER";
@@ -423,21 +368,6 @@ var IPreDefinedRole;
423
368
  IPreDefinedRole["CONTRIBUTORS"] = "CONTRIBUTORS";
424
369
  })(IPreDefinedRole = exports.IPreDefinedRole || (exports.IPreDefinedRole = {}));
425
370
  ;
426
- var IProjectType;
427
- (function (IProjectType) {
428
- IProjectType["internal"] = "internal";
429
- IProjectType["others"] = "others";
430
- IProjectType["asana"] = "asana";
431
- })(IProjectType = exports.IProjectType || (exports.IProjectType = {}));
432
- ;
433
- var IRole;
434
- (function (IRole) {
435
- IRole["ADMIN"] = "ADMIN";
436
- IRole["REVIEWER"] = "REVIEWER";
437
- IRole["USER"] = "USER";
438
- IRole["UNKNOWN"] = "UNKNOWN";
439
- })(IRole = exports.IRole || (exports.IRole = {}));
440
- ;
441
371
  var ISettingValueType;
442
372
  (function (ISettingValueType) {
443
373
  ISettingValueType["Null"] = "Null";
@@ -452,26 +382,6 @@ var ISettingValueType;
452
382
  ISettingValueType["NullableNumber"] = "NullableNumber";
453
383
  })(ISettingValueType = exports.ISettingValueType || (exports.ISettingValueType = {}));
454
384
  ;
455
- var IUserOrderBy;
456
- (function (IUserOrderBy) {
457
- IUserOrderBy["auth0UserId_ASC"] = "auth0UserId_ASC";
458
- IUserOrderBy["auth0UserId_DESC"] = "auth0UserId_DESC";
459
- IUserOrderBy["createdAt_ASC"] = "createdAt_ASC";
460
- IUserOrderBy["createdAt_DESC"] = "createdAt_DESC";
461
- IUserOrderBy["emailSubscription_ASC"] = "emailSubscription_ASC";
462
- IUserOrderBy["emailSubscription_DESC"] = "emailSubscription_DESC";
463
- IUserOrderBy["id_ASC"] = "id_ASC";
464
- IUserOrderBy["id_DESC"] = "id_DESC";
465
- IUserOrderBy["updatedAt_ASC"] = "updatedAt_ASC";
466
- IUserOrderBy["updatedAt_DESC"] = "updatedAt_DESC";
467
- })(IUserOrderBy = exports.IUserOrderBy || (exports.IUserOrderBy = {}));
468
- ;
469
- var IVisibility;
470
- (function (IVisibility) {
471
- IVisibility["private"] = "private";
472
- IVisibility["public"] = "public";
473
- })(IVisibility = exports.IVisibility || (exports.IVisibility = {}));
474
- ;
475
385
  exports.OrgNameInContextFragmentDoc = client_1.gql `
476
386
  fragment OrgNameInContext on Context {
477
387
  orgName
@@ -561,6 +471,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
561
471
  __exportStar(__webpack_require__(/*! ./generated */ "./src/interfaces/generated/index.ts"), exports);
562
472
  __exportStar(__webpack_require__(/*! ./default-settings */ "./src/interfaces/default-settings.ts"), exports);
563
473
  __exportStar(__webpack_require__(/*! ./pure-settings */ "./src/interfaces/pure-settings.ts"), exports);
474
+ __exportStar(__webpack_require__(/*! ./typings */ "./src/interfaces/typings.ts"), exports);
564
475
 
565
476
 
566
477
  /***/ }),
@@ -577,6 +488,20 @@ __exportStar(__webpack_require__(/*! ./pure-settings */ "./src/interfaces/pure-s
577
488
  Object.defineProperty(exports, "__esModule", { value: true });
578
489
 
579
490
 
491
+ /***/ }),
492
+
493
+ /***/ "./src/interfaces/typings.ts":
494
+ /*!***********************************!*\
495
+ !*** ./src/interfaces/typings.ts ***!
496
+ \***********************************/
497
+ /*! no static exports found */
498
+ /***/ (function(module, exports, __webpack_require__) {
499
+
500
+ "use strict";
501
+
502
+ Object.defineProperty(exports, "__esModule", { value: true });
503
+
504
+
580
505
  /***/ }),
581
506
 
582
507
  /***/ "./src/redux/index.ts":
@@ -651,6 +576,61 @@ const settingsReducer = (state = config_1.config.LAYOUT_SETTINGS, { type, payloa
651
576
  exports.settingsReducer = settingsReducer;
652
577
 
653
578
 
579
+ /***/ }),
580
+
581
+ /***/ "./src/utils/index.ts":
582
+ /*!****************************!*\
583
+ !*** ./src/utils/index.ts ***!
584
+ \****************************/
585
+ /*! no static exports found */
586
+ /***/ (function(module, exports, __webpack_require__) {
587
+
588
+ "use strict";
589
+
590
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
591
+ if (k2 === undefined) k2 = k;
592
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
593
+ }) : (function(o, m, k, k2) {
594
+ if (k2 === undefined) k2 = k;
595
+ o[k2] = m[k];
596
+ }));
597
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
598
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
599
+ };
600
+ Object.defineProperty(exports, "__esModule", { value: true });
601
+ __exportStar(__webpack_require__(/*! ./seperatedMenus */ "./src/utils/seperatedMenus.ts"), exports);
602
+
603
+
604
+ /***/ }),
605
+
606
+ /***/ "./src/utils/seperatedMenus.ts":
607
+ /*!*************************************!*\
608
+ !*** ./src/utils/seperatedMenus.ts ***!
609
+ \*************************************/
610
+ /*! no static exports found */
611
+ /***/ (function(module, exports, __webpack_require__) {
612
+
613
+ "use strict";
614
+
615
+ Object.defineProperty(exports, "__esModule", { value: true });
616
+ exports.getMenuSeparation = void 0;
617
+ // @sri custom function
618
+ const getMenuSeparation = (menus) => {
619
+ const upperMenus = menus.filter((menu) => menu.position === 'UPPER');
620
+ const middleMenus = menus.filter((menu) => menu.position === 'MIDDLE' ||
621
+ (menu.position !== 'UPPER' && menu.position !== 'LOWER' && menu.position !== 'BOTTOM'));
622
+ const lowerMenus = menus.filter((menu) => menu.position === 'LOWER');
623
+ const bottomMenus = menus.filter((menu) => menu.position === 'BOTTOM');
624
+ return {
625
+ upperMenus,
626
+ middleMenus,
627
+ lowerMenus,
628
+ bottomMenus,
629
+ };
630
+ };
631
+ exports.getMenuSeparation = getMenuSeparation;
632
+
633
+
654
634
  /***/ }),
655
635
 
656
636
  /***/ "@apollo/client":