@cirkay-eng/cirkay-components 0.7.2 → 0.7.5
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/base/magic/MagicAPI.d.ts.map +1 -1
- package/dist/base/magic/MagicAPI.js +5 -3
- package/dist/base/magic/MagicAPI.js.map +1 -1
- package/dist/base/n3xus/N3xusAPI.d.ts +8 -5
- package/dist/base/n3xus/N3xusAPI.d.ts.map +1 -1
- package/dist/base/n3xus/N3xusAPI.js +112 -49
- package/dist/base/n3xus/N3xusAPI.js.map +1 -1
- package/dist/base/n3xus/types.d.ts +68 -25
- package/dist/base/n3xus/types.d.ts.map +1 -1
- package/dist/base/n3xus/types.js +1 -0
- package/dist/base/n3xus/types.js.map +1 -1
- package/dist/components/connected/connected.d.ts +33 -0
- package/dist/components/connected/connected.d.ts.map +1 -0
- package/dist/components/connected/connected.js +592 -0
- package/dist/components/connected/connected.js.map +1 -0
- package/dist/components/connected/index.d.ts +8 -0
- package/dist/components/connected/index.d.ts.map +1 -0
- package/dist/components/connected/index.js +6 -0
- package/dist/components/connected/index.js.map +1 -0
- package/dist/components/error-screen/error-screen.d.ts +4 -3
- package/dist/components/error-screen/error-screen.d.ts.map +1 -1
- package/dist/components/error-screen/error-screen.js +6 -11
- package/dist/components/error-screen/error-screen.js.map +1 -1
- package/dist/components/error-screen/index.d.ts +6 -1
- package/dist/components/error-screen/index.d.ts.map +1 -1
- package/dist/components/error-screen/index.js +6 -0
- package/dist/components/error-screen/index.js.map +1 -0
- package/dist/components/fan-pass-claim/fan-pass-claim.d.ts +35 -14
- package/dist/components/fan-pass-claim/fan-pass-claim.d.ts.map +1 -1
- package/dist/components/fan-pass-claim/fan-pass-claim.js +836 -316
- package/dist/components/fan-pass-claim/fan-pass-claim.js.map +1 -1
- package/dist/components/fan-pass-claim/index.d.ts +8 -2
- package/dist/components/fan-pass-claim/index.d.ts.map +1 -1
- package/dist/components/fan-pass-claim/index.js +6 -0
- package/dist/components/fan-pass-claim/index.js.map +1 -0
- package/dist/components/fan-pass-claim/types.d.ts +7 -0
- package/dist/components/fan-pass-claim/types.d.ts.map +1 -1
- package/dist/components/fan-pass-claim/types.js +9 -1
- package/dist/components/fan-pass-claim/types.js.map +1 -1
- package/dist/components/fan-pass-unlock/fan-pass-unlock.d.ts +31 -17
- package/dist/components/fan-pass-unlock/fan-pass-unlock.d.ts.map +1 -1
- package/dist/components/fan-pass-unlock/fan-pass-unlock.js +541 -198
- package/dist/components/fan-pass-unlock/fan-pass-unlock.js.map +1 -1
- package/dist/components/fan-pass-unlock/index.d.ts +8 -2
- package/dist/components/fan-pass-unlock/index.d.ts.map +1 -1
- package/dist/components/fan-pass-unlock/index.js +6 -0
- package/dist/components/fan-pass-unlock/index.js.map +1 -0
- package/dist/components/frame/frame.d.ts +1 -0
- package/dist/components/frame/frame.d.ts.map +1 -1
- package/dist/components/frame/frame.js +103 -37
- package/dist/components/frame/frame.js.map +1 -1
- package/dist/components/frame/index.d.ts +6 -1
- package/dist/components/frame/index.d.ts.map +1 -1
- package/dist/components/frame/index.js +6 -0
- package/dist/components/frame/index.js.map +1 -0
- package/dist/components/index.d.ts +6 -3
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +11 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/login/index.d.ts +6 -1
- package/dist/components/login/index.d.ts.map +1 -1
- package/dist/components/login/index.js +6 -0
- package/dist/components/login/index.js.map +1 -0
- package/dist/components/login/login.d.ts +3 -3
- package/dist/components/login/login.d.ts.map +1 -1
- package/dist/components/login/login.js +98 -47
- package/dist/components/login/login.js.map +1 -1
- package/dist/components/login/types.d.ts +4 -0
- package/dist/components/login/types.d.ts.map +1 -1
- package/dist/components/mobile-pass/index.d.ts +8 -0
- package/dist/components/mobile-pass/index.d.ts.map +1 -0
- package/dist/components/mobile-pass/index.js +6 -0
- package/dist/components/mobile-pass/index.js.map +1 -0
- package/dist/components/mobile-pass/mobile-pass.d.ts +20 -0
- package/dist/components/mobile-pass/mobile-pass.d.ts.map +1 -0
- package/dist/components/mobile-pass/mobile-pass.js +150 -0
- package/dist/components/mobile-pass/mobile-pass.js.map +1 -0
- package/dist/constants/apis.d.ts.map +1 -1
- package/dist/constants/apis.js +0 -1
- package/dist/constants/apis.js.map +1 -1
- package/dist/constants/components.d.ts +1 -1
- package/dist/constants/components.d.ts.map +1 -1
- package/dist/constants/components.js +1 -1
- package/dist/controllers/LoginController.d.ts +35 -5
- package/dist/controllers/LoginController.d.ts.map +1 -1
- package/dist/controllers/LoginController.js +46 -29
- package/dist/controllers/LoginController.js.map +1 -1
- package/dist/docs/error-screen/designTokens.d.ts +1 -3
- package/dist/docs/error-screen/designTokens.d.ts.map +1 -1
- package/dist/docs/fan-pass-claim/designTokens.d.ts.map +1 -1
- package/dist/docs/fan-pass-claim/fan-pass-claim.stories.d.ts +1 -1
- package/dist/docs/fan-pass-claim/fan-pass-claim.stories.d.ts.map +1 -1
- package/dist/docs/fan-pass-unlock/designTokens.d.ts.map +1 -1
- package/dist/docs/fan-pass-unlock/fan-pass-unlock.stories.d.ts +1 -1
- package/dist/docs/fan-pass-unlock/fan-pass-unlock.stories.d.ts.map +1 -1
- package/dist/docs/login/designTokens.d.ts +1 -3
- package/dist/docs/login/designTokens.d.ts.map +1 -1
- package/dist/docs/login/login.stories.d.ts +1 -1
- package/dist/docs/login/login.stories.d.ts.map +1 -1
- package/dist/docs/mobile-pass/designTokens.d.ts +3 -0
- package/dist/docs/mobile-pass/designTokens.d.ts.map +1 -0
- package/dist/docs/mobile-pass/mobile-pass.stories.d.ts +6 -0
- package/dist/docs/mobile-pass/mobile-pass.stories.d.ts.map +1 -0
- package/dist/events/claim.d.ts +5 -4
- package/dist/events/claim.d.ts.map +1 -1
- package/dist/events/claim.js +2 -2
- package/dist/events/claim.js.map +1 -1
- package/dist/events/login.d.ts +11 -4
- package/dist/events/login.d.ts.map +1 -1
- package/dist/events/login.js +5 -4
- package/dist/events/login.js.map +1 -1
- package/dist/events/unlock.d.ts +16 -2
- package/dist/events/unlock.d.ts.map +1 -1
- package/dist/events/unlock.js +4 -2
- package/dist/events/unlock.js.map +1 -1
- package/dist/internal/CirkayElement.d.ts.map +1 -1
- package/dist/internal/CirkayElement.js +0 -2
- package/dist/internal/CirkayElement.js.map +1 -1
- package/dist/node_modules/.pnpm/@magic-sdk_provider@28.20.0_localforage@1.10.0/node_modules/@magic-sdk/provider/dist/es/index.js +10 -0
- package/dist/node_modules/.pnpm/@magic-sdk_provider@28.20.0_localforage@1.10.0/node_modules/@magic-sdk/provider/dist/es/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@magic-sdk_provider@29.0.6_localforage@1.10.0/node_modules/@magic-sdk/provider/dist/es/index.js +10 -0
- package/dist/node_modules/.pnpm/@magic-sdk_provider@29.0.6_localforage@1.10.0/node_modules/@magic-sdk/provider/dist/es/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@magic-sdk_types@24.18.0/node_modules/@magic-sdk/types/dist/es/index.js +4 -0
- package/dist/node_modules/.pnpm/@magic-sdk_types@24.18.0/node_modules/@magic-sdk/types/dist/es/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@magic-sdk_types@24.18.2/node_modules/@magic-sdk/types/dist/es/index.js +4 -0
- package/dist/node_modules/.pnpm/@magic-sdk_types@24.18.2/node_modules/@magic-sdk/types/dist/es/index.js.map +1 -0
- package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.2_rollup@4.29.1_tslib@2.8.1_typescript@5.7.2 → @rollup_plugin-typescript@12.1.2_rollup@4.34.6_tslib@2.8.1_typescript@5.7.3}/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.34.8_tslib@2.8.1_typescript@5.7.3/node_modules/tslib/tslib.es6.js +31 -0
- package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.34.8_tslib@2.8.1_typescript@5.7.3/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.40.1_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js +31 -0
- package/dist/node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.40.1_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/.pnpm/magic-sdk@28.21.1/node_modules/magic-sdk/dist/es/index.js +9 -0
- package/dist/node_modules/.pnpm/magic-sdk@28.21.1/node_modules/magic-sdk/dist/es/index.js.map +1 -0
- package/dist/node_modules/.pnpm/magic-sdk@29.0.6/node_modules/magic-sdk/dist/es/index.js +9 -0
- package/dist/node_modules/.pnpm/magic-sdk@29.0.6/node_modules/magic-sdk/dist/es/index.js.map +1 -0
- package/dist/node_modules/.pnpm/query-selector-shadow-dom@1.0.1/node_modules/query-selector-shadow-dom/src/normalize.js +169 -0
- package/dist/node_modules/.pnpm/query-selector-shadow-dom@1.0.1/node_modules/query-selector-shadow-dom/src/normalize.js.map +1 -0
- package/dist/node_modules/.pnpm/query-selector-shadow-dom@1.0.1/node_modules/query-selector-shadow-dom/src/querySelectorDeep.js +161 -0
- package/dist/node_modules/.pnpm/query-selector-shadow-dom@1.0.1/node_modules/query-selector-shadow-dom/src/querySelectorDeep.js.map +1 -0
- package/dist/utils/helpers.d.ts +26 -2
- package/dist/utils/helpers.d.ts.map +1 -1
- package/dist/utils/helpers.js +65 -7
- package/dist/utils/helpers.js.map +1 -1
- package/package.json +24 -17
- package/dist/_virtual/_commonjsHelpers.js +0 -6
- package/dist/_virtual/_commonjsHelpers.js.map +0 -1
- package/dist/_virtual/index.js +0 -8
- package/dist/_virtual/index.js.map +0 -1
- package/dist/node_modules/.pnpm/axios-rate-limit@1.4.0_axios@1.7.9/node_modules/axios-rate-limit/src/index.js +0 -182
- package/dist/node_modules/.pnpm/axios-rate-limit@1.4.0_axios@1.7.9/node_modules/axios-rate-limit/src/index.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/adapters.js +0 -82
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/adapters.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/fetch.js +0 -230
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/fetch.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/xhr.js +0 -200
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/adapters/xhr.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/axios.js +0 -87
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/axios.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CancelToken.js +0 -134
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CancelToken.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CanceledError.js +0 -24
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/CanceledError.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/isCancel.js +0 -6
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/cancel/isCancel.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/Axios.js +0 -232
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/Axios.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosError.js +0 -102
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosError.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosHeaders.js +0 -301
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/AxiosHeaders.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/InterceptorManager.js +0 -70
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/InterceptorManager.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/buildFullPath.js +0 -22
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/buildFullPath.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/dispatchRequest.js +0 -82
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/dispatchRequest.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/mergeConfig.js +0 -107
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/mergeConfig.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/settle.js +0 -28
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/settle.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/transformData.js +0 -29
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/core/transformData.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/index.js +0 -160
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/index.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/transitional.js +0 -8
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/defaults/transitional.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/env/data.js +0 -4
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/env/data.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -57
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/AxiosURLSearchParams.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -72
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/HttpStatusCode.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/bind.js +0 -8
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/bind.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/buildURL.js +0 -70
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/buildURL.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/combineURLs.js +0 -16
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/combineURLs.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/composeSignals.js +0 -49
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/composeSignals.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/cookies.js +0 -44
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/cookies.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/formDataToJSON.js +0 -94
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/formDataToJSON.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -16
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAbsoluteURL.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAxiosError.js +0 -15
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isAxiosError.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -17
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/isURLSameOrigin.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/null.js +0 -5
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/null.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseHeaders.js +0 -56
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseHeaders.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseProtocol.js +0 -7
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/parseProtocol.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/progressEventReducer.js +0 -47
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/progressEventReducer.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/resolveConfig.js +0 -59
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/resolveConfig.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/speedometer.js +0 -54
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/speedometer.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/spread.js +0 -29
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/spread.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/throttle.js +0 -45
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/throttle.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toFormData.js +0 -216
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toFormData.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/toURLEncodedForm.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/trackStream.js +0 -89
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/trackStream.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/validator.js +0 -100
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/helpers/validator.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -4
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/Blob.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -4
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/FormData.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -6
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/index.js +0 -16
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/browser/index.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/common/utils.js +0 -46
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/common/utils.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/index.js +0 -10
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/platform/index.js.map +0 -1
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/utils.js +0 -761
- package/dist/node_modules/.pnpm/axios@1.7.9/node_modules/axios/lib/utils.js.map +0 -1
- package/dist/utils/settings.js +0 -7
- package/dist/utils/settings.js.map +0 -1
- /package/dist/node_modules/.pnpm/{@rollup_plugin-typescript@12.1.2_rollup@4.29.1_tslib@2.8.1_typescript@5.7.2 → @rollup_plugin-typescript@12.1.2_rollup@4.34.6_tslib@2.8.1_typescript@5.7.3}/node_modules/tslib/tslib.es6.js +0 -0
|
@@ -1,30 +1,38 @@
|
|
|
1
|
-
import { __decorate } from '../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.
|
|
1
|
+
import { __decorate } from '../../node_modules/.pnpm/@rollup_plugin-typescript@12.1.2_rollup@4.40.1_tslib@2.8.1_typescript@5.8.3/node_modules/tslib/tslib.es6.js';
|
|
2
2
|
import { css, html } from 'lit';
|
|
3
|
-
import { property,
|
|
3
|
+
import { property, query } from 'lit/decorators.js';
|
|
4
4
|
import { state } from 'lit/decorators/state.js';
|
|
5
5
|
import '@pushengineering/push-web-components/button';
|
|
6
6
|
import '@pushengineering/push-web-components/button-icon';
|
|
7
7
|
import '@pushengineering/push-web-components/text';
|
|
8
8
|
import '@pushengineering/push-web-components/vertical-stack';
|
|
9
9
|
import '@pushengineering/push-web-components/overlay';
|
|
10
|
-
import {
|
|
10
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
11
|
+
import { preloadLogos, getLatestSession, addSession } from '../../utils/helpers.js';
|
|
11
12
|
import N3xusApi from '../../base/n3xus/N3xusAPI.js';
|
|
12
13
|
import { ClaimEvents } from '../../events/claim.js';
|
|
14
|
+
import { LoginEvents } from '../../events/login.js';
|
|
13
15
|
import CirkayElement from '../../internal/CirkayElement.js';
|
|
16
|
+
import '../login/index.js';
|
|
14
17
|
import { MintStatus } from '../../base/n3xus/types.js';
|
|
15
|
-
import '../
|
|
16
|
-
import '../
|
|
17
|
-
import '../
|
|
18
|
-
import
|
|
18
|
+
import '../frame/index.js';
|
|
19
|
+
import '../error-screen/index.js';
|
|
20
|
+
import '../mobile-pass/index.js';
|
|
21
|
+
import '../connected/index.js';
|
|
22
|
+
import { ClaimStateTypes, CampaignState, LoginState } from './types.js';
|
|
19
23
|
import { LoginController } from '../../controllers/LoginController.js';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
24
|
+
import { LoginStateTypes } from '../login/types.js';
|
|
25
|
+
import { UnlockEvents } from '../../events/unlock.js';
|
|
22
26
|
|
|
23
|
-
|
|
27
|
+
class FanPassClaim extends CirkayElement {
|
|
24
28
|
constructor() {
|
|
25
29
|
super();
|
|
26
30
|
this.loginController = null;
|
|
27
31
|
this.nexusAPI = undefined;
|
|
32
|
+
this.walletCheckResponse = null;
|
|
33
|
+
this.loginFlow = false;
|
|
34
|
+
this.checkInterval = null;
|
|
35
|
+
this.unlockedContent = false;
|
|
28
36
|
this.apiKey = '';
|
|
29
37
|
this.logoSet = {
|
|
30
38
|
large: {
|
|
@@ -39,12 +47,15 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
39
47
|
alt: 'Cirkay Logo',
|
|
40
48
|
};
|
|
41
49
|
this.fanPassTitle = 'Fan Pass';
|
|
42
|
-
this.
|
|
50
|
+
this.redeemCode = '';
|
|
51
|
+
this.availibleCampaign = false;
|
|
52
|
+
this.campaignId = null;
|
|
43
53
|
this.modal = false;
|
|
44
54
|
this.validateAfterModal = false;
|
|
45
|
-
this.staging =
|
|
55
|
+
this.staging = false;
|
|
46
56
|
this.debugLogging = false;
|
|
47
|
-
this.successUrl = '
|
|
57
|
+
this.successUrl = '';
|
|
58
|
+
this.campaignUrl = window.location.href;
|
|
48
59
|
this.autoRedirect = false;
|
|
49
60
|
this.showRedeemInput = false;
|
|
50
61
|
this.success = false;
|
|
@@ -53,15 +64,30 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
53
64
|
this.btnTextColor = '#FFFFFF';
|
|
54
65
|
this.faqUrl = 'https://cirkay.com/faq/';
|
|
55
66
|
this._claimState = ClaimStateTypes.validating;
|
|
67
|
+
this._campaignState = CampaignState.available;
|
|
56
68
|
this._pageNumber = 1;
|
|
57
69
|
this._user = undefined;
|
|
58
70
|
this._loginState = LoginState.initialising;
|
|
59
|
-
this.
|
|
60
|
-
const
|
|
61
|
-
|
|
71
|
+
this._codeStatus = null;
|
|
72
|
+
const imgApple = new Image();
|
|
73
|
+
imgApple.src =
|
|
74
|
+
'https://cdn.n3xus.services/production/assets/images/US-UK_Add_to_Apple_Wallet_RGB_101421.svg';
|
|
75
|
+
const imgGoogle = new Image();
|
|
76
|
+
imgGoogle.src =
|
|
77
|
+
'https://cdn.n3xus.services/production/assets/images/enGB_add_to_google_wallet_wallet-button.svg';
|
|
78
|
+
const imgCirkay = new Image();
|
|
79
|
+
imgCirkay.src =
|
|
80
|
+
'https://n3xus-store.s3.eu-west-2.amazonaws.com/staging/assets/cirkay-logo-transparent-no-padding.webp';
|
|
62
81
|
}
|
|
63
82
|
connectedCallback() {
|
|
64
83
|
super.connectedCallback();
|
|
84
|
+
try {
|
|
85
|
+
preloadLogos(this.logoSet);
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
console.warn('Error loading logo images', error);
|
|
89
|
+
}
|
|
90
|
+
this._claimState = ClaimStateTypes.validating;
|
|
65
91
|
const magicApiOptions = {
|
|
66
92
|
staging: this.staging,
|
|
67
93
|
};
|
|
@@ -72,246 +98,522 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
72
98
|
stagging: this.staging,
|
|
73
99
|
};
|
|
74
100
|
this.nexusAPI = new N3xusApi(n3xusOptions);
|
|
75
|
-
const
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
this._claimState = ClaimStateTypes.
|
|
82
|
-
|
|
101
|
+
const session = getLatestSession(this.apiKey);
|
|
102
|
+
const minutesAgo = Date.now() - 3.5 * 60 * 1000;
|
|
103
|
+
if (session &&
|
|
104
|
+
this.loginController.loginInit &&
|
|
105
|
+
this.loginController.loggedIn &&
|
|
106
|
+
!(session.issueTS < minutesAgo)) {
|
|
107
|
+
this._claimState = ClaimStateTypes.redeemedCheckingSession;
|
|
108
|
+
}
|
|
109
|
+
this.setUpdateState();
|
|
110
|
+
}
|
|
111
|
+
async handleMintType() {
|
|
112
|
+
this.logging('handleMintType');
|
|
113
|
+
this.logging('Campaing ID', this.campaignId);
|
|
114
|
+
if (this.campaignId) {
|
|
115
|
+
const campaign = await this.getCampaignInformation(this.campaignId);
|
|
116
|
+
this.logging('CAMPAIGN details', campaign);
|
|
117
|
+
const currentDate = new Date();
|
|
118
|
+
const startDate = campaign.start_date
|
|
119
|
+
? new Date(campaign.start_date)
|
|
120
|
+
: null;
|
|
121
|
+
const endDate = campaign.end_date
|
|
122
|
+
? new Date(campaign.end_date)
|
|
123
|
+
: null;
|
|
124
|
+
if (campaign.limit <= campaign.used_count) {
|
|
125
|
+
this._campaignState = CampaignState.noFanPassesLeft;
|
|
126
|
+
this.error = `${this.fanPassTitle} can no longer be claimed`;
|
|
127
|
+
this._claimState = ClaimStateTypes.error;
|
|
128
|
+
this._codeStatus = {
|
|
129
|
+
status: MintStatus.unavailable,
|
|
130
|
+
available: campaign.limit - campaign.used_count,
|
|
131
|
+
campaign: campaign,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
else if (endDate && currentDate > endDate) {
|
|
135
|
+
this._campaignState = CampaignState.campaignOver;
|
|
136
|
+
this.error = 'This claim is no longer available';
|
|
137
|
+
this._claimState = ClaimStateTypes.error;
|
|
138
|
+
this._codeStatus = {
|
|
139
|
+
status: MintStatus.unavailable,
|
|
140
|
+
available: campaign.limit - campaign.used_count,
|
|
141
|
+
campaign: campaign,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
else if (startDate && currentDate < startDate) {
|
|
145
|
+
const timeDiff = startDate.getTime() - currentDate.getTime();
|
|
146
|
+
const totalHours = Math.floor(timeDiff / (1000 * 60 * 60));
|
|
147
|
+
const days = Math.floor(totalHours / 24);
|
|
148
|
+
const remainingHours = totalHours % 24;
|
|
149
|
+
let text;
|
|
150
|
+
if (days > 0) {
|
|
151
|
+
text = `Access to this claim goes live in ${days} ${days === 1 ? 'day' : 'days'} and ${remainingHours} ${remainingHours === 1 ? 'hour' : 'hours'}`;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
text = `Access to this claim goes live in ${totalHours} ${totalHours === 1 ? 'hour' : 'hours'}`;
|
|
155
|
+
}
|
|
156
|
+
this._campaignState = CampaignState.campaignNotBegun;
|
|
157
|
+
this.error = text;
|
|
158
|
+
this._claimState = ClaimStateTypes.error;
|
|
159
|
+
this._codeStatus = {
|
|
160
|
+
status: MintStatus.unavailable,
|
|
161
|
+
available: campaign.limit - campaign.used_count,
|
|
162
|
+
campaign: campaign,
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
this._codeStatus = {
|
|
167
|
+
status: MintStatus.available,
|
|
168
|
+
available: campaign.limit - campaign.used_count,
|
|
169
|
+
campaign: campaign,
|
|
170
|
+
};
|
|
171
|
+
this.availibleCampaign = true;
|
|
172
|
+
this.campaignUrl = campaign.campaign_url;
|
|
173
|
+
if (this.loginController?.loginInit) {
|
|
174
|
+
this._claimState = ClaimStateTypes.availableLoggedIn;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
83
177
|
}
|
|
84
|
-
|
|
85
|
-
|
|
178
|
+
else {
|
|
179
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
180
|
+
const urlRedeemCode = this.redeemCode.trim() === '' && !this.redeemCode
|
|
181
|
+
? urlParams.get('code')
|
|
182
|
+
: this.redeemCode;
|
|
183
|
+
if (!urlRedeemCode) {
|
|
184
|
+
this.setCampaignStatus().then(() => {
|
|
185
|
+
if (!this.availibleCampaign) {
|
|
186
|
+
this.error =
|
|
187
|
+
'Seems like your link is invalid, try again or contact support';
|
|
188
|
+
this._claimState = ClaimStateTypes.error;
|
|
189
|
+
}
|
|
190
|
+
else if (this.loginController?.loginInit) {
|
|
191
|
+
this._claimState = ClaimStateTypes.available;
|
|
192
|
+
}
|
|
193
|
+
else ;
|
|
194
|
+
return;
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
this.setCodeStatus(null, urlRedeemCode);
|
|
199
|
+
}
|
|
86
200
|
}
|
|
87
|
-
this._claimState = ClaimStateTypes.validating;
|
|
88
201
|
}
|
|
89
|
-
|
|
202
|
+
willUpdate(changedProperties) {
|
|
90
203
|
try {
|
|
91
|
-
|
|
204
|
+
if (changedProperties.has('apiKey')) {
|
|
205
|
+
const n3xusOptions = {
|
|
206
|
+
apiKey: this.apiKey,
|
|
207
|
+
stagging: this.staging,
|
|
208
|
+
};
|
|
209
|
+
this.nexusAPI = new N3xusApi(n3xusOptions);
|
|
210
|
+
}
|
|
211
|
+
if (changedProperties.has('campaignId') ||
|
|
212
|
+
changedProperties.has('apiKey')) {
|
|
213
|
+
this.handleMintType();
|
|
214
|
+
}
|
|
92
215
|
this.setUpdateState();
|
|
93
216
|
}
|
|
94
217
|
catch (error) {
|
|
95
218
|
console.error('Error in update', error);
|
|
96
219
|
}
|
|
97
220
|
}
|
|
98
|
-
setUpdateState() {
|
|
221
|
+
async setUpdateState() {
|
|
222
|
+
if (this._claimState === ClaimStateTypes.redeemedCheckingSession &&
|
|
223
|
+
this.loginController?.loginInit &&
|
|
224
|
+
this.loginController?.loggedIn) {
|
|
225
|
+
const walletCheckResponse = await this.setSessionToken();
|
|
226
|
+
if (walletCheckResponse && walletCheckResponse.data?.holds) {
|
|
227
|
+
this._claimState = ClaimStateTypes.redeemedLogin;
|
|
228
|
+
this.unlockedContentEmit();
|
|
229
|
+
}
|
|
230
|
+
else if (walletCheckResponse &&
|
|
231
|
+
!walletCheckResponse.data?.holds) {
|
|
232
|
+
this._claimState = ClaimStateTypes.availableLoggedIn;
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
this._claimState = ClaimStateTypes.error;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
99
238
|
if (this.loginController?.loginInit &&
|
|
100
239
|
this._claimState === ClaimStateTypes.validating &&
|
|
101
240
|
!this.loginController?.loggedIn &&
|
|
102
|
-
this.
|
|
241
|
+
this._codeStatus?.status === MintStatus.redeemed) {
|
|
103
242
|
this._claimState = ClaimStateTypes.redeemedLoggedout;
|
|
104
243
|
}
|
|
105
244
|
else if (this.loginController?.loginInit &&
|
|
106
|
-
this.
|
|
245
|
+
this._codeStatus?.status === MintStatus.redeemed &&
|
|
107
246
|
this._claimState === ClaimStateTypes.validating &&
|
|
108
247
|
this.loginController?.loggedIn &&
|
|
109
248
|
this.loginController?.user?.walletAddress ===
|
|
110
|
-
this.
|
|
111
|
-
this.
|
|
112
|
-
|
|
249
|
+
this._codeStatus?.wallet) {
|
|
250
|
+
this.setSessionToken().then(() => {
|
|
251
|
+
this._claimState = ClaimStateTypes.redeemedLogin;
|
|
252
|
+
});
|
|
113
253
|
}
|
|
114
254
|
else if (this.loginController?.loginInit &&
|
|
115
255
|
this._claimState === ClaimStateTypes.validating &&
|
|
116
|
-
this.
|
|
256
|
+
this._codeStatus?.status === MintStatus.redeemed &&
|
|
117
257
|
this.loginController?.loggedIn &&
|
|
118
258
|
this.loginController?.user?.walletAddress !==
|
|
119
|
-
this.
|
|
259
|
+
this._codeStatus?.wallet) {
|
|
120
260
|
this._claimState = ClaimStateTypes.redeemedLoggedInInvalid;
|
|
121
261
|
}
|
|
122
262
|
else if (this.loginController?.loginInit &&
|
|
123
|
-
this.
|
|
124
|
-
this.
|
|
125
|
-
this.
|
|
126
|
-
this.
|
|
263
|
+
this.loginController?.loggedIn &&
|
|
264
|
+
this._claimState === ClaimStateTypes.available &&
|
|
265
|
+
this._codeStatus?.status === MintStatus.available &&
|
|
266
|
+
this.loginFlow) {
|
|
267
|
+
if (this.loginController?.optinDetails) {
|
|
268
|
+
this.emit(LoginEvents.Submit, {
|
|
269
|
+
bubbles: true,
|
|
270
|
+
composed: true,
|
|
271
|
+
detail: {
|
|
272
|
+
...this.loginController?.optinDetails,
|
|
273
|
+
userEmail: this.loginController?.user?.email,
|
|
274
|
+
},
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
this.handleClaim();
|
|
127
278
|
}
|
|
128
279
|
else if (this.loginController?.loginInit &&
|
|
280
|
+
this.loginController?.loggedIn &&
|
|
281
|
+
this._claimState != ClaimStateTypes.redeemedLogin &&
|
|
282
|
+
this._claimState !== ClaimStateTypes.minting) {
|
|
283
|
+
const walletCheckResponse = await this.setSessionToken();
|
|
284
|
+
if (walletCheckResponse && walletCheckResponse.data?.holds) {
|
|
285
|
+
this._claimState = ClaimStateTypes.redeemedLogin;
|
|
286
|
+
}
|
|
287
|
+
else if (!walletCheckResponse) {
|
|
288
|
+
this._claimState = ClaimStateTypes.availableLoggedIn;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
else if (this.loginController?.loginInit &&
|
|
292
|
+
!this.loginController?.loggedIn &&
|
|
129
293
|
this._claimState === ClaimStateTypes.validating &&
|
|
130
|
-
this.
|
|
294
|
+
this._codeStatus?.status === MintStatus.available &&
|
|
131
295
|
!this.loginController?.loggedIn) {
|
|
296
|
+
this.loginFlow = true;
|
|
132
297
|
this._claimState = ClaimStateTypes.available;
|
|
133
298
|
}
|
|
134
|
-
if (this._claimState === ClaimStateTypes.available &&
|
|
135
|
-
this.loginController?.loginInit &&
|
|
136
|
-
this.loginController?.loggedIn) {
|
|
137
|
-
this.handleClaim();
|
|
138
|
-
this.emit(ClaimEvents.Claiming, { bubbles: false, composed: true });
|
|
139
|
-
}
|
|
140
299
|
if (this.loginController?.loginInit &&
|
|
141
300
|
this._claimState === ClaimStateTypes.redeemedLoggedout &&
|
|
142
301
|
this.loginController?.loggedIn &&
|
|
143
302
|
this.loginController?.user?.walletAddress ===
|
|
144
|
-
this.
|
|
145
|
-
this.
|
|
146
|
-
|
|
303
|
+
this._codeStatus?.wallet) {
|
|
304
|
+
this.setSessionToken().then(() => {
|
|
305
|
+
this._claimState = ClaimStateTypes.redeemedLogin;
|
|
306
|
+
});
|
|
147
307
|
}
|
|
148
308
|
else if (this.loginController?.loginInit &&
|
|
149
309
|
this._claimState === ClaimStateTypes.redeemedLoggedout &&
|
|
150
310
|
this.loginController?.loggedIn &&
|
|
151
311
|
this.loginController?.user?.walletAddress !==
|
|
152
|
-
this.
|
|
312
|
+
this._codeStatus?.wallet) {
|
|
153
313
|
this._claimState = ClaimStateTypes.redeemedLoggedInInvalid;
|
|
154
314
|
}
|
|
315
|
+
if ((this._claimState === ClaimStateTypes.redeemedLogin ||
|
|
316
|
+
this._claimState === ClaimStateTypes.availableLoggedIn) &&
|
|
317
|
+
this.loginController?.loginInit &&
|
|
318
|
+
!this.loginController?.loggedIn) {
|
|
319
|
+
this.unlockedContent = false;
|
|
320
|
+
this.loginFlow = true;
|
|
321
|
+
this.walletCheckResponse = null;
|
|
322
|
+
if (this._codeStatus?.status === MintStatus.available) {
|
|
323
|
+
this._claimState = ClaimStateTypes.available;
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
this._claimState = ClaimStateTypes.invalid;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
155
329
|
}
|
|
156
|
-
async
|
|
330
|
+
async setCodeStatus(issueId = null, redeemCode = null) {
|
|
157
331
|
if (!this.nexusAPI) {
|
|
158
332
|
throw new Error('Nexus API is not initialized');
|
|
159
333
|
}
|
|
160
|
-
|
|
334
|
+
let status;
|
|
335
|
+
if (issueId) {
|
|
336
|
+
status = await this.nexusAPI.checkIssueStatus((issueId = issueId), (redeemCode = null));
|
|
337
|
+
}
|
|
338
|
+
else if (redeemCode) {
|
|
339
|
+
this.redeemCode = redeemCode;
|
|
340
|
+
status = await this.nexusAPI.checkIssueStatus((issueId = null), (redeemCode = redeemCode));
|
|
341
|
+
}
|
|
161
342
|
if (!status) {
|
|
162
|
-
this.
|
|
163
|
-
this.logging('Token status updated', status);
|
|
343
|
+
this.logging('Code status updated', status);
|
|
164
344
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
345
|
+
else {
|
|
346
|
+
this.logging('setCodeStatus', issueId);
|
|
347
|
+
this._codeStatus = status.data;
|
|
348
|
+
this.logging('Code Status', status);
|
|
349
|
+
if (!status.ok) {
|
|
350
|
+
this._claimState = ClaimStateTypes.error;
|
|
351
|
+
}
|
|
352
|
+
switch (status.data?.status) {
|
|
353
|
+
case MintStatus.available:
|
|
354
|
+
if (this.loginController?.loginInit &&
|
|
355
|
+
this.loginController?.loggedIn) {
|
|
356
|
+
this.setSessionToken().then(() => {
|
|
357
|
+
this._claimState = ClaimStateTypes.availableLoggedIn;
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
else if (this.loginController?.loginInit &&
|
|
361
|
+
!this.loginController?.loggedIn) {
|
|
362
|
+
this._claimState = ClaimStateTypes.validating;
|
|
363
|
+
}
|
|
364
|
+
break;
|
|
365
|
+
case MintStatus.redeemed:
|
|
366
|
+
if (!this.loginController?.loginInit) {
|
|
367
|
+
this._claimState = ClaimStateTypes.validating;
|
|
368
|
+
}
|
|
369
|
+
else if (this.loginController?.loginInit &&
|
|
370
|
+
this.loginController?.loggedIn &&
|
|
371
|
+
this.loginController?.user?.walletAddress ===
|
|
372
|
+
status.data?.wallet) {
|
|
373
|
+
this.setSessionToken().then(() => {
|
|
374
|
+
this._claimState = ClaimStateTypes.redeemedLogin;
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
else if (this.loginController?.loginInit &&
|
|
378
|
+
this.loginController?.loggedIn &&
|
|
379
|
+
this.loginController?.user?.walletAddress !==
|
|
380
|
+
status.data?.wallet) {
|
|
381
|
+
this._claimState =
|
|
382
|
+
ClaimStateTypes.redeemedLoggedInInvalid;
|
|
383
|
+
}
|
|
384
|
+
else {
|
|
385
|
+
this._claimState =
|
|
386
|
+
ClaimStateTypes.redeemedLoggedInInvalid;
|
|
387
|
+
}
|
|
388
|
+
break;
|
|
389
|
+
case MintStatus.minting:
|
|
390
|
+
this._claimState = ClaimStateTypes.minting;
|
|
391
|
+
break;
|
|
392
|
+
case MintStatus.error:
|
|
393
|
+
this._claimState = ClaimStateTypes.mintingError;
|
|
394
|
+
break;
|
|
395
|
+
default:
|
|
396
|
+
this.error =
|
|
397
|
+
'Seems like your link is invalid, try again or contact support';
|
|
398
|
+
this._claimState = ClaimStateTypes.invalid;
|
|
399
|
+
break;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
async getCampaignInformation(campaignId) {
|
|
404
|
+
try {
|
|
405
|
+
const { data, error } = (await this.nexusAPI?.getCampaignInformation(campaignId)) || {};
|
|
406
|
+
if (error || !data) {
|
|
407
|
+
this.error =
|
|
408
|
+
error ||
|
|
409
|
+
'An error occurred while fetching campaign information';
|
|
410
|
+
this._claimState = ClaimStateTypes.error;
|
|
411
|
+
throw new Error(this.error);
|
|
412
|
+
}
|
|
413
|
+
return data;
|
|
414
|
+
}
|
|
415
|
+
catch (err) {
|
|
416
|
+
this.error =
|
|
417
|
+
err instanceof Error
|
|
418
|
+
? err.message
|
|
419
|
+
: 'An error occurred while fetching campaign information';
|
|
169
420
|
this._claimState = ClaimStateTypes.error;
|
|
170
|
-
|
|
421
|
+
throw err;
|
|
171
422
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
break;
|
|
184
|
-
case MintStatus.redeemed:
|
|
185
|
-
if (!this.loginController?.loginInit) {
|
|
186
|
-
this._claimState = ClaimStateTypes.validating;
|
|
187
|
-
}
|
|
188
|
-
else if (this.loginController?.loginInit &&
|
|
189
|
-
this.loginController?.loggedIn &&
|
|
190
|
-
this.loginController?.user?.walletAddress ===
|
|
191
|
-
status.data?.wallet) {
|
|
192
|
-
this._claimState = ClaimStateTypes.redeemedLogin;
|
|
193
|
-
this.setSessionToken();
|
|
194
|
-
}
|
|
195
|
-
else if (this.loginController?.loginInit &&
|
|
196
|
-
this.loginController?.loggedIn &&
|
|
197
|
-
this.loginController?.user?.walletAddress !==
|
|
198
|
-
status.data?.wallet) {
|
|
199
|
-
this._claimState = ClaimStateTypes.redeemedLoggedInInvalid;
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
this._claimState = ClaimStateTypes.redeemedLoggedInInvalid;
|
|
203
|
-
}
|
|
204
|
-
break;
|
|
205
|
-
case MintStatus.minting:
|
|
206
|
-
this._claimState = ClaimStateTypes.minting;
|
|
207
|
-
break;
|
|
208
|
-
case MintStatus.error:
|
|
209
|
-
this._claimState = ClaimStateTypes.mintingError;
|
|
210
|
-
break;
|
|
211
|
-
default:
|
|
212
|
-
this.error = 'This code is invalid';
|
|
213
|
-
this._claimState = ClaimStateTypes.invalid;
|
|
214
|
-
break;
|
|
423
|
+
}
|
|
424
|
+
async setCampaignStatus() {
|
|
425
|
+
const validation = await this.nexusAPI?.checkCampaign(this.campaignUrl);
|
|
426
|
+
if (!validation) {
|
|
427
|
+
this.error = 'an error occured';
|
|
428
|
+
this._claimState = ClaimStateTypes.error;
|
|
429
|
+
throw new Error('error occured');
|
|
430
|
+
}
|
|
431
|
+
if (validation.ok && validation.data.available) {
|
|
432
|
+
this.availibleCampaign = true;
|
|
215
433
|
}
|
|
216
|
-
return status;
|
|
217
434
|
}
|
|
218
|
-
validateMint(interval,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
this._claimState = ClaimStateTypes.redeemedLogin;
|
|
226
|
-
this.setSessionToken();
|
|
227
|
-
clearInterval(checkInterval);
|
|
228
|
-
this.emit(ClaimEvents.Claimed, { bubbles: false });
|
|
229
|
-
this.success = true;
|
|
435
|
+
validateMint(interval, issueId) {
|
|
436
|
+
this.checkInterval = setInterval(async () => {
|
|
437
|
+
const status = await this.nexusAPI?.checkIssueStatus(issueId, null);
|
|
438
|
+
if (!status) {
|
|
439
|
+
this.error = 'an error occured';
|
|
440
|
+
this._claimState = ClaimStateTypes.error;
|
|
441
|
+
throw new Error('error occured');
|
|
230
442
|
}
|
|
231
|
-
else
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
443
|
+
else {
|
|
444
|
+
if (status.ok === true &&
|
|
445
|
+
status.data?.status === MintStatus.redeemed) {
|
|
446
|
+
clearInterval(this.checkInterval);
|
|
447
|
+
this.walletCheckResponse = await this.setSessionToken();
|
|
448
|
+
this.emit(ClaimEvents.Claimed, {
|
|
449
|
+
bubbles: true,
|
|
450
|
+
composed: true,
|
|
451
|
+
detail: {
|
|
452
|
+
sessionToken: this.walletCheckResponse?.data?.sessionToken,
|
|
453
|
+
email: this.walletCheckResponse?.data?.email,
|
|
454
|
+
apiKey: this.apiKey,
|
|
455
|
+
holds: this.walletCheckResponse?.data?.holds,
|
|
456
|
+
mobileWallet: this.walletCheckResponse?.data?.mobilePasses,
|
|
457
|
+
},
|
|
458
|
+
});
|
|
459
|
+
this.success = true;
|
|
460
|
+
if (this.loginController?.loginInit &&
|
|
461
|
+
this.loginController?.loggedIn) {
|
|
462
|
+
this._claimState = ClaimStateTypes.redeemedLogin;
|
|
463
|
+
}
|
|
464
|
+
else {
|
|
465
|
+
this._claimState = ClaimStateTypes.redeemedLoggedout;
|
|
466
|
+
}
|
|
467
|
+
this.emit(ClaimEvents.Claimed, {
|
|
468
|
+
bubbles: true,
|
|
469
|
+
composed: true,
|
|
470
|
+
detail: {
|
|
471
|
+
sessionToken: this.walletCheckResponse?.data?.sessionToken,
|
|
472
|
+
email: this.walletCheckResponse?.data?.email,
|
|
473
|
+
apiKey: this.apiKey,
|
|
474
|
+
holds: this.walletCheckResponse?.data?.holds,
|
|
475
|
+
mobileWallet: this.walletCheckResponse?.data?.mobilePasses,
|
|
476
|
+
},
|
|
477
|
+
});
|
|
478
|
+
this.unlockedContentEmit();
|
|
479
|
+
}
|
|
480
|
+
else if (status.ok === true &&
|
|
481
|
+
status.data?.status === MintStatus.error) {
|
|
482
|
+
this._claimState = ClaimStateTypes.mintingError;
|
|
483
|
+
clearInterval(this.checkInterval);
|
|
484
|
+
this.error = 'Claim failed. Please try again later.';
|
|
485
|
+
}
|
|
235
486
|
}
|
|
236
487
|
}, interval);
|
|
237
488
|
}
|
|
238
489
|
async handleClaim() {
|
|
490
|
+
this._claimState = ClaimStateTypes.minting;
|
|
239
491
|
let didToken = this.loginController?.user?.did?.token;
|
|
240
492
|
if (didToken === undefined) {
|
|
241
493
|
await this.loginController?.getDidToken();
|
|
242
494
|
didToken = this.loginController?.user?.did?.token;
|
|
243
|
-
console.log(didToken);
|
|
244
495
|
}
|
|
245
|
-
|
|
246
|
-
this.
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
this.validateMint(interval, maxAttempts);
|
|
496
|
+
try {
|
|
497
|
+
this.emit(ClaimEvents.Claiming, {
|
|
498
|
+
bubbles: true,
|
|
499
|
+
composed: true,
|
|
500
|
+
detail: {
|
|
501
|
+
email: this.loginController?.user?.email,
|
|
502
|
+
apiKey: this.apiKey,
|
|
503
|
+
wallet: this.loginController?.user?.walletAddress,
|
|
504
|
+
},
|
|
505
|
+
});
|
|
506
|
+
console.log('ClaimEvents.Claiming');
|
|
507
|
+
console.log(ClaimEvents.Claiming);
|
|
508
|
+
if (this.redeemCode === '' && !this.availibleCampaign) {
|
|
509
|
+
this.error =
|
|
510
|
+
'Seems like your link is invalid, try again or contact support';
|
|
511
|
+
return;
|
|
262
512
|
}
|
|
263
|
-
|
|
264
|
-
|
|
513
|
+
const response = await this.nexusAPI?.mint(didToken, this.redeemCode || undefined, this.availibleCampaign ? this.campaignUrl : undefined, this.campaignId || undefined);
|
|
514
|
+
if (!response) {
|
|
515
|
+
this.error = 'an error occured';
|
|
516
|
+
this._claimState = ClaimStateTypes.error;
|
|
517
|
+
throw new Error('error occured');
|
|
518
|
+
}
|
|
519
|
+
else {
|
|
520
|
+
const issueId = response.issueId;
|
|
521
|
+
const interval = FanPassClaim.interval;
|
|
522
|
+
this.validateMint(interval, issueId);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
catch (error) {
|
|
526
|
+
switch (error.message) {
|
|
527
|
+
case 'Issuance code not available':
|
|
528
|
+
this._claimState = ClaimStateTypes.error;
|
|
265
529
|
this.error = 'This code not available or already used!';
|
|
266
|
-
|
|
267
|
-
|
|
530
|
+
break;
|
|
531
|
+
case 'campaign does not exist':
|
|
532
|
+
this._claimState = ClaimStateTypes.error;
|
|
533
|
+
this.error = 'Use a code to claim your FanPasss';
|
|
534
|
+
break;
|
|
535
|
+
case 'Failed to fetch code status: You already have this campaign':
|
|
536
|
+
this._claimState = ClaimStateTypes.redeemedLogin;
|
|
537
|
+
break;
|
|
538
|
+
default:
|
|
539
|
+
this._claimState = ClaimStateTypes.error;
|
|
268
540
|
this.error =
|
|
269
541
|
'An error occurred while claiming the Fan Pass. Please try again later.';
|
|
270
|
-
}
|
|
271
542
|
}
|
|
272
543
|
}
|
|
273
544
|
}
|
|
274
|
-
|
|
275
|
-
if (this.
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
545
|
+
unlockedContentEmit() {
|
|
546
|
+
if (!this.unlockedContent) {
|
|
547
|
+
this.unlockedContent = true;
|
|
548
|
+
this.emit(UnlockEvents.UnlockComplete, {
|
|
549
|
+
bubbles: true,
|
|
550
|
+
composed: true,
|
|
551
|
+
detail: {
|
|
552
|
+
sessionToken: this.walletCheckResponse?.data?.sessionToken,
|
|
553
|
+
email: this.walletCheckResponse?.data?.email,
|
|
283
554
|
apiKey: this.apiKey,
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
if (!this.loginController?.user) {
|
|
289
|
-
await this.loginController?.getUserInfo();
|
|
290
|
-
}
|
|
291
|
-
if (!this.loginController?.user?.did?.token) {
|
|
292
|
-
await this.loginController?.getDidToken();
|
|
293
|
-
}
|
|
294
|
-
if (!this.loginController?.user?.did?.token) {
|
|
295
|
-
console.error('No DID token found');
|
|
296
|
-
return;
|
|
297
|
-
}
|
|
298
|
-
const checkResponse = await this.nexusAPI.checkWalletForNft(this.loginController?.user?.did?.token);
|
|
299
|
-
if (!checkResponse.ok) {
|
|
300
|
-
console.error('Check wallet for NFT failed');
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
if (checkResponse.data?.holds) {
|
|
304
|
-
setStoredSession(JSON.stringify({
|
|
305
|
-
token: checkResponse.data.sessionToken,
|
|
306
|
-
issueTS: Date.now(),
|
|
307
|
-
}));
|
|
308
|
-
}
|
|
555
|
+
unlocked: true,
|
|
556
|
+
},
|
|
557
|
+
});
|
|
309
558
|
}
|
|
310
559
|
}
|
|
560
|
+
async setSessionToken() {
|
|
561
|
+
if (!this.loginController?.loginInit) {
|
|
562
|
+
return null;
|
|
563
|
+
}
|
|
564
|
+
if (!this.loginController?.loggedIn) {
|
|
565
|
+
return null;
|
|
566
|
+
}
|
|
567
|
+
if (!this.nexusAPI) {
|
|
568
|
+
const n3xusOptions = {
|
|
569
|
+
apiKey: this.apiKey,
|
|
570
|
+
stagging: this.staging,
|
|
571
|
+
};
|
|
572
|
+
this.nexusAPI = new N3xusApi(n3xusOptions);
|
|
573
|
+
}
|
|
574
|
+
if (!this.loginController?.user) {
|
|
575
|
+
await this.loginController?.getUserInfo();
|
|
576
|
+
}
|
|
577
|
+
if (!this.loginController?.user?.did?.token) {
|
|
578
|
+
await this.loginController?.getDidToken();
|
|
579
|
+
}
|
|
580
|
+
if (!this.loginController?.user?.did?.token) {
|
|
581
|
+
console.error('No DID token found');
|
|
582
|
+
return null;
|
|
583
|
+
}
|
|
584
|
+
this.walletCheckResponse = await this.nexusAPI.checkWalletForNft('', this.loginController?.user?.did?.token);
|
|
585
|
+
if (!this.walletCheckResponse.ok) {
|
|
586
|
+
console.error('Check wallet for NFT failed');
|
|
587
|
+
return null;
|
|
588
|
+
}
|
|
589
|
+
if (this.walletCheckResponse.data?.holds &&
|
|
590
|
+
this.loginController?.loggedIn) {
|
|
591
|
+
addSession({
|
|
592
|
+
didToken: this.loginController?.user?.did?.token,
|
|
593
|
+
issueTS: Date.now(),
|
|
594
|
+
token: this.walletCheckResponse.data.sessionToken,
|
|
595
|
+
apiKey: this.apiKey,
|
|
596
|
+
mobilePass: this.walletCheckResponse.data.mobilePasses,
|
|
597
|
+
});
|
|
598
|
+
this.unlockedContentEmit();
|
|
599
|
+
return this.walletCheckResponse;
|
|
600
|
+
}
|
|
601
|
+
return null;
|
|
602
|
+
}
|
|
311
603
|
async logout() {
|
|
312
|
-
|
|
604
|
+
this.unlockedContent = false;
|
|
605
|
+
this.walletCheckResponse = null;
|
|
606
|
+
this.loginFlow = true;
|
|
313
607
|
this._claimState = ClaimStateTypes.available;
|
|
314
608
|
this._pageNumber = 1;
|
|
609
|
+
this.emit(LoginEvents.Logout, {
|
|
610
|
+
bubbles: true,
|
|
611
|
+
composed: true,
|
|
612
|
+
detail: {
|
|
613
|
+
LoggedIn: false,
|
|
614
|
+
},
|
|
615
|
+
});
|
|
616
|
+
await this.loginController?.logout();
|
|
315
617
|
}
|
|
316
618
|
closeOverlay(e) {
|
|
317
619
|
const overlay = this.shadowRoot?.getElementById('fb-modal');
|
|
@@ -323,11 +625,9 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
323
625
|
const overlay = this.shadowRoot?.getElementById('fb-modal');
|
|
324
626
|
const triggerButton = e.target;
|
|
325
627
|
triggerButton?.setAttribute('aria-expanded', 'true');
|
|
326
|
-
if (
|
|
327
|
-
|
|
328
|
-
this.setTokenStatus(this.redeemToken);
|
|
628
|
+
if (overlay) {
|
|
629
|
+
overlay.openOverlay();
|
|
329
630
|
}
|
|
330
|
-
overlay?.openOverlay();
|
|
331
631
|
}
|
|
332
632
|
logging(message, ...optionalParams) {
|
|
333
633
|
if (this.debugLogging) {
|
|
@@ -343,6 +643,24 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
343
643
|
};
|
|
344
644
|
return styles;
|
|
345
645
|
}
|
|
646
|
+
renderMobilePass() {
|
|
647
|
+
if (this.walletCheckResponse?.data?.mobilePasses &&
|
|
648
|
+
Array.isArray(this.walletCheckResponse?.data?.mobilePasses) &&
|
|
649
|
+
this.walletCheckResponse?.data?.mobilePasses.length > 0 &&
|
|
650
|
+
!this.walletCheckResponse?.data?.mobilePasses[this.walletCheckResponse?.data?.mobilePasses.length - 1].isActivated) {
|
|
651
|
+
const mobilePass = this.walletCheckResponse?.data?.mobilePasses[this.walletCheckResponse?.data?.mobilePasses.length - 1];
|
|
652
|
+
return html `
|
|
653
|
+
<fp-mobile-pass
|
|
654
|
+
.fanPassTitle=${this.fanPassTitle}
|
|
655
|
+
.androidLink=${mobilePass?.androidWalletUri}
|
|
656
|
+
.appleLink=${mobilePass?.iPhoneWalletUri}
|
|
657
|
+
.downloadLink=${mobilePass?.downloadLink}
|
|
658
|
+
.displayIntro=${false}
|
|
659
|
+
></fp-mobile-pass>
|
|
660
|
+
`;
|
|
661
|
+
}
|
|
662
|
+
return html ``;
|
|
663
|
+
}
|
|
346
664
|
renderClaimSuccess() {
|
|
347
665
|
return html `
|
|
348
666
|
<pu-vertical-stack spacing="24" mobileSpacing="24">
|
|
@@ -351,46 +669,67 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
351
669
|
You've claimed your ${this.fanPassTitle}!
|
|
352
670
|
</pu-text>
|
|
353
671
|
<pu-vertical-stack spacing="8" mobileSpacing="8">
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
size="large"
|
|
376
|
-
fullWidth
|
|
377
|
-
buttonstyle="solid"
|
|
378
|
-
>
|
|
379
|
-
<pu-text as="p" variant="bodyMd" withoutMargin>
|
|
380
|
-
Disconnect
|
|
381
|
-
</pu-text>
|
|
382
|
-
</pu-button>
|
|
672
|
+
${this.successUrl !== ''
|
|
673
|
+
? html `
|
|
674
|
+
<pu-button
|
|
675
|
+
class="button"
|
|
676
|
+
style="${styleMap(this.buttonStyles())}"
|
|
677
|
+
url=${this.successUrl}
|
|
678
|
+
size="large"
|
|
679
|
+
fullWidth
|
|
680
|
+
buttonstyle="solid"
|
|
681
|
+
>
|
|
682
|
+
<pu-text
|
|
683
|
+
as="p"
|
|
684
|
+
variant="bodyMd"
|
|
685
|
+
withoutMargin
|
|
686
|
+
>
|
|
687
|
+
Check out your perks!
|
|
688
|
+
</pu-text>
|
|
689
|
+
</pu-button>
|
|
690
|
+
`
|
|
691
|
+
: null}
|
|
692
|
+
${this.renderMobilePass()}
|
|
383
693
|
</pu-vertical-stack>
|
|
384
694
|
</pu-vertical-stack>
|
|
385
695
|
`;
|
|
386
696
|
}
|
|
697
|
+
setPageNumber(number) {
|
|
698
|
+
if (number !== undefined) {
|
|
699
|
+
this._pageNumber = number;
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
const loginState = this._loginComponent?.getCurrentState();
|
|
703
|
+
switch (loginState) {
|
|
704
|
+
case LoginStateTypes.initialising:
|
|
705
|
+
case LoginStateTypes.initialised:
|
|
706
|
+
this._pageNumber = 1;
|
|
707
|
+
break;
|
|
708
|
+
case LoginStateTypes.requestCode:
|
|
709
|
+
case LoginStateTypes.enterLoginCode:
|
|
710
|
+
this._pageNumber = 2;
|
|
711
|
+
break;
|
|
712
|
+
case LoginStateTypes.optCodeSubmited:
|
|
713
|
+
case LoginStateTypes.isLoggedInLoading:
|
|
714
|
+
this._pageNumber = 3;
|
|
715
|
+
break;
|
|
716
|
+
case LoginStateTypes.optFailed:
|
|
717
|
+
case LoginStateTypes.isLoggedIn:
|
|
718
|
+
this._pageNumber = 3;
|
|
719
|
+
break;
|
|
720
|
+
default:
|
|
721
|
+
this._pageNumber = 1;
|
|
722
|
+
break;
|
|
723
|
+
}
|
|
724
|
+
}
|
|
387
725
|
renderContent() {
|
|
726
|
+
this.setPageNumber();
|
|
388
727
|
switch (this._claimState) {
|
|
389
728
|
case ClaimStateTypes.redeemedLogin:
|
|
390
|
-
this.
|
|
729
|
+
this.setPageNumber(3);
|
|
391
730
|
return this.renderClaimSuccess();
|
|
392
731
|
case ClaimStateTypes.redeemedLoggedout:
|
|
393
|
-
this.
|
|
732
|
+
this.setPageNumber(3);
|
|
394
733
|
return html `
|
|
395
734
|
<pu-vertical-stack
|
|
396
735
|
spacing="24"
|
|
@@ -398,26 +737,16 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
398
737
|
mobileAlign="center"
|
|
399
738
|
>
|
|
400
739
|
<pu-text as="p" variant="bodyLg" withoutMargin>
|
|
401
|
-
|
|
740
|
+
This ${this.fanPassTitle} has already been claimed
|
|
402
741
|
</pu-text>
|
|
403
|
-
<fp-login
|
|
404
|
-
id="login"
|
|
405
|
-
buttonLabel="Claim"
|
|
406
|
-
apiKey=${this.apiKey}
|
|
407
|
-
btnBackgroundColor=${this.btnBackgroundColor}
|
|
408
|
-
btnTextColor=${this.btnTextColor}
|
|
409
|
-
?hidden=${false}
|
|
410
|
-
?staging=${true}
|
|
411
|
-
?debugLogging=${this.debugLogging}
|
|
412
|
-
?showLoaderAfterLogin=${true}
|
|
413
|
-
></fp-login>
|
|
414
742
|
</pu-vertical-stack>
|
|
415
743
|
`;
|
|
744
|
+
case ClaimStateTypes.redeemedCheckingSession:
|
|
416
745
|
case ClaimStateTypes.validating:
|
|
417
|
-
this._pageNumber = 1;
|
|
418
746
|
return html `
|
|
419
|
-
<pu-text as="p" variant="bodyLg">
|
|
747
|
+
<pu-text as="p" variant="bodyLg"> Initializing... </pu-text>
|
|
420
748
|
<svg
|
|
749
|
+
part="loading__spinner"
|
|
421
750
|
class="loading__spinner"
|
|
422
751
|
width="16"
|
|
423
752
|
height="16"
|
|
@@ -433,7 +762,7 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
433
762
|
</svg>
|
|
434
763
|
`;
|
|
435
764
|
case ClaimStateTypes.invalid:
|
|
436
|
-
this.
|
|
765
|
+
this.setPageNumber(3);
|
|
437
766
|
return html `
|
|
438
767
|
<fp-error-screen
|
|
439
768
|
errorText=${this.error}
|
|
@@ -441,7 +770,6 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
441
770
|
></fp-error-screen>
|
|
442
771
|
`;
|
|
443
772
|
case ClaimStateTypes.availableLoggedIn:
|
|
444
|
-
this._pageNumber = 1;
|
|
445
773
|
return html `
|
|
446
774
|
<pu-vertical-stack
|
|
447
775
|
class=""
|
|
@@ -453,8 +781,9 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
453
781
|
Claim your ${this.fanPassTitle}
|
|
454
782
|
</pu-text>
|
|
455
783
|
<pu-text as="p" variant="bodyMd" withoutMargin>
|
|
456
|
-
|
|
784
|
+
Connected as ${this.loginController?.user?.email}
|
|
457
785
|
</pu-text>
|
|
786
|
+
|
|
458
787
|
<pu-vertical-stack
|
|
459
788
|
class=""
|
|
460
789
|
spacing="8"
|
|
@@ -485,7 +814,6 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
485
814
|
</pu-vertical-stack>
|
|
486
815
|
`;
|
|
487
816
|
case ClaimStateTypes.available:
|
|
488
|
-
this._pageNumber = 1;
|
|
489
817
|
return html `
|
|
490
818
|
<pu-vertical-stack
|
|
491
819
|
class=""
|
|
@@ -493,9 +821,15 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
493
821
|
align="center"
|
|
494
822
|
mobileAlign="center"
|
|
495
823
|
>
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
824
|
+
${this._pageNumber === 1
|
|
825
|
+
? html `<pu-text
|
|
826
|
+
as="p"
|
|
827
|
+
variant="bodyLg"
|
|
828
|
+
withoutMargin
|
|
829
|
+
>
|
|
830
|
+
Claim your ${this.fanPassTitle}
|
|
831
|
+
</pu-text>`
|
|
832
|
+
: html ``}
|
|
499
833
|
<fp-login
|
|
500
834
|
id="login"
|
|
501
835
|
buttonLabel="Claim"
|
|
@@ -503,19 +837,23 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
503
837
|
btnBackgroundColor=${this.btnBackgroundColor}
|
|
504
838
|
btnTextColor=${this.btnTextColor}
|
|
505
839
|
?hidden=${false}
|
|
506
|
-
?staging=${
|
|
507
|
-
?debugLogging=${
|
|
840
|
+
?staging=${this.staging}
|
|
841
|
+
?debugLogging=${this.debugLogging}
|
|
508
842
|
?showLoaderAfterLogin=${true}
|
|
509
|
-
|
|
843
|
+
>
|
|
844
|
+
<form part="form-content" slot="form-content">
|
|
845
|
+
<slot name="form-content-claim"></slot>
|
|
846
|
+
</form>
|
|
847
|
+
</fp-login>
|
|
510
848
|
</pu-vertical-stack>
|
|
511
849
|
`;
|
|
512
850
|
case ClaimStateTypes.minting:
|
|
513
|
-
this._pageNumber = 3;
|
|
514
851
|
return html `
|
|
515
852
|
<pu-text as="p" variant="bodyLg" withoutMargin>
|
|
516
|
-
|
|
853
|
+
Claiming - just a moment
|
|
517
854
|
</pu-text>
|
|
518
855
|
<svg
|
|
856
|
+
part="loading__spinner"
|
|
519
857
|
class="loading__spinner"
|
|
520
858
|
width="16"
|
|
521
859
|
height="16"
|
|
@@ -531,10 +869,10 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
531
869
|
</svg>
|
|
532
870
|
`;
|
|
533
871
|
case ClaimStateTypes.redeemedLoggedInInvalid:
|
|
534
|
-
this.
|
|
872
|
+
this.setPageNumber(3);
|
|
535
873
|
return html `
|
|
536
874
|
<fp-error-screen
|
|
537
|
-
errorText="This
|
|
875
|
+
errorText="This code has already been used"
|
|
538
876
|
>
|
|
539
877
|
<pu-button
|
|
540
878
|
slot="button"
|
|
@@ -559,13 +897,14 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
559
897
|
</fp-error-screen>
|
|
560
898
|
`;
|
|
561
899
|
case ClaimStateTypes.redeemed:
|
|
562
|
-
if (this.
|
|
563
|
-
this.
|
|
900
|
+
if (!this.loginController?.loginInit) {
|
|
901
|
+
this.setPageNumber(2);
|
|
564
902
|
return html `
|
|
565
903
|
<pu-text as="p" variant="bodyLg" withoutMargin>
|
|
566
904
|
Loading...
|
|
567
905
|
</pu-text>
|
|
568
906
|
<svg
|
|
907
|
+
part="loading__spinner"
|
|
569
908
|
class="loading__spinner"
|
|
570
909
|
width="16"
|
|
571
910
|
height="16"
|
|
@@ -581,8 +920,7 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
581
920
|
</svg>
|
|
582
921
|
`;
|
|
583
922
|
}
|
|
584
|
-
if (this.
|
|
585
|
-
this._pageNumber = 1;
|
|
923
|
+
if (!this.loginController?.loggedIn) {
|
|
586
924
|
return html `
|
|
587
925
|
<fp-login
|
|
588
926
|
id="login"
|
|
@@ -591,14 +929,14 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
591
929
|
btnBackgroundColor=${this.btnBackgroundColor}
|
|
592
930
|
btnTextColor=${this.btnTextColor}
|
|
593
931
|
?hidden=${false}
|
|
594
|
-
?staging=${
|
|
595
|
-
?debugLogging=${
|
|
596
|
-
?showLoaderAfterLogin=${
|
|
932
|
+
?staging=${this.staging}
|
|
933
|
+
?debugLogging=${this.debugLogging}
|
|
934
|
+
?showLoaderAfterLogin=${true}
|
|
597
935
|
></fp-login>
|
|
598
936
|
`;
|
|
599
937
|
}
|
|
600
|
-
if (this.
|
|
601
|
-
this.
|
|
938
|
+
else if (this._codeStatus?.wallet == this._user?.walletAddress) {
|
|
939
|
+
this.setPageNumber(3);
|
|
602
940
|
return html `
|
|
603
941
|
<pu-vertical-stack spacing="24">
|
|
604
942
|
<pu-text as="p" variant="bodyLg" withoutMargin>
|
|
@@ -610,7 +948,7 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
610
948
|
</pu-vertical-stack>
|
|
611
949
|
`;
|
|
612
950
|
}
|
|
613
|
-
this.
|
|
951
|
+
this.setPageNumber(3);
|
|
614
952
|
return html `
|
|
615
953
|
<fp-error-screen
|
|
616
954
|
errorText="Invalid ${this.fanPassTitle}"
|
|
@@ -618,7 +956,6 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
618
956
|
></fp-error-screen>
|
|
619
957
|
`;
|
|
620
958
|
case ClaimStateTypes.mintingError:
|
|
621
|
-
this._pageNumber = 3;
|
|
622
959
|
return html `
|
|
623
960
|
<fp-error-screen
|
|
624
961
|
errorText=${this.error}
|
|
@@ -627,58 +964,91 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
627
964
|
`;
|
|
628
965
|
case ClaimStateTypes.error:
|
|
629
966
|
default:
|
|
630
|
-
this.
|
|
967
|
+
this.setPageNumber(3);
|
|
631
968
|
return html `
|
|
632
969
|
<fp-error-screen
|
|
633
|
-
errorText
|
|
970
|
+
errorText=${this.error || 'Claiming error'}
|
|
634
971
|
faqUrl=${this.faqUrl}
|
|
635
972
|
>
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
973
|
+
${this._campaignState == CampaignState.available
|
|
974
|
+
? html `
|
|
975
|
+
<pu-button
|
|
976
|
+
slot="button"
|
|
977
|
+
style="${styleMap(this.buttonStyles())}"
|
|
978
|
+
@click="${this.logout}"
|
|
979
|
+
type="button"
|
|
980
|
+
class="button"
|
|
981
|
+
name="disconnect"
|
|
982
|
+
size="large"
|
|
983
|
+
buttonstyle="solid"
|
|
984
|
+
>
|
|
985
|
+
<pu-text
|
|
986
|
+
as="span"
|
|
987
|
+
variant="bodyMd"
|
|
988
|
+
fontWeight="regular"
|
|
989
|
+
withoutMargin
|
|
990
|
+
spacing="loose"
|
|
991
|
+
>
|
|
992
|
+
Start over
|
|
993
|
+
</pu-text>
|
|
994
|
+
</pu-button>
|
|
995
|
+
`
|
|
996
|
+
: ''}
|
|
656
997
|
</fp-error-screen>
|
|
657
998
|
`;
|
|
658
999
|
}
|
|
659
1000
|
}
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
1001
|
+
renderClaimButton() {
|
|
1002
|
+
let buttonLabel = 'Claim';
|
|
1003
|
+
switch (this._claimState) {
|
|
1004
|
+
case ClaimStateTypes.redeemedLogin:
|
|
1005
|
+
this._pageNumber = 3;
|
|
1006
|
+
buttonLabel = 'Claimed';
|
|
1007
|
+
break;
|
|
1008
|
+
case ClaimStateTypes.redeemedLoggedout:
|
|
1009
|
+
buttonLabel = 'Claimed';
|
|
1010
|
+
this._pageNumber = 1;
|
|
1011
|
+
break;
|
|
1012
|
+
case ClaimStateTypes.validating:
|
|
1013
|
+
this._pageNumber = 1;
|
|
1014
|
+
buttonLabel = 'Initializing...';
|
|
1015
|
+
break;
|
|
1016
|
+
case ClaimStateTypes.minting:
|
|
1017
|
+
this._pageNumber = 2;
|
|
1018
|
+
buttonLabel = 'Claiming...';
|
|
1019
|
+
break;
|
|
1020
|
+
case ClaimStateTypes.mintingError:
|
|
1021
|
+
this._pageNumber = 3;
|
|
1022
|
+
buttonLabel = 'Claim';
|
|
1023
|
+
break;
|
|
1024
|
+
case ClaimStateTypes.error:
|
|
1025
|
+
this._pageNumber = 3;
|
|
1026
|
+
buttonLabel = 'Claim';
|
|
1027
|
+
break;
|
|
1028
|
+
default:
|
|
1029
|
+
this._pageNumber = 1;
|
|
1030
|
+
buttonLabel = 'Claim';
|
|
1031
|
+
break;
|
|
1032
|
+
}
|
|
1033
|
+
return html `
|
|
1034
|
+
<div part="claim-button-container" class="claim-button-container">
|
|
674
1035
|
<pu-button
|
|
675
|
-
class="button"
|
|
1036
|
+
class="button claim-button"
|
|
676
1037
|
style="${styleMap(this.buttonStyles())}"
|
|
677
1038
|
@click=${this.openOverlay}
|
|
678
1039
|
type="button"
|
|
679
1040
|
name="claim"
|
|
680
1041
|
size="large"
|
|
1042
|
+
fullWidth
|
|
681
1043
|
buttonstyle="solid"
|
|
1044
|
+
?disabled=${this._claimState ===
|
|
1045
|
+
ClaimStateTypes.validating ||
|
|
1046
|
+
this._claimState ===
|
|
1047
|
+
ClaimStateTypes.redeemedCheckingSession}
|
|
1048
|
+
?loading=${this._claimState ===
|
|
1049
|
+
ClaimStateTypes.validating ||
|
|
1050
|
+
this._claimState ===
|
|
1051
|
+
ClaimStateTypes.redeemedCheckingSession}
|
|
682
1052
|
>
|
|
683
1053
|
<pu-text
|
|
684
1054
|
as="span"
|
|
@@ -687,49 +1057,145 @@ let FanPassClaim = class FanPassClaim extends CirkayElement {
|
|
|
687
1057
|
withoutMargin
|
|
688
1058
|
spacing="loose"
|
|
689
1059
|
>
|
|
690
|
-
|
|
1060
|
+
${buttonLabel}
|
|
691
1061
|
</pu-text>
|
|
692
1062
|
</pu-button>
|
|
693
|
-
|
|
1063
|
+
</div>
|
|
1064
|
+
`;
|
|
1065
|
+
}
|
|
1066
|
+
render() {
|
|
1067
|
+
this.logging('render', 'claimState', this._claimState);
|
|
1068
|
+
if (this.modal) {
|
|
1069
|
+
return html `
|
|
1070
|
+
${this.walletCheckResponse && this.loginController?.loggedIn
|
|
1071
|
+
? html `
|
|
1072
|
+
<fp-connected
|
|
1073
|
+
displayText=${this.walletCheckResponse.data?.holds
|
|
1074
|
+
? "You're connected!"
|
|
1075
|
+
: `Claim your ${this.fanPassTitle}`}
|
|
1076
|
+
fanPassTitle=${this.fanPassTitle}
|
|
1077
|
+
apiKey=${this.apiKey}
|
|
1078
|
+
?stagging=${this.staging}
|
|
1079
|
+
?debugLogging=${this.debugLogging}
|
|
1080
|
+
?ownsFp=${this.walletCheckResponse.data?.holds
|
|
1081
|
+
? true
|
|
1082
|
+
: false}
|
|
1083
|
+
>
|
|
1084
|
+
<div part="inner-content" slot="inner-content">
|
|
1085
|
+
${this.renderClaimButton()}
|
|
1086
|
+
</div>
|
|
1087
|
+
</fp-connected>
|
|
1088
|
+
`
|
|
1089
|
+
: html ` ${this.renderClaimButton()} `}
|
|
1090
|
+
|
|
1091
|
+
<pu-overlay id="fb-modal" class="fb-modal">
|
|
694
1092
|
<pu-box
|
|
695
1093
|
slot="content"
|
|
696
1094
|
class="modalContentBox"
|
|
697
1095
|
padding=${100}
|
|
1096
|
+
mobilePadding="60, 0"
|
|
698
1097
|
>
|
|
699
|
-
<pu-vertical-stack
|
|
700
|
-
spacing="
|
|
1098
|
+
<!-- <pu-vertical-stack
|
|
1099
|
+
spacing="32"
|
|
701
1100
|
align="center"
|
|
702
1101
|
mobileAlign="center"
|
|
703
1102
|
justify="center"
|
|
704
|
-
mobileJustify="
|
|
705
|
-
|
|
1103
|
+
mobileJustify="space-between"
|
|
1104
|
+
> -->
|
|
1105
|
+
<fp-frame
|
|
1106
|
+
fanPassTitle=${this.fanPassTitle}
|
|
1107
|
+
maxPages=${3}
|
|
1108
|
+
currentPageNumber=${this._pageNumber}
|
|
1109
|
+
.logoSet=${this.logoSet}
|
|
706
1110
|
>
|
|
707
|
-
${this.
|
|
708
|
-
</
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
aria-expanded=${true}
|
|
714
|
-
size="large"
|
|
715
|
-
@click=${this.closeOverlay}
|
|
1111
|
+
${this.renderContent()}
|
|
1112
|
+
</fp-frame>
|
|
1113
|
+
<!-- </pu-vertical-stack> -->
|
|
1114
|
+
<button
|
|
1115
|
+
part="button-icon"
|
|
1116
|
+
class="button-icon"
|
|
716
1117
|
style="position: absolute; top: 1rem; right: 1rem; z-index: 501"
|
|
1118
|
+
type="button"
|
|
1119
|
+
aria-label="Close modal"
|
|
1120
|
+
aria-controls="overlay"
|
|
1121
|
+
@click=${this.closeOverlay}
|
|
717
1122
|
>
|
|
718
|
-
|
|
1123
|
+
<svg
|
|
1124
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
1125
|
+
id="close"
|
|
1126
|
+
part="icon"
|
|
1127
|
+
class="icon"
|
|
1128
|
+
width="1em"
|
|
1129
|
+
height="1em"
|
|
1130
|
+
viewBox="0 0 384 512"
|
|
1131
|
+
role="presentation"
|
|
1132
|
+
aria-hidden="true"
|
|
1133
|
+
focusable="false"
|
|
1134
|
+
fill="currentColor"
|
|
1135
|
+
>
|
|
1136
|
+
<path
|
|
1137
|
+
d="M192 233.4L59.5 100.9 36.9 123.5 169.4 256 36.9 388.5l22.6 22.6L192 278.6 324.5 411.1l22.6-22.6L214.6 256 347.1 123.5l-22.6-22.6L192 233.4z"
|
|
1138
|
+
/>
|
|
1139
|
+
</svg>
|
|
1140
|
+
</button>
|
|
719
1141
|
</pu-box>
|
|
720
1142
|
</pu-overlay>
|
|
721
1143
|
`;
|
|
722
1144
|
}
|
|
723
|
-
return
|
|
1145
|
+
return html `
|
|
1146
|
+
${this.walletCheckResponse && this.loginController?.loggedIn
|
|
1147
|
+
? html `
|
|
1148
|
+
<fp-connected
|
|
1149
|
+
displayText=${this.walletCheckResponse.data?.holds
|
|
1150
|
+
? 'You already have this ${this.fanPassTitle}'
|
|
1151
|
+
: 'Claim your ${this.fanPassTitle}'}
|
|
1152
|
+
fanPassTitle=${this.fanPassTitle}
|
|
1153
|
+
apiKey=${this.apiKey}
|
|
1154
|
+
?stagging=${this.staging}
|
|
1155
|
+
?debugLogging=${this.debugLogging}
|
|
1156
|
+
?ownsFp=${this.walletCheckResponse.data?.holds
|
|
1157
|
+
? true
|
|
1158
|
+
: false}
|
|
1159
|
+
>
|
|
1160
|
+
<slot></slot>
|
|
1161
|
+
</fp-connected>
|
|
1162
|
+
`
|
|
1163
|
+
: html ``}
|
|
1164
|
+
<fp-frame
|
|
1165
|
+
fanPassTitle=${this.fanPassTitle}
|
|
1166
|
+
maxPages=${3}
|
|
1167
|
+
currentPageNumber=${this._pageNumber}
|
|
1168
|
+
.logoSet=${this.logoSet}
|
|
1169
|
+
>
|
|
1170
|
+
${this.renderContent()}
|
|
1171
|
+
</fp-frame>
|
|
1172
|
+
`;
|
|
724
1173
|
}
|
|
725
|
-
}
|
|
1174
|
+
}
|
|
1175
|
+
FanPassClaim.interval = 3000;
|
|
726
1176
|
FanPassClaim.styles = css `
|
|
1177
|
+
.claim-button-container {
|
|
1178
|
+
width: 200px;
|
|
1179
|
+
max-width: 200px;
|
|
1180
|
+
}
|
|
727
1181
|
/* Add your component styles here */
|
|
1182
|
+
.fb-modal {
|
|
1183
|
+
--pu-color-overlay-background: rgba(0, 0, 0, 0.2);
|
|
1184
|
+
position: fixed;
|
|
1185
|
+
z-index: 999999;
|
|
1186
|
+
width: 100%;
|
|
1187
|
+
height: 100%;
|
|
1188
|
+
top: 0;
|
|
1189
|
+
left: 0;
|
|
1190
|
+
right: 0;
|
|
1191
|
+
pointer-events: none;
|
|
1192
|
+
bottom: 0;
|
|
1193
|
+
max-height: 100vh;
|
|
1194
|
+
}
|
|
728
1195
|
.modalContentBox {
|
|
729
1196
|
background-color: #fff;
|
|
730
1197
|
position: relative;
|
|
731
|
-
height:
|
|
732
|
-
/* max-height: 800px; */
|
|
1198
|
+
height: 100vh;
|
|
733
1199
|
|
|
734
1200
|
@media only screen and (min-width: 48.06rem) {
|
|
735
1201
|
--pu-border-base-corner-radius: var(
|
|
@@ -739,6 +1205,7 @@ FanPassClaim.styles = css `
|
|
|
739
1205
|
border-radius: var(--pu-border-base-corner-radius);
|
|
740
1206
|
box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.25);
|
|
741
1207
|
max-width: 800px;
|
|
1208
|
+
height: max-content;
|
|
742
1209
|
}
|
|
743
1210
|
}
|
|
744
1211
|
|
|
@@ -746,6 +1213,47 @@ FanPassClaim.styles = css `
|
|
|
746
1213
|
--pu-border-button-corner-radius: var(--pu-border-radius-20, 12px);
|
|
747
1214
|
}
|
|
748
1215
|
|
|
1216
|
+
.button-icon {
|
|
1217
|
+
cursor: pointer;
|
|
1218
|
+
border: none;
|
|
1219
|
+
border-radius: var(
|
|
1220
|
+
--pu-border-icon-corner-radius,
|
|
1221
|
+
var(--pu-border-base-corner-radius, 0)
|
|
1222
|
+
);
|
|
1223
|
+
font-size: var(--pu-font-size-icon, 1.5rem);
|
|
1224
|
+
padding: 0;
|
|
1225
|
+
color: var(--pu-color-icon-text, inherit);
|
|
1226
|
+
background-color: var(--pu-color-icon-background, inherit);
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
@supports (color: rgb(from white r g b)) {
|
|
1230
|
+
.button-icon {
|
|
1231
|
+
color: rgb(
|
|
1232
|
+
from var(--pu-color-icon-text, inherit) r g b / alpha
|
|
1233
|
+
);
|
|
1234
|
+
background-color: rgb(
|
|
1235
|
+
from var(--pu-color-icon-background, inherit) r g b / alpha
|
|
1236
|
+
);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
.button-icon > * {
|
|
1241
|
+
position: relative;
|
|
1242
|
+
display: block;
|
|
1243
|
+
padding: var(
|
|
1244
|
+
--pu-space-icon-padding,
|
|
1245
|
+
var(--pu-space-padding, 0.5rem)
|
|
1246
|
+
);
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
.button-icon:hover {
|
|
1250
|
+
opacity: 0.7;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
.button-icon[disabled]:hover {
|
|
1254
|
+
opacity: 0.7;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
749
1257
|
.loading__spinner {
|
|
750
1258
|
animation-name: spin;
|
|
751
1259
|
animation-duration: 500ms;
|
|
@@ -777,7 +1285,13 @@ __decorate([
|
|
|
777
1285
|
], FanPassClaim.prototype, "fanPassTitle", void 0);
|
|
778
1286
|
__decorate([
|
|
779
1287
|
property({ type: String })
|
|
780
|
-
], FanPassClaim.prototype, "
|
|
1288
|
+
], FanPassClaim.prototype, "redeemCode", void 0);
|
|
1289
|
+
__decorate([
|
|
1290
|
+
property({ type: Boolean })
|
|
1291
|
+
], FanPassClaim.prototype, "availibleCampaign", void 0);
|
|
1292
|
+
__decorate([
|
|
1293
|
+
property({ type: Number })
|
|
1294
|
+
], FanPassClaim.prototype, "campaignId", void 0);
|
|
781
1295
|
__decorate([
|
|
782
1296
|
property({ type: Boolean })
|
|
783
1297
|
], FanPassClaim.prototype, "modal", void 0);
|
|
@@ -793,6 +1307,9 @@ __decorate([
|
|
|
793
1307
|
__decorate([
|
|
794
1308
|
property({ type: String })
|
|
795
1309
|
], FanPassClaim.prototype, "successUrl", void 0);
|
|
1310
|
+
__decorate([
|
|
1311
|
+
property({ type: String })
|
|
1312
|
+
], FanPassClaim.prototype, "campaignUrl", void 0);
|
|
796
1313
|
__decorate([
|
|
797
1314
|
property({ type: Boolean })
|
|
798
1315
|
], FanPassClaim.prototype, "autoRedirect", void 0);
|
|
@@ -817,6 +1334,9 @@ __decorate([
|
|
|
817
1334
|
__decorate([
|
|
818
1335
|
state()
|
|
819
1336
|
], FanPassClaim.prototype, "_claimState", void 0);
|
|
1337
|
+
__decorate([
|
|
1338
|
+
state()
|
|
1339
|
+
], FanPassClaim.prototype, "_campaignState", void 0);
|
|
820
1340
|
__decorate([
|
|
821
1341
|
state()
|
|
822
1342
|
], FanPassClaim.prototype, "_pageNumber", void 0);
|
|
@@ -828,10 +1348,10 @@ __decorate([
|
|
|
828
1348
|
], FanPassClaim.prototype, "_loginState", void 0);
|
|
829
1349
|
__decorate([
|
|
830
1350
|
state()
|
|
831
|
-
], FanPassClaim.prototype, "
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
], FanPassClaim);
|
|
1351
|
+
], FanPassClaim.prototype, "_codeStatus", void 0);
|
|
1352
|
+
__decorate([
|
|
1353
|
+
query('fp-login')
|
|
1354
|
+
], FanPassClaim.prototype, "_loginComponent", void 0);
|
|
835
1355
|
|
|
836
|
-
export { FanPassClaim };
|
|
1356
|
+
export { FanPassClaim as default };
|
|
837
1357
|
//# sourceMappingURL=fan-pass-claim.js.map
|