@plaidev/karte-action-sdk 1.1.270-29410833.25c7eb841 → 1.1.270-29420750.2ec690591
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/components-flex/css.d.ts +2 -2
- package/dist/components-flex/props.d.ts +2 -2
- package/dist/components-flex/responsiveProp.d.ts +7 -0
- package/dist/hydrate/components-flex/css.d.ts +2 -2
- package/dist/hydrate/components-flex/props.d.ts +2 -2
- package/dist/hydrate/components-flex/responsiveProp.d.ts +7 -0
- package/dist/hydrate/index.d.ts +1 -0
- package/dist/hydrate/index.es.js +260 -204
- package/dist/hydrate/index.svelte5.d.ts +2 -1
- package/dist/hydrate/preview.d.ts +28 -0
- package/dist/hydrate/stores.d.ts +22 -1
- package/dist/hydrate/types.d.ts +13 -0
- package/dist/hydrate/utils.d.ts +1 -0
- package/dist/index.es.d.ts +1 -0
- package/dist/index.es.js +260 -204
- package/dist/preview.d.ts +28 -0
- package/dist/stores.d.ts +22 -1
- package/dist/svelte5/components-flex/css.d.ts +2 -2
- package/dist/svelte5/components-flex/props.d.ts +2 -2
- package/dist/svelte5/components-flex/responsiveProp.d.ts +7 -0
- package/dist/svelte5/hydrate/components-flex/css.d.ts +2 -2
- package/dist/svelte5/hydrate/components-flex/props.d.ts +2 -2
- package/dist/svelte5/hydrate/components-flex/responsiveProp.d.ts +7 -0
- package/dist/svelte5/hydrate/index.es.d.ts +2 -1
- package/dist/svelte5/hydrate/index.es.js +235 -186
- package/dist/svelte5/hydrate/preview.d.ts +28 -0
- package/dist/svelte5/hydrate/stores.d.ts +22 -1
- package/dist/svelte5/hydrate/types.d.ts +13 -0
- package/dist/svelte5/hydrate/utils.d.ts +1 -0
- package/dist/svelte5/index.es.d.ts +2 -1
- package/dist/svelte5/index.es.js +235 -186
- package/dist/svelte5/index.front2.es.js +236 -188
- package/dist/svelte5/index.svelte5.d.ts +2 -1
- package/dist/svelte5/preview.d.ts +28 -0
- package/dist/svelte5/stores.d.ts +22 -1
- package/dist/svelte5/types.d.ts +13 -0
- package/dist/svelte5/utils.d.ts +1 -0
- package/dist/templates.cjs.js +3 -2
- package/dist/templates.js +3 -2
- package/dist/types.d.ts +13 -0
- package/dist/utils.d.ts +1 -0
- package/package.json +2 -2
- package/dist/components-flex/responsive.d.ts +0 -26
- package/dist/hydrate/components-flex/responsive.d.ts +0 -26
- package/dist/svelte5/components-flex/responsive.d.ts +0 -26
- package/dist/svelte5/hydrate/components-flex/responsive.d.ts +0 -26
package/dist/hydrate/index.es.js
CHANGED
|
@@ -5,12 +5,17 @@ import { cubicOut, elasticOut, linear } from "svelte/easing";
|
|
|
5
5
|
|
|
6
6
|
//#region rolldown:runtime
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
|
-
var __export = (all) => {
|
|
8
|
+
var __export = (all, symbols) => {
|
|
9
9
|
let target = {};
|
|
10
|
-
for (var name in all)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
for (var name in all) {
|
|
11
|
+
__defProp(target, name, {
|
|
12
|
+
get: all[name],
|
|
13
|
+
enumerable: true
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
if (symbols) {
|
|
17
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
18
|
+
}
|
|
14
19
|
return target;
|
|
15
20
|
};
|
|
16
21
|
|
|
@@ -51,6 +56,9 @@ const NOOP = (_args) => {};
|
|
|
51
56
|
/** @internal */
|
|
52
57
|
const isPreview = () => true;
|
|
53
58
|
const isCanvasPreview = () => typeof document !== "undefined" ? (document?.querySelector("#preview")?.getAttribute("data-canvas-preview") ?? "false") === "true" : false;
|
|
59
|
+
const getPreviewId = () => {
|
|
60
|
+
return typeof document !== "undefined" ? document.documentElement.getAttribute("data-krt-preview-id") ?? "" : "";
|
|
61
|
+
};
|
|
54
62
|
const isOnSite = () => typeof document !== "undefined" ? (document?.querySelector("#preview")?.getAttribute("data-on-site") ?? "true") === "true" : true;
|
|
55
63
|
/** @internal */
|
|
56
64
|
const setPreviousFocus = () => {
|
|
@@ -188,17 +196,13 @@ function onScroll(rate, fn) {
|
|
|
188
196
|
html.scrollHeight,
|
|
189
197
|
html.clientHeight
|
|
190
198
|
]);
|
|
191
|
-
const
|
|
192
|
-
const scrollRate = (scrollTop + viewHeight) / pageHeight;
|
|
199
|
+
const scrollRate = (scrollTop + Math.min(...[html.clientHeight, body.clientHeight])) / pageHeight;
|
|
193
200
|
contexts.forEach((ctx) => {
|
|
194
201
|
ctx.scrollRate = scrollRate;
|
|
195
202
|
ctx.deltaRate = ctx.scrollRate - ctx.previousRate;
|
|
196
203
|
ctx.previousRate = ctx.scrollRate;
|
|
197
204
|
ctx.scrollTop = scrollTop;
|
|
198
|
-
if (canCall(ctx)) {
|
|
199
|
-
const repeat = !!_fn(Object.assign({ direction: direction(ctx) }, ctx));
|
|
200
|
-
updateStates(ctx, repeat);
|
|
201
|
-
}
|
|
205
|
+
if (canCall(ctx)) updateStates(ctx, !!_fn(Object.assign({ direction: direction(ctx) }, ctx)));
|
|
202
206
|
});
|
|
203
207
|
};
|
|
204
208
|
window.addEventListener("scroll", onScroll$1);
|
|
@@ -1143,6 +1147,33 @@ function setDestroyed(on$1) {
|
|
|
1143
1147
|
*
|
|
1144
1148
|
* @internal
|
|
1145
1149
|
*/
|
|
1150
|
+
const breakpoints = writable([]);
|
|
1151
|
+
/**
|
|
1152
|
+
* ブレイクポイントの一覧を取得する
|
|
1153
|
+
*
|
|
1154
|
+
* @returns 現在のブレイクポイントの一覧
|
|
1155
|
+
*/
|
|
1156
|
+
function getBreakpoints() {
|
|
1157
|
+
return get(breakpoints);
|
|
1158
|
+
}
|
|
1159
|
+
/**
|
|
1160
|
+
* 変数を設定する
|
|
1161
|
+
*
|
|
1162
|
+
* @remarks
|
|
1163
|
+
* 設定したブレイクポイントは、ビジュアルエディタでブレイクポイントとして利用できます。
|
|
1164
|
+
*
|
|
1165
|
+
* @param values - ブレイクポイントの一覧
|
|
1166
|
+
*/
|
|
1167
|
+
function setBreakpoints(values) {
|
|
1168
|
+
if (!get(breakpoints)) breakpoints.set([]);
|
|
1169
|
+
breakpoints.update(() => values);
|
|
1170
|
+
return getBreakpoints();
|
|
1171
|
+
}
|
|
1172
|
+
/**
|
|
1173
|
+
* Store to handle variables
|
|
1174
|
+
*
|
|
1175
|
+
* @internal
|
|
1176
|
+
*/
|
|
1146
1177
|
const variables = writable({});
|
|
1147
1178
|
/**
|
|
1148
1179
|
* 変数の一覧を取得する
|
|
@@ -1457,6 +1488,9 @@ function dispatchDestroyEvent() {
|
|
|
1457
1488
|
|
|
1458
1489
|
//#endregion
|
|
1459
1490
|
//#region src/display-logic.ts
|
|
1491
|
+
/**
|
|
1492
|
+
* モーダル(ポップアップ)のロジックを管理する
|
|
1493
|
+
*/
|
|
1460
1494
|
function doPresent({ direction, deltaRate }, downFn, upFn, condition = false) {
|
|
1461
1495
|
if (direction === "down" && deltaRate > 0) downFn();
|
|
1462
1496
|
else if (condition && direction === "up" && deltaRate < 0) upFn();
|
|
@@ -1542,6 +1576,9 @@ function showOnTime(props, show$2 = NOOP) {
|
|
|
1542
1576
|
|
|
1543
1577
|
//#endregion
|
|
1544
1578
|
//#region src/collection.ts
|
|
1579
|
+
/**
|
|
1580
|
+
* アクションテーブルに関連するコードの管理
|
|
1581
|
+
*/
|
|
1545
1582
|
const DEFAULT_COLLECTION_ENDPOINT = "https://action-table.karte.io/collection";
|
|
1546
1583
|
/**
|
|
1547
1584
|
* アクションテーブルを管理するメソッドを取得する
|
|
@@ -1735,6 +1772,11 @@ function initActionTable(localVariablesQuery) {
|
|
|
1735
1772
|
|
|
1736
1773
|
//#endregion
|
|
1737
1774
|
//#region src/modal.tsx
|
|
1775
|
+
/**
|
|
1776
|
+
* モーダル(ポップアップ)に関連するコードの管理
|
|
1777
|
+
*
|
|
1778
|
+
* アクションのShow, Close, ChangeStateの状態はここで管理する。
|
|
1779
|
+
*/
|
|
1738
1780
|
/** @internal */
|
|
1739
1781
|
const handleState = (event) => {
|
|
1740
1782
|
if (event.detail.actionId === actionId || event.detail.actionId === ALL_ACTION_ID) {
|
|
@@ -1953,8 +1995,7 @@ function createModal(App, options = {
|
|
|
1953
1995
|
return NOOP;
|
|
1954
1996
|
};
|
|
1955
1997
|
const handleClose = (event) => {
|
|
1956
|
-
|
|
1957
|
-
close$2(trigger);
|
|
1998
|
+
close$2(event?.detail?.trigger ? event.detail.trigger : "none");
|
|
1958
1999
|
};
|
|
1959
2000
|
const show$2 = async (trigger = "none") => {
|
|
1960
2001
|
if (app) return;
|
|
@@ -1976,21 +2017,21 @@ function createModal(App, options = {
|
|
|
1976
2017
|
setOpened(true);
|
|
1977
2018
|
setClosed(false);
|
|
1978
2019
|
if (app) return;
|
|
1979
|
-
|
|
2020
|
+
app = new App({
|
|
1980
2021
|
target: ensureActionRoot$1(false),
|
|
1981
2022
|
hydrate: true,
|
|
1982
2023
|
props: {
|
|
1983
2024
|
send: options.send,
|
|
1984
2025
|
publish: options.publish,
|
|
1985
2026
|
data,
|
|
1986
|
-
onShow: (props
|
|
2027
|
+
onShow: (props) => {
|
|
1987
2028
|
const { onShowHandlers } = getInternalHandlers();
|
|
1988
2029
|
if (onShowHandlers) onShowHandlers.forEach((h$1) => {
|
|
1989
2030
|
console.info(`${ACTION_HOOK_LABEL}:${JSON.stringify({ name: "onShow" })}`);
|
|
1990
|
-
h$1(props
|
|
2031
|
+
h$1(props);
|
|
1991
2032
|
});
|
|
1992
2033
|
},
|
|
1993
|
-
onChangeState: (props
|
|
2034
|
+
onChangeState: (props, newState) => {
|
|
1994
2035
|
const { onChangeStateHandlers } = getInternalHandlers();
|
|
1995
2036
|
if (onChangeStateHandlers) onChangeStateHandlers.forEach((h$1) => {
|
|
1996
2037
|
const actionHookLog = {
|
|
@@ -1998,18 +2039,16 @@ function createModal(App, options = {
|
|
|
1998
2039
|
values: { newState }
|
|
1999
2040
|
};
|
|
2000
2041
|
console.info(`${ACTION_HOOK_LABEL}:${JSON.stringify(actionHookLog)}`);
|
|
2001
|
-
h$1(props
|
|
2042
|
+
h$1(props, newState);
|
|
2002
2043
|
});
|
|
2003
2044
|
const { onChangeStateHandlers: onChangeWidgetStateHandlers } = getWidgetHandlers();
|
|
2004
|
-
if (onChangeWidgetStateHandlers) onChangeStateHandlers.forEach((h$1) => h$1(props
|
|
2045
|
+
if (onChangeWidgetStateHandlers) onChangeStateHandlers.forEach((h$1) => h$1(props, newState));
|
|
2005
2046
|
}
|
|
2006
2047
|
}
|
|
2007
|
-
};
|
|
2008
|
-
app = new App(props);
|
|
2048
|
+
});
|
|
2009
2049
|
};
|
|
2010
2050
|
const handleShow = (event) => {
|
|
2011
|
-
|
|
2012
|
-
show$2(trigger);
|
|
2051
|
+
show$2(event?.detail?.trigger ? event.detail.trigger : "none");
|
|
2013
2052
|
};
|
|
2014
2053
|
const autoShow = () => {
|
|
2015
2054
|
return show$2("auto");
|
|
@@ -2174,6 +2213,11 @@ function createFog({ color = "#000", opacity = "50%", zIndex = 999, onclick }) {
|
|
|
2174
2213
|
//#endregion
|
|
2175
2214
|
//#region src/modal.svelte5.tsx
|
|
2176
2215
|
/**
|
|
2216
|
+
* モーダル(ポップアップ)に関連するコードの管理
|
|
2217
|
+
*
|
|
2218
|
+
* アクションのShow, Close, ChangeStateの状態はここで管理する。
|
|
2219
|
+
*/
|
|
2220
|
+
/**
|
|
2177
2221
|
* アクションが表示 (show) された後にフックする関数
|
|
2178
2222
|
*
|
|
2179
2223
|
* @param fn - 呼び出されるフック関数
|
|
@@ -2442,6 +2486,9 @@ function createFog$1({ color = "#000", opacity = "50%", zIndex = 999, onclick })
|
|
|
2442
2486
|
|
|
2443
2487
|
//#endregion
|
|
2444
2488
|
//#region src/script.ts
|
|
2489
|
+
/**
|
|
2490
|
+
* スクリプト接客が利用するコードの管理
|
|
2491
|
+
*/
|
|
2445
2492
|
/** @internal */
|
|
2446
2493
|
async function runScript$1(options = {
|
|
2447
2494
|
send: () => {},
|
|
@@ -2543,8 +2590,100 @@ async function loadGlobalStyle(href) {
|
|
|
2543
2590
|
});
|
|
2544
2591
|
}
|
|
2545
2592
|
|
|
2593
|
+
//#endregion
|
|
2594
|
+
//#region src/preview.ts
|
|
2595
|
+
/** @internal */
|
|
2596
|
+
const initPreview = () => {
|
|
2597
|
+
if (!isPreview()) return () => {};
|
|
2598
|
+
let root;
|
|
2599
|
+
let timer = null;
|
|
2600
|
+
const previewId = getPreviewId();
|
|
2601
|
+
const LAYER_ID_ATTR_KEY = "data-layer-id";
|
|
2602
|
+
const toInfo = (element$1) => {
|
|
2603
|
+
if (!element$1) return null;
|
|
2604
|
+
const rect = element$1.getBoundingClientRect();
|
|
2605
|
+
const styles = window.getComputedStyle(element$1);
|
|
2606
|
+
return {
|
|
2607
|
+
layerId: element$1.getAttribute(LAYER_ID_ATTR_KEY),
|
|
2608
|
+
top: rect.top,
|
|
2609
|
+
left: rect.left,
|
|
2610
|
+
width: rect.width,
|
|
2611
|
+
height: rect.height,
|
|
2612
|
+
direction: styles?.flexDirection === "row" || styles?.flexDirection === "row-reverse" ? "row" : "column",
|
|
2613
|
+
classNames: Array.from(element$1.classList.values()),
|
|
2614
|
+
styles: {
|
|
2615
|
+
direction: styles.flexDirection,
|
|
2616
|
+
opacity: styles.opacity,
|
|
2617
|
+
rowGap: styles.rowGap,
|
|
2618
|
+
columnGap: styles.columnGap,
|
|
2619
|
+
paddingLeft: styles.paddingLeft,
|
|
2620
|
+
paddingRight: styles.paddingRight,
|
|
2621
|
+
paddingTop: styles.paddingTop,
|
|
2622
|
+
paddingBottom: styles.paddingBottom,
|
|
2623
|
+
zIndex: styles.zIndex,
|
|
2624
|
+
position: styles.position,
|
|
2625
|
+
top: styles.top,
|
|
2626
|
+
left: styles.left,
|
|
2627
|
+
right: styles.right,
|
|
2628
|
+
bottom: styles.bottom
|
|
2629
|
+
}
|
|
2630
|
+
};
|
|
2631
|
+
};
|
|
2632
|
+
const w$1 = (w$2) => w$2.parent === w$2 ? w$2 : w$2.parent;
|
|
2633
|
+
const postUpdateLayers = () => {
|
|
2634
|
+
const layerElements = Array.from(root.querySelectorAll(`[${LAYER_ID_ATTR_KEY}]`)).map((el) => toInfo(el));
|
|
2635
|
+
if (layerElements.length === 0) return;
|
|
2636
|
+
w$1(window).postMessage({
|
|
2637
|
+
type: "KARTE-ACTION-PREVIEW-UPDATE-LAYERS",
|
|
2638
|
+
detail: {
|
|
2639
|
+
previewId,
|
|
2640
|
+
layerElements
|
|
2641
|
+
}
|
|
2642
|
+
}, "*");
|
|
2643
|
+
};
|
|
2644
|
+
const rootObserver = new MutationObserver(postUpdateLayers);
|
|
2645
|
+
const handleMessage = (e) => {
|
|
2646
|
+
console.log("message", e);
|
|
2647
|
+
const data = e.data;
|
|
2648
|
+
if (data.event_name === "OVERRIDE_LAYER_STYLE") {
|
|
2649
|
+
const { layerId = "", styles = [] } = data.detail || {};
|
|
2650
|
+
const layerElement = root.querySelector(`[${LAYER_ID_ATTR_KEY}="${layerId}"]`);
|
|
2651
|
+
if (!layerElement) return;
|
|
2652
|
+
styles.forEach(({ key, value }) => {
|
|
2653
|
+
layerElement.style.setProperty(key, value);
|
|
2654
|
+
});
|
|
2655
|
+
}
|
|
2656
|
+
};
|
|
2657
|
+
(() => {
|
|
2658
|
+
const init$1 = () => {
|
|
2659
|
+
root = getActionRoot$1();
|
|
2660
|
+
if (root) {
|
|
2661
|
+
rootObserver.observe(root, {
|
|
2662
|
+
childList: true,
|
|
2663
|
+
subtree: true,
|
|
2664
|
+
characterData: true,
|
|
2665
|
+
attributes: true
|
|
2666
|
+
});
|
|
2667
|
+
timer = setInterval(postUpdateLayers, 1e3);
|
|
2668
|
+
window.addEventListener("message", handleMessage);
|
|
2669
|
+
} else setTimeout(init$1, 30);
|
|
2670
|
+
};
|
|
2671
|
+
init$1();
|
|
2672
|
+
})();
|
|
2673
|
+
return () => {
|
|
2674
|
+
if (timer) clearInterval(timer);
|
|
2675
|
+
rootObserver.disconnect();
|
|
2676
|
+
window.removeEventListener("message", handleMessage);
|
|
2677
|
+
};
|
|
2678
|
+
};
|
|
2679
|
+
|
|
2546
2680
|
//#endregion
|
|
2547
2681
|
//#region src/action.ts
|
|
2682
|
+
/**
|
|
2683
|
+
* Edgeが起動するアクションに関連するコードを管理する
|
|
2684
|
+
*
|
|
2685
|
+
* アクションのCreate, Destroyの状態はここで管理する。
|
|
2686
|
+
*/
|
|
2548
2687
|
const emptyOptions = {
|
|
2549
2688
|
send: () => {},
|
|
2550
2689
|
publish: () => {},
|
|
@@ -2582,6 +2721,7 @@ function create(App, options) {
|
|
|
2582
2721
|
publish: options.publish,
|
|
2583
2722
|
data
|
|
2584
2723
|
};
|
|
2724
|
+
const destroyPreview = initPreview();
|
|
2585
2725
|
const handleDestroy = () => {
|
|
2586
2726
|
const { onDestroyHandlers } = getInternalHandlers();
|
|
2587
2727
|
onDestroyHandlers?.forEach((h$1) => {
|
|
@@ -2590,6 +2730,7 @@ function create(App, options) {
|
|
|
2590
2730
|
});
|
|
2591
2731
|
const { onDestroyHandlers: onDestroyWidgetHandlers } = getWidgetHandlers();
|
|
2592
2732
|
if (onDestroyWidgetHandlers) onDestroyWidgetHandlers.forEach((h$1) => h$1(actionProps));
|
|
2733
|
+
destroyPreview();
|
|
2593
2734
|
};
|
|
2594
2735
|
setSystem({
|
|
2595
2736
|
apiKey: data.api_key || null,
|
|
@@ -2731,8 +2872,7 @@ function validateFormData(formData$1, statePath) {
|
|
|
2731
2872
|
/** @internal */
|
|
2732
2873
|
const getValuesAreValidReadable = (statePath) => ({ subscribe(callback$5) {
|
|
2733
2874
|
return formData.subscribe((formData$1) => identifyFormData.subscribe((identifyFormData$1) => {
|
|
2734
|
-
|
|
2735
|
-
callback$5(valuesAreValid);
|
|
2875
|
+
callback$5(validateFormData(formData$1, statePath) && validateFormData(identifyFormData$1, statePath));
|
|
2736
2876
|
}));
|
|
2737
2877
|
} });
|
|
2738
2878
|
function createAnswerValue$1(value) {
|
|
@@ -2755,8 +2895,7 @@ function formDataToEventValues$1(campaignId, formData$1) {
|
|
|
2755
2895
|
}
|
|
2756
2896
|
function formDataToIdentifyEventValues$1(formData$1) {
|
|
2757
2897
|
return Object.fromEntries(Object.entries(formData$1).map(([name, dataItem]) => {
|
|
2758
|
-
|
|
2759
|
-
return [name, value];
|
|
2898
|
+
return [name, dataItem.value];
|
|
2760
2899
|
}));
|
|
2761
2900
|
}
|
|
2762
2901
|
/** @internal */
|
|
@@ -2877,6 +3016,9 @@ function sendAnswers() {
|
|
|
2877
3016
|
|
|
2878
3017
|
//#endregion
|
|
2879
3018
|
//#region src/widget.ts
|
|
3019
|
+
/**
|
|
3020
|
+
* エディタv1のWidget API 互換のインターフェース
|
|
3021
|
+
*/
|
|
2880
3022
|
var widget_exports = /* @__PURE__ */ __export({
|
|
2881
3023
|
collection: () => collection$1,
|
|
2882
3024
|
getState: () => getState$1,
|
|
@@ -3846,10 +3988,12 @@ function onSubmitForm(fn) {
|
|
|
3846
3988
|
|
|
3847
3989
|
//#endregion
|
|
3848
3990
|
//#region src/functions.ts
|
|
3991
|
+
/**
|
|
3992
|
+
* モーダル(ポップアップ)のコンポーネントが利用するコードの管理
|
|
3993
|
+
*/
|
|
3849
3994
|
function _moveTo(to) {
|
|
3850
|
-
const currentState = getState();
|
|
3851
3995
|
dispatchActionEvent(ACTION_CHANGE_STATE_EVENT, { detail: {
|
|
3852
|
-
from:
|
|
3996
|
+
from: getState(),
|
|
3853
3997
|
to,
|
|
3854
3998
|
actionId
|
|
3855
3999
|
} });
|
|
@@ -4018,36 +4162,12 @@ const haveFunction = (onClickOperation) => {
|
|
|
4018
4162
|
function getAnimation(animation) {
|
|
4019
4163
|
switch (animation.type) {
|
|
4020
4164
|
case "fade": return `opacity: ${animation.progress}`;
|
|
4021
|
-
case "bounce": {
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
}
|
|
4026
|
-
case "
|
|
4027
|
-
const translateX = animation.x;
|
|
4028
|
-
const translateY = animation.y - 100 * (1 - animation.progress);
|
|
4029
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4030
|
-
}
|
|
4031
|
-
case "slide-up": {
|
|
4032
|
-
const translateX = animation.x;
|
|
4033
|
-
const translateY = animation.y + 100 * (1 - animation.progress);
|
|
4034
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4035
|
-
}
|
|
4036
|
-
case "slide-left": {
|
|
4037
|
-
const translateX = animation.x + 100 * (1 - animation.progress);
|
|
4038
|
-
const translateY = animation.y;
|
|
4039
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4040
|
-
}
|
|
4041
|
-
case "slide-right": {
|
|
4042
|
-
const translateX = animation.x - 100 * (1 - animation.progress);
|
|
4043
|
-
const translateY = animation.y;
|
|
4044
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4045
|
-
}
|
|
4046
|
-
case "none": {
|
|
4047
|
-
const translateX = animation.x;
|
|
4048
|
-
const translateY = animation.y;
|
|
4049
|
-
return `transform: translate3d(${translateX}%, ${translateY}%, 0);`;
|
|
4050
|
-
}
|
|
4165
|
+
case "bounce": return `transform: translate3d(${animation.x}%, ${animation.y}%, 0) scale(${animation.progress});`;
|
|
4166
|
+
case "slide-down": return `transform: translate3d(${animation.x}%, ${animation.y - 100 * (1 - animation.progress)}%, 0);`;
|
|
4167
|
+
case "slide-up": return `transform: translate3d(${animation.x}%, ${animation.y + 100 * (1 - animation.progress)}%, 0);`;
|
|
4168
|
+
case "slide-left": return `transform: translate3d(${animation.x + 100 * (1 - animation.progress)}%, ${animation.y}%, 0);`;
|
|
4169
|
+
case "slide-right": return `transform: translate3d(${animation.x - 100 * (1 - animation.progress)}%, ${animation.y}%, 0);`;
|
|
4170
|
+
case "none": return `transform: translate3d(${animation.x}%, ${animation.y}%, 0);`;
|
|
4051
4171
|
default:
|
|
4052
4172
|
console.warn(`[action-sdk] invalid '${animation}', so we use 'transform: none' instead`);
|
|
4053
4173
|
return "transform: none";
|
|
@@ -4198,6 +4318,10 @@ var BackgroundOverlay_default$1 = BackgroundOverlay$1;
|
|
|
4198
4318
|
|
|
4199
4319
|
//#endregion
|
|
4200
4320
|
//#region src/enhancedStopPropagation.ts
|
|
4321
|
+
/**
|
|
4322
|
+
* data属性とカスタムのイベントハンドラによるstopPropagation。
|
|
4323
|
+
* デフォルトのstopPropagationだと伝播先のpreventDefaultも無効化されてしまうため、それの対策。
|
|
4324
|
+
*/
|
|
4201
4325
|
function createDataAttrKey(eventName) {
|
|
4202
4326
|
return `data-stop-propagation-${eventName}-${actionId}`;
|
|
4203
4327
|
}
|
|
@@ -5266,10 +5390,7 @@ function instance$103($$self, $$props, $$invalidate) {
|
|
|
5266
5390
|
let elasticStyle = ElasticityStyle[isPreview() ? "none" : elasticity];
|
|
5267
5391
|
if (!useBreakPoint) modalStyles.add(elasticStyle);
|
|
5268
5392
|
DEVICE_IDS.forEach((deviceId) => {
|
|
5269
|
-
if (!isPreview() && useBreakPoint)
|
|
5270
|
-
const elasticityWithBp = breakPoint[deviceId]?.elasticity;
|
|
5271
|
-
elasticStyle = ElasticityStyle[elasticityWithBp];
|
|
5272
|
-
}
|
|
5393
|
+
if (!isPreview() && useBreakPoint) elasticStyle = ElasticityStyle[breakPoint[deviceId]?.elasticity];
|
|
5273
5394
|
const elasticityVariables = stringifyStyleObj(formatObjectKey({
|
|
5274
5395
|
obj: parseStyle(elasticStyle),
|
|
5275
5396
|
prefix: "--modal-bp-",
|
|
@@ -6823,12 +6944,11 @@ function instance$93($$self, $$props, $$invalidate) {
|
|
|
6823
6944
|
let domRef = null;
|
|
6824
6945
|
function sendMovieEvent(event_name, values = {}) {
|
|
6825
6946
|
if (!sendEvent) return;
|
|
6826
|
-
|
|
6947
|
+
send_event(event_name, {
|
|
6827
6948
|
campaign_id: $system.campaignId,
|
|
6828
6949
|
shorten_id: $system.shortenId,
|
|
6829
6950
|
...values
|
|
6830
|
-
};
|
|
6831
|
-
send_event(event_name, sentValues);
|
|
6951
|
+
});
|
|
6832
6952
|
}
|
|
6833
6953
|
function sendPlaytime() {
|
|
6834
6954
|
if (!startDate) return;
|
|
@@ -7091,12 +7211,11 @@ function instance$92($$self, $$props, $$invalidate) {
|
|
|
7091
7211
|
let domRef = null;
|
|
7092
7212
|
function sendMovieEvent(event_name, values = {}) {
|
|
7093
7213
|
if (!sendEvent) return;
|
|
7094
|
-
|
|
7214
|
+
send_event(event_name, {
|
|
7095
7215
|
campaign_id: $system.campaignId,
|
|
7096
7216
|
shorten_id: $system.shortenId,
|
|
7097
7217
|
...values
|
|
7098
|
-
};
|
|
7099
|
-
send_event(event_name, sentValues);
|
|
7218
|
+
});
|
|
7100
7219
|
}
|
|
7101
7220
|
function sendPlaytime() {
|
|
7102
7221
|
if (!startDate) return;
|
|
@@ -9439,8 +9558,7 @@ function instance$83($$self, $$props, $$invalidate) {
|
|
|
9439
9558
|
if (!moving) return;
|
|
9440
9559
|
if (previousMove) {
|
|
9441
9560
|
const dx = clientX - previousMove.clientX;
|
|
9442
|
-
|
|
9443
|
-
moveSpeed = dx / dt;
|
|
9561
|
+
moveSpeed = dx / (timeStamp - previousMove.timeStamp);
|
|
9444
9562
|
const updatedSlidePosition = slidePosition + dx;
|
|
9445
9563
|
window.requestAnimationFrame(() => {
|
|
9446
9564
|
$$invalidate(28, slidePosition = updatedSlidePosition);
|
|
@@ -11541,29 +11659,25 @@ const toCssOverflow = (p) => {
|
|
|
11541
11659
|
function createComponentRawCss(layerId, define) {
|
|
11542
11660
|
const rootSelector = `[data-layer-id="${layerId}"]`;
|
|
11543
11661
|
const gen = (selector, styles) => {
|
|
11544
|
-
|
|
11545
|
-
const body = Object.entries(styles).map(([k, v]) => {
|
|
11662
|
+
return `${rootSelector}${selector.startsWith("&") ? selector.slice(1) : ` ${selector}`} {\n${Object.entries(styles).map(([k, v]) => {
|
|
11546
11663
|
if (!v) return "";
|
|
11547
11664
|
return `${k.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase())}: ${v};`;
|
|
11548
|
-
}).filter((v) => v !== "").join("\n")
|
|
11549
|
-
return `${rootSelector}${childSelector} {\n${body}\n}`;
|
|
11665
|
+
}).filter((v) => v !== "").join("\n")}\n}`;
|
|
11550
11666
|
};
|
|
11551
11667
|
return define(gen).join("\n");
|
|
11552
11668
|
}
|
|
11553
11669
|
function toResponsiveSelector(responsiveSetting, body) {
|
|
11554
|
-
const {
|
|
11555
|
-
|
|
11556
|
-
|
|
11670
|
+
const { breakpointId } = responsiveSetting;
|
|
11671
|
+
const breakpoint = getBreakpoints().find((v) => v.id === breakpointId);
|
|
11672
|
+
if (breakpoint && breakpoint.mediaQuery) {
|
|
11673
|
+
const { maxWidth, minWidth, orientation } = breakpoint.mediaQuery;
|
|
11557
11674
|
const prefix = `@media screen and`;
|
|
11558
|
-
if (raw) return `${prefix} (${raw}) {\n${body}\n}`;
|
|
11559
11675
|
const orientationStyle = orientation ? ` and (orientation: ${orientation})` : "";
|
|
11560
|
-
if (
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
else if (range.min) return `${prefix} (min-width: ${range.min}px)${orientationStyle} {\n${body}\n}`;
|
|
11564
|
-
}
|
|
11676
|
+
if (minWidth && maxWidth) return `${prefix} (min-width: ${minWidth}px)${orientationStyle} and (max-width: ${maxWidth}px) {\n${body}\n}`;
|
|
11677
|
+
else if (maxWidth) return `${prefix} (max-width: ${maxWidth}px)${orientationStyle} {\n${body}\n}`;
|
|
11678
|
+
else if (minWidth) return `${prefix} (min-width: ${minWidth}px)${orientationStyle} {\n${body}\n}`;
|
|
11565
11679
|
return "";
|
|
11566
|
-
}
|
|
11680
|
+
}
|
|
11567
11681
|
return "";
|
|
11568
11682
|
}
|
|
11569
11683
|
function toStyleTag(css) {
|
|
@@ -11613,11 +11727,7 @@ var Avatar_css_default = (layerId, props) => {
|
|
|
11613
11727
|
appearance: "none"
|
|
11614
11728
|
}),
|
|
11615
11729
|
toDynamicStyle$3(layerId, props),
|
|
11616
|
-
...props.responsiveSettings?.map((v) =>
|
|
11617
|
-
if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$3(layerId, v.props));
|
|
11618
|
-
else if (v.userAgentCondition) return "";
|
|
11619
|
-
return "";
|
|
11620
|
-
}) ?? [],
|
|
11730
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$3(layerId, v.props))) ?? [],
|
|
11621
11731
|
props.customizeCss
|
|
11622
11732
|
]);
|
|
11623
11733
|
};
|
|
@@ -11743,57 +11853,25 @@ var StylePortal = class extends SvelteComponent {
|
|
|
11743
11853
|
var StylePortal_default = StylePortal;
|
|
11744
11854
|
|
|
11745
11855
|
//#endregion
|
|
11746
|
-
//#region src/components-flex/
|
|
11747
|
-
const USER_AGENT_VARIANT = {
|
|
11748
|
-
smartphone: { regex: /iPhone|Android.*Mobile/i },
|
|
11749
|
-
tablet: { regex: /iPad|Android(?!.*Mobile)/i },
|
|
11750
|
-
pc: { regex: /Windows NT|Macintosh|Linux x86_64/i },
|
|
11751
|
-
windows: { regex: /Windows NT/i },
|
|
11752
|
-
mac: { regex: /Macintosh|Mac OS X/i },
|
|
11753
|
-
ios: { regex: /iPhone|iPad|iPod/i },
|
|
11754
|
-
android: { regex: /Android/i },
|
|
11755
|
-
safari: { regex: /Safari/i },
|
|
11756
|
-
chrome: { regex: /Chrome|CriOS/i },
|
|
11757
|
-
firefox: { regex: /Firefox/i },
|
|
11758
|
-
ios_webview: { regex: /iPhone|iPad|iPod/i },
|
|
11759
|
-
android_webview: { regex: /; wv\)/i }
|
|
11760
|
-
};
|
|
11856
|
+
//#region src/components-flex/responsiveProp.ts
|
|
11761
11857
|
const isMatchMediaQueryCondition = (condition) => {
|
|
11762
|
-
const {
|
|
11858
|
+
const { minWidth, maxWidth, orientation } = condition;
|
|
11763
11859
|
if (orientation) return window.matchMedia(`(orientation: ${condition.orientation})`).matches;
|
|
11764
|
-
if (
|
|
11765
|
-
|
|
11766
|
-
|
|
11767
|
-
else if (typeof min === "number") return window.matchMedia(`(min-width: ${min}px)`).matches;
|
|
11768
|
-
else if (typeof max === "number") return window.matchMedia(`(max-width: ${max}px)`).matches;
|
|
11769
|
-
}
|
|
11770
|
-
if (raw) return window.matchMedia(raw).matches;
|
|
11771
|
-
return false;
|
|
11772
|
-
};
|
|
11773
|
-
const isMatchUserAgentCondition = (condition) => {
|
|
11774
|
-
const { variants, regex } = condition;
|
|
11775
|
-
if (variants) return variants.some((variant) => {
|
|
11776
|
-
const regex$1 = USER_AGENT_VARIANT[variant]?.regex;
|
|
11777
|
-
if (!regex$1) return false;
|
|
11778
|
-
return new RegExp(regex$1).test(navigator.userAgent);
|
|
11779
|
-
});
|
|
11780
|
-
else if (regex) return new RegExp(regex).test(navigator.userAgent);
|
|
11860
|
+
if (typeof minWidth === "number" && typeof maxWidth === "number") return window.matchMedia(`(min-width: ${minWidth}px) and (max-width: ${maxWidth}px)`).matches;
|
|
11861
|
+
else if (typeof minWidth === "number") return window.matchMedia(`(min-width: ${minWidth}px)`).matches;
|
|
11862
|
+
else if (typeof maxWidth === "number") return window.matchMedia(`(max-width: ${maxWidth}px)`).matches;
|
|
11781
11863
|
return false;
|
|
11782
11864
|
};
|
|
11783
|
-
const isMatchResponsiveSetting = (setting) => {
|
|
11784
|
-
const { mediaQueryCondition, userAgentCondition } = setting;
|
|
11785
|
-
if (mediaQueryCondition) return isMatchMediaQueryCondition(mediaQueryCondition);
|
|
11786
|
-
else if (userAgentCondition) return isMatchUserAgentCondition(userAgentCondition);
|
|
11787
|
-
else return false;
|
|
11788
|
-
};
|
|
11789
11865
|
function useResponsiveProps(props) {
|
|
11790
11866
|
return readable(props, (set) => {
|
|
11791
11867
|
if (!props.responsiveSettings) {
|
|
11792
11868
|
set(props);
|
|
11793
11869
|
return () => {};
|
|
11794
11870
|
}
|
|
11871
|
+
const breakpoints$1 = getBreakpoints();
|
|
11795
11872
|
const update = () => {
|
|
11796
|
-
const
|
|
11873
|
+
const breakpoint = breakpoints$1.find((v) => v.mediaQuery && isMatchMediaQueryCondition(v.mediaQuery));
|
|
11874
|
+
const matchedSetting = props.responsiveSettings.find((v) => v.breakpointId === breakpoint?.id);
|
|
11797
11875
|
if (matchedSetting) set(Object.assign({}, props, matchedSetting.props ?? {}));
|
|
11798
11876
|
else set(props);
|
|
11799
11877
|
};
|
|
@@ -14218,14 +14296,10 @@ var Icon_css_default = (layerId, props, _brandKit) => {
|
|
|
14218
14296
|
style("&[aria-disabled=\"true\"]:hover", { opacity: "0.24" }),
|
|
14219
14297
|
style("&[aria-hidden=\"true\"]", { display: "none" }),
|
|
14220
14298
|
toDynamicStyle$2(layerId, props),
|
|
14221
|
-
...props.responsiveSettings?.map((v) => {
|
|
14222
|
-
|
|
14223
|
-
|
|
14224
|
-
|
|
14225
|
-
}));
|
|
14226
|
-
else if (v.userAgentCondition) return "";
|
|
14227
|
-
return "";
|
|
14228
|
-
}) ?? [],
|
|
14299
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$2(layerId, {
|
|
14300
|
+
variant: v.props.variant ?? props.variant,
|
|
14301
|
+
...v.props
|
|
14302
|
+
}))) ?? [],
|
|
14229
14303
|
props.customizeCss
|
|
14230
14304
|
]);
|
|
14231
14305
|
};
|
|
@@ -14448,8 +14522,7 @@ var Icon_default = Icon;
|
|
|
14448
14522
|
//#region src/components-flex/styles.ts
|
|
14449
14523
|
const getPropStyles = (callback$5) => {
|
|
14450
14524
|
return (customBrandKit) => {
|
|
14451
|
-
|
|
14452
|
-
return callback$5({ brandKit });
|
|
14525
|
+
return callback$5({ brandKit: getBrandKit(customBrandKit) });
|
|
14453
14526
|
};
|
|
14454
14527
|
};
|
|
14455
14528
|
|
|
@@ -14641,11 +14714,7 @@ var Button_css_default = (layerId, props, brandKit) => {
|
|
|
14641
14714
|
marginRight: "-0.2em"
|
|
14642
14715
|
}),
|
|
14643
14716
|
toDynamicStyle$1(layerId, props, brandKit),
|
|
14644
|
-
...props.responsiveSettings?.map((v) =>
|
|
14645
|
-
if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$1(layerId, v.props, brandKit));
|
|
14646
|
-
else if (v.userAgentCondition) return "";
|
|
14647
|
-
return "";
|
|
14648
|
-
}) ?? [],
|
|
14717
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$1(layerId, v.props, brandKit))) ?? [],
|
|
14649
14718
|
props.customizeCss
|
|
14650
14719
|
]);
|
|
14651
14720
|
};
|
|
@@ -16434,11 +16503,7 @@ var Layout_css_default = (layerId, props, brandKit) => {
|
|
|
16434
16503
|
style("&[data-clickable=\"true\"]", { cursor: "pointer" }),
|
|
16435
16504
|
style("&[data-clickable=\"true\"]:hover", { opacity: .8 }),
|
|
16436
16505
|
toDynamicStyle$4(props),
|
|
16437
|
-
...props.responsiveSettings?.map((v) =>
|
|
16438
|
-
if (v.mediaQueryCondition) return toResponsiveSelector(v, toDynamicStyle$4(v.props));
|
|
16439
|
-
else if (v.userAgentCondition) return "";
|
|
16440
|
-
return "";
|
|
16441
|
-
}) ?? [],
|
|
16506
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$4(v.props))) ?? [],
|
|
16442
16507
|
props.customizeCss
|
|
16443
16508
|
]);
|
|
16444
16509
|
};
|
|
@@ -17443,14 +17508,10 @@ var Text_css_default = (layerId, props, brandKit) => {
|
|
|
17443
17508
|
wordBreak: "break-all"
|
|
17444
17509
|
}),
|
|
17445
17510
|
toDynamicStyle$4(props),
|
|
17446
|
-
...props.responsiveSettings?.map((v) => {
|
|
17447
|
-
|
|
17448
|
-
|
|
17449
|
-
|
|
17450
|
-
}));
|
|
17451
|
-
else if (v.userAgentCondition) return "";
|
|
17452
|
-
return "";
|
|
17453
|
-
}) ?? [],
|
|
17511
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle$4({
|
|
17512
|
+
...v.props,
|
|
17513
|
+
content: v.props.content ?? props.content
|
|
17514
|
+
}))) ?? [],
|
|
17454
17515
|
props.customizeCss
|
|
17455
17516
|
]);
|
|
17456
17517
|
};
|
|
@@ -17780,14 +17841,10 @@ var TextLink_css_default = (layerId, props, brandKit) => {
|
|
|
17780
17841
|
style("&[aria-disabled=\"true\"]:hover", { opacity: "0.24" }),
|
|
17781
17842
|
style("&[aria-hidden=\"true\"]", { display: "none" }),
|
|
17782
17843
|
toDynamicStyle(layerId, props, brandKit),
|
|
17783
|
-
...props.responsiveSettings?.map((v) => {
|
|
17784
|
-
|
|
17785
|
-
|
|
17786
|
-
|
|
17787
|
-
}, brandKit));
|
|
17788
|
-
else if (v.userAgentCondition) return "";
|
|
17789
|
-
return "";
|
|
17790
|
-
}) ?? [],
|
|
17844
|
+
...props.responsiveSettings?.map((v) => toResponsiveSelector(v, toDynamicStyle(layerId, {
|
|
17845
|
+
...v.props,
|
|
17846
|
+
label: v.props.label ?? props.label
|
|
17847
|
+
}, brandKit))) ?? [],
|
|
17791
17848
|
props.customizeCss
|
|
17792
17849
|
]);
|
|
17793
17850
|
};
|
|
@@ -19843,15 +19900,11 @@ function calcRemainingTime(limit) {
|
|
|
19843
19900
|
return limit - (/* @__PURE__ */ new Date()).getTime();
|
|
19844
19901
|
}
|
|
19845
19902
|
function formatTimeDiff(ms) {
|
|
19846
|
-
const diffDay = Math.floor(ms / 1e3 / 60 / 60 / 24);
|
|
19847
|
-
const diffHour = Math.floor(ms / 1e3 / 60 / 60) % 24;
|
|
19848
|
-
const diffMin = Math.floor(ms / 1e3 / 60) % 60;
|
|
19849
|
-
const diffSec = Math.floor(ms / 1e3) % 60;
|
|
19850
19903
|
return {
|
|
19851
|
-
day:
|
|
19852
|
-
hour:
|
|
19853
|
-
min:
|
|
19854
|
-
sec:
|
|
19904
|
+
day: Math.floor(ms / 1e3 / 60 / 60 / 24),
|
|
19905
|
+
hour: Math.floor(ms / 1e3 / 60 / 60) % 24,
|
|
19906
|
+
min: Math.floor(ms / 1e3 / 60) % 60,
|
|
19907
|
+
sec: Math.floor(ms / 1e3) % 60
|
|
19855
19908
|
};
|
|
19856
19909
|
}
|
|
19857
19910
|
function instance$16($$self, $$props, $$invalidate) {
|
|
@@ -19948,24 +20001,22 @@ const useText = (props, layerId) => {
|
|
|
19948
20001
|
fontWeight: getFontWeight()
|
|
19949
20002
|
};
|
|
19950
20003
|
};
|
|
19951
|
-
const escapedHTML = props.content.replace(/&/g, "<").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\n/g, "<br />");
|
|
19952
|
-
const style = objToStyle({
|
|
19953
|
-
position: props?.position ?? "static",
|
|
19954
|
-
textAlign: props.align,
|
|
19955
|
-
width: props.width,
|
|
19956
|
-
fontFamily: `"${fontFamily}"`,
|
|
19957
|
-
color: getColor(),
|
|
19958
|
-
...getCssSize(),
|
|
19959
|
-
...toCssRadius(props),
|
|
19960
|
-
...toCssBackground(props),
|
|
19961
|
-
...toCssCommon(props),
|
|
19962
|
-
...toCssPosition(props),
|
|
19963
|
-
...toCssPadding(props),
|
|
19964
|
-
...toCssBorder(props)
|
|
19965
|
-
});
|
|
19966
20004
|
return {
|
|
19967
|
-
escapedHTML,
|
|
19968
|
-
style
|
|
20005
|
+
escapedHTML: props.content.replace(/&/g, "<").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\n/g, "<br />"),
|
|
20006
|
+
style: objToStyle({
|
|
20007
|
+
position: props?.position ?? "static",
|
|
20008
|
+
textAlign: props.align,
|
|
20009
|
+
width: props.width,
|
|
20010
|
+
fontFamily: `"${fontFamily}"`,
|
|
20011
|
+
color: getColor(),
|
|
20012
|
+
...getCssSize(),
|
|
20013
|
+
...toCssRadius(props),
|
|
20014
|
+
...toCssBackground(props),
|
|
20015
|
+
...toCssCommon(props),
|
|
20016
|
+
...toCssPosition(props),
|
|
20017
|
+
...toCssPadding(props),
|
|
20018
|
+
...toCssBorder(props)
|
|
20019
|
+
})
|
|
19969
20020
|
};
|
|
19970
20021
|
};
|
|
19971
20022
|
|
|
@@ -20280,7 +20331,7 @@ function create_fragment$14(ctx) {
|
|
|
20280
20331
|
}
|
|
20281
20332
|
function instance$14($$self, $$props, $$invalidate) {
|
|
20282
20333
|
let rProps;
|
|
20283
|
-
let $
|
|
20334
|
+
let $responsiveSettings;
|
|
20284
20335
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
20285
20336
|
let { props = {} } = $$props;
|
|
20286
20337
|
let { layerId = crypto.randomUUID() } = $$props;
|
|
@@ -20288,8 +20339,8 @@ function instance$14($$self, $$props, $$invalidate) {
|
|
|
20288
20339
|
let buttonElement;
|
|
20289
20340
|
let showTooltip = false;
|
|
20290
20341
|
const cssCode = ClipCopy_css_default(layerId, props);
|
|
20291
|
-
const
|
|
20292
|
-
component_subscribe($$self,
|
|
20342
|
+
const responsiveSettings = useResponsiveProps(props);
|
|
20343
|
+
component_subscribe($$self, responsiveSettings, (value) => $$invalidate(8, $responsiveSettings = value));
|
|
20293
20344
|
const handleClick = async (e) => {
|
|
20294
20345
|
e.preventDefault();
|
|
20295
20346
|
const targetText = rProps.content ?? buttonElement?.innerText ?? "";
|
|
@@ -20318,7 +20369,7 @@ function instance$14($$self, $$props, $$invalidate) {
|
|
|
20318
20369
|
if ("$$scope" in $$props$1) $$invalidate(9, $$scope = $$props$1.$$scope);
|
|
20319
20370
|
};
|
|
20320
20371
|
$$self.$$.update = () => {
|
|
20321
|
-
if ($$self.$$.dirty & 256) $: $$invalidate(3, rProps = $
|
|
20372
|
+
if ($$self.$$.dirty & 256) $: $$invalidate(3, rProps = $responsiveSettings);
|
|
20322
20373
|
};
|
|
20323
20374
|
return [
|
|
20324
20375
|
layerId,
|
|
@@ -20326,10 +20377,10 @@ function instance$14($$self, $$props, $$invalidate) {
|
|
|
20326
20377
|
showTooltip,
|
|
20327
20378
|
rProps,
|
|
20328
20379
|
cssCode,
|
|
20329
|
-
|
|
20380
|
+
responsiveSettings,
|
|
20330
20381
|
handleClick,
|
|
20331
20382
|
props,
|
|
20332
|
-
$
|
|
20383
|
+
$responsiveSettings,
|
|
20333
20384
|
$$scope,
|
|
20334
20385
|
slots,
|
|
20335
20386
|
button_binding
|
|
@@ -20948,8 +20999,8 @@ function create_fragment$10(ctx) {
|
|
|
20948
20999
|
let current;
|
|
20949
21000
|
let if_block = ctx[0] && create_if_block$3(ctx);
|
|
20950
21001
|
header = new Header_default({});
|
|
20951
|
-
const default_slot_template = ctx[
|
|
20952
|
-
const default_slot = create_slot(default_slot_template, ctx, ctx[
|
|
21002
|
+
const default_slot_template = ctx[4].default;
|
|
21003
|
+
const default_slot = create_slot(default_slot_template, ctx, ctx[3], null);
|
|
20953
21004
|
return {
|
|
20954
21005
|
c() {
|
|
20955
21006
|
if (if_block) if_block.c();
|
|
@@ -20991,7 +21042,7 @@ function create_fragment$10(ctx) {
|
|
|
20991
21042
|
check_outros();
|
|
20992
21043
|
}
|
|
20993
21044
|
if (default_slot) {
|
|
20994
|
-
if (default_slot.p && (!current || dirty &
|
|
21045
|
+
if (default_slot.p && (!current || dirty & 8)) update_slot_base(default_slot, default_slot_template, ctx$1, ctx$1[3], !current ? get_all_dirty_from_scope(ctx$1[3]) : get_slot_changes(default_slot_template, ctx$1[3], dirty, null), null);
|
|
20995
21046
|
}
|
|
20996
21047
|
},
|
|
20997
21048
|
i(local) {
|
|
@@ -21020,15 +21071,19 @@ function instance$10($$self, $$props, $$invalidate) {
|
|
|
21020
21071
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
21021
21072
|
let { customBrandKit = void 0 } = $$props;
|
|
21022
21073
|
let { globalCssCode = void 0 } = $$props;
|
|
21074
|
+
let { breakpoints: breakpoints$1 = [] } = $$props;
|
|
21023
21075
|
setContext("brandKit", getBrandKit(customBrandKit));
|
|
21076
|
+
setBreakpoints(breakpoints$1);
|
|
21024
21077
|
$$self.$$set = ($$props$1) => {
|
|
21025
21078
|
if ("customBrandKit" in $$props$1) $$invalidate(1, customBrandKit = $$props$1.customBrandKit);
|
|
21026
21079
|
if ("globalCssCode" in $$props$1) $$invalidate(0, globalCssCode = $$props$1.globalCssCode);
|
|
21027
|
-
if ("
|
|
21080
|
+
if ("breakpoints" in $$props$1) $$invalidate(2, breakpoints$1 = $$props$1.breakpoints);
|
|
21081
|
+
if ("$$scope" in $$props$1) $$invalidate(3, $$scope = $$props$1.$$scope);
|
|
21028
21082
|
};
|
|
21029
21083
|
return [
|
|
21030
21084
|
globalCssCode,
|
|
21031
21085
|
customBrandKit,
|
|
21086
|
+
breakpoints$1,
|
|
21032
21087
|
$$scope,
|
|
21033
21088
|
slots
|
|
21034
21089
|
];
|
|
@@ -21038,7 +21093,8 @@ var State = class extends SvelteComponent {
|
|
|
21038
21093
|
super();
|
|
21039
21094
|
init(this, options, instance$10, create_fragment$10, safe_not_equal, {
|
|
21040
21095
|
customBrandKit: 1,
|
|
21041
|
-
globalCssCode: 0
|
|
21096
|
+
globalCssCode: 0,
|
|
21097
|
+
breakpoints: 2
|
|
21042
21098
|
});
|
|
21043
21099
|
}
|
|
21044
21100
|
};
|
|
@@ -23327,7 +23383,6 @@ var index_svelte5_exports = /* @__PURE__ */ __export({
|
|
|
23327
23383
|
TEXT_THEME: () => TEXT_THEME,
|
|
23328
23384
|
TEXT_VARIANTS: () => TEXT_VARIANTS,
|
|
23329
23385
|
TextDirections: () => TextDirections,
|
|
23330
|
-
USER_AGENT_VARIANT: () => USER_AGENT_VARIANT,
|
|
23331
23386
|
WritingModes: () => WritingModes,
|
|
23332
23387
|
addChoiceAnswer: () => addChoiceAnswer,
|
|
23333
23388
|
addFreeAnswer: () => addFreeAnswer,
|
|
@@ -23378,6 +23433,7 @@ var index_svelte5_exports = /* @__PURE__ */ __export({
|
|
|
23378
23433
|
getVariables: () => getVariables,
|
|
23379
23434
|
hideOnScroll: () => hideOnScroll,
|
|
23380
23435
|
hideOnTime: () => hideOnTime,
|
|
23436
|
+
initPreview: () => initPreview,
|
|
23381
23437
|
initialize: () => initialize,
|
|
23382
23438
|
isOpened: () => isOpened,
|
|
23383
23439
|
listenLogger: () => listenLogger,
|
|
@@ -23735,4 +23791,4 @@ var ThumbnailPreview = class extends SvelteComponent {
|
|
|
23735
23791
|
var ThumbnailPreview_default = ThumbnailPreview;
|
|
23736
23792
|
|
|
23737
23793
|
//#endregion
|
|
23738
|
-
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, Box_default as Box, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, CodeElement_default as CodeElement, Countdown_default as Countdown, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement_default as EmbedElement, 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, Flex_default as Flex, Avatar_default as FlexAvatar, Button_default as FlexButton, ButtonOutlined_default as FlexButtonOutlined, ButtonText_default as FlexButtonText, ClipCopy_default as FlexClipCopy, CloseButton_default as FlexCloseButton, Code_default as FlexCode, CountDown_default as FlexCountDown, CountDownValue_default as FlexCountDownValue, FlexDirections, Form_default as FlexForm, FormField_default as FlexFormField, Icon_default as FlexIcon, Image_default as FlexImage, FlexItem_default as FlexItem, Layout_default as FlexLayout, List_default as FlexList, ListItem_default as FlexListItem, Modal_default as FlexModal, MultiColumn_default as FlexMultiColumn, MultiColumnItem_default as FlexMultiColumnItem, RichText_default as FlexRichText, Slider_default as FlexSlider, SliderItem_default as FlexSliderItem, Text_default as FlexText, TextLink_default as FlexTextLink, Youtube_default as FlexYoutube, Fonts, FormCheckBoxes_default as FormCheckBoxes, FormIdentifyBooleanFields, FormIdentifyChoices_default as FormIdentifyChoices, FormIdentifyInput_default as FormIdentifyInput, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, FormRadioButtons_default as FormRadioButtons, FormRatingButtonsFace_default as FormRatingButtonsFace, FormRatingButtonsNumber_default as FormRatingButtonsNumber, FormSelect_default as FormSelect, FormTextarea_default as FormTextarea, Grid_default as Grid, GridItem_default as GridItem, GridModalState_default as GridModalState, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, IconElement_default as IconElement, ImageBlock_default as ImageBlock, ImageElement_default as ImageElement, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LIST_ITEM_CONTEXT_KEY, LengthUnits, List_default$1 as List, ListBackgroundTypes, ListDirections, ListItem_default$1 as ListItem, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, Modal_default$1 as Modal, ModalPositions, MovieVimeoElement_default as MovieVimeoElement, MovieYouTubeElement_default as MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, Slide_default as Slide, SlideItem_default as SlideItem, State_default as State, StateItem_default as StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextBlock_default as TextBlock, TextButtonBlock_default as TextButtonBlock, TextButtonElement_default as TextButtonElement, TextDirections, TextElement_default as TextElement, ThumbnailPreview_default as ThumbnailPreview, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection, create, createApp, createFog, createProp, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, flexComponentSchemes, formData, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, 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, onTime, removeAnswer, resetEventHandlers, resetVariables, sendAnswer, sendAnswers, setEventHandlers, setSetting, setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, useBrandKit, variables, widget_exports as widget };
|
|
23794
|
+
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, Box_default as Box, CLOSE_BUTTON_LABEL_PLACEMENT, CLOSE_BUTTON_PLACEMENT, CLOSE_BUTTON_ROUND, ClipPaths, CodeElement_default as CodeElement, Countdown_default as Countdown, Cursors, DefaultEdgePosition, DefaultElasticity, DefaultFormButtonColor, DefaultFormIdentifyBooleanField, DefaultFormIdentifyTextField, DefaultListBackground, DefaultListBackgroundNone, DefaultListBackgroundStripe, DefaultListSeparator, DefaultListSeparatorBorder, DefaultListSeparatorGap, DefaultListSeparatorNone, DefaultModalBreakPoint, DefaultModalPlacement, DefaultSlideButton, DefaultSlideNavigationButton, Directions, Elasticities, ElasticityStyle, EmbedElement_default as EmbedElement, 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, Flex_default as Flex, Avatar_default as FlexAvatar, Button_default as FlexButton, ButtonOutlined_default as FlexButtonOutlined, ButtonText_default as FlexButtonText, ClipCopy_default as FlexClipCopy, CloseButton_default as FlexCloseButton, Code_default as FlexCode, CountDown_default as FlexCountDown, CountDownValue_default as FlexCountDownValue, FlexDirections, Form_default as FlexForm, FormField_default as FlexFormField, Icon_default as FlexIcon, Image_default as FlexImage, FlexItem_default as FlexItem, Layout_default as FlexLayout, List_default as FlexList, ListItem_default as FlexListItem, Modal_default as FlexModal, MultiColumn_default as FlexMultiColumn, MultiColumnItem_default as FlexMultiColumnItem, RichText_default as FlexRichText, Slider_default as FlexSlider, SliderItem_default as FlexSliderItem, Text_default as FlexText, TextLink_default as FlexTextLink, Youtube_default as FlexYoutube, Fonts, FormCheckBoxes_default as FormCheckBoxes, FormIdentifyBooleanFields, FormIdentifyChoices_default as FormIdentifyChoices, FormIdentifyInput_default as FormIdentifyInput, FormIdentifyTextFieldPlaceholders, FormIdentifyTextFieldValidations, FormIdentifyTextFields, FormRadioButtons_default as FormRadioButtons, FormRatingButtonsFace_default as FormRatingButtonsFace, FormRatingButtonsNumber_default as FormRatingButtonsNumber, FormSelect_default as FormSelect, FormTextarea_default as FormTextarea, Grid_default as Grid, GridItem_default as GridItem, GridModalState_default as GridModalState, ICON_SIZE, ICON_SIZE_STYLES, ICON_VARIANTS, IMAGE_ASPECT_VARIANTS, IMAGE_ROUND_SHAPE, IMAGE_ROUND_STYLES, IconElement_default as IconElement, ImageBlock_default as ImageBlock, ImageElement_default as ImageElement, Justifies, KARTE_MODAL_ROOT, LAYER_TEXT_SIZE, LAYOUT_ALIGN, LAYOUT_COMPONENT_NAMES, LAYOUT_DIRECTION, LAYOUT_DISPLAY_TYPE, LAYOUT_JUSTIFY, LIST_ITEM_CONTEXT_KEY, LengthUnits, List_default$1 as List, ListBackgroundTypes, ListDirections, ListItem_default$1 as ListItem, ListSeparatorTypes, MULTI_COLUMN_ITEM_CONTEXT_KEY, MediaQueries, Modal_default$1 as Modal, ModalPositions, MovieVimeoElement_default as MovieVimeoElement, MovieYouTubeElement_default as MovieYouTubeElement, ObjectFits, OnClickOperationOptions, Overflows, PropTypes, ROUND_STYLES, ROUND_VARIANT, Repeats, SHADOW_VARIANT, SHADOW_VARIANTS, SYSTEM_FONT, Slide_default as Slide, SlideItem_default as SlideItem, State_default as State, StateItem_default as StateItem, TEXT_LINK_SIZE, TEXT_LINK_SIZE_STYLES, TEXT_LINK_THEME, TEXT_LINK_UNDERLINE, TEXT_STYLE, TEXT_THEME, TEXT_VARIANTS, TextBlock_default as TextBlock, TextButtonBlock_default as TextButtonBlock, TextButtonElement_default as TextButtonElement, TextDirections, TextElement_default as TextElement, ThumbnailPreview_default as ThumbnailPreview, WritingModes, addChoiceAnswer, addFreeAnswer, afterUpdate, applyCss, applyGlobalCss, beforeUpdate, buttonOutlinedPropsDefault, buttonPropsDefault, close, closeAction, collection, create, createApp, createFog, createProp, destroy, destroyAction, ensureModalRoot, eventHandlers, finalize, flexComponentSchemes, formData, getActionRoot, getAnsweredQuestion, getAnsweredQuestionIds, getBrandKit, getButtonOutlinedThemeStyles, getButtonTextThemeStyles, getButtonThemeStyles, getCssVariables, getEventHandlers, getEvents, getLogs, getState, getStates, getSystem, getTextLinkThemeStyles, getTextThemeStyles, getVariables, hideOnScroll, hideOnTime, initPreview, initialize, isOpened, listenLogger, loadActionTable, loadActionTableQuery, loadActionTableRow, loadActionTableRows, loadGlobalScript, loadGlobalStyle, loadStyle, logger, onChangeState, onClose, onCreate, onDestory, onDestroy, onMount, onScroll, onShow, onTime, removeAnswer, resetEventHandlers, resetVariables, sendAnswer, sendAnswers, setEventHandlers, setSetting, setState, setVariables, show, showAction, showModal, showOnScroll, showOnTime, state, tick, useBrandKit, variables, widget_exports as widget };
|