@opentabs-dev/opentabs-plugin-panda-express 0.0.74 → 0.0.75
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/adapter.iife.js +20 -30
- package/dist/adapter.iife.js.map +3 -3
- package/dist/tools/remove-product-from-basket.d.ts +19 -0
- package/dist/tools/remove-product-from-basket.d.ts.map +1 -0
- package/dist/tools/remove-product-from-basket.js +26 -0
- package/dist/tools/remove-product-from-basket.js.map +1 -0
- package/dist/tools/reorder.d.ts +18 -0
- package/dist/tools/reorder.d.ts.map +1 -0
- package/dist/tools/reorder.js +30 -0
- package/dist/tools/reorder.js.map +1 -0
- package/dist/tools.json +1 -1
- package/package.json +3 -3
package/dist/adapter.iife.js
CHANGED
|
@@ -245,18 +245,18 @@
|
|
|
245
245
|
|
|
246
246
|
// node_modules/@opentabs-dev/plugin-sdk/dist/storage.js
|
|
247
247
|
var getLocalStorage = (key) => {
|
|
248
|
+
try {
|
|
249
|
+
return localStorage.getItem(key);
|
|
250
|
+
} catch {
|
|
251
|
+
}
|
|
248
252
|
let storage;
|
|
249
253
|
try {
|
|
250
|
-
storage =
|
|
254
|
+
storage = localStorage;
|
|
251
255
|
} catch {
|
|
252
256
|
return null;
|
|
253
257
|
}
|
|
254
|
-
if (storage) {
|
|
255
|
-
|
|
256
|
-
return storage.getItem(key);
|
|
257
|
-
} catch {
|
|
258
|
-
return null;
|
|
259
|
-
}
|
|
258
|
+
if (storage !== void 0) {
|
|
259
|
+
return null;
|
|
260
260
|
}
|
|
261
261
|
try {
|
|
262
262
|
const iframe = document.createElement("iframe");
|
|
@@ -14897,21 +14897,21 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14897
14897
|
};
|
|
14898
14898
|
var src_default = new PandaExpressPlugin();
|
|
14899
14899
|
|
|
14900
|
-
// dist/
|
|
14900
|
+
// dist/_adapter_entry_9bc3e28c-5c0e-4745-9160-4b8a687f536a.ts
|
|
14901
14901
|
if (!globalThis.__openTabs) {
|
|
14902
14902
|
globalThis.__openTabs = {};
|
|
14903
14903
|
} else {
|
|
14904
14904
|
const desc = Object.getOwnPropertyDescriptor(globalThis.__openTabs, "adapters");
|
|
14905
14905
|
if (desc && !desc.writable) {
|
|
14906
|
-
const
|
|
14906
|
+
const ot2 = globalThis.__openTabs;
|
|
14907
14907
|
const newAdaptersObj = {};
|
|
14908
|
-
if (
|
|
14909
|
-
for (const key of Object.keys(
|
|
14910
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
14908
|
+
if (ot2.adapters) {
|
|
14909
|
+
for (const key of Object.keys(ot2.adapters)) {
|
|
14910
|
+
const d = Object.getOwnPropertyDescriptor(ot2.adapters, key);
|
|
14911
14911
|
if (d) Object.defineProperty(newAdaptersObj, key, d);
|
|
14912
14912
|
}
|
|
14913
14913
|
}
|
|
14914
|
-
globalThis.__openTabs = Object.assign({},
|
|
14914
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdaptersObj });
|
|
14915
14915
|
}
|
|
14916
14916
|
}
|
|
14917
14917
|
if (!globalThis.__openTabs.adapters) {
|
|
@@ -14949,16 +14949,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14949
14949
|
}
|
|
14950
14950
|
};
|
|
14951
14951
|
var restoreTransport = setLogTransport ? setLogTransport(logTransport) : void 0;
|
|
14952
|
-
var ot2 = globalThis.__openTabs;
|
|
14953
|
-
ot2._notifyReadinessChanged = () => {
|
|
14954
|
-
try {
|
|
14955
|
-
const nonce = globalThis.__openTabs?._readinessNonce;
|
|
14956
|
-
if (nonce) {
|
|
14957
|
-
window.postMessage({ type: "opentabs:readiness-changed", plugin: "panda-express", nonce }, "*");
|
|
14958
|
-
}
|
|
14959
|
-
} catch {
|
|
14960
|
-
}
|
|
14961
|
-
};
|
|
14962
14952
|
var existing = adapters["panda-express"];
|
|
14963
14953
|
if (existing) {
|
|
14964
14954
|
if (typeof existing.teardown === "function") {
|
|
@@ -14970,7 +14960,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14970
14960
|
}
|
|
14971
14961
|
}
|
|
14972
14962
|
if (!Reflect.deleteProperty(adapters, "panda-express")) {
|
|
14973
|
-
const
|
|
14963
|
+
const ot2 = globalThis.__openTabs;
|
|
14974
14964
|
const newAdapters = {};
|
|
14975
14965
|
for (const key of Object.keys(adapters)) {
|
|
14976
14966
|
if (key !== "panda-express") {
|
|
@@ -14978,7 +14968,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
14978
14968
|
if (desc) Object.defineProperty(newAdapters, key, desc);
|
|
14979
14969
|
}
|
|
14980
14970
|
}
|
|
14981
|
-
globalThis.__openTabs = Object.assign({},
|
|
14971
|
+
globalThis.__openTabs = Object.assign({}, ot2, { adapters: newAdapters });
|
|
14982
14972
|
}
|
|
14983
14973
|
var hasLifecycleHooks = typeof src_default.onToolInvocationStart === "function" || typeof src_default.onToolInvocationEnd === "function";
|
|
14984
14974
|
for (const tool of src_default.tools) {
|
|
@@ -15039,12 +15029,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15039
15029
|
}
|
|
15040
15030
|
}
|
|
15041
15031
|
};
|
|
15042
|
-
const
|
|
15043
|
-
if (!
|
|
15032
|
+
const ot2 = globalThis.__openTabs;
|
|
15033
|
+
if (!ot2._navigationInterceptor) {
|
|
15044
15034
|
const origPushState = history.pushState.bind(history);
|
|
15045
15035
|
const origReplaceState = history.replaceState.bind(history);
|
|
15046
15036
|
const callbacks = /* @__PURE__ */ new Map();
|
|
15047
|
-
|
|
15037
|
+
ot2._navigationInterceptor = { callbacks, origPushState, origReplaceState };
|
|
15048
15038
|
history.pushState = function(...args) {
|
|
15049
15039
|
origPushState(...args);
|
|
15050
15040
|
for (const cb of callbacks.values()) {
|
|
@@ -15058,7 +15048,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15058
15048
|
}
|
|
15059
15049
|
};
|
|
15060
15050
|
}
|
|
15061
|
-
const interceptor =
|
|
15051
|
+
const interceptor = ot2._navigationInterceptor;
|
|
15062
15052
|
interceptor.callbacks.set("panda-express", checkUrl);
|
|
15063
15053
|
window.addEventListener("popstate", checkUrl);
|
|
15064
15054
|
window.addEventListener("hashchange", checkUrl);
|
|
@@ -15113,5 +15103,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15113
15103
|
};
|
|
15114
15104
|
delete src_default.onDeactivate;
|
|
15115
15105
|
}
|
|
15116
|
-
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["panda-express"]){var a=o.adapters["panda-express"];a.__adapterHash="
|
|
15106
|
+
})();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["panda-express"]){var a=o.adapters["panda-express"];a.__adapterHash="b9bad10847cb5383e1aba585dfaa9ed73c9ce996cbe8b559509a599b2c5a2e53";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"panda-express",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
|
|
15117
15107
|
//# sourceMappingURL=adapter.iife.js.map
|