@eventlook/sdk 1.7.6 → 1.7.8
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/.gitlab-ci.yml +51 -0
- package/README.md +7 -0
- package/dist/cjs/index.js +25692 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +25674 -12
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/RichText.d.ts +7 -0
- package/dist/types/context/SeatPickerContext.d.ts +13 -0
- package/dist/types/embed.d.ts +49 -0
- package/dist/types/locales/cs.d.ts +1 -0
- package/dist/types/locales/en.d.ts +1 -0
- package/dist/types/locales/es.d.ts +1 -0
- package/dist/types/locales/pl.d.ts +1 -0
- package/dist/types/locales/sk.d.ts +1 -0
- package/dist/types/locales/uk.d.ts +1 -0
- package/dist/types/utils/render-rich-text.d.ts +2 -0
- package/dist/types/utils/types/event.type.d.ts +1 -0
- package/package.json +4 -2
- package/rollup.embed.config.mjs +74 -0
- package/src/components/RichText.tsx +33 -0
- package/src/context/SeatPickerContext.tsx +35 -0
- package/src/embed.tsx +243 -0
- package/src/form/Payment.tsx +6 -1
- package/src/form/PaymentOverviewBox.tsx +35 -19
- package/src/form/PaymentPending.tsx +7 -24
- package/src/form/ReleaseWithMerchandise.tsx +8 -1
- package/src/form/TicketForm.tsx +204 -164
- package/src/form/services/index.tsx +1 -0
- package/src/form/tickets/TicketSelectionMap.tsx +240 -73
- package/src/index.ts +4 -0
- package/src/locales/cs.tsx +1 -0
- package/src/locales/en.tsx +1 -0
- package/src/locales/es.tsx +1 -0
- package/src/locales/pl.tsx +1 -0
- package/src/locales/sk.tsx +1 -0
- package/src/locales/uk.tsx +1 -0
- package/src/react-dom-client.d.ts +11 -0
- package/src/utils/axios.ts +3 -0
- package/src/utils/render-rich-text.ts +100 -0
- package/src/utils/types/event.type.ts +1 -0
- package/dist/cjs/index-Dh-sV_wk.js +0 -41946
- package/dist/cjs/index-Dh-sV_wk.js.map +0 -1
- package/dist/cjs/index.umd-CJ-ZDtw8.js +0 -13397
- package/dist/cjs/index.umd-CJ-ZDtw8.js.map +0 -1
- package/dist/esm/index-DPHu9Sfs.js +0 -41925
- package/dist/esm/index-DPHu9Sfs.js.map +0 -1
- package/dist/esm/index.umd-DPIwz_aJ.js +0 -13395
- package/dist/esm/index.umd-DPIwz_aJ.js.map +0 -1
package/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Build the hosted embed bundle (eventlook.js) and upload it to Cloudflare R2,
|
|
2
|
+
# which serves it via the custom domain https://cdn.eventlook.cz/eventlook.js.
|
|
3
|
+
#
|
|
4
|
+
# This decouples the embed from the frontend: updating it is just a re-run of this
|
|
5
|
+
# job (no FE deploy), and the artifact is never committed to git.
|
|
6
|
+
#
|
|
7
|
+
# Required CI/CD variables (Settings -> CI/CD -> Variables; mask + protect):
|
|
8
|
+
# R2_ACCESS_KEY_ID R2 API token access key id
|
|
9
|
+
# R2_SECRET_ACCESS_KEY R2 API token secret
|
|
10
|
+
# R2_ENDPOINT https://<account-id>.r2.cloudflarestorage.com
|
|
11
|
+
# R2_BUCKET the bucket name (e.g. eventlook-embed)
|
|
12
|
+
|
|
13
|
+
stages:
|
|
14
|
+
- publish-embed
|
|
15
|
+
|
|
16
|
+
publish-embed:
|
|
17
|
+
stage: publish-embed
|
|
18
|
+
image: node:22
|
|
19
|
+
variables:
|
|
20
|
+
AWS_ACCESS_KEY_ID: "$R2_ACCESS_KEY_ID"
|
|
21
|
+
AWS_SECRET_ACCESS_KEY: "$R2_SECRET_ACCESS_KEY"
|
|
22
|
+
AWS_DEFAULT_REGION: "auto" # R2 ignores region but the CLI requires one
|
|
23
|
+
before_script:
|
|
24
|
+
- corepack enable
|
|
25
|
+
- curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o /tmp/awscliv2.zip
|
|
26
|
+
- cd /tmp && unzip -q awscliv2.zip && ./aws/install && cd -
|
|
27
|
+
script:
|
|
28
|
+
- yarn install --frozen-lockfile
|
|
29
|
+
- yarn build:embed
|
|
30
|
+
- VERSION=$(node -p "require('./package.json').version")
|
|
31
|
+
# Latest — short TTL so redeploys propagate in minutes.
|
|
32
|
+
- |
|
|
33
|
+
aws s3 cp dist/embed/eventlook.js "s3://$R2_BUCKET/eventlook.js" \
|
|
34
|
+
--endpoint-url "$R2_ENDPOINT" \
|
|
35
|
+
--content-type "application/javascript; charset=utf-8" \
|
|
36
|
+
--cache-control "public, max-age=300"
|
|
37
|
+
# Immutable, versioned copy — clients can pin if they ever need to.
|
|
38
|
+
- |
|
|
39
|
+
aws s3 cp dist/embed/eventlook.js "s3://$R2_BUCKET/eventlook-$VERSION.js" \
|
|
40
|
+
--endpoint-url "$R2_ENDPOINT" \
|
|
41
|
+
--content-type "application/javascript; charset=utf-8" \
|
|
42
|
+
--cache-control "public, max-age=31536000, immutable"
|
|
43
|
+
# Sourcemap (best-effort).
|
|
44
|
+
- |
|
|
45
|
+
aws s3 cp dist/embed/eventlook.js.map "s3://$R2_BUCKET/eventlook.js.map" \
|
|
46
|
+
--endpoint-url "$R2_ENDPOINT" \
|
|
47
|
+
--content-type "application/json" \
|
|
48
|
+
--cache-control "public, max-age=300" || true
|
|
49
|
+
rules:
|
|
50
|
+
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
|
51
|
+
- if: '$CI_COMMIT_TAG'
|
package/README.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @eventlook/sdk
|
|
2
2
|
|
|
3
|
+
> ⚠️ **Deprecated for third-party distribution.** New integrations should use the
|
|
4
|
+
> hosted **in-page embed SDK** — a single `<script src="https://www.eventlook.cz/eventlook.js">`
|
|
5
|
+
> that needs no npm install and self-updates (no version pinning). See
|
|
6
|
+
> `frontend/docs/embed-sdk.md`. This npm package is kept for existing consumers and
|
|
7
|
+
> for Eventlook's own frontend during the migration window; it is **not** to be
|
|
8
|
+
> distributed to new third parties.
|
|
9
|
+
|
|
3
10
|
**A simple and modular SDK package for integrating an event order form into Next.js or any React application.**
|
|
4
11
|
|
|
5
12
|
This SDK enables you to embed a fully functional and customizable ticketing form into any React app. It is designed for the Eventlook platform.
|