boka-human-cliend-v3 0.0.35 → 0.0.37

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.
@@ -491,6 +491,11 @@
491
491
  max-width: 100vw!important;
492
492
  height: 100vh!important;
493
493
  max-height: 100vh!important;
494
+ position: fixed;
495
+ top: 0;
496
+ left: 0;
497
+ z-index: 999;
498
+ overflow: hidden;
494
499
  }
495
500
  .humanMainView .humanMainHeader {
496
501
  width: 100%;
@@ -5216,8 +5216,8 @@
5216
5216
  },
5217
5217
  src() {
5218
5218
  let { token, product, custType, subCustType, source, terminal = "" } = this;
5219
- let { protocol, host, port } = location;
5220
- let domain = `${protocol}//${host}${port ? ":" + port : ""}`;
5219
+ let { protocol, host } = location;
5220
+ let domain = `${protocol}//${host}`;
5221
5221
  return `${this.host}?token=${token}&product=${product}&custType=${custType}&subCustType=${subCustType}&source=${source}&human=1&isIFrame=true&terminal=${terminal}&domain=${encodeURIComponent(domain)}&time=${(/* @__PURE__ */ new Date()).getTime()}`;
5222
5222
  }
5223
5223
  },
@@ -5233,7 +5233,9 @@
5233
5233
  console.log(this.$props);
5234
5234
  setTimeout(() => {
5235
5235
  this.icon();
5236
- this.chatMainInitDrag();
5236
+ if (!this.fullScreen) {
5237
+ this.chatMainInitDrag();
5238
+ }
5237
5239
  });
5238
5240
  window.humanFunction = {
5239
5241
  showChatView: this.showChat
@@ -5353,8 +5355,21 @@
5353
5355
  inertia: true,
5354
5356
  modifiers: [
5355
5357
  interact.modifiers.restrictRect({
5356
- restriction: "body",
5358
+ restriction: "#humanViewOuter",
5357
5359
  endOnly: true
5360
+ /*restriction: () => {
5361
+ const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
5362
+ const scrollLeft = window.pageXOffset || document.documentElement.scrollLeft;
5363
+
5364
+ return {
5365
+ left: scrollLeft,
5366
+ top: scrollTop,
5367
+ right: scrollLeft + window.innerWidth,
5368
+ bottom: scrollTop + window.innerHeight
5369
+ };
5370
+ },
5371
+ elementRect: { left: 0, right: 1, top: 0, bottom: 1 },
5372
+ endOnly: false*/
5358
5373
  })
5359
5374
  ],
5360
5375
  autoScroll: true,
@@ -5380,6 +5395,10 @@
5380
5395
  const _hoisted_4 = ["src"];
5381
5396
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
5382
5397
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
5398
+ _cache[7] || (_cache[7] = vue.createElementVNode("div", {
5399
+ id: "humanViewOuter",
5400
+ style: { "position": "fixed", "width": "100vw", "height": "100vh", "top": "0", "left": "0", "display": "none" }
5401
+ }, null, -1)),
5383
5402
  vue.createElementVNode("div", {
5384
5403
  class: vue.normalizeClass(["humanEnterIcon", [$data.unreadCount > 0 ? "unreadCount" : ""]]),
5385
5404
  id: "humanEnterIcon"
@@ -5404,7 +5423,7 @@
5404
5423
  vue.createElementVNode("div", _hoisted_3, [
5405
5424
  vue.createElementVNode("span", {
5406
5425
  onClick: _cache[2] || (_cache[2] = ($event) => $data.visible = false),
5407
- onTouchstart: _cache[3] || (_cache[3] = ($event) => $data.visible = false)
5426
+ onTouchstart: _cache[3] || (_cache[3] = vue.withModifiers(($event) => $data.visible = false, ["stop"]))
5408
5427
  }, [..._cache[4] || (_cache[4] = [
5409
5428
  vue.createElementVNode("img", {
5410
5429
  src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAABzUlEQVR4AbzV207DQAwE0MKPA18Oe6ydKCnZdJNWRXFsj+ei9IXP25v/Evjdcn9b6a299OG5eCfwq0foCH19uvHiyah6An8gvRwQ+3q58eAVg8pIoGMB/YoI6+vpRssjQt6wWwIdAA5mRQAznyka2mh4wmpfBwIcEMyKEGaeKVyacHnBsm++MCACYnYGsOyjjoObOw9Y9ur3X1hgeyEStLEeRrBadl5uODnRwrIvfRSIQEBoVgxh5nXB3ILRwLJv+lEgIiEDs2IMMyszzKxwYebdehRIxICRWQmAKTNM4cDMw5oJJGbE0KwEKbNywzEf1mwgE4aMzeuCua2x4XwmcGhy5nAm0Fesf8bkwNyyH/bZQIaMY+ZnVNndcLIP+0wgI4YxEQRT5uA4sOy7/VEgA0YRC4BlN8Oy48Ky/+tHgYQMImIMy54Oc8tOA8u+6aNAAsKQGcKy33c3nOC0sOxL3wtEJAiJESz7qOPg5s4Dlr36fSACYh3biwGsjVMPLk3IvGDZN/8PHRByJIRln+00tOHzhNWeLwQ4FNheBLA2XnpoeUTMG7Z8ISBHxDoGuNh58Iq8MvKFOeiIIT3befHkUz2BDh8N1Vt76cNz8f4DAAD//8lliLUAAAAGSURBVAMAfghcOXqadykAAAAASUVORK5CYII=",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "boka-human-cliend-v3",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "main": "dist/boka-human-v3.umd.js",
5
5
  "scripts": {
6
6
  "dev": "vite",
package/src/demo/App.vue CHANGED
@@ -1,6 +1,7 @@
1
1
  <template>
2
2
  <div id="app">
3
- <BokaHuman :token="'Bearer 8937d9ccf21264a83c3cb29aaf16dc7'" :product="'manageCenterPlus'" :cust-type="'manageCenterPlus'" :sub-cust-type="'standard'" source="g8" :full-screen="1"/>
3
+ <BokaHuman :token="'707a38d6c7d2e9ea8ce126f40884986'" :product="'web'" :cust-type="''" :sub-cust-type="''" source="bkWeb-Mobile" :full-screen="1"/>
4
+ <div style="height: 200vh; width: 100vw; background: #fff;"></div>
4
5
  </div>
5
6
  </template>
6
7