@plaidev/karte-action-sdk 1.1.71 → 1.1.72

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.
@@ -64,6 +64,7 @@ type ModalPlacement<M = ModalMargin> = {
64
64
  position?: ModalPosition;
65
65
  margin?: M;
66
66
  backgroundOverlay?: boolean;
67
+ backgroundClick?: OnClickOperation;
67
68
  };
68
69
  declare const DefaultModalPlacement: Required<ModalPlacement<Required<ModalMargin>>>;
69
70
  type OperationArgumentTypes = {
@@ -272,6 +272,7 @@ const DefaultModalPlacement = {
272
272
  bottom: '0px',
273
273
  },
274
274
  backgroundOverlay: false,
275
+ backgroundClick: { operation: "closeApp", args: [] },
275
276
  };
276
277
  const OnClickOperationOptions = [
277
278
  {
@@ -917,7 +918,7 @@ function add_css$9(target) {
917
918
  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)}");
918
919
  }
919
920
 
920
- // (120:0) {#if visible}
921
+ // (124:0) {#if visible}
921
922
  function create_if_block$1(ctx) {
922
923
  let div;
923
924
  let t;
@@ -926,9 +927,9 @@ function create_if_block$1(ctx) {
926
927
  let current;
927
928
  let mounted;
928
929
  let dispose;
929
- let if_block = /*closable*/ ctx[12] && create_if_block_1(ctx);
930
- const default_slot_template = /*#slots*/ ctx[25].default;
931
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[24], null);
930
+ let if_block = /*closable*/ ctx[13] && create_if_block_1(ctx);
931
+ const default_slot_template = /*#slots*/ ctx[26].default;
932
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[25], null);
932
933
 
933
934
  return {
934
935
  c() {
@@ -968,12 +969,12 @@ function create_if_block$1(ctx) {
968
969
  default_slot.m(div, null);
969
970
  }
970
971
 
971
- /*div_binding*/ ctx[26](div);
972
+ /*div_binding*/ ctx[28](div);
972
973
  current = true;
973
974
 
974
975
  if (!mounted) {
975
976
  dispose = listen(div, "click", function () {
976
- if (is_function(/*click*/ ctx[13])) /*click*/ ctx[13].apply(this, arguments);
977
+ if (is_function(/*click*/ ctx[14])) /*click*/ ctx[14].apply(this, arguments);
977
978
  });
978
979
 
979
980
  mounted = true;
@@ -982,7 +983,7 @@ function create_if_block$1(ctx) {
982
983
  p(new_ctx, dirty) {
983
984
  ctx = new_ctx;
984
985
 
985
- if (/*closable*/ ctx[12]) {
986
+ if (/*closable*/ ctx[13]) {
986
987
  if (if_block) {
987
988
  if_block.p(ctx, dirty);
988
989
  } else {
@@ -996,15 +997,15 @@ function create_if_block$1(ctx) {
996
997
  }
997
998
 
998
999
  if (default_slot) {
999
- if (default_slot.p && (!current || dirty & /*$$scope*/ 16777216)) {
1000
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 33554432)) {
1000
1001
  update_slot_base(
1001
1002
  default_slot,
1002
1003
  default_slot_template,
1003
1004
  ctx,
1004
- /*$$scope*/ ctx[24],
1005
+ /*$$scope*/ ctx[25],
1005
1006
  !current
1006
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[24])
1007
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[24], dirty, null),
1007
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[25])
1008
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[25], dirty, null),
1008
1009
  null
1009
1010
  );
1010
1011
  }
@@ -1039,14 +1040,14 @@ function create_if_block$1(ctx) {
1039
1040
  if (detaching) detach(div);
1040
1041
  if (if_block) if_block.d();
1041
1042
  if (default_slot) default_slot.d(detaching);
1042
- /*div_binding*/ ctx[26](null);
1043
+ /*div_binding*/ ctx[28](null);
1043
1044
  mounted = false;
1044
1045
  dispose();
1045
1046
  }
1046
1047
  };
1047
1048
  }
1048
1049
 
1049
- // (137:4) {#if closable}
1050
+ // (141:4) {#if closable}
1050
1051
  function create_if_block_1(ctx) {
1051
1052
  let button;
1052
1053
  let svg;
@@ -1097,7 +1098,7 @@ function create_if_block_1(ctx) {
1097
1098
  attr(svg, "fill", "none");
1098
1099
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
1099
1100
  attr(button, "class", "close svelte-1bxl6mz");
1100
- attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[14] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
1101
+ attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[15] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
1101
1102
  },
1102
1103
  m(target, anchor) {
1103
1104
  insert_hydration(target, button, anchor);
@@ -1119,7 +1120,7 @@ function create_if_block_1(ctx) {
1119
1120
  attr(path, "fill", /*closeButtonColor*/ ctx[2]);
1120
1121
  }
1121
1122
 
1122
- if (dirty & /*$maximumZindex, _closeStyle*/ 16392 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[14] + 1) + "; " + /*_closeStyle*/ ctx[3] + "")) {
1123
+ if (dirty & /*$maximumZindex, _closeStyle*/ 32776 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[15] + 1) + "; " + /*_closeStyle*/ ctx[3] + "")) {
1123
1124
  attr(button, "style", button_style_value);
1124
1125
  }
1125
1126
  },
@@ -1141,14 +1142,11 @@ function create_fragment$c(ctx) {
1141
1142
 
1142
1143
  backgroundoverray = new BackgroundOverray({
1143
1144
  props: {
1144
- backgroundOverray: /*backgroundOverray*/ ctx[11]
1145
+ backgroundOverray: /*backgroundOverray*/ ctx[12]
1145
1146
  }
1146
1147
  });
1147
1148
 
1148
- backgroundoverray.$on("click", function () {
1149
- if (is_function(/*close*/ ctx[5])) /*close*/ ctx[5].apply(this, arguments);
1150
- });
1151
-
1149
+ backgroundoverray.$on("click", /*click_handler*/ ctx[27]);
1152
1150
  let if_block = /*visible*/ ctx[6] && create_if_block$1(ctx);
1153
1151
 
1154
1152
  return {
@@ -1182,7 +1180,7 @@ function create_fragment$c(ctx) {
1182
1180
  p(new_ctx, [dirty]) {
1183
1181
  ctx = new_ctx;
1184
1182
  const backgroundoverray_changes = {};
1185
- if (dirty & /*backgroundOverray*/ 2048) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[11];
1183
+ if (dirty & /*backgroundOverray*/ 4096) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[12];
1186
1184
  backgroundoverray.$set(backgroundoverray_changes);
1187
1185
 
1188
1186
  if (/*visible*/ ctx[6]) {
@@ -1235,6 +1233,7 @@ function instance$c($$self, $$props, $$invalidate) {
1235
1233
  let close;
1236
1234
  let closable;
1237
1235
  let backgroundOverray;
1236
+ let backgroundClick;
1238
1237
  let overwritePosition;
1239
1238
  let overwriteMargin;
1240
1239
  let pos;
@@ -1243,7 +1242,7 @@ function instance$c($$self, $$props, $$invalidate) {
1243
1242
  let handle_keydown;
1244
1243
  let visible;
1245
1244
  let $maximumZindex;
1246
- component_subscribe($$self, maximumZindex, $$value => $$invalidate(14, $maximumZindex = $$value));
1245
+ component_subscribe($$self, maximumZindex, $$value => $$invalidate(15, $maximumZindex = $$value));
1247
1246
  let { $$slots: slots = {}, $$scope } = $$props;
1248
1247
  let { onClick = { operation: 'none', args: [] } } = $$props;
1249
1248
  let { clickEventName = '' } = $$props;
@@ -1263,6 +1262,7 @@ function instance$c($$self, $$props, $$invalidate) {
1263
1262
  });
1264
1263
 
1265
1264
  onDestroy(() => setPreviousFocus());
1265
+ const click_handler = () => execOnClickOperation(backgroundClick);
1266
1266
 
1267
1267
  function div_binding($$value) {
1268
1268
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
@@ -1272,23 +1272,23 @@ function instance$c($$self, $$props, $$invalidate) {
1272
1272
  }
1273
1273
 
1274
1274
  $$self.$$set = $$props => {
1275
- if ('onClick' in $$props) $$invalidate(15, onClick = $$props.onClick);
1276
- if ('clickEventName' in $$props) $$invalidate(16, clickEventName = $$props.clickEventName);
1277
- if ('clickEventValue' in $$props) $$invalidate(17, clickEventValue = $$props.clickEventValue);
1278
- if ('placement' in $$props) $$invalidate(18, placement = $$props.placement);
1275
+ if ('onClick' in $$props) $$invalidate(16, onClick = $$props.onClick);
1276
+ if ('clickEventName' in $$props) $$invalidate(17, clickEventName = $$props.clickEventName);
1277
+ if ('clickEventValue' in $$props) $$invalidate(18, clickEventValue = $$props.clickEventValue);
1278
+ if ('placement' in $$props) $$invalidate(19, placement = $$props.placement);
1279
1279
  if ('animation' in $$props) $$invalidate(0, animation = $$props.animation);
1280
1280
  if ('_style' in $$props) $$invalidate(1, _style = $$props._style);
1281
- if ('onClose' in $$props) $$invalidate(19, onClose = $$props.onClose);
1281
+ if ('onClose' in $$props) $$invalidate(20, onClose = $$props.onClose);
1282
1282
  if ('closeButtonColor' in $$props) $$invalidate(2, closeButtonColor = $$props.closeButtonColor);
1283
- if ('closeEventName' in $$props) $$invalidate(20, closeEventName = $$props.closeEventName);
1284
- if ('closeEventValue' in $$props) $$invalidate(21, closeEventValue = $$props.closeEventValue);
1283
+ if ('closeEventName' in $$props) $$invalidate(21, closeEventName = $$props.closeEventName);
1284
+ if ('closeEventValue' in $$props) $$invalidate(22, closeEventValue = $$props.closeEventValue);
1285
1285
  if ('_closeStyle' in $$props) $$invalidate(3, _closeStyle = $$props._closeStyle);
1286
- if ('$$scope' in $$props) $$invalidate(24, $$scope = $$props.$$scope);
1286
+ if ('$$scope' in $$props) $$invalidate(25, $$scope = $$props.$$scope);
1287
1287
  };
1288
1288
 
1289
1289
  $$self.$$.update = () => {
1290
- if ($$self.$$.dirty & /*clickEventName, clickEventValue, onClick*/ 229376) {
1291
- $$invalidate(13, click = () => {
1290
+ if ($$self.$$.dirty & /*clickEventName, clickEventValue, onClick*/ 458752) {
1291
+ $$invalidate(14, click = () => {
1292
1292
  if (clickEventName) {
1293
1293
  send_event(clickEventName, clickEventValue);
1294
1294
  }
@@ -1297,7 +1297,7 @@ function instance$c($$self, $$props, $$invalidate) {
1297
1297
  });
1298
1298
  }
1299
1299
 
1300
- if ($$self.$$.dirty & /*closeEventName, closeEventValue, onClose*/ 3670016) {
1300
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue, onClose*/ 7340032) {
1301
1301
  $$invalidate(5, close = () => {
1302
1302
  if (closeEventName) {
1303
1303
  send_event(closeEventName, closeEventValue);
@@ -1307,23 +1307,29 @@ function instance$c($$self, $$props, $$invalidate) {
1307
1307
  });
1308
1308
  }
1309
1309
 
1310
- if ($$self.$$.dirty & /*onClose*/ 524288) {
1311
- $$invalidate(12, closable = haveFunction(onClose));
1310
+ if ($$self.$$.dirty & /*onClose*/ 1048576) {
1311
+ $$invalidate(13, closable = haveFunction(onClose));
1312
1312
  }
1313
1313
 
1314
- if ($$self.$$.dirty & /*placement*/ 262144) {
1315
- $$invalidate(11, backgroundOverray = placement && placement.backgroundOverlay != null
1314
+ if ($$self.$$.dirty & /*placement*/ 524288) {
1315
+ $$invalidate(12, backgroundOverray = placement && placement.backgroundOverlay != null
1316
1316
  ? placement.backgroundOverlay
1317
1317
  : DefaultModalPlacement.backgroundOverlay);
1318
1318
  }
1319
1319
 
1320
- if ($$self.$$.dirty & /*placement*/ 262144) {
1321
- $$invalidate(23, overwritePosition = 'center'
1320
+ if ($$self.$$.dirty & /*placement*/ 524288) {
1321
+ $$invalidate(11, backgroundClick = placement && placement.backgroundClick != null
1322
+ ? placement.backgroundClick
1323
+ : DefaultModalPlacement.backgroundClick);
1324
+ }
1325
+
1326
+ if ($$self.$$.dirty & /*placement*/ 524288) {
1327
+ $$invalidate(24, overwritePosition = 'center'
1322
1328
  );
1323
1329
  }
1324
1330
 
1325
- if ($$self.$$.dirty & /*placement*/ 262144) {
1326
- $$invalidate(22, overwriteMargin = {
1331
+ if ($$self.$$.dirty & /*placement*/ 524288) {
1332
+ $$invalidate(23, overwriteMargin = {
1327
1333
  left: '0px',
1328
1334
  right: '0px',
1329
1335
  top: '0px',
@@ -1332,15 +1338,15 @@ function instance$c($$self, $$props, $$invalidate) {
1332
1338
  );
1333
1339
  }
1334
1340
 
1335
- if ($$self.$$.dirty & /*overwritePosition*/ 8388608) {
1341
+ if ($$self.$$.dirty & /*overwritePosition*/ 16777216) {
1336
1342
  $$invalidate(10, pos = getPositionStyle(overwritePosition));
1337
1343
  }
1338
1344
 
1339
- if ($$self.$$.dirty & /*overwritePosition*/ 8388608) {
1345
+ if ($$self.$$.dirty & /*overwritePosition*/ 16777216) {
1340
1346
  $$invalidate(9, transform = getTransform(overwritePosition));
1341
1347
  }
1342
1348
 
1343
- if ($$self.$$.dirty & /*overwriteMargin*/ 4194304) {
1349
+ if ($$self.$$.dirty & /*overwriteMargin*/ 8388608) {
1344
1350
  $$invalidate(8, marginStyle = getMarginStyle(overwriteMargin));
1345
1351
  }
1346
1352
 
@@ -1366,6 +1372,7 @@ function instance$c($$self, $$props, $$invalidate) {
1366
1372
  marginStyle,
1367
1373
  transform,
1368
1374
  pos,
1375
+ backgroundClick,
1369
1376
  backgroundOverray,
1370
1377
  closable,
1371
1378
  click,
@@ -1381,6 +1388,7 @@ function instance$c($$self, $$props, $$invalidate) {
1381
1388
  overwritePosition,
1382
1389
  $$scope,
1383
1390
  slots,
1391
+ click_handler,
1384
1392
  div_binding
1385
1393
  ];
1386
1394
  }
@@ -1396,16 +1404,16 @@ class Modal extends SvelteComponent {
1396
1404
  create_fragment$c,
1397
1405
  safe_not_equal,
1398
1406
  {
1399
- onClick: 15,
1400
- clickEventName: 16,
1401
- clickEventValue: 17,
1402
- placement: 18,
1407
+ onClick: 16,
1408
+ clickEventName: 17,
1409
+ clickEventValue: 18,
1410
+ placement: 19,
1403
1411
  animation: 0,
1404
1412
  _style: 1,
1405
- onClose: 19,
1413
+ onClose: 20,
1406
1414
  closeButtonColor: 2,
1407
- closeEventName: 20,
1408
- closeEventValue: 21,
1415
+ closeEventName: 21,
1416
+ closeEventValue: 22,
1409
1417
  _closeStyle: 3
1410
1418
  },
1411
1419
  add_css$9
@@ -64,6 +64,7 @@ type ModalPlacement<M = ModalMargin> = {
64
64
  position?: ModalPosition;
65
65
  margin?: M;
66
66
  backgroundOverlay?: boolean;
67
+ backgroundClick?: OnClickOperation;
67
68
  };
68
69
  declare const DefaultModalPlacement: Required<ModalPlacement<Required<ModalMargin>>>;
69
70
  type OperationArgumentTypes = {
package/dist/index.es.js CHANGED
@@ -324,6 +324,7 @@ const DefaultModalPlacement = {
324
324
  bottom: '0px',
325
325
  },
326
326
  backgroundOverlay: false,
327
+ backgroundClick: { operation: "closeApp", args: [] },
327
328
  };
328
329
  const OnClickOperationOptions = [
329
330
  {
@@ -1005,7 +1006,7 @@ function add_css$9(target) {
1005
1006
  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)}");
1006
1007
  }
1007
1008
 
1008
- // (120:0) {#if visible}
1009
+ // (124:0) {#if visible}
1009
1010
  function create_if_block$1(ctx) {
1010
1011
  let div;
1011
1012
  let t;
@@ -1014,9 +1015,9 @@ function create_if_block$1(ctx) {
1014
1015
  let current;
1015
1016
  let mounted;
1016
1017
  let dispose;
1017
- let if_block = /*closable*/ ctx[12] && create_if_block_1(ctx);
1018
- const default_slot_template = /*#slots*/ ctx[25].default;
1019
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[24], null);
1018
+ let if_block = /*closable*/ ctx[13] && create_if_block_1(ctx);
1019
+ const default_slot_template = /*#slots*/ ctx[26].default;
1020
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[25], null);
1020
1021
 
1021
1022
  return {
1022
1023
  c() {
@@ -1038,12 +1039,12 @@ function create_if_block$1(ctx) {
1038
1039
  default_slot.m(div, null);
1039
1040
  }
1040
1041
 
1041
- /*div_binding*/ ctx[26](div);
1042
+ /*div_binding*/ ctx[28](div);
1042
1043
  current = true;
1043
1044
 
1044
1045
  if (!mounted) {
1045
1046
  dispose = listen(div, "click", function () {
1046
- if (is_function(/*click*/ ctx[13])) /*click*/ ctx[13].apply(this, arguments);
1047
+ if (is_function(/*click*/ ctx[14])) /*click*/ ctx[14].apply(this, arguments);
1047
1048
  });
1048
1049
 
1049
1050
  mounted = true;
@@ -1052,7 +1053,7 @@ function create_if_block$1(ctx) {
1052
1053
  p(new_ctx, dirty) {
1053
1054
  ctx = new_ctx;
1054
1055
 
1055
- if (/*closable*/ ctx[12]) {
1056
+ if (/*closable*/ ctx[13]) {
1056
1057
  if (if_block) {
1057
1058
  if_block.p(ctx, dirty);
1058
1059
  } else {
@@ -1066,15 +1067,15 @@ function create_if_block$1(ctx) {
1066
1067
  }
1067
1068
 
1068
1069
  if (default_slot) {
1069
- if (default_slot.p && (!current || dirty & /*$$scope*/ 16777216)) {
1070
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 33554432)) {
1070
1071
  update_slot_base(
1071
1072
  default_slot,
1072
1073
  default_slot_template,
1073
1074
  ctx,
1074
- /*$$scope*/ ctx[24],
1075
+ /*$$scope*/ ctx[25],
1075
1076
  !current
1076
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[24])
1077
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[24], dirty, null),
1077
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[25])
1078
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[25], dirty, null),
1078
1079
  null
1079
1080
  );
1080
1081
  }
@@ -1109,14 +1110,14 @@ function create_if_block$1(ctx) {
1109
1110
  if (detaching) detach(div);
1110
1111
  if (if_block) if_block.d();
1111
1112
  if (default_slot) default_slot.d(detaching);
1112
- /*div_binding*/ ctx[26](null);
1113
+ /*div_binding*/ ctx[28](null);
1113
1114
  mounted = false;
1114
1115
  dispose();
1115
1116
  }
1116
1117
  };
1117
1118
  }
1118
1119
 
1119
- // (137:4) {#if closable}
1120
+ // (141:4) {#if closable}
1120
1121
  function create_if_block_1(ctx) {
1121
1122
  let button;
1122
1123
  let svg;
@@ -1139,7 +1140,7 @@ function create_if_block_1(ctx) {
1139
1140
  attr(svg, "fill", "none");
1140
1141
  attr(svg, "xmlns", "http://www.w3.org/2000/svg");
1141
1142
  attr(button, "class", "close svelte-1bxl6mz");
1142
- attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[14] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
1143
+ attr(button, "style", button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[15] + 1) + "; " + /*_closeStyle*/ ctx[3] + "");
1143
1144
  },
1144
1145
  m(target, anchor) {
1145
1146
  insert(target, button, anchor);
@@ -1161,7 +1162,7 @@ function create_if_block_1(ctx) {
1161
1162
  attr(path, "fill", /*closeButtonColor*/ ctx[2]);
1162
1163
  }
1163
1164
 
1164
- if (dirty & /*$maximumZindex, _closeStyle*/ 16392 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[14] + 1) + "; " + /*_closeStyle*/ ctx[3] + "")) {
1165
+ if (dirty & /*$maximumZindex, _closeStyle*/ 32776 && button_style_value !== (button_style_value = "z-index:" + (/*$maximumZindex*/ ctx[15] + 1) + "; " + /*_closeStyle*/ ctx[3] + "")) {
1165
1166
  attr(button, "style", button_style_value);
1166
1167
  }
1167
1168
  },
@@ -1183,14 +1184,11 @@ function create_fragment$c(ctx) {
1183
1184
 
1184
1185
  backgroundoverray = new BackgroundOverray({
1185
1186
  props: {
1186
- backgroundOverray: /*backgroundOverray*/ ctx[11]
1187
+ backgroundOverray: /*backgroundOverray*/ ctx[12]
1187
1188
  }
1188
1189
  });
1189
1190
 
1190
- backgroundoverray.$on("click", function () {
1191
- if (is_function(/*close*/ ctx[5])) /*close*/ ctx[5].apply(this, arguments);
1192
- });
1193
-
1191
+ backgroundoverray.$on("click", /*click_handler*/ ctx[27]);
1194
1192
  let if_block = /*visible*/ ctx[6] && create_if_block$1(ctx);
1195
1193
 
1196
1194
  return {
@@ -1218,7 +1216,7 @@ function create_fragment$c(ctx) {
1218
1216
  p(new_ctx, [dirty]) {
1219
1217
  ctx = new_ctx;
1220
1218
  const backgroundoverray_changes = {};
1221
- if (dirty & /*backgroundOverray*/ 2048) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[11];
1219
+ if (dirty & /*backgroundOverray*/ 4096) backgroundoverray_changes.backgroundOverray = /*backgroundOverray*/ ctx[12];
1222
1220
  backgroundoverray.$set(backgroundoverray_changes);
1223
1221
 
1224
1222
  if (/*visible*/ ctx[6]) {
@@ -1271,6 +1269,7 @@ function instance$c($$self, $$props, $$invalidate) {
1271
1269
  let close;
1272
1270
  let closable;
1273
1271
  let backgroundOverray;
1272
+ let backgroundClick;
1274
1273
  let overwritePosition;
1275
1274
  let overwriteMargin;
1276
1275
  let pos;
@@ -1279,7 +1278,7 @@ function instance$c($$self, $$props, $$invalidate) {
1279
1278
  let handle_keydown;
1280
1279
  let visible;
1281
1280
  let $maximumZindex;
1282
- component_subscribe($$self, maximumZindex, $$value => $$invalidate(14, $maximumZindex = $$value));
1281
+ component_subscribe($$self, maximumZindex, $$value => $$invalidate(15, $maximumZindex = $$value));
1283
1282
  let { $$slots: slots = {}, $$scope } = $$props;
1284
1283
  let { onClick = { operation: 'none', args: [] } } = $$props;
1285
1284
  let { clickEventName = '' } = $$props;
@@ -1299,6 +1298,7 @@ function instance$c($$self, $$props, $$invalidate) {
1299
1298
  });
1300
1299
 
1301
1300
  onDestroy(() => setPreviousFocus());
1301
+ const click_handler = () => execOnClickOperation(backgroundClick);
1302
1302
 
1303
1303
  function div_binding($$value) {
1304
1304
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
@@ -1308,23 +1308,23 @@ function instance$c($$self, $$props, $$invalidate) {
1308
1308
  }
1309
1309
 
1310
1310
  $$self.$$set = $$props => {
1311
- if ('onClick' in $$props) $$invalidate(15, onClick = $$props.onClick);
1312
- if ('clickEventName' in $$props) $$invalidate(16, clickEventName = $$props.clickEventName);
1313
- if ('clickEventValue' in $$props) $$invalidate(17, clickEventValue = $$props.clickEventValue);
1314
- if ('placement' in $$props) $$invalidate(18, placement = $$props.placement);
1311
+ if ('onClick' in $$props) $$invalidate(16, onClick = $$props.onClick);
1312
+ if ('clickEventName' in $$props) $$invalidate(17, clickEventName = $$props.clickEventName);
1313
+ if ('clickEventValue' in $$props) $$invalidate(18, clickEventValue = $$props.clickEventValue);
1314
+ if ('placement' in $$props) $$invalidate(19, placement = $$props.placement);
1315
1315
  if ('animation' in $$props) $$invalidate(0, animation = $$props.animation);
1316
1316
  if ('_style' in $$props) $$invalidate(1, _style = $$props._style);
1317
- if ('onClose' in $$props) $$invalidate(19, onClose = $$props.onClose);
1317
+ if ('onClose' in $$props) $$invalidate(20, onClose = $$props.onClose);
1318
1318
  if ('closeButtonColor' in $$props) $$invalidate(2, closeButtonColor = $$props.closeButtonColor);
1319
- if ('closeEventName' in $$props) $$invalidate(20, closeEventName = $$props.closeEventName);
1320
- if ('closeEventValue' in $$props) $$invalidate(21, closeEventValue = $$props.closeEventValue);
1319
+ if ('closeEventName' in $$props) $$invalidate(21, closeEventName = $$props.closeEventName);
1320
+ if ('closeEventValue' in $$props) $$invalidate(22, closeEventValue = $$props.closeEventValue);
1321
1321
  if ('_closeStyle' in $$props) $$invalidate(3, _closeStyle = $$props._closeStyle);
1322
- if ('$$scope' in $$props) $$invalidate(24, $$scope = $$props.$$scope);
1322
+ if ('$$scope' in $$props) $$invalidate(25, $$scope = $$props.$$scope);
1323
1323
  };
1324
1324
 
1325
1325
  $$self.$$.update = () => {
1326
- if ($$self.$$.dirty & /*clickEventName, clickEventValue, onClick*/ 229376) {
1327
- $$invalidate(13, click = () => {
1326
+ if ($$self.$$.dirty & /*clickEventName, clickEventValue, onClick*/ 458752) {
1327
+ $$invalidate(14, click = () => {
1328
1328
  if (clickEventName) {
1329
1329
  send_event(clickEventName, clickEventValue);
1330
1330
  }
@@ -1333,7 +1333,7 @@ function instance$c($$self, $$props, $$invalidate) {
1333
1333
  });
1334
1334
  }
1335
1335
 
1336
- if ($$self.$$.dirty & /*closeEventName, closeEventValue, onClose*/ 3670016) {
1336
+ if ($$self.$$.dirty & /*closeEventName, closeEventValue, onClose*/ 7340032) {
1337
1337
  $$invalidate(5, close = () => {
1338
1338
  if (closeEventName) {
1339
1339
  send_event(closeEventName, closeEventValue);
@@ -1343,37 +1343,43 @@ function instance$c($$self, $$props, $$invalidate) {
1343
1343
  });
1344
1344
  }
1345
1345
 
1346
- if ($$self.$$.dirty & /*onClose*/ 524288) {
1347
- $$invalidate(12, closable = haveFunction(onClose));
1346
+ if ($$self.$$.dirty & /*onClose*/ 1048576) {
1347
+ $$invalidate(13, closable = haveFunction(onClose));
1348
1348
  }
1349
1349
 
1350
- if ($$self.$$.dirty & /*placement*/ 262144) {
1351
- $$invalidate(11, backgroundOverray = placement && placement.backgroundOverlay != null
1350
+ if ($$self.$$.dirty & /*placement*/ 524288) {
1351
+ $$invalidate(12, backgroundOverray = placement && placement.backgroundOverlay != null
1352
1352
  ? placement.backgroundOverlay
1353
1353
  : DefaultModalPlacement.backgroundOverlay);
1354
1354
  }
1355
1355
 
1356
- if ($$self.$$.dirty & /*placement*/ 262144) {
1357
- $$invalidate(23, overwritePosition = placement && placement.position != null
1356
+ if ($$self.$$.dirty & /*placement*/ 524288) {
1357
+ $$invalidate(11, backgroundClick = placement && placement.backgroundClick != null
1358
+ ? placement.backgroundClick
1359
+ : DefaultModalPlacement.backgroundClick);
1360
+ }
1361
+
1362
+ if ($$self.$$.dirty & /*placement*/ 524288) {
1363
+ $$invalidate(24, overwritePosition = placement && placement.position != null
1358
1364
  ? placement.position
1359
1365
  : DefaultModalPlacement.position);
1360
1366
  }
1361
1367
 
1362
- if ($$self.$$.dirty & /*placement*/ 262144) {
1363
- $$invalidate(22, overwriteMargin = placement && placement.margin != null
1368
+ if ($$self.$$.dirty & /*placement*/ 524288) {
1369
+ $$invalidate(23, overwriteMargin = placement && placement.margin != null
1364
1370
  ? placement.margin
1365
1371
  : DefaultModalPlacement.margin);
1366
1372
  }
1367
1373
 
1368
- if ($$self.$$.dirty & /*overwritePosition*/ 8388608) {
1374
+ if ($$self.$$.dirty & /*overwritePosition*/ 16777216) {
1369
1375
  $$invalidate(10, pos = getPositionStyle(overwritePosition));
1370
1376
  }
1371
1377
 
1372
- if ($$self.$$.dirty & /*overwritePosition*/ 8388608) {
1378
+ if ($$self.$$.dirty & /*overwritePosition*/ 16777216) {
1373
1379
  $$invalidate(9, transform = getTransform(overwritePosition));
1374
1380
  }
1375
1381
 
1376
- if ($$self.$$.dirty & /*overwriteMargin*/ 4194304) {
1382
+ if ($$self.$$.dirty & /*overwriteMargin*/ 8388608) {
1377
1383
  $$invalidate(8, marginStyle = getMarginStyle(overwriteMargin));
1378
1384
  }
1379
1385
 
@@ -1399,6 +1405,7 @@ function instance$c($$self, $$props, $$invalidate) {
1399
1405
  marginStyle,
1400
1406
  transform,
1401
1407
  pos,
1408
+ backgroundClick,
1402
1409
  backgroundOverray,
1403
1410
  closable,
1404
1411
  click,
@@ -1414,6 +1421,7 @@ function instance$c($$self, $$props, $$invalidate) {
1414
1421
  overwritePosition,
1415
1422
  $$scope,
1416
1423
  slots,
1424
+ click_handler,
1417
1425
  div_binding
1418
1426
  ];
1419
1427
  }
@@ -1429,16 +1437,16 @@ class Modal extends SvelteComponent {
1429
1437
  create_fragment$c,
1430
1438
  safe_not_equal,
1431
1439
  {
1432
- onClick: 15,
1433
- clickEventName: 16,
1434
- clickEventValue: 17,
1435
- placement: 18,
1440
+ onClick: 16,
1441
+ clickEventName: 17,
1442
+ clickEventValue: 18,
1443
+ placement: 19,
1436
1444
  animation: 0,
1437
1445
  _style: 1,
1438
- onClose: 19,
1446
+ onClose: 20,
1439
1447
  closeButtonColor: 2,
1440
- closeEventName: 20,
1441
- closeEventValue: 21,
1448
+ closeEventName: 21,
1449
+ closeEventValue: 22,
1442
1450
  _closeStyle: 3
1443
1451
  },
1444
1452
  add_css$9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plaidev/karte-action-sdk",
3
- "version": "1.1.71",
3
+ "version": "1.1.72",
4
4
  "author": "Plaid Inc.",
5
5
  "license": "Apache-2.0",
6
6
  "module": "./dist/index.es.js",