@plaidev/karte-action-sdk 1.0.39 → 1.0.42
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/index.es.d.ts +114 -21
- package/dist/index.es.js +117 -52
- package/package.json +1 -1
package/dist/index.es.d.ts
CHANGED
|
@@ -2,25 +2,6 @@
|
|
|
2
2
|
* UIから選択できる関数
|
|
3
3
|
*/
|
|
4
4
|
import { Writable } from "svelte/store";
|
|
5
|
-
type OPTIONS = {
|
|
6
|
-
send?: (event_name: string, values?: any) => void;
|
|
7
|
-
isPreview?: boolean;
|
|
8
|
-
initialState?: string;
|
|
9
|
-
};
|
|
10
|
-
declare const state: Writable<string>;
|
|
11
|
-
declare const closed: Writable<boolean>;
|
|
12
|
-
declare const maximumZindex: Writable<number>;
|
|
13
|
-
declare const initialize: (options?: OPTIONS) => () => void;
|
|
14
|
-
declare const finalize: () => void;
|
|
15
|
-
declare const send_event: (event_name: string, values?: any) => void;
|
|
16
|
-
declare const isPreview: () => boolean;
|
|
17
|
-
declare const setMiximumZindex: (zindex?: number) => void;
|
|
18
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
19
|
-
declare const none: () => () => void;
|
|
20
|
-
declare const moveTo: (to: string) => () => void;
|
|
21
|
-
declare const linkTo: (to: string, targetBlank?: boolean) => () => void;
|
|
22
|
-
declare const closeApp: () => () => void;
|
|
23
|
-
declare const _default: "dummy";
|
|
24
5
|
declare const PropTypes: readonly [
|
|
25
6
|
"BooleanKeyword",
|
|
26
7
|
"NumberKeyword",
|
|
@@ -37,7 +18,9 @@ declare const PropTypes: readonly [
|
|
|
37
18
|
"Color",
|
|
38
19
|
"Alignment",
|
|
39
20
|
"State",
|
|
40
|
-
"Style"
|
|
21
|
+
"Style",
|
|
22
|
+
"ModalPlacement",
|
|
23
|
+
"OnClick"
|
|
41
24
|
];
|
|
42
25
|
type PropType = typeof PropTypes[number];
|
|
43
26
|
type Code = string;
|
|
@@ -171,6 +154,96 @@ type ModalPlacement<M = ModalMargin> = {
|
|
|
171
154
|
backgroundOverlay?: boolean;
|
|
172
155
|
};
|
|
173
156
|
declare const DefaultModalPlacement: Required<ModalPlacement<Required<ModalMargin>>>;
|
|
157
|
+
type I18nLabel<Locale extends string = "ja" | "en"> = {
|
|
158
|
+
[K in Locale]?: string;
|
|
159
|
+
};
|
|
160
|
+
type BaseOperationOptions = ReadonlyArray<{
|
|
161
|
+
name: I18nLabel;
|
|
162
|
+
operation: string;
|
|
163
|
+
args: ReadonlyArray<{
|
|
164
|
+
name: I18nLabel;
|
|
165
|
+
type: keyof OperationArgumentTypes;
|
|
166
|
+
default: any;
|
|
167
|
+
}>;
|
|
168
|
+
}>;
|
|
169
|
+
type OperationArgumentTypes = {
|
|
170
|
+
StringKeyword: string;
|
|
171
|
+
BooleanKeyword: boolean;
|
|
172
|
+
NumberKeyword: number;
|
|
173
|
+
State: string;
|
|
174
|
+
};
|
|
175
|
+
type ConvertOperationOptions<O extends BaseOperationOptions> = ConvertOperationOption<O[number]>;
|
|
176
|
+
type ConvertOperationOption<Option extends BaseOperationOptions[number]> = Option extends any ? {
|
|
177
|
+
operation: Option["operation"];
|
|
178
|
+
args: ConvertOperationOptionArguments<Option["args"]>;
|
|
179
|
+
} : never;
|
|
180
|
+
type ConvertOperationOptionArguments<Arguments extends BaseOperationOptions[number]["args"]> = {
|
|
181
|
+
-readonly [Index in keyof Arguments]: Arguments[Index] extends BaseOperationOptions[number]["args"][number] ? OperationArgumentTypes[Arguments[Index]["type"]] : never;
|
|
182
|
+
};
|
|
183
|
+
type Operation = ConvertOperationOptions<ReadonlyArray<any>>;
|
|
184
|
+
declare const OnClickOperationOptions: readonly [
|
|
185
|
+
{
|
|
186
|
+
readonly name: {
|
|
187
|
+
readonly ja: "\u64CD\u4F5C\u306A\u3057";
|
|
188
|
+
readonly en: "No Operation";
|
|
189
|
+
};
|
|
190
|
+
readonly operation: "none";
|
|
191
|
+
readonly args: readonly [
|
|
192
|
+
];
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
readonly name: {
|
|
196
|
+
readonly ja: "\u30EA\u30F3\u30AF\u9077\u79FB";
|
|
197
|
+
readonly en: "Link To";
|
|
198
|
+
};
|
|
199
|
+
readonly operation: "linkTo";
|
|
200
|
+
readonly args: readonly [
|
|
201
|
+
{
|
|
202
|
+
readonly name: {
|
|
203
|
+
readonly ja: "URL\u3092\u5165\u529B";
|
|
204
|
+
readonly en: "Enter URL";
|
|
205
|
+
};
|
|
206
|
+
readonly type: "StringKeyword";
|
|
207
|
+
readonly default: "";
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
readonly name: {
|
|
211
|
+
readonly ja: "\u65B0\u3057\u3044\u30BF\u30D6\u3067\u958B\u304F";
|
|
212
|
+
readonly en: "Open in new tab";
|
|
213
|
+
};
|
|
214
|
+
readonly type: "BooleanKeyword";
|
|
215
|
+
readonly default: true;
|
|
216
|
+
}
|
|
217
|
+
];
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
readonly name: {
|
|
221
|
+
readonly ja: "\u30B9\u30C6\u30FC\u30C8\u9077\u79FB";
|
|
222
|
+
readonly en: "Move To";
|
|
223
|
+
};
|
|
224
|
+
readonly operation: "moveTo";
|
|
225
|
+
readonly args: readonly [
|
|
226
|
+
{
|
|
227
|
+
readonly name: {
|
|
228
|
+
readonly ja: "\u30B9\u30C6\u30FC\u30C8\u3092\u9078\u629E";
|
|
229
|
+
readonly en: "State";
|
|
230
|
+
};
|
|
231
|
+
readonly type: "State";
|
|
232
|
+
readonly default: "/";
|
|
233
|
+
}
|
|
234
|
+
];
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
readonly name: {
|
|
238
|
+
readonly ja: "\u9589\u3058\u308B";
|
|
239
|
+
readonly en: "Close";
|
|
240
|
+
};
|
|
241
|
+
readonly operation: "closeApp";
|
|
242
|
+
readonly args: readonly [
|
|
243
|
+
];
|
|
244
|
+
}
|
|
245
|
+
];
|
|
246
|
+
type OnClickOperation = ConvertOperationOptions<typeof OnClickOperationOptions>;
|
|
174
247
|
type LongText = string;
|
|
175
248
|
type Url = string;
|
|
176
249
|
type Image = string;
|
|
@@ -218,6 +291,26 @@ declare const BackgroundSizes: readonly [
|
|
|
218
291
|
type BackgroundSize = typeof BackgroundSizes[number];
|
|
219
292
|
type Style = string;
|
|
220
293
|
type StateName = string;
|
|
294
|
+
type OPTIONS = {
|
|
295
|
+
send?: (event_name: string, values?: any) => void;
|
|
296
|
+
isPreview?: boolean;
|
|
297
|
+
initialState?: string;
|
|
298
|
+
};
|
|
299
|
+
declare const state: Writable<string>;
|
|
300
|
+
declare const closed: Writable<boolean>;
|
|
301
|
+
declare const maximumZindex: Writable<number>;
|
|
302
|
+
declare const initialize: (options?: OPTIONS) => () => void;
|
|
303
|
+
declare const finalize: () => void;
|
|
304
|
+
declare const send_event: (event_name: string, values?: any) => void;
|
|
305
|
+
declare const isPreview: () => boolean;
|
|
306
|
+
declare const setMiximumZindex: (zindex?: number) => void;
|
|
307
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
308
|
+
declare const none: () => () => void;
|
|
309
|
+
declare const moveTo: (to: string) => () => void;
|
|
310
|
+
declare const linkTo: (to: string, targetBlank?: boolean) => () => void;
|
|
311
|
+
declare const closeApp: () => () => void;
|
|
312
|
+
declare const execOnClickOperation: (onClickOperation: OnClickOperation) => void;
|
|
313
|
+
declare const _default: "dummy";
|
|
221
314
|
declare const handleFocus: (node: HTMLElement | null) => (e: any) => void;
|
|
222
315
|
declare const setPreviousFocus: () => void;
|
|
223
316
|
declare const handleKeydown: (handlers: {
|
|
@@ -275,7 +368,7 @@ declare const collection: (config: {
|
|
|
275
368
|
} | null | undefined, cb: (err: Error | null, items?: any) => void): void;
|
|
276
369
|
set(key: string, value: string, cb: (err: Error | null) => void): void;
|
|
277
370
|
};
|
|
278
|
-
export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, _default, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getMarginStyle, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, AnimationStyleTranslations, ModalPositions, ModalPosition, ModalPositionTranslations, ModalMarginTranslations, ModalMargin, ModalPlacement, DefaultModalPlacement, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, BackgroundSizes, BackgroundSize, Style, StateName, hideOnScroll, hideOnTime, showOnScroll, showOnTime, ensureModalRoot, h, createFog, EmbedLogic, embed, collection };
|
|
371
|
+
export { state, closed, maximumZindex, initialize, finalize, send_event, isPreview, setMiximumZindex, none, moveTo, linkTo, closeApp, execOnClickOperation, _default, handleFocus, setPreviousFocus, handleKeydown, getPositionStyle, getMarginStyle, onScroll, onTime, hasSuffix, toBr, randStr, PropTypes, PropType, Code, MediaQueries, MediaQuery, Directions, Direction, AnimationStyles, AnimationStyle, AnimationStyleTranslations, ModalPositions, ModalPosition, ModalPositionTranslations, ModalMarginTranslations, ModalMargin, ModalPlacement, DefaultModalPlacement, Operation, OnClickOperationOptions, OnClickOperation, LongText, Url, Image, LengthUnits, LengthUnit, Length, Color, Justifies, Justify, Alignments, Alignment, ObjectFits, ObjectFit, Repeats, Repeat, BackgroundSizes, BackgroundSize, Style, StateName, hideOnScroll, hideOnTime, showOnScroll, showOnTime, ensureModalRoot, h, createFog, EmbedLogic, embed, collection };
|
|
279
372
|
export { default as State } from './components/State.svelte';
|
|
280
373
|
export { default as StateItem } from './components/StateItem.svelte';
|
|
281
374
|
export { default as Modal } from './components/Modal.svelte';
|
package/dist/index.es.js
CHANGED
|
@@ -162,6 +162,17 @@ const closeApp = () => () => {
|
|
|
162
162
|
send_event('message_close', null);
|
|
163
163
|
closed.set(true);
|
|
164
164
|
};
|
|
165
|
+
const execOnClickOperation = (onClickOperation) => {
|
|
166
|
+
if (onClickOperation.operation === 'linkTo') {
|
|
167
|
+
linkTo(...onClickOperation.args)();
|
|
168
|
+
}
|
|
169
|
+
else if (onClickOperation.operation === 'moveTo') {
|
|
170
|
+
moveTo(...onClickOperation.args)();
|
|
171
|
+
}
|
|
172
|
+
else if (onClickOperation.operation === 'closeApp') {
|
|
173
|
+
closeApp()();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
165
176
|
|
|
166
177
|
const PropTypes = [
|
|
167
178
|
'BooleanKeyword',
|
|
@@ -180,6 +191,8 @@ const PropTypes = [
|
|
|
180
191
|
'Alignment',
|
|
181
192
|
'State',
|
|
182
193
|
'Style',
|
|
194
|
+
'ModalPlacement',
|
|
195
|
+
'OnClick',
|
|
183
196
|
];
|
|
184
197
|
const MediaQueries = {
|
|
185
198
|
PC: '(\\s*min-width\\s*:\\s*1025px\\s*)',
|
|
@@ -304,6 +317,27 @@ const DefaultModalPlacement = {
|
|
|
304
317
|
},
|
|
305
318
|
backgroundOverlay: false,
|
|
306
319
|
};
|
|
320
|
+
const OnClickOperationOptions = [
|
|
321
|
+
{ name: { ja: '操作なし', en: 'No Operation' }, operation: 'none', args: [] },
|
|
322
|
+
{
|
|
323
|
+
name: { ja: 'リンク遷移', en: 'Link To' },
|
|
324
|
+
operation: 'linkTo',
|
|
325
|
+
args: [
|
|
326
|
+
{ name: { ja: 'URLを入力', en: 'Enter URL' }, type: 'StringKeyword', default: '' },
|
|
327
|
+
{
|
|
328
|
+
name: { ja: '新しいタブで開く', en: 'Open in new tab' },
|
|
329
|
+
type: 'BooleanKeyword',
|
|
330
|
+
default: true,
|
|
331
|
+
},
|
|
332
|
+
],
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
name: { ja: 'ステート遷移', en: 'Move To' },
|
|
336
|
+
operation: 'moveTo',
|
|
337
|
+
args: [{ name: { ja: 'ステートを選択', en: 'State' }, type: 'State', default: '/' }],
|
|
338
|
+
},
|
|
339
|
+
{ name: { ja: '閉じる', en: 'Close' }, operation: 'closeApp', args: [] },
|
|
340
|
+
];
|
|
307
341
|
const LengthUnits = ['px', 'em', 'rem', 'vw', 'fr', '%'];
|
|
308
342
|
const Justifies = ['flex-start', 'center', 'flex-end'];
|
|
309
343
|
const Alignments = ['flex-start', 'center', 'flex-end'];
|
|
@@ -873,7 +907,7 @@ function add_css$6(target) {
|
|
|
873
907
|
append_styles(target, "svelte-1bxl6mz", ".modal.svelte-1bxl6mz{position:fixed;box-sizing:border-box;z-index:2147483647}.close.svelte-1bxl6mz{position:absolute;display:flex;justify-content:center;align-items:center;background-color:transparent;border:none;cursor:pointer;padding:0;transition:all 0.25s}.close.svelte-1bxl6mz:hover{transform:rotate(90deg)}");
|
|
874
908
|
}
|
|
875
909
|
|
|
876
|
-
// (
|
|
910
|
+
// (148:4) {#if closable}
|
|
877
911
|
function create_if_block(ctx) {
|
|
878
912
|
let button;
|
|
879
913
|
let svg;
|
|
@@ -925,7 +959,7 @@ function create_if_block(ctx) {
|
|
|
925
959
|
};
|
|
926
960
|
}
|
|
927
961
|
|
|
928
|
-
// (
|
|
962
|
+
// (135:0) <Animation {animation}>
|
|
929
963
|
function create_default_slot$1(ctx) {
|
|
930
964
|
let div;
|
|
931
965
|
let t;
|
|
@@ -934,8 +968,8 @@ function create_default_slot$1(ctx) {
|
|
|
934
968
|
let mounted;
|
|
935
969
|
let dispose;
|
|
936
970
|
let if_block = /*closable*/ ctx[2] && create_if_block(ctx);
|
|
937
|
-
const default_slot_template = /*#slots*/ ctx[
|
|
938
|
-
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[
|
|
971
|
+
const default_slot_template = /*#slots*/ ctx[22].default;
|
|
972
|
+
const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[24], null);
|
|
939
973
|
|
|
940
974
|
return {
|
|
941
975
|
c() {
|
|
@@ -957,7 +991,7 @@ function create_default_slot$1(ctx) {
|
|
|
957
991
|
default_slot.m(div, null);
|
|
958
992
|
}
|
|
959
993
|
|
|
960
|
-
/*div_binding*/ ctx[
|
|
994
|
+
/*div_binding*/ ctx[23](div);
|
|
961
995
|
current = true;
|
|
962
996
|
|
|
963
997
|
if (!mounted) {
|
|
@@ -980,15 +1014,15 @@ function create_default_slot$1(ctx) {
|
|
|
980
1014
|
}
|
|
981
1015
|
|
|
982
1016
|
if (default_slot) {
|
|
983
|
-
if (default_slot.p && (!current || dirty & /*$$scope*/
|
|
1017
|
+
if (default_slot.p && (!current || dirty & /*$$scope*/ 16777216)) {
|
|
984
1018
|
update_slot_base(
|
|
985
1019
|
default_slot,
|
|
986
1020
|
default_slot_template,
|
|
987
1021
|
ctx,
|
|
988
|
-
/*$$scope*/ ctx[
|
|
1022
|
+
/*$$scope*/ ctx[24],
|
|
989
1023
|
!current
|
|
990
|
-
? get_all_dirty_from_scope(/*$$scope*/ ctx[
|
|
991
|
-
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[
|
|
1024
|
+
? get_all_dirty_from_scope(/*$$scope*/ ctx[24])
|
|
1025
|
+
: get_slot_changes(default_slot_template, /*$$scope*/ ctx[24], dirty, null),
|
|
992
1026
|
null
|
|
993
1027
|
);
|
|
994
1028
|
}
|
|
@@ -1011,7 +1045,7 @@ function create_default_slot$1(ctx) {
|
|
|
1011
1045
|
if (detaching) detach(div);
|
|
1012
1046
|
if (if_block) if_block.d();
|
|
1013
1047
|
if (default_slot) default_slot.d(detaching);
|
|
1014
|
-
/*div_binding*/ ctx[
|
|
1048
|
+
/*div_binding*/ ctx[23](null);
|
|
1015
1049
|
mounted = false;
|
|
1016
1050
|
dispose();
|
|
1017
1051
|
}
|
|
@@ -1066,7 +1100,7 @@ function create_fragment$8(ctx) {
|
|
|
1066
1100
|
const animation_1_changes = {};
|
|
1067
1101
|
if (dirty & /*animation*/ 1) animation_1_changes.animation = /*animation*/ ctx[0];
|
|
1068
1102
|
|
|
1069
|
-
if (dirty & /*$$scope, pos, marginStyle, _style, modal, $maximumZindex, _closeStyle, closeButtonColor, closable*/
|
|
1103
|
+
if (dirty & /*$$scope, pos, marginStyle, _style, modal, $maximumZindex, _closeStyle, closeButtonColor, closable*/ 16777982) {
|
|
1070
1104
|
animation_1_changes.$$scope = { dirty, ctx };
|
|
1071
1105
|
}
|
|
1072
1106
|
|
|
@@ -1102,6 +1136,11 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
1102
1136
|
let $maximumZindex;
|
|
1103
1137
|
component_subscribe($$self, maximumZindex, $$value => $$invalidate(9, $maximumZindex = $$value));
|
|
1104
1138
|
let { $$slots: slots = {}, $$scope } = $$props;
|
|
1139
|
+
let { onClick = { operation: 'none', args: [] } } = $$props;
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* {"hidden": true}
|
|
1143
|
+
*/
|
|
1105
1144
|
const dispatchClick = createEventDispatcher();
|
|
1106
1145
|
|
|
1107
1146
|
const click = () => {
|
|
@@ -1109,7 +1148,11 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
1109
1148
|
send_event(clickEventName, clickEventValue);
|
|
1110
1149
|
}
|
|
1111
1150
|
|
|
1112
|
-
|
|
1151
|
+
if (onClick.operation !== 'none') {
|
|
1152
|
+
execOnClickOperation(onClick);
|
|
1153
|
+
} else {
|
|
1154
|
+
dispatchClick('click');
|
|
1155
|
+
}
|
|
1113
1156
|
};
|
|
1114
1157
|
|
|
1115
1158
|
let { clickEventName = '' } = $$props;
|
|
@@ -1118,9 +1161,10 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
1118
1161
|
let { animation = 'none' } = $$props;
|
|
1119
1162
|
let { _style = '' } = $$props;
|
|
1120
1163
|
let { closable = true } = $$props;
|
|
1164
|
+
let { onClose = { operation: 'none', args: [] } } = $$props;
|
|
1121
1165
|
|
|
1122
1166
|
/**
|
|
1123
|
-
* {"
|
|
1167
|
+
* {"hidden": true}
|
|
1124
1168
|
*/
|
|
1125
1169
|
const dispatchClose = createEventDispatcher();
|
|
1126
1170
|
|
|
@@ -1129,7 +1173,11 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
1129
1173
|
send_event(closeEventName, closeEventValue);
|
|
1130
1174
|
}
|
|
1131
1175
|
|
|
1132
|
-
|
|
1176
|
+
if (onClose.operation !== 'none') {
|
|
1177
|
+
execOnClickOperation(onClose);
|
|
1178
|
+
} else {
|
|
1179
|
+
dispatchClose('close');
|
|
1180
|
+
}
|
|
1133
1181
|
};
|
|
1134
1182
|
|
|
1135
1183
|
let { closeButtonColor = '#000000' } = $$props;
|
|
@@ -1148,36 +1196,38 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
1148
1196
|
}
|
|
1149
1197
|
|
|
1150
1198
|
$$self.$$set = $$props => {
|
|
1151
|
-
if ('
|
|
1152
|
-
if ('
|
|
1153
|
-
if ('
|
|
1199
|
+
if ('onClick' in $$props) $$invalidate(13, onClick = $$props.onClick);
|
|
1200
|
+
if ('clickEventName' in $$props) $$invalidate(14, clickEventName = $$props.clickEventName);
|
|
1201
|
+
if ('clickEventValue' in $$props) $$invalidate(15, clickEventValue = $$props.clickEventValue);
|
|
1202
|
+
if ('placement' in $$props) $$invalidate(16, placement = $$props.placement);
|
|
1154
1203
|
if ('animation' in $$props) $$invalidate(0, animation = $$props.animation);
|
|
1155
1204
|
if ('_style' in $$props) $$invalidate(1, _style = $$props._style);
|
|
1156
1205
|
if ('closable' in $$props) $$invalidate(2, closable = $$props.closable);
|
|
1206
|
+
if ('onClose' in $$props) $$invalidate(17, onClose = $$props.onClose);
|
|
1157
1207
|
if ('closeButtonColor' in $$props) $$invalidate(3, closeButtonColor = $$props.closeButtonColor);
|
|
1158
|
-
if ('closeEventName' in $$props) $$invalidate(
|
|
1159
|
-
if ('closeEventValue' in $$props) $$invalidate(
|
|
1208
|
+
if ('closeEventName' in $$props) $$invalidate(18, closeEventName = $$props.closeEventName);
|
|
1209
|
+
if ('closeEventValue' in $$props) $$invalidate(19, closeEventValue = $$props.closeEventValue);
|
|
1160
1210
|
if ('_closeStyle' in $$props) $$invalidate(4, _closeStyle = $$props._closeStyle);
|
|
1161
|
-
if ('$$scope' in $$props) $$invalidate(
|
|
1211
|
+
if ('$$scope' in $$props) $$invalidate(24, $$scope = $$props.$$scope);
|
|
1162
1212
|
};
|
|
1163
1213
|
|
|
1164
1214
|
$$self.$$.update = () => {
|
|
1165
|
-
if ($$self.$$.dirty & /*placement*/
|
|
1215
|
+
if ($$self.$$.dirty & /*placement*/ 65536) {
|
|
1166
1216
|
$$invalidate(8, backgroundOverray = placement && placement.backgroundOverlay != null
|
|
1167
1217
|
? placement.backgroundOverlay
|
|
1168
1218
|
: DefaultModalPlacement.backgroundOverlay);
|
|
1169
1219
|
}
|
|
1170
1220
|
|
|
1171
|
-
if ($$self.$$.dirty & /*placement*/
|
|
1172
|
-
$$invalidate(
|
|
1221
|
+
if ($$self.$$.dirty & /*placement*/ 65536) {
|
|
1222
|
+
$$invalidate(21, overwritePosition = isPreview()
|
|
1173
1223
|
? 'center'
|
|
1174
1224
|
: placement && placement.position != null
|
|
1175
1225
|
? placement.position
|
|
1176
1226
|
: DefaultModalPlacement.position);
|
|
1177
1227
|
}
|
|
1178
1228
|
|
|
1179
|
-
if ($$self.$$.dirty & /*placement*/
|
|
1180
|
-
$$invalidate(
|
|
1229
|
+
if ($$self.$$.dirty & /*placement*/ 65536) {
|
|
1230
|
+
$$invalidate(20, overwriteMargin = isPreview()
|
|
1181
1231
|
? {
|
|
1182
1232
|
left: '0px',
|
|
1183
1233
|
right: '0px',
|
|
@@ -1189,11 +1239,11 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
1189
1239
|
: DefaultModalPlacement.margin);
|
|
1190
1240
|
}
|
|
1191
1241
|
|
|
1192
|
-
if ($$self.$$.dirty & /*overwritePosition*/
|
|
1242
|
+
if ($$self.$$.dirty & /*overwritePosition*/ 2097152) {
|
|
1193
1243
|
$$invalidate(7, pos = getPositionStyle(overwritePosition));
|
|
1194
1244
|
}
|
|
1195
1245
|
|
|
1196
|
-
if ($$self.$$.dirty & /*overwriteMargin*/
|
|
1246
|
+
if ($$self.$$.dirty & /*overwriteMargin*/ 1048576) {
|
|
1197
1247
|
$$invalidate(6, marginStyle = getMarginStyle(overwriteMargin));
|
|
1198
1248
|
}
|
|
1199
1249
|
};
|
|
@@ -1212,9 +1262,11 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
1212
1262
|
click,
|
|
1213
1263
|
close,
|
|
1214
1264
|
handle_keydown,
|
|
1265
|
+
onClick,
|
|
1215
1266
|
clickEventName,
|
|
1216
1267
|
clickEventValue,
|
|
1217
1268
|
placement,
|
|
1269
|
+
onClose,
|
|
1218
1270
|
closeEventName,
|
|
1219
1271
|
closeEventValue,
|
|
1220
1272
|
overwriteMargin,
|
|
@@ -1236,15 +1288,17 @@ class Modal extends SvelteComponent {
|
|
|
1236
1288
|
create_fragment$8,
|
|
1237
1289
|
safe_not_equal,
|
|
1238
1290
|
{
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1291
|
+
onClick: 13,
|
|
1292
|
+
clickEventName: 14,
|
|
1293
|
+
clickEventValue: 15,
|
|
1294
|
+
placement: 16,
|
|
1242
1295
|
animation: 0,
|
|
1243
1296
|
_style: 1,
|
|
1244
1297
|
closable: 2,
|
|
1298
|
+
onClose: 17,
|
|
1245
1299
|
closeButtonColor: 3,
|
|
1246
|
-
closeEventName:
|
|
1247
|
-
closeEventValue:
|
|
1300
|
+
closeEventName: 18,
|
|
1301
|
+
closeEventValue: 19,
|
|
1248
1302
|
_closeStyle: 4
|
|
1249
1303
|
},
|
|
1250
1304
|
add_css$6
|
|
@@ -1417,7 +1471,7 @@ function create_default_slot_2(ctx) {
|
|
|
1417
1471
|
};
|
|
1418
1472
|
}
|
|
1419
1473
|
|
|
1420
|
-
// (
|
|
1474
|
+
// (118:2) <Modal {placement} {animation} {closable} {closeButtonColor} {_closeStyle} _style={_modalStyle} {clickEventName} {clickEventValue} on:click={click} {closeEventName} {closeEventValue} on:close={close} >
|
|
1421
1475
|
function create_default_slot_1(ctx) {
|
|
1422
1476
|
let grid;
|
|
1423
1477
|
let current;
|
|
@@ -1473,7 +1527,7 @@ function create_default_slot_1(ctx) {
|
|
|
1473
1527
|
};
|
|
1474
1528
|
}
|
|
1475
1529
|
|
|
1476
|
-
// (
|
|
1530
|
+
// (117:0) <StateItem {path}>
|
|
1477
1531
|
function create_default_slot(ctx) {
|
|
1478
1532
|
let modal;
|
|
1479
1533
|
let current;
|
|
@@ -2175,12 +2229,10 @@ function create_fragment$1(ctx) {
|
|
|
2175
2229
|
|
|
2176
2230
|
function instance$1($$self, $$props, $$invalidate) {
|
|
2177
2231
|
let { text = 'ボタンラベル' } = $$props;
|
|
2232
|
+
let { onClick = { operation: 'none', args: [] } } = $$props;
|
|
2178
2233
|
|
|
2179
2234
|
/**
|
|
2180
|
-
* {
|
|
2181
|
-
* "title": {"ja": "イベントタイプ", "en": "Event Type"},
|
|
2182
|
-
* "folder": {"ja": "クリックイベント", "en": "Click Event"}
|
|
2183
|
-
* }
|
|
2235
|
+
* {"hidden": true}
|
|
2184
2236
|
*/
|
|
2185
2237
|
const dispatch = createEventDispatcher();
|
|
2186
2238
|
|
|
@@ -2189,7 +2241,11 @@ function instance$1($$self, $$props, $$invalidate) {
|
|
|
2189
2241
|
send_event(eventName);
|
|
2190
2242
|
}
|
|
2191
2243
|
|
|
2192
|
-
|
|
2244
|
+
if (onClick.operation !== 'none') {
|
|
2245
|
+
execOnClickOperation(onClick);
|
|
2246
|
+
} else {
|
|
2247
|
+
dispatch('click');
|
|
2248
|
+
}
|
|
2193
2249
|
};
|
|
2194
2250
|
|
|
2195
2251
|
let { eventName = '' } = $$props;
|
|
@@ -2198,12 +2254,13 @@ function instance$1($$self, $$props, $$invalidate) {
|
|
|
2198
2254
|
|
|
2199
2255
|
$$self.$$set = $$props => {
|
|
2200
2256
|
if ('text' in $$props) $$invalidate(0, text = $$props.text);
|
|
2201
|
-
if ('
|
|
2257
|
+
if ('onClick' in $$props) $$invalidate(4, onClick = $$props.onClick);
|
|
2258
|
+
if ('eventName' in $$props) $$invalidate(5, eventName = $$props.eventName);
|
|
2202
2259
|
if ('_buttonStyle' in $$props) $$invalidate(1, _buttonStyle = $$props._buttonStyle);
|
|
2203
2260
|
if ('_style' in $$props) $$invalidate(2, _style = $$props._style);
|
|
2204
2261
|
};
|
|
2205
2262
|
|
|
2206
|
-
return [text, _buttonStyle, _style, click, eventName];
|
|
2263
|
+
return [text, _buttonStyle, _style, click, onClick, eventName];
|
|
2207
2264
|
}
|
|
2208
2265
|
|
|
2209
2266
|
class TextButtonBlock extends SvelteComponent {
|
|
@@ -2218,7 +2275,8 @@ class TextButtonBlock extends SvelteComponent {
|
|
|
2218
2275
|
safe_not_equal,
|
|
2219
2276
|
{
|
|
2220
2277
|
text: 0,
|
|
2221
|
-
|
|
2278
|
+
onClick: 4,
|
|
2279
|
+
eventName: 5,
|
|
2222
2280
|
_buttonStyle: 1,
|
|
2223
2281
|
_style: 2
|
|
2224
2282
|
},
|
|
@@ -2230,7 +2288,7 @@ class TextButtonBlock extends SvelteComponent {
|
|
|
2230
2288
|
/* src/components/ImageBlock.svelte generated by Svelte v3.44.1 */
|
|
2231
2289
|
|
|
2232
2290
|
function add_css(target) {
|
|
2233
|
-
append_styles(target, "svelte-
|
|
2291
|
+
append_styles(target, "svelte-wa67vf", ".image-block.svelte-wa67vf{display:flex;width:100%;height:100%;max-width:100%;max-height:100%;justify-content:center;align-items:center;overflow:hidden;box-sizing:border-box}.image.svelte-wa67vf{width:100%;height:100%}.transport.svelte-wa67vf:hover,.transport.svelte-wa67vf:focus{opacity:0.75;box-shadow:0 5px 16px rgba(0, 0, 0, 0.1), 0 8px 28px rgba(0, 0, 0, 0.16)}");
|
|
2234
2292
|
}
|
|
2235
2293
|
|
|
2236
2294
|
function create_fragment(ctx) {
|
|
@@ -2245,14 +2303,14 @@ function create_fragment(ctx) {
|
|
|
2245
2303
|
c() {
|
|
2246
2304
|
div = element("div");
|
|
2247
2305
|
img = element("img");
|
|
2248
|
-
attr(img, "class", "image svelte-
|
|
2306
|
+
attr(img, "class", "image svelte-wa67vf");
|
|
2249
2307
|
attr(img, "loading", "lazy");
|
|
2250
2308
|
attr(img, "width", "auto");
|
|
2251
2309
|
attr(img, "height", "auto");
|
|
2252
2310
|
attr(img, "style", /*_imageStyle*/ ctx[3]);
|
|
2253
2311
|
if (!src_url_equal(img.src, img_src_value = /*src*/ ctx[0])) attr(img, "src", img_src_value);
|
|
2254
2312
|
attr(img, "alt", /*alt*/ ctx[1]);
|
|
2255
|
-
attr(div, "class", div_class_value = "" + (null_to_empty(
|
|
2313
|
+
attr(div, "class", div_class_value = "" + (null_to_empty('image-block' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-wa67vf"));
|
|
2256
2314
|
attr(div, "style", /*_style*/ ctx[4]);
|
|
2257
2315
|
},
|
|
2258
2316
|
m(target, anchor) {
|
|
@@ -2277,7 +2335,7 @@ function create_fragment(ctx) {
|
|
|
2277
2335
|
attr(img, "alt", /*alt*/ ctx[1]);
|
|
2278
2336
|
}
|
|
2279
2337
|
|
|
2280
|
-
if (dirty & /*transport*/ 4 && div_class_value !== (div_class_value = "" + (null_to_empty(
|
|
2338
|
+
if (dirty & /*transport*/ 4 && div_class_value !== (div_class_value = "" + (null_to_empty('image-block' + (/*transport*/ ctx[2] ? ' transport' : '')) + " svelte-wa67vf"))) {
|
|
2281
2339
|
attr(div, "class", div_class_value);
|
|
2282
2340
|
}
|
|
2283
2341
|
|
|
@@ -2299,9 +2357,10 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
2299
2357
|
let { src = 'https://admin.karte.io/action-editor2/public/images/no_image_en.svg' } = $$props;
|
|
2300
2358
|
let { alt = 'No Image' } = $$props;
|
|
2301
2359
|
let { transport = false } = $$props;
|
|
2360
|
+
let { onClick = { operation: 'none', args: [] } } = $$props;
|
|
2302
2361
|
|
|
2303
2362
|
/**
|
|
2304
|
-
* {"
|
|
2363
|
+
* {"hidden": true}
|
|
2305
2364
|
*/
|
|
2306
2365
|
const dispatch = createEventDispatcher();
|
|
2307
2366
|
|
|
@@ -2310,7 +2369,11 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
2310
2369
|
send_event(eventName);
|
|
2311
2370
|
}
|
|
2312
2371
|
|
|
2313
|
-
|
|
2372
|
+
if (onClick.operation !== 'none') {
|
|
2373
|
+
execOnClickOperation(onClick);
|
|
2374
|
+
} else {
|
|
2375
|
+
dispatch('click');
|
|
2376
|
+
}
|
|
2314
2377
|
};
|
|
2315
2378
|
|
|
2316
2379
|
let { eventName = '' } = $$props;
|
|
@@ -2321,12 +2384,13 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
2321
2384
|
if ('src' in $$props) $$invalidate(0, src = $$props.src);
|
|
2322
2385
|
if ('alt' in $$props) $$invalidate(1, alt = $$props.alt);
|
|
2323
2386
|
if ('transport' in $$props) $$invalidate(2, transport = $$props.transport);
|
|
2324
|
-
if ('
|
|
2387
|
+
if ('onClick' in $$props) $$invalidate(6, onClick = $$props.onClick);
|
|
2388
|
+
if ('eventName' in $$props) $$invalidate(7, eventName = $$props.eventName);
|
|
2325
2389
|
if ('_imageStyle' in $$props) $$invalidate(3, _imageStyle = $$props._imageStyle);
|
|
2326
2390
|
if ('_style' in $$props) $$invalidate(4, _style = $$props._style);
|
|
2327
2391
|
};
|
|
2328
2392
|
|
|
2329
|
-
return [src, alt, transport, _imageStyle, _style, click, eventName];
|
|
2393
|
+
return [src, alt, transport, _imageStyle, _style, click, onClick, eventName];
|
|
2330
2394
|
}
|
|
2331
2395
|
|
|
2332
2396
|
class ImageBlock extends SvelteComponent {
|
|
@@ -2343,7 +2407,8 @@ class ImageBlock extends SvelteComponent {
|
|
|
2343
2407
|
src: 0,
|
|
2344
2408
|
alt: 1,
|
|
2345
2409
|
transport: 2,
|
|
2346
|
-
|
|
2410
|
+
onClick: 6,
|
|
2411
|
+
eventName: 7,
|
|
2347
2412
|
_imageStyle: 3,
|
|
2348
2413
|
_style: 4
|
|
2349
2414
|
},
|
|
@@ -2352,4 +2417,4 @@ class ImageBlock extends SvelteComponent {
|
|
|
2352
2417
|
}
|
|
2353
2418
|
}
|
|
2354
2419
|
|
|
2355
|
-
export { Alignments, AnimationStyleTranslations, AnimationStyles, BackgroundSizes, DefaultModalPlacement, Directions, Flex, FlexItem, Grid, GridItem, GridModalState, ImageBlock, Justifies, LengthUnits, MediaQueries, Modal, ModalMarginTranslations, ModalPositionTranslations, ModalPositions, ObjectFits, PropTypes, Repeats, State, StateItem, TextBlock, TextButtonBlock, closeApp, closed, collection, createFog, embed, ensureModalRoot, finalize, getMarginStyle, getPositionStyle, h, handleFocus, handleKeydown, hasSuffix, hideOnScroll, hideOnTime, initialize, isPreview, linkTo, maximumZindex, moveTo, none, onScroll, onTime, randStr, send_event, setMiximumZindex, setPreviousFocus, showOnScroll, showOnTime, state, toBr };
|
|
2420
|
+
export { Alignments, AnimationStyleTranslations, AnimationStyles, BackgroundSizes, DefaultModalPlacement, Directions, Flex, FlexItem, Grid, GridItem, GridModalState, ImageBlock, Justifies, LengthUnits, MediaQueries, Modal, ModalMarginTranslations, ModalPositionTranslations, ModalPositions, ObjectFits, OnClickOperationOptions, PropTypes, Repeats, State, StateItem, TextBlock, TextButtonBlock, closeApp, closed, collection, createFog, embed, ensureModalRoot, execOnClickOperation, finalize, getMarginStyle, getPositionStyle, h, handleFocus, handleKeydown, hasSuffix, hideOnScroll, hideOnTime, initialize, isPreview, linkTo, maximumZindex, moveTo, none, onScroll, onTime, randStr, send_event, setMiximumZindex, setPreviousFocus, showOnScroll, showOnTime, state, toBr };
|