diff --git a/.pnp.cjs b/.pnp.cjs index 39c293d4..281f3d12 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -33,10 +33,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@prettier/sync", "virtual:c76842a5689228a0ce1b65e064c1f5e0d5b61e442d08b6527a3b1f100ca1f2105e58f5f1435c5a59df3cce3338560737838d99dae36d25b47d20aa50c89d0539#npm:0.5.2"],\ ["@testing-library/jest-dom", "npm:6.4.8"],\ ["@testing-library/preact", "virtual:c76842a5689228a0ce1b65e064c1f5e0d5b61e442d08b6527a3b1f100ca1f2105e58f5f1435c5a59df3cce3338560737838d99dae36d25b47d20aa50c89d0539#npm:3.2.4"],\ - ["@transcend-io/airgap.js-types", "npm:12.2.0"],\ + ["@transcend-io/airgap.js-types", "npm:12.3.0"],\ ["@transcend-io/internationalization", "npm:1.6.0"],\ ["@transcend-io/logger", "npm:1.1.0"],\ - ["@transcend-io/type-utils", "npm:1.4.2"],\ + ["@transcend-io/type-utils", "npm:1.5.0"],\ ["@types/jest", "npm:29.5.12"],\ ["@types/node", "npm:17.0.45"],\ ["@typescript-eslint/eslint-plugin", "virtual:c76842a5689228a0ce1b65e064c1f5e0d5b61e442d08b6527a3b1f100ca1f2105e58f5f1435c5a59df3cce3338560737838d99dae36d25b47d20aa50c89d0539#npm:5.62.0"],\ @@ -1757,10 +1757,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["@transcend-io/airgap.js-types", [\ - ["npm:12.2.0", {\ - "packageLocation": "./.yarn/cache/@transcend-io-airgap.js-types-npm-12.2.0-d1c89d7b66-a0c92b7a5a.zip/node_modules/@transcend-io/airgap.js-types/",\ + ["npm:12.3.0", {\ + "packageLocation": "./.yarn/cache/@transcend-io-airgap.js-types-npm-12.3.0-9a211835fa-60ce42e0ed.zip/node_modules/@transcend-io/airgap.js-types/",\ "packageDependencies": [\ - ["@transcend-io/airgap.js-types", "npm:12.2.0"],\ + ["@transcend-io/airgap.js-types", "npm:12.3.0"],\ ["@transcend-io/type-utils", "npm:1.4.2"],\ ["fp-ts", "npm:2.16.9"],\ ["io-ts", "virtual:647270e91e7a3b3be8360975cf4b261fc37aa1becc6251358c91b0bf0733ffddc3f7d7b9c35550155c202696cf87b8999803730126a6d8c46e4270742d944b5d#npm:2.2.21"]\ @@ -1789,10 +1789,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@prettier/sync", "virtual:c76842a5689228a0ce1b65e064c1f5e0d5b61e442d08b6527a3b1f100ca1f2105e58f5f1435c5a59df3cce3338560737838d99dae36d25b47d20aa50c89d0539#npm:0.5.2"],\ ["@testing-library/jest-dom", "npm:6.4.8"],\ ["@testing-library/preact", "virtual:c76842a5689228a0ce1b65e064c1f5e0d5b61e442d08b6527a3b1f100ca1f2105e58f5f1435c5a59df3cce3338560737838d99dae36d25b47d20aa50c89d0539#npm:3.2.4"],\ - ["@transcend-io/airgap.js-types", "npm:12.2.0"],\ + ["@transcend-io/airgap.js-types", "npm:12.3.0"],\ ["@transcend-io/internationalization", "npm:1.6.0"],\ ["@transcend-io/logger", "npm:1.1.0"],\ - ["@transcend-io/type-utils", "npm:1.4.2"],\ + ["@transcend-io/type-utils", "npm:1.5.0"],\ ["@types/jest", "npm:29.5.12"],\ ["@types/node", "npm:17.0.45"],\ ["@typescript-eslint/eslint-plugin", "virtual:c76842a5689228a0ce1b65e064c1f5e0d5b61e442d08b6527a3b1f100ca1f2105e58f5f1435c5a59df3cce3338560737838d99dae36d25b47d20aa50c89d0539#npm:5.62.0"],\ @@ -1858,6 +1858,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["io-ts", "virtual:647270e91e7a3b3be8360975cf4b261fc37aa1becc6251358c91b0bf0733ffddc3f7d7b9c35550155c202696cf87b8999803730126a6d8c46e4270742d944b5d#npm:2.2.21"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:1.5.0", {\ + "packageLocation": "./.yarn/cache/@transcend-io-type-utils-npm-1.5.0-125f1a01fb-0d7d85e794.zip/node_modules/@transcend-io/type-utils/",\ + "packageDependencies": [\ + ["@transcend-io/type-utils", "npm:1.5.0"],\ + ["fp-ts", "npm:2.16.9"],\ + ["io-ts", "virtual:647270e91e7a3b3be8360975cf4b261fc37aa1becc6251358c91b0bf0733ffddc3f7d7b9c35550155c202696cf87b8999803730126a6d8c46e4270742d944b5d#npm:2.2.21"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["@tsconfig/node10", [\ diff --git a/.yarn/cache/@transcend-io-airgap.js-types-npm-12.2.0-d1c89d7b66-a0c92b7a5a.zip b/.yarn/cache/@transcend-io-airgap.js-types-npm-12.3.0-9a211835fa-60ce42e0ed.zip similarity index 76% rename from .yarn/cache/@transcend-io-airgap.js-types-npm-12.2.0-d1c89d7b66-a0c92b7a5a.zip rename to .yarn/cache/@transcend-io-airgap.js-types-npm-12.3.0-9a211835fa-60ce42e0ed.zip index d5787275..9cdf268f 100644 Binary files a/.yarn/cache/@transcend-io-airgap.js-types-npm-12.2.0-d1c89d7b66-a0c92b7a5a.zip and b/.yarn/cache/@transcend-io-airgap.js-types-npm-12.3.0-9a211835fa-60ce42e0ed.zip differ diff --git a/.yarn/cache/@transcend-io-type-utils-npm-1.5.0-125f1a01fb-0d7d85e794.zip b/.yarn/cache/@transcend-io-type-utils-npm-1.5.0-125f1a01fb-0d7d85e794.zip new file mode 100644 index 00000000..557ba49a Binary files /dev/null and b/.yarn/cache/@transcend-io-type-utils-npm-1.5.0-125f1a01fb-0d7d85e794.zip differ diff --git a/index.html b/index.html index e6ec1f37..7e2ab037 100644 --- a/index.html +++ b/index.html @@ -167,7 +167,7 @@

Policy Content

if (language) { await transcend.setActiveLocale(language); } - const [policy] = await transcend.getTranscendPolicies({ + const [policy] = await transcend.getPolicies({ policyTitles: ['Label Privacy Policy'], // variables: { labelName: 'Marshmalt Records' }, locale: language || transcend.getActiveLocale(), @@ -211,7 +211,7 @@

Policy Content

setupDoNotSellButton(); transcend - .setTranscendUiVariables({ + .setUiVariables({ labelName: 'Marshmalt Records', }) .then(() => { diff --git a/package.json b/package.json index 7521ba29..e2e049a3 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/transcend-io/consent-manager-ui.git" }, "homepage": "https://github.com/transcend-io/consent-manager-ui", - "version": "4.18.0", + "version": "4.18.1", "license": "MIT", "main": "build/ui", "files": [ @@ -50,8 +50,8 @@ "@prettier/sync": "^0.5.2", "@testing-library/jest-dom": "^6.4.6", "@testing-library/preact": "^3.2.4", - "@transcend-io/airgap.js-types": "^12.2.0", - "@transcend-io/type-utils": "^1.0.7", + "@transcend-io/airgap.js-types": "^12.3.0", + "@transcend-io/type-utils": "^1.5.0", "@types/jest": "^29.5.12", "@types/node": "^17.0.45", "@typescript-eslint/eslint-plugin": "^5.12.1", diff --git a/src/api.ts b/src/api.ts index cae1e24a..9f24a7fb 100644 --- a/src/api.ts +++ b/src/api.ts @@ -63,10 +63,10 @@ export function makeConsentManagerAPI({ airgap, }: MakeConsentManagerAPIInput): ConsentManagerAPI { const consentManagerMethods: Omit = { - setTranscendUiVariables: (variables) => + setUiVariables: (variables) => Promise.resolve(handleChangeUiVariables(variables)), - getTranscendUiVariables: () => currentVariables, - getTranscendPolicies: (input = {}) => + getUiVariables: () => currentVariables, + getPolicies: (input = {}) => Promise.resolve( getTranscendPolicies( input, diff --git a/yarn.lock b/yarn.lock index 5de9dbb9..d5951928 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1123,14 +1123,14 @@ __metadata: languageName: node linkType: hard -"@transcend-io/airgap.js-types@npm:^12.2.0": - version: 12.2.0 - resolution: "@transcend-io/airgap.js-types@npm:12.2.0" +"@transcend-io/airgap.js-types@npm:^12.3.0": + version: 12.3.0 + resolution: "@transcend-io/airgap.js-types@npm:12.3.0" dependencies: "@transcend-io/type-utils": ^1.2.0 fp-ts: ^2.16.1 io-ts: ^2.2.21 - checksum: a0c92b7a5a218caf1ddca4e6793e793ecdf371e94ab2ba5d12beb93fecadb55bc8678cef59876ccbd7eed42046fc1f5f4392dc38e38ae9363ad8d5bfea7ed961 + checksum: 60ce42e0edb9b40cb47a06fb07af1c6cfff11eeced9dcc5a29553079a2d06fe5d18c38fdcf10a5687c96da89c302b657f7f7a0707d997d0dbb5e179badf3262d languageName: node linkType: hard @@ -1155,10 +1155,10 @@ __metadata: "@prettier/sync": ^0.5.2 "@testing-library/jest-dom": ^6.4.6 "@testing-library/preact": ^3.2.4 - "@transcend-io/airgap.js-types": ^12.2.0 + "@transcend-io/airgap.js-types": ^12.3.0 "@transcend-io/internationalization": ^1.6.0 "@transcend-io/logger": ^1.1.0 - "@transcend-io/type-utils": ^1.0.7 + "@transcend-io/type-utils": ^1.5.0 "@types/jest": ^29.5.12 "@types/node": ^17.0.45 "@typescript-eslint/eslint-plugin": ^5.12.1 @@ -1211,7 +1211,7 @@ __metadata: languageName: node linkType: hard -"@transcend-io/type-utils@npm:^1.0.5, @transcend-io/type-utils@npm:^1.0.7, @transcend-io/type-utils@npm:^1.2.0": +"@transcend-io/type-utils@npm:^1.0.5, @transcend-io/type-utils@npm:^1.2.0": version: 1.4.2 resolution: "@transcend-io/type-utils@npm:1.4.2" dependencies: @@ -1221,6 +1221,16 @@ __metadata: languageName: node linkType: hard +"@transcend-io/type-utils@npm:^1.5.0": + version: 1.5.0 + resolution: "@transcend-io/type-utils@npm:1.5.0" + dependencies: + fp-ts: ^2.16.1 + io-ts: ^2.2.21 + checksum: 0d7d85e794254069663b277e7728a39fe2d7c6b96eef4e71e6a971cd44f2b1a1be20cb82d708603182ed5b7e9ad20535c845590df59e8302d9ab6f70c626464f + languageName: node + linkType: hard + "@tsconfig/node10@npm:^1.0.7": version: 1.0.11 resolution: "@tsconfig/node10@npm:1.0.11"