bonsaif-ui 0.1.69 → 0.1.71

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
@@ -4,6 +4,7 @@ export * from './components';
4
4
  export { cn } from './lib/cn';
5
5
  export { configureBonsaifUI, getBonsaifUIConfig, getDataTablePreferencesEndpoint, resetBonsaifUIConfig, setBonsaifDataTablePreferencesEndpoint, } from './lib/dataTableConfig';
6
6
  export type { BonsaifDataTableConfig, BonsaifUIConfig } from './lib/dataTableConfig';
7
+ export * from './lib/embeddedPostMessage';
7
8
  export * from './lib/phoneCountryCodes';
8
9
  export * from './lib/validation';
9
10
  export * from './lib/validationVisibility';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EACH,kBAAkB,EAClB,kBAAkB,EAClB,+BAA+B,EAC/B,oBAAoB,EACpB,sCAAsC,GACzC,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACrF,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,YAAY,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAC9B,OAAO,EACH,kBAAkB,EAClB,kBAAkB,EAClB,+BAA+B,EAC/B,oBAAoB,EACpB,sCAAsC,GACzC,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACrF,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,cAAc,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Helpers to safely post messages from a Prime microservice iframe to its
3
+ * parent host (Prime Suite or another hub).
4
+ *
5
+ * `window.parent.postMessage(payload, targetOrigin)` requires the
6
+ * `targetOrigin` to match the parent's origin. Using `"*"` is allowed but
7
+ * bypassing the check is discouraged; using the app's own origin (which is a
8
+ * common mistake when the embed URL is hardcoded as the hub) triggers a
9
+ * `DOMWindow postMessage` warning because the parent runs on a different
10
+ * origin.
11
+ *
12
+ * Use `resolveParentTargetOrigin()` from any client component to obtain a
13
+ * safe `targetOrigin` for cross-frame messaging with Prime Suite.
14
+ */
15
+ export type ParentTargetOriginSource = "self" | "referrer" | "query" | "sessionStorage" | "wildcard";
16
+ /**
17
+ * Returns a `targetOrigin` string suitable for `window.parent.postMessage`.
18
+ * Always returns a valid string (never throws). When the parent cannot be
19
+ * detected (e.g. running standalone), returns "*" so callers don't have to
20
+ * special-case the non-embedded flow.
21
+ */
22
+ export declare function resolveParentTargetOrigin(): string;
23
+ export declare function describeParentTargetOrigin(): ParentTargetOriginSource;
24
+ //# sourceMappingURL=embeddedPostMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embeddedPostMessage.d.ts","sourceRoot":"","sources":["../../src/lib/embeddedPostMessage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,wBAAwB,GAC9B,MAAM,GACN,UAAU,GACV,OAAO,GACP,gBAAgB,GAChB,UAAU,CAAC;AAajB;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CA+ClD;AAED,wBAAgB,0BAA0B,IAAI,wBAAwB,CA2BrE"}
package/package.json CHANGED
@@ -1,88 +1,88 @@
1
1
  {
2
- "name": "bonsaif-ui",
3
- "version": "0.1.69",
4
- "description": "Reusable Bonsaif UI components for Bonsaif applications.",
5
- "type": "module",
6
- "author": "Bonsaif",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+http://git.develsuit.com:6000/bonsaif/bonsaif-ui.git"
10
- },
11
- "homepage": "http://git.develsuit.com:6000/bonsaif/bonsaif-ui",
12
- "engines": {
13
- "node": ">=18"
14
- },
15
- "main": "./dist/bonsaif-ui.umd.cjs",
16
- "module": "./dist/bonsaif-ui.js",
17
- "types": "./dist/index.d.ts",
18
- "style": "./dist/styles.css",
19
- "sideEffects": [
20
- "./dist/styles.css"
21
- ],
22
- "files": [
23
- "dist",
24
- "styles.css",
25
- "CHANGELOG.md"
26
- ],
27
- "exports": {
28
- ".": {
29
- "types": "./dist/index.d.ts",
30
- "import": "./dist/bonsaif-ui.js",
31
- "require": "./dist/bonsaif-ui.umd.cjs"
2
+ "name": "bonsaif-ui",
3
+ "version": "0.1.71",
4
+ "description": "Reusable Bonsaif UI components for Bonsaif applications.",
5
+ "type": "module",
6
+ "author": "Bonsaif",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+http://git.develsuit.com:6000/bonsaif/bonsaif-ui.git"
32
10
  },
33
- "./styles.css": "./dist/styles.css"
34
- },
35
- "scripts": {
36
- "dev": "vite",
37
- "docs": "npm run build && npm --prefix examples/playground run dev",
38
- "docs:build": "npm run build && npm --prefix examples/playground run build",
39
- "docs:preview": "npm --prefix examples/playground run preview",
40
- "build": "tsc --noEmit && vite build",
41
- "lint": "eslint .",
42
- "pack:dry-run": "npm pack --dry-run",
43
- "release:check": "npm run lint && npm run build && npm run pack:dry-run",
44
- "prepublishOnly": "npm run release:check",
45
- "preview": "vite preview"
46
- },
47
- "keywords": [
48
- "bonsaif-ui",
49
- "react",
50
- "components",
51
- "ui"
52
- ],
53
- "license": "UNLICENSED",
54
- "publishConfig": {
55
- "access": "public"
56
- },
57
- "peerDependencies": {
58
- "overlayscrollbars": ">=2.15.1",
59
- "overlayscrollbars-react": ">=0.5.6",
60
- "react": ">=18.2.0 || >=19.0.0",
61
- "react-day-picker": ">=9.14.0",
62
- "react-dom": ">=18.2.0 || >=19.0.0",
63
- "react-icons": ">=5.6.0",
64
- "recharts": ">=3.0.0",
65
- "sonner": ">=2.0.7"
66
- },
67
- "devDependencies": {
68
- "@eslint/js": "^9.25.1",
69
- "@tailwindcss/vite": "^4.2.4",
70
- "@types/react": "^19.1.2",
71
- "@types/react-dom": "^19.1.2",
72
- "@vitejs/plugin-react": "^4.4.1",
73
- "eslint": "^9.25.1",
74
- "eslint-plugin-react-hooks": "^5.2.0",
75
- "eslint-plugin-react-refresh": "^0.4.20",
76
- "overlayscrollbars": "^2.15.1",
77
- "overlayscrollbars-react": "^0.5.6",
78
- "react-day-picker": "^9.14.0",
79
- "react-icons": "^5.6.0",
80
- "recharts": "^3.10.0",
81
- "sonner": "^2.0.7",
82
- "tailwindcss": "^4.2.4",
83
- "typescript": "^5.8.3",
84
- "typescript-eslint": "^8.31.0",
85
- "vite": "^6.3.4",
86
- "vite-plugin-dts": "^4.5.3"
87
- }
11
+ "homepage": "http://git.develsuit.com:6000/bonsaif/bonsaif-ui",
12
+ "engines": {
13
+ "node": ">=18"
14
+ },
15
+ "main": "./dist/bonsaif-ui.umd.cjs",
16
+ "module": "./dist/bonsaif-ui.js",
17
+ "types": "./dist/index.d.ts",
18
+ "style": "./dist/styles.css",
19
+ "sideEffects": [
20
+ "./dist/styles.css"
21
+ ],
22
+ "files": [
23
+ "dist",
24
+ "styles.css",
25
+ "CHANGELOG.md"
26
+ ],
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "import": "./dist/bonsaif-ui.js",
31
+ "require": "./dist/bonsaif-ui.umd.cjs"
32
+ },
33
+ "./styles.css": "./dist/styles.css"
34
+ },
35
+ "scripts": {
36
+ "dev": "vite",
37
+ "docs": "npm run build && npm --prefix examples/playground run dev",
38
+ "docs:build": "npm run build && npm --prefix examples/playground run build",
39
+ "docs:preview": "npm --prefix examples/playground run preview",
40
+ "build": "tsc --noEmit && vite build",
41
+ "lint": "eslint .",
42
+ "pack:dry-run": "npm pack --dry-run",
43
+ "release:check": "npm run lint && npm run build && npm run pack:dry-run",
44
+ "prepublishOnly": "npm run release:check",
45
+ "preview": "vite preview"
46
+ },
47
+ "keywords": [
48
+ "bonsaif-ui",
49
+ "react",
50
+ "components",
51
+ "ui"
52
+ ],
53
+ "license": "UNLICENSED",
54
+ "publishConfig": {
55
+ "access": "public"
56
+ },
57
+ "peerDependencies": {
58
+ "overlayscrollbars": ">=2.15.1",
59
+ "overlayscrollbars-react": ">=0.5.6",
60
+ "react": ">=18.2.0 || >=19.0.0",
61
+ "react-day-picker": ">=9.14.0",
62
+ "react-dom": ">=18.2.0 || >=19.0.0",
63
+ "react-icons": ">=5.6.0",
64
+ "recharts": ">=3.0.0",
65
+ "sonner": ">=2.0.7"
66
+ },
67
+ "devDependencies": {
68
+ "@eslint/js": "^9.25.1",
69
+ "@tailwindcss/vite": "^4.2.4",
70
+ "@types/react": "^19.1.2",
71
+ "@types/react-dom": "^19.1.2",
72
+ "@vitejs/plugin-react": "^4.4.1",
73
+ "eslint": "^9.25.1",
74
+ "eslint-plugin-react-hooks": "^5.2.0",
75
+ "eslint-plugin-react-refresh": "^0.4.20",
76
+ "overlayscrollbars": "^2.15.1",
77
+ "overlayscrollbars-react": "^0.5.6",
78
+ "react-day-picker": "^9.14.0",
79
+ "react-icons": "^5.6.0",
80
+ "recharts": "^3.10.0",
81
+ "sonner": "^2.0.7",
82
+ "tailwindcss": "^4.2.4",
83
+ "typescript": "^5.8.3",
84
+ "typescript-eslint": "^8.31.0",
85
+ "vite": "^6.3.4",
86
+ "vite-plugin-dts": "^4.5.3"
87
+ }
88
88
  }