@amirjalili1374/ui-kit 1.3.0 → 1.3.2
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/README.md +1 -2
- package/dist/ui-kit.cjs.js +2 -2
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.es.js +195 -7
- package/dist/ui-kit.es.js.map +1 -1
- package/package.json +1 -1
package/dist/ui-kit.es.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
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, withKeys, vModelText, onUnmounted } from "vue";
|
|
2
2
|
import { IconHome, IconArrowBadgeLeft, IconChevronDown, IconChevronRight, IconMinus, IconPlus, IconRefresh, IconChevronLeft, IconDownload, IconPrinter, IconMaximize, IconMinimize, IconX, IconFileText, IconCheck, IconPencil, IconClock } from "@tabler/icons-vue";
|
|
3
3
|
import axios from "axios";
|
|
4
|
-
import jalaali from "jalaali-js";
|
|
5
4
|
import { useDebounceFn } from "@vueuse/core";
|
|
6
5
|
import { useRouter as useRouter$1, useRoute as useRoute$1 } from "vue-router";
|
|
7
6
|
import { defineStore } from "pinia";
|
|
@@ -13202,6 +13201,199 @@ function configureAxiosInstance(instance) {
|
|
|
13202
13201
|
function getAxiosInstance() {
|
|
13203
13202
|
return configuredInstance || axios;
|
|
13204
13203
|
}
|
|
13204
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
13205
|
+
function getDefaultExportFromCjs(x) {
|
|
13206
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
13207
|
+
}
|
|
13208
|
+
var jalaaliJs = {
|
|
13209
|
+
toJalaali,
|
|
13210
|
+
toGregorian,
|
|
13211
|
+
isValidJalaaliDate,
|
|
13212
|
+
isLeapJalaaliYear,
|
|
13213
|
+
jalaaliMonthLength,
|
|
13214
|
+
jalCal,
|
|
13215
|
+
j2d,
|
|
13216
|
+
d2j,
|
|
13217
|
+
g2d,
|
|
13218
|
+
d2g,
|
|
13219
|
+
jalaaliToDateObject,
|
|
13220
|
+
jalaaliWeek
|
|
13221
|
+
};
|
|
13222
|
+
var breaks = [
|
|
13223
|
+
-61,
|
|
13224
|
+
9,
|
|
13225
|
+
38,
|
|
13226
|
+
199,
|
|
13227
|
+
426,
|
|
13228
|
+
686,
|
|
13229
|
+
756,
|
|
13230
|
+
818,
|
|
13231
|
+
1111,
|
|
13232
|
+
1181,
|
|
13233
|
+
1210,
|
|
13234
|
+
1635,
|
|
13235
|
+
2060,
|
|
13236
|
+
2097,
|
|
13237
|
+
2192,
|
|
13238
|
+
2262,
|
|
13239
|
+
2324,
|
|
13240
|
+
2394,
|
|
13241
|
+
2456,
|
|
13242
|
+
3178
|
|
13243
|
+
];
|
|
13244
|
+
function toJalaali(gy, gm, gd) {
|
|
13245
|
+
if (Object.prototype.toString.call(gy) === "[object Date]") {
|
|
13246
|
+
gd = gy.getDate();
|
|
13247
|
+
gm = gy.getMonth() + 1;
|
|
13248
|
+
gy = gy.getFullYear();
|
|
13249
|
+
}
|
|
13250
|
+
return d2j(g2d(gy, gm, gd));
|
|
13251
|
+
}
|
|
13252
|
+
function toGregorian(jy, jm, jd) {
|
|
13253
|
+
return d2g(j2d(jy, jm, jd));
|
|
13254
|
+
}
|
|
13255
|
+
function isValidJalaaliDate(jy, jm, jd) {
|
|
13256
|
+
return jy >= -61 && jy <= 3177 && jm >= 1 && jm <= 12 && jd >= 1 && jd <= jalaaliMonthLength(jy, jm);
|
|
13257
|
+
}
|
|
13258
|
+
function isLeapJalaaliYear(jy) {
|
|
13259
|
+
return jalCalLeap(jy) === 0;
|
|
13260
|
+
}
|
|
13261
|
+
function jalaaliMonthLength(jy, jm) {
|
|
13262
|
+
if (jm <= 6) return 31;
|
|
13263
|
+
if (jm <= 11) return 30;
|
|
13264
|
+
if (isLeapJalaaliYear(jy)) return 30;
|
|
13265
|
+
return 29;
|
|
13266
|
+
}
|
|
13267
|
+
function jalCalLeap(jy) {
|
|
13268
|
+
var bl = breaks.length, jp = breaks[0], jm, jump, leap, n, i;
|
|
13269
|
+
if (jy < jp || jy >= breaks[bl - 1])
|
|
13270
|
+
throw new Error("Invalid Jalaali year " + jy);
|
|
13271
|
+
for (i = 1; i < bl; i += 1) {
|
|
13272
|
+
jm = breaks[i];
|
|
13273
|
+
jump = jm - jp;
|
|
13274
|
+
if (jy < jm)
|
|
13275
|
+
break;
|
|
13276
|
+
jp = jm;
|
|
13277
|
+
}
|
|
13278
|
+
n = jy - jp;
|
|
13279
|
+
if (jump - n < 6)
|
|
13280
|
+
n = n - jump + div$1(jump + 4, 33) * 33;
|
|
13281
|
+
leap = mod(mod(n + 1, 33) - 1, 4);
|
|
13282
|
+
if (leap === -1) {
|
|
13283
|
+
leap = 4;
|
|
13284
|
+
}
|
|
13285
|
+
return leap;
|
|
13286
|
+
}
|
|
13287
|
+
function jalCal(jy, withoutLeap) {
|
|
13288
|
+
var bl = breaks.length, gy = jy + 621, leapJ = -14, jp = breaks[0], jm, jump, leap, leapG, march, n, i;
|
|
13289
|
+
if (jy < jp || jy >= breaks[bl - 1])
|
|
13290
|
+
throw new Error("Invalid Jalaali year " + jy);
|
|
13291
|
+
for (i = 1; i < bl; i += 1) {
|
|
13292
|
+
jm = breaks[i];
|
|
13293
|
+
jump = jm - jp;
|
|
13294
|
+
if (jy < jm)
|
|
13295
|
+
break;
|
|
13296
|
+
leapJ = leapJ + div$1(jump, 33) * 8 + div$1(mod(jump, 33), 4);
|
|
13297
|
+
jp = jm;
|
|
13298
|
+
}
|
|
13299
|
+
n = jy - jp;
|
|
13300
|
+
leapJ = leapJ + div$1(n, 33) * 8 + div$1(mod(n, 33) + 3, 4);
|
|
13301
|
+
if (mod(jump, 33) === 4 && jump - n === 4)
|
|
13302
|
+
leapJ += 1;
|
|
13303
|
+
leapG = div$1(gy, 4) - div$1((div$1(gy, 100) + 1) * 3, 4) - 150;
|
|
13304
|
+
march = 20 + leapJ - leapG;
|
|
13305
|
+
if (withoutLeap) return { gy, march };
|
|
13306
|
+
if (jump - n < 6)
|
|
13307
|
+
n = n - jump + div$1(jump + 4, 33) * 33;
|
|
13308
|
+
leap = mod(mod(n + 1, 33) - 1, 4);
|
|
13309
|
+
if (leap === -1) {
|
|
13310
|
+
leap = 4;
|
|
13311
|
+
}
|
|
13312
|
+
return {
|
|
13313
|
+
leap,
|
|
13314
|
+
gy,
|
|
13315
|
+
march
|
|
13316
|
+
};
|
|
13317
|
+
}
|
|
13318
|
+
function j2d(jy, jm, jd) {
|
|
13319
|
+
var r = jalCal(jy, true);
|
|
13320
|
+
return g2d(r.gy, 3, r.march) + (jm - 1) * 31 - div$1(jm, 7) * (jm - 7) + jd - 1;
|
|
13321
|
+
}
|
|
13322
|
+
function d2j(jdn) {
|
|
13323
|
+
var gy = d2g(jdn).gy, jy = gy - 621, r = jalCal(jy, false), jdn1f = g2d(gy, 3, r.march), jd, jm, k;
|
|
13324
|
+
k = jdn - jdn1f;
|
|
13325
|
+
if (k >= 0) {
|
|
13326
|
+
if (k <= 185) {
|
|
13327
|
+
jm = 1 + div$1(k, 31);
|
|
13328
|
+
jd = mod(k, 31) + 1;
|
|
13329
|
+
return {
|
|
13330
|
+
jy,
|
|
13331
|
+
jm,
|
|
13332
|
+
jd
|
|
13333
|
+
};
|
|
13334
|
+
} else {
|
|
13335
|
+
k -= 186;
|
|
13336
|
+
}
|
|
13337
|
+
} else {
|
|
13338
|
+
jy -= 1;
|
|
13339
|
+
k += 179;
|
|
13340
|
+
if (r.leap === 1)
|
|
13341
|
+
k += 1;
|
|
13342
|
+
}
|
|
13343
|
+
jm = 7 + div$1(k, 30);
|
|
13344
|
+
jd = mod(k, 30) + 1;
|
|
13345
|
+
return {
|
|
13346
|
+
jy,
|
|
13347
|
+
jm,
|
|
13348
|
+
jd
|
|
13349
|
+
};
|
|
13350
|
+
}
|
|
13351
|
+
function g2d(gy, gm, gd) {
|
|
13352
|
+
var d = div$1((gy + div$1(gm - 8, 6) + 100100) * 1461, 4) + div$1(153 * mod(gm + 9, 12) + 2, 5) + gd - 34840408;
|
|
13353
|
+
d = d - div$1(div$1(gy + 100100 + div$1(gm - 8, 6), 100) * 3, 4) + 752;
|
|
13354
|
+
return d;
|
|
13355
|
+
}
|
|
13356
|
+
function d2g(jdn) {
|
|
13357
|
+
var j, i, gd, gm, gy;
|
|
13358
|
+
j = 4 * jdn + 139361631;
|
|
13359
|
+
j = j + div$1(div$1(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908;
|
|
13360
|
+
i = div$1(mod(j, 1461), 4) * 5 + 308;
|
|
13361
|
+
gd = div$1(mod(i, 153), 5) + 1;
|
|
13362
|
+
gm = mod(div$1(i, 153), 12) + 1;
|
|
13363
|
+
gy = div$1(j, 1461) - 100100 + div$1(8 - gm, 6);
|
|
13364
|
+
return {
|
|
13365
|
+
gy,
|
|
13366
|
+
gm,
|
|
13367
|
+
gd
|
|
13368
|
+
};
|
|
13369
|
+
}
|
|
13370
|
+
function jalaaliWeek(jy, jm, jd) {
|
|
13371
|
+
var dayOfWeek = jalaaliToDateObject(jy, jm, jd).getDay();
|
|
13372
|
+
var startDayDifference = dayOfWeek == 6 ? 0 : -(dayOfWeek + 1);
|
|
13373
|
+
var endDayDifference = 6 + startDayDifference;
|
|
13374
|
+
return {
|
|
13375
|
+
saturday: d2j(j2d(jy, jm, jd + startDayDifference)),
|
|
13376
|
+
friday: d2j(j2d(jy, jm, jd + endDayDifference))
|
|
13377
|
+
};
|
|
13378
|
+
}
|
|
13379
|
+
function jalaaliToDateObject(jy, jm, jd, h2, m, s, ms) {
|
|
13380
|
+
var gregorianCalenderDate = toGregorian(jy, jm, jd);
|
|
13381
|
+
return new Date(
|
|
13382
|
+
gregorianCalenderDate.gy,
|
|
13383
|
+
gregorianCalenderDate.gm - 1,
|
|
13384
|
+
gregorianCalenderDate.gd,
|
|
13385
|
+
h2 || 0,
|
|
13386
|
+
m || 0,
|
|
13387
|
+
s || 0,
|
|
13388
|
+
ms || 0
|
|
13389
|
+
);
|
|
13390
|
+
}
|
|
13391
|
+
function div$1(a, b) {
|
|
13392
|
+
return ~~(a / b);
|
|
13393
|
+
}
|
|
13394
|
+
function mod(a, b) {
|
|
13395
|
+
return a - ~~(a / b) * b;
|
|
13396
|
+
}
|
|
13205
13397
|
class DateConverter {
|
|
13206
13398
|
// Convert Gregorian to Shamsi
|
|
13207
13399
|
static toShamsi(dateStr) {
|
|
@@ -13219,7 +13411,7 @@ class DateConverter {
|
|
|
13219
13411
|
// JS months are 0-based
|
|
13220
13412
|
gd: date.getDate()
|
|
13221
13413
|
};
|
|
13222
|
-
const { jy, jm, jd } =
|
|
13414
|
+
const { jy, jm, jd } = jalaaliJs.toJalaali(gy, gm, gd);
|
|
13223
13415
|
return `${jy}/${String(jm).padStart(2, "0")}/${String(jd).padStart(2, "0")}`;
|
|
13224
13416
|
} catch (error) {
|
|
13225
13417
|
console.error("Error converting date to Shamsi:", error, dateStr);
|
|
@@ -13229,7 +13421,7 @@ class DateConverter {
|
|
|
13229
13421
|
// Convert Shamsi to Gregorian
|
|
13230
13422
|
static toGregorian(jalaliStr) {
|
|
13231
13423
|
const [jy, jm, jd] = jalaliStr.split("/").map(Number);
|
|
13232
|
-
const { gy, gm, gd } =
|
|
13424
|
+
const { gy, gm, gd } = jalaaliJs.toGregorian(jy, jm, jd);
|
|
13233
13425
|
return `${gy}-${String(gm).padStart(2, "0")}-${String(gd).padStart(2, "0")}`;
|
|
13234
13426
|
}
|
|
13235
13427
|
}
|
|
@@ -19450,10 +19642,6 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent$1({
|
|
|
19450
19642
|
}
|
|
19451
19643
|
});
|
|
19452
19644
|
const AppStepper = /* @__PURE__ */ _export_sfc$1(_sfc_main$4, [["__scopeId", "data-v-d5178633"]]);
|
|
19453
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
19454
|
-
function getDefaultExportFromCjs(x) {
|
|
19455
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
19456
|
-
}
|
|
19457
19645
|
var lottie = { exports: {} };
|
|
19458
19646
|
(function(module, exports) {
|
|
19459
19647
|
typeof navigator !== "undefined" && function(global2, factory) {
|