@jctrans-materials/comps-vue3 1.0.40-beta.6 → 1.0.40-beta.8

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/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, onMounted, onBeforeUnmount, defineComponent, toRef, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, renderList, toDisplayString, withModifiers, createCommentVNode, withDirectives, withKeys, normalizeStyle, vModelText, unref, createBlock, Teleport, createTextVNode, vShow, createVNode, reactive, withCtx, resolveComponent, mergeProps, toHandlers, Transition, resolveDynamicComponent, createSlots, useModel, onUnmounted, normalizeProps, guardReactiveProps, mergeModels, nextTick, isRef, getCurrentInstance, createApp } from "vue";
2
- import { locationSearchV2, reportNewTypeDataApi, getCompanyOptionApi, slideGetApi, slideCheckApi, emitter, MODAL_ACTION, setTokenAll, getAuthSessionItems, getSessionHeaderValue, getProjectId, loginByFacebookApi, loginByLinkedinApi, validateAccountExistApi, findListByMobileEmailApi, validateCompanyApi, resetAuthSessionItems as resetAuthSessionItems$1, registerJoinCompanyBindWechatApi, registerJoinCompanyApi, registerUserCompBindWechatApi, registerApi, Encrypt, getLocalIpDataApi, findPAreaCodeAPi, findDictAPi, sendEmailCodeApi, sendMobileCodeApi, getLoginQrCode, setAuthSessionItems, loginByQrCode, getFirstDomain, loginApi, loginByEmailOrMobileCodeApi, loginPwdBindWechatApi, loginCodeBindWechatApi, completeJoinCompanyRedirectApi, completeCompRedirectApi, getUserInfoApi, resetPasswordApi, getMEVCodeApi, checkAccountExistsFPApi, bindThirdPartyByPwdApi, bindThirdPartyByCodeApi, registerJoinCompByThirdPartyApi, registerByThirdPartyApi, resetGioSessionItems, getRememberAccount, Decrypt, setRememberMe, tracker, initSharedConfig } from "@jctrans-materials/shared";
2
+ import { locationSearchV2, reportNewTypeDataApi, getCompanyOptionApi, slideGetApi, slideCheckApi, emitter, MODAL_ACTION, setTokenAll, getAuthSessionItems, getSessionHeaderValue, getProjectId, loginByFacebookApi, loginByLinkedinApi, validateAccountExistApi, findListByMobileEmailApi, validateCompanyApi, resetAuthSessionItems as resetAuthSessionItems$1, registerJoinCompanyBindWechatApi, registerJoinCompanyApi, registerUserCompBindWechatApi, registerApi, Encrypt, getLocalIpDataApi, findPAreaCodeAPi, findDictAPi, sendEmailCodeApi, sendMobileCodeApi, getLoginQrCode, setAuthSessionItems, loginByQrCode, getFirstDomain, loginApi, loginByEmailOrMobileCodeApi, loginPwdBindWechatApi, loginCodeBindWechatApi, completeJoinCompanyRedirectApi, completeCompRedirectApi, getUserInfoApi, resetPasswordApi, getMEVCodeApi, checkAccountExistsFPApi, bindThirdPartyByPwdApi, bindThirdPartyByCodeApi, registerJoinCompByThirdPartyApi, registerByThirdPartyApi, resetGioSessionItems, getRememberAccount, Decrypt, setRememberMe, tracker, normalizeClickPageAttrs, initSharedConfig } from "@jctrans-materials/shared";
3
3
  import { MODAL_ACTION as MODAL_ACTION2, createRequest, emitter as emitter2, getAppId, initSharedConfig as initSharedConfig2 } from "@jctrans-materials/shared";
4
4
  import { useFormItem, ElMessage, vLoading, ElSelect, ElOption, ElInput, ElDialog, ElForm, ElRow, ElCol, ElFormItem, ElCheckbox, ElButton, ElRadioButton, ElRadioGroup, ElMessageBox, ElCascader, ElTag } from "element-plus";
5
5
  const shouldHydrate = (item) => {
@@ -2315,7 +2315,7 @@ const _export_sfc = (sfc, props) => {
2315
2315
  }
2316
2316
  return target;
2317
2317
  };
2318
- const JcSearch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-41ee7833"]]);
2318
+ const JcSearch$1 = /* @__PURE__ */ _export_sfc(_sfc_main$r, [["__scopeId", "data-v-176a8f0f"]]);
2319
2319
  const __vite_glob_0_14 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2320
2320
  __proto__: null,
2321
2321
  default: JcSearch$1
@@ -10789,6 +10789,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
10789
10789
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => carrierId.value = $event),
10790
10790
  type: "Carrier",
10791
10791
  "line-type": "air",
10792
+ "report-type": "air_carrier",
10792
10793
  class: "jc-air-carrier-search",
10793
10794
  placeholder: currentPlaceholder.value,
10794
10795
  "show-apply-data": __props.showApplyData,
@@ -10886,6 +10887,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
10886
10887
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => carrierId.value = $event),
10887
10888
  type: "Line",
10888
10889
  "line-type": "air",
10890
+ "report-type": "air_line",
10889
10891
  class: "jc-air-line-search",
10890
10892
  placeholder: currentPlaceholder.value,
10891
10893
  "show-apply-data": __props.showApplyData,
@@ -10983,6 +10985,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
10983
10985
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => carrierId.value = $event),
10984
10986
  type: "Carrier",
10985
10987
  "line-type": "shipping",
10988
+ "report-type": "shipping_carrier",
10986
10989
  class: "jc-sea-carrier-search",
10987
10990
  placeholder: currentPlaceholder.value,
10988
10991
  "show-apply-data": __props.showApplyData,
@@ -11080,6 +11083,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
11080
11083
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => carrierId.value = $event),
11081
11084
  type: "Line",
11082
11085
  "line-type": "shipping",
11086
+ "report-type": "shipping_line",
11083
11087
  class: "jc-sea-line-search",
11084
11088
  placeholder: currentPlaceholder.value,
11085
11089
  "show-apply-data": __props.showApplyData,
@@ -11139,6 +11143,10 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11139
11143
  type: String,
11140
11144
  default: "shipping"
11141
11145
  },
11146
+ reportType: {
11147
+ type: String,
11148
+ default: "carrier"
11149
+ },
11142
11150
  placeholder: {
11143
11151
  type: String,
11144
11152
  default: ""
@@ -11311,7 +11319,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11311
11319
  if (currentQuery.value) {
11312
11320
  reportNewTypeDataApi({
11313
11321
  reportData: currentQuery.value,
11314
- reportType: props.type.toLocaleLowerCase()
11322
+ reportType: props.reportType.toLocaleLowerCase()
11315
11323
  });
11316
11324
  }
11317
11325
  emit("apply", currentQuery.value);
@@ -11442,7 +11450,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
11442
11450
  };
11443
11451
  }
11444
11452
  });
11445
- const index$3 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-8b1bf751"]]);
11453
+ const index$3 = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-cf8bba30"]]);
11446
11454
  const __vite_glob_0_9 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11447
11455
  __proto__: null,
11448
11456
  default: index$3
@@ -12308,10 +12316,7 @@ function go2Policy(target = "_blank") {
12308
12316
  link.dispatchEvent(event);
12309
12317
  }
12310
12318
  const handleRedirect = (path, delay = 100) => {
12311
- if (process.env && process.env.NODE_ENV === "development") {
12312
- console.log("🍉 ~ constant.ts:517 ~ handleRedirect ~ path:", path);
12313
- return;
12314
- }
12319
+ if (typeof window === "undefined") return;
12315
12320
  if (!path) return;
12316
12321
  setTimeout(() => {
12317
12322
  if (path.startsWith("http")) {
@@ -19643,16 +19648,6 @@ const _sfc_main$2 = {
19643
19648
  async getLocalIpData() {
19644
19649
  const res1 = await getLocalIpDataApi();
19645
19650
  let IpDataRes = res1.data.data;
19646
- if (process.env.NODE_ENV === "development") {
19647
- IpDataRes = {
19648
- countryId: 57,
19649
- cityId: 4022,
19650
- countryNameCn: "新加坡",
19651
- countryNameEn: "Singapore",
19652
- cityNameCn: "新加坡",
19653
- cityNameEn: "Singapore"
19654
- };
19655
- }
19656
19651
  this.IpData = IpDataRes;
19657
19652
  },
19658
19653
  async getAreaCodeData() {
@@ -20087,7 +20082,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
20087
20082
  _: 1
20088
20083
  }, 8, ["modelValue", "width", "onClose", "onOpen"]);
20089
20084
  }
20090
- const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render], ["__scopeId", "data-v-e9b64ec5"]]);
20085
+ const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render], ["__scopeId", "data-v-5454c95c"]]);
20091
20086
  const __vite_glob_0_12 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
20092
20087
  __proto__: null,
20093
20088
  default: index$2
@@ -20954,10 +20949,17 @@ const normalizeBinding = (binding) => {
20954
20949
  prevent: false
20955
20950
  };
20956
20951
  }
20952
+ const rawAttrs = value.attributes || value.attrs || {};
20953
+ const normalizedAttrs = Object.entries(rawAttrs).reduce((acc, [key, val]) => {
20954
+ if (val !== void 0 && val !== null) {
20955
+ acc[key] = val;
20956
+ }
20957
+ return acc;
20958
+ }, {});
20957
20959
  return {
20958
20960
  eventName: pickString(value.event, value.name, binding.arg),
20959
20961
  trigger: pickString(value.trigger) || "click",
20960
- attrs: value.attributes || value.attrs || {},
20962
+ attrs: normalizedAttrs,
20961
20963
  once: Boolean(value.once),
20962
20964
  stop: Boolean(value.stop),
20963
20965
  prevent: Boolean(value.prevent),
@@ -20982,12 +20984,16 @@ const bindTrackHandler = (element, binding, gio) => {
20982
20984
  event.stopPropagation();
20983
20985
  }
20984
20986
  if (gio.isInitialized()) {
20985
- gio.track(normalized.eventName, normalized.attrs, () => {
20987
+ const normalizedAttrs = normalizeClickPageAttrs(
20988
+ normalized.eventName,
20989
+ normalized.attrs
20990
+ );
20991
+ gio.track(normalized.eventName, normalizedAttrs, () => {
20986
20992
  var _a;
20987
20993
  (_a = normalized.callback) == null ? void 0 : _a.call(normalized, {
20988
20994
  event,
20989
20995
  eventName: normalized.eventName,
20990
- attrs: normalized.attrs,
20996
+ attrs: normalizedAttrs,
20991
20997
  trigger: normalized.trigger
20992
20998
  });
20993
20999
  });
@@ -21007,7 +21013,8 @@ const createTrackEvent = (gio) => {
21007
21013
  return (eventName, attrs) => {
21008
21014
  const normalizedEvent = pickString(eventName);
21009
21015
  if (!normalizedEvent || !gio.isInitialized()) return;
21010
- gio.track(normalizedEvent, attrs || {});
21016
+ const normalizedAttrs = normalizeClickPageAttrs(normalizedEvent, attrs);
21017
+ gio.track(normalizedEvent, normalizedAttrs);
21011
21018
  };
21012
21019
  };
21013
21020
  function createGioTrackingPlugin(rawConfig) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jctrans-materials/comps-vue3",
3
- "version": "1.0.40-beta.6",
3
+ "version": "1.0.40-beta.8",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "nanoid": "^5.1.6",
39
39
  "qrcode": "^1.5.4",
40
40
  "tailwindcss": "4.1.18",
41
- "@jctrans-materials/shared": "1.0.40-beta.6"
41
+ "@jctrans-materials/shared": "1.0.40-beta.8"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@tailwindcss/postcss": "4.1.18",