@medyat/vue-data-table 1.0.0 → 1.0.1
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 +33 -0
- package/dist/ColumnsDialog-dngip-aF.js +251 -0
- package/dist/ColumnsDialog-dngip-aF.js.map +1 -0
- package/dist/{DateEditor-BTIZMwf1.js → DateEditor-C2zzyoPQ.js} +2 -2
- package/dist/{DateEditor-BTIZMwf1.js.map → DateEditor-C2zzyoPQ.js.map} +1 -1
- package/dist/FiltersSheet-C3zOlbkN.js +284 -0
- package/dist/{FiltersSheet-o2HaQuhq.js.map → FiltersSheet-C3zOlbkN.js.map} +1 -1
- package/dist/PhoneMoreSheet-66OdIZrl.js +266 -0
- package/dist/PhoneMoreSheet-66OdIZrl.js.map +1 -0
- package/dist/{TextEditor-DPqiiRau.js → TextEditor-CHLM6u-l.js} +24 -25
- package/dist/{TextEditor-DPqiiRau.js.map → TextEditor-CHLM6u-l.js.map} +1 -1
- package/dist/index.d.ts +11 -6
- package/dist/index.js +1423 -1568
- package/dist/index.js.map +1 -1
- package/dist/query-CGNWUi2E.js +2904 -0
- package/dist/query-CGNWUi2E.js.map +1 -0
- package/dist/sheet.d.ts +15 -14
- package/dist/sheet.js +1754 -1816
- package/dist/sheet.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +24 -17
- package/dist/FiltersSheet-o2HaQuhq.js +0 -285
- package/dist/PhoneMoreSheet-gfkH96RR.js +0 -227
- package/dist/PhoneMoreSheet-gfkH96RR.js.map +0 -1
- package/dist/plugin-DhgcjEdi.js +0 -813
- package/dist/plugin-DhgcjEdi.js.map +0 -1
- package/dist/query-DQWMlX0m.js +0 -2121
- package/dist/query-DQWMlX0m.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextEditor-DPqiiRau.js","names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_openBlock","_createElementBlock","_createBlock","_unref","_withCtx","_Fragment","_renderList","_createTextVNode","_toDisplayString","_createCommentVNode","_createElementVNode","_normalizeClass","_withDirectives","_withKeys","_withModifiers","_vModelText","_sfc_main","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","_withDirectives","_vModelText","_createCommentVNode","_Fragment","_normalizeClass","_toDisplayString","_createTextVNode","_renderList","_createBlock","_normalizeStyle","_withModifiers","_sfc_main","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_Fragment","_renderList","_unref","_normalizeClass","_createVNode","_sfc_main","_openBlock","_createElementBlock","_createElementVNode","_withKeys","_withModifiers","_sfc_main","badge","parseNumber","readPath","avatar","TYPE_ICONS","PhHash","PhPercent","PhStar","PhCreditCard","PhTextT","PhTextAlignLeft","PhPhone","PhPalette","PhEnvelope","PhLink","PhCheckSquare","PhRadioButton","PhListChecks","PhLinkSimple","PhUser","PhCalendarBlank","PhClock","PhBracketsCurly","PhListBullets","_hoisted_1$3","_hoisted_2$3","_hoisted_3$1","_hoisted_4$1","_hoisted_5$1","_hoisted_6$1","_hoisted_7$1","_hoisted_8$1","_hoisted_9$1","_hoisted_10$1","_hoisted_11$1","NumberEditor_default","defineComponent","__emit","props","__props","emit","useDataTableContext","range","computed","nf","locale","show","n","fromModel","v","a0","b0","a","ref","b","x","y","first","commit","min","max","timer","onInput","onEnter","suffix","openBlock","createElementBlock","createBlock","unref","ToggleGroupRoot","_cache","withCtx","Fragment","renderList","ToggleGroupItem","c","createTextVNode","toDisplayString","createCommentVNode","createElementVNode","i18n","normalizeClass","withDirectives","$event","withKeys","withModifiers","vModelText","_hoisted_1$2","_hoisted_2$2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","OptionsEditor_default","def","remote","isUser","q","distinctFromRows","seen","row","raw","value","staticOptions","d","items","hasMore","loading","page","ctl","load","r","res","append","watch","loadMore","options","needle","o","showSearch","searchPlaceholder","selected","isOn","toggle","next","only","unassigned","rich","Opt","p","createVNode","PhMagnifyingGlass","normalizeStyle","_hoisted_1$1","_hoisted_2$1","StarEditor_default","pick","_hoisted_1","_hoisted_2","TextEditor_default","asText","draft","input","isList","normalize","s","parts","onBeforeUnmount"],"sources":["../src/core/filters/typeIcons.ts","../src/core/editors/NumberEditor.vue","../src/core/editors/NumberEditor.vue","../src/core/editors/OptionsEditor.vue","../src/core/editors/OptionsEditor.vue","../src/core/editors/StarEditor.vue","../src/core/editors/StarEditor.vue","../src/core/editors/TextEditor.vue","../src/core/editors/TextEditor.vue"],"sourcesContent":["// Sütun tipi ikonları (column picker ve çip; handoff 03 §3.2): Phosphor regular, 14 px.\nimport {\n PhBracketsCurly,\n PhCalendarBlank,\n PhCheckSquare,\n PhClock,\n PhCreditCard,\n PhEnvelope,\n PhHash,\n PhLink,\n PhLinkSimple,\n PhListBullets,\n PhListChecks,\n PhPalette,\n PhPercent,\n PhPhone,\n PhRadioButton,\n PhStar,\n PhTextAlignLeft,\n PhTextT,\n PhUser,\n} from '@phosphor-icons/vue'\nimport type { Component } from 'vue'\nimport type { ColumnType } from '../../types/columns'\n\nexport const TYPE_ICONS: Record<ColumnType, Component> = {\n int: PhHash,\n float: PhHash,\n percentage: PhPercent,\n star: PhStar,\n currency: PhCreditCard,\n string: PhTextT,\n text: PhTextAlignLeft,\n uppercase: PhTextT,\n lowercase: PhTextT,\n phone: PhPhone,\n color: PhPalette,\n email: PhEnvelope,\n url: PhLink,\n id: PhHash,\n boolean: PhCheckSquare,\n select: PhRadioButton,\n multiselect: PhListChecks,\n ajax: PhLinkSimple,\n user: PhUser,\n date: PhCalendarBlank,\n datetime: PhClock,\n object: PhBracketsCurly,\n array: PhListBullets,\n}\n","<script setup lang=\"ts\">\n// Sayı editörü (04 §3, T2-05): tek değer ya da Min / Max (\"and\"); 250 ms sonra ve Enter'da uygular; `currency` sütununda\n// para birimi segmented (değer düz sayı, para birimi ayrı alan); percentage `%` son eki; yerel ayara göre okunur.\nimport { ToggleGroupItem, ToggleGroupRoot } from 'reka-ui'\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport type { ColumnDef } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\nimport { parseNumber } from '../format/parse'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{\n column: ColumnDef\n op: FilterOp\n modelValue: unknown\n currency?: string\n /** `currency` sütunu: seçilebilir kodlar (sabit kod veya yüklü satırlardan). */\n currencies: string[]\n}>()\nconst emit = defineEmits<{\n 'update:modelValue': [value: number | [number | null, number | null] | undefined]\n 'update:currency': [code: string]\n done: []\n}>()\nconst { i18n, locale } = useDataTableContext()\nconst range = computed(() => props.op === 'between')\nconst nf = new Intl.NumberFormat(locale, { maximumFractionDigits: 6 })\nconst show = (n: unknown) => (typeof n === 'number' && Number.isFinite(n) ? nf.format(n) : '')\nconst fromModel = () => {\n const v = props.modelValue\n if (range.value) return [show(Array.isArray(v) ? v[0] : undefined), show(Array.isArray(v) ? v[1] : undefined)]\n return [show(v), '']\n}\nconst [a0, b0] = fromModel()\nconst a = ref(a0 ?? '')\nconst b = ref(b0 ?? '')\nwatch(\n () => [props.modelValue, props.op],\n () => {\n const [x, y] = fromModel()\n if (parseNumber(locale, a.value) !== parseNumber(locale, x ?? '')) a.value = x ?? ''\n if (parseNumber(locale, b.value) !== parseNumber(locale, y ?? '')) b.value = y ?? ''\n },\n)\nconst first = ref<HTMLInputElement | null>(null)\nonMounted(() => first.value?.focus())\n\nconst commit = () => {\n const min = parseNumber(locale, a.value)\n if (range.value) {\n const max = parseNumber(locale, b.value)\n emit('update:modelValue', min === null && max === null ? undefined : [min, max])\n } else emit('update:modelValue', min ?? undefined)\n}\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst onInput = () => {\n clearTimeout(timer)\n timer = setTimeout(commit, 250)\n}\nconst onEnter = () => {\n clearTimeout(timer)\n commit()\n emit('done')\n}\nonBeforeUnmount(() => clearTimeout(timer))\nconst suffix = props.column.type === 'percentage' ? '%' : ''\n</script>\n\n<template>\n <div class=\"dt-editor-number\">\n <ToggleGroupRoot\n v-if=\"currencies.length > 1\"\n class=\"dt-seg dt-seg-xs\"\n type=\"single\"\n :model-value=\"currency\"\n @update:model-value=\"(v) => v && emit('update:currency', String(v))\"\n >\n <ToggleGroupItem v-for=\"c in currencies\" :key=\"c\" class=\"dt-seg-item\" :value=\"c\">{{ c }}</ToggleGroupItem>\n </ToggleGroupRoot>\n <div class=\"dt-editor-fields\">\n <label class=\"dt-editor-field\">\n <span v-if=\"range\" class=\"dt-editor-label\">{{ i18n.t('number.min') }}</span>\n <span class=\"dt-input\" :class=\"{ 'has-suffix': suffix }\">\n <input\n ref=\"first\"\n v-model=\"a\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n <span v-if=\"suffix\" class=\"dt-input-end dt-input-suffix\">{{ suffix }}</span>\n </span>\n </label>\n <template v-if=\"range\">\n <span class=\"dt-editor-and\">{{ i18n.t('number.and') }}</span>\n <label class=\"dt-editor-field\">\n <span class=\"dt-editor-label\">{{ i18n.t('number.max') }}</span>\n <span class=\"dt-input\" :class=\"{ 'has-suffix': suffix }\">\n <input\n v-model=\"b\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n <span v-if=\"suffix\" class=\"dt-input-end dt-input-suffix\">{{ suffix }}</span>\n </span>\n </label>\n </template>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Sayı editörü (04 §3, T2-05): tek değer ya da Min / Max (\"and\"); 250 ms sonra ve Enter'da uygular; `currency` sütununda\n// para birimi segmented (değer düz sayı, para birimi ayrı alan); percentage `%` son eki; yerel ayara göre okunur.\nimport { ToggleGroupItem, ToggleGroupRoot } from 'reka-ui'\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport type { ColumnDef } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\nimport { parseNumber } from '../format/parse'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{\n column: ColumnDef\n op: FilterOp\n modelValue: unknown\n currency?: string\n /** `currency` sütunu: seçilebilir kodlar (sabit kod veya yüklü satırlardan). */\n currencies: string[]\n}>()\nconst emit = defineEmits<{\n 'update:modelValue': [value: number | [number | null, number | null] | undefined]\n 'update:currency': [code: string]\n done: []\n}>()\nconst { i18n, locale } = useDataTableContext()\nconst range = computed(() => props.op === 'between')\nconst nf = new Intl.NumberFormat(locale, { maximumFractionDigits: 6 })\nconst show = (n: unknown) => (typeof n === 'number' && Number.isFinite(n) ? nf.format(n) : '')\nconst fromModel = () => {\n const v = props.modelValue\n if (range.value) return [show(Array.isArray(v) ? v[0] : undefined), show(Array.isArray(v) ? v[1] : undefined)]\n return [show(v), '']\n}\nconst [a0, b0] = fromModel()\nconst a = ref(a0 ?? '')\nconst b = ref(b0 ?? '')\nwatch(\n () => [props.modelValue, props.op],\n () => {\n const [x, y] = fromModel()\n if (parseNumber(locale, a.value) !== parseNumber(locale, x ?? '')) a.value = x ?? ''\n if (parseNumber(locale, b.value) !== parseNumber(locale, y ?? '')) b.value = y ?? ''\n },\n)\nconst first = ref<HTMLInputElement | null>(null)\nonMounted(() => first.value?.focus())\n\nconst commit = () => {\n const min = parseNumber(locale, a.value)\n if (range.value) {\n const max = parseNumber(locale, b.value)\n emit('update:modelValue', min === null && max === null ? undefined : [min, max])\n } else emit('update:modelValue', min ?? undefined)\n}\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst onInput = () => {\n clearTimeout(timer)\n timer = setTimeout(commit, 250)\n}\nconst onEnter = () => {\n clearTimeout(timer)\n commit()\n emit('done')\n}\nonBeforeUnmount(() => clearTimeout(timer))\nconst suffix = props.column.type === 'percentage' ? '%' : ''\n</script>\n\n<template>\n <div class=\"dt-editor-number\">\n <ToggleGroupRoot\n v-if=\"currencies.length > 1\"\n class=\"dt-seg dt-seg-xs\"\n type=\"single\"\n :model-value=\"currency\"\n @update:model-value=\"(v) => v && emit('update:currency', String(v))\"\n >\n <ToggleGroupItem v-for=\"c in currencies\" :key=\"c\" class=\"dt-seg-item\" :value=\"c\">{{ c }}</ToggleGroupItem>\n </ToggleGroupRoot>\n <div class=\"dt-editor-fields\">\n <label class=\"dt-editor-field\">\n <span v-if=\"range\" class=\"dt-editor-label\">{{ i18n.t('number.min') }}</span>\n <span class=\"dt-input\" :class=\"{ 'has-suffix': suffix }\">\n <input\n ref=\"first\"\n v-model=\"a\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n <span v-if=\"suffix\" class=\"dt-input-end dt-input-suffix\">{{ suffix }}</span>\n </span>\n </label>\n <template v-if=\"range\">\n <span class=\"dt-editor-and\">{{ i18n.t('number.and') }}</span>\n <label class=\"dt-editor-field\">\n <span class=\"dt-editor-label\">{{ i18n.t('number.max') }}</span>\n <span class=\"dt-input\" :class=\"{ 'has-suffix': suffix }\">\n <input\n v-model=\"b\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n <span v-if=\"suffix\" class=\"dt-input-end dt-input-suffix\">{{ suffix }}</span>\n </span>\n </label>\n </template>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Seçenek editörü (04 §3, T2-02/03): select · multiselect · color · ajax · user. Her işaretleme anında uygulanır;\n// hover'da \"Only\"; `user`'da Me ve Unassigned en üstte; uzak kaynaklar yazdıkça arar ve 20'şer yükler (03).\nimport { PhMagnifyingGlass } from '@phosphor-icons/vue'\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport type { ColumnDef, OptionDef, RemoteOptions, UserOption } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\nimport { avatar, badge } from '../cells/renderCell'\nimport type { RemoteLabels } from '../cells/remoteLabels'\nimport { readPath } from '../columns/readPath'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{\n column: ColumnDef\n op: FilterOp\n modelValue: Array<string | number>\n /** color: yüklü satırlardaki mevcut değerler (uzaktan öneri yok, D3). */\n rows: object[]\n labels: RemoteLabels\n}>()\nconst emit = defineEmits<{ 'update:modelValue': [values: Array<string | number>]; unassigned: [] }>()\nconst { i18n } = useDataTableContext()\n\nconst def = computed(() => props.column)\nconst remote = computed<RemoteOptions | undefined>(() =>\n def.value.type === 'ajax' || def.value.type === 'user' ? (def.value as { remote?: RemoteOptions }).remote : undefined,\n)\nconst isUser = computed(() => def.value.type === 'user')\nconst q = ref('')\n\nconst distinctFromRows = (): OptionDef[] => {\n const seen = new Set<string | number>()\n for (const row of props.rows) {\n const raw = def.value.accessor ? def.value.accessor(row) : readPath(row, def.value.id as string)\n for (const v of Array.isArray(raw) ? raw : [raw])\n if (v !== null && v !== undefined && v !== '') seen.add(v as string | number)\n }\n return [...seen].sort((a, b) => String(a).localeCompare(String(b))).map((value) => ({ value, label: String(value) }))\n}\nconst staticOptions = computed<OptionDef[]>(() => {\n const d = def.value\n if (d.type === 'select' || d.type === 'multiselect') return d.options\n if (d.type === 'user' && d.options) return [...d.options].sort((a, b) => a.label.localeCompare(b.label))\n if (d.type === 'color' && d.palette) return d.palette.map((value) => ({ value, label: value }))\n if (d.type === 'color') return distinctFromRows()\n return []\n})\n\n// Uzak kaynak: 250 ms sonra arar; sayfa sayfa ekler.\nconst items = ref<OptionDef[]>([])\nconst hasMore = ref(false)\nconst loading = ref(false)\nlet page = 1\nlet ctl: AbortController | null = null\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst load = async (append: boolean) => {\n const r = remote.value\n if (!r) return\n ctl?.abort()\n ctl = new AbortController()\n loading.value = true\n try {\n const res = await r.search(q.value, page, { signal: ctl.signal })\n items.value = append ? [...items.value, ...res.items] : res.items\n hasMore.value = res.hasMore\n props.labels.seed(def.value.id as string, res.items)\n } catch {\n /* abort veya ağ hatası: liste olduğu gibi kalır (D18) */\n } finally {\n loading.value = false\n }\n}\nif (remote.value) void load(false)\nwatch(q, () => {\n if (!remote.value) return\n clearTimeout(timer)\n timer = setTimeout(() => {\n page = 1\n void load(false)\n }, 250)\n})\nconst loadMore = () => {\n page += 1\n void load(true)\n}\nonBeforeUnmount(() => {\n clearTimeout(timer)\n ctl?.abort()\n})\n\nconst options = computed<OptionDef[]>(() => {\n if (remote.value) return items.value\n const needle = q.value.trim().toLocaleLowerCase()\n return needle ? staticOptions.value.filter((o) => o.label.toLocaleLowerCase().includes(needle)) : staticOptions.value\n})\nconst showSearch = computed(() => !!remote.value || staticOptions.value.length > 7)\nconst searchPlaceholder = computed(() =>\n def.value.filterNoun ? i18n.t('option.searchNoun', { noun: def.value.filterNoun }) : i18n.t('option.search'),\n)\n\nconst selected = computed(() => new Set(props.modelValue.map(String)))\nconst isOn = (v: string | number) => selected.value.has(String(v))\nconst toggle = (v: string | number) => {\n const next = isOn(v) ? props.modelValue.filter((x) => String(x) !== String(v)) : [...props.modelValue, v]\n emit('update:modelValue', next)\n}\nconst only = (v: string | number) => emit('update:modelValue', [v])\nconst unassigned = computed(() => props.op === 'is_empty')\n\n// Sabit bileşen: her render'da yeni bileşen üretmek rozeti DOM'da değiştirir ve tıkı yutabilir (bkz. sheet/editors/OptionCell).\nconst rich = computed(() => ['select', 'multiselect', 'user'].includes(def.value.type))\nconst Opt = (p: { o: OptionDef }) =>\n def.value.type === 'user' ? [avatar(p.o as UserOption), ' ', p.o.label] : badge(p.o.tone ?? 'gray', p.o.label)\n</script>\n\n<template>\n <div class=\"dt-options\">\n <label v-if=\"showSearch\" class=\"dt-input has-icon dt-options-search\">\n <span class=\"dt-input-icon\"><PhMagnifyingGlass :size=\"14\" aria-hidden=\"true\" /></span>\n <input v-model=\"q\" type=\"search\" :placeholder=\"searchPlaceholder\" :aria-label=\"searchPlaceholder\" autofocus />\n </label>\n <div class=\"dt-options-list\" role=\"group\">\n <template v-if=\"isUser && !q\">\n <label class=\"dt-option\" :class=\"{ 'is-on': isOn('@me') }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"isOn('@me')\" @change=\"toggle('@me')\" />\n <span class=\"dt-option-body\">\n <span class=\"dt-avatar dt-tone-blue\" aria-hidden=\"true\">{{ i18n.t('common.me').slice(0, 2) }}</span>\n {{ i18n.t('common.me') }}\n </span>\n </label>\n <label class=\"dt-option is-unassigned\" :class=\"{ 'is-on': unassigned }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"unassigned\" @change=\"emit('unassigned')\" />\n <span class=\"dt-option-body\">\n <span class=\"dt-avatar is-empty\" aria-hidden=\"true\" />\n {{ i18n.t('common.unassigned') }}\n </span>\n </label>\n <div class=\"dt-pop-sep\" />\n </template>\n <label v-for=\"o in options\" :key=\"String(o.value)\" class=\"dt-option\" :class=\"{ 'is-on': isOn(o.value) }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"isOn(o.value)\" @change=\"toggle(o.value)\" />\n <span class=\"dt-option-body\">\n <Opt v-if=\"rich\" :o=\"o\" />\n <template v-else-if=\"def.type === 'color'\">\n <span class=\"dt-swatch\" :style=\"{ background: String(o.value) }\" aria-hidden=\"true\" />\n <span class=\"dt-mono\">{{ o.label }}</span>\n </template>\n <template v-else>{{ o.label }}</template>\n </span>\n <button type=\"button\" class=\"dt-btn dt-btn-xs dt-option-only\" tabindex=\"-1\" @click.prevent=\"only(o.value)\">\n {{ i18n.t('option.only') }}\n </button>\n </label>\n <div v-if=\"remote && !loading && options.length === 0\" class=\"dt-options-empty\">\n {{ i18n.t('remote.noResults') }}\n </div>\n <div v-else-if=\"!remote && options.length === 0\" class=\"dt-options-empty\">{{ i18n.t('picker.noMatch') }}</div>\n <div v-if=\"loading\" class=\"dt-options-empty\">{{ i18n.t('common.loading') }}</div>\n <button\n v-if=\"remote && hasMore && !loading\"\n type=\"button\"\n class=\"dt-btn dt-btn-ghost dt-btn-sm dt-options-more\"\n @click=\"loadMore\"\n >\n {{ i18n.t('remote.loadMore') }}\n </button>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Seçenek editörü (04 §3, T2-02/03): select · multiselect · color · ajax · user. Her işaretleme anında uygulanır;\n// hover'da \"Only\"; `user`'da Me ve Unassigned en üstte; uzak kaynaklar yazdıkça arar ve 20'şer yükler (03).\nimport { PhMagnifyingGlass } from '@phosphor-icons/vue'\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport type { ColumnDef, OptionDef, RemoteOptions, UserOption } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\nimport { avatar, badge } from '../cells/renderCell'\nimport type { RemoteLabels } from '../cells/remoteLabels'\nimport { readPath } from '../columns/readPath'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{\n column: ColumnDef\n op: FilterOp\n modelValue: Array<string | number>\n /** color: yüklü satırlardaki mevcut değerler (uzaktan öneri yok, D3). */\n rows: object[]\n labels: RemoteLabels\n}>()\nconst emit = defineEmits<{ 'update:modelValue': [values: Array<string | number>]; unassigned: [] }>()\nconst { i18n } = useDataTableContext()\n\nconst def = computed(() => props.column)\nconst remote = computed<RemoteOptions | undefined>(() =>\n def.value.type === 'ajax' || def.value.type === 'user' ? (def.value as { remote?: RemoteOptions }).remote : undefined,\n)\nconst isUser = computed(() => def.value.type === 'user')\nconst q = ref('')\n\nconst distinctFromRows = (): OptionDef[] => {\n const seen = new Set<string | number>()\n for (const row of props.rows) {\n const raw = def.value.accessor ? def.value.accessor(row) : readPath(row, def.value.id as string)\n for (const v of Array.isArray(raw) ? raw : [raw])\n if (v !== null && v !== undefined && v !== '') seen.add(v as string | number)\n }\n return [...seen].sort((a, b) => String(a).localeCompare(String(b))).map((value) => ({ value, label: String(value) }))\n}\nconst staticOptions = computed<OptionDef[]>(() => {\n const d = def.value\n if (d.type === 'select' || d.type === 'multiselect') return d.options\n if (d.type === 'user' && d.options) return [...d.options].sort((a, b) => a.label.localeCompare(b.label))\n if (d.type === 'color' && d.palette) return d.palette.map((value) => ({ value, label: value }))\n if (d.type === 'color') return distinctFromRows()\n return []\n})\n\n// Uzak kaynak: 250 ms sonra arar; sayfa sayfa ekler.\nconst items = ref<OptionDef[]>([])\nconst hasMore = ref(false)\nconst loading = ref(false)\nlet page = 1\nlet ctl: AbortController | null = null\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst load = async (append: boolean) => {\n const r = remote.value\n if (!r) return\n ctl?.abort()\n ctl = new AbortController()\n loading.value = true\n try {\n const res = await r.search(q.value, page, { signal: ctl.signal })\n items.value = append ? [...items.value, ...res.items] : res.items\n hasMore.value = res.hasMore\n props.labels.seed(def.value.id as string, res.items)\n } catch {\n /* abort veya ağ hatası: liste olduğu gibi kalır (D18) */\n } finally {\n loading.value = false\n }\n}\nif (remote.value) void load(false)\nwatch(q, () => {\n if (!remote.value) return\n clearTimeout(timer)\n timer = setTimeout(() => {\n page = 1\n void load(false)\n }, 250)\n})\nconst loadMore = () => {\n page += 1\n void load(true)\n}\nonBeforeUnmount(() => {\n clearTimeout(timer)\n ctl?.abort()\n})\n\nconst options = computed<OptionDef[]>(() => {\n if (remote.value) return items.value\n const needle = q.value.trim().toLocaleLowerCase()\n return needle ? staticOptions.value.filter((o) => o.label.toLocaleLowerCase().includes(needle)) : staticOptions.value\n})\nconst showSearch = computed(() => !!remote.value || staticOptions.value.length > 7)\nconst searchPlaceholder = computed(() =>\n def.value.filterNoun ? i18n.t('option.searchNoun', { noun: def.value.filterNoun }) : i18n.t('option.search'),\n)\n\nconst selected = computed(() => new Set(props.modelValue.map(String)))\nconst isOn = (v: string | number) => selected.value.has(String(v))\nconst toggle = (v: string | number) => {\n const next = isOn(v) ? props.modelValue.filter((x) => String(x) !== String(v)) : [...props.modelValue, v]\n emit('update:modelValue', next)\n}\nconst only = (v: string | number) => emit('update:modelValue', [v])\nconst unassigned = computed(() => props.op === 'is_empty')\n\n// Sabit bileşen: her render'da yeni bileşen üretmek rozeti DOM'da değiştirir ve tıkı yutabilir (bkz. sheet/editors/OptionCell).\nconst rich = computed(() => ['select', 'multiselect', 'user'].includes(def.value.type))\nconst Opt = (p: { o: OptionDef }) =>\n def.value.type === 'user' ? [avatar(p.o as UserOption), ' ', p.o.label] : badge(p.o.tone ?? 'gray', p.o.label)\n</script>\n\n<template>\n <div class=\"dt-options\">\n <label v-if=\"showSearch\" class=\"dt-input has-icon dt-options-search\">\n <span class=\"dt-input-icon\"><PhMagnifyingGlass :size=\"14\" aria-hidden=\"true\" /></span>\n <input v-model=\"q\" type=\"search\" :placeholder=\"searchPlaceholder\" :aria-label=\"searchPlaceholder\" autofocus />\n </label>\n <div class=\"dt-options-list\" role=\"group\">\n <template v-if=\"isUser && !q\">\n <label class=\"dt-option\" :class=\"{ 'is-on': isOn('@me') }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"isOn('@me')\" @change=\"toggle('@me')\" />\n <span class=\"dt-option-body\">\n <span class=\"dt-avatar dt-tone-blue\" aria-hidden=\"true\">{{ i18n.t('common.me').slice(0, 2) }}</span>\n {{ i18n.t('common.me') }}\n </span>\n </label>\n <label class=\"dt-option is-unassigned\" :class=\"{ 'is-on': unassigned }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"unassigned\" @change=\"emit('unassigned')\" />\n <span class=\"dt-option-body\">\n <span class=\"dt-avatar is-empty\" aria-hidden=\"true\" />\n {{ i18n.t('common.unassigned') }}\n </span>\n </label>\n <div class=\"dt-pop-sep\" />\n </template>\n <label v-for=\"o in options\" :key=\"String(o.value)\" class=\"dt-option\" :class=\"{ 'is-on': isOn(o.value) }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"isOn(o.value)\" @change=\"toggle(o.value)\" />\n <span class=\"dt-option-body\">\n <Opt v-if=\"rich\" :o=\"o\" />\n <template v-else-if=\"def.type === 'color'\">\n <span class=\"dt-swatch\" :style=\"{ background: String(o.value) }\" aria-hidden=\"true\" />\n <span class=\"dt-mono\">{{ o.label }}</span>\n </template>\n <template v-else>{{ o.label }}</template>\n </span>\n <button type=\"button\" class=\"dt-btn dt-btn-xs dt-option-only\" tabindex=\"-1\" @click.prevent=\"only(o.value)\">\n {{ i18n.t('option.only') }}\n </button>\n </label>\n <div v-if=\"remote && !loading && options.length === 0\" class=\"dt-options-empty\">\n {{ i18n.t('remote.noResults') }}\n </div>\n <div v-else-if=\"!remote && options.length === 0\" class=\"dt-options-empty\">{{ i18n.t('picker.noMatch') }}</div>\n <div v-if=\"loading\" class=\"dt-options-empty\">{{ i18n.t('common.loading') }}</div>\n <button\n v-if=\"remote && hasMore && !loading\"\n type=\"button\"\n class=\"dt-btn dt-btn-ghost dt-btn-sm dt-options-more\"\n @click=\"loadMore\"\n >\n {{ i18n.t('remote.loadMore') }}\n </button>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Puan editörü (03): 1–max yıldız; tıklanınca uygulanır ve popover kapanır.\nimport { PhStar } from '@phosphor-icons/vue'\nimport type { ColumnDef } from '../../types/columns'\n\nconst props = defineProps<{ column: ColumnDef; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: number]; done: [] }>()\nconst max = (props.column as { max?: number }).max ?? 5\nconst pick = (n: number) => {\n emit('update:modelValue', n)\n emit('done')\n}\n</script>\n\n<template>\n <div class=\"dt-editor-stars\" role=\"radiogroup\">\n <button\n v-for=\"n in max\"\n :key=\"n\"\n type=\"button\"\n class=\"dt-star-btn\"\n role=\"radio\"\n :aria-checked=\"modelValue === n\"\n :aria-label=\"String(n)\"\n :class=\"{ 'is-on': typeof modelValue === 'number' && n <= modelValue }\"\n @click=\"pick(n)\"\n >\n <PhStar\n :size=\"18\"\n :weight=\"typeof modelValue === 'number' && n <= modelValue ? 'fill' : 'regular'\"\n aria-hidden=\"true\"\n />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Puan editörü (03): 1–max yıldız; tıklanınca uygulanır ve popover kapanır.\nimport { PhStar } from '@phosphor-icons/vue'\nimport type { ColumnDef } from '../../types/columns'\n\nconst props = defineProps<{ column: ColumnDef; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: number]; done: [] }>()\nconst max = (props.column as { max?: number }).max ?? 5\nconst pick = (n: number) => {\n emit('update:modelValue', n)\n emit('done')\n}\n</script>\n\n<template>\n <div class=\"dt-editor-stars\" role=\"radiogroup\">\n <button\n v-for=\"n in max\"\n :key=\"n\"\n type=\"button\"\n class=\"dt-star-btn\"\n role=\"radio\"\n :aria-checked=\"modelValue === n\"\n :aria-label=\"String(n)\"\n :class=\"{ 'is-on': typeof modelValue === 'number' && n <= modelValue }\"\n @click=\"pick(n)\"\n >\n <PhStar\n :size=\"18\"\n :weight=\"typeof modelValue === 'number' && n <= modelValue ? 'fill' : 'regular'\"\n aria-hidden=\"true\"\n />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Metin editörü (04 §3): 250 ms sonra ve Enter'da uygular; Enter popover'ı kapatır. `id` sütununda `in`/`not_in` için\n// yapıştırılan liste (satır sonu / virgül / noktalı virgül) değer dizisine ayrılır (03); uppercase/lowercase çevirir.\nimport { onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport type { ColumnDef } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\n\nconst props = defineProps<{ column: ColumnDef; op: FilterOp; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: string | Array<string | number>]; done: [] }>()\n\nconst asText = (v: unknown) => (Array.isArray(v) ? v.join(', ') : typeof v === 'string' ? v : '')\nconst draft = ref(asText(props.modelValue))\nwatch(\n () => props.modelValue,\n (v) => {\n if (asText(v) !== draft.value) draft.value = asText(v)\n },\n)\nconst input = ref<HTMLInputElement | null>(null)\nonMounted(() => input.value?.focus())\n\nconst isList = () => props.op === 'in' || props.op === 'not_in'\nconst normalize = (s: string) =>\n props.column.type === 'uppercase'\n ? s.toLocaleUpperCase()\n : props.column.type === 'lowercase'\n ? s.toLocaleLowerCase()\n : s\nconst commit = () => {\n const s = normalize(draft.value).trim()\n if (isList()) {\n const parts = s\n .split(/[\\n,;]+/)\n .map((p) => p.trim())\n .filter(Boolean)\n emit('update:modelValue', parts)\n } else emit('update:modelValue', s)\n}\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst onInput = (e: Event) => {\n draft.value = normalize((e.target as HTMLInputElement).value)\n clearTimeout(timer)\n timer = setTimeout(commit, 250)\n}\nconst onEnter = () => {\n clearTimeout(timer)\n commit()\n emit('done')\n}\nonBeforeUnmount(() => clearTimeout(timer))\n</script>\n\n<template>\n <label class=\"dt-input dt-editor-text\">\n <input\n ref=\"input\"\n :value=\"draft\"\n type=\"text\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n </label>\n</template>\n","<script setup lang=\"ts\">\n// Metin editörü (04 §3): 250 ms sonra ve Enter'da uygular; Enter popover'ı kapatır. `id` sütununda `in`/`not_in` için\n// yapıştırılan liste (satır sonu / virgül / noktalı virgül) değer dizisine ayrılır (03); uppercase/lowercase çevirir.\nimport { onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport type { ColumnDef } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\n\nconst props = defineProps<{ column: ColumnDef; op: FilterOp; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: string | Array<string | number>]; done: [] }>()\n\nconst asText = (v: unknown) => (Array.isArray(v) ? v.join(', ') : typeof v === 'string' ? v : '')\nconst draft = ref(asText(props.modelValue))\nwatch(\n () => props.modelValue,\n (v) => {\n if (asText(v) !== draft.value) draft.value = asText(v)\n },\n)\nconst input = ref<HTMLInputElement | null>(null)\nonMounted(() => input.value?.focus())\n\nconst isList = () => props.op === 'in' || props.op === 'not_in'\nconst normalize = (s: string) =>\n props.column.type === 'uppercase'\n ? s.toLocaleUpperCase()\n : props.column.type === 'lowercase'\n ? s.toLocaleLowerCase()\n : s\nconst commit = () => {\n const s = normalize(draft.value).trim()\n if (isList()) {\n const parts = s\n .split(/[\\n,;]+/)\n .map((p) => p.trim())\n .filter(Boolean)\n emit('update:modelValue', parts)\n } else emit('update:modelValue', s)\n}\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst onInput = (e: Event) => {\n draft.value = normalize((e.target as HTMLInputElement).value)\n clearTimeout(timer)\n timer = setTimeout(commit, 250)\n}\nconst onEnter = () => {\n clearTimeout(timer)\n commit()\n emit('done')\n}\nonBeforeUnmount(() => clearTimeout(timer))\n</script>\n\n<template>\n <label class=\"dt-input dt-editor-text\">\n <input\n ref=\"input\"\n :value=\"draft\"\n type=\"text\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n </label>\n</template>\n"],"mappings":";;;;;;AAyBA,IAAamE,IAA4C;CACvD,KAAKC;CACL,OAAOA;CACP,YAAYC;CACZ,MAAMC;CACN,UAAUC;CACV,QAAQC;CACR,MAAMC;CACN,WAAWD;CACX,WAAWA;CACX,OAAOE;CACP,OAAOC;CACP,OAAOC;CACP,KAAKC;CACL,IAAIT;CACJ,SAASU;CACT,QAAQC;CACR,aAAaC;CACb,MAAMC;CACN,MAAMC;CACN,MAAMC;CACN,UAAUC;CACV,QAAQC;CACR,OAAOC;AACT,G;;;;;;;;;;;;;;;;;;;;;;;;ECvCA,IAAMe,IAAQC,GAQRC,IAAOH,GAKP,EAAE,SAAM,cAAWI,EAAoB,GACvCC,IAAQC,QAAeL,EAAM,OAAO,SAAS,GAC7CM,IAAK,IAAI,KAAK,aAAaC,GAAQ,EAAE,uBAAuB,EAAE,CAAC,GAC/DC,KAAQ,MAAgB,OAAOC,KAAM,YAAY,OAAO,SAASA,CAAC,IAAIH,EAAG,OAAOG,CAAC,IAAI,IACrFC,UAAkB;GACtB,IAAMC,IAAIX,EAAM;GAEh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AMhB,EAAE,KAAK,CAAC,CAAA,CACnB,OAAO,OAAO;IACjB,EAAK,qBAAqBiB,CAAK;GACjC,OAAO,EAAK,qBAAqBD,CAAC;EACpC,GACI/F,GACEC,KAAW,MAAa;GAG5B,AAFA,EAAM,QAAQ6F,EAAW,EAAE,OAA4B,KAAK,GAC5D,aAAa9F,CAAK,GAClB,IAAQ,WAAWH,GAAQ,GAAG;EAChC,GACMK,UAAgB;GAGpB,AAFA,aAAaF,CAAK,GAClBH,EAAO,GACPlB,EAAK,MAAM;EACb;E,OACAsH,QAAsB,aAAajG,CAAK,CAAC,I,UAIvCnE,EAAA,GAAAC,EASQ,SATRyJ,IASQ,CARNxJ,EAOE,SAAA;GANI,SAAA;GAAJ,KAAI6J;GACH,OAAOD,EAAA;GACR,MAAK;GACL,cAAa;GACL;GACP,WAAO3J,EAAAC,EAAgBiE,GAAO,CAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"TextEditor-CHLM6u-l.js","names":["_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_openBlock","_createElementBlock","_createBlock","_unref","_withCtx","_Fragment","_renderList","_createTextVNode","_toDisplayString","_createCommentVNode","_createElementVNode","_normalizeClass","_withDirectives","_withKeys","_withModifiers","_vModelText","_sfc_main","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_createElementVNode","_createVNode","_unref","_withDirectives","_vModelText","_createCommentVNode","_Fragment","_normalizeClass","_toDisplayString","_createTextVNode","_renderList","_createBlock","_normalizeStyle","_withModifiers","_sfc_main","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_Fragment","_renderList","_unref","_normalizeClass","_createVNode","_sfc_main","_openBlock","_createElementBlock","_createElementVNode","_withKeys","_withModifiers","_sfc_main","parseNumber","avatar","badge","useDataTableContext","readPath","TYPE_ICONS","PhHash","PhPercent","PhStar","PhCreditCard","PhTextT","PhTextAlignLeft","PhPhone","PhPalette","PhEnvelope","PhLink","PhCheckSquare","PhRadioButton","PhListChecks","PhLinkSimple","PhUser","PhCalendarBlank","PhClock","PhBracketsCurly","PhListBullets","_hoisted_1$3","_hoisted_2$3","_hoisted_3$1","_hoisted_4$1","_hoisted_5$1","_hoisted_6$1","_hoisted_7$1","_hoisted_8$1","_hoisted_9$1","_hoisted_10$1","_hoisted_11$1","NumberEditor_default","defineComponent","__emit","props","__props","emit","range","computed","nf","locale","show","n","fromModel","v","a0","b0","a","ref","b","x","y","first","commit","min","max","timer","onInput","onEnter","suffix","openBlock","createElementBlock","createBlock","unref","ToggleGroupRoot","_cache","withCtx","Fragment","renderList","ToggleGroupItem","c","createTextVNode","toDisplayString","createCommentVNode","createElementVNode","i18n","normalizeClass","withDirectives","$event","withKeys","withModifiers","vModelText","_hoisted_1$2","_hoisted_2$2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","OptionsEditor_default","def","remote","isUser","q","distinctFromRows","seen","row","raw","value","staticOptions","d","items","hasMore","loading","page","ctl","load","r","res","append","watch","loadMore","options","needle","o","showSearch","searchPlaceholder","selected","isOn","toggle","next","only","unassigned","rich","Opt","p","createVNode","PhMagnifyingGlass","normalizeStyle","_hoisted_1$1","_hoisted_2$1","StarEditor_default","pick","_hoisted_1","_hoisted_2","TextEditor_default","asText","draft","input","isList","normalize","s","parts","onBeforeUnmount"],"sources":["../src/core/filters/typeIcons.ts","../src/core/editors/NumberEditor.vue","../src/core/editors/NumberEditor.vue","../src/core/editors/OptionsEditor.vue","../src/core/editors/OptionsEditor.vue","../src/core/editors/StarEditor.vue","../src/core/editors/StarEditor.vue","../src/core/editors/TextEditor.vue","../src/core/editors/TextEditor.vue"],"sourcesContent":["// Sütun tipi ikonları (column picker ve çip; handoff 03 §3.2): Phosphor regular, 14 px.\nimport {\n PhBracketsCurly,\n PhCalendarBlank,\n PhCheckSquare,\n PhClock,\n PhCreditCard,\n PhEnvelope,\n PhHash,\n PhLink,\n PhLinkSimple,\n PhListBullets,\n PhListChecks,\n PhPalette,\n PhPercent,\n PhPhone,\n PhRadioButton,\n PhStar,\n PhTextAlignLeft,\n PhTextT,\n PhUser,\n} from '@phosphor-icons/vue'\nimport type { Component } from 'vue'\nimport type { ColumnType } from '../../types/columns'\n\nexport const TYPE_ICONS: Record<ColumnType, Component> = {\n int: PhHash,\n float: PhHash,\n percentage: PhPercent,\n star: PhStar,\n currency: PhCreditCard,\n string: PhTextT,\n text: PhTextAlignLeft,\n uppercase: PhTextT,\n lowercase: PhTextT,\n phone: PhPhone,\n color: PhPalette,\n email: PhEnvelope,\n url: PhLink,\n id: PhHash,\n boolean: PhCheckSquare,\n select: PhRadioButton,\n multiselect: PhListChecks,\n ajax: PhLinkSimple,\n user: PhUser,\n date: PhCalendarBlank,\n datetime: PhClock,\n object: PhBracketsCurly,\n array: PhListBullets,\n}\n","<script setup lang=\"ts\">\n// Sayı editörü (04 §3, T2-05): tek değer ya da Min / Max (\"and\"); 250 ms sonra ve Enter'da uygular; `currency` sütununda\n// para birimi segmented (değer düz sayı, para birimi ayrı alan); percentage `%` son eki; yerel ayara göre okunur.\nimport { ToggleGroupItem, ToggleGroupRoot } from 'reka-ui'\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport type { ColumnDef } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\nimport { parseNumber } from '../format/parse'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{\n column: ColumnDef\n op: FilterOp\n modelValue: unknown\n currency?: string\n /** `currency` sütunu: seçilebilir kodlar (sabit kod veya yüklü satırlardan). */\n currencies: string[]\n}>()\nconst emit = defineEmits<{\n 'update:modelValue': [value: number | [number | null, number | null] | undefined]\n 'update:currency': [code: string]\n done: []\n}>()\nconst { i18n, locale } = useDataTableContext()\nconst range = computed(() => props.op === 'between')\nconst nf = new Intl.NumberFormat(locale, { maximumFractionDigits: 6 })\nconst show = (n: unknown) => (typeof n === 'number' && Number.isFinite(n) ? nf.format(n) : '')\nconst fromModel = () => {\n const v = props.modelValue\n if (range.value) return [show(Array.isArray(v) ? v[0] : undefined), show(Array.isArray(v) ? v[1] : undefined)]\n return [show(v), '']\n}\nconst [a0, b0] = fromModel()\nconst a = ref(a0 ?? '')\nconst b = ref(b0 ?? '')\nwatch(\n () => [props.modelValue, props.op],\n () => {\n const [x, y] = fromModel()\n if (parseNumber(locale, a.value) !== parseNumber(locale, x ?? '')) a.value = x ?? ''\n if (parseNumber(locale, b.value) !== parseNumber(locale, y ?? '')) b.value = y ?? ''\n },\n)\nconst first = ref<HTMLInputElement | null>(null)\nonMounted(() => first.value?.focus())\n\nconst commit = () => {\n const min = parseNumber(locale, a.value)\n if (range.value) {\n const max = parseNumber(locale, b.value)\n emit('update:modelValue', min === null && max === null ? undefined : [min, max])\n } else emit('update:modelValue', min ?? undefined)\n}\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst onInput = () => {\n clearTimeout(timer)\n timer = setTimeout(commit, 250)\n}\nconst onEnter = () => {\n clearTimeout(timer)\n commit()\n emit('done')\n}\nonBeforeUnmount(() => clearTimeout(timer))\nconst suffix = props.column.type === 'percentage' ? '%' : ''\n</script>\n\n<template>\n <div class=\"dt-editor-number\">\n <ToggleGroupRoot\n v-if=\"currencies.length > 1\"\n class=\"dt-seg dt-seg-xs\"\n type=\"single\"\n :model-value=\"currency\"\n @update:model-value=\"(v) => v && emit('update:currency', String(v))\"\n >\n <ToggleGroupItem v-for=\"c in currencies\" :key=\"c\" class=\"dt-seg-item\" :value=\"c\">{{ c }}</ToggleGroupItem>\n </ToggleGroupRoot>\n <div class=\"dt-editor-fields\">\n <label class=\"dt-editor-field\">\n <span v-if=\"range\" class=\"dt-editor-label\">{{ i18n.t('number.min') }}</span>\n <span class=\"dt-input\" :class=\"{ 'has-suffix': suffix }\">\n <input\n ref=\"first\"\n v-model=\"a\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n <span v-if=\"suffix\" class=\"dt-input-end dt-input-suffix\">{{ suffix }}</span>\n </span>\n </label>\n <template v-if=\"range\">\n <span class=\"dt-editor-and\">{{ i18n.t('number.and') }}</span>\n <label class=\"dt-editor-field\">\n <span class=\"dt-editor-label\">{{ i18n.t('number.max') }}</span>\n <span class=\"dt-input\" :class=\"{ 'has-suffix': suffix }\">\n <input\n v-model=\"b\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n <span v-if=\"suffix\" class=\"dt-input-end dt-input-suffix\">{{ suffix }}</span>\n </span>\n </label>\n </template>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Sayı editörü (04 §3, T2-05): tek değer ya da Min / Max (\"and\"); 250 ms sonra ve Enter'da uygular; `currency` sütununda\n// para birimi segmented (değer düz sayı, para birimi ayrı alan); percentage `%` son eki; yerel ayara göre okunur.\nimport { ToggleGroupItem, ToggleGroupRoot } from 'reka-ui'\nimport { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport type { ColumnDef } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\nimport { parseNumber } from '../format/parse'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{\n column: ColumnDef\n op: FilterOp\n modelValue: unknown\n currency?: string\n /** `currency` sütunu: seçilebilir kodlar (sabit kod veya yüklü satırlardan). */\n currencies: string[]\n}>()\nconst emit = defineEmits<{\n 'update:modelValue': [value: number | [number | null, number | null] | undefined]\n 'update:currency': [code: string]\n done: []\n}>()\nconst { i18n, locale } = useDataTableContext()\nconst range = computed(() => props.op === 'between')\nconst nf = new Intl.NumberFormat(locale, { maximumFractionDigits: 6 })\nconst show = (n: unknown) => (typeof n === 'number' && Number.isFinite(n) ? nf.format(n) : '')\nconst fromModel = () => {\n const v = props.modelValue\n if (range.value) return [show(Array.isArray(v) ? v[0] : undefined), show(Array.isArray(v) ? v[1] : undefined)]\n return [show(v), '']\n}\nconst [a0, b0] = fromModel()\nconst a = ref(a0 ?? '')\nconst b = ref(b0 ?? '')\nwatch(\n () => [props.modelValue, props.op],\n () => {\n const [x, y] = fromModel()\n if (parseNumber(locale, a.value) !== parseNumber(locale, x ?? '')) a.value = x ?? ''\n if (parseNumber(locale, b.value) !== parseNumber(locale, y ?? '')) b.value = y ?? ''\n },\n)\nconst first = ref<HTMLInputElement | null>(null)\nonMounted(() => first.value?.focus())\n\nconst commit = () => {\n const min = parseNumber(locale, a.value)\n if (range.value) {\n const max = parseNumber(locale, b.value)\n emit('update:modelValue', min === null && max === null ? undefined : [min, max])\n } else emit('update:modelValue', min ?? undefined)\n}\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst onInput = () => {\n clearTimeout(timer)\n timer = setTimeout(commit, 250)\n}\nconst onEnter = () => {\n clearTimeout(timer)\n commit()\n emit('done')\n}\nonBeforeUnmount(() => clearTimeout(timer))\nconst suffix = props.column.type === 'percentage' ? '%' : ''\n</script>\n\n<template>\n <div class=\"dt-editor-number\">\n <ToggleGroupRoot\n v-if=\"currencies.length > 1\"\n class=\"dt-seg dt-seg-xs\"\n type=\"single\"\n :model-value=\"currency\"\n @update:model-value=\"(v) => v && emit('update:currency', String(v))\"\n >\n <ToggleGroupItem v-for=\"c in currencies\" :key=\"c\" class=\"dt-seg-item\" :value=\"c\">{{ c }}</ToggleGroupItem>\n </ToggleGroupRoot>\n <div class=\"dt-editor-fields\">\n <label class=\"dt-editor-field\">\n <span v-if=\"range\" class=\"dt-editor-label\">{{ i18n.t('number.min') }}</span>\n <span class=\"dt-input\" :class=\"{ 'has-suffix': suffix }\">\n <input\n ref=\"first\"\n v-model=\"a\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n <span v-if=\"suffix\" class=\"dt-input-end dt-input-suffix\">{{ suffix }}</span>\n </span>\n </label>\n <template v-if=\"range\">\n <span class=\"dt-editor-and\">{{ i18n.t('number.and') }}</span>\n <label class=\"dt-editor-field\">\n <span class=\"dt-editor-label\">{{ i18n.t('number.max') }}</span>\n <span class=\"dt-input\" :class=\"{ 'has-suffix': suffix }\">\n <input\n v-model=\"b\"\n type=\"text\"\n inputmode=\"decimal\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n <span v-if=\"suffix\" class=\"dt-input-end dt-input-suffix\">{{ suffix }}</span>\n </span>\n </label>\n </template>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Seçenek editörü (04 §3, T2-02/03): select · multiselect · color · ajax · user. Her işaretleme anında uygulanır;\n// hover'da \"Only\"; `user`'da Me ve Unassigned en üstte; uzak kaynaklar yazdıkça arar ve 20'şer yükler (03).\nimport { PhMagnifyingGlass } from '@phosphor-icons/vue'\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport type { ColumnDef, OptionDef, RemoteOptions, UserOption } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\nimport { avatar, badge } from '../cells/renderCell'\nimport type { RemoteLabels } from '../cells/remoteLabels'\nimport { readPath } from '../columns/readPath'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{\n column: ColumnDef\n op: FilterOp\n modelValue: Array<string | number>\n /** color: yüklü satırlardaki mevcut değerler (uzaktan öneri yok, D3). */\n rows: object[]\n labels: RemoteLabels\n}>()\nconst emit = defineEmits<{ 'update:modelValue': [values: Array<string | number>]; unassigned: [] }>()\nconst { i18n } = useDataTableContext()\n\nconst def = computed(() => props.column)\nconst remote = computed<RemoteOptions | undefined>(() =>\n def.value.type === 'ajax' || def.value.type === 'user' ? (def.value as { remote?: RemoteOptions }).remote : undefined,\n)\nconst isUser = computed(() => def.value.type === 'user')\nconst q = ref('')\n\nconst distinctFromRows = (): OptionDef[] => {\n const seen = new Set<string | number>()\n for (const row of props.rows) {\n const raw = def.value.accessor ? def.value.accessor(row) : readPath(row, def.value.id as string)\n for (const v of Array.isArray(raw) ? raw : [raw])\n if (v !== null && v !== undefined && v !== '') seen.add(v as string | number)\n }\n return [...seen].sort((a, b) => String(a).localeCompare(String(b))).map((value) => ({ value, label: String(value) }))\n}\nconst staticOptions = computed<OptionDef[]>(() => {\n const d = def.value\n if (d.type === 'select' || d.type === 'multiselect') return d.options\n if (d.type === 'user' && d.options) return [...d.options].sort((a, b) => a.label.localeCompare(b.label))\n if (d.type === 'color' && d.palette) return d.palette.map((value) => ({ value, label: value }))\n if (d.type === 'color') return distinctFromRows()\n return []\n})\n\n// Uzak kaynak: 250 ms sonra arar; sayfa sayfa ekler.\nconst items = ref<OptionDef[]>([])\nconst hasMore = ref(false)\nconst loading = ref(false)\nlet page = 1\nlet ctl: AbortController | null = null\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst load = async (append: boolean) => {\n const r = remote.value\n if (!r) return\n ctl?.abort()\n ctl = new AbortController()\n loading.value = true\n try {\n const res = await r.search(q.value, page, { signal: ctl.signal })\n items.value = append ? [...items.value, ...res.items] : res.items\n hasMore.value = res.hasMore\n props.labels.seed(def.value.id as string, res.items)\n } catch {\n /* abort veya ağ hatası: liste olduğu gibi kalır (D18) */\n } finally {\n loading.value = false\n }\n}\nif (remote.value) void load(false)\nwatch(q, () => {\n if (!remote.value) return\n clearTimeout(timer)\n timer = setTimeout(() => {\n page = 1\n void load(false)\n }, 250)\n})\nconst loadMore = () => {\n page += 1\n void load(true)\n}\nonBeforeUnmount(() => {\n clearTimeout(timer)\n ctl?.abort()\n})\n\nconst options = computed<OptionDef[]>(() => {\n if (remote.value) return items.value\n const needle = q.value.trim().toLocaleLowerCase()\n return needle ? staticOptions.value.filter((o) => o.label.toLocaleLowerCase().includes(needle)) : staticOptions.value\n})\nconst showSearch = computed(() => !!remote.value || staticOptions.value.length > 7)\nconst searchPlaceholder = computed(() =>\n def.value.filterNoun ? i18n.t('option.searchNoun', { noun: def.value.filterNoun }) : i18n.t('option.search'),\n)\n\nconst selected = computed(() => new Set(props.modelValue.map(String)))\nconst isOn = (v: string | number) => selected.value.has(String(v))\nconst toggle = (v: string | number) => {\n const next = isOn(v) ? props.modelValue.filter((x) => String(x) !== String(v)) : [...props.modelValue, v]\n emit('update:modelValue', next)\n}\nconst only = (v: string | number) => emit('update:modelValue', [v])\nconst unassigned = computed(() => props.op === 'is_empty')\n\n// Sabit bileşen: her render'da yeni bileşen üretmek rozeti DOM'da değiştirir ve tıkı yutabilir (bkz. sheet/editors/OptionCell).\nconst rich = computed(() => ['select', 'multiselect', 'user'].includes(def.value.type))\nconst Opt = (p: { o: OptionDef }) =>\n def.value.type === 'user' ? [avatar(p.o as UserOption), ' ', p.o.label] : badge(p.o.tone ?? 'gray', p.o.label)\n</script>\n\n<template>\n <div class=\"dt-options\">\n <label v-if=\"showSearch\" class=\"dt-input has-icon dt-options-search\">\n <span class=\"dt-input-icon\"><PhMagnifyingGlass :size=\"14\" aria-hidden=\"true\" /></span>\n <input v-model=\"q\" type=\"search\" :placeholder=\"searchPlaceholder\" :aria-label=\"searchPlaceholder\" autofocus />\n </label>\n <div class=\"dt-options-list\" role=\"group\">\n <template v-if=\"isUser && !q\">\n <label class=\"dt-option\" :class=\"{ 'is-on': isOn('@me') }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"isOn('@me')\" @change=\"toggle('@me')\" />\n <span class=\"dt-option-body\">\n <span class=\"dt-avatar dt-tone-blue\" aria-hidden=\"true\">{{ i18n.t('common.me').slice(0, 2) }}</span>\n {{ i18n.t('common.me') }}\n </span>\n </label>\n <label class=\"dt-option is-unassigned\" :class=\"{ 'is-on': unassigned }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"unassigned\" @change=\"emit('unassigned')\" />\n <span class=\"dt-option-body\">\n <span class=\"dt-avatar is-empty\" aria-hidden=\"true\" />\n {{ i18n.t('common.unassigned') }}\n </span>\n </label>\n <div class=\"dt-pop-sep\" />\n </template>\n <label v-for=\"o in options\" :key=\"String(o.value)\" class=\"dt-option\" :class=\"{ 'is-on': isOn(o.value) }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"isOn(o.value)\" @change=\"toggle(o.value)\" />\n <span class=\"dt-option-body\">\n <Opt v-if=\"rich\" :o=\"o\" />\n <template v-else-if=\"def.type === 'color'\">\n <span class=\"dt-swatch\" :style=\"{ background: String(o.value) }\" aria-hidden=\"true\" />\n <span class=\"dt-mono\">{{ o.label }}</span>\n </template>\n <template v-else>{{ o.label }}</template>\n </span>\n <button type=\"button\" class=\"dt-btn dt-btn-xs dt-option-only\" tabindex=\"-1\" @click.prevent=\"only(o.value)\">\n {{ i18n.t('option.only') }}\n </button>\n </label>\n <div v-if=\"remote && !loading && options.length === 0\" class=\"dt-options-empty\">\n {{ i18n.t('remote.noResults') }}\n </div>\n <div v-else-if=\"!remote && options.length === 0\" class=\"dt-options-empty\">{{ i18n.t('picker.noMatch') }}</div>\n <div v-if=\"loading\" class=\"dt-options-empty\">{{ i18n.t('common.loading') }}</div>\n <button\n v-if=\"remote && hasMore && !loading\"\n type=\"button\"\n class=\"dt-btn dt-btn-ghost dt-btn-sm dt-options-more\"\n @click=\"loadMore\"\n >\n {{ i18n.t('remote.loadMore') }}\n </button>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Seçenek editörü (04 §3, T2-02/03): select · multiselect · color · ajax · user. Her işaretleme anında uygulanır;\n// hover'da \"Only\"; `user`'da Me ve Unassigned en üstte; uzak kaynaklar yazdıkça arar ve 20'şer yükler (03).\nimport { PhMagnifyingGlass } from '@phosphor-icons/vue'\nimport { computed, onBeforeUnmount, ref, watch } from 'vue'\nimport type { ColumnDef, OptionDef, RemoteOptions, UserOption } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\nimport { avatar, badge } from '../cells/renderCell'\nimport type { RemoteLabels } from '../cells/remoteLabels'\nimport { readPath } from '../columns/readPath'\nimport { useDataTableContext } from '../plugin'\n\nconst props = defineProps<{\n column: ColumnDef\n op: FilterOp\n modelValue: Array<string | number>\n /** color: yüklü satırlardaki mevcut değerler (uzaktan öneri yok, D3). */\n rows: object[]\n labels: RemoteLabels\n}>()\nconst emit = defineEmits<{ 'update:modelValue': [values: Array<string | number>]; unassigned: [] }>()\nconst { i18n } = useDataTableContext()\n\nconst def = computed(() => props.column)\nconst remote = computed<RemoteOptions | undefined>(() =>\n def.value.type === 'ajax' || def.value.type === 'user' ? (def.value as { remote?: RemoteOptions }).remote : undefined,\n)\nconst isUser = computed(() => def.value.type === 'user')\nconst q = ref('')\n\nconst distinctFromRows = (): OptionDef[] => {\n const seen = new Set<string | number>()\n for (const row of props.rows) {\n const raw = def.value.accessor ? def.value.accessor(row) : readPath(row, def.value.id as string)\n for (const v of Array.isArray(raw) ? raw : [raw])\n if (v !== null && v !== undefined && v !== '') seen.add(v as string | number)\n }\n return [...seen].sort((a, b) => String(a).localeCompare(String(b))).map((value) => ({ value, label: String(value) }))\n}\nconst staticOptions = computed<OptionDef[]>(() => {\n const d = def.value\n if (d.type === 'select' || d.type === 'multiselect') return d.options\n if (d.type === 'user' && d.options) return [...d.options].sort((a, b) => a.label.localeCompare(b.label))\n if (d.type === 'color' && d.palette) return d.palette.map((value) => ({ value, label: value }))\n if (d.type === 'color') return distinctFromRows()\n return []\n})\n\n// Uzak kaynak: 250 ms sonra arar; sayfa sayfa ekler.\nconst items = ref<OptionDef[]>([])\nconst hasMore = ref(false)\nconst loading = ref(false)\nlet page = 1\nlet ctl: AbortController | null = null\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst load = async (append: boolean) => {\n const r = remote.value\n if (!r) return\n ctl?.abort()\n ctl = new AbortController()\n loading.value = true\n try {\n const res = await r.search(q.value, page, { signal: ctl.signal })\n items.value = append ? [...items.value, ...res.items] : res.items\n hasMore.value = res.hasMore\n props.labels.seed(def.value.id as string, res.items)\n } catch {\n /* abort veya ağ hatası: liste olduğu gibi kalır (D18) */\n } finally {\n loading.value = false\n }\n}\nif (remote.value) void load(false)\nwatch(q, () => {\n if (!remote.value) return\n clearTimeout(timer)\n timer = setTimeout(() => {\n page = 1\n void load(false)\n }, 250)\n})\nconst loadMore = () => {\n page += 1\n void load(true)\n}\nonBeforeUnmount(() => {\n clearTimeout(timer)\n ctl?.abort()\n})\n\nconst options = computed<OptionDef[]>(() => {\n if (remote.value) return items.value\n const needle = q.value.trim().toLocaleLowerCase()\n return needle ? staticOptions.value.filter((o) => o.label.toLocaleLowerCase().includes(needle)) : staticOptions.value\n})\nconst showSearch = computed(() => !!remote.value || staticOptions.value.length > 7)\nconst searchPlaceholder = computed(() =>\n def.value.filterNoun ? i18n.t('option.searchNoun', { noun: def.value.filterNoun }) : i18n.t('option.search'),\n)\n\nconst selected = computed(() => new Set(props.modelValue.map(String)))\nconst isOn = (v: string | number) => selected.value.has(String(v))\nconst toggle = (v: string | number) => {\n const next = isOn(v) ? props.modelValue.filter((x) => String(x) !== String(v)) : [...props.modelValue, v]\n emit('update:modelValue', next)\n}\nconst only = (v: string | number) => emit('update:modelValue', [v])\nconst unassigned = computed(() => props.op === 'is_empty')\n\n// Sabit bileşen: her render'da yeni bileşen üretmek rozeti DOM'da değiştirir ve tıkı yutabilir (bkz. sheet/editors/OptionCell).\nconst rich = computed(() => ['select', 'multiselect', 'user'].includes(def.value.type))\nconst Opt = (p: { o: OptionDef }) =>\n def.value.type === 'user' ? [avatar(p.o as UserOption), ' ', p.o.label] : badge(p.o.tone ?? 'gray', p.o.label)\n</script>\n\n<template>\n <div class=\"dt-options\">\n <label v-if=\"showSearch\" class=\"dt-input has-icon dt-options-search\">\n <span class=\"dt-input-icon\"><PhMagnifyingGlass :size=\"14\" aria-hidden=\"true\" /></span>\n <input v-model=\"q\" type=\"search\" :placeholder=\"searchPlaceholder\" :aria-label=\"searchPlaceholder\" autofocus />\n </label>\n <div class=\"dt-options-list\" role=\"group\">\n <template v-if=\"isUser && !q\">\n <label class=\"dt-option\" :class=\"{ 'is-on': isOn('@me') }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"isOn('@me')\" @change=\"toggle('@me')\" />\n <span class=\"dt-option-body\">\n <span class=\"dt-avatar dt-tone-blue\" aria-hidden=\"true\">{{ i18n.t('common.me').slice(0, 2) }}</span>\n {{ i18n.t('common.me') }}\n </span>\n </label>\n <label class=\"dt-option is-unassigned\" :class=\"{ 'is-on': unassigned }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"unassigned\" @change=\"emit('unassigned')\" />\n <span class=\"dt-option-body\">\n <span class=\"dt-avatar is-empty\" aria-hidden=\"true\" />\n {{ i18n.t('common.unassigned') }}\n </span>\n </label>\n <div class=\"dt-pop-sep\" />\n </template>\n <label v-for=\"o in options\" :key=\"String(o.value)\" class=\"dt-option\" :class=\"{ 'is-on': isOn(o.value) }\">\n <input type=\"checkbox\" class=\"dt-checkbox\" :checked=\"isOn(o.value)\" @change=\"toggle(o.value)\" />\n <span class=\"dt-option-body\">\n <Opt v-if=\"rich\" :o=\"o\" />\n <template v-else-if=\"def.type === 'color'\">\n <span class=\"dt-swatch\" :style=\"{ background: String(o.value) }\" aria-hidden=\"true\" />\n <span class=\"dt-mono\">{{ o.label }}</span>\n </template>\n <template v-else>{{ o.label }}</template>\n </span>\n <button type=\"button\" class=\"dt-btn dt-btn-xs dt-option-only\" tabindex=\"-1\" @click.prevent=\"only(o.value)\">\n {{ i18n.t('option.only') }}\n </button>\n </label>\n <div v-if=\"remote && !loading && options.length === 0\" class=\"dt-options-empty\">\n {{ i18n.t('remote.noResults') }}\n </div>\n <div v-else-if=\"!remote && options.length === 0\" class=\"dt-options-empty\">{{ i18n.t('picker.noMatch') }}</div>\n <div v-if=\"loading\" class=\"dt-options-empty\">{{ i18n.t('common.loading') }}</div>\n <button\n v-if=\"remote && hasMore && !loading\"\n type=\"button\"\n class=\"dt-btn dt-btn-ghost dt-btn-sm dt-options-more\"\n @click=\"loadMore\"\n >\n {{ i18n.t('remote.loadMore') }}\n </button>\n </div>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Puan editörü (03): 1–max yıldız; tıklanınca uygulanır ve popover kapanır.\nimport { PhStar } from '@phosphor-icons/vue'\nimport type { ColumnDef } from '../../types/columns'\n\nconst props = defineProps<{ column: ColumnDef; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: number]; done: [] }>()\nconst max = (props.column as { max?: number }).max ?? 5\nconst pick = (n: number) => {\n emit('update:modelValue', n)\n emit('done')\n}\n</script>\n\n<template>\n <div class=\"dt-editor-stars\" role=\"radiogroup\">\n <button\n v-for=\"n in max\"\n :key=\"n\"\n type=\"button\"\n class=\"dt-star-btn\"\n role=\"radio\"\n :aria-checked=\"modelValue === n\"\n :aria-label=\"String(n)\"\n :class=\"{ 'is-on': typeof modelValue === 'number' && n <= modelValue }\"\n @click=\"pick(n)\"\n >\n <PhStar\n :size=\"18\"\n :weight=\"typeof modelValue === 'number' && n <= modelValue ? 'fill' : 'regular'\"\n aria-hidden=\"true\"\n />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Puan editörü (03): 1–max yıldız; tıklanınca uygulanır ve popover kapanır.\nimport { PhStar } from '@phosphor-icons/vue'\nimport type { ColumnDef } from '../../types/columns'\n\nconst props = defineProps<{ column: ColumnDef; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: number]; done: [] }>()\nconst max = (props.column as { max?: number }).max ?? 5\nconst pick = (n: number) => {\n emit('update:modelValue', n)\n emit('done')\n}\n</script>\n\n<template>\n <div class=\"dt-editor-stars\" role=\"radiogroup\">\n <button\n v-for=\"n in max\"\n :key=\"n\"\n type=\"button\"\n class=\"dt-star-btn\"\n role=\"radio\"\n :aria-checked=\"modelValue === n\"\n :aria-label=\"String(n)\"\n :class=\"{ 'is-on': typeof modelValue === 'number' && n <= modelValue }\"\n @click=\"pick(n)\"\n >\n <PhStar\n :size=\"18\"\n :weight=\"typeof modelValue === 'number' && n <= modelValue ? 'fill' : 'regular'\"\n aria-hidden=\"true\"\n />\n </button>\n </div>\n</template>\n","<script setup lang=\"ts\">\n// Metin editörü (04 §3): 250 ms sonra ve Enter'da uygular; Enter popover'ı kapatır. `id` sütununda `in`/`not_in` için\n// yapıştırılan liste (satır sonu / virgül / noktalı virgül) değer dizisine ayrılır (03); uppercase/lowercase çevirir.\nimport { onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport type { ColumnDef } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\n\nconst props = defineProps<{ column: ColumnDef; op: FilterOp; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: string | Array<string | number>]; done: [] }>()\n\nconst asText = (v: unknown) => (Array.isArray(v) ? v.join(', ') : typeof v === 'string' ? v : '')\nconst draft = ref(asText(props.modelValue))\nwatch(\n () => props.modelValue,\n (v) => {\n if (asText(v) !== draft.value) draft.value = asText(v)\n },\n)\nconst input = ref<HTMLInputElement | null>(null)\nonMounted(() => input.value?.focus())\n\nconst isList = () => props.op === 'in' || props.op === 'not_in'\nconst normalize = (s: string) =>\n props.column.type === 'uppercase'\n ? s.toLocaleUpperCase()\n : props.column.type === 'lowercase'\n ? s.toLocaleLowerCase()\n : s\nconst commit = () => {\n const s = normalize(draft.value).trim()\n if (isList()) {\n const parts = s\n .split(/[\\n,;]+/)\n .map((p) => p.trim())\n .filter(Boolean)\n emit('update:modelValue', parts)\n } else emit('update:modelValue', s)\n}\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst onInput = (e: Event) => {\n draft.value = normalize((e.target as HTMLInputElement).value)\n clearTimeout(timer)\n timer = setTimeout(commit, 250)\n}\nconst onEnter = () => {\n clearTimeout(timer)\n commit()\n emit('done')\n}\nonBeforeUnmount(() => clearTimeout(timer))\n</script>\n\n<template>\n <label class=\"dt-input dt-editor-text\">\n <input\n ref=\"input\"\n :value=\"draft\"\n type=\"text\"\n autocomplete=\"off\"\n @input=\"onInput\"\n @keydown.enter.prevent=\"onEnter\"\n />\n </label>\n</template>\n","<script setup lang=\"ts\">\n// Metin editörü (04 §3): 250 ms sonra ve Enter'da uygular; Enter popover'ı kapatır. `id` sütununda `in`/`not_in` için\n// yapıştırılan liste (satır sonu / virgül / noktalı virgül) değer dizisine ayrılır (03); uppercase/lowercase çevirir.\nimport { onBeforeUnmount, onMounted, ref, watch } from 'vue'\nimport type { ColumnDef } from '../../types/columns'\nimport type { FilterOp } from '../../types/query'\n\nconst props = defineProps<{ column: ColumnDef; op: FilterOp; modelValue: unknown }>()\nconst emit = defineEmits<{ 'update:modelValue': [value: string | Array<string | number>]; done: [] }>()\n\nconst asText = (v: unknown) => (Array.isArray(v) ? v.join(', ') : typeof v === 'string' ? v : '')\nconst draft = ref(asText(props.modelValue))\nwatch(\n () => props.modelValue,\n (v) => {\n if (asText(v) !== draft.value) draft.value = asText(v)\n },\n)\nconst input = ref<HTMLInputElement | null>(null)\nonMounted(() => input.value?.focus())\n\nconst isList = () => props.op === 'in' || props.op === 'not_in'\nconst normalize = (s: string) =>\n props.column.type === 'uppercase'\n ? s.toLocaleUpperCase()\n : props.column.type === 'lowercase'\n ? s.toLocaleLowerCase()\n : s\nconst commit = () => {\n const s = normalize(draft.value).trim()\n if (isList()) {\n const parts = s\n .split(/[\\n,;]+/)\n .map((p) => p.trim())\n .filter(Boolean)\n emit('update:modelValue', parts)\n } else emit('update:modelValue', s)\n}\nlet timer: ReturnType<typeof setTimeout> | undefined\nconst onInput = (e: Event) => {\n draft.value = normalize((e.target as HTMLInputElement).value)\n clearTimeout(timer)\n timer = setTimeout(commit, 250)\n}\nconst onEnter = () => {\n clearTimeout(timer)\n commit()\n emit('done')\n}\nonBeforeUnmount(() => clearTimeout(timer))\n</script>\n\n<template>\n <label class=\"dt-input dt-editor-text\">\n <input\n ref=\"input\"\n :value=\"draft\"\n type=\"text\"\n autocomplete=\"off\"\n @input=\"onInput\"\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AO3J,EAAAC,EAAgBiE,GAAO,CAAA,SAAA,CAAA,GAAA,CAAA,OAAA,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ declare const __VLS_export: <Row extends object>(__VLS_props: NonNullable<Awaite
|
|
|
53
53
|
expand?: boolean | ExpandOptions<Row>;
|
|
54
54
|
/** Satır hatası (D35): metin/metin listesi → `--dt-r-bg` + ⋯ hücresinde uyarı ikonu + satırda tooltip. Harita uygulamanın. */
|
|
55
55
|
rowError?: (row: Row) => string | string[] | null | undefined;
|
|
56
|
+
/** More › Export (D46). Varsayılan açık; `false` gizler (ör. yetki). */
|
|
57
|
+
exportable?: boolean;
|
|
56
58
|
} & {
|
|
57
59
|
onCount?: ((request: CountRequest) => any) | undefined;
|
|
58
60
|
"onRow-click"?: ((payload: {
|
|
@@ -68,6 +70,7 @@ declare const __VLS_export: <Row extends object>(__VLS_props: NonNullable<Awaite
|
|
|
68
70
|
format: "csv" | "xlsx";
|
|
69
71
|
query: QueryWithoutPage;
|
|
70
72
|
selection: Row[];
|
|
73
|
+
rows: Row[];
|
|
71
74
|
visibleColumns: string[];
|
|
72
75
|
}) => any) | undefined;
|
|
73
76
|
onImport?: (() => any) | undefined;
|
|
@@ -116,6 +119,7 @@ declare const __VLS_export: <Row extends object>(__VLS_props: NonNullable<Awaite
|
|
|
116
119
|
format: "csv" | "xlsx";
|
|
117
120
|
query: QueryWithoutPage;
|
|
118
121
|
selection: Row[];
|
|
122
|
+
rows: Row[];
|
|
119
123
|
visibleColumns: string[];
|
|
120
124
|
}) => void) & ((evt: "import") => void) & ((evt: "print", payload: {
|
|
121
125
|
query: QueryWithoutPage;
|
|
@@ -141,7 +145,7 @@ export declare interface BaseColumn<Row, V = unknown> {
|
|
|
141
145
|
header: string;
|
|
142
146
|
/** Dar alanlarda (telefon) kısa header. */
|
|
143
147
|
headerShort?: string;
|
|
144
|
-
/** Sütun açıklaması: header tooltip'inde ad altında ikinci satır, Columns
|
|
148
|
+
/** Sütun açıklaması: header tooltip'inde ad altında ikinci satır, Columns dialog'unda ad altında; hücrede gösterilmez. */
|
|
145
149
|
description?: string;
|
|
146
150
|
/** Hesaplanan değer. Verilirse `fields` ile sunucudan istenecek alanlar bildirilir. */
|
|
147
151
|
accessor?: (row: Row) => V;
|
|
@@ -154,11 +158,10 @@ export declare interface BaseColumn<Row, V = unknown> {
|
|
|
154
158
|
/** px. Varsayılan 80. */
|
|
155
159
|
minWidth?: number;
|
|
156
160
|
maxWidth?: number;
|
|
157
|
-
pinned?: 'left' | 'right';
|
|
158
161
|
hidden?: boolean;
|
|
159
|
-
/** Gizlenemez. Birincil sütun için otomatik true. */
|
|
162
|
+
/** Gizlenemez. Birincil ve `required` sütun için otomatik true. */
|
|
160
163
|
alwaysVisible?: boolean;
|
|
161
|
-
/** Birincil hücre: gerçek <a href> (D6);
|
|
164
|
+
/** Birincil hücre: gerçek <a href> (D6); her zaman sola sabit (D45). Tabloda en fazla bir tane. */
|
|
162
165
|
primary?: boolean;
|
|
163
166
|
/** Birincil hücre veya `id`/`ajax` tipi için kayıt linki. */
|
|
164
167
|
href?: (row: Row) => string | undefined;
|
|
@@ -576,8 +579,10 @@ export declare interface SheetChangeRow {
|
|
|
576
579
|
clientId: string;
|
|
577
580
|
/** Anahtar sütunun değeri (ör. SKU). */
|
|
578
581
|
key: string;
|
|
579
|
-
/**
|
|
580
|
-
|
|
582
|
+
/**
|
|
583
|
+
* Değişen alanlar + `required` sütunlar + anahtar (sütun id'leriyle). Eklenen satırda boş değer gitmez. Sunucu anahtara
|
|
584
|
+
* göre upsert eder (D11, D47); paket kaydın sunucuda olup olmadığını bilmez.
|
|
585
|
+
*/
|
|
581
586
|
values: Record<string, unknown>;
|
|
582
587
|
}
|
|
583
588
|
|