@amirjalili1374/ui-kit 1.4.12 → 1.4.14
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/components/shared/CustomDataTable.vue.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/componentTypes/DataTableTypes.d.ts +21 -4
- package/dist/types/componentTypes/DataTableTypes.d.ts.map +1 -1
- package/dist/ui-kit.cjs.js +1 -1
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.es.js +452 -189
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +6 -2
package/dist/ui-kit.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var __defProp2 = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp2 = (obj, key2, value2) => key2 in obj ? __defProp2(obj, key2, { enumerable: true, configurable: true, writable: true, value: value2 }) : obj[key2] = value2;
|
|
3
3
|
var __publicField = (obj, key2, value2) => __defNormalProp2(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value2);
|
|
4
4
|
import { capitalize, reactive, watchEffect, toRef, shallowRef, Fragment, camelize, isVNode, Comment, unref, warn, getCurrentInstance as getCurrentInstance$1, ref, computed, provide, inject, defineComponent as defineComponent$1, h, createElementVNode, normalizeStyle, normalizeClass, toValue, resolveDynamicComponent, nextTick, onScopeDispose, createVNode, mergeProps, toRefs, Text, isRef, TransitionGroup, Transition, watch, onBeforeMount, onBeforeUnmount, withDirectives, vShow, toDisplayString, effectScope, toRaw, readonly, createBlock, openBlock, withCtx, createCommentVNode, useId, onMounted, onUpdated, Teleport, createTextVNode, createElementBlock, renderSlot, onDeactivated, cloneVNode, renderList, createSlots, normalizeProps, guardReactiveProps, resolveComponent, onActivated, onBeforeUpdate, withModifiers, vModelText, withKeys, onUnmounted } from "vue";
|
|
5
|
-
import { IconHome, IconArrowBadgeLeft, IconChevronDown, IconChevronRight, IconMinus, IconPlus, IconRefresh, IconChevronLeft, IconDownload, IconPrinter, IconMaximize, IconMinimize, IconX, IconFileText,
|
|
5
|
+
import { IconHome, IconArrowBadgeLeft, IconChevronDown, IconChevronRight, IconCheck, IconSquareX, IconMinus, IconPlus, IconRefresh, IconChevronLeft, IconDownload, IconPrinter, IconMaximize, IconMinimize, IconX, IconFileText, IconPencil, IconClock, IconMenu2, IconPalette } from "@tabler/icons-vue";
|
|
6
6
|
import axios from "axios";
|
|
7
7
|
import { useDebounceFn } from "@vueuse/core";
|
|
8
8
|
import { useRouter as useRouter$1 } from "vue-router";
|
|
@@ -13036,6 +13036,112 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent$1({
|
|
|
13036
13036
|
}
|
|
13037
13037
|
});
|
|
13038
13038
|
const ShamsiDatePicker = /* @__PURE__ */ _export_sfc$1(_sfc_main$h, [["__scopeId", "data-v-d56f50fe"]]);
|
|
13039
|
+
const _hoisted_1$a = { class: "mb-6" };
|
|
13040
|
+
const _hoisted_2$6 = { class: "text-subtitle-1 font-weight-medium mb-3" };
|
|
13041
|
+
const _hoisted_3$4 = { class: "theme-toggle-container" };
|
|
13042
|
+
const _hoisted_4$2 = { class: "toggle-slider" };
|
|
13043
|
+
const _hoisted_5$2 = { class: "toggle-icon" };
|
|
13044
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
13045
|
+
__name: "ToggleSwitch",
|
|
13046
|
+
props: {
|
|
13047
|
+
modelValue: { type: [String, Boolean] },
|
|
13048
|
+
label: {},
|
|
13049
|
+
type: { default: "boolean" },
|
|
13050
|
+
options: { default: () => [] },
|
|
13051
|
+
trueLabel: {},
|
|
13052
|
+
falseLabel: {},
|
|
13053
|
+
trueIcon: {},
|
|
13054
|
+
falseIcon: {},
|
|
13055
|
+
activeColor: { default: "rgb(var(--v-theme-primary))" },
|
|
13056
|
+
inactiveColor: { default: "#e0e0e0" }
|
|
13057
|
+
},
|
|
13058
|
+
emits: ["update:modelValue"],
|
|
13059
|
+
setup(__props, { emit: __emit }) {
|
|
13060
|
+
const props = __props;
|
|
13061
|
+
const emit = __emit;
|
|
13062
|
+
const isBooleanMode = computed(() => props.type === "boolean");
|
|
13063
|
+
const isStringMode = computed(() => props.type === "string");
|
|
13064
|
+
const isActive = computed(() => {
|
|
13065
|
+
if (isBooleanMode.value) {
|
|
13066
|
+
return props.modelValue === true;
|
|
13067
|
+
}
|
|
13068
|
+
return false;
|
|
13069
|
+
});
|
|
13070
|
+
const currentIndex = computed(() => {
|
|
13071
|
+
if (isStringMode.value && props.options.length > 0) {
|
|
13072
|
+
return props.options.findIndex((opt) => opt.value === props.modelValue);
|
|
13073
|
+
}
|
|
13074
|
+
return 0;
|
|
13075
|
+
});
|
|
13076
|
+
const handleToggle = () => {
|
|
13077
|
+
if (isBooleanMode.value) {
|
|
13078
|
+
emit("update:modelValue", !props.modelValue);
|
|
13079
|
+
} else if (isStringMode.value && props.options.length > 0) {
|
|
13080
|
+
const nextIndex = (currentIndex.value + 1) % props.options.length;
|
|
13081
|
+
emit("update:modelValue", props.options[nextIndex].value);
|
|
13082
|
+
}
|
|
13083
|
+
};
|
|
13084
|
+
const isToggleActive = computed(() => {
|
|
13085
|
+
if (isBooleanMode.value) {
|
|
13086
|
+
return isActive.value;
|
|
13087
|
+
} else {
|
|
13088
|
+
if (props.options.length >= 2) {
|
|
13089
|
+
return currentIndex.value >= 1;
|
|
13090
|
+
} else if (props.options.length === 1) {
|
|
13091
|
+
return true;
|
|
13092
|
+
}
|
|
13093
|
+
return false;
|
|
13094
|
+
}
|
|
13095
|
+
});
|
|
13096
|
+
const currentOption = computed(() => {
|
|
13097
|
+
if (isStringMode.value && props.options.length > 0) {
|
|
13098
|
+
return props.options[currentIndex.value] || props.options[0];
|
|
13099
|
+
}
|
|
13100
|
+
return null;
|
|
13101
|
+
});
|
|
13102
|
+
const displayIcon = computed(() => {
|
|
13103
|
+
var _a;
|
|
13104
|
+
if (isBooleanMode.value) {
|
|
13105
|
+
return isActive.value ? props.trueIcon : props.falseIcon;
|
|
13106
|
+
} else {
|
|
13107
|
+
return (_a = currentOption.value) == null ? void 0 : _a.icon;
|
|
13108
|
+
}
|
|
13109
|
+
});
|
|
13110
|
+
return (_ctx, _cache) => {
|
|
13111
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
13112
|
+
createElementVNode("h6", _hoisted_2$6, toDisplayString(__props.label), 1),
|
|
13113
|
+
createElementVNode("div", _hoisted_3$4, [
|
|
13114
|
+
createElementVNode("div", {
|
|
13115
|
+
class: normalizeClass(["theme-toggle", {
|
|
13116
|
+
"active": isToggleActive.value,
|
|
13117
|
+
"string-mode": isStringMode.value
|
|
13118
|
+
}]),
|
|
13119
|
+
style: normalizeStyle({
|
|
13120
|
+
background: isToggleActive.value ? props.activeColor : props.inactiveColor
|
|
13121
|
+
}),
|
|
13122
|
+
onClick: handleToggle
|
|
13123
|
+
}, [
|
|
13124
|
+
createElementVNode("div", _hoisted_4$2, [
|
|
13125
|
+
createElementVNode("div", _hoisted_5$2, [
|
|
13126
|
+
renderSlot(_ctx.$slots, "icon", {
|
|
13127
|
+
value: __props.modelValue,
|
|
13128
|
+
option: currentOption.value
|
|
13129
|
+
}, () => [
|
|
13130
|
+
displayIcon.value ? (openBlock(), createBlock(resolveDynamicComponent(displayIcon.value), {
|
|
13131
|
+
key: 0,
|
|
13132
|
+
size: "24",
|
|
13133
|
+
"stroke-width": "2"
|
|
13134
|
+
})) : createCommentVNode("", true)
|
|
13135
|
+
], true)
|
|
13136
|
+
])
|
|
13137
|
+
])
|
|
13138
|
+
], 6)
|
|
13139
|
+
])
|
|
13140
|
+
]);
|
|
13141
|
+
};
|
|
13142
|
+
}
|
|
13143
|
+
});
|
|
13144
|
+
const ToggleSwitch = /* @__PURE__ */ _export_sfc$1(_sfc_main$g, [["__scopeId", "data-v-536e1a17"]]);
|
|
13039
13145
|
function useTableSelection(items, options = {}) {
|
|
13040
13146
|
const selectedItems = ref([]);
|
|
13041
13147
|
const expandedGroups = ref(/* @__PURE__ */ new Set());
|
|
@@ -16918,17 +17024,17 @@ const VTextarea = genericComponent()({
|
|
|
16918
17024
|
return forwardRefs({}, vInputRef, vFieldRef, textareaRef);
|
|
16919
17025
|
}
|
|
16920
17026
|
});
|
|
16921
|
-
const _hoisted_1$
|
|
17027
|
+
const _hoisted_1$9 = {
|
|
16922
17028
|
key: 0,
|
|
16923
17029
|
class: "page-title"
|
|
16924
17030
|
};
|
|
16925
|
-
const _hoisted_2$
|
|
16926
|
-
const _hoisted_3$
|
|
16927
|
-
const _hoisted_4$
|
|
17031
|
+
const _hoisted_2$5 = { class: "title-text" };
|
|
17032
|
+
const _hoisted_3$3 = { class: "action-buttons" };
|
|
17033
|
+
const _hoisted_4$1 = {
|
|
16928
17034
|
key: 3,
|
|
16929
17035
|
class: "selection-actions"
|
|
16930
17036
|
};
|
|
16931
|
-
const _hoisted_5$
|
|
17037
|
+
const _hoisted_5$1 = {
|
|
16932
17038
|
key: 0,
|
|
16933
17039
|
class: "selected-actions"
|
|
16934
17040
|
};
|
|
@@ -16976,7 +17082,7 @@ const _hoisted_24 = {
|
|
|
16976
17082
|
};
|
|
16977
17083
|
const _hoisted_25 = { class: "d-flex justify-space-between align-center pa-4" };
|
|
16978
17084
|
const _hoisted_26 = { class: "text-subtitle-2" };
|
|
16979
|
-
const _sfc_main$
|
|
17085
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent$1({
|
|
16980
17086
|
...{ inheritAttrs: false },
|
|
16981
17087
|
__name: "CustomDataTable",
|
|
16982
17088
|
props: {
|
|
@@ -17037,6 +17143,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17037
17143
|
ref(null);
|
|
17038
17144
|
const filterDialog = ref(false);
|
|
17039
17145
|
const filterModel = ref({});
|
|
17146
|
+
const filterOperatorModel = ref({});
|
|
17040
17147
|
ref(null);
|
|
17041
17148
|
const isLoadingMore = ref(false);
|
|
17042
17149
|
const hasMore = ref(true);
|
|
@@ -17268,19 +17375,41 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17268
17375
|
const formHeaders = computed(() => {
|
|
17269
17376
|
return props.headers.filter((header) => !header.excludeFromForm);
|
|
17270
17377
|
});
|
|
17271
|
-
const
|
|
17272
|
-
if (
|
|
17273
|
-
return
|
|
17378
|
+
const getHeaderType = (header) => {
|
|
17379
|
+
if (header.type) {
|
|
17380
|
+
return header.type.toLowerCase();
|
|
17274
17381
|
}
|
|
17275
|
-
|
|
17382
|
+
if (header.isDate) return "date";
|
|
17383
|
+
if (header.textarea) return "textarea";
|
|
17384
|
+
if (header.toggleSwitch) return "toggle";
|
|
17385
|
+
return void 0;
|
|
17386
|
+
};
|
|
17387
|
+
const isDateHeader = (header) => {
|
|
17388
|
+
const type = getHeaderType(header);
|
|
17389
|
+
return type === "date";
|
|
17390
|
+
};
|
|
17391
|
+
const isMoneyHeader = (header) => {
|
|
17392
|
+
const type = getHeaderType(header);
|
|
17393
|
+
return type === "money";
|
|
17394
|
+
};
|
|
17395
|
+
const isTextareaHeader = (header) => {
|
|
17396
|
+
const type = getHeaderType(header);
|
|
17397
|
+
return type === "textarea";
|
|
17398
|
+
};
|
|
17399
|
+
const isToggleHeader = (header) => {
|
|
17400
|
+
const type = getHeaderType(header);
|
|
17401
|
+
return type === "toggle" || type === "toggleswitch";
|
|
17276
17402
|
};
|
|
17277
17403
|
const getFieldInputType = (header) => {
|
|
17278
|
-
|
|
17404
|
+
const type = getHeaderType(header);
|
|
17405
|
+
if (type && !["date", "textarea", "money", "toggle", "toggleswitch", "autocomplete"].includes(type)) {
|
|
17406
|
+
return type;
|
|
17407
|
+
}
|
|
17408
|
+
return void 0;
|
|
17279
17409
|
};
|
|
17280
17410
|
const resolveHeaderKey = (header) => header.key;
|
|
17281
17411
|
const resolveHeaderTitle = (header) => header.title;
|
|
17282
17412
|
const isHeaderDisabled = (header) => header.editable === false;
|
|
17283
|
-
const isTextareaHeader = (header) => header.textarea === true;
|
|
17284
17413
|
const getUniqueValue = (item) => {
|
|
17285
17414
|
if (typeof props.uniqueKey === "function") {
|
|
17286
17415
|
return props.uniqueKey(item);
|
|
@@ -17346,7 +17475,58 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17346
17475
|
});
|
|
17347
17476
|
return model;
|
|
17348
17477
|
});
|
|
17349
|
-
const
|
|
17478
|
+
const FILTER_OPERATOR_LABELS = {
|
|
17479
|
+
equals: "برابر با",
|
|
17480
|
+
notEquals: "مخالف با",
|
|
17481
|
+
contains: "شامل",
|
|
17482
|
+
doesNotContain: "شامل نباشد",
|
|
17483
|
+
in: "یکی از",
|
|
17484
|
+
specified: "خالی / غیر خالی",
|
|
17485
|
+
greaterThan: "بزرگتر از",
|
|
17486
|
+
lessThan: "کوچکتر از",
|
|
17487
|
+
greaterThanOrEqual: "بزرگتر یا مساوی",
|
|
17488
|
+
lessThanOrEqual: "کوچکتر یا مساوی"
|
|
17489
|
+
};
|
|
17490
|
+
const getHeaderFilterOperators = (header) => {
|
|
17491
|
+
const configured = header.filterOperators;
|
|
17492
|
+
const effective = configured && configured.length > 0 ? configured : ["equals", "contains", "in"];
|
|
17493
|
+
return effective.map((op) => ({
|
|
17494
|
+
value: op,
|
|
17495
|
+
label: FILTER_OPERATOR_LABELS[op] || op
|
|
17496
|
+
}));
|
|
17497
|
+
};
|
|
17498
|
+
const getDefaultFilterOperator = (header) => {
|
|
17499
|
+
const configured = header.defaultFilterOperator;
|
|
17500
|
+
return configured || "equals";
|
|
17501
|
+
};
|
|
17502
|
+
const hasFilterOperators = (header) => {
|
|
17503
|
+
const operators = header.filterOperators;
|
|
17504
|
+
return Array.isArray(operators) && operators.length > 0;
|
|
17505
|
+
};
|
|
17506
|
+
const buildFilterParams = () => {
|
|
17507
|
+
if (props.filterComponent) {
|
|
17508
|
+
return cleanFilterModel.value;
|
|
17509
|
+
}
|
|
17510
|
+
const base = {};
|
|
17511
|
+
Object.entries(cleanFilterModel.value).forEach(([key2, value2]) => {
|
|
17512
|
+
const header = props.headers.find((h2) => h2.key === key2);
|
|
17513
|
+
if (header && hasFilterOperators(header)) {
|
|
17514
|
+
const op = filterOperatorModel.value[key2] || getDefaultFilterOperator(header);
|
|
17515
|
+
const paramKey = `${key2}.${op}`;
|
|
17516
|
+
if (op === "in" && Array.isArray(value2)) {
|
|
17517
|
+
base[paramKey] = value2.join(",");
|
|
17518
|
+
} else if (op === "specified") {
|
|
17519
|
+
base[paramKey] = Boolean(value2);
|
|
17520
|
+
} else {
|
|
17521
|
+
base[paramKey] = value2;
|
|
17522
|
+
}
|
|
17523
|
+
} else {
|
|
17524
|
+
base[key2] = value2;
|
|
17525
|
+
}
|
|
17526
|
+
});
|
|
17527
|
+
return base;
|
|
17528
|
+
};
|
|
17529
|
+
computed(() => {
|
|
17350
17530
|
return !!props.filterComponent;
|
|
17351
17531
|
});
|
|
17352
17532
|
const fetchData = async (queryParams) => {
|
|
@@ -17354,7 +17534,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17354
17534
|
loading.value = true;
|
|
17355
17535
|
error.value = null;
|
|
17356
17536
|
let params = {
|
|
17357
|
-
...
|
|
17537
|
+
...buildFilterParams(),
|
|
17358
17538
|
...props.queryParams
|
|
17359
17539
|
};
|
|
17360
17540
|
if (queryParams) {
|
|
@@ -17374,7 +17554,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17374
17554
|
items.value = serverData.map((item) => {
|
|
17375
17555
|
const newItem = { ...item };
|
|
17376
17556
|
props.headers.forEach((header) => {
|
|
17377
|
-
if (header
|
|
17557
|
+
if (isDateHeader(header) && newItem[header.key]) {
|
|
17378
17558
|
try {
|
|
17379
17559
|
newItem[header.key] = DateConverter.toShamsi(newItem[header.key]);
|
|
17380
17560
|
} catch (error2) {
|
|
@@ -17483,6 +17663,11 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17483
17663
|
if (!isEditing.value) {
|
|
17484
17664
|
const defaultContext = { ...editedItem.value };
|
|
17485
17665
|
for (const header of props.headers) {
|
|
17666
|
+
if (isToggleHeader(header) && editedItem.value[header.key] === void 0) {
|
|
17667
|
+
editedItem.value[header.key] = false;
|
|
17668
|
+
defaultContext[header.key] = false;
|
|
17669
|
+
continue;
|
|
17670
|
+
}
|
|
17486
17671
|
if (header.defaultValue === void 0) {
|
|
17487
17672
|
continue;
|
|
17488
17673
|
}
|
|
@@ -17501,9 +17686,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17501
17686
|
const valueKey = resolveAutocompleteItemValue(header);
|
|
17502
17687
|
if (enhancedHeader.autocompleteReturnObject === false) {
|
|
17503
17688
|
if (Array.isArray(currentValue)) {
|
|
17504
|
-
formModel.value[header.key] = currentValue.map(
|
|
17505
|
-
(item2) => item2 && typeof item2 === "object" ? item2[valueKey] ?? null : item2
|
|
17506
|
-
);
|
|
17689
|
+
formModel.value[header.key] = currentValue.map((item2) => item2 && typeof item2 === "object" ? item2[valueKey] ?? null : item2);
|
|
17507
17690
|
} else if (currentValue && typeof currentValue === "object") {
|
|
17508
17691
|
formModel.value[header.key] = currentValue[valueKey] ?? null;
|
|
17509
17692
|
}
|
|
@@ -17512,7 +17695,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17512
17695
|
if (isEditing.value) {
|
|
17513
17696
|
try {
|
|
17514
17697
|
props.headers.forEach((header) => {
|
|
17515
|
-
if (header
|
|
17698
|
+
if (isDateHeader(header)) {
|
|
17516
17699
|
const v = formModel.value[header.key];
|
|
17517
17700
|
if (typeof v === "string" && v.includes("/")) {
|
|
17518
17701
|
formModel.value[header.key] = DateConverter.toGregorian(v);
|
|
@@ -17560,7 +17743,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17560
17743
|
}
|
|
17561
17744
|
});
|
|
17562
17745
|
props.headers.forEach((header) => {
|
|
17563
|
-
if (header
|
|
17746
|
+
if (isDateHeader(header) && dataToSave[header.key]) {
|
|
17564
17747
|
try {
|
|
17565
17748
|
const raw = dataToSave[header.key];
|
|
17566
17749
|
if (typeof raw === "string") {
|
|
@@ -17885,19 +18068,45 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17885
18068
|
snackbar.value = true;
|
|
17886
18069
|
}
|
|
17887
18070
|
};
|
|
18071
|
+
const applyFilter = () => {
|
|
18072
|
+
currentPage.value = 1;
|
|
18073
|
+
debouncedFetchData();
|
|
18074
|
+
filterDialog.value = false;
|
|
18075
|
+
};
|
|
18076
|
+
const resetFilter = () => {
|
|
18077
|
+
filterModel.value = {};
|
|
18078
|
+
filterOperatorModel.value = {};
|
|
18079
|
+
currentPage.value = 1;
|
|
18080
|
+
debouncedFetchData();
|
|
18081
|
+
filterDialog.value = false;
|
|
18082
|
+
};
|
|
17888
18083
|
const handleFilterApply = (filterData) => {
|
|
17889
18084
|
filterModel.value = filterData;
|
|
17890
18085
|
currentPage.value = 1;
|
|
17891
18086
|
debouncedFetchData();
|
|
17892
18087
|
filterDialog.value = false;
|
|
17893
18088
|
};
|
|
18089
|
+
watch(
|
|
18090
|
+
() => filterDialog.value,
|
|
18091
|
+
(isOpen) => {
|
|
18092
|
+
if (!isOpen) return;
|
|
18093
|
+
formHeaders.value.forEach((header) => {
|
|
18094
|
+
if (hasFilterOperators(header)) {
|
|
18095
|
+
const key2 = resolveHeaderKey(header);
|
|
18096
|
+
if (!filterOperatorModel.value[key2]) {
|
|
18097
|
+
filterOperatorModel.value[key2] = getDefaultFilterOperator(header);
|
|
18098
|
+
}
|
|
18099
|
+
}
|
|
18100
|
+
});
|
|
18101
|
+
}
|
|
18102
|
+
);
|
|
17894
18103
|
return (_ctx, _cache) => {
|
|
17895
|
-
var _a;
|
|
18104
|
+
var _a, _b;
|
|
17896
18105
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
17897
|
-
props.title ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
17898
|
-
createElementVNode("h3", _hoisted_2$
|
|
18106
|
+
props.title ? (openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
18107
|
+
createElementVNode("h3", _hoisted_2$5, toDisplayString(props.title), 1)
|
|
17899
18108
|
])) : createCommentVNode("", true),
|
|
17900
|
-
createElementVNode("div", _hoisted_3$
|
|
18109
|
+
createElementVNode("div", _hoisted_3$3, [
|
|
17901
18110
|
((_a = props.actions) == null ? void 0 : _a.includes("create")) ? (openBlock(), createBlock(VBtn, {
|
|
17902
18111
|
key: 0,
|
|
17903
18112
|
color: "green",
|
|
@@ -17909,7 +18118,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17909
18118
|
])]),
|
|
17910
18119
|
_: 1
|
|
17911
18120
|
})) : createCommentVNode("", true),
|
|
17912
|
-
|
|
18121
|
+
((_b = props.actions) == null ? void 0 : _b.includes("filter")) ? (openBlock(), createBlock(VBtn, {
|
|
17913
18122
|
key: 1,
|
|
17914
18123
|
class: "me-2",
|
|
17915
18124
|
onClick: _cache[1] || (_cache[1] = ($event) => filterDialog.value = true)
|
|
@@ -17930,7 +18139,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17930
18139
|
])]),
|
|
17931
18140
|
_: 1
|
|
17932
18141
|
}, 8, ["onClick", "loading"])) : createCommentVNode("", true),
|
|
17933
|
-
props.selectable && hasSelection.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
18142
|
+
props.selectable && hasSelection.value ? (openBlock(), createElementBlock("div", _hoisted_4$1, [
|
|
17934
18143
|
createVNode(VChip, {
|
|
17935
18144
|
color: "primary",
|
|
17936
18145
|
class: "me-2"
|
|
@@ -17957,7 +18166,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17957
18166
|
appear: ""
|
|
17958
18167
|
}, {
|
|
17959
18168
|
default: withCtx(() => [
|
|
17960
|
-
props.bulkMode && hasValidSelection.value || props.enableGroupDelete && hasSelection.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
18169
|
+
props.bulkMode && hasValidSelection.value || props.enableGroupDelete && hasSelection.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
17961
18170
|
props.enableGroupDelete ? (openBlock(), createBlock(VBtn, {
|
|
17962
18171
|
key: 0,
|
|
17963
18172
|
color: "red",
|
|
@@ -17972,7 +18181,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17972
18181
|
_: 1
|
|
17973
18182
|
})) : createCommentVNode("", true),
|
|
17974
18183
|
props.bulkMode ? (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(validSelectedItems.value, (item) => {
|
|
17975
|
-
var _a2,
|
|
18184
|
+
var _a2, _b2, _c;
|
|
17976
18185
|
return openBlock(), createElementBlock(Fragment, {
|
|
17977
18186
|
key: getUniqueValue(item)
|
|
17978
18187
|
}, [
|
|
@@ -17989,7 +18198,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
17989
18198
|
])]),
|
|
17990
18199
|
_: 1
|
|
17991
18200
|
}, 8, ["onClick"])) : createCommentVNode("", true),
|
|
17992
|
-
((
|
|
18201
|
+
((_b2 = props.actions) == null ? void 0 : _b2.includes("delete")) ? (openBlock(), createBlock(VBtn, {
|
|
17993
18202
|
key: 1,
|
|
17994
18203
|
color: "red",
|
|
17995
18204
|
size: "small",
|
|
@@ -18230,7 +18439,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18230
18439
|
onClick: ($event) => props.bulkMode && props.selectable && selectSingleItem(item)
|
|
18231
18440
|
}, [
|
|
18232
18441
|
(openBlock(true), createElementBlock(Fragment, null, renderList(columns, (column) => {
|
|
18233
|
-
var _a2,
|
|
18442
|
+
var _a2, _b2, _c;
|
|
18234
18443
|
return openBlock(), createElementBlock("td", {
|
|
18235
18444
|
key: column.key || "unknown",
|
|
18236
18445
|
style: normalizeStyle({
|
|
@@ -18269,7 +18478,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18269
18478
|
])]),
|
|
18270
18479
|
_: 1
|
|
18271
18480
|
}, 8, ["onClick"])) : createCommentVNode("", true),
|
|
18272
|
-
((
|
|
18481
|
+
((_b2 = props.actions) == null ? void 0 : _b2.includes("delete")) ? (openBlock(), createBlock(VBtn, {
|
|
18273
18482
|
key: 1,
|
|
18274
18483
|
color: "red",
|
|
18275
18484
|
size: "small",
|
|
@@ -18367,14 +18576,25 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18367
18576
|
}, 1032, ["color", "onClick"]);
|
|
18368
18577
|
}), 128))
|
|
18369
18578
|
], 64)) : (openBlock(), createElementBlock("div", _hoisted_16$1, [
|
|
18370
|
-
shouldTruncate(
|
|
18579
|
+
shouldTruncate(
|
|
18580
|
+
getTranslatedValue(getNestedValue2(item, column.key || ""), column, item),
|
|
18581
|
+
getHeaderForColumn(column.key || "")
|
|
18582
|
+
) ? (openBlock(), createElementBlock("span", {
|
|
18371
18583
|
key: 0,
|
|
18372
18584
|
class: "truncated-text",
|
|
18373
18585
|
style: { cursor: "pointer", color: "rgb(var(--v-theme-primary))", textDecoration: "underline" },
|
|
18374
|
-
onClick: withModifiers(($event) => openTextPreview(
|
|
18586
|
+
onClick: withModifiers(($event) => openTextPreview(
|
|
18587
|
+
getTranslatedValue(getNestedValue2(item, column.key || ""), column, item),
|
|
18588
|
+
column.title || column.key || "",
|
|
18589
|
+
item
|
|
18590
|
+
), ["stop"])
|
|
18375
18591
|
}, toDisplayString(truncateText(getTranslatedValue(getNestedValue2(item, column.key || ""), column, item))), 9, _hoisted_17)) : (openBlock(), createElementBlock("span", {
|
|
18376
18592
|
key: 1,
|
|
18377
|
-
onClick: withModifiers(($event) => shouldShowCopyButton(getHeaderForColumn(column.key || "")) && openTextPreview(
|
|
18593
|
+
onClick: withModifiers(($event) => shouldShowCopyButton(getHeaderForColumn(column.key || "")) && openTextPreview(
|
|
18594
|
+
getTranslatedValue(getNestedValue2(item, column.key || ""), column, item),
|
|
18595
|
+
column.title || column.key || "",
|
|
18596
|
+
item
|
|
18597
|
+
), ["stop"]),
|
|
18378
18598
|
style: normalizeStyle({ cursor: shouldShowCopyButton(getHeaderForColumn(column.key || "")) ? "pointer" : "default" })
|
|
18379
18599
|
}, toDisplayString(getTranslatedValue(getNestedValue2(item, column.key || ""), column, item)), 13, _hoisted_18)),
|
|
18380
18600
|
shouldShowCopyButton(getHeaderForColumn(column.key || "")) ? (openBlock(), createBlock(VBtn, {
|
|
@@ -18383,7 +18603,11 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18383
18603
|
size: "x-small",
|
|
18384
18604
|
variant: "text",
|
|
18385
18605
|
color: "primary",
|
|
18386
|
-
onClick: withModifiers(($event) => openTextPreview(
|
|
18606
|
+
onClick: withModifiers(($event) => openTextPreview(
|
|
18607
|
+
getTranslatedValue(getNestedValue2(item, column.key || ""), column, item),
|
|
18608
|
+
column.title || column.key || "",
|
|
18609
|
+
item
|
|
18610
|
+
), ["stop"]),
|
|
18387
18611
|
style: { "min-width": "24px", "width": "24px", "height": "24px" }
|
|
18388
18612
|
}, {
|
|
18389
18613
|
default: withCtx(() => [
|
|
@@ -18445,7 +18669,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18445
18669
|
onClick: ($event) => props.bulkMode && props.selectable && selectSingleItem(item)
|
|
18446
18670
|
}, [
|
|
18447
18671
|
(openBlock(true), createElementBlock(Fragment, null, renderList(columns, (column) => {
|
|
18448
|
-
var _a2,
|
|
18672
|
+
var _a2, _b2, _c;
|
|
18449
18673
|
return openBlock(), createElementBlock("td", {
|
|
18450
18674
|
key: column.key || "unknown",
|
|
18451
18675
|
style: normalizeStyle({
|
|
@@ -18484,7 +18708,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18484
18708
|
])]),
|
|
18485
18709
|
_: 1
|
|
18486
18710
|
}, 8, ["onClick"])) : createCommentVNode("", true),
|
|
18487
|
-
((
|
|
18711
|
+
((_b2 = props.actions) == null ? void 0 : _b2.includes("delete")) ? (openBlock(), createBlock(VBtn, {
|
|
18488
18712
|
key: 1,
|
|
18489
18713
|
color: "red",
|
|
18490
18714
|
size: "small",
|
|
@@ -18582,14 +18806,25 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18582
18806
|
}, 1032, ["color", "onClick"]);
|
|
18583
18807
|
}), 128))
|
|
18584
18808
|
], 64)) : (openBlock(), createElementBlock("div", _hoisted_20, [
|
|
18585
|
-
shouldTruncate(
|
|
18809
|
+
shouldTruncate(
|
|
18810
|
+
getTranslatedValue(getNestedValue2(item, column.key || ""), column, item),
|
|
18811
|
+
getHeaderForColumn(column.key || "")
|
|
18812
|
+
) ? (openBlock(), createElementBlock("span", {
|
|
18586
18813
|
key: 0,
|
|
18587
18814
|
class: "truncated-text",
|
|
18588
18815
|
style: { cursor: "pointer", color: "rgb(var(--v-theme-primary))", textDecoration: "underline" },
|
|
18589
|
-
onClick: withModifiers(($event) => openTextPreview(
|
|
18816
|
+
onClick: withModifiers(($event) => openTextPreview(
|
|
18817
|
+
getTranslatedValue(getNestedValue2(item, column.key || ""), column, item),
|
|
18818
|
+
column.title || column.key || "",
|
|
18819
|
+
item
|
|
18820
|
+
), ["stop"])
|
|
18590
18821
|
}, toDisplayString(truncateText(getTranslatedValue(getNestedValue2(item, column.key || ""), column, item))), 9, _hoisted_21)) : (openBlock(), createElementBlock("span", {
|
|
18591
18822
|
key: 1,
|
|
18592
|
-
onClick: withModifiers(($event) => shouldShowCopyButton(getHeaderForColumn(column.key || "")) && openTextPreview(
|
|
18823
|
+
onClick: withModifiers(($event) => shouldShowCopyButton(getHeaderForColumn(column.key || "")) && openTextPreview(
|
|
18824
|
+
getTranslatedValue(getNestedValue2(item, column.key || ""), column, item),
|
|
18825
|
+
column.title || column.key || "",
|
|
18826
|
+
item
|
|
18827
|
+
), ["stop"]),
|
|
18593
18828
|
style: normalizeStyle({ cursor: shouldShowCopyButton(getHeaderForColumn(column.key || "")) ? "pointer" : "default" })
|
|
18594
18829
|
}, toDisplayString(getTranslatedValue(getNestedValue2(item, column.key || ""), column, item)), 13, _hoisted_22)),
|
|
18595
18830
|
shouldShowCopyButton(getHeaderForColumn(column.key || "")) ? (openBlock(), createBlock(VBtn, {
|
|
@@ -18598,7 +18833,11 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18598
18833
|
size: "x-small",
|
|
18599
18834
|
variant: "text",
|
|
18600
18835
|
color: "primary",
|
|
18601
|
-
onClick: withModifiers(($event) => openTextPreview(
|
|
18836
|
+
onClick: withModifiers(($event) => openTextPreview(
|
|
18837
|
+
getTranslatedValue(getNestedValue2(item, column.key || ""), column, item),
|
|
18838
|
+
column.title || column.key || "",
|
|
18839
|
+
item
|
|
18840
|
+
), ["stop"]),
|
|
18602
18841
|
style: { "min-width": "24px", "width": "24px", "height": "24px" }
|
|
18603
18842
|
}, {
|
|
18604
18843
|
default: withCtx(() => [
|
|
@@ -18673,7 +18912,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18673
18912
|
}, {
|
|
18674
18913
|
default: withCtx(() => [
|
|
18675
18914
|
!header.hidden ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
18676
|
-
header
|
|
18915
|
+
isDateHeader(header) ? (openBlock(), createBlock(ShamsiDatePicker, {
|
|
18677
18916
|
key: 0,
|
|
18678
18917
|
modelValue: formModel.value[resolveHeaderKey(header)],
|
|
18679
18918
|
"onUpdate:modelValue": ($event) => formModel.value[resolveHeaderKey(header)] = $event,
|
|
@@ -18710,11 +18949,23 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18710
18949
|
dir: header.dir,
|
|
18711
18950
|
"auto-grow": "",
|
|
18712
18951
|
rows: "3"
|
|
18713
|
-
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "dir"])) : (openBlock(), createBlock(
|
|
18952
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "dir"])) : isToggleHeader(header) ? (openBlock(), createBlock(ToggleSwitch, {
|
|
18714
18953
|
key: 4,
|
|
18715
18954
|
modelValue: formModel.value[resolveHeaderKey(header)],
|
|
18716
18955
|
"onUpdate:modelValue": ($event) => formModel.value[resolveHeaderKey(header)] = $event,
|
|
18717
18956
|
label: resolveHeaderTitle(header),
|
|
18957
|
+
type: "boolean",
|
|
18958
|
+
activeColor: "#3bd32a",
|
|
18959
|
+
inactiveColor: "#d32a2a",
|
|
18960
|
+
options: [
|
|
18961
|
+
{ value: "true", label: "فعال", icon: unref(IconCheck) },
|
|
18962
|
+
{ value: "false", label: "غیر فعال", icon: unref(IconSquareX) }
|
|
18963
|
+
]
|
|
18964
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "options"])) : (openBlock(), createBlock(VTextField, {
|
|
18965
|
+
key: 5,
|
|
18966
|
+
modelValue: formModel.value[resolveHeaderKey(header)],
|
|
18967
|
+
"onUpdate:modelValue": ($event) => formModel.value[resolveHeaderKey(header)] = $event,
|
|
18968
|
+
label: resolveHeaderTitle(header),
|
|
18718
18969
|
variant: "outlined",
|
|
18719
18970
|
disabled: isHeaderDisabled(header),
|
|
18720
18971
|
type: getFieldInputType(header),
|
|
@@ -18901,9 +19152,9 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18901
19152
|
default: withCtx(() => [
|
|
18902
19153
|
createVNode(VCardTitle, null, {
|
|
18903
19154
|
default: withCtx(() => {
|
|
18904
|
-
var _a2,
|
|
19155
|
+
var _a2, _b2;
|
|
18905
19156
|
return [
|
|
18906
|
-
createTextVNode(toDisplayString(((
|
|
19157
|
+
createTextVNode(toDisplayString(((_b2 = (_a2 = props.customActions) == null ? void 0 : _a2.find((a) => a.component === customActionComponent.value)) == null ? void 0 : _b2.title) || ""), 1)
|
|
18907
19158
|
];
|
|
18908
19159
|
}),
|
|
18909
19160
|
_: 1
|
|
@@ -18948,7 +19199,125 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18948
19199
|
_cache[15] || (_cache[15] = ($event) => filterModel.value = $event)
|
|
18949
19200
|
],
|
|
18950
19201
|
onApply: handleFilterApply
|
|
18951
|
-
}, null, 40, ["modelValue"])) :
|
|
19202
|
+
}, null, 40, ["modelValue"])) : (openBlock(), createBlock(VContainer, { key: 1 }, {
|
|
19203
|
+
default: withCtx(() => [
|
|
19204
|
+
createVNode(VRow, null, {
|
|
19205
|
+
default: withCtx(() => [
|
|
19206
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(formHeaders.value, (header) => {
|
|
19207
|
+
return openBlock(), createBlock(VCol, {
|
|
19208
|
+
key: resolveHeaderKey(header),
|
|
19209
|
+
cols: header.cols ? typeof header.cols === "number" ? header.cols : Number(header.cols) : 4,
|
|
19210
|
+
md: header.cols ? typeof header.cols === "number" ? header.cols : Number(header.cols) : 4
|
|
19211
|
+
}, {
|
|
19212
|
+
default: withCtx(() => [
|
|
19213
|
+
!header.hidden ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
19214
|
+
hasFilterOperators(header) ? (openBlock(), createBlock(VSelect, {
|
|
19215
|
+
key: 0,
|
|
19216
|
+
modelValue: filterOperatorModel.value[resolveHeaderKey(header)],
|
|
19217
|
+
"onUpdate:modelValue": ($event) => filterOperatorModel.value[resolveHeaderKey(header)] = $event,
|
|
19218
|
+
items: getHeaderFilterOperators(header),
|
|
19219
|
+
"item-title": "label",
|
|
19220
|
+
"item-value": "value",
|
|
19221
|
+
density: "compact",
|
|
19222
|
+
variant: "underlined",
|
|
19223
|
+
"hide-details": "",
|
|
19224
|
+
class: "mb-1"
|
|
19225
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "items"])) : createCommentVNode("", true),
|
|
19226
|
+
isDateHeader(header) ? (openBlock(), createBlock(ShamsiDatePicker, {
|
|
19227
|
+
key: 1,
|
|
19228
|
+
modelValue: filterModel.value[resolveHeaderKey(header)],
|
|
19229
|
+
"onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
|
|
19230
|
+
label: resolveHeaderTitle(header),
|
|
19231
|
+
disabled: isHeaderDisabled(header)
|
|
19232
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"])) : hasAutocomplete(header) ? (openBlock(), createBlock(VAutocomplete, {
|
|
19233
|
+
key: 2,
|
|
19234
|
+
modelValue: filterModel.value[resolveHeaderKey(header)],
|
|
19235
|
+
"onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
|
|
19236
|
+
label: resolveHeaderTitle(header),
|
|
19237
|
+
items: resolveAutocompleteItems(header, filterModel.value.value),
|
|
19238
|
+
"item-title": resolveAutocompleteItemTitle(header),
|
|
19239
|
+
"item-value": resolveAutocompleteItemValue(header),
|
|
19240
|
+
"return-object": resolveAutocompleteReturnObject(header),
|
|
19241
|
+
multiple: resolveAutocompleteMultiple(header),
|
|
19242
|
+
chips: resolveAutocompleteMultiple(header),
|
|
19243
|
+
"closable-chips": resolveAutocompleteMultiple(header),
|
|
19244
|
+
disabled: isHeaderDisabled(header),
|
|
19245
|
+
clearable: "",
|
|
19246
|
+
variant: "outlined"
|
|
19247
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "items", "item-title", "item-value", "return-object", "multiple", "chips", "closable-chips", "disabled"])) : isMoneyHeader(header) ? (openBlock(), createBlock(_sfc_main$i, {
|
|
19248
|
+
key: 3,
|
|
19249
|
+
modelValue: filterModel.value[resolveHeaderKey(header)],
|
|
19250
|
+
"onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
|
|
19251
|
+
label: resolveHeaderTitle(header),
|
|
19252
|
+
disabled: isHeaderDisabled(header)
|
|
19253
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled"])) : isTextareaHeader(header) ? (openBlock(), createBlock(VTextarea, {
|
|
19254
|
+
key: 4,
|
|
19255
|
+
modelValue: filterModel.value[resolveHeaderKey(header)],
|
|
19256
|
+
"onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
|
|
19257
|
+
label: resolveHeaderTitle(header),
|
|
19258
|
+
variant: "outlined",
|
|
19259
|
+
disabled: isHeaderDisabled(header),
|
|
19260
|
+
dir: header.dir,
|
|
19261
|
+
"auto-grow": "",
|
|
19262
|
+
rows: "3"
|
|
19263
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "dir"])) : isToggleHeader(header) ? (openBlock(), createBlock(ToggleSwitch, {
|
|
19264
|
+
key: 5,
|
|
19265
|
+
modelValue: filterModel.value[resolveHeaderKey(header)],
|
|
19266
|
+
"onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
|
|
19267
|
+
label: resolveHeaderTitle(header),
|
|
19268
|
+
type: "boolean",
|
|
19269
|
+
activeColor: "#3bd32a",
|
|
19270
|
+
inactiveColor: "#d32a2a",
|
|
19271
|
+
options: [
|
|
19272
|
+
{ value: "true", label: "فعال", icon: unref(IconCheck) },
|
|
19273
|
+
{ value: "false", label: "غیر فعال", icon: unref(IconSquareX) }
|
|
19274
|
+
]
|
|
19275
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "options"])) : (openBlock(), createBlock(VTextField, {
|
|
19276
|
+
key: 6,
|
|
19277
|
+
modelValue: filterModel.value[resolveHeaderKey(header)],
|
|
19278
|
+
"onUpdate:modelValue": ($event) => filterModel.value[resolveHeaderKey(header)] = $event,
|
|
19279
|
+
label: resolveHeaderTitle(header),
|
|
19280
|
+
variant: "outlined",
|
|
19281
|
+
disabled: isHeaderDisabled(header),
|
|
19282
|
+
type: getFieldInputType(header),
|
|
19283
|
+
dir: header.dir
|
|
19284
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "disabled", "type", "dir"]))
|
|
19285
|
+
], 64)) : createCommentVNode("", true)
|
|
19286
|
+
]),
|
|
19287
|
+
_: 2
|
|
19288
|
+
}, 1032, ["cols", "md"]);
|
|
19289
|
+
}), 128))
|
|
19290
|
+
]),
|
|
19291
|
+
_: 1
|
|
19292
|
+
})
|
|
19293
|
+
]),
|
|
19294
|
+
_: 1
|
|
19295
|
+
}))
|
|
19296
|
+
]),
|
|
19297
|
+
_: 1
|
|
19298
|
+
}),
|
|
19299
|
+
createVNode(VCardActions, null, {
|
|
19300
|
+
default: withCtx(() => [
|
|
19301
|
+
createVNode(VSpacer),
|
|
19302
|
+
createVNode(VBtn, {
|
|
19303
|
+
color: "grey",
|
|
19304
|
+
variant: "tonal",
|
|
19305
|
+
onClick: resetFilter
|
|
19306
|
+
}, {
|
|
19307
|
+
default: withCtx(() => [..._cache[55] || (_cache[55] = [
|
|
19308
|
+
createTextVNode("حذف فیلترها", -1)
|
|
19309
|
+
])]),
|
|
19310
|
+
_: 1
|
|
19311
|
+
}),
|
|
19312
|
+
createVNode(VBtn, {
|
|
19313
|
+
color: "primary",
|
|
19314
|
+
onClick: applyFilter
|
|
19315
|
+
}, {
|
|
19316
|
+
default: withCtx(() => [..._cache[56] || (_cache[56] = [
|
|
19317
|
+
createTextVNode("اعمال فیلتر", -1)
|
|
19318
|
+
])]),
|
|
19319
|
+
_: 1
|
|
19320
|
+
})
|
|
18952
19321
|
]),
|
|
18953
19322
|
_: 1
|
|
18954
19323
|
})
|
|
@@ -18976,7 +19345,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
18976
19345
|
}, {
|
|
18977
19346
|
default: withCtx(() => [
|
|
18978
19347
|
createVNode(VIcon, null, {
|
|
18979
|
-
default: withCtx(() => [..._cache[
|
|
19348
|
+
default: withCtx(() => [..._cache[57] || (_cache[57] = [
|
|
18980
19349
|
createTextVNode("mdi-close", -1)
|
|
18981
19350
|
])]),
|
|
18982
19351
|
_: 1
|
|
@@ -19009,12 +19378,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
19009
19378
|
}, {
|
|
19010
19379
|
default: withCtx(() => [
|
|
19011
19380
|
createVNode(VIcon, { start: "" }, {
|
|
19012
|
-
default: withCtx(() => [..._cache[
|
|
19381
|
+
default: withCtx(() => [..._cache[58] || (_cache[58] = [
|
|
19013
19382
|
createTextVNode("mdi-content-copy", -1)
|
|
19014
19383
|
])]),
|
|
19015
19384
|
_: 1
|
|
19016
19385
|
}),
|
|
19017
|
-
_cache[
|
|
19386
|
+
_cache[59] || (_cache[59] = createTextVNode(" کپی متن ", -1))
|
|
19018
19387
|
]),
|
|
19019
19388
|
_: 1
|
|
19020
19389
|
}),
|
|
@@ -19024,12 +19393,12 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
19024
19393
|
}, {
|
|
19025
19394
|
default: withCtx(() => [
|
|
19026
19395
|
createVNode(VIcon, { start: "" }, {
|
|
19027
|
-
default: withCtx(() => [..._cache[
|
|
19396
|
+
default: withCtx(() => [..._cache[60] || (_cache[60] = [
|
|
19028
19397
|
createTextVNode("mdi-content-copy", -1)
|
|
19029
19398
|
])]),
|
|
19030
19399
|
_: 1
|
|
19031
19400
|
}),
|
|
19032
|
-
_cache[
|
|
19401
|
+
_cache[61] || (_cache[61] = createTextVNode(" کپی رکورد کامل ", -1))
|
|
19033
19402
|
]),
|
|
19034
19403
|
_: 1
|
|
19035
19404
|
}),
|
|
@@ -19037,7 +19406,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
19037
19406
|
color: "grey",
|
|
19038
19407
|
onClick: _cache[19] || (_cache[19] = ($event) => textPreviewDialog.value = false)
|
|
19039
19408
|
}, {
|
|
19040
|
-
default: withCtx(() => [..._cache[
|
|
19409
|
+
default: withCtx(() => [..._cache[62] || (_cache[62] = [
|
|
19041
19410
|
createTextVNode("بستن", -1)
|
|
19042
19411
|
])]),
|
|
19043
19412
|
_: 1
|
|
@@ -19064,7 +19433,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
19064
19433
|
variant: "text",
|
|
19065
19434
|
onClick: _cache[21] || (_cache[21] = ($event) => snackbar.value = false)
|
|
19066
19435
|
}, {
|
|
19067
|
-
default: withCtx(() => [..._cache[
|
|
19436
|
+
default: withCtx(() => [..._cache[63] || (_cache[63] = [
|
|
19068
19437
|
createTextVNode(" بستن ", -1)
|
|
19069
19438
|
])]),
|
|
19070
19439
|
_: 1
|
|
@@ -19079,8 +19448,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent$1({
|
|
|
19079
19448
|
};
|
|
19080
19449
|
}
|
|
19081
19450
|
});
|
|
19082
|
-
const _hoisted_1$
|
|
19083
|
-
const _sfc_main$
|
|
19451
|
+
const _hoisted_1$8 = { class: "description-input" };
|
|
19452
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent$1({
|
|
19084
19453
|
__name: "DescriptionInput",
|
|
19085
19454
|
props: {
|
|
19086
19455
|
modelValue: { default: "" },
|
|
@@ -19179,7 +19548,7 @@ ${newLineNumber} - `;
|
|
|
19179
19548
|
emit("change", internalValue.value);
|
|
19180
19549
|
};
|
|
19181
19550
|
return (_ctx, _cache) => {
|
|
19182
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
19551
|
+
return openBlock(), createElementBlock("div", _hoisted_1$8, [
|
|
19183
19552
|
createVNode(VTextarea, {
|
|
19184
19553
|
modelValue: internalValue.value,
|
|
19185
19554
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => internalValue.value = $event),
|
|
@@ -19202,7 +19571,7 @@ ${newLineNumber} - `;
|
|
|
19202
19571
|
};
|
|
19203
19572
|
}
|
|
19204
19573
|
});
|
|
19205
|
-
const DescriptionInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
19574
|
+
const DescriptionInput = /* @__PURE__ */ _export_sfc$1(_sfc_main$e, [["__scopeId", "data-v-e8b64ecb"]]);
|
|
19206
19575
|
var mdiAlertCircle = "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";
|
|
19207
19576
|
var mdiArrowRight = "M4,11V13H16L10.5,18.5L11.92,19.92L19.84,12L11.92,4.08L10.5,5.5L16,11H4Z";
|
|
19208
19577
|
var mdiCheckCircle = "M12 2C6.5 2 2 6.5 2 12S6.5 22 12 22 22 17.5 22 12 17.5 2 12 2M10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z";
|
|
@@ -19233,8 +19602,8 @@ const icons = {
|
|
|
19233
19602
|
cog: mdiCog,
|
|
19234
19603
|
contentCopy: mdiContentCopy
|
|
19235
19604
|
};
|
|
19236
|
-
const _hoisted_1$
|
|
19237
|
-
const _sfc_main$
|
|
19605
|
+
const _hoisted_1$7 = { class: "download-title" };
|
|
19606
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent$1({
|
|
19238
19607
|
...{
|
|
19239
19608
|
inheritAttrs: false
|
|
19240
19609
|
},
|
|
@@ -19339,7 +19708,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent$1({
|
|
|
19339
19708
|
]),
|
|
19340
19709
|
_: 1
|
|
19341
19710
|
}, 8, ["start", "end", "class"])) : createCommentVNode("", true),
|
|
19342
|
-
createElementVNode("span", _hoisted_1$
|
|
19711
|
+
createElementVNode("span", _hoisted_1$7, toDisplayString(__props.title), 1),
|
|
19343
19712
|
!__props.icon ? (openBlock(), createBlock(VIcon, {
|
|
19344
19713
|
key: 1,
|
|
19345
19714
|
start: "",
|
|
@@ -19352,18 +19721,18 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent$1({
|
|
|
19352
19721
|
};
|
|
19353
19722
|
}
|
|
19354
19723
|
});
|
|
19355
|
-
const DownloadButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
19356
|
-
const _hoisted_1$
|
|
19724
|
+
const DownloadButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$d, [["__scopeId", "data-v-0a911831"]]);
|
|
19725
|
+
const _hoisted_1$6 = {
|
|
19357
19726
|
key: 0,
|
|
19358
19727
|
class: "pdf-viewer-header"
|
|
19359
19728
|
};
|
|
19360
|
-
const _hoisted_2$
|
|
19361
|
-
const _hoisted_3$
|
|
19362
|
-
const _hoisted_4
|
|
19729
|
+
const _hoisted_2$4 = { class: "pdf-viewer-title" };
|
|
19730
|
+
const _hoisted_3$2 = { class: "pdf-viewer-controls" };
|
|
19731
|
+
const _hoisted_4 = {
|
|
19363
19732
|
key: 0,
|
|
19364
19733
|
class: "zoom-controls"
|
|
19365
19734
|
};
|
|
19366
|
-
const _hoisted_5
|
|
19735
|
+
const _hoisted_5 = { class: "zoom-level" };
|
|
19367
19736
|
const _hoisted_6 = {
|
|
19368
19737
|
key: 1,
|
|
19369
19738
|
class: "navigation-controls"
|
|
@@ -19396,7 +19765,7 @@ const _hoisted_16 = {
|
|
|
19396
19765
|
key: 0,
|
|
19397
19766
|
class: "file-info"
|
|
19398
19767
|
};
|
|
19399
|
-
const _sfc_main$
|
|
19768
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent$1({
|
|
19400
19769
|
__name: "PdfViewer",
|
|
19401
19770
|
props: {
|
|
19402
19771
|
src: {},
|
|
@@ -19604,12 +19973,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent$1({
|
|
|
19604
19973
|
return openBlock(), createElementBlock("div", {
|
|
19605
19974
|
class: normalizeClass(["pdf-viewer-container", { "fullscreen": isFullscreen.value }])
|
|
19606
19975
|
}, [
|
|
19607
|
-
__props.showHeader ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
19608
|
-
createElementVNode("div", _hoisted_2$
|
|
19976
|
+
__props.showHeader ? (openBlock(), createElementBlock("div", _hoisted_1$6, [
|
|
19977
|
+
createElementVNode("div", _hoisted_2$4, [
|
|
19609
19978
|
createElementVNode("h3", null, toDisplayString(__props.title || "PDF Viewer"), 1)
|
|
19610
19979
|
]),
|
|
19611
|
-
createElementVNode("div", _hoisted_3$
|
|
19612
|
-
__props.showZoomControls ? (openBlock(), createElementBlock("div", _hoisted_4
|
|
19980
|
+
createElementVNode("div", _hoisted_3$2, [
|
|
19981
|
+
__props.showZoomControls ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
19613
19982
|
createVNode(VBtn, {
|
|
19614
19983
|
size: "small",
|
|
19615
19984
|
variant: "text",
|
|
@@ -19625,7 +19994,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent$1({
|
|
|
19625
19994
|
]),
|
|
19626
19995
|
_: 1
|
|
19627
19996
|
}, 8, ["disabled"]),
|
|
19628
|
-
createElementVNode("span", _hoisted_5
|
|
19997
|
+
createElementVNode("span", _hoisted_5, toDisplayString(Math.round(zoom.value * 100)) + "%", 1),
|
|
19629
19998
|
createVNode(VBtn, {
|
|
19630
19999
|
size: "small",
|
|
19631
20000
|
variant: "text",
|
|
@@ -19823,8 +20192,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent$1({
|
|
|
19823
20192
|
};
|
|
19824
20193
|
}
|
|
19825
20194
|
});
|
|
19826
|
-
const PdfViewer = /* @__PURE__ */ _export_sfc$1(_sfc_main$
|
|
19827
|
-
const _sfc_main$
|
|
20195
|
+
const PdfViewer = /* @__PURE__ */ _export_sfc$1(_sfc_main$c, [["__scopeId", "data-v-f3e9c767"]]);
|
|
20196
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent$1({
|
|
19828
20197
|
__name: "UiChildCard",
|
|
19829
20198
|
props: {
|
|
19830
20199
|
title: String
|
|
@@ -19858,8 +20227,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent$1({
|
|
|
19858
20227
|
};
|
|
19859
20228
|
}
|
|
19860
20229
|
});
|
|
19861
|
-
const _hoisted_1$
|
|
19862
|
-
const _sfc_main$
|
|
20230
|
+
const _hoisted_1$5 = { class: "d-sm-flex align-center justify-space-between" };
|
|
20231
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent$1({
|
|
19863
20232
|
__name: "UiParentCard",
|
|
19864
20233
|
props: {
|
|
19865
20234
|
title: String
|
|
@@ -19871,7 +20240,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent$1({
|
|
|
19871
20240
|
default: withCtx(() => [
|
|
19872
20241
|
createVNode(VCardItem, null, {
|
|
19873
20242
|
default: withCtx(() => [
|
|
19874
|
-
createElementVNode("div", _hoisted_1$
|
|
20243
|
+
createElementVNode("div", _hoisted_1$5, [
|
|
19875
20244
|
createVNode(VCardTitle, null, {
|
|
19876
20245
|
default: withCtx(() => [
|
|
19877
20246
|
createTextVNode(toDisplayString(props.title), 1)
|
|
@@ -19896,7 +20265,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent$1({
|
|
|
19896
20265
|
};
|
|
19897
20266
|
}
|
|
19898
20267
|
});
|
|
19899
|
-
const _sfc_main$
|
|
20268
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
19900
20269
|
__name: "VPriceTextField",
|
|
19901
20270
|
props: {
|
|
19902
20271
|
modelValue: {},
|
|
@@ -19997,112 +20366,6 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent$1({
|
|
|
19997
20366
|
};
|
|
19998
20367
|
}
|
|
19999
20368
|
});
|
|
20000
|
-
const _hoisted_1$5 = { class: "mb-6" };
|
|
20001
|
-
const _hoisted_2$4 = { class: "text-subtitle-1 font-weight-medium mb-3" };
|
|
20002
|
-
const _hoisted_3$2 = { class: "theme-toggle-container" };
|
|
20003
|
-
const _hoisted_4 = { class: "toggle-slider" };
|
|
20004
|
-
const _hoisted_5 = { class: "toggle-icon" };
|
|
20005
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent$1({
|
|
20006
|
-
__name: "ToggleSwitch",
|
|
20007
|
-
props: {
|
|
20008
|
-
modelValue: { type: [String, Boolean] },
|
|
20009
|
-
label: {},
|
|
20010
|
-
type: { default: "boolean" },
|
|
20011
|
-
options: { default: () => [] },
|
|
20012
|
-
trueLabel: {},
|
|
20013
|
-
falseLabel: {},
|
|
20014
|
-
trueIcon: {},
|
|
20015
|
-
falseIcon: {},
|
|
20016
|
-
activeColor: { default: "rgb(var(--v-theme-primary))" },
|
|
20017
|
-
inactiveColor: { default: "#e0e0e0" }
|
|
20018
|
-
},
|
|
20019
|
-
emits: ["update:modelValue"],
|
|
20020
|
-
setup(__props, { emit: __emit }) {
|
|
20021
|
-
const props = __props;
|
|
20022
|
-
const emit = __emit;
|
|
20023
|
-
const isBooleanMode = computed(() => props.type === "boolean");
|
|
20024
|
-
const isStringMode = computed(() => props.type === "string");
|
|
20025
|
-
const isActive = computed(() => {
|
|
20026
|
-
if (isBooleanMode.value) {
|
|
20027
|
-
return props.modelValue === true;
|
|
20028
|
-
}
|
|
20029
|
-
return false;
|
|
20030
|
-
});
|
|
20031
|
-
const currentIndex = computed(() => {
|
|
20032
|
-
if (isStringMode.value && props.options.length > 0) {
|
|
20033
|
-
return props.options.findIndex((opt) => opt.value === props.modelValue);
|
|
20034
|
-
}
|
|
20035
|
-
return 0;
|
|
20036
|
-
});
|
|
20037
|
-
const handleToggle = () => {
|
|
20038
|
-
if (isBooleanMode.value) {
|
|
20039
|
-
emit("update:modelValue", !props.modelValue);
|
|
20040
|
-
} else if (isStringMode.value && props.options.length > 0) {
|
|
20041
|
-
const nextIndex = (currentIndex.value + 1) % props.options.length;
|
|
20042
|
-
emit("update:modelValue", props.options[nextIndex].value);
|
|
20043
|
-
}
|
|
20044
|
-
};
|
|
20045
|
-
const isToggleActive = computed(() => {
|
|
20046
|
-
if (isBooleanMode.value) {
|
|
20047
|
-
return isActive.value;
|
|
20048
|
-
} else {
|
|
20049
|
-
if (props.options.length >= 2) {
|
|
20050
|
-
return currentIndex.value >= 1;
|
|
20051
|
-
} else if (props.options.length === 1) {
|
|
20052
|
-
return true;
|
|
20053
|
-
}
|
|
20054
|
-
return false;
|
|
20055
|
-
}
|
|
20056
|
-
});
|
|
20057
|
-
const currentOption = computed(() => {
|
|
20058
|
-
if (isStringMode.value && props.options.length > 0) {
|
|
20059
|
-
return props.options[currentIndex.value] || props.options[0];
|
|
20060
|
-
}
|
|
20061
|
-
return null;
|
|
20062
|
-
});
|
|
20063
|
-
const displayIcon = computed(() => {
|
|
20064
|
-
var _a;
|
|
20065
|
-
if (isBooleanMode.value) {
|
|
20066
|
-
return isActive.value ? props.trueIcon : props.falseIcon;
|
|
20067
|
-
} else {
|
|
20068
|
-
return (_a = currentOption.value) == null ? void 0 : _a.icon;
|
|
20069
|
-
}
|
|
20070
|
-
});
|
|
20071
|
-
return (_ctx, _cache) => {
|
|
20072
|
-
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
20073
|
-
createElementVNode("h6", _hoisted_2$4, toDisplayString(__props.label), 1),
|
|
20074
|
-
createElementVNode("div", _hoisted_3$2, [
|
|
20075
|
-
createElementVNode("div", {
|
|
20076
|
-
class: normalizeClass(["theme-toggle", {
|
|
20077
|
-
"active": isToggleActive.value,
|
|
20078
|
-
"string-mode": isStringMode.value
|
|
20079
|
-
}]),
|
|
20080
|
-
style: normalizeStyle({
|
|
20081
|
-
background: isToggleActive.value ? props.activeColor : props.inactiveColor
|
|
20082
|
-
}),
|
|
20083
|
-
onClick: handleToggle
|
|
20084
|
-
}, [
|
|
20085
|
-
createElementVNode("div", _hoisted_4, [
|
|
20086
|
-
createElementVNode("div", _hoisted_5, [
|
|
20087
|
-
renderSlot(_ctx.$slots, "icon", {
|
|
20088
|
-
value: __props.modelValue,
|
|
20089
|
-
option: currentOption.value
|
|
20090
|
-
}, () => [
|
|
20091
|
-
displayIcon.value ? (openBlock(), createBlock(resolveDynamicComponent(displayIcon.value), {
|
|
20092
|
-
key: 0,
|
|
20093
|
-
size: "24",
|
|
20094
|
-
"stroke-width": "2"
|
|
20095
|
-
})) : createCommentVNode("", true)
|
|
20096
|
-
], true)
|
|
20097
|
-
])
|
|
20098
|
-
])
|
|
20099
|
-
], 6)
|
|
20100
|
-
])
|
|
20101
|
-
]);
|
|
20102
|
-
};
|
|
20103
|
-
}
|
|
20104
|
-
});
|
|
20105
|
-
const ToggleSwitch = /* @__PURE__ */ _export_sfc$1(_sfc_main$9, [["__scopeId", "data-v-536e1a17"]]);
|
|
20106
20369
|
const _hoisted_1$4 = {
|
|
20107
20370
|
class: "app-stepper-root",
|
|
20108
20371
|
dir: "rtl"
|
|
@@ -39538,7 +39801,7 @@ export {
|
|
|
39538
39801
|
BooleanEnumOptions,
|
|
39539
39802
|
_sfc_main$k as ConfirmDialog,
|
|
39540
39803
|
CustomAutocomplete,
|
|
39541
|
-
_sfc_main$
|
|
39804
|
+
_sfc_main$f as CustomDataTable,
|
|
39542
39805
|
DateConverter,
|
|
39543
39806
|
DescriptionInput,
|
|
39544
39807
|
DigitLimit,
|
|
@@ -39553,9 +39816,9 @@ export {
|
|
|
39553
39816
|
PdfViewer,
|
|
39554
39817
|
ShamsiDatePicker,
|
|
39555
39818
|
ToggleSwitch,
|
|
39556
|
-
_sfc_main$
|
|
39557
|
-
_sfc_main$
|
|
39558
|
-
_sfc_main$
|
|
39819
|
+
_sfc_main$b as UiChildCard,
|
|
39820
|
+
_sfc_main$a as UiParentCard,
|
|
39821
|
+
_sfc_main$9 as VPriceTextField,
|
|
39559
39822
|
bootstrapApp,
|
|
39560
39823
|
configureAuth,
|
|
39561
39824
|
configureAxiosInstance,
|