@feedmepos/mf-connect 0.1.89-prod → 0.1.91-prod
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/{Analytic-Caz3AQQ2.js → Analytic-NC-USqGi.js} +11 -11
- package/dist/{App-D_q4nHiY.js → App-7D_MZN0d.js} +7 -7
- package/dist/{Bin-DURa0qe2.js → Bin-60inU7_9.js} +8 -8
- package/dist/{Broadcast-ByDjXqap.js → Broadcast-BFMikTv0.js} +8 -8
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BD8mWUzO.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DrHHwGED.js} +7 -7
- package/dist/{Card-BSSzVrbz.js → Card-vafU4dyU.js} +19 -19
- package/dist/{Collections-CTwUl8W3.js → Collections-BNSNZg7H.js} +8 -8
- package/dist/{Credit-TgZBmYsM.js → Credit-Cy6YPGph.js} +8 -8
- package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DZV3JtDl.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-7IXALR4_.js} +33 -33
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BwOs5NHt.js → EffectSheet.vue_vue_type_style_index_0_lang-7Tanljx6.js} +6 -6
- package/dist/{Experience-DUCO6do6.js → Experience-BVneXtjz.js} +8 -8
- package/dist/{FileSaver.min-BaCfYtPG.js → FileSaver.min-DRZVt2c-.js} +1 -1
- package/dist/{Game-DcwQSCjZ.js → Game-leXiqv6v.js} +9 -9
- package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BSMwEFqp.js → ImageInput.vue_vue_type_script_setup_true_lang-bvPXAI2I.js} +1 -1
- package/dist/{Index-Bp2CKHw3.js → Index-BU3ubcCK.js} +10 -10
- package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-WWVHvcOU.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DmnST0XL.js} +1 -1
- package/dist/{MainLayout-Q_0POZ4I.js → MainLayout-DfMxhjyZ.js} +1 -1
- package/dist/{Marketing-D52IYXPR.js → Marketing-DVZfv6KL.js} +6 -6
- package/dist/{Member-sxjxhLwQ.js → Member-C1UGjz3K.js} +12 -12
- package/dist/{MemberList-vLNFHNRw.js → MemberList-B51qk9PN.js} +436 -441
- package/dist/{MemberTransactions-BeHeN0Rk.js → MemberTransactions-XeeZVSj7.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-B6cF0EC3.js → MessageInput.vue_vue_type_script_setup_true_lang-BZFh4LbN.js} +9 -9
- package/dist/{Mission-CnJCjBhe.js → Mission-_2ubnxed.js} +9 -9
- package/dist/{Overview-B3jRs_Cg.js → Overview-Wtw2Gxca.js} +19 -19
- package/dist/{Point-BldY5wb0.js → Point-BWNPBISs.js} +8 -8
- package/dist/{Promotion-CsGhqlY0.js → Promotion-Cq1rta1U.js} +9 -9
- package/dist/{Queue-CLa2pSXF.js → Queue-BislCglv.js} +11 -11
- package/dist/{Record-JbbAM6lI.js → Record-DllYWBQs.js} +9 -9
- package/dist/{Reward-wgiBCIV3.js → Reward-DNnMSiIt.js} +16 -16
- package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-DiNlpy7_.js → RewardGroup.vue_vue_type_script_setup_true_lang-CYgKBX4A.js} +12 -12
- package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B3Ylb1vx.js → RuleGroup.vue_vue_type_script_setup_true_lang-CBLDHomx.js} +15 -15
- package/dist/{Segment-BQiZ51Wi.js → Segment-BawFn2kF.js} +25 -25
- package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DbXFTjAN.js → SelectItems.vue_vue_type_script_setup_true_lang-DaF39TyG.js} +2 -2
- package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-Be_kiAB6.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-vxFwpQoN.js} +13 -13
- package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-DS1MWUOc.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BBddcORt.js} +4 -4
- package/dist/Setting-Gt-j2X-h.js +2028 -0
- package/dist/{SettingAdvertisements-OdDM05s7.js → SettingAdvertisements-CETtBWdy.js} +12 -12
- package/dist/{Store-D1Q0wOXk.js → Store-DxBaC_7y.js} +22 -22
- package/dist/StoreRewards-CbmzaAnf.js +537 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CB6y-TEk.js +1118 -0
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BKzZIJkt.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-Ckdg2H3D.js} +5 -3
- package/dist/{Tier-DOnYGgah.js → Tier-BRBr_4Vs.js} +22 -22
- package/dist/{Title-F4XJw6oN.js → Title-N1Aoum66.js} +21 -21
- package/dist/{Transaction-Ws7kBZUE.js → Transaction-DzrBiUhw.js} +2 -2
- package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BZb0EXgi.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-xtnyUh_C.js} +6 -6
- package/dist/{Voucher-DX8MKz00.js → Voucher-95IbNNON.js} +12 -12
- package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-tUNn1vRE.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BOf9umaT.js} +12 -12
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BvgIZlIh.js → ZodTextField.vue_vue_type_script_setup_true_lang-vCA6xspO.js} +2 -2
- package/dist/{app-C-nC9SMv.js → app-CSXjCxhe.js} +49 -45
- package/dist/app.js +1 -1
- package/dist/{business-CrQ_qouH.js → business-B1gGiOi3.js} +1 -1
- package/dist/{campaign-CBRSag11.js → campaign-CJ-3fIa_.js} +8 -8
- package/dist/{campaign-shm1Nb7g.js → campaign-CTPJV80W.js} +1 -1
- package/dist/{campaign.enum-C-p5_XEd.js → campaign.enum-C6mTkAc0.js} +1 -1
- package/dist/campaign.fn-Dnq8oOA7.js +776 -0
- package/dist/{collectible.enum-DxOoBouZ.js → collectible.enum-Bm9ym61N.js} +1 -1
- package/dist/{collection.fn-BKmv2KVW.js → collection.fn-eGKUovTx.js} +2 -2
- package/dist/{dto-BRQj35uX.js → dto-BmlZ970m.js} +4 -4
- package/dist/{effect-Bbc7QO26.js → effect-Fi165HuU.js} +1 -1
- package/dist/{email-addresses-CdmKczY8.js → email-addresses-CkqIxXsD.js} +2 -2
- package/dist/{export-xWupGZRl.js → export-BINxBZ3o.js} +3 -3
- package/dist/{helper-C_t7u0sc.js → helper-BJpoVem-.js} +1 -1
- package/dist/{index-C6PeL89d.js → index-BBTSDrdg.js} +3 -3
- package/dist/{index-BxosLsfW.js → index-BazRPGxz.js} +1 -1
- package/dist/{index-CLvFXL_E.js → index-C-7bzCQ9.js} +4 -4
- package/dist/{index-REoHVOcy.js → index-CMnMUrQv.js} +1 -1
- package/dist/index-Ceebw9zT.js +85 -0
- package/dist/{index-ClEGMTrv.js → index-CfEzixyr.js} +1 -1
- package/dist/{index-lZq2A3X2.js → index-Cg170bHf.js} +3 -3
- package/dist/{index-DW7nPyed.js → index-D2lJ7rbj.js} +6 -6
- package/dist/{index-DAhj82tf.js → index-D_D_KuCj.js} +1 -1
- package/dist/{index-DaCQrz9t.js → index-ShgzGUii.js} +3 -3
- package/dist/{index-BHwWZLKa.js → index-agtRTQ1_.js} +5 -3
- package/dist/{index-RsNRLaWL.js → index-elY0gYnL.js} +23 -12
- package/dist/{index-BaGjDOR2.js → index-msYk4Nww.js} +1 -1
- package/dist/{index.esm2017-DIVK9KD2.js → index.esm2017-CFwZeNKo.js} +1 -1
- package/dist/{loading-xptL2Ny2.js → loading-CWsuOmex.js} +1 -1
- package/dist/{lodash-88xjswCi.js → lodash-Cm9Z1YF2.js} +1 -1
- package/dist/{membership-eoLCZt_p.js → membership-DMInG-QR.js} +3 -3
- package/dist/{money-DcsDa1nm.js → money-COObXSez.js} +1 -1
- package/dist/{number-BkGWCSrD.js → number-ZsyBuNFr.js} +1 -1
- package/dist/objectid-Tx-E_slw.js +145 -0
- package/dist/{plugins-DoTCd9nY.js → plugins-CvqTFq6l.js} +3 -3
- package/dist/{reward-Culc3-Rv.js → reward-BDSUzN0_.js} +1 -1
- package/dist/{rule-DUDjRs8M.js → rule-BzWFD4lu.js} +3 -3
- package/dist/{rule-builder-CkZtoez-.js → rule-builder-y5PUkSk9.js} +1 -1
- package/dist/{template-CxhdtuLf.js → template-CO3A7_3t.js} +7 -7
- package/dist/{timezone-CdsdekR2.js → timezone-ClbAM0Sw.js} +5 -3
- package/dist/{trigger-CFXIiuLd.js → trigger-DGoPndhx.js} +5 -5
- package/dist/usePagination-COHUplyH.js +220 -0
- package/dist/{user-C7hrMSvV.js → user-CnDTKRSl.js} +1 -1
- package/dist/{vue-i18n-BdGyU2Nr.js → vue-i18n-X1TYXdQD.js} +387 -387
- package/dist/{xlsx-BN2KFkI2.js → xlsx-W_9bPRI8.js} +166 -166
- package/dist/{zod-DvUTBth7.js → zod-D9xVg76J.js} +1 -1
- package/package.json +1 -1
- package/dist/Setting-De1lCG6N.js +0 -1989
- package/dist/StoreRewards-2Gdv7uu4.js +0 -535
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-NtxHf8HF.js +0 -1016
- package/dist/campaign.fn-BGzZfg1o.js +0 -776
- package/dist/index-DDQaEXt7.js +0 -76
- package/dist/objectid-gUqB9tj7.js +0 -145
- package/dist/usePagination-BSeGmTq6.js +0 -177
package/dist/index-DDQaEXt7.js
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { g as t, S as I, u as C, b as w } from "./index-BHwWZLKa.js";
|
|
2
|
-
const a = () => {
|
|
3
|
-
if (!I.getBusinessId()) throw new Error("Invalid business ID");
|
|
4
|
-
return C("users");
|
|
5
|
-
}, c = () => {
|
|
6
|
-
const e = I.getBusinessId();
|
|
7
|
-
if (!e) throw new Error("Invalid business ID");
|
|
8
|
-
return w(`businesses/${e}/membership`, {
|
|
9
|
-
noIdRequired: !0
|
|
10
|
-
});
|
|
11
|
-
}, y = {
|
|
12
|
-
async read(e) {
|
|
13
|
-
const s = t(
|
|
14
|
-
await a().get("", { params: e })
|
|
15
|
-
), n = s.resources.map((r) => {
|
|
16
|
-
var i, o, d, l, p, u, m, b;
|
|
17
|
-
return {
|
|
18
|
-
...r,
|
|
19
|
-
collection_TIER_0_balance: ((o = (i = r.collection.TIER) == null ? void 0 : i[0]) == null ? void 0 : o.balance) ?? 0,
|
|
20
|
-
collection_CREDIT_0_balance: ((l = (d = r.collection.CREDIT) == null ? void 0 : d[0]) == null ? void 0 : l.balance) ?? 0,
|
|
21
|
-
collection_COIN_0_balance: ((u = (p = r.collection.COIN) == null ? void 0 : p[0]) == null ? void 0 : u.balance) ?? 0,
|
|
22
|
-
collection_TITLE_0_title: ((b = (m = r.collection.TITLE) == null ? void 0 : m[0]) == null ? void 0 : b.title) ?? ""
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
return {
|
|
26
|
-
meta: s.meta,
|
|
27
|
-
resources: n
|
|
28
|
-
};
|
|
29
|
-
},
|
|
30
|
-
async readById(e) {
|
|
31
|
-
return t(await a().get(`${e}`));
|
|
32
|
-
},
|
|
33
|
-
async sendCredit(e, s) {
|
|
34
|
-
return t(
|
|
35
|
-
await c().post(
|
|
36
|
-
`members/${e}/send-credit`,
|
|
37
|
-
s
|
|
38
|
-
)
|
|
39
|
-
);
|
|
40
|
-
},
|
|
41
|
-
async deductCredit(e, s) {
|
|
42
|
-
return t(
|
|
43
|
-
await c().post(
|
|
44
|
-
`members/${e}/deduct-credit`,
|
|
45
|
-
s
|
|
46
|
-
)
|
|
47
|
-
);
|
|
48
|
-
},
|
|
49
|
-
async sendCoin(e, s) {
|
|
50
|
-
return t(
|
|
51
|
-
await c().post(
|
|
52
|
-
`members/${e}/send-coin`,
|
|
53
|
-
s
|
|
54
|
-
)
|
|
55
|
-
);
|
|
56
|
-
},
|
|
57
|
-
async deductCoin(e, s) {
|
|
58
|
-
return t(
|
|
59
|
-
await c().post(
|
|
60
|
-
`members/${e}/deduct-coin`,
|
|
61
|
-
s
|
|
62
|
-
)
|
|
63
|
-
);
|
|
64
|
-
},
|
|
65
|
-
async updateMember(e, s) {
|
|
66
|
-
return t(
|
|
67
|
-
await a().put(`${e}`, s)
|
|
68
|
-
);
|
|
69
|
-
},
|
|
70
|
-
async import(e) {
|
|
71
|
-
return await a().post("import", e);
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
export {
|
|
75
|
-
y as m
|
|
76
|
-
};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { g as l } from "./app-C-nC9SMv.js";
|
|
2
|
-
var t = { env: { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_d61de606-47a2-4fb6-9a62-3cb3b8141114", npm_package_dependencies_zod: "3.22.4", npm_package_devDependencies__types_node: "^18.19.41", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", npm_package_dependencies_vite_plugin_vue_devtools: "^7.6.4", npm_package_devDependencies_vitest: "^2.1.9", USER: "runner", npm_config_user_agent: "pnpm/9.15.9 npm/? node/v20.20.2 linux x64", CI: "true", npm_package_dependencies_vue: "^3.5.13", USE_BAZEL_FALLBACK_VERSION: "silent:", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_d61de606-47a2-4fb6-9a62-3cb3b8141114", PIPX_HOME: "/opt/pipx", npm_package_devDependencies_vite: "^5.3.4", npm_node_execpath: "/opt/hostedtoolcache/node/20.20.2/x64/bin/node", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", SHLVL: "1", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_dependencies_moment_timezone: "^0.6.0", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_scripts_build_mf_dev: "vite build --mode fmmf", npm_package_dependencies__types_qrcode: "^1.5.5", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_package_dependencies_change_case: "^5.4.4", NODE_OPTIONS: "--max-old-space-size=8096", GRADLE_HOME: "/usr/share/gradle-9.5.1", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/29.0.14206865", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", GITHUB_RETENTION_DAYS: "90", npm_package_dependencies__feedmepos_mf_common: "1.29.23", npm_package_dependencies_fabric: "^6.4.2", npm_package_dependencies_zod_i18n_map: "2.27.0", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-Linux", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_devDependencies__types_file_saver: "^2.0.7", SYSTEMD_EXEC_PID: "1859", ACTIONS_ORCHESTRATION_ID: "fbc66960-9d21-4eb5-a263-a427488ac70c.deploy.__default", npm_package_dependencies__feedmepos_ui_library: "1.10.4", npm_package_dependencies_dayjs: "^1.11.12", npm_package_dependencies_dotenv: "^16.4.5", npm_package_dependencies_moment: "^2.30.1", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_scripts_build_only_dev: "pnpm build:mf:dev", npm_package_dependencies__tailwindcss_typography: "^0.5.16", npm_package_dependencies_i18next: "24.2.1", npm_package_devDependencies_tailwindcss: "^3.4.6", npm_package_devDependencies_typescript: "^5.5.3", JAVA_HOME_25_X64: "/usr/lib/jvm/temurin-25-jdk-amd64", NVM_DIR: "/home/runner/.nvm", npm_package_scripts_build_dev: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode development", npm_package_scripts_build_only_prod: "pnpm build:mf:prod", npm_package_dependencies_xlsx: "^0.18.5", npm_package_devDependencies_vue_tsc: "^2.0.26", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20260607.184.1", npm_package_scripts_dev: "vite", npm_package_scripts_build_prod: "cross-env NODE_OPTIONS=--max-old-space-size=4096 vite build --mode production", npm_package_dependencies_unplugin_auto_import: "^0.17.8", LOGNAME: "runner", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.12/x64", STORE_PATH: "/home/runner/setup-pnpm/node_modules/.bin/store/v3", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_type: "module", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.12/x64", JOURNAL_STREAM: "9:11231", GITHUB_WORKFLOW: "[CD:prod] connect-portal (mf-connect)", _: "/home/runner/setup-pnpm/node_modules/.bin/pnpm", npm_package_module: "./dist/app.js", npm_package_devDependencies_autoprefixer: "^10.4.19", MEMORY_PRESSURE_WATCH: "/sys/fs/cgroup/system.slice/hosted-compute-agent.service/memory.pressure", GOROOT_1_24_X64: "/opt/hostedtoolcache/go/1.24.13/x64", npm_package_devDependencies__types_uuid: "^9.0.8", npm_package_devDependencies_unlayer_types: "^1.157.0", npm_config_registry: "https://registry.npmjs.org/", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", GOROOT_1_25_X64: "/opt/hostedtoolcache/go/1.25.11/x64", GITHUB_RUN_ID: "27533202348", npm_package_dependencies_bson_objectid: "^2.0.4", npm_package_devDependencies__types_lodash: "^4.17.7", GITHUB_REF_TYPE: "tag", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "903f161d652295120cbe4257eea9b6934b14cdb0", GITHUB_BASE_REF: "", ImageOS: "ubuntu24", npm_package_exports___import: "./dist/app.js", npm_package_dependencies__ckeditor_ckeditor5_vue: "^7.3.0", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.5", GITHUB_WORKFLOW_REF: "feedmepos/marketing-services/.github/workflows/[PROD] deploy-mf-connect.yml@refs/tags/mf-connect-0.1.89-prod", GITHUB_ACTION_REPOSITORY: "", ENABLE_RUNNER_TRACING: "true", npm_package_dependencies_axios: "^1.7.2", npm_config_node_gyp: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js", PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.bin:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/dist/node-gyp-bin:/home/runner/setup-pnpm/node_modules/.bin:/opt/hostedtoolcache/node/20.20.2/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_ee7d9a89-7e24-47f7-ad1b-ce8dd7694dcc", INVOCATION_ID: "edd5c054896a418698e245d6f304c377", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", NODE: "/opt/hostedtoolcache/node/20.20.2/x64/bin/node", npm_package_name: "@feedmepos/mf-connect", npm_package_scripts_deploy_dev: "pnpm run build-only:dev && pnpm publish --no-git-checks .", npm_package_dependencies_cross_env: "^7.0.3", npm_package_dependencies_file_saver: "^2.0.5", GITHUB_ACTION: "__run_5", GITHUB_RUN_NUMBER: "73", GITHUB_TRIGGERING_ACTOR: "qaijunse", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_scripts_deploy_prod: "pnpm run build-only:prod && pnpm publish --no-git-checks .", npm_config_frozen_lockfile: "", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_dependencies__feedmepos_mf_core_ui: "1.0.23", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 1000077356", XDG_CONFIG_HOME: "/home/runner/.config", GITHUB_REF_NAME: "mf-connect-0.1.89-prod", GITHUB_REPOSITORY: "feedmepos/marketing-services", npm_package_scripts_build_dts: "vue-tsc --declaration --noEmit false --emitDeclarationOnly -p tsconfig.json --outDir ./dist && mv ./dist/src/* dist", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.json --outDir dist --composite false", npm_package_dependencies__feedmepos_core: "2.15.21", npm_lifecycle_script: "vite build --mode fmmf:prod", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_scripts_test: "vitest run", npm_package_dependencies_rrule: "^2.8.1", npm_package_dependencies_vue3_lottie: "^3.3.0", SHELL: "/bin/bash", GITHUB_REPOSITORY_ID: "615151795", GITHUB_ACTIONS: "true", NODE_PATH: "/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/bin/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules/vite/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/vite@5.3.4_@types+node@18.19.41/node_modules:/home/runner/work/marketing-services/marketing-services/packages/connect/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules:/home/runner/setup-pnpm/node_modules/.pnpm/node_modules", npm_package_version: "0.1.89-prod", npm_package_dependencies__feedmepos_hrm_permission: "1.0.6", npm_package_dependencies_ckeditor5: "^44.3.0", npm_lifecycle_event: "build:mf:prod", GITHUB_REF_PROTECTED: "false", npm_package_scripts_build: "vue-tsc && vite build", npm_package_dependencies_uuid: "^10.0.0", npm_package_dependencies_vue_i18n: "10.0.5", GITHUB_WORKSPACE: "/home/runner/work/marketing-services/marketing-services", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", npm_package_dependencies_lodash: "^4.17.21", GITHUB_SHA: "903f161d652295120cbe4257eea9b6934b14cdb0", GITHUB_RUN_ATTEMPT: "1", npm_package_exports___style: "./dist/style.css", npm_package_dependencies__ckeditor_ckeditor5_build_classic: "^44.3.0", npm_package_dependencies_vue_router: "^4.4.0", ACTIONS_RUNNER_RETURN_JOB_RESULT_FOR_HOSTED: "1", GITHUB_REF: "refs/tags/mf-connect-0.1.89-prod", GITHUB_ACTOR: "qaijunse", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_package_license: "UNLICENSED", npm_package_dependencies_email_addresses: "^5.0.0", npm_package_scripts_test_watch: "vitest", npm_package_dependencies_firebase: "^10.12.4", npm_package_dependencies_qrcode: "^1.5.3", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_d61de606-47a2-4fb6-9a62-3cb3b8141114", JAVA_HOME: "/usr/lib/jvm/temurin-17-jdk-amd64", PWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", GITHUB_ACTOR_ID: "39590157", RUNNER_WORKSPACE: "/home/runner/work/marketing-services", npm_execpath: "/home/runner/setup-pnpm/node_modules/.pnpm/pnpm@9.15.9/node_modules/pnpm/bin/pnpm.cjs", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", GITHUB_EVENT_NAME: "push", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_d61de606-47a2-4fb6-9a62-3cb3b8141114", npm_package_exports___types: "./dist/packages/connect/src/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", PNPM_SCRIPT_SRC_DIR: "/home/runner/work/marketing-services/marketing-services/packages/connect", npm_package_devDependencies_postcss: "^8.4.39", npm_command: "run-script", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.3.13750724", SGX_AESM_ADDR: "1", PSModulePath: "/root/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules:/usr/share/az_15.6.1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", MEMORY_PRESSURE_WRITE: "c29tZSAyMDAwMDAgMjAwMDAwMAA=", PNPM_HOME: "/home/runner/setup-pnpm/node_modules/.bin", npm_package_dependencies__feedmepos_menu: "1.0.34", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.3.13750724", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_d61de606-47a2-4fb6-9a62-3cb3b8141114", INIT_CWD: "/home/runner/work/marketing-services/marketing-services/packages/connect", NODE_ENV: "production", FEEDME_NAMESPACE: "prod", FIREBASE_API_KEY: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", FIREBASE_AUTH_DOMAIN: "feedme-253402.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-253402.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-253402", FIREBASE_STORAGE_BUCKET: "image.feedme.cc", FIREBASE_MESSAGING_SENDER_ID: "128512026847", FIREBASE_APP_ID: "1:128512026847:web:7c5c8ab7e8b90502dc616a", FIREBASE_MEASUREMENT_ID: "G-LTKS7N2HQS", ASSET_STORAGE_BUCKET: "static.feedme.cc", IMPORT_FILES_STORAGE_BUCKET: "feedme-253402.appspot.com", AUTH_URL: "https://portal-v2.feedmeapi.com/", SLACK_WEBHOOK_URL: "https://hooks.slack.com/services/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", MEMBER_APP_URL: "member.feedme.cc", CRM_APP_URL: "crm.feedme.cc", MARKETING_V1_PORTAL: "https://marketing-v1.feedme.cc", CLIENT_ID: "d5f8840d63dbb758b6c4ee2a5e8b013d15dd25e242c457481326062b83962476", PAYMENT_PORTAL_URL: "https://portal.feedme.cc/payment/payout-account", LICENSE_PORTAL_URL: "https://license.feedme.cc/", VOUCHER_APP_URL: "https://voucher.feedme.cc/" } }, i = Math.floor(Math.random() * 16777215), a = n.index = parseInt(Math.random() * 16777215, 10), c = (typeof t > "u" || typeof t.pid != "number" ? Math.floor(Math.random() * 1e5) : t.pid) % 65535, d = (() => {
|
|
3
|
-
try {
|
|
4
|
-
return _Buffer;
|
|
5
|
-
} catch {
|
|
6
|
-
try {
|
|
7
|
-
return Buffer;
|
|
8
|
-
} catch {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
})(), r = function(e) {
|
|
13
|
-
return !!(e != null && e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e));
|
|
14
|
-
}, u = [];
|
|
15
|
-
for (var p = 0; p < 256; p++)
|
|
16
|
-
u[p] = (p <= 15 ? "0" : "") + p.toString(16);
|
|
17
|
-
var m = new RegExp("^[0-9a-fA-F]{24}$"), s = [];
|
|
18
|
-
p = 0;
|
|
19
|
-
for (; p < 10; ) s[48 + p] = p++;
|
|
20
|
-
for (; p < 16; ) s[55 + p] = s[87 + p] = p++;
|
|
21
|
-
function n(e) {
|
|
22
|
-
if (!(this instanceof n)) return new n(e);
|
|
23
|
-
if (e && (e instanceof n || e._bsontype === "ObjectID"))
|
|
24
|
-
return e;
|
|
25
|
-
if (this._bsontype = "ObjectID", e == null || typeof e == "number") {
|
|
26
|
-
this.id = this.generate(e);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
var _ = n.isValid(e);
|
|
30
|
-
if (!_ && e != null)
|
|
31
|
-
throw new Error(
|
|
32
|
-
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
33
|
-
);
|
|
34
|
-
if (_ && typeof e == "string" && e.length === 24)
|
|
35
|
-
return n.createFromHexString(e);
|
|
36
|
-
if (e != null && e.length === 12)
|
|
37
|
-
this.id = e;
|
|
38
|
-
else {
|
|
39
|
-
if (e != null && typeof e.toHexString == "function")
|
|
40
|
-
return e;
|
|
41
|
-
throw new Error(
|
|
42
|
-
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
var g = n;
|
|
47
|
-
n.default = n;
|
|
48
|
-
n.createFromTime = function(e) {
|
|
49
|
-
return e = parseInt(e, 10) % 4294967295, new n(f(8, e) + "0000000000000000");
|
|
50
|
-
};
|
|
51
|
-
n.createFromHexString = function(e) {
|
|
52
|
-
if (typeof e > "u" || e != null && e.length !== 24)
|
|
53
|
-
throw new Error(
|
|
54
|
-
"Argument passed in must be a single String of 12 bytes or a string of 24 hex characters"
|
|
55
|
-
);
|
|
56
|
-
for (var _ = "", o = 0; o < 24; )
|
|
57
|
-
_ += String.fromCharCode(s[e.charCodeAt(o++)] << 4 | s[e.charCodeAt(o++)]);
|
|
58
|
-
return new n(_);
|
|
59
|
-
};
|
|
60
|
-
n.isValid = function(e) {
|
|
61
|
-
return e == null ? !1 : typeof e == "number" ? !0 : typeof e == "string" ? e.length === 12 || e.length === 24 && m.test(e) : e instanceof n ? !0 : r(e) ? n.isValid(e.toString("hex")) : typeof e.toHexString == "function" && d && (e.id instanceof d || typeof e.id == "string") ? e.id.length === 12 || e.id.length === 24 && m.test(e.id) : !1;
|
|
62
|
-
};
|
|
63
|
-
n.prototype = {
|
|
64
|
-
constructor: n,
|
|
65
|
-
/**
|
|
66
|
-
* Return the ObjectID id as a 24 byte hex string representation
|
|
67
|
-
*
|
|
68
|
-
* @return {String} return the 24 byte hex string representation.
|
|
69
|
-
* @api public
|
|
70
|
-
*/
|
|
71
|
-
toHexString: function() {
|
|
72
|
-
if (!this.id || !this.id.length)
|
|
73
|
-
throw new Error(
|
|
74
|
-
"invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is [" + JSON.stringify(this.id) + "]"
|
|
75
|
-
);
|
|
76
|
-
if (this.id.length === 24)
|
|
77
|
-
return this.id;
|
|
78
|
-
if (r(this.id))
|
|
79
|
-
return this.id.toString("hex");
|
|
80
|
-
for (var e = "", _ = 0; _ < this.id.length; _++)
|
|
81
|
-
e += u[this.id.charCodeAt(_)];
|
|
82
|
-
return e;
|
|
83
|
-
},
|
|
84
|
-
/**
|
|
85
|
-
* Compares the equality of this ObjectID with `otherID`.
|
|
86
|
-
*
|
|
87
|
-
* @param {Object} otherId ObjectID instance to compare against.
|
|
88
|
-
* @return {Boolean} the result of comparing two ObjectID's
|
|
89
|
-
* @api public
|
|
90
|
-
*/
|
|
91
|
-
equals: function(e) {
|
|
92
|
-
return e instanceof n ? this.toString() === e.toString() : typeof e == "string" && n.isValid(e) && e.length === 12 && r(this.id) ? e === this.id.toString("binary") : typeof e == "string" && n.isValid(e) && e.length === 24 ? e.toLowerCase() === this.toHexString() : typeof e == "string" && n.isValid(e) && e.length === 12 ? e === this.id : e != null && (e instanceof n || e.toHexString) ? e.toHexString() === this.toHexString() : !1;
|
|
93
|
-
},
|
|
94
|
-
/**
|
|
95
|
-
* Returns the generation date (accurate up to the second) that this ID was generated.
|
|
96
|
-
*
|
|
97
|
-
* @return {Date} the generation date
|
|
98
|
-
* @api public
|
|
99
|
-
*/
|
|
100
|
-
getTimestamp: function() {
|
|
101
|
-
var e = /* @__PURE__ */ new Date(), _;
|
|
102
|
-
return r(this.id) ? _ = this.id[3] | this.id[2] << 8 | this.id[1] << 16 | this.id[0] << 24 : _ = this.id.charCodeAt(3) | this.id.charCodeAt(2) << 8 | this.id.charCodeAt(1) << 16 | this.id.charCodeAt(0) << 24, e.setTime(Math.floor(_) * 1e3), e;
|
|
103
|
-
},
|
|
104
|
-
/**
|
|
105
|
-
* Generate a 12 byte id buffer used in ObjectID's
|
|
106
|
-
*
|
|
107
|
-
* @method
|
|
108
|
-
* @param {number} [time] optional parameter allowing to pass in a second based timestamp.
|
|
109
|
-
* @return {string} return the 12 byte id buffer string.
|
|
110
|
-
*/
|
|
111
|
-
generate: function(e) {
|
|
112
|
-
typeof e != "number" && (e = ~~(Date.now() / 1e3)), e = parseInt(e, 10) % 4294967295;
|
|
113
|
-
var _ = E();
|
|
114
|
-
return String.fromCharCode(
|
|
115
|
-
e >> 24 & 255,
|
|
116
|
-
e >> 16 & 255,
|
|
117
|
-
e >> 8 & 255,
|
|
118
|
-
e & 255,
|
|
119
|
-
i >> 16 & 255,
|
|
120
|
-
i >> 8 & 255,
|
|
121
|
-
i & 255,
|
|
122
|
-
c >> 8 & 255,
|
|
123
|
-
c & 255,
|
|
124
|
-
_ >> 16 & 255,
|
|
125
|
-
_ >> 8 & 255,
|
|
126
|
-
_ & 255
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
function E() {
|
|
131
|
-
return a = (a + 1) % 16777215;
|
|
132
|
-
}
|
|
133
|
-
function f(e, _) {
|
|
134
|
-
return _ = _.toString(16), _.length === e ? _ : "00000000".substring(_.length, e) + _;
|
|
135
|
-
}
|
|
136
|
-
var h = Symbol && Symbol.for && Symbol.for("nodejs.util.inspect.custom") || "inspect";
|
|
137
|
-
n.prototype[h] = function() {
|
|
138
|
-
return "ObjectID(" + this + ")";
|
|
139
|
-
};
|
|
140
|
-
n.prototype.toJSON = n.prototype.toHexString;
|
|
141
|
-
n.prototype.toString = n.prototype.toHexString;
|
|
142
|
-
const T = /* @__PURE__ */ l(g);
|
|
143
|
-
export {
|
|
144
|
-
T as O
|
|
145
|
-
};
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { defineComponent as V, computed as f, ref as x, onMounted as P, watch as E, resolveComponent as I, openBlock as w, createElementBlock as k, createVNode as d, unref as r, createElementVNode as s, createCommentVNode as B, toDisplayString as b } from "vue";
|
|
2
|
-
import { _ as D } from "./FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js";
|
|
3
|
-
import { l as R } from "./lodash-88xjswCi.js";
|
|
4
|
-
const $ = { class: "" }, A = {
|
|
5
|
-
key: 0,
|
|
6
|
-
class: "w-full flex flex-col gap-16 items-center py-16"
|
|
7
|
-
}, L = {
|
|
8
|
-
key: 1,
|
|
9
|
-
class: "basis-72 bg-white flex items-center justify-between px-24 pt-6 border-t border-fm-color-border"
|
|
10
|
-
}, M = { class: "flex gap-24 items-center justify-between xs:hidden xs:invisible" }, T = { class: "flex gap-8 items-center" }, j = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, O = { class: "flex gap-8 items-center" }, U = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary xs:mr-auto" }, W = { class: "flex gap-8" }, J = /* @__PURE__ */ V({
|
|
11
|
-
__name: "BaseTable",
|
|
12
|
-
props: {
|
|
13
|
-
rowData: {},
|
|
14
|
-
columnDefs: {},
|
|
15
|
-
loading: { type: Boolean, default: !1 },
|
|
16
|
-
rowCount: { default: 0 },
|
|
17
|
-
shrinkAt: { type: [Number, Boolean], default: !1 },
|
|
18
|
-
pageCount: {},
|
|
19
|
-
pageIndex: {},
|
|
20
|
-
hideFooter: { type: Boolean, default: !1 },
|
|
21
|
-
pageSize: {},
|
|
22
|
-
pageSizeOptions: { default: () => [
|
|
23
|
-
{ label: "10", value: 10 },
|
|
24
|
-
{ label: "20", value: 20 },
|
|
25
|
-
{ label: "50", value: 50 }
|
|
26
|
-
] }
|
|
27
|
-
},
|
|
28
|
-
emits: ["sortChange", "rowClick", "pageChange"],
|
|
29
|
-
setup(a, { emit: v }) {
|
|
30
|
-
const e = a, t = v, g = f(() => e.pageIndex + 1), u = f(() => e.pageIndex * e.pageSize), p = f(
|
|
31
|
-
() => Math.min(u.value + e.pageSize, e.rowCount || 0)
|
|
32
|
-
), h = f(() => e.pageIndex > 0), C = f(() => e.pageIndex < e.pageCount - 1), o = (i) => {
|
|
33
|
-
t("sortChange", i);
|
|
34
|
-
}, l = (i) => {
|
|
35
|
-
t("rowClick", i);
|
|
36
|
-
}, m = (i) => {
|
|
37
|
-
t("pageChange", { pageIndex: i, pageSize: e.pageSize });
|
|
38
|
-
}, F = (i) => {
|
|
39
|
-
t("pageChange", { pageIndex: 0, pageSize: i });
|
|
40
|
-
}, S = x(!1);
|
|
41
|
-
return P(() => {
|
|
42
|
-
E(
|
|
43
|
-
() => e.loading,
|
|
44
|
-
(i, n) => {
|
|
45
|
-
n === !0 && i === !1 && (S.value = !0);
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
}), (i, n) => {
|
|
49
|
-
const N = I("FmTable"), y = I("FmButton");
|
|
50
|
-
return w(), k("div", $, [
|
|
51
|
-
d(N, {
|
|
52
|
-
loading: a.loading,
|
|
53
|
-
"row-data": a.rowData,
|
|
54
|
-
"row-count": a.rowCount,
|
|
55
|
-
"column-defs": a.columnDefs,
|
|
56
|
-
"shrink-at": a.shrinkAt,
|
|
57
|
-
"page-count": a.pageCount,
|
|
58
|
-
"page-size": a.pageSize,
|
|
59
|
-
"fetch-fn": void 0,
|
|
60
|
-
"hide-footer": "",
|
|
61
|
-
onSortChange: o,
|
|
62
|
-
onRowClick: l
|
|
63
|
-
}, null, 8, ["loading", "row-data", "row-count", "column-defs", "shrink-at", "page-count", "page-size"]),
|
|
64
|
-
a.rowData.length == 0 && a.loading == !1 && r(S) ? (w(), k("div", A, [...n[5] || (n[5] = [
|
|
65
|
-
s("div", { class: "fm-typo-en-body-lg-600" }, "No data found", -1),
|
|
66
|
-
s("div", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, " No data to show at the current moment. ", -1)
|
|
67
|
-
])])) : B("", !0),
|
|
68
|
-
a.hideFooter ? B("", !0) : (w(), k("div", L, [
|
|
69
|
-
s("div", M, [
|
|
70
|
-
s("div", T, [
|
|
71
|
-
n[6] || (n[6] = s("span", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, " Items per page: ", -1)),
|
|
72
|
-
d(D, {
|
|
73
|
-
items: a.pageSizeOptions,
|
|
74
|
-
value: a.pageSize,
|
|
75
|
-
"onUpdate:modelValue": F
|
|
76
|
-
}, null, 8, ["items", "value"])
|
|
77
|
-
]),
|
|
78
|
-
s("span", j, b(r(u) + 1) + " - " + b(r(p)) + " of " + b(a.rowCount) + " items ", 1)
|
|
79
|
-
]),
|
|
80
|
-
s("div", O, [
|
|
81
|
-
d(D, {
|
|
82
|
-
items: Array.from(Array(a.pageCount), (c, z) => ({
|
|
83
|
-
label: (z + 1).toString(),
|
|
84
|
-
value: z + 1
|
|
85
|
-
})),
|
|
86
|
-
value: r(g),
|
|
87
|
-
"onUpdate:modelValue": n[0] || (n[0] = (c) => m(c - 1))
|
|
88
|
-
}, null, 8, ["items", "value"]),
|
|
89
|
-
s("span", U, " of " + b(a.pageCount) + " pages ", 1),
|
|
90
|
-
s("div", W, [
|
|
91
|
-
d(y, {
|
|
92
|
-
disabled: !r(h),
|
|
93
|
-
icon: "first_page",
|
|
94
|
-
"icon-color": "neutral-black",
|
|
95
|
-
variant: "tertiary",
|
|
96
|
-
onClick: n[1] || (n[1] = (c) => m(0))
|
|
97
|
-
}, null, 8, ["disabled"]),
|
|
98
|
-
d(y, {
|
|
99
|
-
disabled: !r(h),
|
|
100
|
-
icon: "chevron_left",
|
|
101
|
-
"icon-color": "neutral-black",
|
|
102
|
-
variant: "tertiary",
|
|
103
|
-
onClick: n[2] || (n[2] = (c) => m(a.pageIndex - 1))
|
|
104
|
-
}, null, 8, ["disabled"]),
|
|
105
|
-
d(y, {
|
|
106
|
-
disabled: !r(C),
|
|
107
|
-
icon: "chevron_right",
|
|
108
|
-
"icon-color": "neutral-black",
|
|
109
|
-
variant: "tertiary",
|
|
110
|
-
onClick: n[3] || (n[3] = (c) => m(a.pageIndex + 1))
|
|
111
|
-
}, null, 8, ["disabled"]),
|
|
112
|
-
d(y, {
|
|
113
|
-
disabled: !r(C),
|
|
114
|
-
icon: "last_page",
|
|
115
|
-
"icon-color": "neutral-black",
|
|
116
|
-
variant: "tertiary",
|
|
117
|
-
onClick: n[4] || (n[4] = (c) => m(a.pageCount - 1))
|
|
118
|
-
}, null, 8, ["disabled"])
|
|
119
|
-
])
|
|
120
|
-
])
|
|
121
|
-
]))
|
|
122
|
-
]);
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
function K(a, v = { key: "_id", descending: !0 }) {
|
|
127
|
-
const e = x({
|
|
128
|
-
pageCount: 0,
|
|
129
|
-
searchValue: "",
|
|
130
|
-
pageIndex: 0,
|
|
131
|
-
totalRows: 0,
|
|
132
|
-
isLoading: !1,
|
|
133
|
-
pageSize: 10
|
|
134
|
-
}), t = x(v), g = x([]), u = async (o) => {
|
|
135
|
-
e.value.isLoading = !0, g.value = [];
|
|
136
|
-
try {
|
|
137
|
-
const l = await a({
|
|
138
|
-
limit: o.pageSize || e.value.pageSize,
|
|
139
|
-
skip: o.pageIndex ?? 0,
|
|
140
|
-
sortBy: t.value.key,
|
|
141
|
-
descending: t.value.descending,
|
|
142
|
-
search: e.value.searchValue
|
|
143
|
-
});
|
|
144
|
-
g.value = l.resources, e.value.totalRows = l.meta.totalResources ?? 0, e.value.pageCount = l.meta.totalPages ?? 0, e.value.pageIndex = l.meta.skip ?? 0;
|
|
145
|
-
} catch (l) {
|
|
146
|
-
console.error("Error fetching data:", l);
|
|
147
|
-
} finally {
|
|
148
|
-
e.value.isLoading = !1;
|
|
149
|
-
}
|
|
150
|
-
}, p = R.debounce(async (o) => {
|
|
151
|
-
e.value.pageSize = (o == null ? void 0 : o.pageSize) || e.value.pageSize, await u({
|
|
152
|
-
pageSize: e.value.pageSize,
|
|
153
|
-
pageIndex: (o == null ? void 0 : o.pageIndex) || 0
|
|
154
|
-
});
|
|
155
|
-
}, 200);
|
|
156
|
-
return {
|
|
157
|
-
tableMeta: e,
|
|
158
|
-
rowData: g,
|
|
159
|
-
sortBy: t,
|
|
160
|
-
fetchData: u,
|
|
161
|
-
debouncedFetchData: p,
|
|
162
|
-
onSort: async (o) => {
|
|
163
|
-
var l;
|
|
164
|
-
console.log("sortState", (l = o[0]) == null ? void 0 : l.id), o.length ? (t.value = {
|
|
165
|
-
key: o[0].id.startsWith("_") ? o[0].id : o[0].id.replace(new RegExp("_", "g"), "."),
|
|
166
|
-
descending: o[0].desc
|
|
167
|
-
}, console.log("sortBy", t.value)) : t.value = v, await p();
|
|
168
|
-
},
|
|
169
|
-
onSearch: () => {
|
|
170
|
-
p({ pageIndex: 0, pageSize: e.value.pageSize });
|
|
171
|
-
}
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
export {
|
|
175
|
-
J as _,
|
|
176
|
-
K as u
|
|
177
|
-
};
|