@thunderid/vue 1.21.0 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ThunderIDVueClient.d.ts","sourceRoot":"","sources":["../src/ThunderIDVueClient.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,sBAAsB,EAEtB,WAAW,EACX,IAAI,EAKJ,OAAO,EAEP,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,0BAA0B,EAM1B,cAAc,EAIf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD;;;;;GAKG;AACH,cAAM,kBAAkB,CAAC,CAAC,SAAS,kBAAkB,GAAG,kBAAkB,CAAE,SAAQ,sBAAsB,CAAC,CAAC,CAAC;IAC3G,OAAO,CAAC,YAAY,CAAS;gBAEjB,UAAU,SAAI;IAI1B,OAAO,CAAC,UAAU;YAIJ,WAAW;IAUhB,UAAU,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAIxD,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC;IAoB7D,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAMlC,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB3E,iBAAiB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAIvD,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAI7B,cAAc,CAAC,OAAO,CAAC,EAAE;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAA;KAAC,GAAG,O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AAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IA6EpC,cAAc,CAAC,OAAO,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC;IAItD,MAAM,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;IAyD7C,OAAO,CAAC,aAAa,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAItE,UAAU,CAAC,cAAc,CAAC,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;IAIrE,cAAc,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIzD,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI;IAIhC,UAAU,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzF,cAAc,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3E,iBAAiB,IAAI,cAAc,CAAC,CAAC,CAAC;CAGvD;AAED,eAAe,kBAAkB,CAAC"}
@@ -884,6 +884,7 @@ var ThunderIDVueClient = class extends __thunderid_browser.ThunderIDBrowserClien
884
884
  authId,
885
885
  baseUrl: configData?.baseUrl || "",
886
886
  payload: arg1,
887
+ sessionStore: this.getStorageManager(),
887
888
  url: (0, __thunderid_browser.resolveResourceEndpoint)("flowExecute", configData, arg2?.url)
888
889
  });
889
890
  if (!authId && response) await this.storeFlowSessions(response);
@@ -921,6 +922,7 @@ var ThunderIDVueClient = class extends __thunderid_browser.ThunderIDBrowserClien
921
922
  ...firstArg,
922
923
  verbose: true
923
924
  } : firstArg,
925
+ sessionStore: this.getStorageManager(),
924
926
  url: (0, __thunderid_browser.resolveResourceEndpoint)("flowExecute", configData)
925
927
  });
926
928
  if (!authId && response) await this.storeFlowSessions(response);
@@ -3062,6 +3064,79 @@ const CONSENT_CSS = `
3062
3064
  cursor: not-allowed;
3063
3065
  opacity: 0.4;
3064
3066
  }
3067
+
3068
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity")} {
3069
+ display: flex;
3070
+ flex-direction: column;
3071
+ gap: calc(var(--thunderid-spacing-unit) * 2);
3072
+ margin-top: var(--thunderid-spacing-unit);
3073
+ }
3074
+
3075
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-group")} {
3076
+ display: flex;
3077
+ flex-direction: column;
3078
+ gap: calc(var(--thunderid-spacing-unit) * 0.5);
3079
+ }
3080
+
3081
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-remember")} {
3082
+ display: flex;
3083
+ align-items: center;
3084
+ gap: var(--thunderid-spacing-unit);
3085
+ color: var(--thunderid-color-text-primary);
3086
+ font-size: var(--thunderid-typography-fontSize-sm);
3087
+ font-weight: var(--thunderid-typography-fontWeight-medium);
3088
+ cursor: pointer;
3089
+ }
3090
+
3091
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-checkbox")} {
3092
+ cursor: pointer;
3093
+ }
3094
+
3095
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-input")} {
3096
+ box-sizing: border-box;
3097
+ width: 100%;
3098
+ height: var(--thunderid-input-height);
3099
+ padding: 0 var(--thunderid-input-paddingX);
3100
+ border: 1px solid var(--thunderid-input-borderColor);
3101
+ border-radius: var(--thunderid-input-borderRadius);
3102
+ background-color: var(--thunderid-color-background-surface);
3103
+ color: var(--thunderid-color-text-primary);
3104
+ font-family: var(--thunderid-typography-fontFamily);
3105
+ font-size: var(--thunderid-input-fontSize);
3106
+ cursor: pointer;
3107
+ }
3108
+
3109
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-custom")} {
3110
+ display: flex;
3111
+ align-items: flex-start;
3112
+ gap: calc(var(--thunderid-spacing-unit) * 1.5);
3113
+ }
3114
+
3115
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-custom")} .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-input")} {
3116
+ cursor: text;
3117
+ }
3118
+
3119
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-custom")} input.${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-input")} {
3120
+ flex: 1;
3121
+ min-width: 0;
3122
+ }
3123
+
3124
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-custom")} select.${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-input")} {
3125
+ width: auto;
3126
+ flex: 0 0 auto;
3127
+ cursor: pointer;
3128
+ }
3129
+
3130
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-input")}:focus {
3131
+ border-color: var(--thunderid-input-focusBorderColor);
3132
+ box-shadow: var(--thunderid-input-focusRing);
3133
+ outline: none;
3134
+ }
3135
+
3136
+ .${(0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-hint")} {
3137
+ color: var(--thunderid-color-text-secondary);
3138
+ font-size: var(--thunderid-typography-fontSize-xs);
3139
+ }
3065
3140
  `;
3066
3141
  var Consent_css_default = CONSENT_CSS;
3067
3142
 
@@ -7973,6 +8048,18 @@ const normalizeFlowResponse = (response, t, options = {}, meta) => {
7973
8048
 
7974
8049
  //#endregion
7975
8050
  //#region src/components/auth/flow/Consent.ts
8051
+ const VALIDITY_TEXT_DEFAULTS = {
8052
+ custom_label: "Custom validity",
8053
+ custom_unit_label: "Unit",
8054
+ hint_custom: "Enter a whole number.",
8055
+ hint_custom_max: "Enter a whole number, up to {max}.",
8056
+ hint_expires: "Your consent expires in {duration}.",
8057
+ hint_never: "You will not be asked again unless this application asks for more access.",
8058
+ hint_once: "You will be asked again the next time you sign in.",
8059
+ option_custom: "Custom",
8060
+ option_never: "No expiry"
8061
+ };
8062
+ const CUSTOM_OPTION_ID = "custom";
7976
8063
  const getConsentOptionalKey = (purposeId, attrName) => `__consent_opt__${purposeId}__${attrName}`;
7977
8064
  const isObject = (value) => typeof value === "object" && value !== null;
7978
8065
  const toPromptElements = (value) => Array.isArray(value) ? value.filter((element) => isObject(element) && typeof element["name"] === "string") : [];
@@ -8008,6 +8095,10 @@ const Consent = (0, vue.defineComponent)({
8008
8095
  required: true,
8009
8096
  type: Object
8010
8097
  },
8098
+ maxValidityPeriod: {
8099
+ default: void 0,
8100
+ type: Number
8101
+ },
8011
8102
  onInputChange: {
8012
8103
  required: true,
8013
8104
  type: Function
@@ -8015,9 +8106,14 @@ const Consent = (0, vue.defineComponent)({
8015
8106
  t: {
8016
8107
  default: void 0,
8017
8108
  type: Function
8109
+ },
8110
+ validityInput: {
8111
+ default: false,
8112
+ type: Boolean
8018
8113
  }
8019
8114
  },
8020
8115
  setup(props, { slots }) {
8116
+ const i18n = (0, vue.inject)(I18N_KEY, null);
8021
8117
  const translate = (key, fallback = "") => {
8022
8118
  const value = props.t?.(key);
8023
8119
  return value && value !== key ? value : fallback;
@@ -8041,15 +8137,127 @@ const Consent = (0, vue.defineComponent)({
8041
8137
  "aria-label": info,
8042
8138
  role: "img"
8043
8139
  }, [(0, vue.h)(InfoIcon)]) : null].filter((node) => node !== null);
8140
+ const customOpen = (0, vue.ref)(false);
8141
+ const customText = (0, vue.ref)("");
8142
+ const customUnit = (0, vue.ref)((0, __thunderid_browser.getConsentValidityCustomUnits)(props.maxValidityPeriod).includes("minute") ? "minute" : "second");
8143
+ const remembering = (0, vue.ref)((0, __thunderid_browser.getConsentValidityChoices)(props.maxValidityPeriod, props.formValues[__thunderid_browser.CONSENT_VALIDITY_PERIOD_KEY] ?? "").remember);
8144
+ (0, vue.watchEffect)(() => {
8145
+ const value = props.formValues[__thunderid_browser.CONSENT_VALIDITY_PERIOD_KEY] ?? "";
8146
+ const { initial, once } = (0, __thunderid_browser.getConsentValidityChoices)(props.maxValidityPeriod, value);
8147
+ if (props.validityInput && once && value === "") props.onInputChange(__thunderid_browser.CONSENT_VALIDITY_PERIOD_KEY, initial.value);
8148
+ }, { flush: "post" });
8149
+ const validityField = () => {
8150
+ const value = props.formValues[__thunderid_browser.CONSENT_VALIDITY_PERIOD_KEY] ?? "";
8151
+ const { initial, once, remember, remembered, selected } = (0, __thunderid_browser.getConsentValidityChoices)(props.maxValidityPeriod, value, remembering.value);
8152
+ if (!once) return null;
8153
+ const text = (key, params) => (0, __thunderid_browser.substituteTranslationParams)(translate(`consent.validity_period.${key}`, VALIDITY_TEXT_DEFAULTS[key]), params);
8154
+ const textOf = (option) => (0, __thunderid_browser.getConsentValidityOptionText)(option, text, i18n?.currentLanguage.value);
8155
+ const custom = remember && (customOpen.value || selected === void 0);
8156
+ const units = (0, __thunderid_browser.getConsentValidityCustomUnits)(props.maxValidityPeriod);
8157
+ const prefilled = custom && !customOpen.value && Number.isFinite(Number(value)) ? (0, __thunderid_browser.splitConsentValidityPeriod)(Number(value), units) : void 0;
8158
+ const unit = prefilled?.unit ?? customUnit.value;
8159
+ const amount = customOpen.value ? customText.value : prefilled?.amount ?? "";
8160
+ const maxAmount = (0, __thunderid_browser.getConsentValidityCustomMax)(props.maxValidityPeriod, unit);
8161
+ const handleSelectChange = (event) => {
8162
+ const chosen = event.target.value;
8163
+ if (chosen === CUSTOM_OPTION_ID) {
8164
+ const current = selected?.kind === "period" ? (0, __thunderid_browser.splitConsentValidityPeriod)(selected.seconds, units) : void 0;
8165
+ customOpen.value = true;
8166
+ customText.value = current?.amount ?? "";
8167
+ customUnit.value = current?.unit ?? customUnit.value;
8168
+ props.onInputChange(__thunderid_browser.CONSENT_VALIDITY_PERIOD_KEY, selected?.kind === "period" ? selected.value : initial.value);
8169
+ return;
8170
+ }
8171
+ const picked = remembered.find((option) => option.id === chosen);
8172
+ if (picked) {
8173
+ customOpen.value = false;
8174
+ props.onInputChange(__thunderid_browser.CONSENT_VALIDITY_PERIOD_KEY, picked.value);
8175
+ }
8176
+ };
8177
+ const applyCustom = (digits, nextUnit) => {
8178
+ const period = (0, __thunderid_browser.getConsentValidityCustomPeriod)(digits, props.maxValidityPeriod, nextUnit);
8179
+ customOpen.value = true;
8180
+ customUnit.value = nextUnit;
8181
+ customText.value = period.amount === "" ? digits : period.amount;
8182
+ props.onInputChange(__thunderid_browser.CONSENT_VALIDITY_PERIOD_KEY, period.seconds === "" ? initial.value : period.seconds);
8183
+ return period;
8184
+ };
8185
+ const handleCustomInput = (event) => {
8186
+ const field = event.target;
8187
+ applyCustom(field.value.replace(/\D/g, ""), unit);
8188
+ field.value = customText.value;
8189
+ };
8190
+ const handleUnitChange = (event) => {
8191
+ applyCustom(amount, event.target.value);
8192
+ };
8193
+ const hint = (0, vue.h)("span", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-hint") }, custom ? maxAmount === void 0 ? text("hint_custom") : text("hint_custom_max", { max: String(maxAmount) }) : textOf(selected ?? once).hint);
8194
+ const group = (...nodes) => (0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-group") }, nodes);
8195
+ return (0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity") }, [
8196
+ group((0, vue.h)("label", {
8197
+ class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-remember"),
8198
+ for: "consent_validity_remember"
8199
+ }, [(0, vue.h)("input", {
8200
+ checked: remember,
8201
+ class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-checkbox"),
8202
+ id: "consent_validity_remember",
8203
+ onChange: (event) => {
8204
+ const checked = event.target.checked;
8205
+ remembering.value = checked;
8206
+ customOpen.value = false;
8207
+ customText.value = "";
8208
+ props.onInputChange(__thunderid_browser.CONSENT_ONE_TIME_KEY, checked ? "false" : "true");
8209
+ props.onInputChange(__thunderid_browser.CONSENT_VALIDITY_PERIOD_KEY, checked ? initial.value : once.value);
8210
+ },
8211
+ type: "checkbox"
8212
+ }), translate("consent.validity_period.remember", "Remember my decision")]), remember ? null : hint),
8213
+ ...remember ? [group((0, vue.h)("select", {
8214
+ "aria-label": translate("consent.validity_period.label", "Ask me again"),
8215
+ class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-input"),
8216
+ id: "consent_validity_period",
8217
+ onChange: handleSelectChange,
8218
+ value: custom ? CUSTOM_OPTION_ID : selected?.id
8219
+ }, [...remembered.map((option) => (0, vue.h)("option", {
8220
+ key: option.id,
8221
+ selected: !custom && option.id === selected?.id,
8222
+ value: option.id
8223
+ }, textOf(option).label)), (0, vue.h)("option", {
8224
+ key: CUSTOM_OPTION_ID,
8225
+ selected: custom,
8226
+ value: CUSTOM_OPTION_ID
8227
+ }, text("option_custom"))]), custom ? null : hint)] : [],
8228
+ ...custom ? [group((0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-custom") }, [(0, vue.h)("input", {
8229
+ "aria-label": text("custom_label"),
8230
+ class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-input"),
8231
+ id: "consent_validity_custom",
8232
+ inputmode: "numeric",
8233
+ onInput: handleCustomInput,
8234
+ pattern: "[0-9]*",
8235
+ type: "text",
8236
+ value: amount
8237
+ }), (0, vue.h)("select", {
8238
+ "aria-label": text("custom_unit_label"),
8239
+ class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__validity-input"),
8240
+ id: "consent_validity_unit",
8241
+ onChange: handleUnitChange,
8242
+ value: unit
8243
+ }, units.map((option) => (0, vue.h)("option", {
8244
+ key: option,
8245
+ selected: option === unit,
8246
+ value: option
8247
+ }, (0, __thunderid_browser.getConsentValidityUnitLabel)(option, i18n?.currentLanguage.value))))]), hint)] : []
8248
+ ]);
8249
+ };
8044
8250
  return () => {
8045
8251
  const purposes = parsePurposes(props.consentData);
8046
8252
  if (purposes.length === 0) return null;
8047
8253
  if (slots["default"]) return (0, vue.h)("div", slots["default"]({
8048
8254
  formValues: props.formValues,
8255
+ maxValidityPeriod: props.maxValidityPeriod,
8049
8256
  onInputChange: props.onInputChange,
8050
- purposes
8257
+ purposes,
8258
+ validityInput: props.validityInput
8051
8259
  }));
8052
- return (0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent") }, purposes.map((purpose) => {
8260
+ return (0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent") }, [...purposes.map((purpose) => {
8053
8261
  const permission = purpose.type === "permissions";
8054
8262
  const optionalName = permission ? translate("consent.optional_scope", "Optional Permissions") : translate("consent.optional_claims", "Optional Attributes");
8055
8263
  const essentialName = permission ? translate("consent.essential_scope", "Essential Permissions") : translate("consent.essential_claims", "Essential Attributes");
@@ -8094,7 +8302,7 @@ const Consent = (0, vue.defineComponent)({
8094
8302
  class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__purpose"),
8095
8303
  key: purpose.purposeId
8096
8304
  }, [purpose.essential.length > 0 ? (0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__section") }, [(0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__header") }, sectionTitle(essentialName, translate(permission ? "consent.essential_scope.info" : "consent.essential_claims.info", permission ? "" : "These attributes are required for the service to function properly."))), itemList(purpose.essential, true)]) : null, purpose.optional.length > 0 ? (0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__section") }, [(0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__optional-header") }, [(0, vue.h)("div", { class: (0, __thunderid_browser.withVendorCSSClassPrefix)("consent__header") }, sectionTitle(optionalName, translate(permission ? "consent.optional_scope.info" : "consent.optional_claims.info", permission ? "" : "These attributes are optional and can be provided at your discretion."))), toggle(`consent_opt_${purpose.purposeId}_all`, allSelected, optionalName, (checked) => purpose.optional.forEach((element) => props.onInputChange(getConsentOptionalKey(purpose.purposeId, element.name), checked ? "true" : "false")))]), branches.length > 0 ? branchList(branches) : itemList(purpose.optional, false)]) : null]);
8097
- }));
8305
+ }), props.validityInput ? validityField() : null]);
8098
8306
  };
8099
8307
  }
8100
8308
  });
@@ -9022,9 +9230,13 @@ const createAuthComponentFromFlow = (component, formValues, touchedFields, formE
9022
9230
  const consentPrompt = options.additionalData?.["consentPrompt"];
9023
9231
  if (consentPrompt && eventType.toUpperCase() === __thunderid_browser.EmbeddedFlowEventType.Submit) {
9024
9232
  const isDeny = componentVariant.toLowerCase() !== "primary";
9233
+ const oneTime = !isDeny && (0, __thunderid_browser.getConsentOneTime)(formValues);
9234
+ const validityPeriod = isDeny || oneTime ? void 0 : (0, __thunderid_browser.getConsentValidityPeriod)(formValues);
9025
9235
  const decisions = {
9026
9236
  approved: !isDeny,
9027
9237
  ...isDeny ? { reason: __thunderid_browser.ConsentConstants.REASON_USER_DENIED } : {},
9238
+ ...validityPeriod === void 0 ? {} : { validityPeriod },
9239
+ ...oneTime ? { oneTime } : {},
9028
9240
  purposes: consentPrompt.purposes.map((p) => ({
9029
9241
  approved: !isDeny,
9030
9242
  elements: [...(p.essential ?? []).map((e) => ({
@@ -9230,13 +9442,18 @@ const createAuthComponentFromFlow = (component, formValues, touchedFields, formE
9230
9442
  style: stackStyle
9231
9443
  }, stackChildren.filter(Boolean));
9232
9444
  }
9233
- case __thunderid_browser.EmbeddedFlowComponentType.Consent: return (0, vue.h)(Consent_default, {
9234
- consentData: options.additionalData?.["consentPrompt"],
9235
- formValues,
9236
- key,
9237
- onInputChange,
9238
- t: options.t
9239
- });
9445
+ case __thunderid_browser.EmbeddedFlowComponentType.Consent: {
9446
+ const { enabled: validityInput, maxValidityPeriod } = (0, __thunderid_browser.getConsentValidityInput)(options.additionalData);
9447
+ return (0, vue.h)(Consent_default, {
9448
+ consentData: options.additionalData?.["consentPrompt"],
9449
+ formValues,
9450
+ key,
9451
+ maxValidityPeriod,
9452
+ onInputChange,
9453
+ t: options.t,
9454
+ validityInput
9455
+ });
9456
+ }
9240
9457
  case __thunderid_browser.EmbeddedFlowComponentType.Timer: {
9241
9458
  const textTemplate = resolve(component.label) || "Time remaining: {time}";
9242
9459
  const timeoutMs = Number(options.additionalData?.["stepTimeout"]) || 0;
@@ -10626,7 +10843,8 @@ const DeviceGrant = (0, vue.defineComponent)({
10626
10843
  applicationId: appId,
10627
10844
  flowType: __thunderid_browser.EmbeddedFlowType.DeviceGrant,
10628
10845
  inputs: {}
10629
- }
10846
+ },
10847
+ sessionStore: getStorageManager?.()
10630
10848
  });
10631
10849
  } catch (resumeError) {
10632
10850
  if (resumeId && resumeError instanceof __thunderid_browser.ThunderIDAPIError && resumeError.statusCode === 400) {
@@ -10660,7 +10878,8 @@ const DeviceGrant = (0, vue.defineComponent)({
10660
10878
  challengeToken: challengeToken.value,
10661
10879
  executionId: executionId.value,
10662
10880
  inputs
10663
- }
10881
+ },
10882
+ sessionStore: getStorageManager?.()
10664
10883
  }));
10665
10884
  } catch (cause) {
10666
10885
  handleError(toDeviceGrantError(cause, t("deviceGrant.errors.continue")));
@@ -10731,7 +10950,8 @@ const DeviceGrant = (0, vue.defineComponent)({
10731
10950
  challengeToken: challengeTokenRef.current || challengeToken.value,
10732
10951
  executionId: payload.flowId,
10733
10952
  inputs: payload.inputs
10734
- }
10953
+ },
10954
+ sessionStore: getStorageManager?.()
10735
10955
  });
10736
10956
  } finally {
10737
10957
  isLoading.value = false;
@@ -1 +1 @@
1
- {"version":3,"file":"DeviceGrant.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/device-grant/DeviceGrant.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,SAAS,EAWf,MAAM,KAAK,CAAC;AAEb,OAAO,KAAK,EAAC,0BAA0B,EAAoB,MAAM,mBAAmB,CAAC;AAkBrF,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,CAAC;AAgFhE,sGAAsG;AACtG,QAAA,MAAM,WAAW,EAAE,SA6TjB,CAAC;AAEH,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"DeviceGrant.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/device-grant/DeviceGrant.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,SAAS,EAWf,MAAM,KAAK,CAAC;AAEb,OAAO,KAAK,EAAC,0BAA0B,EAAoB,MAAM,mBAAmB,CAAC;AAkBrF,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,CAAC;AAgFhE,sGAAsG;AACtG,QAAA,MAAM,WAAW,EAAE,SAgUjB,CAAC;AAEH,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AuthOptionFactoryCore.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/flow/AuthOptionFactoryCore.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,oBAAoB,EACpB,qBAAqB,EAiBtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAC,cAAc,EAAE,UAAU,EAAE,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAEnF,OAAO,EAAI,KAAK,KAAK,EAAC,MAAM,KAAK,CAAC;AAgDlC,KAAK,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;AAqmBvF,YAAY,EAAC,aAAa,EAAC,CAAC;AAE5B;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,YAAY,qBAAqB,EAAE,EACnC,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,eAAe,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACtC,YAAY,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAClC,WAAW,OAAO,EAClB,aAAa,OAAO,EACpB,WAAW,MAAM,IAAI,EACrB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,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EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,cAAc,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5G,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,CAAC,CAAC,EAAE,aAAa,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,KACA,KAAK,EAkBkC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Consent.css.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/flow/Consent.css.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,WAAW,QA8IhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"Consent.css.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/flow/Consent.css.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,WAAW,QAuNhB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -5,14 +5,18 @@ export type ConsentData = string | ConsentPurposeData[] | {
5
5
  };
6
6
  export interface ConsentRenderProps {
7
7
  formValues: Record<string, string>;
8
+ maxValidityPeriod?: number;
8
9
  onInputChange: (name: string, value: string) => void;
9
10
  purposes: ConsentPurposeData[];
11
+ validityInput: boolean;
10
12
  }
11
13
  export interface ConsentProps {
12
14
  consentData?: ConsentData;
13
15
  formValues: Record<string, string>;
16
+ maxValidityPeriod?: number;
14
17
  onInputChange: (name: string, value: string) => void;
15
18
  t?: (key: string) => string;
19
+ validityInput?: boolean;
16
20
  }
17
21
  export declare const getConsentOptionalKey: (purposeId: string, attrName: string) => string;
18
22
  declare const Consent: Component;
@@ -1 +1 @@
1
- {"version":3,"file":"Consent.d.ts","sourceRoot":"","sources":["../../../../src/components/auth/flow/Consent.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,kBAAkB,EAGxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,KAAK,SAAS,EAAmE,MAAM,KAAK,CAAC;AAIrG,MAAM,MAA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AAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrD,CAAC,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,qBAAqB,GAAI,WAAW,MAAM,EAAE,UAAU,MAAM,KAAG,MAChC,CAAC;AA+C7C,QAAA,MAAM,OAAO,EAAE,SAgZb,CAAC;AAEH,eAAe,OAAO,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { ADMINISTRATION_FLOW_TYPE, APPLICATION_GRANT_TYPES, AccountLifecycleFlowConfigKey, AccountLifecycleFlowConfigKey as AccountLifecycleFlowConfigKey$1, AdministrationFlowConfigKey, AdministrationFlowConfigKey as AdministrationFlowConfigKey$1, AdministrationFlowData, AdministrationFlowError, AdministrationFlowInput, AdministrationModes, AgentQueryKeys, AgentQueryKeys as AgentQueryKeys$1, ApplicationQueryKeys, ApplicationQueryKeys as ApplicationQueryKeys$1, AttributeVerificationConstants, AttributeVerificationConstants as AttributeVerificationConstants$1, AuthFlowSelectConstants, ConsentConstants, CredentialConstants, DEFAULT_APPLICATION_GRANT_TYPES, DEFAULT_THEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowComponentType as EmbeddedFlowComponentType$1, EmbeddedFlowEventType, EmbeddedFlowEventType as EmbeddedFlowEventType$1, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedSelfFlowStatus, EmbeddedSelfFlowStatus as EmbeddedSelfFlowStatus$1, EmbeddedSignInFlowStatus, EmbeddedSignInFlowStatus as EmbeddedSignInFlowStatus$1, EmbeddedSignInFlowType, EmbeddedSignInFlowType as EmbeddedSignInFlowType$1, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowStatus as EmbeddedSignUpFlowStatus$1, EmbeddedSignUpFlowType, FetchHttpClient, FieldType, FieldType as FieldType$1, FlowMetaType, GroupQueryKeys, GroupQueryKeys as GroupQueryKeys$1, ORGANIZATION_UNIT_ERROR_KEYS, OrganizationUnitQueryKeys, OrganizationUnitSwitchErrorCodes, OrganizationUnitSwitchErrorCodes as OrganizationUnitSwitchErrorCodes$1, PROJECT_ERROR_KEYS, ProjectQueryKeys, RoleQueryKeys, RoleQueryKeys as RoleQueryKeys$1, SHARING_POLICY_ERROR_KEYS, SHARING_RESOURCE_COLLECTIONS, SPAUtils, SelectConstants, SharingPolicyQueryKeys, ThunderIDAPIError, ThunderIDAPIError as ThunderIDAPIError$1, ThunderIDBrowserClient, ThunderIDError, ThunderIDRuntimeError, ThunderIDRuntimeError as ThunderIDRuntimeError$1, ThunderIDWordmark, TranslationBundleConstants, UserQueryKeys, UserQueryKeys as UserQueryKeys$1, UserSelectConstants, UserTypeSelectConstants, addGroupMembers, addGroupMembers as addGroupMembers$1, addRoleAssignments, addRoleAssignments as addRoleAssignments$1, applyGatewayConfiguration, arrayBufferToBase64url, base64urlToArrayBuffer, bem, buildValidatorFromRules, compileConsentDecisions, copyTextToClipboard, createAction, createAgent, createAgent as createAgent$1, createAgentType, createApplication, createApplication as createApplication$1, createApplicationSharingPolicy, createAuthorizationDetailType, createClassObserver, createClassObserver as createClassObserver$1, createConfigurationVersion, createConnection, createCredentialConfiguration, createDesignTheme, createFlow, createFlowSharingPolicy, createGateway, createGatewaySecret, createGatewayVariable, createGroup, createGroup as createGroup$1, createGroupByPath, createHttpClientFetcher, createLayout, createMediaQueryListener, createMediaQueryListener as createMediaQueryListener$1, createNotificationTemplate, createOrganizationUnit, createOrganizationUnit as createOrganizationUnit$1, createPackageComponentLogger, createPackageLogger, createPresentationDefinition, createProject, createProject as createProject$1, createResource, createResourceInvalidator, createResourceInvalidator as createResourceInvalidator$1, createResourceOptionsLoader, createResourceServer, createRole, createRole as createRole$1, createRoleSharingPolicy, createSecret, createTheme, createUser, createUser as createUser$1, createUserByPath, createUserSharingPolicy, createUserType, createVariable, deepMerge, deleteAction, deleteAgent, deleteAgent as deleteAgent$1, deleteAgentType, deleteApplication, deleteApplication as deleteApplication$1, deleteApplicationSharingPolicy, deleteAuthorizationDetailType, deleteClientRegistration, deleteConnection, deleteCredentialConfiguration, deleteDesignTheme, deleteFlow, deleteFlowSharingPolicy, deleteGateway, deleteGatewaySecret, deleteGatewayVariable, deleteGroup, deleteGroup as deleteGroup$1, deleteImportedConfiguration, deleteLayout, deleteNotificationTemplate, deleteOrganizationUnit, deleteOrganizationUnit as deleteOrganizationUnit$1, deleteOrganizationUnitByPath, deletePresentationDefinition, deleteProject, deleteProject as deleteProject$1, deleteResource, deleteResourceServer, deleteRole, deleteRole as deleteRole$1, deleteRoleSharingPolicy, deleteSecret, deleteTranslation, deleteTranslations, deleteUser, deleteUser as deleteUser$1, deleteUserSharingPolicy, deleteUserType, deleteVariable, describeSharingPolicyScope, detectThemeMode, detectThemeMode as detectThemeMode$1, evaluateChangePasswordForm, executeAdministrationFlow, executeEmbeddedDeviceGrantFlow, executeEmbeddedSelfFlow, executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow, exportConfiguration, extractEmojiFromUri, extractUserClaimsFromIdToken, fallbackResourceInvalidator, findAdministrationFlows, generateFlattenedUserProfile, get, getAccessibleOrganizationUnits, getAccountLifecycleActions, getAccountLifecycleActions as getAccountLifecycleActions$1, getAction, getActions, getActiveTheme, getAgent, getAgent as getAgent$1, getAgentGroups, getAgentGroups as getAgentGroups$1, getAgentName, getAgentName as getAgentName$1, getAgentRoles, getAgentRoles as getAgentRoles$1, getAgentType, getAgentTypes, getAgentTypes as getAgentTypes$1, getAgents, getAgents as getAgents$1, getApplication, getApplication as getApplication$1, getApplicationClientSecret, getApplicationOAuthConfig, getApplicationOverlayRules, getApplicationSharingPolicies, getApplicationSharingPolicy, getApplications, getApplications as getApplications$1, getAuthorizationDetailType, getAuthorizationDetailTypes, getClientRegistration, getConfigurationVersion, getConfigurationVersions, getConnection, getConnectionUsages, getConnections, getConnectionsMeta, getConsentElementDecision, getConsentPermissionBranches, getConsentPermissionBranches as getConsentPermissionBranches$1, getCredentialConfiguration, getCredentialConfigurations, getDefaultI18nBundles, getDesignTheme, getDesignThemeUsages, getDesignThemes, getFlow, getFlowMeta, getFlowOverlayRules, getFlowSharingPolicies, getFlowSharingPolicy, getFlowStepComponents, getFlowUsages, getFlowVariables, getFlowVersion, getFlowVersions, getFlows, getFlows as getFlows$1, getGateway, getGatewayAppliedConfiguration, getGatewayAppliedVersion, getGatewayConfigurationDiff, getGatewayMaster, getGatewayMasterHistory, getGatewayMasterResource, getGatewaySecret, getGatewaySecrets, getGatewayVariable, getGatewayVariables, getGateways, getGroup, getGroup as getGroup$1, getGroupMembers, getGroupMembers as getGroupMembers$1, getGroups, getGroups as getGroups$1, getGroupsByPath, getLanguages, getLayout, getLayoutUsages, getLayouts, getNotificationTemplate, getNotificationTemplates, getOrganizationUnit, getOrganizationUnit as getOrganizationUnit$1, getOrganizationUnitByPath, getOrganizationUnitChildren, getOrganizationUnitChildren as getOrganizationUnitChildren$1, getOrganizationUnitGroups, getOrganizationUnitGroups as getOrganizationUnitGroups$1, getOrganizationUnitRoles, getOrganizationUnitRoles as getOrganizationUnitRoles$1, getOrganizationUnitUsers, getOrganizationUnitUsers as getOrganizationUnitUsers$1, getOrganizationUnits, getOrganizationUnits as getOrganizationUnits$1, getPresentationDefinition, getPresentationDefinitions, getProject, getProject as getProject$1, getProjects, getProjects as getProjects$1, getResource, getResourceServer, getResourceServerPermissions, getResourceServerPermissions as getResourceServerPermissions$1, getResourceServers, getResourceServers as getResourceServers$1, getResources, getRole, getRole as getRole$1, getRoleAssignments, getRoleAssignments as getRoleAssignments$1, getRoleOverlayRules, getRoleSharingPolicies, getRoleSharingPolicy, getRoles, getRoles as getRoles$1, getSecret, getSecrets, getSelectMessages, getServerConfig, getServerConfigs, getSharingPolicyOperations, getSupportedAuthorizationDetailsType, getSupportedAuthorizationDetailsTypes, getTokenPermissions, getUser, getUser as getUser$1, getUserGroups, getUserGroups as getUserGroups$1, getUserOverlayRules, getUserSharingPolicies, getUserSharingPolicy, getUserType, getUserTypeByHandle, getUserTypes, getUserTypes as getUserTypes$1, getUserUsages, getUsers, getUsers as getUsers$1, getUsersByPath, getUsersMe, getUsersMeMeta, getVariable, getVariables, getVendorPrefix, getVerifiedAttributes, getVerifiedAttributes as getVerifiedAttributes$1, handleWebAuthnAuthentication, hasAdminVerificationStatus, hasAuthParamsInUrl, hasAuthParamsInUrl as hasAuthParamsInUrl$1, hasCalledForThisInstanceInUrl, hasPermission, hasPermission as hasPermission$1, hasUnresolvedTranslationParams, http, importConfiguration, isAdminVerifiableAttribute, isApplicationSubmissionValid, isEmojiUri, isEmpty, isFlowExpiredError, isFlowMetaUnavailableError, isSharingPolicyFormValid, isVerifiableAttribute, isVerifiableAttribute as isVerifiableAttribute$1, loadUntilOptionsGrow, mapCredentialUpdateError, mergeOptionsBatch, navigate, navigate as navigate$1, normalizeBorderRadius, normalizeSelectOptions, normalizeTranslations, parseKeyValuePairs, parseKeyValuePairs as parseKeyValuePairs$1, parseRedirectUris, previewCimdDocument, readCurrentProject, regenerateAgentSecret, regenerateClientSecret, regenerateClientSecret as regenerateClientSecret$1, regenerateFlowSecret, registerClient, removeGroupMembers, removeGroupMembers as removeGroupMembers$1, removeRoleAssignments, removeRoleAssignments as removeRoleAssignments$1, resolveAdministrationFlowHandles, resolveAdministrationFlowHandles as resolveAdministrationFlowHandles$1, resolveAdministrationFlowId, resolveAdministrationFlows, resolveAdministrationFlows as resolveAdministrationFlows$1, resolveChangeCredentialPolicy, resolveDesign, resolveFlowTemplateLiterals, resolveLogoUri, resolveManagedIdentityName, resolvePageSize, resolveRequestBaseUrl, resolveResourceEndpoint, resolveTranslation, resolveTranslations, restoreFlowVersion, revertGatewayConfiguration, runAccountLifecycleAction, runAccountLifecycleAction as runAccountLifecycleAction$1, runAdministrationFlow, sendUserAttributeVerification, sendUserAttributeVerification as sendUserAttributeVerification$1, setTranslation, setTranslations, startCase, substituteTranslationParams, supportsCredential, suspendAgent, suspendApplication, suspendUser, toAuthFlowSelectPage, toCreateApplicationRequest, toEqualityFilter, toError, toManagementErrorMessage, toSharingPolicyFormValues, toSharingPolicyRequest, toSharingPolicyUpdateRequest, toUpdateApplicationRequest, toUserSelectPage, toUserTypeSelectPage, unlockAgent, unlockUser, unsuspendAgent, unsuspendApplication, unsuspendUser, updateAction, updateAgent, updateAgentType, updateApplication, updateApplication as updateApplication$1, updateApplicationSharingPolicy, updateAuthorizationDetailType, updateClientRegistration, updateConnection, updateCredentialConfiguration, updateDesignTheme, updateFlow, updateFlowSharingPolicy, updateFlowVariables, updateGateway, updateGatewaySecret, updateGatewayVariable, updateGroup, updateLayout, updateMeCredentials, updateMeProfile, updateNotificationTemplate, updateOrganizationUnit, updateOrganizationUnit as updateOrganizationUnit$1, updateOrganizationUnitByPath, updatePresentationDefinition, updateProject, updateProject as updateProject$1, updateResource, updateResourceServer, updateRole, updateRole as updateRole$1, updateRoleSharingPolicy, updateSecret, updateServerConfig, updateUser, updateUser as updateUser$1, updateUserCredentials, updateUserSharingPolicy, updateUserType, updateVariable, withVendorCSSClassPrefix, writeCurrentProject } from "@thunderid/browser";
2
- import { Comment, Fragment, Teleport, cloneVNode, computed, defineComponent, getCurrentInstance, getCurrentScope, h, inject, isVNode, nextTick, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, readonly, ref, shallowReadonly, shallowRef, toValue, useId, watch } from "vue";
1
+ import { ADMINISTRATION_FLOW_TYPE, APPLICATION_GRANT_TYPES, AccountLifecycleFlowConfigKey, AccountLifecycleFlowConfigKey as AccountLifecycleFlowConfigKey$1, AdministrationFlowConfigKey, AdministrationFlowConfigKey as AdministrationFlowConfigKey$1, AdministrationFlowData, AdministrationFlowError, AdministrationFlowInput, AdministrationModes, AgentQueryKeys, AgentQueryKeys as AgentQueryKeys$1, ApplicationQueryKeys, ApplicationQueryKeys as ApplicationQueryKeys$1, AttributeVerificationConstants, AttributeVerificationConstants as AttributeVerificationConstants$1, AuthFlowSelectConstants, CONSENT_ONE_TIME_KEY, CONSENT_VALIDITY_PERIOD_KEY, ConsentConstants, CredentialConstants, DEFAULT_APPLICATION_GRANT_TYPES, DEFAULT_THEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowComponentType as EmbeddedFlowComponentType$1, EmbeddedFlowEventType, EmbeddedFlowEventType as EmbeddedFlowEventType$1, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedSelfFlowStatus, EmbeddedSelfFlowStatus as EmbeddedSelfFlowStatus$1, EmbeddedSignInFlowStatus, EmbeddedSignInFlowStatus as EmbeddedSignInFlowStatus$1, EmbeddedSignInFlowType, EmbeddedSignInFlowType as EmbeddedSignInFlowType$1, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowStatus as EmbeddedSignUpFlowStatus$1, EmbeddedSignUpFlowType, FetchHttpClient, FieldType, FieldType as FieldType$1, FlowMetaType, GroupQueryKeys, GroupQueryKeys as GroupQueryKeys$1, ORGANIZATION_UNIT_ERROR_KEYS, OrganizationUnitQueryKeys, OrganizationUnitSwitchErrorCodes, OrganizationUnitSwitchErrorCodes as OrganizationUnitSwitchErrorCodes$1, PROJECT_ERROR_KEYS, ProjectQueryKeys, RoleQueryKeys, RoleQueryKeys as RoleQueryKeys$1, SHARING_POLICY_ERROR_KEYS, SHARING_RESOURCE_COLLECTIONS, SPAUtils, SelectConstants, SharingPolicyQueryKeys, ThunderIDAPIError, ThunderIDAPIError as ThunderIDAPIError$1, ThunderIDBrowserClient, ThunderIDError, ThunderIDRuntimeError, ThunderIDRuntimeError as ThunderIDRuntimeError$1, ThunderIDWordmark, TranslationBundleConstants, UserQueryKeys, UserQueryKeys as UserQueryKeys$1, UserSelectConstants, UserTypeSelectConstants, addGroupMembers, addGroupMembers as addGroupMembers$1, addRoleAssignments, addRoleAssignments as addRoleAssignments$1, applyGatewayConfiguration, arrayBufferToBase64url, base64urlToArrayBuffer, bem, buildValidatorFromRules, compileConsentDecisions, copyTextToClipboard, createAction, createAgent, createAgent as createAgent$1, createAgentType, createApplication, createApplication as createApplication$1, createApplicationSharingPolicy, createAuthorizationDetailType, createClassObserver, createClassObserver as createClassObserver$1, createConfigurationVersion, createConnection, createCredentialConfiguration, createDesignTheme, createFlow, createFlowSharingPolicy, createGateway, createGatewaySecret, createGatewayVariable, createGroup, createGroup as createGroup$1, createGroupByPath, createHttpClientFetcher, createLayout, createMediaQueryListener, createMediaQueryListener as createMediaQueryListener$1, createNotificationTemplate, createOrganizationUnit, createOrganizationUnit as createOrganizationUnit$1, createPackageComponentLogger, createPackageLogger, createPresentationDefinition, createProject, createProject as createProject$1, createResource, createResourceInvalidator, createResourceInvalidator as createResourceInvalidator$1, createResourceOptionsLoader, createResourceServer, createRole, createRole as createRole$1, createRoleSharingPolicy, createSecret, createTheme, createUser, createUser as createUser$1, createUserByPath, createUserSharingPolicy, createUserType, createVariable, deepMerge, deleteAction, deleteAgent, deleteAgent as deleteAgent$1, deleteAgentType, deleteApplication, deleteApplication as deleteApplication$1, deleteApplicationSharingPolicy, deleteAuthorizationDetailType, deleteClientRegistration, deleteConnection, deleteCredentialConfiguration, deleteDesignTheme, deleteFlow, deleteFlowSharingPolicy, deleteGateway, deleteGatewaySecret, deleteGatewayVariable, deleteGroup, deleteGroup as deleteGroup$1, deleteImportedConfiguration, deleteLayout, deleteNotificationTemplate, deleteOrganizationUnit, deleteOrganizationUnit as deleteOrganizationUnit$1, deleteOrganizationUnitByPath, deletePresentationDefinition, deleteProject, deleteProject as deleteProject$1, deleteResource, deleteResourceServer, deleteRole, deleteRole as deleteRole$1, deleteRoleSharingPolicy, deleteSecret, deleteTranslation, deleteTranslations, deleteUser, deleteUser as deleteUser$1, deleteUserSharingPolicy, deleteUserType, deleteVariable, describeSharingPolicyScope, detectThemeMode, detectThemeMode as detectThemeMode$1, evaluateChangePasswordForm, executeAdministrationFlow, executeEmbeddedDeviceGrantFlow, executeEmbeddedSelfFlow, executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow, exportConfiguration, extractEmojiFromUri, extractUserClaimsFromIdToken, fallbackResourceInvalidator, findAdministrationFlows, generateFlattenedUserProfile, get, getAccessibleOrganizationUnits, getAccountLifecycleActions, getAccountLifecycleActions as getAccountLifecycleActions$1, getAction, getActions, getActiveTheme, getAgent, getAgent as getAgent$1, getAgentGroups, getAgentGroups as getAgentGroups$1, getAgentName, getAgentName as getAgentName$1, getAgentRoles, getAgentRoles as getAgentRoles$1, getAgentType, getAgentTypes, getAgentTypes as getAgentTypes$1, getAgents, getAgents as getAgents$1, getApplication, getApplication as getApplication$1, getApplicationClientSecret, getApplicationOAuthConfig, getApplicationOverlayRules, getApplicationSharingPolicies, getApplicationSharingPolicy, getApplications, getApplications as getApplications$1, getAuthorizationDetailType, getAuthorizationDetailTypes, getClientRegistration, getConfigurationVersion, getConfigurationVersions, getConnection, getConnectionUsages, getConnections, getConnectionsMeta, getConsentElementDecision, getConsentOneTime, getConsentPermissionBranches, getConsentPermissionBranches as getConsentPermissionBranches$1, getConsentValidityChoices, getConsentValidityCustomMax, getConsentValidityCustomPeriod, getConsentValidityCustomUnits, getConsentValidityInput, getConsentValidityOptionText, getConsentValidityPeriod, getConsentValidityUnitLabel, getCredentialConfiguration, getCredentialConfigurations, getDefaultI18nBundles, getDesignTheme, getDesignThemeUsages, getDesignThemes, getFlow, getFlowMeta, getFlowOverlayRules, getFlowSharingPolicies, getFlowSharingPolicy, getFlowStepComponents, getFlowUsages, getFlowVariables, getFlowVersion, getFlowVersions, getFlows, getFlows as getFlows$1, getGateway, getGatewayAppliedConfiguration, getGatewayAppliedVersion, getGatewayConfigurationDiff, getGatewayMaster, getGatewayMasterHistory, getGatewayMasterResource, getGatewaySecret, getGatewaySecrets, getGatewayVariable, getGatewayVariables, getGateways, getGroup, getGroup as getGroup$1, getGroupMembers, getGroupMembers as getGroupMembers$1, getGroups, getGroups as getGroups$1, getGroupsByPath, getLanguages, getLayout, getLayoutUsages, getLayouts, getNotificationTemplate, getNotificationTemplates, getOrganizationUnit, getOrganizationUnit as getOrganizationUnit$1, getOrganizationUnitByPath, getOrganizationUnitChildren, getOrganizationUnitChildren as getOrganizationUnitChildren$1, getOrganizationUnitGroups, getOrganizationUnitGroups as getOrganizationUnitGroups$1, getOrganizationUnitRoles, getOrganizationUnitRoles as getOrganizationUnitRoles$1, getOrganizationUnitUsers, getOrganizationUnitUsers as getOrganizationUnitUsers$1, getOrganizationUnits, getOrganizationUnits as getOrganizationUnits$1, getPresentationDefinition, getPresentationDefinitions, getProject, getProject as getProject$1, getProjects, getProjects as getProjects$1, getResource, getResourceServer, getResourceServerPermissions, getResourceServerPermissions as getResourceServerPermissions$1, getResourceServers, getResourceServers as getResourceServers$1, getResources, getRole, getRole as getRole$1, getRoleAssignments, getRoleAssignments as getRoleAssignments$1, getRoleOverlayRules, getRoleSharingPolicies, getRoleSharingPolicy, getRoles, getRoles as getRoles$1, getSecret, getSecrets, getSelectMessages, getServerConfig, getServerConfigs, getSharingPolicyOperations, getSupportedAuthorizationDetailsType, getSupportedAuthorizationDetailsTypes, getTokenPermissions, getUser, getUser as getUser$1, getUserGroups, getUserGroups as getUserGroups$1, getUserOverlayRules, getUserSharingPolicies, getUserSharingPolicy, getUserType, getUserTypeByHandle, getUserTypes, getUserTypes as getUserTypes$1, getUserUsages, getUsers, getUsers as getUsers$1, getUsersByPath, getUsersMe, getUsersMeMeta, getVariable, getVariables, getVendorPrefix, getVerifiedAttributes, getVerifiedAttributes as getVerifiedAttributes$1, handleWebAuthnAuthentication, hasAdminVerificationStatus, hasAuthParamsInUrl, hasAuthParamsInUrl as hasAuthParamsInUrl$1, hasCalledForThisInstanceInUrl, hasPermission, hasPermission as hasPermission$1, hasUnresolvedTranslationParams, http, importConfiguration, isAdminVerifiableAttribute, isApplicationSubmissionValid, isEmojiUri, isEmpty, isFlowExpiredError, isFlowMetaUnavailableError, isSharingPolicyFormValid, isVerifiableAttribute, isVerifiableAttribute as isVerifiableAttribute$1, loadUntilOptionsGrow, mapCredentialUpdateError, mergeOptionsBatch, navigate, navigate as navigate$1, normalizeBorderRadius, normalizeSelectOptions, normalizeTranslations, parseKeyValuePairs, parseKeyValuePairs as parseKeyValuePairs$1, parseRedirectUris, previewCimdDocument, readCurrentProject, regenerateAgentSecret, regenerateClientSecret, regenerateClientSecret as regenerateClientSecret$1, regenerateFlowSecret, registerClient, removeGroupMembers, removeGroupMembers as removeGroupMembers$1, removeRoleAssignments, removeRoleAssignments as removeRoleAssignments$1, resolveAdministrationFlowHandles, resolveAdministrationFlowHandles as resolveAdministrationFlowHandles$1, resolveAdministrationFlowId, resolveAdministrationFlows, resolveAdministrationFlows as resolveAdministrationFlows$1, resolveChangeCredentialPolicy, resolveDesign, resolveFlowTemplateLiterals, resolveLogoUri, resolveManagedIdentityName, resolvePageSize, resolveRequestBaseUrl, resolveResourceEndpoint, resolveTranslation, resolveTranslations, restoreFlowVersion, revertGatewayConfiguration, runAccountLifecycleAction, runAccountLifecycleAction as runAccountLifecycleAction$1, runAdministrationFlow, sendUserAttributeVerification, sendUserAttributeVerification as sendUserAttributeVerification$1, setTranslation, setTranslations, splitConsentValidityPeriod, startCase, substituteTranslationParams, supportsCredential, suspendAgent, suspendApplication, suspendUser, toAuthFlowSelectPage, toCreateApplicationRequest, toEqualityFilter, toError, toManagementErrorMessage, toSharingPolicyFormValues, toSharingPolicyRequest, toSharingPolicyUpdateRequest, toUpdateApplicationRequest, toUserSelectPage, toUserTypeSelectPage, unlockAgent, unlockUser, unsuspendAgent, unsuspendApplication, unsuspendUser, updateAction, updateAgent, updateAgentType, updateApplication, updateApplication as updateApplication$1, updateApplicationSharingPolicy, updateAuthorizationDetailType, updateClientRegistration, updateConnection, updateCredentialConfiguration, updateDesignTheme, updateFlow, updateFlowSharingPolicy, updateFlowVariables, updateGateway, updateGatewaySecret, updateGatewayVariable, updateGroup, updateLayout, updateMeCredentials, updateMeProfile, updateNotificationTemplate, updateOrganizationUnit, updateOrganizationUnit as updateOrganizationUnit$1, updateOrganizationUnitByPath, updatePresentationDefinition, updateProject, updateProject as updateProject$1, updateResource, updateResourceServer, updateRole, updateRole as updateRole$1, updateRoleSharingPolicy, updateSecret, updateServerConfig, updateUser, updateUser as updateUser$1, updateUserCredentials, updateUserSharingPolicy, updateUserType, updateVariable, withVendorCSSClassPrefix, writeCurrentProject } from "@thunderid/browser";
2
+ import { Comment, Fragment, Teleport, cloneVNode, computed, defineComponent, getCurrentInstance, getCurrentScope, h, inject, isVNode, nextTick, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, readonly, ref, shallowReadonly, shallowRef, toValue, useId, watch, watchEffect } from "vue";
3
3
  import DOMPurify from "dompurify";
4
4
 
5
5
  //#region src/keys.ts
@@ -858,6 +858,7 @@ var ThunderIDVueClient = class extends ThunderIDBrowserClient {
858
858
  authId,
859
859
  baseUrl: configData?.baseUrl || "",
860
860
  payload: arg1,
861
+ sessionStore: this.getStorageManager(),
861
862
  url: resolveResourceEndpoint("flowExecute", configData, arg2?.url)
862
863
  });
863
864
  if (!authId && response) await this.storeFlowSessions(response);
@@ -895,6 +896,7 @@ var ThunderIDVueClient = class extends ThunderIDBrowserClient {
895
896
  ...firstArg,
896
897
  verbose: true
897
898
  } : firstArg,
899
+ sessionStore: this.getStorageManager(),
898
900
  url: resolveResourceEndpoint("flowExecute", configData)
899
901
  });
900
902
  if (!authId && response) await this.storeFlowSessions(response);
@@ -3036,6 +3038,79 @@ const CONSENT_CSS = `
3036
3038
  cursor: not-allowed;
3037
3039
  opacity: 0.4;
3038
3040
  }
3041
+
3042
+ .${withVendorCSSClassPrefix("consent__validity")} {
3043
+ display: flex;
3044
+ flex-direction: column;
3045
+ gap: calc(var(--thunderid-spacing-unit) * 2);
3046
+ margin-top: var(--thunderid-spacing-unit);
3047
+ }
3048
+
3049
+ .${withVendorCSSClassPrefix("consent__validity-group")} {
3050
+ display: flex;
3051
+ flex-direction: column;
3052
+ gap: calc(var(--thunderid-spacing-unit) * 0.5);
3053
+ }
3054
+
3055
+ .${withVendorCSSClassPrefix("consent__validity-remember")} {
3056
+ display: flex;
3057
+ align-items: center;
3058
+ gap: var(--thunderid-spacing-unit);
3059
+ color: var(--thunderid-color-text-primary);
3060
+ font-size: var(--thunderid-typography-fontSize-sm);
3061
+ font-weight: var(--thunderid-typography-fontWeight-medium);
3062
+ cursor: pointer;
3063
+ }
3064
+
3065
+ .${withVendorCSSClassPrefix("consent__validity-checkbox")} {
3066
+ cursor: pointer;
3067
+ }
3068
+
3069
+ .${withVendorCSSClassPrefix("consent__validity-input")} {
3070
+ box-sizing: border-box;
3071
+ width: 100%;
3072
+ height: var(--thunderid-input-height);
3073
+ padding: 0 var(--thunderid-input-paddingX);
3074
+ border: 1px solid var(--thunderid-input-borderColor);
3075
+ border-radius: var(--thunderid-input-borderRadius);
3076
+ background-color: var(--thunderid-color-background-surface);
3077
+ color: var(--thunderid-color-text-primary);
3078
+ font-family: var(--thunderid-typography-fontFamily);
3079
+ font-size: var(--thunderid-input-fontSize);
3080
+ cursor: pointer;
3081
+ }
3082
+
3083
+ .${withVendorCSSClassPrefix("consent__validity-custom")} {
3084
+ display: flex;
3085
+ align-items: flex-start;
3086
+ gap: calc(var(--thunderid-spacing-unit) * 1.5);
3087
+ }
3088
+
3089
+ .${withVendorCSSClassPrefix("consent__validity-custom")} .${withVendorCSSClassPrefix("consent__validity-input")} {
3090
+ cursor: text;
3091
+ }
3092
+
3093
+ .${withVendorCSSClassPrefix("consent__validity-custom")} input.${withVendorCSSClassPrefix("consent__validity-input")} {
3094
+ flex: 1;
3095
+ min-width: 0;
3096
+ }
3097
+
3098
+ .${withVendorCSSClassPrefix("consent__validity-custom")} select.${withVendorCSSClassPrefix("consent__validity-input")} {
3099
+ width: auto;
3100
+ flex: 0 0 auto;
3101
+ cursor: pointer;
3102
+ }
3103
+
3104
+ .${withVendorCSSClassPrefix("consent__validity-input")}:focus {
3105
+ border-color: var(--thunderid-input-focusBorderColor);
3106
+ box-shadow: var(--thunderid-input-focusRing);
3107
+ outline: none;
3108
+ }
3109
+
3110
+ .${withVendorCSSClassPrefix("consent__validity-hint")} {
3111
+ color: var(--thunderid-color-text-secondary);
3112
+ font-size: var(--thunderid-typography-fontSize-xs);
3113
+ }
3039
3114
  `;
3040
3115
  var Consent_css_default = CONSENT_CSS;
3041
3116
 
@@ -7947,6 +8022,18 @@ const normalizeFlowResponse = (response, t, options = {}, meta) => {
7947
8022
 
7948
8023
  //#endregion
7949
8024
  //#region src/components/auth/flow/Consent.ts
8025
+ const VALIDITY_TEXT_DEFAULTS = {
8026
+ custom_label: "Custom validity",
8027
+ custom_unit_label: "Unit",
8028
+ hint_custom: "Enter a whole number.",
8029
+ hint_custom_max: "Enter a whole number, up to {max}.",
8030
+ hint_expires: "Your consent expires in {duration}.",
8031
+ hint_never: "You will not be asked again unless this application asks for more access.",
8032
+ hint_once: "You will be asked again the next time you sign in.",
8033
+ option_custom: "Custom",
8034
+ option_never: "No expiry"
8035
+ };
8036
+ const CUSTOM_OPTION_ID = "custom";
7950
8037
  const getConsentOptionalKey = (purposeId, attrName) => `__consent_opt__${purposeId}__${attrName}`;
7951
8038
  const isObject = (value) => typeof value === "object" && value !== null;
7952
8039
  const toPromptElements = (value) => Array.isArray(value) ? value.filter((element) => isObject(element) && typeof element["name"] === "string") : [];
@@ -7982,6 +8069,10 @@ const Consent = defineComponent({
7982
8069
  required: true,
7983
8070
  type: Object
7984
8071
  },
8072
+ maxValidityPeriod: {
8073
+ default: void 0,
8074
+ type: Number
8075
+ },
7985
8076
  onInputChange: {
7986
8077
  required: true,
7987
8078
  type: Function
@@ -7989,9 +8080,14 @@ const Consent = defineComponent({
7989
8080
  t: {
7990
8081
  default: void 0,
7991
8082
  type: Function
8083
+ },
8084
+ validityInput: {
8085
+ default: false,
8086
+ type: Boolean
7992
8087
  }
7993
8088
  },
7994
8089
  setup(props, { slots }) {
8090
+ const i18n = inject(I18N_KEY, null);
7995
8091
  const translate = (key, fallback = "") => {
7996
8092
  const value = props.t?.(key);
7997
8093
  return value && value !== key ? value : fallback;
@@ -8015,15 +8111,127 @@ const Consent = defineComponent({
8015
8111
  "aria-label": info,
8016
8112
  role: "img"
8017
8113
  }, [h(InfoIcon)]) : null].filter((node) => node !== null);
8114
+ const customOpen = ref(false);
8115
+ const customText = ref("");
8116
+ const customUnit = ref(getConsentValidityCustomUnits(props.maxValidityPeriod).includes("minute") ? "minute" : "second");
8117
+ const remembering = ref(getConsentValidityChoices(props.maxValidityPeriod, props.formValues[CONSENT_VALIDITY_PERIOD_KEY] ?? "").remember);
8118
+ watchEffect(() => {
8119
+ const value = props.formValues[CONSENT_VALIDITY_PERIOD_KEY] ?? "";
8120
+ const { initial, once } = getConsentValidityChoices(props.maxValidityPeriod, value);
8121
+ if (props.validityInput && once && value === "") props.onInputChange(CONSENT_VALIDITY_PERIOD_KEY, initial.value);
8122
+ }, { flush: "post" });
8123
+ const validityField = () => {
8124
+ const value = props.formValues[CONSENT_VALIDITY_PERIOD_KEY] ?? "";
8125
+ const { initial, once, remember, remembered, selected } = getConsentValidityChoices(props.maxValidityPeriod, value, remembering.value);
8126
+ if (!once) return null;
8127
+ const text = (key, params) => substituteTranslationParams(translate(`consent.validity_period.${key}`, VALIDITY_TEXT_DEFAULTS[key]), params);
8128
+ const textOf = (option) => getConsentValidityOptionText(option, text, i18n?.currentLanguage.value);
8129
+ const custom = remember && (customOpen.value || selected === void 0);
8130
+ const units = getConsentValidityCustomUnits(props.maxValidityPeriod);
8131
+ const prefilled = custom && !customOpen.value && Number.isFinite(Number(value)) ? splitConsentValidityPeriod(Number(value), units) : void 0;
8132
+ const unit = prefilled?.unit ?? customUnit.value;
8133
+ const amount = customOpen.value ? customText.value : prefilled?.amount ?? "";
8134
+ const maxAmount = getConsentValidityCustomMax(props.maxValidityPeriod, unit);
8135
+ const handleSelectChange = (event) => {
8136
+ const chosen = event.target.value;
8137
+ if (chosen === CUSTOM_OPTION_ID) {
8138
+ const current = selected?.kind === "period" ? splitConsentValidityPeriod(selected.seconds, units) : void 0;
8139
+ customOpen.value = true;
8140
+ customText.value = current?.amount ?? "";
8141
+ customUnit.value = current?.unit ?? customUnit.value;
8142
+ props.onInputChange(CONSENT_VALIDITY_PERIOD_KEY, selected?.kind === "period" ? selected.value : initial.value);
8143
+ return;
8144
+ }
8145
+ const picked = remembered.find((option) => option.id === chosen);
8146
+ if (picked) {
8147
+ customOpen.value = false;
8148
+ props.onInputChange(CONSENT_VALIDITY_PERIOD_KEY, picked.value);
8149
+ }
8150
+ };
8151
+ const applyCustom = (digits, nextUnit) => {
8152
+ const period = getConsentValidityCustomPeriod(digits, props.maxValidityPeriod, nextUnit);
8153
+ customOpen.value = true;
8154
+ customUnit.value = nextUnit;
8155
+ customText.value = period.amount === "" ? digits : period.amount;
8156
+ props.onInputChange(CONSENT_VALIDITY_PERIOD_KEY, period.seconds === "" ? initial.value : period.seconds);
8157
+ return period;
8158
+ };
8159
+ const handleCustomInput = (event) => {
8160
+ const field = event.target;
8161
+ applyCustom(field.value.replace(/\D/g, ""), unit);
8162
+ field.value = customText.value;
8163
+ };
8164
+ const handleUnitChange = (event) => {
8165
+ applyCustom(amount, event.target.value);
8166
+ };
8167
+ const hint = h("span", { class: withVendorCSSClassPrefix("consent__validity-hint") }, custom ? maxAmount === void 0 ? text("hint_custom") : text("hint_custom_max", { max: String(maxAmount) }) : textOf(selected ?? once).hint);
8168
+ const group = (...nodes) => h("div", { class: withVendorCSSClassPrefix("consent__validity-group") }, nodes);
8169
+ return h("div", { class: withVendorCSSClassPrefix("consent__validity") }, [
8170
+ group(h("label", {
8171
+ class: withVendorCSSClassPrefix("consent__validity-remember"),
8172
+ for: "consent_validity_remember"
8173
+ }, [h("input", {
8174
+ checked: remember,
8175
+ class: withVendorCSSClassPrefix("consent__validity-checkbox"),
8176
+ id: "consent_validity_remember",
8177
+ onChange: (event) => {
8178
+ const checked = event.target.checked;
8179
+ remembering.value = checked;
8180
+ customOpen.value = false;
8181
+ customText.value = "";
8182
+ props.onInputChange(CONSENT_ONE_TIME_KEY, checked ? "false" : "true");
8183
+ props.onInputChange(CONSENT_VALIDITY_PERIOD_KEY, checked ? initial.value : once.value);
8184
+ },
8185
+ type: "checkbox"
8186
+ }), translate("consent.validity_period.remember", "Remember my decision")]), remember ? null : hint),
8187
+ ...remember ? [group(h("select", {
8188
+ "aria-label": translate("consent.validity_period.label", "Ask me again"),
8189
+ class: withVendorCSSClassPrefix("consent__validity-input"),
8190
+ id: "consent_validity_period",
8191
+ onChange: handleSelectChange,
8192
+ value: custom ? CUSTOM_OPTION_ID : selected?.id
8193
+ }, [...remembered.map((option) => h("option", {
8194
+ key: option.id,
8195
+ selected: !custom && option.id === selected?.id,
8196
+ value: option.id
8197
+ }, textOf(option).label)), h("option", {
8198
+ key: CUSTOM_OPTION_ID,
8199
+ selected: custom,
8200
+ value: CUSTOM_OPTION_ID
8201
+ }, text("option_custom"))]), custom ? null : hint)] : [],
8202
+ ...custom ? [group(h("div", { class: withVendorCSSClassPrefix("consent__validity-custom") }, [h("input", {
8203
+ "aria-label": text("custom_label"),
8204
+ class: withVendorCSSClassPrefix("consent__validity-input"),
8205
+ id: "consent_validity_custom",
8206
+ inputmode: "numeric",
8207
+ onInput: handleCustomInput,
8208
+ pattern: "[0-9]*",
8209
+ type: "text",
8210
+ value: amount
8211
+ }), h("select", {
8212
+ "aria-label": text("custom_unit_label"),
8213
+ class: withVendorCSSClassPrefix("consent__validity-input"),
8214
+ id: "consent_validity_unit",
8215
+ onChange: handleUnitChange,
8216
+ value: unit
8217
+ }, units.map((option) => h("option", {
8218
+ key: option,
8219
+ selected: option === unit,
8220
+ value: option
8221
+ }, getConsentValidityUnitLabel(option, i18n?.currentLanguage.value))))]), hint)] : []
8222
+ ]);
8223
+ };
8018
8224
  return () => {
8019
8225
  const purposes = parsePurposes(props.consentData);
8020
8226
  if (purposes.length === 0) return null;
8021
8227
  if (slots["default"]) return h("div", slots["default"]({
8022
8228
  formValues: props.formValues,
8229
+ maxValidityPeriod: props.maxValidityPeriod,
8023
8230
  onInputChange: props.onInputChange,
8024
- purposes
8231
+ purposes,
8232
+ validityInput: props.validityInput
8025
8233
  }));
8026
- return h("div", { class: withVendorCSSClassPrefix("consent") }, purposes.map((purpose) => {
8234
+ return h("div", { class: withVendorCSSClassPrefix("consent") }, [...purposes.map((purpose) => {
8027
8235
  const permission = purpose.type === "permissions";
8028
8236
  const optionalName = permission ? translate("consent.optional_scope", "Optional Permissions") : translate("consent.optional_claims", "Optional Attributes");
8029
8237
  const essentialName = permission ? translate("consent.essential_scope", "Essential Permissions") : translate("consent.essential_claims", "Essential Attributes");
@@ -8068,7 +8276,7 @@ const Consent = defineComponent({
8068
8276
  class: withVendorCSSClassPrefix("consent__purpose"),
8069
8277
  key: purpose.purposeId
8070
8278
  }, [purpose.essential.length > 0 ? h("div", { class: withVendorCSSClassPrefix("consent__section") }, [h("div", { class: withVendorCSSClassPrefix("consent__header") }, sectionTitle(essentialName, translate(permission ? "consent.essential_scope.info" : "consent.essential_claims.info", permission ? "" : "These attributes are required for the service to function properly."))), itemList(purpose.essential, true)]) : null, purpose.optional.length > 0 ? h("div", { class: withVendorCSSClassPrefix("consent__section") }, [h("div", { class: withVendorCSSClassPrefix("consent__optional-header") }, [h("div", { class: withVendorCSSClassPrefix("consent__header") }, sectionTitle(optionalName, translate(permission ? "consent.optional_scope.info" : "consent.optional_claims.info", permission ? "" : "These attributes are optional and can be provided at your discretion."))), toggle(`consent_opt_${purpose.purposeId}_all`, allSelected, optionalName, (checked) => purpose.optional.forEach((element) => props.onInputChange(getConsentOptionalKey(purpose.purposeId, element.name), checked ? "true" : "false")))]), branches.length > 0 ? branchList(branches) : itemList(purpose.optional, false)]) : null]);
8071
- }));
8279
+ }), props.validityInput ? validityField() : null]);
8072
8280
  };
8073
8281
  }
8074
8282
  });
@@ -8996,9 +9204,13 @@ const createAuthComponentFromFlow = (component, formValues, touchedFields, formE
8996
9204
  const consentPrompt = options.additionalData?.["consentPrompt"];
8997
9205
  if (consentPrompt && eventType.toUpperCase() === EmbeddedFlowEventType$1.Submit) {
8998
9206
  const isDeny = componentVariant.toLowerCase() !== "primary";
9207
+ const oneTime = !isDeny && getConsentOneTime(formValues);
9208
+ const validityPeriod = isDeny || oneTime ? void 0 : getConsentValidityPeriod(formValues);
8999
9209
  const decisions = {
9000
9210
  approved: !isDeny,
9001
9211
  ...isDeny ? { reason: ConsentConstants.REASON_USER_DENIED } : {},
9212
+ ...validityPeriod === void 0 ? {} : { validityPeriod },
9213
+ ...oneTime ? { oneTime } : {},
9002
9214
  purposes: consentPrompt.purposes.map((p) => ({
9003
9215
  approved: !isDeny,
9004
9216
  elements: [...(p.essential ?? []).map((e) => ({
@@ -9204,13 +9416,18 @@ const createAuthComponentFromFlow = (component, formValues, touchedFields, formE
9204
9416
  style: stackStyle
9205
9417
  }, stackChildren.filter(Boolean));
9206
9418
  }
9207
- case EmbeddedFlowComponentType$1.Consent: return h(Consent_default, {
9208
- consentData: options.additionalData?.["consentPrompt"],
9209
- formValues,
9210
- key,
9211
- onInputChange,
9212
- t: options.t
9213
- });
9419
+ case EmbeddedFlowComponentType$1.Consent: {
9420
+ const { enabled: validityInput, maxValidityPeriod } = getConsentValidityInput(options.additionalData);
9421
+ return h(Consent_default, {
9422
+ consentData: options.additionalData?.["consentPrompt"],
9423
+ formValues,
9424
+ key,
9425
+ maxValidityPeriod,
9426
+ onInputChange,
9427
+ t: options.t,
9428
+ validityInput
9429
+ });
9430
+ }
9214
9431
  case EmbeddedFlowComponentType$1.Timer: {
9215
9432
  const textTemplate = resolve(component.label) || "Time remaining: {time}";
9216
9433
  const timeoutMs = Number(options.additionalData?.["stepTimeout"]) || 0;
@@ -10600,7 +10817,8 @@ const DeviceGrant = defineComponent({
10600
10817
  applicationId: appId,
10601
10818
  flowType: EmbeddedFlowType.DeviceGrant,
10602
10819
  inputs: {}
10603
- }
10820
+ },
10821
+ sessionStore: getStorageManager?.()
10604
10822
  });
10605
10823
  } catch (resumeError) {
10606
10824
  if (resumeId && resumeError instanceof ThunderIDAPIError$1 && resumeError.statusCode === 400) {
@@ -10634,7 +10852,8 @@ const DeviceGrant = defineComponent({
10634
10852
  challengeToken: challengeToken.value,
10635
10853
  executionId: executionId.value,
10636
10854
  inputs
10637
- }
10855
+ },
10856
+ sessionStore: getStorageManager?.()
10638
10857
  }));
10639
10858
  } catch (cause) {
10640
10859
  handleError(toDeviceGrantError(cause, t("deviceGrant.errors.continue")));
@@ -10705,7 +10924,8 @@ const DeviceGrant = defineComponent({
10705
10924
  challengeToken: challengeTokenRef.current || challengeToken.value,
10706
10925
  executionId: payload.flowId,
10707
10926
  inputs: payload.inputs
10708
- }
10927
+ },
10928
+ sessionStore: getStorageManager?.()
10709
10929
  });
10710
10930
  } finally {
10711
10931
  isLoading.value = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thunderid/vue",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "description": "Vue SDK for ThunderID",
5
5
  "keywords": [
6
6
  "thunderid",
@@ -57,7 +57,7 @@
57
57
  }
58
58
  },
59
59
  "dependencies": {
60
- "@thunderid/browser": "^1.21.0",
60
+ "@thunderid/browser": "^1.22.0",
61
61
  "dompurify": "3.4.17",
62
62
  "tslib": "2.8.1"
63
63
  },