@kashi-ui/elements 2.24.1 → 2.25.0
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 +3 -3
- package/dist/base.d.ts +110 -0
- package/dist/capture.d.ts +75 -0
- package/dist/capture.js +456 -0
- package/dist/cdn/{appointment-DOXBUwIU.js → appointment-BaEWfjSX.js} +1 -1
- package/dist/cdn/base-BqFAMlwG.js +1 -0
- package/dist/cdn/{basic-DuY4RslZ.js → basic-BBvsRt91.js} +1 -1
- package/dist/cdn/{buttons-BaK6bx3w.js → buttons-BmP5wikN.js} +1 -1
- package/dist/cdn/{calendar-BulPeVAJ.js → calendar-CwKogl-G.js} +1 -1
- package/dist/cdn/capture-B48H5hmR.js +24 -0
- package/dist/cdn/{card-BKiwJF34.js → card-C0nariT-.js} +1 -1
- package/dist/cdn/{cards-DKarXHsC.js → cards-D9-wNDK8.js} +1 -1
- package/dist/cdn/{charts-ETYOAJyB.js → charts-Cct32znI.js} +1 -1
- package/dist/cdn/{chat-D5ZIMnNp.js → chat-Dg5CEN6Y.js} +1 -1
- package/dist/cdn/{choice-DBvC2Puo.js → choice-cDqbHUTC.js} +1 -1
- package/dist/cdn/combobox-Drm8K9Zk.js +1 -0
- package/dist/cdn/commerce-JkDctt2h.js +1 -0
- package/dist/cdn/{content-DN3eXLg-.js → content-CqUXcDCi.js} +1 -1
- package/dist/cdn/{controls--OMZkJYe.js → controls-CquzGwtr.js} +1 -1
- package/dist/cdn/{display-BfYWAjNu.js → display-DW5JEQXT.js} +1 -1
- package/dist/cdn/{fields-B-jTUQiI.js → fields-C-ytjZil.js} +1 -1
- package/dist/cdn/forms-CurTYl2V.js +1 -0
- package/dist/cdn/gantt-QfHFG7O8.js +14 -0
- package/dist/cdn/{holidays-Cu6IfbTL.js → holidays-DgmHlqJX.js} +1 -1
- package/dist/cdn/{hours-CeiVqPKD.js → hours-CmICISQO.js} +1 -1
- package/dist/cdn/inputs-DWLKbi57.js +1 -0
- package/dist/cdn/invoice-BUMyjBVi.js +10 -0
- package/dist/cdn/kashi-elements.js +1 -1
- package/dist/cdn/{legal-id-Mt8FX0fV.js → legal-id-B_0kbcQT.js} +1 -1
- package/dist/cdn/lists-D0dao20N.js +1 -0
- package/dist/cdn/{map-TfSt3CjL.js → map-BxlzfCbM.js} +1 -1
- package/dist/cdn/{media-BRBINvzU.js → media-QVgCYQSu.js} +1 -1
- package/dist/cdn/{menu-DTNVFXrb.js → menu-DcFyTTHv.js} +1 -1
- package/dist/cdn/{money-CjGI2VIQ.js → money-BFEbgLJn.js} +1 -1
- package/dist/cdn/{nav-CT5RVOzy.js → nav-Cm8mAT09.js} +1 -1
- package/dist/cdn/{overlay-CS8piW6X.js → overlay-C1nbLv6h.js} +1 -1
- package/dist/cdn/pickers-DQgK1WAX.js +1 -0
- package/dist/cdn/{relative-OC1fV3Xh.js → relative-BoBZPiB7.js} +1 -1
- package/dist/cdn/{rich-text-CS6xEim6.js → rich-text-9IAZ_T8A.js} +1 -1
- package/dist/cdn/search-BvShDz2X.js +1 -0
- package/dist/cdn/{sheets-CVbD98PY.js → sheets-CNF5lSVn.js} +1 -1
- package/dist/cdn/table-D1xiHZCM.js +2 -0
- package/dist/cdn/{text-C6fzEBBh.js → text-DFyW6cuq.js} +1 -1
- package/dist/cdn/{time-CkqqUKJv.js → time-CYZzyy_3.js} +1 -1
- package/dist/cdn/{time-CwOYrtK-.js → time-oyKIQ2bk.js} +1 -1
- package/dist/cdn/{validate-Dr2f6i6s.js → validate-CRU7rfNs.js} +1 -1
- package/dist/cdn/{work-DoNAKgVU.js → work-DS2MbtGM.js} +1 -1
- package/dist/cdn.js +5 -1
- package/dist/combobox.js +4 -4
- package/dist/commerce.js +2 -2
- package/dist/gantt.d.ts +41 -0
- package/dist/gantt.js +179 -0
- package/dist/index.d.ts +18 -3
- package/dist/index.js +8 -3
- package/dist/inputs.d.ts +16 -0
- package/dist/inputs.js +62 -2
- package/dist/invoice.d.ts +52 -0
- package/dist/invoice.js +75 -0
- package/dist/lists.d.ts +57 -0
- package/dist/lists.js +306 -0
- package/dist/manifest.json +168 -3
- package/dist/pickers.d.ts +4 -0
- package/dist/pickers.js +34 -6
- package/dist/table.d.ts +15 -1
- package/dist/table.js +184 -5
- package/package.json +4 -4
- package/dist/cdn/base-D4tCOysh.js +0 -1
- package/dist/cdn/combobox-BGuPAAt3.js +0 -1
- package/dist/cdn/commerce-SzWdpWJG.js +0 -1
- package/dist/cdn/forms-DgRiYmdV.js +0 -1
- package/dist/cdn/inputs-BkJ70Xkc.js +0 -1
- package/dist/cdn/pickers-BwDRsDRo.js +0 -1
- package/dist/cdn/table-tgB4iwcM.js +0 -1
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ setLocale("en"); // پیش از ساخته شدن عنصرها
|
|
|
37
37
|
|
|
38
38
|
## عنصرها
|
|
39
39
|
|
|
40
|
-
- **فیلدهای فارسی:** `kashi-national-id`، `kashi-legal-id`، `kashi-mobile`، `kashi-landline`، `kashi-card-number`، `kashi-iban`، `kashi-postal-code`، `kashi-price`، `kashi-sayad`، `kashi-economic-code`، `kashi-tax-id`
|
|
40
|
+
- **فیلدهای فارسی:** `kashi-national-id`، `kashi-legal-id`، `kashi-mobile`، `kashi-landline`، `kashi-card-number`، `kashi-iban`، `kashi-postal-code`، `kashi-price`، `kashi-sayad`، `kashi-economic-code`، `kashi-tax-id`، `kashi-bill-id`، `kashi-payment-id`
|
|
41
41
|
- **فیلد متنی و اطلاعیه:** `kashi-input` (پاک کردن، نمایش رمز، شمارنده)، `kashi-textarea`، `kashi-banner` (با دکمهٔ بستن)
|
|
42
42
|
- **فیلدهای دیگر:** `kashi-time-input`، `kashi-plate-input`، `kashi-persian-textarea`، `kashi-keyboard-fix`، `kashi-password-strength`، `kashi-inline-edit`
|
|
43
43
|
- **انتخاب:** `kashi-date-picker`، `kashi-calendar`، `kashi-time-picker`، `kashi-time-clock`، `kashi-date-range-picker`، `kashi-month-picker`، `kashi-appointment-picker`، `kashi-otp`، `kashi-combobox`، `kashi-multi-select`، `kashi-province-select`، `kashi-city-select`، `kashi-tag-input`، `kashi-chip-group`، `kashi-number-input`، `kashi-slider`، `kashi-rating`، `kashi-color-picker`، `kashi-file-upload`، `kashi-price-range`، `kashi-swatch-group`، `kashi-search-suggest`
|
|
@@ -49,8 +49,8 @@ setLocale("en"); // پیش از ساخته شدن عنصرها
|
|
|
49
49
|
- **دکمه و انتخاب:** `kashi-button`، `kashi-button-group`، `kashi-segmented-control`، `kashi-checkbox`، `kashi-switch`، `kashi-radio-group`، `kashi-select`
|
|
50
50
|
- **وضعیت و بازخورد:** `kashi-alert`، `kashi-badge`، `kashi-avatar`، `kashi-avatar-group`، `kashi-skeleton`، `kashi-empty-state`، `kashi-progress`، `kashi-meter`، `kashi-stepper`، `kashi-timeline`، `kashi-stat-card`، `kashi-notification-center`، `kashi-notification-list`
|
|
51
51
|
- **گفتگو و هوش مصنوعی:** `kashi-chat`، `kashi-chat-message`، `kashi-typing-indicator`، `kashi-chat-composer`، `kashi-streaming-text`، `kashi-code-block`
|
|
52
|
-
- **کار و محتوا:** `kashi-sortable`، `kashi-kanban`، `kashi-scheduler`، `kashi-gallery`، `kashi-qr-code`، `kashi-rich-text`، `kashi-form` (اعتبارسنجی با `data-rules`)
|
|
53
|
-
- **نمایشهای فارسی:** `kashi-bank-card`، `kashi-receipt`، `kashi-date-tile`، `kashi-business-hours`
|
|
52
|
+
- **کار و محتوا:** `kashi-sortable`، `kashi-kanban`، `kashi-scheduler`، `kashi-gantt`، `kashi-signature-pad`، `kashi-image-cropper`، `kashi-virtual-list`، `kashi-infinite-scroll`، `kashi-gallery`، `kashi-qr-code`، `kashi-rich-text`، `kashi-form` (اعتبارسنجی با `data-rules`)
|
|
53
|
+
- **نمایشهای فارسی:** `kashi-bank-card`، `kashi-receipt`، `kashi-date-tile`، `kashi-business-hours`، `kashi-invoice`
|
|
54
54
|
|
|
55
55
|
فایل CDN فقط بخشهایی را دانلود میکند که تگشان در صفحه هست.
|
|
56
56
|
|
package/dist/base.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export declare const msg: () => {
|
|
|
53
53
|
list: string;
|
|
54
54
|
range: string;
|
|
55
55
|
percent: (n: string) => string;
|
|
56
|
+
comma: string;
|
|
56
57
|
decimal: string;
|
|
57
58
|
};
|
|
58
59
|
money: {
|
|
@@ -182,6 +183,11 @@ export declare const msg: () => {
|
|
|
182
183
|
left: string;
|
|
183
184
|
};
|
|
184
185
|
table: {
|
|
186
|
+
pinned: string;
|
|
187
|
+
edit: (col: string, row: string) => string;
|
|
188
|
+
editHint: string;
|
|
189
|
+
saved: string;
|
|
190
|
+
exportExcel: string;
|
|
185
191
|
selectAll: string;
|
|
186
192
|
selectRow: string;
|
|
187
193
|
selectNamed: (row: string) => string;
|
|
@@ -204,6 +210,10 @@ export declare const msg: () => {
|
|
|
204
210
|
last30: (n: string) => string;
|
|
205
211
|
thisMonth: string;
|
|
206
212
|
lastMonth: string;
|
|
213
|
+
today: string;
|
|
214
|
+
thisSeason: string;
|
|
215
|
+
lastSeason: string;
|
|
216
|
+
fiscalYear: (y: string) => string;
|
|
207
217
|
};
|
|
208
218
|
monthPicker: {
|
|
209
219
|
label: string;
|
|
@@ -245,6 +255,8 @@ export declare const msg: () => {
|
|
|
245
255
|
sayad: string;
|
|
246
256
|
economicCode: string;
|
|
247
257
|
taxId: string;
|
|
258
|
+
billId: string;
|
|
259
|
+
paymentId: string;
|
|
248
260
|
mobile: string;
|
|
249
261
|
landline: string;
|
|
250
262
|
postal: string;
|
|
@@ -357,6 +369,8 @@ export declare const msg: () => {
|
|
|
357
369
|
sayad: string;
|
|
358
370
|
"economic-code": string;
|
|
359
371
|
"tax-id": string;
|
|
372
|
+
"bill-id": string;
|
|
373
|
+
"payment-id": string;
|
|
360
374
|
};
|
|
361
375
|
taxCode: {
|
|
362
376
|
person: string;
|
|
@@ -622,6 +636,102 @@ export declare const msg: () => {
|
|
|
622
636
|
noEvents: string;
|
|
623
637
|
slot: (day: string, time: string) => string;
|
|
624
638
|
};
|
|
639
|
+
bill: {
|
|
640
|
+
service: {
|
|
641
|
+
water: string;
|
|
642
|
+
electricity: string;
|
|
643
|
+
gas: string;
|
|
644
|
+
landline: string;
|
|
645
|
+
mobile: string;
|
|
646
|
+
municipality: string;
|
|
647
|
+
tax: string;
|
|
648
|
+
fine: string;
|
|
649
|
+
};
|
|
650
|
+
amount: string;
|
|
651
|
+
period: (year: string, period: string) => string;
|
|
652
|
+
needBill: string;
|
|
653
|
+
};
|
|
654
|
+
invoice: {
|
|
655
|
+
official: string;
|
|
656
|
+
proforma: string;
|
|
657
|
+
number: string;
|
|
658
|
+
date: string;
|
|
659
|
+
validUntil: string;
|
|
660
|
+
seller: string;
|
|
661
|
+
buyer: string;
|
|
662
|
+
name: string;
|
|
663
|
+
economicCode: string;
|
|
664
|
+
nationalId: string;
|
|
665
|
+
postal: string;
|
|
666
|
+
phone: string;
|
|
667
|
+
address: string;
|
|
668
|
+
taxId: string;
|
|
669
|
+
row: string;
|
|
670
|
+
description: string;
|
|
671
|
+
quantity: string;
|
|
672
|
+
unit: string;
|
|
673
|
+
unitPrice: string;
|
|
674
|
+
discount: string;
|
|
675
|
+
lineTotal: string;
|
|
676
|
+
subtotal: string;
|
|
677
|
+
totalDiscount: string;
|
|
678
|
+
vat: (rate: string) => string;
|
|
679
|
+
payable: string;
|
|
680
|
+
inWords: (words: string, unit: string) => string;
|
|
681
|
+
rial: string;
|
|
682
|
+
toman: string;
|
|
683
|
+
notes: string;
|
|
684
|
+
sellerSign: string;
|
|
685
|
+
buyerSign: string;
|
|
686
|
+
print: string;
|
|
687
|
+
};
|
|
688
|
+
signature: {
|
|
689
|
+
label: string;
|
|
690
|
+
clear: string;
|
|
691
|
+
undo: string;
|
|
692
|
+
draw: string;
|
|
693
|
+
type: string;
|
|
694
|
+
hint: string;
|
|
695
|
+
typedLabel: string;
|
|
696
|
+
empty: string;
|
|
697
|
+
signed: string;
|
|
698
|
+
cleared: string;
|
|
699
|
+
area: string;
|
|
700
|
+
};
|
|
701
|
+
cropper: {
|
|
702
|
+
label: string;
|
|
703
|
+
zoom: string;
|
|
704
|
+
rotate: string;
|
|
705
|
+
reset: string;
|
|
706
|
+
apply: string;
|
|
707
|
+
area: string;
|
|
708
|
+
moved: (x: string, y: string) => string;
|
|
709
|
+
zoomed: (z: string) => string;
|
|
710
|
+
};
|
|
711
|
+
gantt: {
|
|
712
|
+
label: string;
|
|
713
|
+
task: string;
|
|
714
|
+
start: string;
|
|
715
|
+
end: string;
|
|
716
|
+
today: string;
|
|
717
|
+
days: (n: string) => string;
|
|
718
|
+
progress: (p: string) => string;
|
|
719
|
+
bar: (name: string, from: string, to: string, p: string) => string;
|
|
720
|
+
moved: (name: string, from: string, to: string) => string;
|
|
721
|
+
dependsOn: (name: string) => string;
|
|
722
|
+
hint: string;
|
|
723
|
+
};
|
|
724
|
+
infinite: {
|
|
725
|
+
loading: string;
|
|
726
|
+
end: string;
|
|
727
|
+
error: string;
|
|
728
|
+
retry: string;
|
|
729
|
+
loadMore: string;
|
|
730
|
+
loaded: (n: string) => string;
|
|
731
|
+
};
|
|
732
|
+
virtualList: {
|
|
733
|
+
label: (n: string) => string;
|
|
734
|
+
};
|
|
625
735
|
};
|
|
626
736
|
/** زبان فعلی */
|
|
627
737
|
export declare const lang: () => KashiLocale;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { HTMLBase } from "./base.js";
|
|
2
|
+
/**
|
|
3
|
+
* کادر امضا: خطهای نرم با پهنای وابسته به فشار و سرعت، برگرداندن آخرین خط، پاک کردن و حالت «تایپ امضا».
|
|
4
|
+
* ویژگیها: label، hint، error، name (data URL در فرم)، required، disabled، allow-typed (پیشفرض true)، pen-width، export-color.
|
|
5
|
+
* رویداد kashi-change با { value } (data URL یا null). متدها: clear()، undo()، toDataURL()، isEmpty().
|
|
6
|
+
*/
|
|
7
|
+
export declare class KashiSignaturePad extends HTMLBase {
|
|
8
|
+
static observedAttributes: string[];
|
|
9
|
+
private strokes;
|
|
10
|
+
private current;
|
|
11
|
+
private mode;
|
|
12
|
+
private typed;
|
|
13
|
+
private key;
|
|
14
|
+
private canvas;
|
|
15
|
+
private ro;
|
|
16
|
+
private built;
|
|
17
|
+
connectedCallback(): void;
|
|
18
|
+
disconnectedCallback(): void;
|
|
19
|
+
attributeChangedCallback(_n: string, old: string | null, next: string | null): void;
|
|
20
|
+
private get locked();
|
|
21
|
+
private get penWidth();
|
|
22
|
+
private build;
|
|
23
|
+
private wireCanvas;
|
|
24
|
+
private paint;
|
|
25
|
+
private redraw;
|
|
26
|
+
/** آیا امضا خالی است */
|
|
27
|
+
isEmpty(): boolean;
|
|
28
|
+
/** تصویر PNG امضا با پسزمینهٔ شفاف و جوهر export-color */
|
|
29
|
+
toDataURL(type?: string): string | null;
|
|
30
|
+
undo(): void;
|
|
31
|
+
clear(): void;
|
|
32
|
+
private paintState;
|
|
33
|
+
private commit;
|
|
34
|
+
}
|
|
35
|
+
export interface CropAreaDetail {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* برش تصویر: تصویر زیر کادر ثابت جابهجا و بزرگ میشود و همیشه کادر را پر نگه میدارد.
|
|
43
|
+
* ویژگیها: src، alt، aspect (مثل 1 یا 16/9)، shape="circle"، max-zoom، rotatable (پیشفرض true)، label.
|
|
44
|
+
* رویداد kashi-change با { area, zoom, rotation } (ناحیه به پیکسل تصویر). متد crop({ width, type }) ← Promise<Blob>.
|
|
45
|
+
*/
|
|
46
|
+
export declare class KashiImageCropper extends HTMLBase {
|
|
47
|
+
static observedAttributes: string[];
|
|
48
|
+
private s;
|
|
49
|
+
private nat;
|
|
50
|
+
private stage;
|
|
51
|
+
private img;
|
|
52
|
+
private ro;
|
|
53
|
+
private pointers;
|
|
54
|
+
private drag;
|
|
55
|
+
private pinch;
|
|
56
|
+
connectedCallback(): void;
|
|
57
|
+
disconnectedCallback(): void;
|
|
58
|
+
attributeChangedCallback(n: string, old: string | null, next: string | null): void;
|
|
59
|
+
private get aspect();
|
|
60
|
+
private get maxZoom();
|
|
61
|
+
private build;
|
|
62
|
+
private say;
|
|
63
|
+
private zoomBy;
|
|
64
|
+
private geom;
|
|
65
|
+
/** ناحیهٔ برش فعلی به پیکسل تصویر (بعد از چرخش) */
|
|
66
|
+
get area(): CropAreaDetail;
|
|
67
|
+
private move;
|
|
68
|
+
private layout;
|
|
69
|
+
/** تصویر بریدهشده (پیشفرض WebP) */
|
|
70
|
+
crop({ width, type, quality }?: {
|
|
71
|
+
width?: number;
|
|
72
|
+
type?: string;
|
|
73
|
+
quality?: number;
|
|
74
|
+
}): Promise<Blob | null>;
|
|
75
|
+
}
|