@piserve-tech/octa-form-submission-webcomponent 1.0.0
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 +27 -0
- package/copy-assets.js +47 -0
- package/package.json +87 -0
package/README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# AngularFormSubmissionComponent
|
|
2
|
+
|
|
3
|
+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 16.1.8.
|
|
4
|
+
|
|
5
|
+
## Development server
|
|
6
|
+
|
|
7
|
+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
|
|
8
|
+
|
|
9
|
+
## Code scaffolding
|
|
10
|
+
|
|
11
|
+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
|
12
|
+
|
|
13
|
+
## Build
|
|
14
|
+
|
|
15
|
+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
16
|
+
|
|
17
|
+
## Running unit tests
|
|
18
|
+
|
|
19
|
+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
20
|
+
|
|
21
|
+
## Running end-to-end tests
|
|
22
|
+
|
|
23
|
+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
|
24
|
+
|
|
25
|
+
## Further help
|
|
26
|
+
|
|
27
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
package/copy-assets.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Script to copy assets for web component distribution
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
function copyRecursiveSync(src, dest) {
|
|
6
|
+
if (!fs.existsSync(src)) return;
|
|
7
|
+
const stats = fs.statSync(src);
|
|
8
|
+
if (stats.isDirectory()) {
|
|
9
|
+
if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
|
|
10
|
+
fs.readdirSync(src).forEach(child => {
|
|
11
|
+
copyRecursiveSync(path.join(src, child), path.join(dest, child));
|
|
12
|
+
});
|
|
13
|
+
} else {
|
|
14
|
+
fs.copyFileSync(src, dest);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
// Determine source: local dist or node_modules
|
|
20
|
+
let srcAssets, srcBundleJs, srcBundleCss;
|
|
21
|
+
if (fs.existsSync(path.join(__dirname, 'dist', 'assets'))) {
|
|
22
|
+
srcAssets = path.join(__dirname, 'dist', 'assets');
|
|
23
|
+
srcBundleJs = path.join(__dirname, 'dist', 'bundle.js');
|
|
24
|
+
srcBundleCss = path.join(__dirname, 'dist', 'bundle.css');
|
|
25
|
+
} else {
|
|
26
|
+
srcAssets = path.join(__dirname, 'node_modules', '@piserve-tech', 'form-submission-webcomponent', 'dist', 'assets');
|
|
27
|
+
srcBundleJs = path.join(__dirname, 'node_modules', '@piserve-tech', 'form-submission-webcomponent', 'dist', 'bundle.js');
|
|
28
|
+
srcBundleCss = path.join(__dirname, 'node_modules', '@piserve-tech', 'form-submission-webcomponent', 'dist', 'bundle.css');
|
|
29
|
+
}
|
|
30
|
+
const destAssets = path.join(process.cwd(), 'src', 'assets', 'form-submission-webcomponent');
|
|
31
|
+
|
|
32
|
+
copyRecursiveSync(srcAssets, destAssets);
|
|
33
|
+
|
|
34
|
+
// Also copy bundle.js and bundle.css
|
|
35
|
+
const destBundleJs = path.join(destAssets, 'bundle.js');
|
|
36
|
+
const destBundleCss = path.join(destAssets, 'bundle.css');
|
|
37
|
+
|
|
38
|
+
if (fs.existsSync(srcBundleJs)) {
|
|
39
|
+
fs.copyFileSync(srcBundleJs, destBundleJs);
|
|
40
|
+
console.log('bundle.js copied to src/assets/form-submission-webcomponent');
|
|
41
|
+
}
|
|
42
|
+
if (fs.existsSync(srcBundleCss)) {
|
|
43
|
+
fs.copyFileSync(srcBundleCss, destBundleCss);
|
|
44
|
+
console.log('bundle.css copied to src/assets/form-submission-webcomponent');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
console.log('Assets and bundles copied to src/assets/form-submission-webcomponent');
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@piserve-tech/octa-form-submission-webcomponent",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Distributable web component build for form submission (bundle.js, bundle.css, fonts, icons)",
|
|
5
|
+
"main": "dist/bundle.js",
|
|
6
|
+
"style": "dist/bundle.css",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/bundle.js",
|
|
9
|
+
"dist/bundle.css",
|
|
10
|
+
"dist/assets/fonts",
|
|
11
|
+
"dist/assets/icons",
|
|
12
|
+
"copy-assets.js"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"ng": "ng",
|
|
16
|
+
"start": "ng serve",
|
|
17
|
+
"build": "ng build",
|
|
18
|
+
"watch": "ng build --watch --configuration development",
|
|
19
|
+
"test": "ng test",
|
|
20
|
+
"build:webcomponent": "ng build octa-form-submission-webcomponent --configuration production && node projects/octa-form-submission-webcomponent/concat-webcomponent.js && node projects/octa-form-submission-webcomponent/concat-css.js && node projects/octa-form-submission-webcomponent/copy-assets-to-dist.js && node package-webcomponent.js && node update-bundle-assets.js && node copy-assets.js",
|
|
21
|
+
"publish:webcomponent": "npm publish && npm i @piserve-tech/octa-form-submission-webcomponent@latest && npm run build:webcomponent"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@angular/animations": "^16.1.0",
|
|
25
|
+
"@angular/cdk": "^16.2.14",
|
|
26
|
+
"@angular/common": "^16.1.0",
|
|
27
|
+
"@angular/compiler": "^16.1.0",
|
|
28
|
+
"@angular/core": "^16.1.0",
|
|
29
|
+
"@angular/elements": "^16.2.12",
|
|
30
|
+
"@angular/forms": "^16.2.12",
|
|
31
|
+
"@angular/google-maps": "^16.2.14",
|
|
32
|
+
"@angular/material": "^16.2.14",
|
|
33
|
+
"@angular/platform-browser": "^16.1.0",
|
|
34
|
+
"@angular/platform-browser-dynamic": "^16.1.0",
|
|
35
|
+
"@angular/router": "^16.1.0",
|
|
36
|
+
"@fortawesome/fontawesome-free": "^6.5.1",
|
|
37
|
+
"@kolkov/angular-editor": "^3.0.0-beta.2",
|
|
38
|
+
"@ng-bootstrap/ng-bootstrap": "^15.1.2",
|
|
39
|
+
"@piserve-tech/drop-down": "1.2.89",
|
|
40
|
+
"@piserve-tech/file-preview": "1.0.0",
|
|
41
|
+
"@piserve-tech/file-upload": "1.1.51",
|
|
42
|
+
"@piserve-tech/form-submission-webcomponent": "^1.0.7",
|
|
43
|
+
"@syncfusion/ej2-material-theme": "~25.1.40",
|
|
44
|
+
"@types/google.maps": "^3.55.8",
|
|
45
|
+
"@types/googlemaps": "^3.43.3",
|
|
46
|
+
"@types/quill": "^1.3.10",
|
|
47
|
+
"@webcomponents/custom-elements": "^1.6.0",
|
|
48
|
+
"bootstrap": "^5.3.2",
|
|
49
|
+
"bootstrap-icons": "^1.11.3",
|
|
50
|
+
"jquery": "^3.7.1",
|
|
51
|
+
"ng2-file-upload": "^5.0.0",
|
|
52
|
+
"ngx-bootstrap": "^11.0.2",
|
|
53
|
+
"ngx-infinite-scroll": "^16.0.0",
|
|
54
|
+
"ngx-material-timepicker": "^13.1.1",
|
|
55
|
+
"ngx-quill": "^23.0.1",
|
|
56
|
+
"ngx-skeleton-loader": "^8.1.0",
|
|
57
|
+
"ngx-toastr": "^19.0.0",
|
|
58
|
+
"quill": "^1.3.7",
|
|
59
|
+
"quill-delta": "^5.1.0",
|
|
60
|
+
"rxjs": "~7.8.0",
|
|
61
|
+
"tslib": "^2.3.0",
|
|
62
|
+
"uuid": "^11.1.0",
|
|
63
|
+
"zone.js": "~0.13.0"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@angular-devkit/build-angular": "^16.1.8",
|
|
67
|
+
"@angular/cli": "~16.1.8",
|
|
68
|
+
"@angular/compiler-cli": "^16.1.0",
|
|
69
|
+
"@types/jasmine": "~4.3.0",
|
|
70
|
+
"jasmine-core": "~4.6.0",
|
|
71
|
+
"karma": "~6.4.0",
|
|
72
|
+
"karma-chrome-launcher": "~3.2.0",
|
|
73
|
+
"karma-coverage": "~2.2.0",
|
|
74
|
+
"karma-jasmine": "~5.1.0",
|
|
75
|
+
"karma-jasmine-html-reporter": "~2.1.0",
|
|
76
|
+
"ng-packagr": "^16.0.0",
|
|
77
|
+
"typescript": "~5.1.3"
|
|
78
|
+
},
|
|
79
|
+
"keywords": [
|
|
80
|
+
"webcomponent",
|
|
81
|
+
"form-submission",
|
|
82
|
+
"angular",
|
|
83
|
+
"bundle"
|
|
84
|
+
],
|
|
85
|
+
"author": "Monisa",
|
|
86
|
+
"license": "MIT"
|
|
87
|
+
}
|