@plaidev/karte-action-sdk 1.0.35 → 1.0.38

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.
@@ -165,12 +165,12 @@ type ModalMargin = {
165
165
  top?: string;
166
166
  bottom?: string;
167
167
  };
168
- type ModalPlacement = {
168
+ type ModalPlacement<M = ModalMargin> = {
169
169
  position?: ModalPosition;
170
- margin?: ModalMargin;
170
+ margin?: M;
171
171
  backgroundOverlay?: boolean;
172
172
  };
173
- declare const DefaultModalPlacement: ModalPlacement;
173
+ declare const DefaultModalPlacement: Required<ModalPlacement<Required<ModalMargin>>>;
174
174
  type LongText = string;
175
175
  type Url = string;
176
176
  type Image = string;
package/dist/index.es.js CHANGED
@@ -1706,7 +1706,7 @@ class GridModalState extends SvelteComponent {
1706
1706
  /* src/components/GridItem.svelte generated by Svelte v3.44.1 */
1707
1707
 
1708
1708
  function add_css$5(target) {
1709
- append_styles(target, "svelte-g0rfgr", ".grid-item.svelte-g0rfgr{word-break:break-all}");
1709
+ append_styles(target, "svelte-1pachgk", ".grid-item.svelte-1pachgk{word-break:break-all;overflow:hidden}");
1710
1710
  }
1711
1711
 
1712
1712
  function create_fragment$5(ctx) {
@@ -1719,7 +1719,7 @@ function create_fragment$5(ctx) {
1719
1719
  c() {
1720
1720
  div = element("div");
1721
1721
  if (default_slot) default_slot.c();
1722
- attr(div, "class", "grid-item svelte-g0rfgr");
1722
+ attr(div, "class", "grid-item svelte-1pachgk");
1723
1723
  attr(div, "style", /*_style*/ ctx[0]);
1724
1724
  },
1725
1725
  m(target, anchor) {
@@ -2068,7 +2068,7 @@ function create_fragment$2(ctx) {
2068
2068
  div0 = element("div");
2069
2069
  attr(div0, "class", "text-block-inner svelte-1xf20ux");
2070
2070
  attr(div1, "class", "text-block svelte-1xf20ux");
2071
- attr(div1, "style", /*_style*/ ctx[1]);
2071
+ attr(div1, "style", /*style*/ ctx[1]);
2072
2072
  },
2073
2073
  m(target, anchor) {
2074
2074
  insert(target, div1, anchor);
@@ -2077,8 +2077,8 @@ function create_fragment$2(ctx) {
2077
2077
  },
2078
2078
  p(ctx, [dirty]) {
2079
2079
  if (dirty & /*text*/ 1 && raw_value !== (raw_value = toBr(/*text*/ ctx[0]) + "")) div0.innerHTML = raw_value;
2080
- if (dirty & /*_style*/ 2) {
2081
- attr(div1, "style", /*_style*/ ctx[1]);
2080
+ if (dirty & /*style*/ 2) {
2081
+ attr(div1, "style", /*style*/ ctx[1]);
2082
2082
  }
2083
2083
  },
2084
2084
  i: noop,
@@ -2090,21 +2090,30 @@ function create_fragment$2(ctx) {
2090
2090
  }
2091
2091
 
2092
2092
  function instance$2($$self, $$props, $$invalidate) {
2093
+ let style;
2093
2094
  let { text = 'サンプルSample' } = $$props;
2094
- let { _style = 'font-size:12px;' } = $$props;
2095
+ let { _textStyle = 'font-size:12px;' } = $$props;
2096
+ let { _style = '' } = $$props;
2095
2097
 
2096
2098
  $$self.$$set = $$props => {
2097
2099
  if ('text' in $$props) $$invalidate(0, text = $$props.text);
2098
- if ('_style' in $$props) $$invalidate(1, _style = $$props._style);
2100
+ if ('_textStyle' in $$props) $$invalidate(2, _textStyle = $$props._textStyle);
2101
+ if ('_style' in $$props) $$invalidate(3, _style = $$props._style);
2102
+ };
2103
+
2104
+ $$self.$$.update = () => {
2105
+ if ($$self.$$.dirty & /*_textStyle, _style*/ 12) {
2106
+ $$invalidate(1, style = [..._textStyle.split(';'), ..._style.split(';')].join(';'));
2107
+ }
2099
2108
  };
2100
2109
 
2101
- return [text, _style];
2110
+ return [text, style, _textStyle, _style];
2102
2111
  }
2103
2112
 
2104
2113
  class TextBlock extends SvelteComponent {
2105
2114
  constructor(options) {
2106
2115
  super();
2107
- init(this, options, instance$2, create_fragment$2, safe_not_equal, { text: 0, _style: 1 }, add_css$2);
2116
+ init(this, options, instance$2, create_fragment$2, safe_not_equal, { text: 0, _textStyle: 2, _style: 3 }, add_css$2);
2108
2117
  }
2109
2118
  }
2110
2119
 
@@ -2217,13 +2226,14 @@ class TextButtonBlock extends SvelteComponent {
2217
2226
  /* src/components/ImageBlock.svelte generated by Svelte v3.44.1 */
2218
2227
 
2219
2228
  function add_css(target) {
2220
- append_styles(target, "svelte-95tcq4", ".image-block.svelte-95tcq4{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-95tcq4{width:100%;height:100%}");
2229
+ append_styles(target, "svelte-ci8ktf", ".image-block.svelte-ci8ktf{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-ci8ktf{width:100%;height:100%}.transport.svelte-ci8ktf:hover,.transport.svelte-ci8ktf:focus{opacity:.75;box-shadow:0 5px 16px rgba(0,0,0,.1), 0 8px 28px rgba(0,0,0,.16)}");
2221
2230
  }
2222
2231
 
2223
2232
  function create_fragment(ctx) {
2224
2233
  let div;
2225
2234
  let img;
2226
2235
  let img_src_value;
2236
+ let div_class_value;
2227
2237
  let mounted;
2228
2238
  let dispose;
2229
2239
 
@@ -2231,28 +2241,28 @@ function create_fragment(ctx) {
2231
2241
  c() {
2232
2242
  div = element("div");
2233
2243
  img = element("img");
2234
- attr(img, "class", "image svelte-95tcq4");
2244
+ attr(img, "class", "image svelte-ci8ktf");
2235
2245
  attr(img, "loading", "lazy");
2236
2246
  attr(img, "width", "auto");
2237
2247
  attr(img, "height", "auto");
2238
- attr(img, "style", /*_imageStyle*/ ctx[2]);
2248
+ attr(img, "style", /*_imageStyle*/ ctx[3]);
2239
2249
  if (!src_url_equal(img.src, img_src_value = /*src*/ ctx[0])) attr(img, "src", img_src_value);
2240
2250
  attr(img, "alt", /*alt*/ ctx[1]);
2241
- attr(div, "class", "image-block svelte-95tcq4");
2242
- attr(div, "style", /*_style*/ ctx[3]);
2251
+ attr(div, "class", div_class_value = "" + (null_to_empty("image-block" + (/*transport*/ ctx[2] ? " transport" : "")) + " svelte-ci8ktf"));
2252
+ attr(div, "style", /*_style*/ ctx[4]);
2243
2253
  },
2244
2254
  m(target, anchor) {
2245
2255
  insert(target, div, anchor);
2246
2256
  append(div, img);
2247
2257
 
2248
2258
  if (!mounted) {
2249
- dispose = listen(div, "click", /*click*/ ctx[4]);
2259
+ dispose = listen(div, "click", /*click*/ ctx[5]);
2250
2260
  mounted = true;
2251
2261
  }
2252
2262
  },
2253
2263
  p(ctx, [dirty]) {
2254
- if (dirty & /*_imageStyle*/ 4) {
2255
- attr(img, "style", /*_imageStyle*/ ctx[2]);
2264
+ if (dirty & /*_imageStyle*/ 8) {
2265
+ attr(img, "style", /*_imageStyle*/ ctx[3]);
2256
2266
  }
2257
2267
 
2258
2268
  if (dirty & /*src*/ 1 && !src_url_equal(img.src, img_src_value = /*src*/ ctx[0])) {
@@ -2263,8 +2273,12 @@ function create_fragment(ctx) {
2263
2273
  attr(img, "alt", /*alt*/ ctx[1]);
2264
2274
  }
2265
2275
 
2266
- if (dirty & /*_style*/ 8) {
2267
- attr(div, "style", /*_style*/ ctx[3]);
2276
+ if (dirty & /*transport*/ 4 && div_class_value !== (div_class_value = "" + (null_to_empty("image-block" + (/*transport*/ ctx[2] ? " transport" : "")) + " svelte-ci8ktf"))) {
2277
+ attr(div, "class", div_class_value);
2278
+ }
2279
+
2280
+ if (dirty & /*_style*/ 16) {
2281
+ attr(div, "style", /*_style*/ ctx[4]);
2268
2282
  }
2269
2283
  },
2270
2284
  i: noop,
@@ -2280,6 +2294,7 @@ function create_fragment(ctx) {
2280
2294
  function instance($$self, $$props, $$invalidate) {
2281
2295
  let { src = 'https://admin.karte.io/action-editor2/public/images/no_image_en.svg' } = $$props;
2282
2296
  let { alt = 'No Image' } = $$props;
2297
+ let { transport = false } = $$props;
2283
2298
 
2284
2299
  /**
2285
2300
  * {"title": {"ja": "イベントタイプ", "en": "Event Type"}, "folder": {"ja": "クリックイベント", "en": "Click Event"}}
@@ -2301,12 +2316,13 @@ function instance($$self, $$props, $$invalidate) {
2301
2316
  $$self.$$set = $$props => {
2302
2317
  if ('src' in $$props) $$invalidate(0, src = $$props.src);
2303
2318
  if ('alt' in $$props) $$invalidate(1, alt = $$props.alt);
2304
- if ('eventName' in $$props) $$invalidate(5, eventName = $$props.eventName);
2305
- if ('_imageStyle' in $$props) $$invalidate(2, _imageStyle = $$props._imageStyle);
2306
- if ('_style' in $$props) $$invalidate(3, _style = $$props._style);
2319
+ if ('transport' in $$props) $$invalidate(2, transport = $$props.transport);
2320
+ if ('eventName' in $$props) $$invalidate(6, eventName = $$props.eventName);
2321
+ if ('_imageStyle' in $$props) $$invalidate(3, _imageStyle = $$props._imageStyle);
2322
+ if ('_style' in $$props) $$invalidate(4, _style = $$props._style);
2307
2323
  };
2308
2324
 
2309
- return [src, alt, _imageStyle, _style, click, eventName];
2325
+ return [src, alt, transport, _imageStyle, _style, click, eventName];
2310
2326
  }
2311
2327
 
2312
2328
  class ImageBlock extends SvelteComponent {
@@ -2322,9 +2338,10 @@ class ImageBlock extends SvelteComponent {
2322
2338
  {
2323
2339
  src: 0,
2324
2340
  alt: 1,
2325
- eventName: 5,
2326
- _imageStyle: 2,
2327
- _style: 3
2341
+ transport: 2,
2342
+ eventName: 6,
2343
+ _imageStyle: 3,
2344
+ _style: 4
2328
2345
  },
2329
2346
  add_css
2330
2347
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.0.35",
3
+ "version": "1.0.38",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",