@tvsgroup/appointment-form 0.1.1
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 +121 -0
- package/dist/AppointmentForm.d.ts +78 -0
- package/dist/appointment-form.es.js +13878 -0
- package/dist/appointment-form.es.js.map +1 -0
- package/dist/chunks/registerFn-DsKKhIA8.js +9053 -0
- package/dist/chunks/registerFn-DsKKhIA8.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/register.d.ts +1 -0
- package/dist/register.js +8 -0
- package/dist/register.js.map +1 -0
- package/dist/registerFn.d.ts +7 -0
- package/package.json +92 -0
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { r as a, T as e } from "./chunks/registerFn-DsKKhIA8.js";
|
|
2
|
+
import { defineComponent as n, h as o } from "vue";
|
|
3
|
+
const l = n({
|
|
4
|
+
name: "AppointmentForm",
|
|
5
|
+
props: {
|
|
6
|
+
lang: { type: String, default: "nl" },
|
|
7
|
+
awsUrl: { type: String, required: !0 },
|
|
8
|
+
vacationMode: { type: Boolean, default: !1 },
|
|
9
|
+
vacationStart: { type: String, default: "" },
|
|
10
|
+
vacationEnd: { type: String, default: "" },
|
|
11
|
+
vacationReopen: { type: String, default: "" }
|
|
12
|
+
},
|
|
13
|
+
setup(t) {
|
|
14
|
+
return a(), () => o(e, {
|
|
15
|
+
lang: t.lang,
|
|
16
|
+
aws_url: t.awsUrl,
|
|
17
|
+
vacation_mode: t.vacationMode ? "true" : "false",
|
|
18
|
+
vacation_start: t.vacationStart,
|
|
19
|
+
vacation_end: t.vacationEnd,
|
|
20
|
+
vacation_reopen: t.vacationReopen
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
l as AppointmentForm,
|
|
26
|
+
e as TAG_NAME,
|
|
27
|
+
a as register
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/lib/AppointmentForm.ts"],"sourcesContent":["import { defineComponent, h } from 'vue';\nimport { register, TAG_NAME } from './registerFn';\n\nexport interface AppointmentFormProps {\n /** UI language, e.g. \"nl\" or \"en\". Defaults to \"nl\". */\n lang?: string;\n /** Base URL of the appointment API (required). */\n awsUrl: string;\n /** Holiday closure switch. Defaults to false. */\n vacationMode?: boolean;\n /** First closed day (ISO `YYYY-MM-DD`). */\n vacationStart?: string;\n /** Last closed day (ISO `YYYY-MM-DD`). */\n vacationEnd?: string;\n /** First day back at work (ISO `YYYY-MM-DD`). */\n vacationReopen?: string;\n}\n\n/**\n * Vue wrapper around the <tvs-appointment-form> custom element with typed,\n * camelCase props. Rendered via a render function so consumers don't need\n * `isCustomElement` compiler configuration.\n */\nexport const AppointmentForm = defineComponent({\n name: 'AppointmentForm',\n props: {\n lang: { type: String, default: 'nl' },\n awsUrl: { type: String, required: true },\n vacationMode: { type: Boolean, default: false },\n vacationStart: { type: String, default: '' },\n vacationEnd: { type: String, default: '' },\n vacationReopen: { type: String, default: '' }\n },\n setup(props) {\n // Runs on the client before mount; no-ops during SSR so Astro can still\n // server-render the tag and let the browser upgrade it.\n register();\n\n return () =>\n h(TAG_NAME, {\n lang: props.lang,\n aws_url: props.awsUrl,\n vacation_mode: props.vacationMode ? 'true' : 'false',\n vacation_start: props.vacationStart,\n vacation_end: props.vacationEnd,\n vacation_reopen: props.vacationReopen\n });\n }\n});\n"],"names":["AppointmentForm","defineComponent","props","register","h","TAG_NAME"],"mappings":";;AAuBO,MAAMA,IAAkBC,EAAgB;AAAA,EAC7C,MAAM;AAAA,EACN,OAAO;AAAA,IACL,MAAM,EAAE,MAAM,QAAQ,SAAS,KAAA;AAAA,IAC/B,QAAQ,EAAE,MAAM,QAAQ,UAAU,GAAA;AAAA,IAClC,cAAc,EAAE,MAAM,SAAS,SAAS,GAAA;AAAA,IACxC,eAAe,EAAE,MAAM,QAAQ,SAAS,GAAA;AAAA,IACxC,aAAa,EAAE,MAAM,QAAQ,SAAS,GAAA;AAAA,IACtC,gBAAgB,EAAE,MAAM,QAAQ,SAAS,GAAA;AAAA,EAAG;AAAA,EAE9C,MAAMC,GAAO;AAGX,WAAAC,EAAA,GAEO,MACLC,EAAEC,GAAU;AAAA,MACV,MAAMH,EAAM;AAAA,MACZ,SAASA,EAAM;AAAA,MACf,eAAeA,EAAM,eAAe,SAAS;AAAA,MAC7C,gBAAgBA,EAAM;AAAA,MACtB,cAAcA,EAAM;AAAA,MACpB,iBAAiBA,EAAM;AAAA,IAAA,CACxB;AAAA,EACL;AACF,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { register, TAG_NAME } from './registerFn';
|
package/dist/register.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register.js","sources":["../src/lib/register.ts"],"sourcesContent":["// Side-effect entry: importing this module registers <tvs-appointment-form>.\nimport { register } from './registerFn';\n\nregister();\n\nexport { register, TAG_NAME } from './registerFn';\n"],"names":["register"],"mappings":";;AAGAA,EAAA;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const TAG_NAME = "tvs-appointment-form";
|
|
2
|
+
/**
|
|
3
|
+
* Defines the <tvs-appointment-form> custom element. Safe to call multiple
|
|
4
|
+
* times and during SSR: it no-ops without a `window` or when the tag is
|
|
5
|
+
* already registered.
|
|
6
|
+
*/
|
|
7
|
+
export declare function register(): void;
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tvsgroup/appointment-form",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "TVS Engineering appointment booking form as a <tvs-appointment-form> web component with a typed Vue wrapper",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/TVS-LATAM/appointment-form.git"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"private": false,
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"module": "dist/index.js",
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./register": {
|
|
25
|
+
"types": "./dist/register.d.ts",
|
|
26
|
+
"import": "./dist/register.js"
|
|
27
|
+
},
|
|
28
|
+
"./package.json": "./package.json",
|
|
29
|
+
"./dist/*": "./dist/*"
|
|
30
|
+
},
|
|
31
|
+
"sideEffects": [
|
|
32
|
+
"./dist/register.js",
|
|
33
|
+
"./dist/appointment-form.es.js",
|
|
34
|
+
"**/*.css"
|
|
35
|
+
],
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=18.0.0"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"dev": "vite",
|
|
41
|
+
"build": "vite build && vite build --config vite.lib.config.ts",
|
|
42
|
+
"prepublishOnly": "npm run build",
|
|
43
|
+
"preview": "vite preview",
|
|
44
|
+
"test:unit": "vitest",
|
|
45
|
+
"e2e": "playwright test",
|
|
46
|
+
"e2e:dry": "E2E_DRY_RUN=1 playwright test",
|
|
47
|
+
"e2e:ui": "playwright test --ui",
|
|
48
|
+
"e2e:report": "playwright show-report e2e/.report",
|
|
49
|
+
"type-check": "vue-tsc --noEmit",
|
|
50
|
+
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
51
|
+
"format": "prettier --write src/"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@vueuse/core": "^10.7.0",
|
|
55
|
+
"heic2any": "^0.0.4",
|
|
56
|
+
"intl-tel-input": "^23.7.3",
|
|
57
|
+
"js-datepicker": "^5.18.2",
|
|
58
|
+
"pinia": "^2.1.7"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"vue": "^3.5.0"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@microsoft/api-extractor": "^7.58.12",
|
|
65
|
+
"@playwright/test": "^1.62.1",
|
|
66
|
+
"@rushstack/eslint-patch": "^1.8.0",
|
|
67
|
+
"@tsconfig/node20": "^20.1.4",
|
|
68
|
+
"@types/jsdom": "^21.1.7",
|
|
69
|
+
"@types/node": "^20.19.17",
|
|
70
|
+
"@vitejs/plugin-vue": "^5.0.5",
|
|
71
|
+
"@vue/eslint-config-prettier": "^9.0.0",
|
|
72
|
+
"@vue/eslint-config-typescript": "^13.0.0",
|
|
73
|
+
"@vue/test-utils": "^2.4.6",
|
|
74
|
+
"@vue/tsconfig": "^0.5.1",
|
|
75
|
+
"autoprefixer": "^10.4.21",
|
|
76
|
+
"eslint": "^8.57.0",
|
|
77
|
+
"eslint-plugin-vue": "^9.23.0",
|
|
78
|
+
"jsdom": "^24.1.0",
|
|
79
|
+
"npm-run-all2": "^6.2.0",
|
|
80
|
+
"postcss": "^8.4.32",
|
|
81
|
+
"postcss-cli": "^11.0.1",
|
|
82
|
+
"prettier": "^3.2.5",
|
|
83
|
+
"tailwindcss": "^3.3.6",
|
|
84
|
+
"typescript": "^5.6.3",
|
|
85
|
+
"vite": "^5.0.10",
|
|
86
|
+
"vite-plugin-dts": "^5.0.3",
|
|
87
|
+
"vite-plugin-vue-devtools": "^1.0.0-rc.7",
|
|
88
|
+
"vitest": "^1.6.0",
|
|
89
|
+
"vue": "^3.5.12",
|
|
90
|
+
"vue-tsc": "^2.0.21"
|
|
91
|
+
}
|
|
92
|
+
}
|