@plaidev/karte-action-sdk 1.1.270-29228770.05dce6ca → 1.1.270-29270501.62e803ca6
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/action.d.ts +0 -1
- package/dist/actionEvent.d.ts +0 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/components-flex/avatar/types.d.ts +0 -1
- package/dist/components-flex/button/types.d.ts +0 -3
- package/dist/components-flex/button-outlined/types.d.ts +0 -3
- package/dist/components-flex/button-text/types.d.ts +0 -3
- package/dist/components-flex/form/types.d.ts +35 -20
- package/dist/components-flex/form.d.ts +40 -3
- package/dist/components-flex/icon/types.d.ts +0 -1
- package/dist/components-flex/text/types.d.ts +0 -3
- package/dist/components-flex/text-link/types.d.ts +0 -3
- package/dist/components-flex/variants.d.ts +0 -15
- package/dist/components-flex/youtube/types.d.ts +0 -1
- package/dist/constants.d.ts +0 -1
- package/dist/functions.d.ts +1 -1
- package/dist/hooks/useInjectCustomizeCss.d.ts +1 -1
- package/dist/hooks/useText.d.ts +1 -1
- package/dist/hydrate/action.d.ts +0 -1
- package/dist/hydrate/actionEvent.d.ts +0 -1
- package/dist/hydrate/components/index.d.ts +0 -1
- package/dist/hydrate/components-flex/avatar/types.d.ts +0 -1
- package/dist/hydrate/components-flex/button/types.d.ts +0 -3
- package/dist/hydrate/components-flex/button-outlined/types.d.ts +0 -3
- package/dist/hydrate/components-flex/button-text/types.d.ts +0 -3
- package/dist/hydrate/components-flex/form/types.d.ts +35 -20
- package/dist/hydrate/components-flex/form.d.ts +40 -3
- package/dist/hydrate/components-flex/icon/types.d.ts +0 -1
- package/dist/hydrate/components-flex/text/types.d.ts +0 -3
- package/dist/hydrate/components-flex/text-link/types.d.ts +0 -3
- package/dist/hydrate/components-flex/variants.d.ts +0 -15
- package/dist/hydrate/components-flex/youtube/types.d.ts +0 -1
- package/dist/hydrate/constants.d.ts +0 -1
- package/dist/hydrate/functions.d.ts +1 -1
- package/dist/hydrate/hooks/useInjectCustomizeCss.d.ts +1 -1
- package/dist/hydrate/hooks/useText.d.ts +1 -1
- package/dist/hydrate/index.d.ts +0 -2
- package/dist/hydrate/index.es.js +914 -573
- package/dist/hydrate/index.svelte5.d.ts +2 -1
- package/dist/hydrate/modal.d.ts +0 -2
- package/dist/hydrate/modal.svelte5.d.ts +0 -2
- package/dist/hydrate/prop.d.ts +4 -0
- package/dist/hydrate/types.d.ts +0 -1
- package/dist/icons.d.ts +0 -3
- package/dist/index.es.d.ts +0 -2
- package/dist/index.es.js +902 -511
- package/dist/modal.d.ts +0 -2
- package/dist/modal.svelte5.d.ts +0 -2
- package/dist/prop.d.ts +4 -0
- package/dist/svelte5/action.d.ts +0 -1
- package/dist/svelte5/actionEvent.d.ts +0 -1
- package/dist/svelte5/components/index.d.ts +0 -1
- package/dist/svelte5/components-flex/avatar/types.d.ts +0 -1
- package/dist/svelte5/components-flex/button/types.d.ts +0 -3
- package/dist/svelte5/components-flex/button-outlined/types.d.ts +0 -3
- package/dist/svelte5/components-flex/button-text/types.d.ts +0 -3
- package/dist/svelte5/components-flex/form/types.d.ts +35 -20
- package/dist/svelte5/components-flex/form.d.ts +40 -3
- package/dist/svelte5/components-flex/icon/types.d.ts +0 -1
- package/dist/svelte5/components-flex/text/types.d.ts +0 -3
- package/dist/svelte5/components-flex/text-link/types.d.ts +0 -3
- package/dist/svelte5/components-flex/variants.d.ts +0 -15
- package/dist/svelte5/components-flex/youtube/types.d.ts +0 -1
- package/dist/svelte5/constants.d.ts +0 -1
- package/dist/svelte5/functions.d.ts +1 -1
- package/dist/svelte5/hooks/useInjectCustomizeCss.d.ts +1 -1
- package/dist/svelte5/hooks/useText.d.ts +1 -1
- package/dist/svelte5/hydrate/action.d.ts +0 -1
- package/dist/svelte5/hydrate/actionEvent.d.ts +0 -1
- package/dist/svelte5/hydrate/components/index.d.ts +0 -1
- package/dist/svelte5/hydrate/components-flex/avatar/types.d.ts +0 -1
- package/dist/svelte5/hydrate/components-flex/button/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/button-outlined/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/button-text/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/form/types.d.ts +35 -20
- package/dist/svelte5/hydrate/components-flex/form.d.ts +40 -3
- package/dist/svelte5/hydrate/components-flex/icon/types.d.ts +0 -1
- package/dist/svelte5/hydrate/components-flex/text/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/text-link/types.d.ts +0 -3
- package/dist/svelte5/hydrate/components-flex/variants.d.ts +0 -15
- package/dist/svelte5/hydrate/components-flex/youtube/types.d.ts +0 -1
- package/dist/svelte5/hydrate/constants.d.ts +0 -1
- package/dist/svelte5/hydrate/functions.d.ts +1 -1
- package/dist/svelte5/hydrate/hooks/useInjectCustomizeCss.d.ts +1 -1
- package/dist/svelte5/hydrate/hooks/useText.d.ts +1 -1
- package/dist/svelte5/hydrate/index.es.d.ts +2 -1
- package/dist/svelte5/hydrate/index.es.js +606 -379
- package/dist/svelte5/hydrate/modal.d.ts +0 -2
- package/dist/svelte5/hydrate/modal.svelte5.d.ts +0 -2
- package/dist/svelte5/hydrate/prop.d.ts +4 -0
- package/dist/svelte5/hydrate/types.d.ts +0 -1
- package/dist/svelte5/index.es.d.ts +2 -1
- package/dist/svelte5/index.es.js +606 -379
- package/dist/svelte5/index.front2.es.js +648 -418
- package/dist/svelte5/index.svelte5.d.ts +2 -1
- package/dist/svelte5/modal.d.ts +0 -2
- package/dist/svelte5/modal.svelte5.d.ts +0 -2
- package/dist/svelte5/prop.d.ts +4 -0
- package/dist/svelte5/types.d.ts +0 -1
- package/dist/templates.cjs.js +4 -2
- package/dist/templates.d.ts +0 -2
- package/dist/templates.js +4 -2
- package/dist/types.d.ts +0 -1
- package/package.json +3 -3
@@ -371,6 +371,11 @@ const OnClickOperationOptions = [
|
|
371
371
|
name: "decode",
|
372
372
|
type: "BooleanKeyword",
|
373
373
|
default: false
|
374
|
+
},
|
375
|
+
{
|
376
|
+
name: "keep_native_action_viewed",
|
377
|
+
type: "BooleanKeyword",
|
378
|
+
default: false
|
374
379
|
}
|
375
380
|
]
|
376
381
|
},
|
@@ -2476,7 +2481,7 @@ function formDataToEventValues$1(campaignId, formData$1) {
|
|
2476
2481
|
...answersMap
|
2477
2482
|
} };
|
2478
2483
|
}
|
2479
|
-
function formDataToIdentifyEventValues(formData$1) {
|
2484
|
+
function formDataToIdentifyEventValues$1(formData$1) {
|
2480
2485
|
return Object.fromEntries(Object.entries(formData$1).map(([name, dataItem]) => {
|
2481
2486
|
const value = dataItem.value;
|
2482
2487
|
return [name, value];
|
@@ -2490,7 +2495,7 @@ function submit() {
|
|
2490
2495
|
const formData$1 = get(formData);
|
2491
2496
|
const identifyFormData$1 = get(identifyFormData);
|
2492
2497
|
const values = formDataToEventValues$1(campaignId, formData$1);
|
2493
|
-
const identifyValues = formDataToIdentifyEventValues(identifyFormData$1);
|
2498
|
+
const identifyValues = formDataToIdentifyEventValues$1(identifyFormData$1);
|
2494
2499
|
if (Object.keys(identifyValues).length > 0) identifyValues["user_id"] = getVariables()?.[USER_ID_VARIABLE_NAME];
|
2495
2500
|
return {
|
2496
2501
|
values,
|
@@ -2880,6 +2885,33 @@ const LAYOUT_COMPONENT_NAMES = [
|
|
2880
2885
|
|
2881
2886
|
//#endregion
|
2882
2887
|
//#region src/components-flex/form.ts
|
2888
|
+
const FORM_VALIDATION_TYPE = {
|
2889
|
+
required: "必須",
|
2890
|
+
email: "メールアドレス",
|
2891
|
+
tel: "電話番号",
|
2892
|
+
url: "URL",
|
2893
|
+
minLength: "最小文字数",
|
2894
|
+
maxLength: "最大文字数",
|
2895
|
+
minCount: "最小個数",
|
2896
|
+
maxCount: "最大個数",
|
2897
|
+
pattern: "正規表現"
|
2898
|
+
};
|
2899
|
+
const FORM_VALIDATION_DEFAULT_ERROR_MESSAGES = {
|
2900
|
+
required: `入力してください`,
|
2901
|
+
minLength: `{minLength}文字以上で入力してください`,
|
2902
|
+
maxLength: `{maxLength}文字以下で入力してください`,
|
2903
|
+
minCount: `{minCount}個以上選択してください`,
|
2904
|
+
maxCount: `{maxCount}個以下で選択してください`,
|
2905
|
+
pattern: `正しい形式で入力してください`,
|
2906
|
+
email: `正しいメールアドレスを入力してください`,
|
2907
|
+
tel: `正しい電話番号を入力してください`,
|
2908
|
+
url: `正しいURLを入力してください`
|
2909
|
+
};
|
2910
|
+
const FORM_VALIDATION_REGEX = {
|
2911
|
+
email: "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]*\\.?[a-zA-Z0-9-]+\\.[a-zA-Z]{2,}$",
|
2912
|
+
tel: "^0\\d{1,4}[-]?\\d{1,4}[-]?\\d{4}$",
|
2913
|
+
url: "^http(s)?://.+$"
|
2914
|
+
};
|
2883
2915
|
/**
|
2884
2916
|
* @internal
|
2885
2917
|
*/
|
@@ -2888,6 +2920,7 @@ const formStore = writable({
|
|
2888
2920
|
states: {}
|
2889
2921
|
});
|
2890
2922
|
const formSubmittedValues = writable({});
|
2923
|
+
const formSubmittedIdentifyValues = writable({});
|
2891
2924
|
/**
|
2892
2925
|
* @public
|
2893
2926
|
*/
|
@@ -2906,7 +2939,6 @@ const getFormFieldState = (name) => {
|
|
2906
2939
|
* @public
|
2907
2940
|
*/
|
2908
2941
|
const getFormFieldValue = (name) => {
|
2909
|
-
console.log("getFormFieldValue", getFormFieldState(name)?.value ?? void 0);
|
2910
2942
|
return getFormFieldState(name)?.value ?? void 0;
|
2911
2943
|
};
|
2912
2944
|
/**
|
@@ -2994,14 +3026,18 @@ const registerFormField = (schemas) => {
|
|
2994
3026
|
defaultValue: schema.defaultValue,
|
2995
3027
|
type: schema.type,
|
2996
3028
|
required: schema.required,
|
2997
|
-
statePath: getState()
|
3029
|
+
statePath: getState(),
|
3030
|
+
isIdentify: schema.isIdentify,
|
3031
|
+
validations: schema.validations
|
2998
3032
|
};
|
2999
3033
|
else resultSchemes.push({
|
3000
3034
|
name: schema.name,
|
3001
3035
|
defaultValue: schema.defaultValue,
|
3002
3036
|
type: schema.type,
|
3003
3037
|
required: schema.required,
|
3004
|
-
statePath: getState()
|
3038
|
+
statePath: getState(),
|
3039
|
+
isIdentify: schema.isIdentify,
|
3040
|
+
validations: schema.validations
|
3005
3041
|
});
|
3006
3042
|
});
|
3007
3043
|
return resultSchemes;
|
@@ -3009,21 +3045,23 @@ const registerFormField = (schemas) => {
|
|
3009
3045
|
states: (() => {
|
3010
3046
|
const states$1 = { ...updater.states };
|
3011
3047
|
const submittedValues = get(formSubmittedValues);
|
3012
|
-
|
3013
|
-
|
3014
|
-
|
3015
|
-
|
3016
|
-
|
3017
|
-
|
3018
|
-
|
3019
|
-
|
3020
|
-
|
3021
|
-
|
3022
|
-
}
|
3023
|
-
|
3024
|
-
|
3025
|
-
|
3026
|
-
|
3048
|
+
const submittedIdentifyValues = get(formSubmittedIdentifyValues);
|
3049
|
+
schemas.forEach((schema) => {
|
3050
|
+
if (!(schema.name in states$1) && schema.name) states$1[schema.name] = {
|
3051
|
+
isDirty: false,
|
3052
|
+
isValid: false,
|
3053
|
+
isTouched: false,
|
3054
|
+
type: schema.type,
|
3055
|
+
value: (() => {
|
3056
|
+
if (schema.isIdentify) {
|
3057
|
+
if (submittedIdentifyValues[schema.name]) return submittedIdentifyValues[schema.name].value;
|
3058
|
+
} else if (submittedValues[schema.name]) return submittedValues[schema.name].value;
|
3059
|
+
if (schema.type === "checkboxes") return Array.isArray(schema.defaultValue) ? schema.defaultValue : [];
|
3060
|
+
else if (schema.type === "boolean") return schema.defaultValue ?? void 0;
|
3061
|
+
else return typeof schema.defaultValue === "string" ? schema.defaultValue : "";
|
3062
|
+
})(),
|
3063
|
+
errorMessage: null
|
3064
|
+
};
|
3027
3065
|
});
|
3028
3066
|
return states$1;
|
3029
3067
|
})()
|
@@ -3048,31 +3086,81 @@ const unregisterFormField = (fieldNames) => {
|
|
3048
3086
|
}));
|
3049
3087
|
};
|
3050
3088
|
const validateFormField = (schema, value) => {
|
3051
|
-
const store = get(formStore);
|
3052
3089
|
if (schema.required) {
|
3053
3090
|
if (schema.type === "checkboxes") {
|
3054
|
-
if (value.length === 0) return {
|
3091
|
+
if (Array.isArray(value) && value.length === 0) return {
|
3055
3092
|
isValid: false,
|
3056
|
-
error: "
|
3093
|
+
error: FORM_VALIDATION_DEFAULT_ERROR_MESSAGES["required"]
|
3057
3094
|
};
|
3058
3095
|
} else if (typeof value !== "string" || value.trim() === "") return {
|
3059
3096
|
isValid: false,
|
3060
|
-
error: "
|
3097
|
+
error: FORM_VALIDATION_DEFAULT_ERROR_MESSAGES["required"]
|
3061
3098
|
};
|
3062
3099
|
}
|
3100
|
+
if (schema.validations && schema.validations.length > 0) for (const validation of schema.validations) {
|
3101
|
+
const { type, number, errorMessage, regexp } = validation;
|
3102
|
+
if (type === "minLength" && !!number) {
|
3103
|
+
if (typeof value === "string" && value.length < number) return {
|
3104
|
+
isValid: false,
|
3105
|
+
error: (errorMessage || FORM_VALIDATION_DEFAULT_ERROR_MESSAGES[type]).replace("{minLength}", number.toString())
|
3106
|
+
};
|
3107
|
+
}
|
3108
|
+
if (type === "maxLength" && !!number) {
|
3109
|
+
if (typeof value === "string" && value.length > number) return {
|
3110
|
+
isValid: false,
|
3111
|
+
error: (errorMessage || FORM_VALIDATION_DEFAULT_ERROR_MESSAGES[type]).replace("{maxLength}", number.toString())
|
3112
|
+
};
|
3113
|
+
}
|
3114
|
+
if (type === "minCount" && !!number) {
|
3115
|
+
if (Array.isArray(value) && value.length < number) return {
|
3116
|
+
isValid: false,
|
3117
|
+
error: (errorMessage || FORM_VALIDATION_DEFAULT_ERROR_MESSAGES[type]).replace("{minCount}", number.toString())
|
3118
|
+
};
|
3119
|
+
}
|
3120
|
+
if (type === "maxCount" && !!number) {
|
3121
|
+
if (Array.isArray(value) && value.length > number) return {
|
3122
|
+
isValid: false,
|
3123
|
+
error: (errorMessage || FORM_VALIDATION_DEFAULT_ERROR_MESSAGES[type]).replace("{maxCount}", number.toString())
|
3124
|
+
};
|
3125
|
+
}
|
3126
|
+
if (type === "pattern" && !!regexp) {
|
3127
|
+
if (typeof value === "string" && new RegExp(regexp).test(value) === false) return {
|
3128
|
+
isValid: false,
|
3129
|
+
error: errorMessage || FORM_VALIDATION_DEFAULT_ERROR_MESSAGES[type]
|
3130
|
+
};
|
3131
|
+
}
|
3132
|
+
if (type === "email") {
|
3133
|
+
if (typeof value === "string" && new RegExp(regexp || FORM_VALIDATION_REGEX.email).test(value) === false) return {
|
3134
|
+
isValid: false,
|
3135
|
+
error: errorMessage || FORM_VALIDATION_DEFAULT_ERROR_MESSAGES[type]
|
3136
|
+
};
|
3137
|
+
}
|
3138
|
+
if (type === "tel") {
|
3139
|
+
if (typeof value === "string" && new RegExp(regexp || FORM_VALIDATION_REGEX.tel).test(value) === false) return {
|
3140
|
+
isValid: false,
|
3141
|
+
error: errorMessage || FORM_VALIDATION_DEFAULT_ERROR_MESSAGES[type]
|
3142
|
+
};
|
3143
|
+
}
|
3144
|
+
if (type === "url") {
|
3145
|
+
if (typeof value === "string" && new RegExp(regexp || FORM_VALIDATION_REGEX.url).test(value) === false) return {
|
3146
|
+
isValid: false,
|
3147
|
+
error: errorMessage || FORM_VALIDATION_DEFAULT_ERROR_MESSAGES[type]
|
3148
|
+
};
|
3149
|
+
}
|
3150
|
+
}
|
3063
3151
|
return {
|
3064
3152
|
isValid: true,
|
3065
3153
|
error: void 0
|
3066
3154
|
};
|
3067
3155
|
};
|
3068
3156
|
function createAnswerValue(value) {
|
3069
|
-
if (
|
3070
|
-
else
|
3157
|
+
if (value.type === "input" || value.type === "textarea") return { free_answer: String(value.value) };
|
3158
|
+
else return { choices: Array.isArray(value) ? value : [value] };
|
3071
3159
|
}
|
3072
|
-
function formDataToEventValues(campaignId,
|
3160
|
+
function formDataToEventValues(campaignId, values) {
|
3073
3161
|
const questions = [];
|
3074
3162
|
const answersMap = {};
|
3075
|
-
Object.entries(
|
3163
|
+
Object.entries(values).forEach(([name, value]) => {
|
3076
3164
|
questions.push(name);
|
3077
3165
|
const answerKey = `question_${name}`;
|
3078
3166
|
answersMap[answerKey] = createAnswerValue(value);
|
@@ -3082,6 +3170,9 @@ function formDataToEventValues(campaignId, formData$1) {
|
|
3082
3170
|
...answersMap
|
3083
3171
|
} };
|
3084
3172
|
}
|
3173
|
+
function formDataToIdentifyEventValues(values) {
|
3174
|
+
return Object.fromEntries(Object.entries(values).map(([name, { value }]) => [name, value]));
|
3175
|
+
}
|
3085
3176
|
/**
|
3086
3177
|
* @public
|
3087
3178
|
*/
|
@@ -3109,13 +3200,30 @@ function onSubmitForm(fn) {
|
|
3109
3200
|
})()
|
3110
3201
|
}));
|
3111
3202
|
if (hasInvalid) return;
|
3112
|
-
const
|
3203
|
+
const newValues = {};
|
3204
|
+
const newIdentifyValues = {};
|
3205
|
+
currentStateSchemas.forEach((schema) => {
|
3206
|
+
if (schema.isIdentify) newIdentifyValues[schema.name] = {
|
3207
|
+
value: formData$1.states[schema.name]?.value,
|
3208
|
+
type: schema.type
|
3209
|
+
};
|
3210
|
+
else newValues[schema.name] = {
|
3211
|
+
value: formData$1.states[schema.name]?.value,
|
3212
|
+
type: schema.type
|
3213
|
+
};
|
3214
|
+
});
|
3113
3215
|
formSubmittedValues.update((updater) => ({
|
3114
3216
|
...updater,
|
3115
|
-
...
|
3217
|
+
...newValues
|
3218
|
+
}));
|
3219
|
+
if (Object.keys(newIdentifyValues).length > 0) formSubmittedIdentifyValues.update((updater) => ({
|
3220
|
+
...updater,
|
3221
|
+
...newIdentifyValues
|
3116
3222
|
}));
|
3117
3223
|
fn({
|
3118
|
-
|
3224
|
+
currentStateIdentifyValues: formDataToIdentifyEventValues(newIdentifyValues),
|
3225
|
+
allIdentifyValues: formDataToIdentifyEventValues(get(formSubmittedIdentifyValues)),
|
3226
|
+
currentStateValues: formDataToEventValues(campaignId, newValues),
|
3119
3227
|
allValues: formDataToEventValues(campaignId, get(formSubmittedValues))
|
3120
3228
|
});
|
3121
3229
|
}
|
@@ -3141,16 +3249,14 @@ function Header($$anchor, $$props) {
|
|
3141
3249
|
$.head(($$anchor$1) => {
|
3142
3250
|
var fragment = $.comment();
|
3143
3251
|
var node = $.first_child(fragment);
|
3144
|
-
{
|
3145
|
-
var
|
3146
|
-
|
3147
|
-
|
3148
|
-
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
});
|
3153
|
-
}
|
3252
|
+
var consequent = ($$anchor$2) => {
|
3253
|
+
var link = root_2$9();
|
3254
|
+
$.template_effect(() => $.set_attribute(link, "href", $.get(googleFontUrl)));
|
3255
|
+
$.append($$anchor$2, link);
|
3256
|
+
};
|
3257
|
+
$.if(node, ($$render) => {
|
3258
|
+
if ($.get(googleFontUrl)) $$render(consequent);
|
3259
|
+
});
|
3154
3260
|
$.append($$anchor$1, fragment);
|
3155
3261
|
});
|
3156
3262
|
$.pop();
|
@@ -3222,13 +3328,13 @@ function State($$anchor, $$props) {
|
|
3222
3328
|
//#region src/components-flex/state/StateItem.svelte
|
3223
3329
|
const STATE_ITEM_CONTEXT_KEY = Symbol();
|
3224
3330
|
var root_1$15 = $.template(`<div class="state-item svelte-2qb6dm"></div> <!>`, 1);
|
3225
|
-
const $$css$
|
3331
|
+
const $$css$33 = {
|
3226
3332
|
hash: "svelte-2qb6dm",
|
3227
3333
|
code: ".state-item.svelte-2qb6dm {position:absolute;display:none;}"
|
3228
3334
|
};
|
3229
3335
|
function StateItem($$anchor, $$props) {
|
3230
3336
|
$.push($$props, false);
|
3231
|
-
$.append_styles($$anchor, $$css$
|
3337
|
+
$.append_styles($$anchor, $$css$33);
|
3232
3338
|
const [$$stores, $$cleanup] = $.setup_stores();
|
3233
3339
|
const $state = () => $.store_get(state, "$state", $$stores);
|
3234
3340
|
let path = $.prop($$props, "path", 8);
|
@@ -3240,19 +3346,17 @@ function StateItem($$anchor, $$props) {
|
|
3240
3346
|
$.init();
|
3241
3347
|
var fragment = $.comment();
|
3242
3348
|
var node = $.first_child(fragment);
|
3243
|
-
{
|
3244
|
-
var
|
3245
|
-
|
3246
|
-
|
3247
|
-
|
3248
|
-
|
3249
|
-
|
3250
|
-
|
3251
|
-
|
3252
|
-
|
3253
|
-
|
3254
|
-
});
|
3255
|
-
}
|
3349
|
+
var consequent = ($$anchor$1) => {
|
3350
|
+
var fragment_1 = root_1$15();
|
3351
|
+
var div = $.first_child(fragment_1);
|
3352
|
+
var node_1 = $.sibling(div, 2);
|
3353
|
+
$.slot(node_1, $$props, "default", {}, null);
|
3354
|
+
$.template_effect(() => $.set_attribute(div, "data-state-path", path()));
|
3355
|
+
$.append($$anchor$1, fragment_1);
|
3356
|
+
};
|
3357
|
+
$.if(node, ($$render) => {
|
3358
|
+
if ($state() === path()) $$render(consequent);
|
3359
|
+
});
|
3256
3360
|
$.append($$anchor, fragment);
|
3257
3361
|
$.pop();
|
3258
3362
|
$$cleanup();
|
@@ -3564,7 +3668,7 @@ const moveTo = (to) => () => {
|
|
3564
3668
|
_moveTo(to);
|
3565
3669
|
};
|
3566
3670
|
/** @internal */
|
3567
|
-
const linkTo = (to, targetBlank = true, decode = false) => () => {
|
3671
|
+
const linkTo = (to, targetBlank = true, decode = false, keepNativeActionViewed = false) => () => {
|
3568
3672
|
const decodedTo = decode ? decodeURI(to) : to;
|
3569
3673
|
const { target } = getActionRunnerContext() ?? {};
|
3570
3674
|
async function sleep(ms) {
|
@@ -3577,10 +3681,23 @@ const linkTo = (to, targetBlank = true, decode = false) => () => {
|
|
3577
3681
|
});
|
3578
3682
|
await sleep(450);
|
3579
3683
|
}
|
3580
|
-
|
3581
|
-
if (
|
3684
|
+
let doTransitionByLocation = true;
|
3685
|
+
if (target === "native" && targetBlank && keepNativeActionViewed) {
|
3686
|
+
const win = window;
|
3687
|
+
const nativeMessageName = "open_url";
|
3688
|
+
const nativeMessageData = {
|
3689
|
+
url: decodedTo,
|
3690
|
+
target: "_blank"
|
3691
|
+
};
|
3692
|
+
win.NativeBridge?.onReceivedMessage(nativeMessageName, JSON.stringify(nativeMessageData));
|
3693
|
+
win.webkit?.messageHandlers[nativeMessageName]?.postMessage(nativeMessageData);
|
3694
|
+
doTransitionByLocation = false;
|
3695
|
+
} else if (target === "web" && targetBlank) {
|
3696
|
+
window.open(decodedTo, "_blank");
|
3697
|
+
doTransitionByLocation = false;
|
3698
|
+
}
|
3582
3699
|
Promise.race([_send(), sleep(650)]).then(() => {
|
3583
|
-
if (
|
3700
|
+
if (doTransitionByLocation) location.href = decodedTo;
|
3584
3701
|
});
|
3585
3702
|
};
|
3586
3703
|
/** @internal */
|
@@ -3607,18 +3724,24 @@ const submitForm = (to) => () => {
|
|
3607
3724
|
};
|
3608
3725
|
/** @internal */
|
3609
3726
|
const submitFormProgress = (to) => () => {
|
3610
|
-
onSubmitForm(({ currentStateValues }) => {
|
3727
|
+
onSubmitForm(({ currentStateValues, currentStateIdentifyValues }) => {
|
3611
3728
|
send_event("_answer_question_progress", {
|
3612
3729
|
...currentStateValues,
|
3613
3730
|
state: getState()
|
3614
3731
|
});
|
3732
|
+
if (Object.keys(currentStateIdentifyValues).length > 0) send_event("identify", currentStateIdentifyValues);
|
3733
|
+
console.log("currentStateValues", currentStateValues);
|
3734
|
+
console.log("currentStateIdentifyValues", currentStateIdentifyValues);
|
3615
3735
|
_moveTo(to);
|
3616
3736
|
});
|
3617
3737
|
};
|
3618
3738
|
/** @internal */
|
3619
3739
|
const submitFormFinal = (to) => () => {
|
3620
|
-
onSubmitForm(({ allValues }) => {
|
3740
|
+
onSubmitForm(({ allValues, allIdentifyValues }) => {
|
3621
3741
|
send_event("_answer_question", allValues);
|
3742
|
+
if (Object.keys(allIdentifyValues).length > 0) send_event("identify", allIdentifyValues);
|
3743
|
+
console.log("allValues", allValues);
|
3744
|
+
console.log("allIdentifyValues", allIdentifyValues);
|
3622
3745
|
_moveTo(to);
|
3623
3746
|
});
|
3624
3747
|
};
|
@@ -3781,32 +3904,30 @@ var useClickable_default = useClickable;
|
|
3781
3904
|
|
3782
3905
|
//#endregion
|
3783
3906
|
//#region src/hooks/useInjectCustomizeCss.ts
|
3784
|
-
const
|
3907
|
+
const DATA_ATTR_LAYER_ID_KEY = "data-customize-css-layer-id";
|
3908
|
+
const useInjectCustomizeCss = (props, layerId) => {
|
3785
3909
|
function injectCss() {
|
3786
|
-
const modalElements = Array.from(document.querySelectorAll(`.${KARTE_MODAL_ROOT}`));
|
3787
|
-
const style = document.createElement("style");
|
3788
3910
|
let headAppended = false;
|
3911
|
+
const roots = Array.from(document.querySelectorAll(`.${KARTE_ACTION_ROOT}[data-${KARTE_ACTION_RID}='${actionId}']`));
|
3912
|
+
const style = document.createElement("style");
|
3913
|
+
style.setAttribute(DATA_ATTR_LAYER_ID_KEY, layerId);
|
3789
3914
|
style.textContent = props.customizeCss;
|
3790
|
-
|
3791
|
-
if (
|
3792
|
-
|
3915
|
+
roots.forEach((root$49) => {
|
3916
|
+
if (root$49 && root$49.shadowRoot) {
|
3917
|
+
const existingStyles = Array.from(root$49.shadowRoot.querySelectorAll(`style[${DATA_ATTR_LAYER_ID_KEY}='${layerId}']`));
|
3918
|
+
existingStyles.forEach((style$1) => {
|
3919
|
+
style$1.parentNode?.removeChild(style$1);
|
3920
|
+
});
|
3921
|
+
root$49.shadowRoot.appendChild(style);
|
3922
|
+
} else if (!headAppended) {
|
3793
3923
|
document.head.appendChild(style);
|
3794
3924
|
headAppended = true;
|
3795
3925
|
}
|
3796
3926
|
});
|
3797
|
-
return () => {
|
3798
|
-
modalElements.forEach((modalElement) => {
|
3799
|
-
if (modalElement?.shadowRoot) modalElement.shadowRoot.removeChild(style);
|
3800
|
-
else document.head.removeChild(style);
|
3801
|
-
});
|
3802
|
-
};
|
3803
3927
|
}
|
3804
3928
|
onMount$1(() => {
|
3805
3929
|
if (!props.isCustomizeCss) return;
|
3806
|
-
|
3807
|
-
return () => {
|
3808
|
-
removeCss();
|
3809
|
-
};
|
3930
|
+
injectCss();
|
3810
3931
|
});
|
3811
3932
|
};
|
3812
3933
|
|
@@ -3838,19 +3959,19 @@ const AVATAR_SIZE_STYLES = {
|
|
3838
3959
|
//#endregion
|
3839
3960
|
//#region src/components-flex/avatar/Avatar.svelte
|
3840
3961
|
var root_1$14 = $.template(`<img class="avatar-image svelte-1xhdr99">`);
|
3841
|
-
const $$css$
|
3962
|
+
const $$css$32 = {
|
3842
3963
|
hash: "svelte-1xhdr99",
|
3843
3964
|
code: ".avatar.svelte-1xhdr99 {display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;border:0;background:none;padding:0;margin:0;text-align:left;-webkit-appearance:none;}"
|
3844
3965
|
};
|
3845
3966
|
function Avatar($$anchor, $$props) {
|
3846
3967
|
$.push($$props, false);
|
3847
|
-
$.append_styles($$anchor, $$css$
|
3968
|
+
$.append_styles($$anchor, $$css$32);
|
3848
3969
|
const styleObj = $.mutable_state();
|
3849
3970
|
const style = $.mutable_state();
|
3850
3971
|
const imgStyle = $.mutable_state();
|
3851
3972
|
let props = $.prop($$props, "props", 24, () => ({}));
|
3852
3973
|
let layerId = $.prop($$props, "layerId", 8, "");
|
3853
|
-
useInjectCustomizeCss(props());
|
3974
|
+
useInjectCustomizeCss(props(), layerId());
|
3854
3975
|
const { attributes, element, handleClick } = useClickable_default(props());
|
3855
3976
|
const avatarSizeStyle = !isNaN(Number(props().size)) ? {
|
3856
3977
|
width: `${props().size}px`,
|
@@ -4407,18 +4528,18 @@ const ICON_VARIANTS = {
|
|
4407
4528
|
|
4408
4529
|
//#endregion
|
4409
4530
|
//#region src/components-flex/icon/Icon.svelte
|
4410
|
-
const $$css$
|
4531
|
+
const $$css$31 = {
|
4411
4532
|
hash: "svelte-1kl9m59",
|
4412
4533
|
code: ".icon.svelte-1kl9m59 {display:flex;align-items:center;overflow:hidden;width:auto;cursor:pointer;text-decoration:none;border:0;background:none;padding:0;margin:0;text-align:left;-webkit-appearance:none;}"
|
4413
4534
|
};
|
4414
4535
|
function Icon($$anchor, $$props) {
|
4415
4536
|
$.push($$props, false);
|
4416
|
-
$.append_styles($$anchor, $$css$
|
4537
|
+
$.append_styles($$anchor, $$css$31);
|
4417
4538
|
const style = $.mutable_state();
|
4418
4539
|
const IconComponent = $.mutable_state();
|
4419
4540
|
let props = $.prop($$props, "props", 24, () => ({}));
|
4420
4541
|
let layerId = $.prop($$props, "layerId", 8, "");
|
4421
|
-
useInjectCustomizeCss(props());
|
4542
|
+
useInjectCustomizeCss(props(), layerId());
|
4422
4543
|
const { attributes, element, handleClick } = useClickable_default(props());
|
4423
4544
|
const getSizeCss = () => {
|
4424
4545
|
return {
|
@@ -4635,18 +4756,18 @@ function darkenColor(color, percent) {
|
|
4635
4756
|
//#region src/components-flex/button/Button.svelte
|
4636
4757
|
var root_2$8 = $.template(`<div class="button-icon svelte-l0rauj"><!></div>`);
|
4637
4758
|
var root_1$13 = $.template(`<!> <span class="button-label"> </span>`, 1);
|
4638
|
-
const $$css$
|
4759
|
+
const $$css$30 = {
|
4639
4760
|
hash: "svelte-l0rauj",
|
4640
4761
|
code: ".button.svelte-l0rauj {display:inline-flex;gap:0.8em;align-items:center;justify-content:center;text-decoration:none;outline:0;border-width:1px;border-style:solid;line-height:1.5;transition:background-color 0.12s,\n border-color 0.12s,\n color 0.12s;cursor:pointer;color:var(--color);border-color:var(--border-color);background-color:var(--bg-color);}.button.svelte-l0rauj:hover {background-color:var(--hover-bg-color);border-color:var(--hover-border-color);}.button-icon.svelte-l0rauj {display:flex;align-items:center;justify-content:center;margin-left:-0.2em;margin-right:-0.2em;}"
|
4641
4762
|
};
|
4642
4763
|
function Button($$anchor, $$props) {
|
4643
4764
|
$.push($$props, false);
|
4644
|
-
$.append_styles($$anchor, $$css$
|
4765
|
+
$.append_styles($$anchor, $$css$30);
|
4645
4766
|
const variables$1 = $.mutable_state();
|
4646
4767
|
const style = $.mutable_state();
|
4647
4768
|
let props = $.prop($$props, "props", 24, () => ({}));
|
4648
4769
|
let layerId = $.prop($$props, "layerId", 8, "");
|
4649
|
-
useInjectCustomizeCss(props());
|
4770
|
+
useInjectCustomizeCss(props(), layerId());
|
4650
4771
|
const { attributes, element, handleClick } = useClickable_default(props());
|
4651
4772
|
const { brandKit } = useBrandKit();
|
4652
4773
|
const buttonThemeStyles = getButtonThemeStyles(brandKit);
|
@@ -4726,26 +4847,24 @@ function Button($$anchor, $$props) {
|
|
4726
4847
|
$.event("click", $$element, handleClick);
|
4727
4848
|
var fragment_1 = root_1$13();
|
4728
4849
|
var node_1 = $.first_child(fragment_1);
|
4729
|
-
{
|
4730
|
-
var
|
4731
|
-
|
4732
|
-
|
4733
|
-
|
4734
|
-
|
4735
|
-
|
4736
|
-
|
4737
|
-
|
4738
|
-
|
4739
|
-
|
4740
|
-
|
4741
|
-
|
4742
|
-
|
4743
|
-
|
4744
|
-
|
4745
|
-
|
4746
|
-
|
4747
|
-
});
|
4748
|
-
}
|
4850
|
+
var consequent = ($$anchor$2) => {
|
4851
|
+
var div = root_2$8();
|
4852
|
+
var node_2 = $.child(div);
|
4853
|
+
const expression = $.derived_safe_equal(() => ({
|
4854
|
+
variant: props().iconVariant,
|
4855
|
+
color: props().iconColor ?? props().color ?? buttonThemeStyle.color,
|
4856
|
+
width: "1em",
|
4857
|
+
height: "1em"
|
4858
|
+
}));
|
4859
|
+
Icon(node_2, { get props() {
|
4860
|
+
return $.get(expression);
|
4861
|
+
} });
|
4862
|
+
$.reset(div);
|
4863
|
+
$.append($$anchor$2, div);
|
4864
|
+
};
|
4865
|
+
$.if(node_1, ($$render) => {
|
4866
|
+
if (props().isIcon && props().iconVariant) $$render(consequent);
|
4867
|
+
});
|
4749
4868
|
var span = $.sibling(node_1, 2);
|
4750
4869
|
var text = $.child(span, true);
|
4751
4870
|
$.reset(span);
|
@@ -4853,18 +4972,18 @@ const BUTTON_OUTLINED_WRAP_STYLES = {
|
|
4853
4972
|
//#region src/components-flex/button-outlined/ButtonOutlined.svelte
|
4854
4973
|
var root_2$7 = $.template(`<div class="button-outlined-icon svelte-z8gomx"><!></div>`);
|
4855
4974
|
var root_1$12 = $.template(`<!> <span class="button-outlined-label svelte-z8gomx"> </span>`, 1);
|
4856
|
-
const $$css$
|
4975
|
+
const $$css$29 = {
|
4857
4976
|
hash: "svelte-z8gomx",
|
4858
4977
|
code: ".button-outlined.svelte-z8gomx {display:inline-flex;gap:0.65em;align-items:center;justify-content:center;text-decoration:none;outline:0;border-width:1px;border-style:solid;line-height:1.5;transition:background-color 0.12s,\n border-color 0.12s,\n color 0.12s;cursor:pointer;background-color:var(--bg-color);}.button-outlined.svelte-z8gomx:hover {background-color:var(--hover-bg-color);}.button-outlined-icon.svelte-z8gomx {display:flex;align-items:center;justify-content:center;margin-left:-0.2em;margin-right:-0.2em;margin-bottom:0.1em;}"
|
4859
4978
|
};
|
4860
4979
|
function ButtonOutlined($$anchor, $$props) {
|
4861
4980
|
$.push($$props, false);
|
4862
|
-
$.append_styles($$anchor, $$css$
|
4981
|
+
$.append_styles($$anchor, $$css$29);
|
4863
4982
|
const variables$1 = $.mutable_state();
|
4864
4983
|
const style = $.mutable_state();
|
4865
4984
|
let props = $.prop($$props, "props", 24, () => ({}));
|
4866
4985
|
let layerId = $.prop($$props, "layerId", 8, "");
|
4867
|
-
useInjectCustomizeCss(props());
|
4986
|
+
useInjectCustomizeCss(props(), layerId());
|
4868
4987
|
const { brandKit } = useBrandKit();
|
4869
4988
|
const { attributes, element, handleClick } = useClickable_default(props());
|
4870
4989
|
const buttonThemeStyles = getButtonOutlinedThemeStyles(brandKit);
|
@@ -4910,26 +5029,24 @@ function ButtonOutlined($$anchor, $$props) {
|
|
4910
5029
|
$.event("click", $$element, handleClick);
|
4911
5030
|
var fragment_1 = root_1$12();
|
4912
5031
|
var node_1 = $.first_child(fragment_1);
|
4913
|
-
{
|
4914
|
-
var
|
4915
|
-
|
4916
|
-
|
4917
|
-
|
4918
|
-
|
4919
|
-
|
4920
|
-
|
4921
|
-
|
4922
|
-
|
4923
|
-
|
4924
|
-
|
4925
|
-
|
4926
|
-
|
4927
|
-
|
4928
|
-
|
4929
|
-
|
4930
|
-
|
4931
|
-
});
|
4932
|
-
}
|
5032
|
+
var consequent = ($$anchor$2) => {
|
5033
|
+
var div = root_2$7();
|
5034
|
+
var node_2 = $.child(div);
|
5035
|
+
const expression = $.derived_safe_equal(() => ({
|
5036
|
+
variant: props().iconVariant,
|
5037
|
+
color: props().iconColor ?? props().color ?? buttonThemeStyle.color,
|
5038
|
+
width: "1em",
|
5039
|
+
height: "1em"
|
5040
|
+
}));
|
5041
|
+
Icon(node_2, { get props() {
|
5042
|
+
return $.get(expression);
|
5043
|
+
} });
|
5044
|
+
$.reset(div);
|
5045
|
+
$.append($$anchor$2, div);
|
5046
|
+
};
|
5047
|
+
$.if(node_1, ($$render) => {
|
5048
|
+
if (props().isIcon && props().iconVariant) $$render(consequent);
|
5049
|
+
});
|
4933
5050
|
var span = $.sibling(node_1, 2);
|
4934
5051
|
var text = $.child(span, true);
|
4935
5052
|
$.reset(span);
|
@@ -5002,18 +5119,18 @@ const getButtonTextThemeStyles = getPropStyles(callback$2);
|
|
5002
5119
|
//#region src/components-flex/button-text/ButtonText.svelte
|
5003
5120
|
var root_2$6 = $.template(`<div class="button-text-icon svelte-l90o4j"><!></div>`);
|
5004
5121
|
var root_1$11 = $.template(`<!> <span class="button-text-label svelte-l90o4j"> </span>`, 1);
|
5005
|
-
const $$css$
|
5122
|
+
const $$css$28 = {
|
5006
5123
|
hash: "svelte-l90o4j",
|
5007
5124
|
code: ".button-text.svelte-l90o4j {display:inline-flex;gap:0.65em;align-items:center;justify-content:center;text-decoration:none;outline:0;border:0;line-height:1.5;transition:background-color 0.12s,\n border-color 0.12s,\n color 0.12s;cursor:pointer;background-color:rgba(255, 255, 255, 0);}.button-text.svelte-l90o4j:hover {background-color:var(--hover-bg-color);}.button-text-icon.svelte-l90o4j {display:flex;align-items:center;justify-content:center;margin-left:-0.2em;margin-right:-0.2em;}"
|
5008
5125
|
};
|
5009
5126
|
function ButtonText($$anchor, $$props) {
|
5010
5127
|
$.push($$props, false);
|
5011
|
-
$.append_styles($$anchor, $$css$
|
5128
|
+
$.append_styles($$anchor, $$css$28);
|
5012
5129
|
const variables$1 = $.mutable_state();
|
5013
5130
|
const style = $.mutable_state();
|
5014
5131
|
let props = $.prop($$props, "props", 24, () => ({}));
|
5015
5132
|
let layerId = $.prop($$props, "layerId", 8, "");
|
5016
|
-
useInjectCustomizeCss(props());
|
5133
|
+
useInjectCustomizeCss(props(), layerId());
|
5017
5134
|
const { brandKit } = useBrandKit();
|
5018
5135
|
const { attributes, element, handleClick } = useClickable_default(props());
|
5019
5136
|
const themeStyles = getButtonTextThemeStyles(brandKit);
|
@@ -5053,26 +5170,24 @@ function ButtonText($$anchor, $$props) {
|
|
5053
5170
|
$.event("click", $$element, handleClick);
|
5054
5171
|
var fragment_1 = root_1$11();
|
5055
5172
|
var node_1 = $.first_child(fragment_1);
|
5056
|
-
{
|
5057
|
-
var
|
5058
|
-
|
5059
|
-
|
5060
|
-
|
5061
|
-
|
5062
|
-
|
5063
|
-
|
5064
|
-
|
5065
|
-
|
5066
|
-
|
5067
|
-
|
5068
|
-
|
5069
|
-
|
5070
|
-
|
5071
|
-
|
5072
|
-
|
5073
|
-
|
5074
|
-
});
|
5075
|
-
}
|
5173
|
+
var consequent = ($$anchor$2) => {
|
5174
|
+
var div = root_2$6();
|
5175
|
+
var node_2 = $.child(div);
|
5176
|
+
const expression = $.derived_safe_equal(() => ({
|
5177
|
+
variant: props().iconVariant,
|
5178
|
+
color: props().color ?? buttonThemeStyle.color,
|
5179
|
+
width: "1em",
|
5180
|
+
height: "1em"
|
5181
|
+
}));
|
5182
|
+
Icon(node_2, { get props() {
|
5183
|
+
return $.get(expression);
|
5184
|
+
} });
|
5185
|
+
$.reset(div);
|
5186
|
+
$.append($$anchor$2, div);
|
5187
|
+
};
|
5188
|
+
$.if(node_1, ($$render) => {
|
5189
|
+
if (props().isIcon && props().iconVariant) $$render(consequent);
|
5190
|
+
});
|
5076
5191
|
var span = $.sibling(node_1, 2);
|
5077
5192
|
var text = $.child(span, true);
|
5078
5193
|
$.reset(span);
|
@@ -5119,13 +5234,13 @@ const getTextThemeStyles = getPropStyles(callback$1);
|
|
5119
5234
|
//#region src/components-flex/close-button/CloseButton.svelte
|
5120
5235
|
var root_2$5 = $.template(`<span></span>`);
|
5121
5236
|
var root_1$10 = $.template(`<span><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512" style="width: 100%; height: 100%;" class="svelte-18wmfyq"><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"></path></svg></span> <!>`, 1);
|
5122
|
-
const $$css$
|
5237
|
+
const $$css$27 = {
|
5123
5238
|
hash: "svelte-18wmfyq",
|
5124
5239
|
code: ".close-button.svelte-18wmfyq {display:inline-flex;align-items:center;justify-content:center;align-self:center;gap:8px;border-radius:100%;background:none;cursor:pointer;border:0;outline:0;flex-shrink:0;transition:background-color 0.12s,\n border-color 0.12s,\n color 0.12s;}.close-button.svelte-18wmfyq svg:where(.svelte-18wmfyq) {transition:transform 0.12s;}.close-button.svelte-18wmfyq:hover svg:where(.svelte-18wmfyq) {transform:rotate(90deg);}.close-button-order-one.svelte-18wmfyq {order:1;}.close-button-order-two.svelte-18wmfyq {order:2;}"
|
5125
5240
|
};
|
5126
5241
|
function CloseButton($$anchor, $$props) {
|
5127
5242
|
$.push($$props, false);
|
5128
|
-
$.append_styles($$anchor, $$css$
|
5243
|
+
$.append_styles($$anchor, $$css$27);
|
5129
5244
|
const hasLabel = $.mutable_state();
|
5130
5245
|
const styleObj = $.mutable_state();
|
5131
5246
|
const style = $.mutable_state();
|
@@ -5138,7 +5253,7 @@ function CloseButton($$anchor, $$props) {
|
|
5138
5253
|
let eventName = $.prop($$props, "eventName", 8, "");
|
5139
5254
|
let eventValue = $.prop($$props, "eventValue", 8, void 0);
|
5140
5255
|
const { brandKit } = useBrandKit();
|
5141
|
-
useInjectCustomizeCss(props());
|
5256
|
+
useInjectCustomizeCss(props(), layerId());
|
5142
5257
|
const { attributes, element, handleClick } = useClickable_default(props().onClick ? props() : {
|
5143
5258
|
onClick: {
|
5144
5259
|
operation: "closeApp",
|
@@ -5243,18 +5358,16 @@ function CloseButton($$anchor, $$props) {
|
|
5243
5358
|
$.set_attribute(svg, "fill", color);
|
5244
5359
|
$.reset(span);
|
5245
5360
|
var node_1 = $.sibling(span, 2);
|
5246
|
-
{
|
5247
|
-
var
|
5248
|
-
|
5249
|
-
|
5250
|
-
|
5251
|
-
|
5252
|
-
|
5253
|
-
|
5254
|
-
|
5255
|
-
|
5256
|
-
});
|
5257
|
-
}
|
5361
|
+
var consequent = ($$anchor$2) => {
|
5362
|
+
var span_1 = root_2$5();
|
5363
|
+
$.set_class(span_1, 1, `close-button-label ${isLeftLabelPlacement ? "close-button-order-one" : ""}`, "svelte-18wmfyq");
|
5364
|
+
span_1.textContent = label;
|
5365
|
+
$.template_effect(() => $.set_style(span_1, $.get(labelStyle)));
|
5366
|
+
$.append($$anchor$2, span_1);
|
5367
|
+
};
|
5368
|
+
$.if(node_1, ($$render) => {
|
5369
|
+
if ($.get(hasLabel)) $$render(consequent);
|
5370
|
+
});
|
5258
5371
|
$.template_effect(() => $.set_style(span, $.get(iconStyle)));
|
5259
5372
|
$.append($$anchor$1, fragment_1);
|
5260
5373
|
});
|
@@ -5339,19 +5452,19 @@ const IMAGE_ROUND_STYLES = {
|
|
5339
5452
|
//#endregion
|
5340
5453
|
//#region src/components-flex/image/Image.svelte
|
5341
5454
|
var root_1$9 = $.template(`<img class="image-img svelte-1olvu11">`);
|
5342
|
-
const $$css$
|
5455
|
+
const $$css$26 = {
|
5343
5456
|
hash: "svelte-1olvu11",
|
5344
5457
|
code: ".image.svelte-1olvu11 {max-width:100%;overflow:hidden;display:flex;align-items:center;justify-content:center;border:0;background:none;padding:0;margin:0;text-align:left;-webkit-appearance:none;}.image-img.svelte-1olvu11 {vertical-align:top;width:100%;height:100%;object-fit:cover;user-select:none;-webkit-user-drag:none;}"
|
5345
5458
|
};
|
5346
5459
|
function Image($$anchor, $$props) {
|
5347
5460
|
$.push($$props, false);
|
5348
|
-
$.append_styles($$anchor, $$css$
|
5461
|
+
$.append_styles($$anchor, $$css$26);
|
5349
5462
|
const styleObj = $.mutable_state();
|
5350
5463
|
const style = $.mutable_state();
|
5351
5464
|
const imgStyle = $.mutable_state();
|
5352
5465
|
let props = $.prop($$props, "props", 24, () => ({}));
|
5353
5466
|
let layerId = $.prop($$props, "layerId", 8, "");
|
5354
|
-
useInjectCustomizeCss(props());
|
5467
|
+
useInjectCustomizeCss(props(), layerId());
|
5355
5468
|
const { attributes, element, handleClick } = useClickable_default(props());
|
5356
5469
|
const aspectVariantStyles = ASPECT_VARIANT[props().aspectVariant]?.getProps();
|
5357
5470
|
const width = props().width ?? "100%";
|
@@ -5432,18 +5545,18 @@ const IMAGE_ASPECT_VARIANTS = {
|
|
5432
5545
|
|
5433
5546
|
//#endregion
|
5434
5547
|
//#region src/components-flex/layout/Layout.svelte
|
5435
|
-
const $$css$
|
5548
|
+
const $$css$25 = {
|
5436
5549
|
hash: "svelte-1o103hp",
|
5437
5550
|
code: ".layout.svelte-1o103hp {text-decoration:none;color:inherit;}.layout[data-clickable='true'].svelte-1o103hp {cursor:pointer;}.layout[data-clickable='true'].svelte-1o103hp:hover {opacity:0.8;}"
|
5438
5551
|
};
|
5439
5552
|
function Layout($$anchor, $$props) {
|
5440
5553
|
$.push($$props, false);
|
5441
|
-
$.append_styles($$anchor, $$css$
|
5554
|
+
$.append_styles($$anchor, $$css$25);
|
5442
5555
|
const style = $.mutable_state();
|
5443
5556
|
let props = $.prop($$props, "props", 24, () => ({}));
|
5444
5557
|
let layerId = $.prop($$props, "layerId", 8, "");
|
5445
5558
|
const { brandKit } = useBrandKit();
|
5446
|
-
useInjectCustomizeCss(props());
|
5559
|
+
useInjectCustomizeCss(props(), layerId());
|
5447
5560
|
const { attributes, element, handleClick } = useClickable_default(props());
|
5448
5561
|
$.legacy_pre_effect(() => ($.deep_read_state(props()), toCssBorder), () => {
|
5449
5562
|
$.set(style, objToStyle({
|
@@ -5518,13 +5631,13 @@ const LAYOUT_JUSTIFY = [
|
|
5518
5631
|
//#region src/components-flex/slider/Slider.svelte
|
5519
5632
|
var root_1$8 = $.template(`<button><i></i></button>`);
|
5520
5633
|
var root$16 = $.template(`<div><div class="slider-container svelte-wwv1o"><ul class="slider-list svelte-wwv1o"><!></ul></div> <div></div></div>`);
|
5521
|
-
const $$css$
|
5634
|
+
const $$css$24 = {
|
5522
5635
|
hash: "svelte-wwv1o",
|
5523
5636
|
code: ".slider.svelte-wwv1o {width:100%;overflow:hidden;overscroll-behavior:contain;touch-action:pan-y;}.slider-container.svelte-wwv1o {width:100%;overflow:hidden;overscroll-behavior:contain;touch-action:pan-y;}.slider-list.svelte-wwv1o {-webkit-user-drag:none;margin:0;padding:0;list-style:none;will-change:transform;}"
|
5524
5637
|
};
|
5525
5638
|
function Slider($$anchor, $$props) {
|
5526
5639
|
$.push($$props, false);
|
5527
|
-
$.append_styles($$anchor, $$css$
|
5640
|
+
$.append_styles($$anchor, $$css$24);
|
5528
5641
|
const indicators = $.mutable_state();
|
5529
5642
|
const itemWidthPercentage = $.mutable_state();
|
5530
5643
|
const baseContainerStyle = $.mutable_state();
|
@@ -5534,7 +5647,7 @@ function Slider($$anchor, $$props) {
|
|
5534
5647
|
let layerId = $.prop($$props, "layerId", 8);
|
5535
5648
|
let props = $.prop($$props, "props", 8);
|
5536
5649
|
let overrideStyle = $.prop($$props, "overrideStyle", 8);
|
5537
|
-
useInjectCustomizeCss(props());
|
5650
|
+
useInjectCustomizeCss(props(), layerId());
|
5538
5651
|
let containerElement = $.mutable_state();
|
5539
5652
|
let slotElement = $.mutable_state();
|
5540
5653
|
let currentIndex = $.mutable_state(0);
|
@@ -5733,16 +5846,16 @@ function Slider($$anchor, $$props) {
|
|
5733
5846
|
//#endregion
|
5734
5847
|
//#region src/components-flex/slider/SliderItem.svelte
|
5735
5848
|
var root$15 = $.template(`<li><!></li>`);
|
5736
|
-
const $$css$
|
5849
|
+
const $$css$23 = {
|
5737
5850
|
hash: "svelte-1m93md9",
|
5738
5851
|
code: ".slider-item.svelte-1m93md9 {overflow:hidden;}.slider-item-inner.svelte-1m93md9 {text-decoration:none;border:0;background:none;padding:0;margin:0;text-align:left;-webkit-appearance:none;text-align:left;color:inherit;-webkit-user-drag:none;user-select:none;}"
|
5739
5852
|
};
|
5740
5853
|
function SliderItem($$anchor, $$props) {
|
5741
5854
|
$.push($$props, false);
|
5742
|
-
$.append_styles($$anchor, $$css$
|
5855
|
+
$.append_styles($$anchor, $$css$23);
|
5743
5856
|
let layerId = $.prop($$props, "layerId", 8);
|
5744
5857
|
let props = $.prop($$props, "props", 8);
|
5745
|
-
useInjectCustomizeCss(props());
|
5858
|
+
useInjectCustomizeCss(props(), layerId());
|
5746
5859
|
const { attributes, element, handleClick } = useClickable_default(props());
|
5747
5860
|
$.init();
|
5748
5861
|
var li = root$15();
|
@@ -5812,18 +5925,18 @@ const TEXT_VARIANTS = { size: {
|
|
5812
5925
|
//#endregion
|
5813
5926
|
//#region src/components-flex/text/Text.svelte
|
5814
5927
|
var root$14 = $.template(`<p><!></p>`);
|
5815
|
-
const $$css$
|
5928
|
+
const $$css$22 = {
|
5816
5929
|
hash: "svelte-vifn7y",
|
5817
5930
|
code: ".text.svelte-vifn7y {margin:0;word-break:break-all;text-decoration:none;}"
|
5818
5931
|
};
|
5819
5932
|
function Text($$anchor, $$props) {
|
5820
5933
|
$.push($$props, false);
|
5821
|
-
$.append_styles($$anchor, $$css$
|
5934
|
+
$.append_styles($$anchor, $$css$22);
|
5822
5935
|
const escapedHTML = $.mutable_state();
|
5823
5936
|
const style = $.mutable_state();
|
5824
5937
|
let props = $.prop($$props, "props", 24, () => ({ content: "" }));
|
5825
5938
|
let layerId = $.prop($$props, "layerId", 8, "");
|
5826
|
-
useInjectCustomizeCss(props());
|
5939
|
+
useInjectCustomizeCss(props(), layerId());
|
5827
5940
|
const { brandKit } = useBrandKit();
|
5828
5941
|
const themeStyles = getTextThemeStyles(brandKit);
|
5829
5942
|
const fontFamilyStyles = props().fontFamilyVariant in FONT_FAMILY_VARIANT ? FONT_FAMILY_VARIANT[props().fontFamilyVariant].getProps(brandKit) : FONT_FAMILY_VARIANT.default.getProps(brandKit);
|
@@ -5910,17 +6023,17 @@ function Text($$anchor, $$props) {
|
|
5910
6023
|
//#endregion
|
5911
6024
|
//#region src/components-flex/rich-text/RichText.svelte
|
5912
6025
|
var root$13 = $.template(`<div><!></div>`);
|
5913
|
-
const $$css$
|
6026
|
+
const $$css$21 = {
|
5914
6027
|
hash: "svelte-dxr423",
|
5915
6028
|
code: ".rich-text.svelte-dxr423 p {margin:0;word-break:break-all;text-decoration:none;}.rich-text.svelte-dxr423 p + p {margin-top:0.75em;}"
|
5916
6029
|
};
|
5917
6030
|
function RichText($$anchor, $$props) {
|
5918
6031
|
$.push($$props, false);
|
5919
|
-
$.append_styles($$anchor, $$css$
|
6032
|
+
$.append_styles($$anchor, $$css$21);
|
5920
6033
|
const style = $.mutable_state();
|
5921
6034
|
let props = $.prop($$props, "props", 24, () => ({ content: "" }));
|
5922
6035
|
let layerId = $.prop($$props, "layerId", 8, "");
|
5923
|
-
useInjectCustomizeCss(props());
|
6036
|
+
useInjectCustomizeCss(props(), layerId());
|
5924
6037
|
const { brandKit } = useBrandKit();
|
5925
6038
|
const themeStyles = getTextThemeStyles(brandKit);
|
5926
6039
|
const fontFamilyStyles = props().fontFamilyVariant in FONT_FAMILY_VARIANT ? FONT_FAMILY_VARIANT[props().fontFamilyVariant].getProps(brandKit) : FONT_FAMILY_VARIANT.default.getProps(brandKit);
|
@@ -6036,19 +6149,19 @@ const getTextLinkThemeStyles = getPropStyles(callback);
|
|
6036
6149
|
//#endregion
|
6037
6150
|
//#region src/components-flex/text-link/TextLink.svelte
|
6038
6151
|
var root_1$7 = $.template(`<!> <span><!></span>`, 1);
|
6039
|
-
const $$css$
|
6152
|
+
const $$css$20 = {
|
6040
6153
|
hash: "svelte-dc9m5n",
|
6041
6154
|
code: ".link.svelte-dc9m5n {-webkit-appearance:none;border:0;background:none;padding:0;display:inline-flex;}.link.svelte-dc9m5n,\n .link.svelte-dc9m5n:visited,\n .link.svelte-dc9m5n:link {color:var(--color);}.link.svelte-dc9m5n:hover {color:var(--hover-color);}.link.svelte-dc9m5n:active {color:var(--active-color);}.link.underline-hover-on.svelte-dc9m5n {text-decoration:none;}.link.underline-hover-on.svelte-dc9m5n:hover {text-decoration:underline;}.link.underline-hover-off.svelte-dc9m5n {text-decoration:underline;}.link.underline-hover-off.svelte-dc9m5n:hover {text-decoration:none;}.link.underline-on.svelte-dc9m5n {text-decoration:underline;}.link.underline-off.svelte-dc9m5n {text-decoration:none;}"
|
6042
6155
|
};
|
6043
6156
|
function TextLink($$anchor, $$props) {
|
6044
6157
|
$.push($$props, false);
|
6045
|
-
$.append_styles($$anchor, $$css$
|
6158
|
+
$.append_styles($$anchor, $$css$20);
|
6046
6159
|
const escapedHTML = $.mutable_state();
|
6047
6160
|
const variables$1 = $.mutable_state();
|
6048
6161
|
const style = $.mutable_state();
|
6049
6162
|
let props = $.prop($$props, "props", 24, () => ({ label: "" }));
|
6050
6163
|
let layerId = $.prop($$props, "layerId", 8, "");
|
6051
|
-
useInjectCustomizeCss(props());
|
6164
|
+
useInjectCustomizeCss(props(), layerId());
|
6052
6165
|
const { brandKit } = useBrandKit();
|
6053
6166
|
const { attributes, element, handleClick } = useClickable_default({
|
6054
6167
|
...props(),
|
@@ -6111,22 +6224,20 @@ function TextLink($$anchor, $$props) {
|
|
6111
6224
|
$.event("click", $$element, handleClick);
|
6112
6225
|
var fragment_1 = root_1$7();
|
6113
6226
|
var node_1 = $.first_child(fragment_1);
|
6114
|
-
{
|
6115
|
-
|
6116
|
-
|
6117
|
-
|
6118
|
-
|
6119
|
-
|
6120
|
-
|
6121
|
-
|
6122
|
-
|
6123
|
-
|
6124
|
-
|
6125
|
-
|
6126
|
-
|
6127
|
-
|
6128
|
-
});
|
6129
|
-
}
|
6227
|
+
var consequent = ($$anchor$2) => {
|
6228
|
+
const expression = $.derived_safe_equal(() => ({
|
6229
|
+
variant: props().iconVariant,
|
6230
|
+
color: props().iconColor ?? props().color,
|
6231
|
+
width: "1em",
|
6232
|
+
height: "1em"
|
6233
|
+
}));
|
6234
|
+
Icon($$anchor$2, { get props() {
|
6235
|
+
return $.get(expression);
|
6236
|
+
} });
|
6237
|
+
};
|
6238
|
+
$.if(node_1, ($$render) => {
|
6239
|
+
if (props().isIcon && props().iconVariant) $$render(consequent);
|
6240
|
+
});
|
6130
6241
|
var span = $.sibling(node_1, 2);
|
6131
6242
|
var node_2 = $.child(span);
|
6132
6243
|
$.html(node_2, () => $.get(escapedHTML), false, false);
|
@@ -6162,30 +6273,28 @@ const TEXT_LINK_UNDERLINE = {
|
|
6162
6273
|
//#endregion
|
6163
6274
|
//#region src/components-flex/background-overlay/BackgroundOverlay.svelte
|
6164
6275
|
var root_1$6 = $.template(`<div></div>`);
|
6165
|
-
const $$css$
|
6276
|
+
const $$css$19 = {
|
6166
6277
|
hash: "svelte-18nkdjz",
|
6167
6278
|
code: ".v2-background.svelte-18nkdjz {position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.3);z-index:2147483646;}"
|
6168
6279
|
};
|
6169
6280
|
function BackgroundOverlay($$anchor, $$props) {
|
6170
6281
|
$.push($$props, false);
|
6171
|
-
$.append_styles($$anchor, $$css$
|
6282
|
+
$.append_styles($$anchor, $$css$19);
|
6172
6283
|
let backgroundOverlay = $.prop($$props, "backgroundOverlay", 8, false);
|
6173
6284
|
let className = $.prop($$props, "class", 8, void 0);
|
6174
6285
|
const dispatch = createEventDispatcher();
|
6175
6286
|
$.init();
|
6176
6287
|
var fragment = $.comment();
|
6177
6288
|
var node = $.first_child(fragment);
|
6178
|
-
{
|
6179
|
-
var
|
6180
|
-
|
6181
|
-
|
6182
|
-
|
6183
|
-
|
6184
|
-
|
6185
|
-
|
6186
|
-
|
6187
|
-
});
|
6188
|
-
}
|
6289
|
+
var consequent = ($$anchor$1) => {
|
6290
|
+
var div = root_1$6();
|
6291
|
+
$.template_effect(($0) => $.set_class(div, 1, $0, "svelte-18nkdjz"), [() => $.clsx(["v2-background", className() || ""].join(" "))], $.derived_safe_equal);
|
6292
|
+
$.event("click", div, () => dispatch("click"));
|
6293
|
+
$.append($$anchor$1, div);
|
6294
|
+
};
|
6295
|
+
$.if(node, ($$render) => {
|
6296
|
+
if (backgroundOverlay()) $$render(consequent);
|
6297
|
+
});
|
6189
6298
|
$.append($$anchor, fragment);
|
6190
6299
|
$.pop();
|
6191
6300
|
}
|
@@ -6195,13 +6304,13 @@ function BackgroundOverlay($$anchor, $$props) {
|
|
6195
6304
|
var root_2$4 = $.template(`<!> <!>`, 1);
|
6196
6305
|
var root_4 = $.template(`<div role="dialog" aria-modal="true"><!></div>`);
|
6197
6306
|
var root$12 = $.template(`<!> <!>`, 1);
|
6198
|
-
const $$css$
|
6307
|
+
const $$css$18 = {
|
6199
6308
|
hash: "svelte-45ue06",
|
6200
6309
|
code: "* {box-sizing:border-box;}.modal.svelte-45ue06 {position:fixed;z-index:2147483647;display:flex;}.modal.svelte-45ue06 > .button {flex:auto;display:flex;}\n /* PC */\n @media screen and (min-width: 641px) {.modal-bp.svelte-45ue06 {height:var(--modal-bp-height-pc) !important;width:var(--modal-bp-width-pc) !important;top:var(--modal-bp-top-pc) !important;left:var(--modal-bp-left-pc) !important;bottom:var(--modal-bp-bottom-pc) !important;right:var(--modal-bp-right-pc) !important;transform:var(--modal-bp-transform-pc);margin:var(--modal-bp-margin-pc) !important;}.background-bp-pc {display:block;}.background-bp-sp {display:none;}\n }\n\n /* SP */\n @media screen and (max-width: 640px) {.modal-bp.svelte-45ue06 {height:var(--modal-bp-height-sp) !important;width:var(--modal-bp-width-sp) !important;top:var(--modal-bp-top-sp) !important;left:var(--modal-bp-left-sp) !important;bottom:var(--modal-bp-bottom-sp) !important;right:var(--modal-bp-right-sp) !important;transform:var(--modal-bp-transform-sp);margin:var(--modal-bp-margin-sp) !important;}.background-bp-pc {display:none;}.background-bp-sp {display:block;}\n }"
|
6201
6310
|
};
|
6202
6311
|
function Modal($$anchor, $$props) {
|
6203
6312
|
$.push($$props, false);
|
6204
|
-
$.append_styles($$anchor, $$css$
|
6313
|
+
$.append_styles($$anchor, $$css$18);
|
6205
6314
|
const close$1 = $.mutable_state();
|
6206
6315
|
const backgroundClick = $.mutable_state();
|
6207
6316
|
const backgroundClickPC = $.mutable_state();
|
@@ -6211,7 +6320,7 @@ function Modal($$anchor, $$props) {
|
|
6211
6320
|
let useBreakPoint = $.prop($$props, "useBreakPoint", 8, false);
|
6212
6321
|
let placement = $.prop($$props, "placement", 8);
|
6213
6322
|
let breakPoint = $.prop($$props, "breakPoint", 8);
|
6214
|
-
|
6323
|
+
$.prop($$props, "elasticity", 8);
|
6215
6324
|
let animation = $.prop($$props, "animation", 8, "none");
|
6216
6325
|
let props = $.prop($$props, "props", 24, () => ({}));
|
6217
6326
|
let closeEventName = $.prop($$props, "closeEventName", 8, "");
|
@@ -6354,78 +6463,72 @@ function Modal($$anchor, $$props) {
|
|
6354
6463
|
$.get(handle_keydown)?.apply(this, $$args);
|
6355
6464
|
});
|
6356
6465
|
var node = $.first_child(fragment);
|
6357
|
-
{
|
6358
|
-
|
6359
|
-
var
|
6360
|
-
|
6361
|
-
|
6362
|
-
|
6363
|
-
|
6364
|
-
|
6365
|
-
|
6366
|
-
|
6367
|
-
|
6368
|
-
|
6369
|
-
|
6370
|
-
|
6371
|
-
|
6372
|
-
|
6373
|
-
|
6374
|
-
|
6375
|
-
|
6376
|
-
|
6377
|
-
|
6378
|
-
|
6379
|
-
|
6380
|
-
|
6381
|
-
|
6382
|
-
});
|
6383
|
-
$.append($$anchor$2, fragment_1);
|
6384
|
-
};
|
6385
|
-
var alternate_1 = ($$anchor$2) => {
|
6386
|
-
BackgroundOverlay($$anchor$2, {
|
6387
|
-
get backgroundOverlay() {
|
6388
|
-
return $.get(backgroundOverlay);
|
6389
|
-
},
|
6390
|
-
$$events: { click(...$$args) {
|
6391
|
-
$.get(backgroundClick)?.apply(this, $$args);
|
6392
|
-
} }
|
6393
|
-
});
|
6394
|
-
};
|
6395
|
-
$.if($$anchor$1, ($$render) => {
|
6396
|
-
if (useBreakPoint()) $$render(consequent_1);
|
6397
|
-
else $$render(alternate_1, false);
|
6398
|
-
}, $$elseif);
|
6399
|
-
}
|
6466
|
+
var consequent = ($$anchor$1) => {};
|
6467
|
+
var alternate = ($$anchor$1, $$elseif) => {
|
6468
|
+
var consequent_1 = ($$anchor$2) => {
|
6469
|
+
var fragment_1 = root_2$4();
|
6470
|
+
var node_1 = $.first_child(fragment_1);
|
6471
|
+
BackgroundOverlay(node_1, {
|
6472
|
+
class: "background-bp-pc",
|
6473
|
+
get backgroundOverlay() {
|
6474
|
+
return $.get(backgroundOverlayPC);
|
6475
|
+
},
|
6476
|
+
$$events: { click(...$$args) {
|
6477
|
+
$.get(backgroundClickPC)?.apply(this, $$args);
|
6478
|
+
} }
|
6479
|
+
});
|
6480
|
+
var node_2 = $.sibling(node_1, 2);
|
6481
|
+
BackgroundOverlay(node_2, {
|
6482
|
+
class: "background-bp-sp ",
|
6483
|
+
get backgroundOverlay() {
|
6484
|
+
return $.get(backgroundOverlaySP);
|
6485
|
+
},
|
6486
|
+
$$events: { click(...$$args) {
|
6487
|
+
$.get(backgroundClickSP)?.apply(this, $$args);
|
6488
|
+
} }
|
6489
|
+
});
|
6490
|
+
$.append($$anchor$2, fragment_1);
|
6400
6491
|
};
|
6401
|
-
|
6402
|
-
|
6403
|
-
|
6404
|
-
|
6405
|
-
|
6406
|
-
|
6407
|
-
|
6408
|
-
|
6409
|
-
|
6410
|
-
var node_4 = $.child(div);
|
6411
|
-
$.slot(node_4, $$props, "default", {}, null);
|
6412
|
-
$.reset(div);
|
6413
|
-
$.bind_this(div, ($$value) => $.set(modal, $$value), () => $.get(modal));
|
6414
|
-
$.template_effect(($0, $1) => {
|
6415
|
-
$.set_class(div, 1, $0, "svelte-45ue06");
|
6416
|
-
$.set_attribute(div, "data-layer-id", layerId());
|
6417
|
-
$.set_style(div, $1);
|
6418
|
-
}, [() => $.clsx(["modal", useBreakPoint() ? "modal-bp" : ""].join(" ")), () => Array.from(modalStyles).join(";")], $.derived_safe_equal);
|
6419
|
-
$.transition(1, div, () => customAnimation, () => ({
|
6420
|
-
transforms: $.get(transforms),
|
6421
|
-
animationStyle: animation()
|
6422
|
-
}));
|
6423
|
-
$.append($$anchor$1, div);
|
6492
|
+
var alternate_1 = ($$anchor$2) => {
|
6493
|
+
BackgroundOverlay($$anchor$2, {
|
6494
|
+
get backgroundOverlay() {
|
6495
|
+
return $.get(backgroundOverlay);
|
6496
|
+
},
|
6497
|
+
$$events: { click(...$$args) {
|
6498
|
+
$.get(backgroundClick)?.apply(this, $$args);
|
6499
|
+
} }
|
6500
|
+
});
|
6424
6501
|
};
|
6425
|
-
$.if(
|
6426
|
-
if (
|
6427
|
-
|
6428
|
-
|
6502
|
+
$.if($$anchor$1, ($$render) => {
|
6503
|
+
if (useBreakPoint()) $$render(consequent_1);
|
6504
|
+
else $$render(alternate_1, false);
|
6505
|
+
}, $$elseif);
|
6506
|
+
};
|
6507
|
+
$.if(node, ($$render) => {
|
6508
|
+
if (isCanvasPreview()) $$render(consequent);
|
6509
|
+
else $$render(alternate, false);
|
6510
|
+
});
|
6511
|
+
var node_3 = $.sibling(node, 2);
|
6512
|
+
var consequent_2 = ($$anchor$1) => {
|
6513
|
+
var div = root_4();
|
6514
|
+
var node_4 = $.child(div);
|
6515
|
+
$.slot(node_4, $$props, "default", {}, null);
|
6516
|
+
$.reset(div);
|
6517
|
+
$.bind_this(div, ($$value) => $.set(modal, $$value), () => $.get(modal));
|
6518
|
+
$.template_effect(($0, $1) => {
|
6519
|
+
$.set_class(div, 1, $0, "svelte-45ue06");
|
6520
|
+
$.set_attribute(div, "data-layer-id", layerId());
|
6521
|
+
$.set_style(div, $1);
|
6522
|
+
}, [() => $.clsx(["modal", useBreakPoint() ? "modal-bp" : ""].join(" ")), () => Array.from(modalStyles).join(";")], $.derived_safe_equal);
|
6523
|
+
$.transition(1, div, () => customAnimation, () => ({
|
6524
|
+
transforms: $.get(transforms),
|
6525
|
+
animationStyle: animation()
|
6526
|
+
}));
|
6527
|
+
$.append($$anchor$1, div);
|
6528
|
+
};
|
6529
|
+
$.if(node_3, ($$render) => {
|
6530
|
+
if ($.get(visible)) $$render(consequent_2);
|
6531
|
+
});
|
6429
6532
|
$.append($$anchor, fragment);
|
6430
6533
|
$.pop();
|
6431
6534
|
}
|
@@ -6433,13 +6536,13 @@ function Modal($$anchor, $$props) {
|
|
6433
6536
|
//#endregion
|
6434
6537
|
//#region src/components-flex/code/Code.svelte
|
6435
6538
|
var root$11 = $.template(`<div><!></div>`);
|
6436
|
-
const $$css$
|
6539
|
+
const $$css$17 = {
|
6437
6540
|
hash: "svelte-igivoz",
|
6438
6541
|
code: ".code.svelte-igivoz {flex-grow:1;flex-shrink:0;align-self:stretch;}\n /*{@html props.rawCss}*/"
|
6439
6542
|
};
|
6440
6543
|
function Code($$anchor, $$props) {
|
6441
6544
|
$.push($$props, false);
|
6442
|
-
$.append_styles($$anchor, $$css$
|
6545
|
+
$.append_styles($$anchor, $$css$17);
|
6443
6546
|
let props = $.prop($$props, "props", 24, () => ({}));
|
6444
6547
|
let layerId = $.prop($$props, "layerId", 8, "");
|
6445
6548
|
function unescapeBraces(str) {
|
@@ -6492,20 +6595,20 @@ const LIST_ITEM_CONTEXT_KEY = "ListItemContext";
|
|
6492
6595
|
//#endregion
|
6493
6596
|
//#region src/components-flex/list/ListItem.svelte
|
6494
6597
|
var root$10 = $.template(`<li><!></li>`);
|
6495
|
-
const $$css$
|
6598
|
+
const $$css$16 = {
|
6496
6599
|
hash: "svelte-b4b4gh",
|
6497
6600
|
code: ".list-item.svelte-b4b4gh {margin:0;padding:0;}.list-item-inner.svelte-b4b4gh {display:flex;align-items:center;width:100%;text-decoration:none;color:inherit;border:0;background:none;padding:0;margin:0;text-align:left;-webkit-appearance:none;}.list-item-inner.svelte-b4b4gh:hover {opacity:0.8;}.list-item.svelte-b4b4gh:not(:first-child) {border-top-width:var(--list-item-border-width);border-top-style:var(--list-item-border-style);border-top-color:var(--list-item-border-color);}"
|
6498
6601
|
};
|
6499
6602
|
function ListItem($$anchor, $$props) {
|
6500
6603
|
$.push($$props, false);
|
6501
|
-
$.append_styles($$anchor, $$css$
|
6604
|
+
$.append_styles($$anchor, $$css$16);
|
6502
6605
|
const variables$1 = $.mutable_state();
|
6503
6606
|
const style = $.mutable_state();
|
6504
6607
|
const innerStyle = $.mutable_state();
|
6505
6608
|
let layerId = $.prop($$props, "layerId", 8);
|
6506
6609
|
let props = $.prop($$props, "props", 8);
|
6507
|
-
|
6508
|
-
useInjectCustomizeCss(props());
|
6610
|
+
$.prop($$props, "item", 8);
|
6611
|
+
useInjectCustomizeCss(props(), layerId());
|
6509
6612
|
const { attributes, element, handleClick } = useClickable_default(props());
|
6510
6613
|
const context = getContext(LIST_ITEM_CONTEXT_KEY) || {};
|
6511
6614
|
$.legacy_pre_effect(() => {}, () => {
|
@@ -6558,13 +6661,13 @@ function ListItem($$anchor, $$props) {
|
|
6558
6661
|
//#endregion
|
6559
6662
|
//#region src/components-flex/list/List.svelte
|
6560
6663
|
var root$9 = $.template(`<ul><!></ul>`);
|
6561
|
-
const $$css$
|
6664
|
+
const $$css$15 = {
|
6562
6665
|
hash: "svelte-v2vy6p",
|
6563
6666
|
code: ".list.svelte-v2vy6p {padding:0;margin:0;list-style:none;display:flex;flex-direction:column;--border-width: 0;--border-style: solit;--border-color: rgba(255, 255, 255, 0);border-top-width:var(--border-width);border-top-style:var(--border-style);border-top-color:var(--border-color);border-bottom-width:var(--border-width);border-bottom-style:var(--border-style);border-bottom-color:var(--border-color);}"
|
6564
6667
|
};
|
6565
6668
|
function List($$anchor, $$props) {
|
6566
6669
|
$.push($$props, false);
|
6567
|
-
$.append_styles($$anchor, $$css$
|
6670
|
+
$.append_styles($$anchor, $$css$15);
|
6568
6671
|
const variables$1 = $.mutable_state();
|
6569
6672
|
const actionTableData = $.mutable_state();
|
6570
6673
|
const items = $.mutable_state();
|
@@ -6572,7 +6675,7 @@ function List($$anchor, $$props) {
|
|
6572
6675
|
let layerId = $.prop($$props, "layerId", 8);
|
6573
6676
|
let props = $.prop($$props, "props", 8);
|
6574
6677
|
const { brandKit } = useBrandKit();
|
6575
|
-
useInjectCustomizeCss(props());
|
6678
|
+
useInjectCustomizeCss(props(), layerId());
|
6576
6679
|
const vars = getVariables();
|
6577
6680
|
setContext(LIST_ITEM_CONTEXT_KEY, {
|
6578
6681
|
paddingTop: props().itemPaddingTop,
|
@@ -6646,18 +6749,18 @@ function splitNumberAndUnit(value) {
|
|
6646
6749
|
//#endregion
|
6647
6750
|
//#region src/components-flex/multi-column/MultiColumn.svelte
|
6648
6751
|
var root$8 = $.template(`<ul><!></ul>`);
|
6649
|
-
const $$css$
|
6752
|
+
const $$css$14 = {
|
6650
6753
|
hash: "svelte-9pwfkr",
|
6651
6754
|
code: ".multi-column.svelte-9pwfkr {padding:0;margin:0;list-style:none;display:flex;flex-direction:row;}"
|
6652
6755
|
};
|
6653
6756
|
function MultiColumn($$anchor, $$props) {
|
6654
6757
|
$.push($$props, false);
|
6655
|
-
$.append_styles($$anchor, $$css$
|
6758
|
+
$.append_styles($$anchor, $$css$14);
|
6656
6759
|
const style = $.mutable_state();
|
6657
6760
|
let layerId = $.prop($$props, "layerId", 8);
|
6658
6761
|
let props = $.prop($$props, "props", 8);
|
6659
6762
|
const { brandKit } = useBrandKit();
|
6660
|
-
useInjectCustomizeCss(props());
|
6763
|
+
useInjectCustomizeCss(props(), layerId());
|
6661
6764
|
let listGap = (() => {
|
6662
6765
|
if (!props().gap) return "0";
|
6663
6766
|
const { number, unit } = splitNumberAndUnit(props().gap);
|
@@ -6705,18 +6808,18 @@ function MultiColumn($$anchor, $$props) {
|
|
6705
6808
|
//#endregion
|
6706
6809
|
//#region src/components-flex/multi-column/MultiColumnItem.svelte
|
6707
6810
|
var root$7 = $.template(`<li><!></li>`);
|
6708
|
-
const $$css$
|
6811
|
+
const $$css$13 = {
|
6709
6812
|
hash: "svelte-18bwzrs",
|
6710
6813
|
code: ".multi-column-item.svelte-18bwzrs {margin:0;width:100%;padding-top:0;padding-bottom:0;padding-left:var(--multi-column-item-padding);padding-right:var(--multi-column-item-padding);}.multi-column-item-inner.svelte-18bwzrs {display:flex;flex-direction:column;align-items:center;gap:var(--multi-column-item-gap);width:100%;text-decoration:none;border:0;background:none;margin:0;text-align:left;-webkit-appearance:none;padding-top:var(--multi-column-item-padding-top);padding-left:var(--multi-column-item-padding-left);padding-right:var(--multi-column-item-padding-right);padding-bottom:var(--multi-column-item-padding-bottom);}.multi-column-item-inner.svelte-18bwzrs:hover {opacity:0.8;}.multi-column-item.svelte-18bwzrs:not(:first-child) {border-left-width:var(--multi-column-item-border-width);border-left-style:var(--multi-column-item-border-style);border-left-color:var(--multi-column-item-border-color);}"
|
6711
6814
|
};
|
6712
6815
|
function MultiColumnItem($$anchor, $$props) {
|
6713
6816
|
$.push($$props, false);
|
6714
|
-
$.append_styles($$anchor, $$css$
|
6817
|
+
$.append_styles($$anchor, $$css$13);
|
6715
6818
|
const variables$1 = $.mutable_state();
|
6716
6819
|
const style = $.mutable_state();
|
6717
6820
|
let layerId = $.prop($$props, "layerId", 8);
|
6718
6821
|
let props = $.prop($$props, "props", 8);
|
6719
|
-
useInjectCustomizeCss(props());
|
6822
|
+
useInjectCustomizeCss(props(), layerId());
|
6720
6823
|
const { attributes, element, handleClick } = useClickable_default(props());
|
6721
6824
|
const context = getContext(MULTI_COLUMN_ITEM_CONTEXT_KEY) || {};
|
6722
6825
|
$.legacy_pre_effect(() => {}, () => {
|
@@ -6767,17 +6870,17 @@ function MultiColumnItem($$anchor, $$props) {
|
|
6767
6870
|
//#endregion
|
6768
6871
|
//#region src/components-flex/youtube/Youtube.svelte
|
6769
6872
|
var root$6 = $.template(`<div><div class="youtube-player"></div></div>`);
|
6770
|
-
const $$css$
|
6873
|
+
const $$css$12 = {
|
6771
6874
|
hash: "svelte-odfkc2",
|
6772
6875
|
code: ".youtube.svelte-odfkc2 {position:relative;aspect-ratio:16 / 9;width:100%;border-radius:3px;}.youtube.svelte-odfkc2 iframe {position:absolute;width:100%;height:100%;object-fit:cover;}"
|
6773
6876
|
};
|
6774
6877
|
function Youtube($$anchor, $$props) {
|
6775
6878
|
$.push($$props, false);
|
6776
|
-
$.append_styles($$anchor, $$css$
|
6879
|
+
$.append_styles($$anchor, $$css$12);
|
6777
6880
|
const style = $.mutable_state();
|
6778
6881
|
let props = $.prop($$props, "props", 24, () => ({}));
|
6779
6882
|
let layerId = $.prop($$props, "layerId", 8, "");
|
6780
|
-
useInjectCustomizeCss(props());
|
6883
|
+
useInjectCustomizeCss(props(), layerId());
|
6781
6884
|
if (!window.YT) {
|
6782
6885
|
const tag = document.createElement("script");
|
6783
6886
|
tag.src = "https://www.youtube.com/iframe_api";
|
@@ -6870,20 +6973,20 @@ function Youtube($$anchor, $$props) {
|
|
6870
6973
|
//#endregion
|
6871
6974
|
//#region src/components-flex/count-down/CountDown.svelte
|
6872
6975
|
var root$5 = $.template(`<div><!></div>`);
|
6873
|
-
const $$css$
|
6976
|
+
const $$css$11 = {
|
6874
6977
|
hash: "svelte-1n395il",
|
6875
6978
|
code: ".countdown.svelte-1n395il {display:flex;align-items:center;gap:4px;}"
|
6876
6979
|
};
|
6877
6980
|
function CountDown($$anchor, $$props) {
|
6878
6981
|
$.push($$props, false);
|
6879
|
-
$.append_styles($$anchor, $$css$
|
6982
|
+
$.append_styles($$anchor, $$css$11);
|
6880
6983
|
const day = $.mutable_state();
|
6881
6984
|
const hour = $.mutable_state();
|
6882
6985
|
const min = $.mutable_state();
|
6883
6986
|
const sec = $.mutable_state();
|
6884
6987
|
let props = $.prop($$props, "props", 24, () => ({}));
|
6885
6988
|
let layerId = $.prop($$props, "layerId", 8, "");
|
6886
|
-
useInjectCustomizeCss(props());
|
6989
|
+
useInjectCustomizeCss(props(), layerId());
|
6887
6990
|
let remainingTime = $.mutable_state();
|
6888
6991
|
let timeLimit = props().timeLimit ? new Date(props().timeLimit) : /* @__PURE__ */ new Date();
|
6889
6992
|
function calcRemainingTime(limit) {
|
@@ -6960,8 +7063,8 @@ function CountDown($$anchor, $$props) {
|
|
6960
7063
|
|
6961
7064
|
//#endregion
|
6962
7065
|
//#region src/hooks/useText.ts
|
6963
|
-
const useText = (props) => {
|
6964
|
-
useInjectCustomizeCss(props);
|
7066
|
+
const useText = (props, layerId) => {
|
7067
|
+
useInjectCustomizeCss(props, layerId);
|
6965
7068
|
const { brandKit } = useBrandKit();
|
6966
7069
|
const themeStyles = getTextThemeStyles(brandKit);
|
6967
7070
|
const fontFamilyStyles = props.fontFamilyVariant in FONT_FAMILY_VARIANT ? FONT_FAMILY_VARIANT[props.fontFamilyVariant].getProps(brandKit) : FONT_FAMILY_VARIANT.default.getProps(brandKit);
|
@@ -7026,7 +7129,7 @@ function CountDownValue($$anchor, $$props) {
|
|
7026
7129
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7027
7130
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7028
7131
|
let countdownStore = getContext("countdownStore");
|
7029
|
-
let { style } = useText(props());
|
7132
|
+
let { style } = useText(props(), layerId());
|
7030
7133
|
$.legacy_pre_effect(() => ($countdownStore(), $.deep_read_state(props())), () => {
|
7031
7134
|
$.set(value, (() => {
|
7032
7135
|
const { day, hour, min, sec } = $countdownStore();
|
@@ -7059,16 +7162,16 @@ function CountDownValue($$anchor, $$props) {
|
|
7059
7162
|
//#endregion
|
7060
7163
|
//#region src/components-flex/clip-copy/ClipCopy.svelte
|
7061
7164
|
var root$3 = $.template(`<div><button class="clipboard-button svelte-orhp4c"><!></button> <span class="clipboard-tooltip svelte-orhp4c">コピーしました</span></div>`);
|
7062
|
-
const $$css$
|
7165
|
+
const $$css$10 = {
|
7063
7166
|
hash: "svelte-orhp4c",
|
7064
7167
|
code: ".clipboard.svelte-orhp4c {position:relative;display:inline-flex;}.clipboard-button.svelte-orhp4c {position:relative;display:inline-flex;align-items:center;white-space:nowrap;gap:12px;background:none;border:0;transition:0.12s;cursor:pointer;}.clipboard-button.svelte-orhp4c:hover {opacity:0.8;}.clipboard-button.svelte-orhp4c:active {opacity:0.6;}.clipboard-tooltip.svelte-orhp4c {position:absolute;top:-8px;left:50%;display:block;transform:translate(-50%, -100%);padding:4px 10px;background-color:#333333;color:#ffffff;font-size:11px;font-weight:bold;border-radius:4px;transition:transform 0.2s ease-out;white-space:nowrap;pointer-events:none;}.clipboard-tooltip.svelte-orhp4c:after {content:'';display:block;position:absolute;bottom:0;left:50%;width:8px;height:8px;background-color:#333333;border-radius:1px;transform:translate(-50%, 40%) rotate(45deg);}.clipboard-tooltip[aria-hidden='true'].svelte-orhp4c {opacity:0;transform:translate(-50%, -80%);}"
|
7065
7168
|
};
|
7066
7169
|
function ClipCopy($$anchor, $$props) {
|
7067
7170
|
$.push($$props, false);
|
7068
|
-
$.append_styles($$anchor, $$css$
|
7171
|
+
$.append_styles($$anchor, $$css$10);
|
7069
7172
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7070
7173
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7071
|
-
useInjectCustomizeCss(props());
|
7174
|
+
useInjectCustomizeCss(props(), layerId());
|
7072
7175
|
let buttonElement = $.mutable_state();
|
7073
7176
|
let showTooltip = $.mutable_state(false);
|
7074
7177
|
const handleClick = (e) => {
|
@@ -7105,19 +7208,19 @@ function ClipCopy($$anchor, $$props) {
|
|
7105
7208
|
//#endregion
|
7106
7209
|
//#region src/components-flex/embed/Embed.svelte
|
7107
7210
|
var root$2 = $.template(`<div><!></div>`);
|
7108
|
-
const $$css$
|
7211
|
+
const $$css$9 = {
|
7109
7212
|
hash: "svelte-13tkwh0",
|
7110
7213
|
code: ".embed.svelte-13tkwh0 {width:var(--width);height:var(--height);aspect-ratio:var(--aspect);}.embed.svelte-13tkwh0 iframe {vertical-align:bottom;max-width:100%;width:var(--width) !important;height:var(--height) !important;aspect-ratio:var(--aspect) !important;}"
|
7111
7214
|
};
|
7112
7215
|
function Embed($$anchor, $$props) {
|
7113
7216
|
$.push($$props, false);
|
7114
|
-
$.append_styles($$anchor, $$css$
|
7217
|
+
$.append_styles($$anchor, $$css$9);
|
7115
7218
|
const variables$1 = $.mutable_state();
|
7116
7219
|
const styleObj = $.mutable_state();
|
7117
7220
|
const style = $.mutable_state();
|
7118
7221
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7119
7222
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7120
|
-
useInjectCustomizeCss(props());
|
7223
|
+
useInjectCustomizeCss(props(), layerId());
|
7121
7224
|
const aspectVariantStyles = ASPECT_VARIANT[props().aspectVariant]?.getProps();
|
7122
7225
|
const width = props().width ?? "100%";
|
7123
7226
|
$.legacy_pre_effect(() => $.deep_read_state(props()), () => {
|
@@ -7155,16 +7258,16 @@ function Embed($$anchor, $$props) {
|
|
7155
7258
|
//#endregion
|
7156
7259
|
//#region src/components-flex/form/Form.svelte
|
7157
7260
|
var root$1 = $.template(`<div><!></div>`);
|
7158
|
-
const $$css$
|
7261
|
+
const $$css$8 = {
|
7159
7262
|
hash: "svelte-nekp9e",
|
7160
7263
|
code: ".form.svelte-nekp9e {width:100%;}"
|
7161
7264
|
};
|
7162
7265
|
function Form($$anchor, $$props) {
|
7163
7266
|
$.push($$props, false);
|
7164
|
-
$.append_styles($$anchor, $$css$
|
7267
|
+
$.append_styles($$anchor, $$css$8);
|
7165
7268
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7166
7269
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7167
|
-
useInjectCustomizeCss(props());
|
7270
|
+
useInjectCustomizeCss(props(), layerId());
|
7168
7271
|
$.init();
|
7169
7272
|
var div = root$1();
|
7170
7273
|
var node = $.child(div);
|
@@ -7200,18 +7303,18 @@ var root_2$3 = $.template(`<span class="field-required svelte-1maygd6">*</span
|
|
7200
7303
|
var root_1$5 = $.template(`<dt class="svelte-1maygd6"><span> </span> <!></dt>`);
|
7201
7304
|
var root_3 = $.template(`<p class="field-error svelte-1maygd6"> </p>`);
|
7202
7305
|
var root = $.template(`<dl><!> <dd class="svelte-1maygd6"><!> <!></dd></dl>`);
|
7203
|
-
const $$css$
|
7306
|
+
const $$css$7 = {
|
7204
7307
|
hash: "svelte-1maygd6",
|
7205
7308
|
code: ".field.svelte-1maygd6 {margin:0;padding:0;border:0;display:flex;width:100%;flex-direction:var(--form-field-direction);gap:var(--form-field-gap);}.field.svelte-1maygd6 > dt:where(.svelte-1maygd6) {position:relative;font-weight:bold;font-size:var(--form-field-label-font-size);width:var(--form-field-label-width);flex-shrink:0;color:var(--form-field-label-color);display:inline-flex;gap:0.4em;}.field-required.svelte-1maygd6 {flex-shrink:0;font-size:0.6em;color:var(--danger-color);}.field.svelte-1maygd6 > dd:where(.svelte-1maygd6) {position:relative;margin:0;flex-grow:1;}.field-error.svelte-1maygd6 {position:absolute;top:calc(100% + 8px);left:0;display:inline-flex;color:var(--danger-color);border:1px solid var(--danger-color);border-radius:4px;background-color:#fff;padding:6px 12px;font-size:12px;margin:0;z-index:10;}.field-error.svelte-1maygd6::after {content:'';display:block;position:absolute;top:0;left:8px;width:8px;height:8px;transform:rotate(45deg) translateY(-80%);border-top:1px solid var(--danger-color);border-left:1px solid var(--danger-color);border-radius:1px;background-color:#fff;}"
|
7206
7309
|
};
|
7207
7310
|
function FormField($$anchor, $$props) {
|
7208
7311
|
$.push($$props, false);
|
7209
|
-
$.append_styles($$anchor, $$css$
|
7312
|
+
$.append_styles($$anchor, $$css$7);
|
7210
7313
|
const variables$1 = $.mutable_state();
|
7211
7314
|
const style = $.mutable_state();
|
7212
7315
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7213
7316
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7214
|
-
useInjectCustomizeCss(props());
|
7317
|
+
useInjectCustomizeCss(props(), layerId());
|
7215
7318
|
const { brandKit } = useBrandKit();
|
7216
7319
|
let registeredFieldName = $.mutable_state("");
|
7217
7320
|
let errorMessage = $.mutable_state(null);
|
@@ -7242,7 +7345,9 @@ function FormField($$anchor, $$props) {
|
|
7242
7345
|
type: props().fieldType,
|
7243
7346
|
name: props().fieldName,
|
7244
7347
|
defaultValue: props().defaultValue,
|
7245
|
-
required: props().required
|
7348
|
+
required: props().required,
|
7349
|
+
validations: props().validations,
|
7350
|
+
isIdentify: props().isIdentify
|
7246
7351
|
});
|
7247
7352
|
formStore.subscribe(($store) => {
|
7248
7353
|
$.set(errorMessage, $store.states[props().fieldName]?.errorMessage ?? null);
|
@@ -7255,48 +7360,42 @@ function FormField($$anchor, $$props) {
|
|
7255
7360
|
$.init();
|
7256
7361
|
var dl = root();
|
7257
7362
|
var node = $.child(dl);
|
7258
|
-
{
|
7259
|
-
var
|
7260
|
-
|
7261
|
-
|
7262
|
-
|
7263
|
-
|
7264
|
-
|
7265
|
-
|
7266
|
-
|
7267
|
-
var span_1 = root_2$3();
|
7268
|
-
$.append($$anchor$2, span_1);
|
7269
|
-
};
|
7270
|
-
$.if(node_1, ($$render) => {
|
7271
|
-
if (props().required) $$render(consequent);
|
7272
|
-
});
|
7273
|
-
}
|
7274
|
-
$.reset(dt);
|
7275
|
-
$.template_effect(() => $.set_text(text, props().label));
|
7276
|
-
$.append($$anchor$1, dt);
|
7363
|
+
var consequent_1 = ($$anchor$1) => {
|
7364
|
+
var dt = root_1$5();
|
7365
|
+
var span = $.child(dt);
|
7366
|
+
var text = $.child(span, true);
|
7367
|
+
$.reset(span);
|
7368
|
+
var node_1 = $.sibling(span, 2);
|
7369
|
+
var consequent = ($$anchor$2) => {
|
7370
|
+
var span_1 = root_2$3();
|
7371
|
+
$.append($$anchor$2, span_1);
|
7277
7372
|
};
|
7278
|
-
$.if(
|
7279
|
-
if (props().
|
7373
|
+
$.if(node_1, ($$render) => {
|
7374
|
+
if (props().required) $$render(consequent);
|
7280
7375
|
});
|
7281
|
-
|
7376
|
+
$.reset(dt);
|
7377
|
+
$.template_effect(() => $.set_text(text, props().label));
|
7378
|
+
$.append($$anchor$1, dt);
|
7379
|
+
};
|
7380
|
+
$.if(node, ($$render) => {
|
7381
|
+
if (props().label) $$render(consequent_1);
|
7382
|
+
});
|
7282
7383
|
var dd = $.sibling(node, 2);
|
7283
7384
|
var node_2 = $.child(dd);
|
7284
7385
|
$.slot(node_2, $$props, "default", { get "data-layer-id"() {
|
7285
7386
|
return layerId();
|
7286
7387
|
} }, null);
|
7287
7388
|
var node_3 = $.sibling(node_2, 2);
|
7288
|
-
{
|
7289
|
-
var
|
7290
|
-
|
7291
|
-
|
7292
|
-
|
7293
|
-
|
7294
|
-
|
7295
|
-
|
7296
|
-
|
7297
|
-
|
7298
|
-
});
|
7299
|
-
}
|
7389
|
+
var consequent_2 = ($$anchor$1) => {
|
7390
|
+
var p = root_3();
|
7391
|
+
var text_1 = $.child(p, true);
|
7392
|
+
$.reset(p);
|
7393
|
+
$.template_effect(() => $.set_text(text_1, $.get(errorMessage)));
|
7394
|
+
$.append($$anchor$1, p);
|
7395
|
+
};
|
7396
|
+
$.if(node_3, ($$render) => {
|
7397
|
+
if ($.get(isShowErrorMessage) && $.get(errorMessage)) $$render(consequent_2);
|
7398
|
+
});
|
7300
7399
|
$.reset(dd);
|
7301
7400
|
$.reset(dl);
|
7302
7401
|
$.template_effect(($0) => {
|
@@ -7316,13 +7415,13 @@ function FormField($$anchor, $$props) {
|
|
7316
7415
|
//#endregion
|
7317
7416
|
//#region src/components-flex/form/FormInput.svelte
|
7318
7417
|
var root_1$4 = $.template(`<input type="text">`);
|
7319
|
-
const $$css$
|
7418
|
+
const $$css$6 = {
|
7320
7419
|
hash: "svelte-176cxs0",
|
7321
7420
|
code: ".form-input.svelte-176cxs0 {margin:0;width:var(--form-input-width);-webkit-appearance:none;color:var(--font-color);transition:all 0.2s;}.form-input.small.svelte-176cxs0 {font-size:12px;line-height:19px;padding:6px 10px 5px;border-radius:4px;}.form-input.medium.svelte-176cxs0 {font-size:14px;line-height:21px;padding:8px 12px 7px;border-radius:6px;}.form-input.large.svelte-176cxs0 {font-size:16px;line-height:25px;padding:11px 16px 10px;border-radius:8px;}.form-input.outlined.svelte-176cxs0 {border:1px solid var(--border-color);}.form-input.filled.svelte-176cxs0 {background-color:var(--background-color);border:1px solid var(--background-color);}.form-input.underlined.svelte-176cxs0 {border-radius:0;border-width:0 0 1px;border-style:solid;border-color:rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) var(--border-color);}.form-input.underlined.svelte-176cxs0:focus-visible {outline:0;border-bottom-color:1px solid var(--focused-outline-color);}.form-input.svelte-176cxs0:focus-visible {outline-color:var(--focused-outline-color);}.form-input.svelte-176cxs0::placeholder {color:var(--placeholder-color);}"
|
7322
7421
|
};
|
7323
7422
|
function FormInput($$anchor, $$props) {
|
7324
7423
|
$.push($$props, false);
|
7325
|
-
$.append_styles($$anchor, $$css$
|
7424
|
+
$.append_styles($$anchor, $$css$6);
|
7326
7425
|
const variant = $.mutable_state();
|
7327
7426
|
const size = $.mutable_state();
|
7328
7427
|
const variables$1 = $.mutable_state();
|
@@ -7331,7 +7430,7 @@ function FormInput($$anchor, $$props) {
|
|
7331
7430
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7332
7431
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7333
7432
|
const { brandKit } = useBrandKit();
|
7334
|
-
useInjectCustomizeCss(props());
|
7433
|
+
useInjectCustomizeCss(props(), layerId());
|
7335
7434
|
let value = $.mutable_state("");
|
7336
7435
|
const handleBlur = () => {
|
7337
7436
|
if (props().fieldName) {
|
@@ -7409,13 +7508,13 @@ function FormInput($$anchor, $$props) {
|
|
7409
7508
|
//#endregion
|
7410
7509
|
//#region src/components-flex/form/FormTextarea.svelte
|
7411
7510
|
var root_1$3 = $.template(`<textarea></textarea>`);
|
7412
|
-
const $$css$
|
7511
|
+
const $$css$5 = {
|
7413
7512
|
hash: "svelte-1oqg2c0",
|
7414
7513
|
code: ".form-textarea.svelte-1oqg2c0 {margin:0;width:var(--form-textarea-width);max-width:var(--form-textarea-width);min-width:var(--form-textarea-width);-webkit-appearance:none;vertical-align:bottom;color:var(--font-color);transition:all 0.2s;}.form-textarea.small.svelte-1oqg2c0 {font-size:12px;line-height:19px;padding:6px 10px 5px;border-radius:4px;}.form-textarea.medium.svelte-1oqg2c0 {font-size:14px;line-height:21px;padding:8px 12px 7px;border-radius:6px;}.form-textarea.large.svelte-1oqg2c0 {font-size:16px;line-height:25px;padding:11px 16px 10px;border-radius:8px;}.form-textarea.outlined.svelte-1oqg2c0 {border:1px solid var(--border-color);}.form-textarea.filled.svelte-1oqg2c0 {background-color:var(--background-color);border:1px solid var(--background-color);}.form-textarea.underlined.svelte-1oqg2c0 {border-radius:0;border-width:0 0 1px;border-style:solid;border-color:rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) var(--border-color);}.form-textarea.underlined.svelte-1oqg2c0:focus-visible {outline:0;border-bottom-color:1px solid var(--focused-outline-color);}.form-textarea.svelte-1oqg2c0:focus-visible {outline-color:var(--focused-outline-color);}.form-textarea.svelte-1oqg2c0::placeholder {color:var(--placeholder-color);}"
|
7415
7514
|
};
|
7416
7515
|
function FormTextarea($$anchor, $$props) {
|
7417
7516
|
$.push($$props, false);
|
7418
|
-
$.append_styles($$anchor, $$css$
|
7517
|
+
$.append_styles($$anchor, $$css$5);
|
7419
7518
|
const variant = $.mutable_state();
|
7420
7519
|
const size = $.mutable_state();
|
7421
7520
|
const variables$1 = $.mutable_state();
|
@@ -7423,7 +7522,7 @@ function FormTextarea($$anchor, $$props) {
|
|
7423
7522
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7424
7523
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7425
7524
|
const { brandKit } = useBrandKit();
|
7426
|
-
useInjectCustomizeCss(props());
|
7525
|
+
useInjectCustomizeCss(props(), layerId());
|
7427
7526
|
let value = $.mutable_state("");
|
7428
7527
|
const handleBlur = () => {
|
7429
7528
|
if (props().fieldName) {
|
@@ -7495,13 +7594,13 @@ function FormTextarea($$anchor, $$props) {
|
|
7495
7594
|
//#region src/components-flex/form/FormSelect.svelte
|
7496
7595
|
var root_2$2 = $.template(`<option class="svelte-p118m"> </option>`);
|
7497
7596
|
var root_1$2 = $.template(`<div><select class="form-select-select svelte-p118m"><option disabled class="svelte-p118m"> </option><!></select></div>`);
|
7498
|
-
const $$css$
|
7597
|
+
const $$css$4 = {
|
7499
7598
|
hash: "svelte-p118m",
|
7500
7599
|
code: ".form-select.svelte-p118m {position:relative;display:inline-flex;width:var(--width);color:var(--font-color);}.form-select.empty.svelte-p118m select:where(.svelte-p118m) {color:var(--placeholder-color);}.form-select.svelte-p118m:after {content:'';display:block;position:absolute;top:50%;right:12px;width:6px;height:6px;border-bottom:1px solid var(--font-color);border-left:1px solid var(--font-color);transform:translateY(-75%) rotate(-45deg);}.form-select.svelte-p118m select:where(.svelte-p118m) {margin:0;width:100%;-webkit-appearance:none;transition:all 0.2s;}.form-select.small.svelte-p118m select:where(.svelte-p118m) {font-size:12px;line-height:19px;padding:6px 32px 5px 10px;border-radius:4px;}.form-select.medium.svelte-p118m select:where(.svelte-p118m) {font-size:14px;line-height:21px;padding:8px 36px 7px 12px;border-radius:6px;}.form-select.large.svelte-p118m select:where(.svelte-p118m) {font-size:16px;line-height:25px;padding:11px 40px 10px 16px;border-radius:8px;}.form-select.large.svelte-p118m:after {right:20px;}.form-select.outlined.svelte-p118m select:where(.svelte-p118m) {border:1px solid var(--border-color);}.form-select.filled.svelte-p118m select:where(.svelte-p118m) {background-color:var(--background-color);border:1px solid var(--background-color);}.form-select.underlined.svelte-p118m select:where(.svelte-p118m) {border-radius:0;border-width:0 0 1px;border-style:solid;border-color:rgba(255, 255, 255, 0) rgba(255, 255, 255, 0) var(--border-color);}.form-select.underlined.svelte-p118m select:where(.svelte-p118m):focus-visible {outline:0;border-bottom-color:1px solid var(--focused-outline-color);}.form-select.svelte-p118m select:where(.svelte-p118m):focus-visible {outline-color:var(--focused-outline-color);}.form-select.svelte-p118m select:where(.svelte-p118m) option:where(.svelte-p118m) {color:var(--font-color);}"
|
7501
7600
|
};
|
7502
7601
|
function FormSelect($$anchor, $$props) {
|
7503
7602
|
$.push($$props, false);
|
7504
|
-
$.append_styles($$anchor, $$css$
|
7603
|
+
$.append_styles($$anchor, $$css$4);
|
7505
7604
|
const variant = $.mutable_state();
|
7506
7605
|
const size = $.mutable_state();
|
7507
7606
|
const isEmpty$1 = $.mutable_state();
|
@@ -7510,7 +7609,7 @@ function FormSelect($$anchor, $$props) {
|
|
7510
7609
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7511
7610
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7512
7611
|
const { brandKit } = useBrandKit();
|
7513
|
-
useInjectCustomizeCss(props());
|
7612
|
+
useInjectCustomizeCss(props(), layerId());
|
7514
7613
|
let value = $.mutable_state("");
|
7515
7614
|
const handleChange = () => {
|
7516
7615
|
if (props().fieldName) {
|
@@ -7613,12 +7712,22 @@ const FORM_FIELD_LABEL_THEME = {
|
|
7613
7712
|
gray: "グレー",
|
7614
7713
|
brand: "ブランド"
|
7615
7714
|
};
|
7715
|
+
const FORM_IDENTIFY_FIELD_TYPE = {
|
7716
|
+
email: "メールアドレス",
|
7717
|
+
subscription: "メールマガジン登録",
|
7718
|
+
phone: "電話番号",
|
7719
|
+
phone_subscribe: "SMS配信許可",
|
7720
|
+
first_name: "名前(名)",
|
7721
|
+
last_name: "名前(姓)",
|
7722
|
+
address: "住所"
|
7723
|
+
};
|
7616
7724
|
const FORM_FIELD_TYPE = {
|
7617
7725
|
INPUT: "input",
|
7618
7726
|
SELECT: "select",
|
7619
7727
|
CHECKBOX: "checkbox",
|
7620
7728
|
CHECKBOXES: "checkboxes",
|
7621
7729
|
RADIOS: "radio",
|
7730
|
+
BOOLEAN: "boolean",
|
7622
7731
|
TEXTAREA: "textarea"
|
7623
7732
|
};
|
7624
7733
|
const FORM_FIELD_VARIANT = {
|
@@ -7646,13 +7755,13 @@ const FORM_INPUT_TYPE = {
|
|
7646
7755
|
//#region src/components-flex/form/FormCheckboxes.svelte
|
7647
7756
|
var root_2$1 = $.template(`<li><label class="form-checkbox svelte-rx48m9"><input type="checkbox" class="form-checkbox-input svelte-rx48m9"> <span class="form-checkbox-check svelte-rx48m9"><i class="form-checkbox-check-icon svelte-rx48m9"></i></span> <span class="form-checkbox-label svelte-rx48m9"> </span></label></li>`);
|
7648
7757
|
var root_1$1 = $.template(`<ul></ul>`);
|
7649
|
-
const $$css$
|
7758
|
+
const $$css$3 = {
|
7650
7759
|
hash: "svelte-rx48m9",
|
7651
7760
|
code: ".form-checkboxes.svelte-rx48m9 {position:relative;display:var(--checkboxes-display);flex-direction:var(--checkboxes-direction);flex-wrap:wrap;column-gap:var(--checkboxes-gap-x);row-gap:var(--checkboxes-gap-y);grid-template-columns:var(--checkboxes-grid-cols);width:100%;list-style:none;padding:2px 0;}.form-checkboxes.outlined.svelte-rx48m9 .form-checkbox-check:where(.svelte-rx48m9) {background-color:#fff;border:1px solid var(--border-color);}.form-checkboxes.filled.svelte-rx48m9 .form-checkbox-check:where(.svelte-rx48m9) {background-color:var(--background-color);border:1px solid var(--background-color);}.form-checkbox.svelte-rx48m9 {display:flex;align-items:center;gap:var(--checkbox-gap);cursor:pointer;}.form-checkbox-input.svelte-rx48m9 {appearance:none;margin:0;width:var(--checkbox-check-size);height:var(--checkbox-check-size);cursor:pointer;position:absolute;}.form-checkbox-check.svelte-rx48m9 {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--checkbox-check-size);height:var(--checkbox-check-size);border-radius:var(--checkbox-check-radius);transition:0.2s;}.form-checkbox-check-icon.svelte-rx48m9 {display:block;width:0.625em;height:0.375em;border-bottom:2px solid white;border-left:2px solid white;transform:translateY(-25%) rotate(-45deg);opacity:0;transition:0.2s;}.form-checkbox-label.svelte-rx48m9 {font-size:var(--checkbox-font-size);color:var(--font-color);white-space:nowrap;user-select:none;}.form-checkbox-input.svelte-rx48m9:checked ~ .form-checkbox-check:where(.svelte-rx48m9) {background-color:var(--accent-color);border-color:var(--accent-color);}.form-checkbox-input.svelte-rx48m9:checked ~ .form-checkbox-check:where(.svelte-rx48m9) .form-checkbox-check-icon:where(.svelte-rx48m9) {opacity:1;}"
|
7652
7761
|
};
|
7653
7762
|
function FormCheckboxes($$anchor, $$props) {
|
7654
7763
|
$.push($$props, false);
|
7655
|
-
$.append_styles($$anchor, $$css$
|
7764
|
+
$.append_styles($$anchor, $$css$3);
|
7656
7765
|
const variant = $.mutable_state();
|
7657
7766
|
const size = $.mutable_state();
|
7658
7767
|
const options = $.mutable_state();
|
@@ -7661,7 +7770,7 @@ function FormCheckboxes($$anchor, $$props) {
|
|
7661
7770
|
const binding_group = [];
|
7662
7771
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7663
7772
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7664
|
-
useInjectCustomizeCss(props());
|
7773
|
+
useInjectCustomizeCss(props(), layerId());
|
7665
7774
|
const { brandKit } = useBrandKit();
|
7666
7775
|
let values = $.mutable_state([]);
|
7667
7776
|
const handleChange = () => {
|
@@ -7702,7 +7811,7 @@ function FormCheckboxes($$anchor, $$props) {
|
|
7702
7811
|
})(),
|
7703
7812
|
"--checkbox-check-size": (() => {
|
7704
7813
|
if ($.get(size) === "small") return "14x";
|
7705
|
-
if ($.get(size) === "large") return "
|
7814
|
+
if ($.get(size) === "large") return "18px";
|
7706
7815
|
return "16px";
|
7707
7816
|
})(),
|
7708
7817
|
"--checkbox-check-radius": (() => {
|
@@ -7778,13 +7887,13 @@ function FormCheckboxes($$anchor, $$props) {
|
|
7778
7887
|
//#region src/components-flex/form/FormRadios.svelte
|
7779
7888
|
var root_2 = $.template(`<li><label class="form-radio svelte-ps4qqa"><input type="radio" class="form-radio-input svelte-ps4qqa"> <span class="form-radio-check svelte-ps4qqa"><i class="form-radio-check-icon svelte-ps4qqa"></i></span> <span class="form-radio-label svelte-ps4qqa"> </span></label></li>`);
|
7780
7889
|
var root_1 = $.template(`<ul></ul>`);
|
7781
|
-
const $$css = {
|
7890
|
+
const $$css$2 = {
|
7782
7891
|
hash: "svelte-ps4qqa",
|
7783
7892
|
code: ".form-radios.svelte-ps4qqa {position:relative;display:var(--radios-display);flex-direction:var(--radios-direction);flex-wrap:wrap;column-gap:var(--radios-gap-x);row-gap:var(--radios-gap-y);grid-template-columns:var(--radios-grid-cols);width:100%;list-style:none;padding:2px 0;}.form-radios.outlined.svelte-ps4qqa .form-radio-check:where(.svelte-ps4qqa) {background-color:#fff;border:1px solid var(--border-color);}.form-radios.filled.svelte-ps4qqa .form-radio-check:where(.svelte-ps4qqa) {background-color:var(--background-color);border:1px solid var(--background-color);}.form-radio.svelte-ps4qqa {display:flex;align-items:center;gap:var(--radio-gap);cursor:pointer;}.form-radio-input.svelte-ps4qqa {appearance:none;width:var(--radio-check-size);height:var(--radio-check-size);margin:0;cursor:pointer;position:absolute;}.form-radio-check.svelte-ps4qqa {display:flex;align-items:center;justify-content:center;flex-shrink:0;width:var(--radio-check-size);height:var(--radio-check-size);border-radius:100%;transition:0.2s;}.form-radio-check-icon.svelte-ps4qqa {display:block;width:var(--radio-check-icon-size);height:var(--radio-check-icon-size);border-radius:100%;background-color:var(--accent-color);opacity:0;transition:0.2s;}.form-radio-label.svelte-ps4qqa {font-size:var(--radio-font-size);color:var(--font-color);white-space:nowrap;user-select:none;}.form-radio-input.svelte-ps4qqa:checked ~ .form-radio-check:where(.svelte-ps4qqa) {border-color:var(--accent-color);}.form-radio-input.svelte-ps4qqa:checked ~ .form-radio-check:where(.svelte-ps4qqa) .form-radio-check-icon:where(.svelte-ps4qqa) {opacity:1;}"
|
7784
7893
|
};
|
7785
7894
|
function FormRadios($$anchor, $$props) {
|
7786
7895
|
$.push($$props, false);
|
7787
|
-
$.append_styles($$anchor, $$css);
|
7896
|
+
$.append_styles($$anchor, $$css$2);
|
7788
7897
|
const variant = $.mutable_state();
|
7789
7898
|
const size = $.mutable_state();
|
7790
7899
|
const options = $.mutable_state();
|
@@ -7793,7 +7902,7 @@ function FormRadios($$anchor, $$props) {
|
|
7793
7902
|
const binding_group = [];
|
7794
7903
|
let props = $.prop($$props, "props", 24, () => ({}));
|
7795
7904
|
let layerId = $.prop($$props, "layerId", 8, "");
|
7796
|
-
useInjectCustomizeCss(props());
|
7905
|
+
useInjectCustomizeCss(props(), layerId());
|
7797
7906
|
const { brandKit } = useBrandKit();
|
7798
7907
|
let value = $.mutable_state("");
|
7799
7908
|
const handleChange = () => {
|
@@ -7911,6 +8020,124 @@ function FormRadios($$anchor, $$props) {
|
|
7911
8020
|
$.pop();
|
7912
8021
|
}
|
7913
8022
|
|
8023
|
+
//#endregion
|
8024
|
+
//#region src/components-flex/form/FormBoolean.svelte
|
8025
|
+
const $$css$1 = {
|
8026
|
+
hash: "svelte-3kpd",
|
8027
|
+
code: ""
|
8028
|
+
};
|
8029
|
+
function FormBoolean($$anchor, $$props) {
|
8030
|
+
$.append_styles($$anchor, $$css$1);
|
8031
|
+
let props = $.prop($$props, "props", 24, () => ({}));
|
8032
|
+
let layerId = $.prop($$props, "layerId", 8, "");
|
8033
|
+
FormRadios($$anchor, {
|
8034
|
+
get layerId() {
|
8035
|
+
return layerId();
|
8036
|
+
},
|
8037
|
+
get props() {
|
8038
|
+
return props();
|
8039
|
+
}
|
8040
|
+
});
|
8041
|
+
}
|
8042
|
+
|
8043
|
+
//#endregion
|
8044
|
+
//#region src/components-flex/form/FormIdentifyField.svelte
|
8045
|
+
const $$css = {
|
8046
|
+
hash: "svelte-3kpd",
|
8047
|
+
code: ""
|
8048
|
+
};
|
8049
|
+
function FormIdentifyField($$anchor, $$props) {
|
8050
|
+
$.push($$props, false);
|
8051
|
+
$.append_styles($$anchor, $$css);
|
8052
|
+
const fieldType = $.mutable_state();
|
8053
|
+
const fieldProps = $.mutable_state();
|
8054
|
+
const inputProps = $.mutable_state();
|
8055
|
+
const booleanProps = $.mutable_state();
|
8056
|
+
let props = $.prop($$props, "props", 24, () => ({}));
|
8057
|
+
let layerId = $.prop($$props, "layerId", 8, "");
|
8058
|
+
useInjectCustomizeCss(props(), layerId());
|
8059
|
+
const identifyType = props().identifyType ?? "email";
|
8060
|
+
$.legacy_pre_effect(() => {}, () => {
|
8061
|
+
$.set(fieldType, (() => {
|
8062
|
+
switch (identifyType) {
|
8063
|
+
case "phone_subscribe":
|
8064
|
+
case "subscription": return "boolean";
|
8065
|
+
case "address":
|
8066
|
+
case "first_name":
|
8067
|
+
case "last_name":
|
8068
|
+
case "email":
|
8069
|
+
case "phone":
|
8070
|
+
default: return "input";
|
8071
|
+
}
|
8072
|
+
})());
|
8073
|
+
});
|
8074
|
+
$.legacy_pre_effect(() => ($.deep_read_state(props()), $.get(fieldType)), () => {
|
8075
|
+
$.set(fieldProps, (() => {
|
8076
|
+
return {
|
8077
|
+
...props(),
|
8078
|
+
fieldType: $.get(fieldType),
|
8079
|
+
fieldName: identifyType,
|
8080
|
+
isIdentify: true
|
8081
|
+
};
|
8082
|
+
})());
|
8083
|
+
});
|
8084
|
+
$.legacy_pre_effect(() => ($.get(fieldType), $.get(fieldProps), $.deep_read_state(props())), () => {
|
8085
|
+
$.set(inputProps, (() => {
|
8086
|
+
if ($.get(fieldType) !== "input") return null;
|
8087
|
+
return {
|
8088
|
+
...$.get(fieldProps),
|
8089
|
+
...props().inputProps ?? {}
|
8090
|
+
};
|
8091
|
+
})());
|
8092
|
+
});
|
8093
|
+
$.legacy_pre_effect(() => ($.get(fieldType), $.get(fieldProps), $.deep_read_state(props())), () => {
|
8094
|
+
$.set(booleanProps, (() => {
|
8095
|
+
if ($.get(fieldType) !== "boolean") return null;
|
8096
|
+
return {
|
8097
|
+
...$.get(fieldProps),
|
8098
|
+
...props().checkerProps ?? {}
|
8099
|
+
};
|
8100
|
+
})());
|
8101
|
+
});
|
8102
|
+
$.legacy_pre_effect_reset();
|
8103
|
+
$.init();
|
8104
|
+
var fragment = $.comment();
|
8105
|
+
var node = $.first_child(fragment);
|
8106
|
+
var consequent = ($$anchor$1) => {
|
8107
|
+
FormInput($$anchor$1, {
|
8108
|
+
get layerId() {
|
8109
|
+
return layerId();
|
8110
|
+
},
|
8111
|
+
get props() {
|
8112
|
+
return $.get(inputProps);
|
8113
|
+
}
|
8114
|
+
});
|
8115
|
+
};
|
8116
|
+
var alternate = ($$anchor$1, $$elseif) => {
|
8117
|
+
var consequent_1 = ($$anchor$2) => {
|
8118
|
+
FormBoolean($$anchor$2, {
|
8119
|
+
get layerId() {
|
8120
|
+
return layerId();
|
8121
|
+
},
|
8122
|
+
get props() {
|
8123
|
+
return $.get(booleanProps);
|
8124
|
+
}
|
8125
|
+
});
|
8126
|
+
};
|
8127
|
+
var alternate_1 = ($$anchor$2) => {};
|
8128
|
+
$.if($$anchor$1, ($$render) => {
|
8129
|
+
if ($.get(booleanProps)) $$render(consequent_1);
|
8130
|
+
else $$render(alternate_1, false);
|
8131
|
+
}, $$elseif);
|
8132
|
+
};
|
8133
|
+
$.if(node, ($$render) => {
|
8134
|
+
if ($.get(inputProps)) $$render(consequent);
|
8135
|
+
else $$render(alternate, false);
|
8136
|
+
});
|
8137
|
+
$.append($$anchor, fragment);
|
8138
|
+
$.pop();
|
8139
|
+
}
|
8140
|
+
|
7914
8141
|
//#endregion
|
7915
8142
|
//#region src/components-flex/shared/styles.ts
|
7916
8143
|
const ROUND_STYLES = {
|
@@ -8119,4 +8346,4 @@ const flexComponentSchemes = {
|
|
8119
8346
|
};
|
8120
8347
|
|
8121
8348
|
//#endregion
|
8122
|
-
export { ACTION_HOOK_LABEL, ASPECT_VARIANT, ASPECT_VARIANTS, AVATAR_SHAPE, AVATAR_SIZE, AVATAR_SIZE_STYLES, Alignments, AnimationStyles, BACKGROUND_COLOR_VARIANT, BACKGROUND_COLOR_VARIANTS, BORDER_COLOR_VARIANT, BORDER_COLOR_VARIANTS, BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET, BUTTON_OUTLINED_ROUND_STYLES, BUTTON_OUTLINED_SIZE_STYLES, BUTTON_OUTLINED_WRAP_STYLES, BUTTON_ROUND, BUTTON_ROUND_STYLES, BUTTON_SIZE, BUTTON_SIZE_STYLES, BUTTON_TEXT_SIZE, BUTTON_TEXT_SIZE_STYLES, BUTTON_TEXT_THEME, BUTTON_THEME, BUTTON_VARIANT, BUTTON_WRAP_STYLES, BackgroundSizes, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, FONT_FAMILY_VARIANT, FONT_FAMILY_VARIANTS, FONT_FAMILY_VARIANT_GROUPS, FORM_FIELD_LABEL_SIZE, FORM_FIELD_LABEL_THEME, FORM_FIELD_SIZE, FORM_FIELD_TYPE, FORM_FIELD_VARIANT, FORM_FIELD_VARIANT_FOR_CHECKER, FORM_INPUT_TYPE, Avatar as FlexAvatar, Button as FlexButton, ButtonOutlined as FlexButtonOutlined, ButtonText as FlexButtonText, ClipCopy as FlexClipCopy, CloseButton as FlexCloseButton, Code as FlexCode, CountDown as FlexCountDown, CountDownValue as FlexCountDownValue, FlexDirections, Embed as FlexEmbed, Form as FlexForm, FormCheckboxes as FlexFormCheckboxes, FormField as FlexFormField, FormInput as FlexFormInput, FormRadios as FlexFormRadios, FormSelect as FlexFormSelect, FormTextarea as FlexFormTextarea, Icon as FlexIcon, Image as FlexImage, Layout as FlexLayout, List as FlexList, ListItem as FlexListItem, Modal as FlexModal, MultiColumn as FlexMultiColumn, MultiColumnItem as FlexMultiColumnItem, RichText as FlexRichText, Slider as FlexSlider, SliderItem as FlexSliderItem, Text as FlexText, TextLink as FlexTextLink, Youtube as FlexYoutube, Fonts, FormIdentifyBooleanFields, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LIST_ITEM_CONTEXT_KEY, LengthUnits, ListBackgroundTypes, ListDirections, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, ModalPositions, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, State, StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextDirections, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, avatarPropsDefault, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection, create, createApp, createFog, createProp, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, flexComponentSchemes, formData, formStore, formSubmittedValues, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, getFormErrors, getFormFieldSchema, getFormFieldState, getFormFieldValue, getFormValues, getLogs, getState, getStates, getSystem, getTextLinkThemeStyles, getTextThemeStyles, getVariables, hideOnScroll, hideOnTime, initialize, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestory, onDestroy, onMount, onScroll, onShow, onSubmitForm, onTime, registerFormField, removeAnswer, resetEventHandlers, resetVariables, sendAnswer, sendAnswers, setEventHandlers, setFormFieldError, setFormFieldTouched, setFormFieldValue, setSetting, setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, unregisterFormField, useBrandKit, validateFormField, variables, widget_exports as widget };
|
8349
|
+
export { ACTION_HOOK_LABEL, ASPECT_VARIANT, ASPECT_VARIANTS, AVATAR_SHAPE, AVATAR_SIZE, AVATAR_SIZE_STYLES, Alignments, AnimationStyles, BACKGROUND_COLOR_VARIANT, BACKGROUND_COLOR_VARIANTS, BORDER_COLOR_VARIANT, BORDER_COLOR_VARIANTS, BUTTON_ICON_ANGLE, BUTTON_LINK_TARGET, BUTTON_OUTLINED_ROUND_STYLES, BUTTON_OUTLINED_SIZE_STYLES, BUTTON_OUTLINED_WRAP_STYLES, BUTTON_ROUND, BUTTON_ROUND_STYLES, BUTTON_SIZE, BUTTON_SIZE_STYLES, BUTTON_TEXT_SIZE, BUTTON_TEXT_SIZE_STYLES, BUTTON_TEXT_THEME, BUTTON_THEME, BUTTON_VARIANT, BUTTON_WRAP_STYLES, BackgroundSizes, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, FONT_FAMILY_VARIANT, FONT_FAMILY_VARIANTS, FONT_FAMILY_VARIANT_GROUPS, FORM_FIELD_LABEL_SIZE, FORM_FIELD_LABEL_THEME, FORM_FIELD_SIZE, FORM_FIELD_TYPE, FORM_FIELD_VARIANT, FORM_FIELD_VARIANT_FOR_CHECKER, FORM_IDENTIFY_FIELD_TYPE, FORM_INPUT_TYPE, FORM_VALIDATION_DEFAULT_ERROR_MESSAGES, FORM_VALIDATION_REGEX, FORM_VALIDATION_TYPE, Avatar as FlexAvatar, Button as FlexButton, ButtonOutlined as FlexButtonOutlined, ButtonText as FlexButtonText, ClipCopy as FlexClipCopy, CloseButton as FlexCloseButton, Code as FlexCode, CountDown as FlexCountDown, CountDownValue as FlexCountDownValue, FlexDirections, Embed as FlexEmbed, Form as FlexForm, FormBoolean as FlexFormBoolean, FormCheckboxes as FlexFormCheckboxes, FormField as FlexFormField, FormIdentifyField as FlexFormIdentifyField, FormInput as FlexFormInput, FormRadios as FlexFormRadios, FormSelect as FlexFormSelect, FormTextarea as FlexFormTextarea, Icon as FlexIcon, Image as FlexImage, Layout as FlexLayout, List as FlexList, ListItem as FlexListItem, Modal as FlexModal, MultiColumn as FlexMultiColumn, MultiColumnItem as FlexMultiColumnItem, RichText as FlexRichText, Slider as FlexSlider, SliderItem as FlexSliderItem, Text as FlexText, TextLink as FlexTextLink, Youtube as FlexYoutube, Fonts, FormIdentifyBooleanFields, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LIST_ITEM_CONTEXT_KEY, LengthUnits, ListBackgroundTypes, ListDirections, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, ModalPositions, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, State, StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextDirections, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, avatarPropsDefault, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection, create, createApp, createFog, createProp, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, flexComponentSchemes, formData, formStore, formSubmittedIdentifyValues, formSubmittedValues, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, getFormErrors, getFormFieldSchema, getFormFieldState, getFormFieldValue, getFormValues, getLogs, getState, getStates, getSystem, getTextLinkThemeStyles, getTextThemeStyles, getVariables, hideOnScroll, hideOnTime, initialize, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestory, onDestroy, onMount, onScroll, onShow, onSubmitForm, onTime, registerFormField, removeAnswer, resetEventHandlers, resetVariables, sendAnswer, sendAnswers, setEventHandlers, setFormFieldError, setFormFieldTouched, setFormFieldValue, setSetting, setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, unregisterFormField, useBrandKit, validateFormField, variables, widget_exports as widget };
|