unifyedx-storybook-new 0.1.21 → 0.1.22

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/package.json CHANGED
@@ -1,8 +1,15 @@
1
1
  {
2
2
  "name": "unifyedx-storybook-new",
3
3
  "private": false,
4
- "version": "0.1.21",
4
+ "version": "0.1.22",
5
5
  "type": "module",
6
+ "main": "dist/unifyedx-storybook-new.es.js",
7
+ "module": "dist/unifyedx-storybook-new.es.js",
8
+ "types": "dist/index.d.ts",
9
+ "style": "dist/unifyedx-storybook-new.css",
10
+ "files": [
11
+ "dist"
12
+ ],
6
13
  "description": "A modern, accessible React component library powered by Storybook and Vite.",
7
14
  "author": {
8
15
  "name": "Rajesh Kumar",
@@ -28,32 +35,17 @@
28
35
  "ui",
29
36
  "accessible"
30
37
  ],
31
- "main": "dist/unifyedx-storybook-new.es.js",
32
- "module": "dist/unifyedx-storybook-new.es.js",
33
- "types": "dist/index.d.ts",
34
- "style": "dist/main.css",
35
- "files": [
36
- "dist"
37
- ],
38
38
  "exports": {
39
39
  ".": {
40
- "import": "./dist/unifyedx-storybook-new.es.js"
40
+ "import": "./dist/unifyedx-storybook-new.es.js",
41
+ "types": "./dist/index.d.ts"
41
42
  },
42
- "./style.css": "./dist/main.css",
43
- "./dist/main.css": "./dist/main.css",
43
+ "./style.css": "./dist/unifyedx-storybook-new.css",
44
+ "./dist/unifyedx-storybook-new.css": "./dist/unifyedx-storybook-new.css",
45
+ "./package.json": "./package.json",
44
46
  "./api": {
45
47
  "import": "./dist/apiEndpoints.es.js"
46
- },
47
- "./package.json": "./package.json"
48
- },
49
- "scripts": {
50
- "dev": "storybook dev -p 6006",
51
- "build": "rm -rf dist && vite build",
52
- "build:types": "tsc -p tsconfig.types.json",
53
- "lint": "eslint .",
54
- "preview": "vite preview",
55
- "storybook": "storybook dev -p 6006",
56
- "build-storybook": "storybook build"
48
+ }
57
49
  },
58
50
  "peerDependencies": {
59
51
  "react": ">=18",
@@ -110,5 +102,14 @@
110
102
  "typescript": "^5.6.3",
111
103
  "vite": "^7.0.4",
112
104
  "vitest": "^3.2.4"
105
+ },
106
+ "scripts": {
107
+ "dev": "storybook dev -p 6006",
108
+ "build": "vite build",
109
+ "build:types": "tsc -p tsconfig.types.json",
110
+ "lint": "eslint .",
111
+ "preview": "vite preview",
112
+ "storybook": "storybook dev -p 6006",
113
+ "build-storybook": "storybook build"
113
114
  }
114
115
  }
@@ -1,14 +0,0 @@
1
- // src/utils/apiEndpoints.js
2
-
3
- const _isBrowser = () => typeof window !== "undefined";
4
-
5
- /** Base URL: localhost -> dev, else protocol//hostname */
6
- function getBaseUrl() {
7
- if (!_isBrowser()) return "https://dev.unifyed.com"; // SSR fallback
8
- return window.location.hostname === "localhost"
9
- ? "https://dev.unifyed.com"
10
- : `${window.location.protocol}//${window.location.hostname}`;
11
- }
12
-
13
- export { getBaseUrl as g };
14
- //# sourceMappingURL=apiEndpoints.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apiEndpoints.es.js","sources":["../src/utils/apiEndpoints.js"],"sourcesContent":["// src/utils/apiEndpoints.js\nimport { localStore } from \"./lib/storageHelpers\";\n\nconst _isBrowser = () => typeof window !== \"undefined\";\n\n/** Base URL: localhost -> dev, else protocol//hostname */\nexport function getBaseUrl() {\n if (!_isBrowser()) return \"https://dev.unifyed.com\"; // SSR fallback\n return window.location.hostname === \"localhost\"\n ? \"https://dev.unifyed.com\"\n : `${window.location.protocol}//${window.location.hostname}`;\n}\n\n/** Gateway path from localStorage.userProfile.gatewaypath (safe + quiet) */\nexport function gateWayUrl() {\n if (!_isBrowser()) return \"\";\n try {\n const stored = localStore.get(\"userProfile\"); // already parsed or string/null\n if (!stored && window.location.hostname === \"localhost\") {\n return \"/unifyd-gateway/api\";\n }\n const userProfile = stored && typeof stored === \"object\" ? stored : {};\n return userProfile?.gatewaypath ?? \"\";\n } catch {\n return \"\";\n }\n}\n\n/** Derived helpers (recompute each call) */\nexport function gatewayBase() {\n return `${getBaseUrl()}${gateWayUrl()}`;\n}\nexport function userSearchBase() {\n return `${gatewayBase()}/unifydidentity/user/search/findByEmailStartingWith?sort=email,ASC&page=0`;\n}\nexport function adGroupsListSearchApi() {\n return `${gatewayBase()}/unifyedstudioutility/commonutility/groupusers/list?type=AD&page=0&size=20&sortkey=name&sorder=1&createdbyme=false`;\n}\nexport function provisioningBase() {\n return `${gatewayBase()}/unifyedusergroupprovisioning/api`;\n}\nexport function rbacBase() {\n return `${provisioningBase()}/v2/roles`;\n}\nexport function searchRolesApi() {\n return `${rbacBase()}/search`;\n}\nexport function myDriveGatewayBaseV2() {\n return `${gatewayBase()}/unifyed-mydrive/v2`;\n}\nexport function directoryPermissionsApi() {\n return `${myDriveGatewayBaseV2()}/directory/permissions`;\n}\nexport function filePermissionsApi() {\n return `${myDriveGatewayBaseV2()}/file/permissions`;\n}\n\n/** If you still want a snapshot, make it LAZY so it doesn't run at import time */\nexport function getSnapshot() {\n return Object.freeze({\n REACT_APP_BASE_URL: getBaseUrl(),\n GATEWAY_BASE: gatewayBase(),\n USER_SEARCH_BASE: userSearchBase(),\n AD_GROUPS_LIST_SEARCH_API: adGroupsListSearchApi(),\n PROVISIONING_BASE: provisioningBase(),\n RBAC_BASE: rbacBase(),\n SEARCH_ROLES_API: searchRolesApi(),\n MY_DRIVE_GATEWAY_BASE_v2: myDriveGatewayBaseV2(),\n DIRECTORY_PERMISSIONS_API: directoryPermissionsApi(),\n FILE_PERMISSIONS_API: filePermissionsApi(),\n });\n}\n"],"names":[],"mappings":"AAAA;;AAGA,MAAM,UAAU,GAAG,MAAM,OAAO,MAAM,KAAK,WAAW;;AAEtD;AACO,SAAS,UAAU,GAAG;AAC7B,EAAE,IAAI,CAAC,UAAU,EAAE,EAAE,OAAO,yBAAyB,CAAC;AACtD,EAAE,OAAO,MAAM,CAAC,QAAQ,CAAC,QAAQ,KAAK;AACtC,MAAM;AACN,MAAM,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAChE;;;;"}
File without changes