@medyat/vue-data-table 0.0.0-stage → 1.0.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/CHANGELOG.md ADDED
@@ -0,0 +1,32 @@
1
+ # Sürüm notları
2
+
3
+ ## 1.0.0 — 2026-10-28
4
+
5
+ İlk sürüm: Faz 0–7 (`docs/data-table/10-roadmap.md`).
6
+
7
+ ### DataTable
8
+
9
+ - 23 hücre tipi, sanal satırlar, sabit sütunlar, sütun menüsü (sırala, filtrele, sabitle, sığdır, taşı, gizle), yoğunluk ve dikey çizgiler (tercih adapter'ı).
10
+ - Sunucu ve istemci modu; `@request` / `@count`; durumlar (ilk yükleme, sorgu değişimi, yenileme, hata, stale, boş).
11
+ - Filtre çipleri (operatör + tipe göre editör, hazır tarih aralıkları), toolbar araması, sistem ve kişisel görünümler (`viewsAdapter`), Display.
12
+ - Seçim (sayfa kapsamlı), bulk bar, satır menüsü, satır detayı (expand), `row-click` / `row-open`.
13
+ - Sütun açıklaması (`description`: header tooltip'inde ikinci satır, Columns panelinde alt satır, `aria-describedby`). Satır aksiyonunda `when(row)` menüden gizler, `disabled(row)` gerekçesiyle pasifleştirir; `RowAction.inline` ⋯'nın solunda en fazla 2 ikon düğmesi; `RowAction` / `BulkAction.description` menüde ikinci satır, `BulkAction.when(rows)`. Uygulamanın satır hatası `rowError(row)` ile: kırmızı zemin, ⋯ hücresinde uyarı ikonu, satır tooltip'i.
14
+ - Telefon düzeni (kart < 640 px): birincil sütun sola sabit, 48 px satır ve seçim sütunu, 44 px dokunma hedefleri, sağ kenar solması; toolbar (görünüm · arama modu · Filter sayaçlı · ⋯); çip satırı tek düğme; alt sayfalar — Filters (taslak + Show results, değer editörü ve sütun seçici alt seviyeler, Sort), görünümler, ⋯ (Density/Columns/Sort/Export/…), bulk bar More; footer yalnızca Önceki / Sonraki.
15
+
16
+ ### DataSheet (`@medyat/vue-data-table/sheet`)
17
+
18
+ - Hücre odaklı klavye, yerinde editörler (metin, sayı/para, seçenek combobox, tarih), doğrulama (tip → required → validate → warn, çapraz kural), formül çubuğu, status bar.
19
+ - Pano (TSV + HTML, yerel ayar çıkarımı), fill handle ve ⌘D, 100 adımlık geri al/yinele, Find in grid, seçim özeti.
20
+ - Satır partisi (Add row / Insert / Remove from list), `lookupKeys` ile New / Update, anahtar tekilliği, yerel sıralama, All / Changed / Errors.
21
+ - `optionEnabled(option, row)` ile satıra göre seçenek kapatma: kapalı seçenek editörde gizlenir, yapıştırma veya doldurmayla gelirse yalnızca değişen hücrede hata verir.
22
+ - Kayıt akışı: hata dialog'u, `@save`, `saving` ilerlemesi, `applyResult`, Partly saved şeridi, Copy errors, ayrılma koruması.
23
+ - Excel/CSV içe aktarma (`parseFile`; başlık satırı tespiti, otomatik eşleme, önizleme, yeni anahtarlar; `parseFile` hata fırlatırsa sebep dialog'da görünür), Export olayı, telefonda salt okunur.
24
+
25
+ ### Erişilebilirlik
26
+
27
+ - ARIA ızgara rolleri, iki roving tabindex modeli, `aria-live` duyuruları, hata balonları `aria-describedby`, `forced-colors` ve `prefers-reduced-motion`, axe-core taraması (WCAG 2.1 AA, kritik/ciddi ihlal yok).
28
+
29
+ ### Bilinen sınırlar
30
+
31
+ - Telefonda satır ⋯ menüsü ve sütun başlığı menüsü alt sayfa değil, açılır menü olarak kalır; Filters alt sayfasındaki Sort tek kuraldır (ikincil kurallar Show results'ta düşer); kişi listesindeki Me satırında gerçek ad gösterilmez. NVDA/VoiceOver turu elle yapılmadı.
32
+ - Sheet'te `ajax`/`user` hücreleri yalnızca özel editörle düzenlenir, `multiselect` yerleşik editörle (T11); `Alt↓` seçici açma yok. `tags` sütun tipi yoktur (D37); sabit seçenekli çoklu değer `multiselect`'tir.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Medyat
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,180 @@
1
- # Temporary Holding Version
1
+ # @medyat/vue-data-table
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Vue 3 için `DataTable` (liste) ve `DataSheet` (toplu düzenleme): ortak çekirdek, iki bileşen, iki giriş noktası. Paket veri çekmez ve kaydetmez (D18): olay yayar (`@request`, `@count`, `@save`, `@export`), uygulama HTTP'yi yapar ve sonucu geri verir.
4
+
5
+ Spesifikasyon `docs/data-table/` (karar günlüğü `README.md`, bileşenler `05`/`07`, tipler `03`, filtreler/görünümler `04`, erişilebilirlik `08`, i18n `09`), tasarım teslimi `docs/handoff/`, çalışma kuralları `CLAUDE.md`.
6
+
7
+ ## Kurulum
8
+
9
+ ```bash
10
+ pnpm add @medyat/vue-data-table reka-ui vue
11
+ ```
12
+
13
+ ```ts
14
+ // main.ts
15
+ import { createDataTable, createLocalStoragePreferences, createLocalStorageViews } from '@medyat/vue-data-table'
16
+ import '@medyat/vue-data-table/style.css'
17
+
18
+ app.use(
19
+ createDataTable({
20
+ locale: 'tr',
21
+ viewsAdapter: createLocalStorageViews({ scope: 'myapp' }), // kişisel görünümler; kendi adapter'ınızı da verebilirsiniz
22
+ preferences: createLocalStoragePreferences({ scope: 'myapp' }), // yoğunluk, çizgiler, sayfa boyutu
23
+ }),
24
+ )
25
+ ```
26
+
27
+ shadcn-vue temasını devralmak için ek olarak `@medyat/vue-data-table/shadcn-bridge.css` (veya HSL tabanlı tema için `shadcn-bridge-hsl.css`) yüklenir.
28
+
29
+ ## DataTable (liste)
30
+
31
+ Sütun tanımları feature'ın kendi dosyasında yaşar (D21); hücre özelleştirmesi `cell` fonksiyonuyla, slot yok.
32
+
33
+ ```vue
34
+ <script setup lang="ts">
35
+ import { DataTable, type ColumnDef, type TableRequest } from '@medyat/vue-data-table'
36
+
37
+ const columns: Array<ColumnDef<Order>> = [
38
+ { id: 'number', header: 'Order no.', type: 'id', primary: true, pinned: 'left', href: (r) => `/orders/${r.id}` },
39
+ { id: 'customer', header: 'Customer', type: 'string' },
40
+ { id: 'status', header: 'Status', type: 'select', options: statusOptions },
41
+ { id: 'dueAt', header: 'Due date', type: 'date', overdue: true },
42
+ { id: 'value', header: 'Value', type: 'currency', currency: 'TRY' },
43
+ ]
44
+ const rows = ref<Order[]>([])
45
+ const hasMore = ref(false)
46
+
47
+ // Sunucu modu: her talep (sayfa, sıralama, arama, filtreler) buradan geçer; paket yeniden denemez, önbelleklemez.
48
+ async function onRequest({ query, signal }: TableRequest) {
49
+ const { data } = await axios.get('/api/orders', { params: toLaravelParams(query), signal })
50
+ rows.value = data.data
51
+ hasMore.value = data.next_page_url !== null
52
+ }
53
+ </script>
54
+
55
+ <template>
56
+ <DataTable
57
+ table-id="orders"
58
+ mode="server"
59
+ :columns="columns"
60
+ :rows="rows"
61
+ :has-more="hasMore"
62
+ :entity-name="{ one: 'order', other: 'orders' }"
63
+ selectable
64
+ :bulk-actions="bulkActions"
65
+ :row-actions="rowActions"
66
+ expand
67
+ @request="onRequest"
68
+ @row-open="onRowOpen"
69
+ >
70
+ <template #expanded="{ row }"><OrderOperations :order="row" /></template>
71
+ </DataTable>
72
+ </template>
73
+ ```
74
+
75
+ ### `row-open` tarifleri
76
+
77
+ Birincil hücre gerçek bir `<a href>`'tir (D6): ⌘/orta tık tarayıcıya kalır, düz tık `row-open` yayar. Dinleyici `preventDefault` yapmazsa tarayıcı gider.
78
+
79
+ ```ts
80
+ // Vue Router
81
+ const router = useRouter()
82
+ const onRowOpen = ({ href, event }: { row: Order; href: string; event: MouseEvent }) => {
83
+ event.preventDefault()
84
+ router.push(href)
85
+ }
86
+
87
+ // Inertia
88
+ import { router } from '@inertiajs/vue3'
89
+ const onRowOpen = ({ href, event }) => {
90
+ event.preventDefault()
91
+ router.visit(href)
92
+ }
93
+ ```
94
+
95
+ ### Laravel talebi
96
+
97
+ `TableRequest.query` → `page`, `size`, `sort` (`[{ column, dir }]`), `search`, `filters` (`FilterCondition[]`, JSON), `fields`. Sunucu `simplePaginate` ile `{ data, next_page_url }` döner; `@count` ayrı bir `count` ucu çağırır (`{ total }`). Playground'daki `playground/server/mock-api.ts` aynı sözleşmeyi uygular.
98
+
99
+ ## DataSheet (toplu düzenleme)
100
+
101
+ Ayrı giriş noktası: `@medyat/vue-data-table/sheet`. Sütunlar varsayılan salt okunurdur; `editable`, `required`, `validate`, `warn`, `hint`, `importAliases` ile açılır. Değişiklikler taslakta birikir, tek **Save** yeni + değişen satırları `@save` ile teslim eder; uygulama anahtara göre upsert yapar ve `applyResult()` ile sonucu bildirir (D11). Asla silmez (D12).
102
+
103
+ ```vue
104
+ <script setup lang="ts">
105
+ import { DataSheet, type DataSheetHandle, type SheetChanges } from '@medyat/vue-data-table/sheet'
106
+
107
+ const sheet = useTemplateRef<DataSheetHandle>('sheet')
108
+ const saving = ref<boolean | { done: number; total: number }>(false)
109
+
110
+ // 07 §16: 500'lük parçalar sırayla; zaman aşımı, yeniden deneme ve Stop uygulamanındır.
111
+ async function onSave({ rows }: SheetChanges) {
112
+ saving.value = { done: 0, total: rows.length }
113
+ for (const chunk of chunksOf(rows, 500)) {
114
+ const { data } = await axios.post('/api/products/bulk-upsert', {
115
+ key: 'sku',
116
+ rows: chunk.map((r) => ({ client_id: r.clientId, key: r.key, op: r.op, values: r.values })),
117
+ })
118
+ sheet.value!.applyResult(
119
+ data.results.map((r) => ({
120
+ clientId: r.client_id,
121
+ status: r.status,
122
+ fieldErrors: r.field_errors,
123
+ rowError: r.row_error,
124
+ row: r.row,
125
+ })),
126
+ )
127
+ saving.value = { done: saving.value.done + chunk.length, total: rows.length }
128
+ }
129
+ saving.value = false
130
+ }
131
+ </script>
132
+
133
+ <template>
134
+ <DataSheet
135
+ ref="sheet"
136
+ table-id="products"
137
+ key-column="sku"
138
+ :columns="columns"
139
+ :rows="rows"
140
+ :loading="loading"
141
+ :saving="saving"
142
+ :lookup-keys="(keys) => axios.post('/api/products/lookup-keys', { keys }).then((r) => r.data)"
143
+ :new-row-defaults="() => ({ unit: 'pcs', vat: 20, active: true })"
144
+ :parse-file="parseWithExceljs"
145
+ @save="onSave"
146
+ @export="writeFile"
147
+ />
148
+ </template>
149
+ ```
150
+
151
+ Dosya okuma ve yazma uygulamanındır (D18): `parseFile` dosyayı ham satırlara çevirir (başlık tespiti ve eşleme paketindedir), `@export` yalnızca satır ve sütunları verir. Hazır tarif: `playground/src/pages/T11Sheet.vue` — exceljs ile `.xlsx` okuma (formül, zengin metin ve köprü düz değere iner) ve `.xlsx` / `;` ayrılmış BOM'lu `.csv` yazıp indirme.
152
+
153
+ Sunucu notları (07 §16): her satırı bağımsız işleyin (satır başına doğrulama ve savepoint), eşleme anahtara göre (`op` ipucudur), `update` satırlarında yalnızca gelen alanları güncelleyin, benzersizlik çakışmaları alan hatası olarak dönsün (500 değil), istek başına en fazla 500 satır.
154
+
155
+ Ayrılma koruması: paket `beforeunload` uyarısını kendisi verir; yönlendirici koruması için `sheet.value.isDirty()`.
156
+
157
+ ## Erişilebilirlik ve klavye
158
+
159
+ İki roving tabindex modeli: listede satır odaklıdır (oklar satırlar arası, `→` satırın widget'larına), sheet'te hücre odaklıdır (Excel kısayolları: `F2`, `↵`, `Tab`, `⌘C/X/V`, `⌘D`, `⌘Z`, `F8`, `⇧F10`). Tam liste `docs/data-table/08-accessibility-keyboard.md`. Duyurular tek `aria-live` bölgesinden; `forced-colors` ve `prefers-reduced-motion` desteklenir; Playwright'ta axe-core taraması (`e2e/a11y.spec.ts`).
160
+
161
+ ## Geliştirme
162
+
163
+ Node 22+ ve pnpm (corepack ile): `corepack enable` bir kez, sonra `pnpm install`.
164
+
165
+ | Komut | Ne yapar |
166
+ | ----------------------------------- | --------------------------------------------------------------------------------------------------- |
167
+ | `pnpm dev` | Playground (`playground/`, http://localhost:5174); sahte API `/api/orders`, `/api/products` |
168
+ | `pnpm test` | Vitest: token ↔ 02, kontrast, i18n ↔ 09, ESLint sınırları, bileşenler, depo, pano, içe aktarma |
169
+ | `pnpm test:e2e` | Playwright (playground'a karşı; axe taraması dahil) |
170
+ | `pnpm typecheck` · `pnpm lint` | vue-tsc, ESLint (import sınırları dahil) |
171
+ | `pnpm format` · `pnpm format:check` | Prettier (biçim yalnızca Prettier'ın; ESLint biçim kuralı taşımaz) |
172
+ | `pnpm build` | `dist/`: `index.js`, `sheet.js`, `style.css`, köprü CSS'leri, `.d.ts` |
173
+ | `pnpm gen:docs` | 02 → `src/styles/tokens.css`, 09 → `src/core/i18n/{en,tr}.ts` (üretilmiş dosyalar elle düzenlenmez) |
174
+ | `pnpm check` | gen:docs + typecheck + lint + format:check + test |
175
+
176
+ Token ve metin değişikliği dokümanda yapılır, sonra `pnpm gen:docs`; testler dokümanla kodun ayrışmasını yakalar. Sürüm notları `CHANGELOG.md`.
177
+
178
+ ## Lisans
179
+
180
+ MIT · © 2026 Medyat
@@ -0,0 +1,224 @@
1
+ import { i as e } from "./plugin-DhgcjEdi.js";
2
+ import { Fragment as t, computed as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, openBlock as d, ref as f, renderList as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
3
+ import { PhCaretLeft as _, PhCaretRight as v, PhCheck as y } from "@phosphor-icons/vue";
4
+ import { CalendarCell as ee, CalendarCellTrigger as te, CalendarGrid as ne, CalendarGridBody as re, CalendarGridHead as ie, CalendarGridRow as b, CalendarHeadCell as x, CalendarHeader as S, CalendarHeading as ae, CalendarNext as C, CalendarPrev as oe, CalendarRoot as se, RangeCalendarCell as ce, RangeCalendarCellTrigger as le, RangeCalendarGrid as ue, RangeCalendarGridBody as de, RangeCalendarGridHead as w, RangeCalendarGridRow as T, RangeCalendarHeadCell as E, RangeCalendarHeader as D, RangeCalendarHeading as O, RangeCalendarNext as k, RangeCalendarPrev as A, RangeCalendarRoot as j } from "reka-ui";
5
+ import { getDayOfWeek as M, getLocalTimeZone as N, parseDate as P, startOfWeek as F, today as I } from "@internationalized/date";
6
+ //#region src/core/editors/DateEditor.vue?vue&type=script&setup=true&lang.ts
7
+ var L = { class: "dt-editor-date" }, R = { class: "dt-date-presets" }, z = ["onClick"], B = /* @__PURE__ */ l({
8
+ __name: "DateEditor",
9
+ props: {
10
+ op: {},
11
+ modelValue: {}
12
+ },
13
+ emits: ["update:modelValue", "done"],
14
+ setup(l, { emit: B }) {
15
+ let V = l, H = B, { i18n: U, locale: W } = e(), fe = [
16
+ "today",
17
+ "this_week",
18
+ "next_7_days",
19
+ "this_month",
20
+ "last_30_days",
21
+ "this_quarter",
22
+ "overdue"
23
+ ], pe = N(), G = I(pe), K = M(F(G, W), "en-US"), q = n(() => V.op === "within"), J = (e) => e && typeof e == "object" ? e : null, Y = n(() => J(V.modelValue)?.preset), X = f(!1), Z = (e) => {
24
+ try {
25
+ return typeof e == "string" && e ? P(e.slice(0, 10)) : void 0;
26
+ } catch {
27
+ return;
28
+ }
29
+ }, Q = n(() => {
30
+ let e = J(V.modelValue);
31
+ return {
32
+ start: Z(e?.from),
33
+ end: Z(e?.to)
34
+ };
35
+ }), $ = n(() => Z(V.modelValue)), me = (e) => {
36
+ X.value = !1, H("update:modelValue", { preset: e }), H("done");
37
+ }, he = (e) => {
38
+ e?.start && e.end && (H("update:modelValue", {
39
+ from: e.start.toString(),
40
+ to: e.end.toString()
41
+ }), H("done"));
42
+ }, ge = (e) => {
43
+ e && (H("update:modelValue", e.toString()), H("done"));
44
+ }, _e = () => {
45
+ H("update:modelValue", { preset: "today" }), H("done");
46
+ };
47
+ return (e, n) => (d(), a("div", L, [o("div", R, [q.value ? (d(), a(t, { key: 0 }, [
48
+ (d(), a(t, null, p(fe, (e) => o("button", {
49
+ key: e,
50
+ type: "button",
51
+ class: u(["dt-pop-item dt-date-preset", { "is-on": Y.value === e }]),
52
+ onClick: (t) => me(e)
53
+ }, [s(m(h(U).t(`date.${e}`)) + " ", 1), Y.value === e ? (d(), r(h(y), {
54
+ key: 0,
55
+ size: 14,
56
+ class: "dt-pop-end",
57
+ "aria-hidden": "true"
58
+ })) : i("", !0)], 10, z)), 64)),
59
+ n[2] ||= o("div", { class: "dt-pop-sep" }, null, -1),
60
+ o("button", {
61
+ type: "button",
62
+ class: u(["dt-pop-item dt-date-preset", { "is-on": X.value || !Y.value && Q.value.start }]),
63
+ onClick: n[0] ||= (e) => X.value = !0
64
+ }, m(h(U).t("date.customRange")), 3)
65
+ ], 64)) : (d(), a("button", {
66
+ key: 1,
67
+ type: "button",
68
+ class: u(["dt-pop-item dt-date-preset", { "is-on": Y.value === "today" }]),
69
+ onClick: _e
70
+ }, [s(m(h(U).t("date.today")) + " ", 1), Y.value === "today" ? (d(), r(h(y), {
71
+ key: 0,
72
+ size: 14,
73
+ class: "dt-pop-end",
74
+ "aria-hidden": "true"
75
+ })) : i("", !0)], 2))]), q.value ? (d(), r(h(j), {
76
+ key: 0,
77
+ class: "dt-calendar",
78
+ "model-value": Q.value.start && Q.value.end ? {
79
+ start: Q.value.start,
80
+ end: Q.value.end
81
+ } : void 0,
82
+ locale: h(W),
83
+ "week-starts-on": h(K),
84
+ placeholder: Q.value.start ?? h(G),
85
+ "onUpdate:modelValue": he
86
+ }, {
87
+ default: g(({ weekDays: e, grid: n }) => [c(h(D), { class: "dt-cal-head" }, {
88
+ default: g(() => [
89
+ c(h(A), { class: "dt-icon-btn-sm" }, {
90
+ default: g(() => [c(h(_), {
91
+ size: 16,
92
+ "aria-hidden": "true"
93
+ })]),
94
+ _: 1
95
+ }),
96
+ c(h(O), { class: "dt-cal-title" }),
97
+ c(h(k), { class: "dt-icon-btn-sm" }, {
98
+ default: g(() => [c(h(v), {
99
+ size: 16,
100
+ "aria-hidden": "true"
101
+ })]),
102
+ _: 1
103
+ })
104
+ ]),
105
+ _: 1
106
+ }), (d(!0), a(t, null, p(n, (n) => (d(), r(h(ue), {
107
+ key: n.value.toString(),
108
+ class: "dt-cal-grid"
109
+ }, {
110
+ default: g(() => [c(h(w), null, {
111
+ default: g(() => [c(h(T), null, {
112
+ default: g(() => [(d(!0), a(t, null, p(e, (e) => (d(), r(h(E), {
113
+ key: e,
114
+ class: "dt-cal-dow"
115
+ }, {
116
+ default: g(() => [s(m(e), 1)]),
117
+ _: 2
118
+ }, 1024))), 128))]),
119
+ _: 2
120
+ }, 1024)]),
121
+ _: 2
122
+ }, 1024), c(h(de), null, {
123
+ default: g(() => [(d(!0), a(t, null, p(n.rows, (e, i) => (d(), r(h(T), { key: i }, {
124
+ default: g(() => [(d(!0), a(t, null, p(e, (e) => (d(), r(h(ce), {
125
+ key: e.toString(),
126
+ date: e,
127
+ class: "dt-cal-cell"
128
+ }, {
129
+ default: g(() => [c(h(le), {
130
+ day: e,
131
+ month: n.value,
132
+ class: "dt-cal-day"
133
+ }, null, 8, ["day", "month"])]),
134
+ _: 2
135
+ }, 1032, ["date"]))), 128))]),
136
+ _: 2
137
+ }, 1024))), 128))]),
138
+ _: 2
139
+ }, 1024)]),
140
+ _: 2
141
+ }, 1024))), 128))]),
142
+ _: 1
143
+ }, 8, [
144
+ "model-value",
145
+ "locale",
146
+ "week-starts-on",
147
+ "placeholder"
148
+ ])) : (d(), r(h(se), {
149
+ key: 1,
150
+ class: "dt-calendar",
151
+ "model-value": $.value,
152
+ locale: h(W),
153
+ "week-starts-on": h(K),
154
+ placeholder: $.value ?? h(G),
155
+ "onUpdate:modelValue": n[1] ||= (e) => ge(e)
156
+ }, {
157
+ default: g(({ weekDays: e, grid: n }) => [c(h(S), { class: "dt-cal-head" }, {
158
+ default: g(() => [
159
+ c(h(oe), { class: "dt-icon-btn-sm" }, {
160
+ default: g(() => [c(h(_), {
161
+ size: 16,
162
+ "aria-hidden": "true"
163
+ })]),
164
+ _: 1
165
+ }),
166
+ c(h(ae), { class: "dt-cal-title" }),
167
+ c(h(C), { class: "dt-icon-btn-sm" }, {
168
+ default: g(() => [c(h(v), {
169
+ size: 16,
170
+ "aria-hidden": "true"
171
+ })]),
172
+ _: 1
173
+ })
174
+ ]),
175
+ _: 1
176
+ }), (d(!0), a(t, null, p(n, (n) => (d(), r(h(ne), {
177
+ key: n.value.toString(),
178
+ class: "dt-cal-grid"
179
+ }, {
180
+ default: g(() => [c(h(ie), null, {
181
+ default: g(() => [c(h(b), null, {
182
+ default: g(() => [(d(!0), a(t, null, p(e, (e) => (d(), r(h(x), {
183
+ key: e,
184
+ class: "dt-cal-dow"
185
+ }, {
186
+ default: g(() => [s(m(e), 1)]),
187
+ _: 2
188
+ }, 1024))), 128))]),
189
+ _: 2
190
+ }, 1024)]),
191
+ _: 2
192
+ }, 1024), c(h(re), null, {
193
+ default: g(() => [(d(!0), a(t, null, p(n.rows, (e, i) => (d(), r(h(b), { key: i }, {
194
+ default: g(() => [(d(!0), a(t, null, p(e, (e) => (d(), r(h(ee), {
195
+ key: e.toString(),
196
+ date: e,
197
+ class: "dt-cal-cell"
198
+ }, {
199
+ default: g(() => [c(h(te), {
200
+ day: e,
201
+ month: n.value,
202
+ class: "dt-cal-day"
203
+ }, null, 8, ["day", "month"])]),
204
+ _: 2
205
+ }, 1032, ["date"]))), 128))]),
206
+ _: 2
207
+ }, 1024))), 128))]),
208
+ _: 2
209
+ }, 1024)]),
210
+ _: 2
211
+ }, 1024))), 128))]),
212
+ _: 1
213
+ }, 8, [
214
+ "model-value",
215
+ "locale",
216
+ "week-starts-on",
217
+ "placeholder"
218
+ ]))]));
219
+ }
220
+ });
221
+ //#endregion
222
+ export { B as default };
223
+
224
+ //# sourceMappingURL=DateEditor-BTIZMwf1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateEditor-BTIZMwf1.js","names":["_openBlock","_createElementBlock","_createElementVNode","_Fragment","_renderList","_normalizeClass","_createTextVNode","_toDisplayString","_unref","_createBlock","_createCommentVNode","_withCtx","_createVNode","_sfc_main","useDataTableContext","_hoisted_1","_hoisted_2","_hoisted_3","DateEditor_default","defineComponent","__emit","props","__props","emit","PRESETS","tz","getLocalTimeZone","now","today","weekStartsOn","getDayOfWeek","startOfWeek","locale","isRange","computed","obj","v","preset","custom","ref","safe","s","parseDate","rangeValue","o","single","pickPreset","p","onRange","r","onSingle","d","pickToday","openBlock","createElementBlock","createElementVNode","Fragment","renderList","normalizeClass","createTextVNode","toDisplayString","unref","i18n","createBlock","PhCheck","createCommentVNode","_cache","RangeCalendarRoot","withCtx","createVNode","RangeCalendarHeader","RangeCalendarPrev","PhCaretLeft","RangeCalendarHeading","RangeCalendarNext","PhCaretRight","grid","RangeCalendarGrid","month","RangeCalendarGridHead","RangeCalendarGridRow","weekDays","RangeCalendarHeadCell","day","RangeCalendarGridBody","week","RangeCalendarCell","RangeCalendarCellTrigger","CalendarRoot","CalendarHeader","CalendarPrev","CalendarHeading","CalendarNext","CalendarGrid","CalendarGridHead","CalendarGridRow","CalendarHeadCell","CalendarGridBody","CalendarCell","CalendarCellTrigger"],"sources":["../src/core/editors/DateEditor.vue","../src/core/editors/DateEditor.vue"],"sourcesContent":["<script setup lang=\"ts\">\n// Tarih editörü (04 §3, T2-04): `within` → solda hazır aralıklar + Custom range, sağda aralık takvimi; `eq/before/after` →\n// Today + tek takvim. Hazır aralık tıklanınca uygulanır ve kapanır; özel aralıkta ikinci uç seçilince. Hafta başı yerel ayardan.\nimport { getDayOfWeek, getLocalTimeZone, parseDate, startOfWeek, today, type DateValue } from '@internationalized/date'\nimport { PhCaretLeft, PhCaretRight, PhCheck } from '@phosphor-icons/vue'\nimport {\n CalendarCell,\n CalendarCellTrigger,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHead,\n CalendarGridRow,\n CalendarHeadCell,\n CalendarHeader,\n CalendarHeading,\n CalendarNext,\n CalendarPrev,\n CalendarRoot,\n RangeCalendarCell,\n RangeCalendarCellTrigger,\n RangeCalendarGrid,\n RangeCalendarGridBody,\n RangeCalendarGridHead,\n RangeCalendarGridRow,\n RangeCalendarHeadCell,\n RangeCalendarHeader,\n RangeCalendarHeading,\n RangeCalendarNext,\n RangeCalendarPrev,\n RangeCalendarRoot,\n} from 'reka-ui'\nimport { computed, ref } from 'vue'\nimport type { DatePreset, FilterOp } from '../../types/query'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{ op: FilterOp; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: unknown]; done: [] }>()\nconst { i18n, locale } = useDataTableContext()\n\nconst PRESETS: DatePreset[] = [\n 'today',\n 'this_week',\n 'next_7_days',\n 'this_month',\n 'last_30_days',\n 'this_quarter',\n 'overdue',\n]\nconst tz = getLocalTimeZone()\nconst now = today(tz)\nconst weekStartsOn = getDayOfWeek(startOfWeek(now, locale), 'en-US') as 0 | 1 | 2 | 3 | 4 | 5 | 6\nconst isRange = computed(() => props.op === 'within')\nconst obj = (v: unknown): Record<string, unknown> | null =>\n v && typeof v === 'object' ? (v as Record<string, unknown>) : null\nconst preset = computed(() => obj(props.modelValue)?.preset as string | undefined)\nconst custom = ref(false)\n\nconst safe = (s: unknown): DateValue | undefined => {\n try {\n return typeof s === 'string' && s ? parseDate(s.slice(0, 10)) : undefined\n } catch {\n return undefined\n }\n}\nconst rangeValue = computed(() => {\n const o = obj(props.modelValue)\n return { start: safe(o?.from), end: safe(o?.to) }\n})\nconst single = computed(() => safe(props.modelValue))\n\nconst pickPreset = (p: DatePreset) => {\n custom.value = false\n emit('update:modelValue', { preset: p })\n emit('done')\n}\nconst onRange = (r: { start: DateValue | undefined; end: DateValue | undefined } | null) => {\n if (!r?.start || !r.end) return\n emit('update:modelValue', { from: r.start.toString(), to: r.end.toString() })\n emit('done')\n}\nconst onSingle = (d: DateValue | undefined) => {\n if (!d) return\n emit('update:modelValue', d.toString())\n emit('done')\n}\nconst pickToday = () => {\n emit('update:modelValue', { preset: 'today' })\n emit('done')\n}\n</script>\n\n<template>\n <div class=\"dt-editor-date\">\n <div class=\"dt-date-presets\">\n <template v-if=\"isRange\">\n <button\n v-for=\"p in PRESETS\"\n :key=\"p\"\n type=\"button\"\n class=\"dt-pop-item dt-date-preset\"\n :class=\"{ 'is-on': preset === p }\"\n @click=\"pickPreset(p)\"\n >\n {{ i18n.t(`date.${p}`) }}\n <PhCheck v-if=\"preset === p\" :size=\"14\" class=\"dt-pop-end\" aria-hidden=\"true\" />\n </button>\n <div class=\"dt-pop-sep\" />\n <button\n type=\"button\"\n class=\"dt-pop-item dt-date-preset\"\n :class=\"{ 'is-on': custom || (!preset && rangeValue.start) }\"\n @click=\"custom = true\"\n >\n {{ i18n.t('date.customRange') }}\n </button>\n </template>\n <template v-else>\n <button\n type=\"button\"\n class=\"dt-pop-item dt-date-preset\"\n :class=\"{ 'is-on': preset === 'today' }\"\n @click=\"pickToday\"\n >\n {{ i18n.t('date.today') }}\n <PhCheck v-if=\"preset === 'today'\" :size=\"14\" class=\"dt-pop-end\" aria-hidden=\"true\" />\n </button>\n </template>\n </div>\n <RangeCalendarRoot\n v-if=\"isRange\"\n v-slot=\"{ weekDays, grid }\"\n class=\"dt-calendar\"\n :model-value=\"rangeValue.start && rangeValue.end ? { start: rangeValue.start, end: rangeValue.end } : undefined\"\n :locale=\"locale\"\n :week-starts-on=\"weekStartsOn\"\n :placeholder=\"rangeValue.start ?? now\"\n @update:model-value=\"onRange\"\n >\n <RangeCalendarHeader class=\"dt-cal-head\">\n <RangeCalendarPrev class=\"dt-icon-btn-sm\"><PhCaretLeft :size=\"16\" aria-hidden=\"true\" /></RangeCalendarPrev>\n <RangeCalendarHeading class=\"dt-cal-title\" />\n <RangeCalendarNext class=\"dt-icon-btn-sm\"><PhCaretRight :size=\"16\" aria-hidden=\"true\" /></RangeCalendarNext>\n </RangeCalendarHeader>\n <RangeCalendarGrid v-for=\"month in grid\" :key=\"month.value.toString()\" class=\"dt-cal-grid\">\n <RangeCalendarGridHead>\n <RangeCalendarGridRow>\n <RangeCalendarHeadCell v-for=\"day in weekDays\" :key=\"day\" class=\"dt-cal-dow\">\n {{ day }}\n </RangeCalendarHeadCell>\n </RangeCalendarGridRow>\n </RangeCalendarGridHead>\n <RangeCalendarGridBody>\n <RangeCalendarGridRow v-for=\"(week, i) in month.rows\" :key=\"i\">\n <RangeCalendarCell v-for=\"d in week\" :key=\"d.toString()\" :date=\"d\" class=\"dt-cal-cell\">\n <RangeCalendarCellTrigger :day=\"d\" :month=\"month.value\" class=\"dt-cal-day\" />\n </RangeCalendarCell>\n </RangeCalendarGridRow>\n </RangeCalendarGridBody>\n </RangeCalendarGrid>\n </RangeCalendarRoot>\n <CalendarRoot\n v-else\n v-slot=\"{ weekDays, grid }\"\n class=\"dt-calendar\"\n :model-value=\"single\"\n :locale=\"locale\"\n :week-starts-on=\"weekStartsOn\"\n :placeholder=\"single ?? now\"\n @update:model-value=\"(d) => onSingle(d as DateValue | undefined)\"\n >\n <CalendarHeader class=\"dt-cal-head\">\n <CalendarPrev class=\"dt-icon-btn-sm\"><PhCaretLeft :size=\"16\" aria-hidden=\"true\" /></CalendarPrev>\n <CalendarHeading class=\"dt-cal-title\" />\n <CalendarNext class=\"dt-icon-btn-sm\"><PhCaretRight :size=\"16\" aria-hidden=\"true\" /></CalendarNext>\n </CalendarHeader>\n <CalendarGrid v-for=\"month in grid\" :key=\"month.value.toString()\" class=\"dt-cal-grid\">\n <CalendarGridHead>\n <CalendarGridRow>\n <CalendarHeadCell v-for=\"day in weekDays\" :key=\"day\" class=\"dt-cal-dow\">{{ day }}</CalendarHeadCell>\n </CalendarGridRow>\n </CalendarGridHead>\n <CalendarGridBody>\n <CalendarGridRow v-for=\"(week, i) in month.rows\" :key=\"i\">\n <CalendarCell v-for=\"d in week\" :key=\"d.toString()\" :date=\"d\" class=\"dt-cal-cell\">\n <CalendarCellTrigger :day=\"d\" :month=\"month.value\" class=\"dt-cal-day\" />\n </CalendarCell>\n </CalendarGridRow>\n </CalendarGridBody>\n </CalendarGrid>\n </CalendarRoot>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Tarih editörü (04 §3, T2-04): `within` → solda hazır aralıklar + Custom range, sağda aralık takvimi; `eq/before/after` →\n// Today + tek takvim. Hazır aralık tıklanınca uygulanır ve kapanır; özel aralıkta ikinci uç seçilince. Hafta başı yerel ayardan.\nimport { getDayOfWeek, getLocalTimeZone, parseDate, startOfWeek, today, type DateValue } from '@internationalized/date'\nimport { PhCaretLeft, PhCaretRight, PhCheck } from '@phosphor-icons/vue'\nimport {\n CalendarCell,\n CalendarCellTrigger,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHead,\n CalendarGridRow,\n CalendarHeadCell,\n CalendarHeader,\n CalendarHeading,\n CalendarNext,\n CalendarPrev,\n CalendarRoot,\n RangeCalendarCell,\n RangeCalendarCellTrigger,\n RangeCalendarGrid,\n RangeCalendarGridBody,\n RangeCalendarGridHead,\n RangeCalendarGridRow,\n RangeCalendarHeadCell,\n RangeCalendarHeader,\n RangeCalendarHeading,\n RangeCalendarNext,\n RangeCalendarPrev,\n RangeCalendarRoot,\n} from 'reka-ui'\nimport { computed, ref } from 'vue'\nimport type { DatePreset, FilterOp } from '../../types/query'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{ op: FilterOp; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: unknown]; done: [] }>()\nconst { i18n, locale } = useDataTableContext()\n\nconst PRESETS: DatePreset[] = [\n 'today',\n 'this_week',\n 'next_7_days',\n 'this_month',\n 'last_30_days',\n 'this_quarter',\n 'overdue',\n]\nconst tz = getLocalTimeZone()\nconst now = today(tz)\nconst weekStartsOn = getDayOfWeek(startOfWeek(now, locale), 'en-US') as 0 | 1 | 2 | 3 | 4 | 5 | 6\nconst isRange = computed(() => props.op === 'within')\nconst obj = (v: unknown): Record<string, unknown> | null =>\n v && typeof v === 'object' ? (v as Record<string, unknown>) : null\nconst preset = computed(() => obj(props.modelValue)?.preset as string | undefined)\nconst custom = ref(false)\n\nconst safe = (s: unknown): DateValue | undefined => {\n try {\n return typeof s === 'string' && s ? parseDate(s.slice(0, 10)) : undefined\n } catch {\n return undefined\n }\n}\nconst rangeValue = computed(() => {\n const o = obj(props.modelValue)\n return { start: safe(o?.from), end: safe(o?.to) }\n})\nconst single = computed(() => safe(props.modelValue))\n\nconst pickPreset = (p: DatePreset) => {\n custom.value = false\n emit('update:modelValue', { preset: p })\n emit('done')\n}\nconst onRange = (r: { start: DateValue | undefined; end: DateValue | undefined } | null) => {\n if (!r?.start || !r.end) return\n emit('update:modelValue', { from: r.start.toString(), to: r.end.toString() })\n emit('done')\n}\nconst onSingle = (d: DateValue | undefined) => {\n if (!d) return\n emit('update:modelValue', d.toString())\n emit('done')\n}\nconst pickToday = () => {\n emit('update:modelValue', { preset: 'today' })\n emit('done')\n}\n</script>\n\n<template>\n <div class=\"dt-editor-date\">\n <div class=\"dt-date-presets\">\n <template v-if=\"isRange\">\n <button\n v-for=\"p in PRESETS\"\n :key=\"p\"\n type=\"button\"\n class=\"dt-pop-item dt-date-preset\"\n :class=\"{ 'is-on': preset === p }\"\n @click=\"pickPreset(p)\"\n >\n {{ i18n.t(`date.${p}`) }}\n <PhCheck v-if=\"preset === p\" :size=\"14\" class=\"dt-pop-end\" aria-hidden=\"true\" />\n </button>\n <div class=\"dt-pop-sep\" />\n <button\n type=\"button\"\n class=\"dt-pop-item dt-date-preset\"\n :class=\"{ 'is-on': custom || (!preset && rangeValue.start) }\"\n @click=\"custom = true\"\n >\n {{ i18n.t('date.customRange') }}\n </button>\n </template>\n <template v-else>\n <button\n type=\"button\"\n class=\"dt-pop-item dt-date-preset\"\n :class=\"{ 'is-on': preset === 'today' }\"\n @click=\"pickToday\"\n >\n {{ i18n.t('date.today') }}\n <PhCheck v-if=\"preset === 'today'\" :size=\"14\" class=\"dt-pop-end\" aria-hidden=\"true\" />\n </button>\n </template>\n </div>\n <RangeCalendarRoot\n v-if=\"isRange\"\n v-slot=\"{ weekDays, grid }\"\n class=\"dt-calendar\"\n :model-value=\"rangeValue.start && rangeValue.end ? { start: rangeValue.start, end: rangeValue.end } : undefined\"\n :locale=\"locale\"\n :week-starts-on=\"weekStartsOn\"\n :placeholder=\"rangeValue.start ?? now\"\n @update:model-value=\"onRange\"\n >\n <RangeCalendarHeader class=\"dt-cal-head\">\n <RangeCalendarPrev class=\"dt-icon-btn-sm\"><PhCaretLeft :size=\"16\" aria-hidden=\"true\" /></RangeCalendarPrev>\n <RangeCalendarHeading class=\"dt-cal-title\" />\n <RangeCalendarNext class=\"dt-icon-btn-sm\"><PhCaretRight :size=\"16\" aria-hidden=\"true\" /></RangeCalendarNext>\n </RangeCalendarHeader>\n <RangeCalendarGrid v-for=\"month in grid\" :key=\"month.value.toString()\" class=\"dt-cal-grid\">\n <RangeCalendarGridHead>\n <RangeCalendarGridRow>\n <RangeCalendarHeadCell v-for=\"day in weekDays\" :key=\"day\" class=\"dt-cal-dow\">\n {{ day }}\n </RangeCalendarHeadCell>\n </RangeCalendarGridRow>\n </RangeCalendarGridHead>\n <RangeCalendarGridBody>\n <RangeCalendarGridRow v-for=\"(week, i) in month.rows\" :key=\"i\">\n <RangeCalendarCell v-for=\"d in week\" :key=\"d.toString()\" :date=\"d\" class=\"dt-cal-cell\">\n <RangeCalendarCellTrigger :day=\"d\" :month=\"month.value\" class=\"dt-cal-day\" />\n </RangeCalendarCell>\n </RangeCalendarGridRow>\n </RangeCalendarGridBody>\n </RangeCalendarGrid>\n </RangeCalendarRoot>\n <CalendarRoot\n v-else\n v-slot=\"{ weekDays, grid }\"\n class=\"dt-calendar\"\n :model-value=\"single\"\n :locale=\"locale\"\n :week-starts-on=\"weekStartsOn\"\n :placeholder=\"single ?? now\"\n @update:model-value=\"(d) => onSingle(d as DateValue | undefined)\"\n >\n <CalendarHeader class=\"dt-cal-head\">\n <CalendarPrev class=\"dt-icon-btn-sm\"><PhCaretLeft :size=\"16\" aria-hidden=\"true\" /></CalendarPrev>\n <CalendarHeading class=\"dt-cal-title\" />\n <CalendarNext class=\"dt-icon-btn-sm\"><PhCaretRight :size=\"16\" aria-hidden=\"true\" /></CalendarNext>\n </CalendarHeader>\n <CalendarGrid v-for=\"month in grid\" :key=\"month.value.toString()\" class=\"dt-cal-grid\">\n <CalendarGridHead>\n <CalendarGridRow>\n <CalendarHeadCell v-for=\"day in weekDays\" :key=\"day\" class=\"dt-cal-dow\">{{ day }}</CalendarHeadCell>\n </CalendarGridRow>\n </CalendarGridHead>\n <CalendarGridBody>\n <CalendarGridRow v-for=\"(week, i) in month.rows\" :key=\"i\">\n <CalendarCell v-for=\"d in week\" :key=\"d.toString()\" :date=\"d\" class=\"dt-cal-cell\">\n <CalendarCellTrigger :day=\"d\" :month=\"month.value\" class=\"dt-cal-day\" />\n </CalendarCell>\n </CalendarGridRow>\n </CalendarGridBody>\n </CalendarGrid>\n </CalendarRoot>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAmCA,IAAMqB,IAAQC,GACRC,IAAOH,GACP,EAAE,SAAM,cAAWN,EAAoB,GAEvCU,KAAwB;GAC5B;GACA;GACA;GACA;GACA;GACA;GACA;EACF,GACMC,KAAKC,EAAiB,GACtBC,IAAMC,EAAMH,EAAE,GACdI,IAAeC,EAAaC,EAAYJ,GAAKK,CAAM,GAAG,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