rasp-feedback 1.0.0 → 1.0.2

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/README.md CHANGED
@@ -54,10 +54,7 @@ Full documentation available at [https://tryrasp.online/docs](https://tryrasp.on
54
54
  ## License
55
55
 
56
56
  MIT © Rabuuk (Pty) Ltd.
57
- ```
58
57
 
59
- ### Create `LICENSE`:
60
- ```
61
58
  MIT License
62
59
 
63
60
  Copyright (c) 2025 Rabuuk (Pty) Ltd.
@@ -79,7 +76,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79
76
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
80
77
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
81
78
  SOFTWARE.
82
- ```
83
-
84
- ### Create `.npmignore`:
85
- ```
@@ -1 +1 @@
1
- {"version":3,"file":"RaspForm.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/RaspForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS3C,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,wBAAgB,QAAQ,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,2CAwJ9C"}
1
+ {"version":3,"file":"RaspForm.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/RaspForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS3C,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,wBAAgB,QAAQ,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,2CAmK9C"}
@@ -29,6 +29,17 @@ export function RaspForm({ otherStyles }) {
29
29
  setCurrentUrl(window.location.href);
30
30
  }
31
31
  }, []);
32
+ useEffect(() => {
33
+ if (typeof window === 'undefined')
34
+ return;
35
+ if (!document.getElementById('rasp-google-fonts')) {
36
+ const link = document.createElement('link');
37
+ link.id = 'rasp-google-fonts';
38
+ link.rel = 'stylesheet';
39
+ link.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@600&family=Roboto:wght@600&family=Poppins:wght@800&family=Wix+Madefor+Text:wght@400&family=Montserrat:wght@600&family=Nunito:wght@600&family=Open+Sans:wght@600&family=Lato:wght@700&family=Work+Sans:wght@600&family=Source+Sans+3:wght@600&family=Rubik:wght@600&family=Playfair+Display:wght@700&family=Raleway:wght@700&family=DM+Serif+Display&family=Oswald:wght@600&family=Bebas+Neue&family=Merriweather:wght@700&family=Libre+Baskerville:wght@700&family=Cormorant+Garamond:wght@600&family=JetBrains+Mono:wght@600&family=Fira+Code:wght@600&display=swap';
40
+ document.head.appendChild(link);
41
+ }
42
+ }, []);
32
43
  useEffect(() => {
33
44
  if (companyId) {
34
45
  if (form) {
@@ -1 +1 @@
1
- {"version":3,"file":"RaspProvider.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/RaspProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAKlD,OAAO,cAAc,CAAA;AAMrB,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAC;QAChB,GAAG,CAAC,EAAC,MAAM,CAAC;QACZ,IAAI,CAAC,EAAC,MAAM,CAAA;KACb,CAAA;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAGD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2MpD,CAAA"}
1
+ {"version":3,"file":"RaspProvider.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/RaspProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAKlD,OAAO,cAAc,CAAA;AAMrB,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAC;QAChB,GAAG,CAAC,EAAC,MAAM,CAAC;QACZ,IAAI,CAAC,EAAC,MAAM,CAAA;KACb,CAAA;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAGD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAoNpD,CAAA"}
@@ -18,6 +18,17 @@ export const RaspProvider = ({ children, launcherPosition }) => {
18
18
  const [showForm, setShowForm] = useState(false);
19
19
  const [isLoading, setIsLoading] = useState(true);
20
20
  const [showFormSkeleton, setShowFormSkeleton] = useState(false);
21
+ useEffect(() => {
22
+ if (typeof window === 'undefined')
23
+ return;
24
+ if (!document.getElementById('rasp-google-fonts')) {
25
+ const link = document.createElement('link');
26
+ link.id = 'rasp-google-fonts';
27
+ link.rel = 'stylesheet';
28
+ link.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@600&family=Roboto:wght@600&family=Poppins:wght@800&family=Wix+Madefor+Text:wght@400&family=Montserrat:wght@600&family=Nunito:wght@600&family=Open+Sans:wght@600&family=Lato:wght@700&family=Work+Sans:wght@600&family=Source+Sans+3:wght@600&family=Rubik:wght@600&family=Playfair+Display:wght@700&family=Raleway:wght@700&family=DM+Serif+Display&family=Oswald:wght@600&family=Bebas+Neue&family=Merriweather:wght@700&family=Libre+Baskerville:wght@700&family=Cormorant+Garamond:wght@600&family=JetBrains+Mono:wght@600&family=Fira+Code:wght@600&display=swap';
29
+ document.head.appendChild(link);
30
+ }
31
+ }, []);
21
32
  const getForm = async () => {
22
33
  setIsLoading(true);
23
34
  const f = await getFormByDomainOrCompany(companyId, currentUrl);
@@ -1 +1 @@
1
- {"version":3,"file":"StaticFormComponent.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/StaticFormComponent.tsx"],"names":[],"mappings":"AAMA,iBAAS,mBAAmB,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAC,EAAC;IAAG,IAAI,EAAE,GAAG,CAAC;IAClE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,GAAG,EAAE,CAAC;CAAC,2CA0LhB;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"StaticFormComponent.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/StaticFormComponent.tsx"],"names":[],"mappings":"AAMA,iBAAS,mBAAmB,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAC,EAAC;IAAG,IAAI,EAAE,GAAG,CAAC;IAClE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,GAAG,EAAE,CAAC;CAAC,2CAoMhB;AAED,eAAe,mBAAmB,CAAA"}
@@ -1,9 +1,20 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState } from 'react';
2
+ import { useEffect, useState } from 'react';
3
3
  import { iconMap } from '../constants/iconexp';
4
4
  import { fontMap } from '../constants/fontexp';
5
5
  import { addFeedback } from '../functions/functionsexp';
6
6
  function StaticFormComponent({ form, mainTheme, fields }) {
7
+ useEffect(() => {
8
+ if (typeof window === 'undefined')
9
+ return;
10
+ if (!document.getElementById('rasp-google-fonts')) {
11
+ const link = document.createElement('link');
12
+ link.id = 'rasp-google-fonts';
13
+ link.rel = 'stylesheet';
14
+ link.href = 'https://fonts.googleapis.com/css2?family=Inter:wght@600&family=Roboto:wght@600&family=Poppins:wght@800&family=Wix+Madefor+Text:wght@400&family=Montserrat:wght@600&family=Nunito:wght@600&family=Open+Sans:wght@600&family=Lato:wght@700&family=Work+Sans:wght@600&family=Source+Sans+3:wght@600&family=Rubik:wght@600&family=Playfair+Display:wght@700&family=Raleway:wght@700&family=DM+Serif+Display&family=Oswald:wght@600&family=Bebas+Neue&family=Merriweather:wght@700&family=Libre+Baskerville:wght@700&family=Cormorant+Garamond:wght@600&family=JetBrains+Mono:wght@600&family=Fira+Code:wght@600&display=swap';
15
+ document.head.appendChild(link);
16
+ }
17
+ }, []);
7
18
  const [responses, setResponses] = useState(() => form.fieldsResponseObj.map((field) => ({
8
19
  ...field,
9
20
  response: ""
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rasp-feedback",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Official Rasp SDK to implement your user feedback collection forms easily into your website.",
5
5
  "main": "./dist/nextjs/index.js",
6
6
  "types": "./dist/nextjs/index.d.ts",
@@ -8,10 +8,12 @@
8
8
  "copy:assets": "node scripts/copy-assets.js",
9
9
  "build:react": "tsc -p tsconfig.react.json && xcopy /Y src\\nextjs\\index.css dist\\nextjs\\",
10
10
  "build:vue": "vite build && vue-tsc -p tsconfig.vue.json --declaration --emitDeclarationOnly",
11
- "build": "npm run build:react && npm run build:vue && npm run copy:assets",
11
+ "build:angular": "ng build angular && node scripts/copy-angular-dist.js",
12
+ "build": "npm run build:react && npm run build:vue",
12
13
  "dev:react": "tsc -p tsconfig.react.json --watch",
13
14
  "dev:vue": "vite build --watch",
14
- "dev": "concurrently \"npm run dev:react\" \"npm run dev:vue\"",
15
+ "dev:angular": "ng build angular --watch",
16
+ "dev": "concurrently \"npm run dev:react\" \"npm run dev:vue\" \"npm run dev:angular\"",
15
17
  "prepublishOnly": "npm run build"
16
18
  },
17
19
  "exports": {
@@ -30,6 +32,12 @@
30
32
  "import": "./dist/vue/index.js",
31
33
  "require": "./dist/vue/index.js"
32
34
  },
35
+ "./angular": {
36
+ "types": "./dist/angular/index.d.ts",
37
+ "import": "./dist/angular/fesm2022/rasp-feedback-angular.mjs",
38
+ "require": "./dist/angular/fesm2022/rasp-feedback-angular.mjs",
39
+ "default": "./dist/angular/fesm2022/rasp-feedback-angular.mjs"
40
+ },
33
41
  "./nextjs/style.css": "./dist/nextjs/index.css",
34
42
  "./vue/style.css": "./dist/vue/index.css"
35
43
  },
@@ -40,7 +48,9 @@
40
48
  "license": "MIT",
41
49
  "peerDependencies": {
42
50
  "react": "^18.0.0 || ^19.0.0",
43
- "vue": "^3.3.0 || ^3.4.0"
51
+ "vue": "^3.3.0 || ^3.4.0",
52
+ "@angular/core": "^17.0.0 || ^18.0.0 || ^19.0.0",
53
+ "@angular/common": "^17.0.0 || ^18.0.0 || ^19.0.0"
44
54
  },
45
55
  "peerDependenciesMeta": {
46
56
  "react": {
@@ -48,16 +58,29 @@
48
58
  },
49
59
  "vue": {
50
60
  "optional": true
61
+ },
62
+ "@angular/core": {
63
+ "optional": true
64
+ },
65
+ "@angular/common": {
66
+ "optional": true
51
67
  }
52
68
  },
53
69
  "dependencies": {
54
70
  "lucide-react": "^0.555.0",
55
71
  "lucide-vue-next": "^0.561.0",
72
+ "lucide-angular": "^0.469.0",
56
73
  "react-icons": "^5.5.0",
57
74
  "react-live": "^4.1.8",
58
75
  "vue-live": "^2.5.4"
59
76
  },
60
77
  "devDependencies": {
78
+ "@angular-devkit/build-angular": "^19.0.0",
79
+ "@angular/cli": "^19.0.0",
80
+ "@angular/common": "^19.0.0",
81
+ "@angular/compiler": "^19.0.0",
82
+ "@angular/compiler-cli": "^19.0.0",
83
+ "@angular/core": "^19.0.0",
61
84
  "@types/fs-extra": "^11.0.4",
62
85
  "@types/node": "^20.0.0",
63
86
  "@types/react": "^18.0.0",
@@ -65,9 +88,10 @@
65
88
  "concurrently": "^8.2.2",
66
89
  "cpy-cli": "^6.0.0",
67
90
  "fs-extra": "^11.3.3",
91
+ "ng-packagr": "^19.0.0",
68
92
  "typescript": "^5.0.0",
69
93
  "vite": "^5.4.21",
70
94
  "vue": "^3.5.25",
71
95
  "vue-tsc": "^3.1.8"
72
96
  }
73
- }
97
+ }
Binary file
Binary file