eat-js-sdk 0.0.40 → 0.0.41

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.
@@ -6907,7 +6907,8 @@
6907
6907
  attr(button2, "aria-label", "Reset");
6908
6908
  attr(button2, "class", "focus-ring w-full py-2 px-3 text-white text-base leading-4 rounded-lg font-bold border-2 border-blue-1000 bg-soft-blue hover:bg-yellow-1000 hover:text-charcoal active:bg-yellow-1100 active:text-charcoal md:w-fit");
6909
6909
  attr(div1, "class", "flex flex-col-reverse items-center space-y-2 space-y-reverse md:justify-between md:flex-row md:space-y-0");
6910
- attr(div2, "class", "absolute inset-y-0 right-4 left-4 w-fit h-fit m-auto bg-white p-6 max-w-[400px] shadow-md rounded-lg md:inset-0");
6910
+ attr(div2, "tabindex", "0");
6911
+ attr(div2, "class", "absolute inset-y-0 right-4 left-4 w-fit h-fit m-auto bg-white p-6 max-w-[400px] shadow-md rounded-lg focus-visible:outline-none md:inset-0");
6911
6912
  },
6912
6913
  m(target, anchor) {
6913
6914
  insert(target, div2, anchor);
@@ -6926,6 +6927,7 @@
6926
6927
  append(div1, button1);
6927
6928
  append(div1, t7);
6928
6929
  append(div1, button2);
6930
+ ctx[3](div2);
6929
6931
  current = true;
6930
6932
  if (!mounted) {
6931
6933
  dispose = [
@@ -6933,19 +6935,19 @@
6933
6935
  button0,
6934
6936
  "click",
6935
6937
  /*closeResetModal*/
6936
- ctx[0]
6938
+ ctx[1]
6937
6939
  ),
6938
6940
  listen(
6939
6941
  button1,
6940
6942
  "click",
6941
6943
  /*closeResetModal*/
6942
- ctx[0]
6944
+ ctx[1]
6943
6945
  ),
6944
6946
  listen(
6945
6947
  button2,
6946
6948
  "click",
6947
6949
  /*resetCategories*/
6948
- ctx[1]
6950
+ ctx[2]
6949
6951
  )
6950
6952
  ];
6951
6953
  mounted = true;
@@ -6970,6 +6972,7 @@
6970
6972
  }
6971
6973
  destroy_component(alerticon);
6972
6974
  destroy_component(crossicon);
6975
+ ctx[3](null);
6973
6976
  mounted = false;
6974
6977
  run_all(dispose);
6975
6978
  }
@@ -6994,8 +6997,8 @@
6994
6997
  },
6995
6998
  p(ctx2, [dirty]) {
6996
6999
  const commonmodal_changes = {};
6997
- if (dirty & /*$$scope*/
6998
- 8) {
7000
+ if (dirty & /*$$scope, categoryModal*/
7001
+ 65) {
6999
7002
  commonmodal_changes.$$scope = { dirty, ctx: ctx2 };
7000
7003
  }
7001
7004
  commonmodal.$set(commonmodal_changes);
@@ -7015,7 +7018,18 @@
7015
7018
  }
7016
7019
  };
7017
7020
  }
7018
- function instance8($$self) {
7021
+ function instance8($$self, $$props, $$invalidate) {
7022
+ let categoryModal;
7023
+ const { isModalOpen } = get_store_value(modalSettings);
7024
+ if (isModalOpen) {
7025
+ setTimeout(
7026
+ () => {
7027
+ categoryModal.focus();
7028
+ $$invalidate(0, categoryModal.tabIndex = -1, categoryModal);
7029
+ },
7030
+ 100
7031
+ );
7032
+ }
7019
7033
  const closeResetModal = () => {
7020
7034
  modalSettings.set({
7021
7035
  ...get_store_value(modalSettings),
@@ -7052,7 +7066,13 @@
7052
7066
  dispatch("resetCategory", { answer_list: [] });
7053
7067
  closeResetModal();
7054
7068
  };
7055
- return [closeResetModal, resetCategories];
7069
+ function div2_binding($$value) {
7070
+ binding_callbacks[$$value ? "unshift" : "push"](() => {
7071
+ categoryModal = $$value;
7072
+ $$invalidate(0, categoryModal);
7073
+ });
7074
+ }
7075
+ return [categoryModal, closeResetModal, resetCategories, div2_binding];
7056
7076
  }
7057
7077
  var PromptCategoriseModal = class extends SvelteComponent {
7058
7078
  constructor(options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eat-js-sdk",
3
- "version": "0.0.40",
3
+ "version": "0.0.41",
4
4
  "description": "Authoring tool frontend SDK",
5
5
  "contributors": [
6
6
  {