@vuetify/nightly 3.7.4-master.2024-11-14 → 3.7.4-master.2024-11-20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/json/attributes.json +3484 -3484
- package/dist/json/importMap-labs.json +14 -14
- package/dist/json/importMap.json +146 -146
- package/dist/json/web-types.json +6328 -6328
- package/dist/vuetify-labs.css +2980 -2976
- package/dist/vuetify-labs.d.ts +3 -7
- package/dist/vuetify-labs.esm.js +19 -14
- package/dist/vuetify-labs.esm.js.map +1 -1
- package/dist/vuetify-labs.js +19 -14
- package/dist/vuetify-labs.min.css +2 -2
- package/dist/vuetify.css +1127 -1123
- package/dist/vuetify.d.ts +53 -57
- package/dist/vuetify.esm.js +14 -11
- package/dist/vuetify.esm.js.map +1 -1
- package/dist/vuetify.js +14 -11
- package/dist/vuetify.js.map +1 -1
- package/dist/vuetify.min.css +2 -2
- package/dist/vuetify.min.js +9 -10
- package/dist/vuetify.min.js.map +1 -1
- package/lib/components/VBadge/VBadge.css +4 -0
- package/lib/components/VBadge/VBadge.sass +4 -0
- package/lib/components/VConfirmEdit/VConfirmEdit.mjs +9 -7
- package/lib/components/VConfirmEdit/VConfirmEdit.mjs.map +1 -1
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs +1 -1
- package/lib/components/VConfirmEdit/__test__/VConfirmEdit.spec.browser.mjs.map +1 -1
- package/lib/components/VConfirmEdit/index.d.mts +3 -7
- package/lib/components/VList/VListItem.mjs +3 -2
- package/lib/components/VList/VListItem.mjs.map +1 -1
- package/lib/components/index.d.mts +3 -7
- package/lib/entry-bundler.mjs +1 -1
- package/lib/framework.mjs +1 -1
- package/lib/index.d.mts +50 -50
- package/lib/labs/VDateInput/VDateInput.mjs +1 -1
- package/lib/labs/VDateInput/VDateInput.mjs.map +1 -1
- package/lib/labs/VNumberInput/VNumberInput.mjs +4 -2
- package/lib/labs/VNumberInput/VNumberInput.mjs.map +1 -1
- package/lib/locale/fr.mjs +1 -1
- package/lib/locale/fr.mjs.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VDateInput.mjs","names":["makeVConfirmEditProps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","makeFocusProps","useFocus","useLocale","useProxiedModel","computed","shallowRef","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDateInputProps","hideActions","Boolean","placeholder","prependIcon","weeksInMonth","hideHeader","VDateInput","name","props","emits","val","setup","_ref","slots","t","adapter","isFocused","focus","blur","model","multiple","menu","display","value","length","start","end","isValid","format","isInteractive","disabled","readonly","onKeydown","e","key","target","date","onClick","preventDefault","stopPropagation","onSave","confirmEditProps","filterProps","datePickerProps","textFieldProps","_createVNode","_mergeProps","class","style","undefined","default","$event","_ref2","actions","proxyModel"],"sources":["../../../src/labs/VDateInput/VDateInput.tsx"],"sourcesContent":["// Components\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { makeVDatePickerProps, VDatePicker } from '@/components/VDatePicker/VDatePicker'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nexport interface VDateInputSlots {\n default: never\n}\n\nexport const makeVDateInputProps = propsFactory({\n hideActions: Boolean,\n\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps({\n placeholder: 'mm/dd/yyyy',\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n weeksInMonth: 'dynamic' as const,\n hideHeader: true,\n }), ['active']),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const { t } = useLocale()\n const adapter = useDate()\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null)\n const menu = shallowRef(false)\n\n const display = computed(() => {\n const value = wrapInArray(model.value)\n\n if (!value.length) return null\n\n if (props.multiple === true) {\n return t('$vuetify.datePicker.itemsSelected', value.length)\n }\n\n if (props.multiple === 'range') {\n const start = value[0]\n const end = value[value.length - 1]\n\n return adapter.isValid(start) && adapter.isValid(end)\n ? `${adapter.format(start, 'keyboardDate')} - ${adapter.format(end, 'keyboardDate')}`\n : ''\n }\n\n return adapter.isValid(model.value) ? adapter.format(model.value, 'keyboardDate') : ''\n })\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = adapter.date(target.value)\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n menu.value = true\n }\n\n function onSave () {\n menu.value = false\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, ['active']))\n const textFieldProps = VTextField.filterProps(props)\n\n return (\n <VTextField\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onFocus={ focus }\n onBlur={ blur }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n >\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n >\n {{\n default: ({ actions, model: proxyModel }) => {\n return (\n <VDatePicker\n { ...datePickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ val => {\n if (!props.hideActions) {\n proxyModel.value = val\n } else {\n model.value = val\n\n if (!props.multiple) menu.value = false\n }\n }}\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? () => actions : undefined,\n }}\n </VDatePicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </VTextField>\n )\n })\n },\n})\n\nexport type VDateInput = InstanceType<typeof VDateInput>\n"],"mappings":";AAAA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,oBAAoB,EAAEC,WAAW;AAAA,SACjCC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACjCC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAEC,WAAW,gCAErE;AAKA,OAAO,MAAMC,mBAAmB,GAAGH,YAAY,CAAC;EAC9CI,WAAW,EAAEC,OAAO;EAEpB,GAAGb,cAAc,CAAC,CAAC;EACnB,GAAGR,qBAAqB,CAAC,CAAC;EAC1B,GAAGK,mBAAmB,CAAC;IACrBiB,WAAW,EAAE,YAAY;IACzBC,WAAW,EAAE;EACf,CAAC,CAAC;EACF,GAAGR,IAAI,CAACb,oBAAoB,CAAC;IAC3BsB,YAAY,EAAE,SAAkB;IAChCC,UAAU,EAAE;EACd,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC;AAChB,CAAC,EAAE,YAAY,CAAC;AAEhB,OAAO,MAAMC,UAAU,GAAGZ,gBAAg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AK,GAAGb,GAAG;oBAEjB,IAAI,CAACF,KAAK,CAACY,QAAQ,EAAEC,IAAI,CAACE,KAAK,GAAG,KAAK;kBACzC;gBACF,CAAC;gBAAA,eACcU,CAAa,IAAKA,CAAC,CAACK,cAAc,CAAC;cAAC;gBAGjDe,OAAO,EAAE,CAAC7C,KAAK,CAACR,WAAW,GAAG,MAAMqD,OAAO,GAAGJ;cAAS;YAI/D;UAAC;QAAA,IAKLpC,KAAK,CAACqC,OAAO,GAAG,CAAC;MAAA;IAGzB,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VDateInput.mjs","names":["makeVConfirmEditProps","VConfirmEdit","makeVDatePickerProps","VDatePicker","VMenu","makeVTextFieldProps","VTextField","useDate","makeFocusProps","useFocus","useLocale","useProxiedModel","computed","shallowRef","genericComponent","omit","propsFactory","useRender","wrapInArray","makeVDateInputProps","hideActions","Boolean","placeholder","prependIcon","weeksInMonth","hideHeader","VDateInput","name","props","emits","val","setup","_ref","slots","t","adapter","isFocused","focus","blur","model","multiple","menu","display","value","length","start","end","isValid","format","isInteractive","disabled","readonly","onKeydown","e","key","target","date","onClick","preventDefault","stopPropagation","onSave","confirmEditProps","filterProps","datePickerProps","textFieldProps","_createVNode","_mergeProps","class","style","undefined","default","$event","_ref2","actions","proxyModel"],"sources":["../../../src/labs/VDateInput/VDateInput.tsx"],"sourcesContent":["// Components\nimport { makeVConfirmEditProps, VConfirmEdit } from '@/components/VConfirmEdit/VConfirmEdit'\nimport { makeVDatePickerProps, VDatePicker } from '@/components/VDatePicker/VDatePicker'\nimport { VMenu } from '@/components/VMenu/VMenu'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useDate } from '@/composables/date'\nimport { makeFocusProps, useFocus } from '@/composables/focus'\nimport { useLocale } from '@/composables/locale'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, shallowRef } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender, wrapInArray } from '@/util'\n\n// Types\nexport interface VDateInputSlots {\n default: never\n}\n\nexport const makeVDateInputProps = propsFactory({\n hideActions: Boolean,\n\n ...makeFocusProps(),\n ...makeVConfirmEditProps(),\n ...makeVTextFieldProps({\n placeholder: 'mm/dd/yyyy',\n prependIcon: '$calendar',\n }),\n ...omit(makeVDatePickerProps({\n weeksInMonth: 'dynamic' as const,\n hideHeader: true,\n }), ['active']),\n}, 'VDateInput')\n\nexport const VDateInput = genericComponent()({\n name: 'VDateInput',\n\n props: makeVDateInputProps(),\n\n emits: {\n 'update:modelValue': (val: string) => true,\n },\n\n setup (props, { slots }) {\n const { t } = useLocale()\n const adapter = useDate()\n const { isFocused, focus, blur } = useFocus(props)\n const model = useProxiedModel(props, 'modelValue', props.multiple ? [] : null)\n const menu = shallowRef(false)\n\n const display = computed(() => {\n const value = wrapInArray(model.value)\n\n if (!value.length) return null\n\n if (props.multiple === true) {\n return t('$vuetify.datePicker.itemsSelected', value.length)\n }\n\n if (props.multiple === 'range') {\n const start = value[0]\n const end = value[value.length - 1]\n\n return adapter.isValid(start) && adapter.isValid(end)\n ? `${adapter.format(start, 'keyboardDate')} - ${adapter.format(end, 'keyboardDate')}`\n : ''\n }\n\n return adapter.isValid(model.value) ? adapter.format(model.value, 'keyboardDate') : ''\n })\n\n const isInteractive = computed(() => !props.disabled && !props.readonly)\n\n function onKeydown (e: KeyboardEvent) {\n if (e.key !== 'Enter') return\n\n if (!menu.value || !isFocused.value) {\n menu.value = true\n\n return\n }\n\n const target = e.target as HTMLInputElement\n\n model.value = adapter.date(target.value)\n }\n\n function onClick (e: MouseEvent) {\n e.preventDefault()\n e.stopPropagation()\n\n menu.value = true\n }\n\n function onSave () {\n menu.value = false\n }\n\n useRender(() => {\n const confirmEditProps = VConfirmEdit.filterProps(props)\n const datePickerProps = VDatePicker.filterProps(omit(props, ['active']))\n const textFieldProps = VTextField.filterProps(props)\n\n return (\n <VTextField\n { ...textFieldProps }\n class={ props.class }\n style={ props.style }\n modelValue={ display.value }\n onKeydown={ isInteractive.value ? onKeydown : undefined }\n focused={ menu.value || isFocused.value }\n onFocus={ focus }\n onBlur={ blur }\n onClick:control={ isInteractive.value ? onClick : undefined }\n onClick:prepend={ isInteractive.value ? onClick : undefined }\n >\n <VMenu\n v-model={ menu.value }\n activator=\"parent\"\n min-width=\"0\"\n closeOnContentClick={ false }\n openOnClick={ false }\n >\n <VConfirmEdit\n { ...confirmEditProps }\n v-model={ model.value }\n onSave={ onSave }\n >\n {{\n default: ({ actions, model: proxyModel }) => {\n return (\n <VDatePicker\n { ...datePickerProps }\n modelValue={ props.hideActions ? model.value : proxyModel.value }\n onUpdate:modelValue={ val => {\n if (!props.hideActions) {\n proxyModel.value = val\n } else {\n model.value = val\n\n if (!props.multiple) menu.value = false\n }\n }}\n onMousedown={ (e: MouseEvent) => e.preventDefault() }\n >\n {{\n actions: !props.hideActions ? actions : undefined,\n }}\n </VDatePicker>\n )\n },\n }}\n </VConfirmEdit>\n </VMenu>\n\n { slots.default?.() }\n </VTextField>\n )\n })\n },\n})\n\nexport type VDateInput = InstanceType<typeof VDateInput>\n"],"mappings":";AAAA;AAAA,SACSA,qBAAqB,EAAEC,YAAY;AAAA,SACnCC,oBAAoB,EAAEC,WAAW;AAAA,SACjCC,KAAK;AAAA,SACLC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,cAAc,EAAEC,QAAQ;AAAA,SACxBC,SAAS;AAAA,SACTC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,UAAU,QAAQ,KAAK;AAAA,SACjCC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,EAAEC,WAAW,gCAErE;AAKA,OAAO,MAAMC,mBAAmB,GAAGH,YAAY,CAAC;EAC9CI,WAAW,EAAEC,OAAO;EAEpB,GAAGb,cAAc,CAAC,CAAC;EACnB,GAAGR,qBAAqB,CAAC,CAAC;EAC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A,CAAA9D,WAAA,EAAA+D,WAAA,CAESH,eAAe;gBAAA,cACPnC,KAAK,CAACR,WAAW,GAAGmB,KAAK,CAACI,KAAK,GAAG+B,UAAU,CAAC/B,KAAK;gBAAA,uBACzCb,GAAG,IAAI;kBAC3B,IAAI,CAACF,KAAK,CAACR,WAAW,EAAE;oBACtBsD,UAAU,CAAC/B,KAAK,GAAGb,GAAG;kBACxB,CAAC,MAAM;oBACLS,KAAK,CAACI,KAAK,GAAGb,GAAG;oBAEjB,IAAI,CAACF,KAAK,CAACY,QAAQ,EAAEC,IAAI,CAACE,KAAK,GAAG,KAAK;kBACzC;gBACF,CAAC;gBAAA,eACcU,CAAa,IAAKA,CAAC,CAACK,cAAc,CAAC;cAAC;gBAGjDe,OAAO,EAAE,CAAC7C,KAAK,CAACR,WAAW,GAAGqD,OAAO,GAAGJ;cAAS;YAIzD;UAAC;QAAA,IAKLpC,KAAK,CAACqC,OAAO,GAAG,CAAC;MAAA;IAGzB,CAAC,CAAC;EACJ;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -165,7 +165,8 @@ export const VNumberInput = genericComponent()({
|
|
165
165
|
"flat": true,
|
166
166
|
"key": "increment-btn",
|
167
167
|
"height": controlNodeDefaultHeight.value,
|
168
|
-
"
|
168
|
+
"data-testid": "increment",
|
169
|
+
"aria-hidden": "true",
|
169
170
|
"icon": incrementIcon.value,
|
170
171
|
"onClick": onClickUp,
|
171
172
|
"onMousedown": onControlMousedown,
|
@@ -192,7 +193,8 @@ export const VNumberInput = genericComponent()({
|
|
192
193
|
"flat": true,
|
193
194
|
"key": "decrement-btn",
|
194
195
|
"height": controlNodeDefaultHeight.value,
|
195
|
-
"
|
196
|
+
"data-testid": "decrement",
|
197
|
+
"aria-hidden": "true",
|
196
198
|
"icon": decrementIcon.value,
|
197
199
|
"size": controlNodeSize.value,
|
198
200
|
"tabindex": "-1",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VNumberInput.mjs","names":["VBtn","VDefaultsProvider","VDivider","makeVTextFieldProps","VTextField","useForm","forwardRefs","useProxiedModel","computed","nextTick","onMounted","ref","clamp","genericComponent","getDecimals","omit","propsFactory","useRender","makeVNumberInputProps","controlVariant","type","String","default","inset","Boolean","hideInput","modelValue","Number","min","MIN_SAFE_INTEGER","max","MAX_SAFE_INTEGER","step","VNumberInput","name","props","emits","val","setup","_ref","slots","_model","model","get","value","set","isNaN","vTextFieldRef","stepDecimals","modelDecimals","form","controlsDisabled","disabled","readonly","isReadonly","canIncrease","canDecrease","incrementIcon","decrementIcon","controlNodeSize","controlNodeDefaultHeight","incrementSlotProps","click","onClickUp","decrementSlotProps","onClickDown","clampModel","toggleUpDown","increment","arguments","length","undefined","decimals","Math","toFixed","e","stopPropagation","onBeforeinput","data","existingTxt","target","selectionStart","selectionEnd","potentialNewInputVal","slice","test","preventDefault","onKeydown","includes","key","ctrlKey","onControlMousedown","inputText","_","textFieldProps","filterProps","incrementControlNode","_createVNode","flat","height","size","icon","decrementControlNode","decrement","controlNode","dividerNode","appendInnerControl","reverse","_Fragment","hasAppendInner","prependInnerControl","hasPrependInner","_mergeProps","$event","class","style","_len","args","Array","_key","_len2","_key2"],"sources":["../../../src/labs/VNumberInput/VNumberInput.tsx"],"sourcesContent":["// Styles\nimport './VNumberInput.sass'\n\n// Components\nimport { VBtn } from '../../components/VBtn'\nimport { VDefaultsProvider } from '../../components/VDefaultsProvider'\nimport { VDivider } from '../../components/VDivider'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useForm } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, onMounted, ref } from 'vue'\nimport { clamp, genericComponent, getDecimals, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\ntype ControlSlot = {\n click: (e: MouseEvent) => void\n}\n\ntype VNumberInputSlots = Omit<VTextFieldSlots, 'default'> & {\n increment: ControlSlot\n decrement: ControlSlot\n}\n\ntype ControlVariant = 'default' | 'stacked' | 'split'\n\nconst makeVNumberInputProps = propsFactory({\n controlVariant: {\n type: String as PropType<ControlVariant>,\n default: 'default',\n },\n inset: Boolean,\n hideInput: Boolean,\n modelValue: {\n type: Number as PropType<Number | null>,\n default: null,\n },\n min: {\n type: Number,\n default: Number.MIN_SAFE_INTEGER,\n },\n max: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER,\n },\n step: {\n type: Number,\n default: 1,\n },\n\n ...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon']),\n}, 'VNumberInput')\n\nexport const VNumberInput = genericComponent<VNumberInputSlots>()({\n name: 'VNumberInput',\n\n props: {\n ...makeVNumberInputProps(),\n },\n\n emits: {\n 'update:modelValue': (val: number) => true,\n },\n\n setup (props, { slots }) {\n const _model = useProxiedModel(props, 'modelValue')\n\n const model = computed({\n get: () => _model.value,\n set (val) {\n if (val === null) {\n _model.value = null\n return\n }\n\n if (!isNaN(+val) && +val <= props.max && +val >= props.min) {\n _model.value = +val\n }\n },\n })\n\n const vTextFieldRef = ref<VTextField | undefined>()\n\n const stepDecimals = computed(() => getDecimals(props.step))\n const modelDecimals = computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0)\n\n const form = useForm()\n const controlsDisabled = computed(() => (\n props.disabled || props.readonly || form?.isReadonly.value\n ))\n\n const canIncrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number + props.step <= props.max\n })\n const canDecrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number - props.step >= props.min\n })\n\n const controlVariant = computed(() => {\n return props.hideInput ? 'stacked' : props.controlVariant\n })\n\n const incrementIcon = computed(() => controlVariant.value === 'split' ? '$plus' : '$collapse')\n const decrementIcon = computed(() => controlVariant.value === 'split' ? '$minus' : '$expand')\n const controlNodeSize = computed(() => controlVariant.value === 'split' ? 'default' : 'small')\n const controlNodeDefaultHeight = computed(() => controlVariant.value === 'stacked' ? 'auto' : '100%')\n\n const incrementSlotProps = computed(() => ({ click: onClickUp }))\n\n const decrementSlotProps = computed(() => ({ click: onClickDown }))\n\n onMounted(() => {\n if (!props.readonly && !props.disabled) {\n clampModel()\n }\n })\n\n function toggleUpDown (increment = true) {\n if (controlsDisabled.value) return\n if (model.value == null) {\n model.value = clamp(0, props.min, props.max)\n return\n }\n\n const decimals = Math.max(modelDecimals.value, stepDecimals.value)\n if (increment) {\n if (canIncrease.value) model.value = +((((model.value as number) + props.step).toFixed(decimals)))\n } else {\n if (canDecrease.value) model.value = +((((model.value as number) - props.step).toFixed(decimals)))\n }\n }\n\n function onClickUp (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown()\n }\n\n function onClickDown (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown(false)\n }\n\n function onBeforeinput (e: InputEvent) {\n if (!e.data) return\n const existingTxt = (e.target as HTMLInputElement)?.value\n const selectionStart = (e.target as HTMLInputElement)?.selectionStart\n const selectionEnd = (e.target as HTMLInputElement)?.selectionEnd\n const potentialNewInputVal =\n existingTxt\n ? existingTxt.slice(0, selectionStart as number | undefined) + e.data + existingTxt.slice(selectionEnd as number | undefined)\n : e.data\n // Only numbers, \"-\", \".\" are allowed\n // AND \"-\", \".\" are allowed only once\n // AND \"-\" is only allowed at the start\n if (!/^-?(\\d+(\\.\\d*)?|(\\.\\d+)|\\d*|\\.)$/.test(potentialNewInputVal)) {\n e.preventDefault()\n }\n }\n\n async function onKeydown (e: KeyboardEvent) {\n if (\n ['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) ||\n e.ctrlKey\n ) return\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key)) {\n e.preventDefault()\n clampModel()\n // _model is controlled, so need to wait until props['modelValue'] is updated\n await nextTick()\n if (e.key === 'ArrowDown') {\n toggleUpDown(false)\n } else {\n toggleUpDown()\n }\n }\n }\n\n function onControlMousedown (e: MouseEvent) {\n e.stopPropagation()\n }\n\n function clampModel () {\n if (!vTextFieldRef.value) return\n const inputText = vTextFieldRef.value.value\n if (inputText && !isNaN(+inputText)) {\n model.value = clamp(+(inputText), props.min, props.max)\n } else {\n model.value = null\n }\n }\n\n useRender(() => {\n const { modelValue: _, ...textFieldProps } = VTextField.filterProps(props)\n\n function incrementControlNode () {\n return !slots.increment ? (\n <VBtn\n disabled={ !canIncrease.value }\n flat\n key=\"increment-btn\"\n height={ controlNodeDefaultHeight.value }\n name=\"increment-btn\"\n icon={ incrementIcon.value }\n onClick={ onClickUp }\n onMousedown={ onControlMousedown }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n />\n ) : (\n <VDefaultsProvider\n key=\"increment-defaults\"\n defaults={{\n VBtn: {\n disabled: !canIncrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: incrementIcon.value,\n },\n }}\n >\n { slots.increment(incrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function decrementControlNode () {\n return !slots.decrement ? (\n <VBtn\n disabled={ !canDecrease.value }\n flat\n key=\"decrement-btn\"\n height={ controlNodeDefaultHeight.value }\n name=\"decrement-btn\"\n icon={ decrementIcon.value }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n onClick={ onClickDown }\n onMousedown={ onControlMousedown }\n />\n ) : (\n <VDefaultsProvider\n key=\"decrement-defaults\"\n defaults={{\n VBtn: {\n disabled: !canDecrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: decrementIcon.value,\n },\n }}\n >\n { slots.decrement(decrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function controlNode () {\n return (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider\n vertical={ controlVariant.value !== 'stacked' }\n />\n\n { incrementControlNode() }\n </div>\n )\n }\n\n function dividerNode () {\n return !props.hideInput && !props.inset ? <VDivider vertical /> : undefined\n }\n\n const appendInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n <VDivider vertical />\n\n { incrementControlNode() }\n </div>\n ) : (!props.reverse\n ? <>{ dividerNode() }{ controlNode() }</>\n : undefined)\n\n const hasAppendInner = slots['append-inner'] || appendInnerControl\n\n const prependInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider vertical />\n </div>\n ) : (props.reverse\n ? <>{ controlNode() }{ dividerNode() }</>\n : undefined)\n\n const hasPrependInner = slots['prepend-inner'] || prependInnerControl\n\n return (\n <VTextField\n ref={ vTextFieldRef }\n v-model={ model.value }\n onBeforeinput={ onBeforeinput }\n onChange={ clampModel }\n onKeydown={ onKeydown }\n class={[\n 'v-number-input',\n {\n 'v-number-input--default': controlVariant.value === 'default',\n 'v-number-input--hide-input': props.hideInput,\n 'v-number-input--inset': props.inset,\n 'v-number-input--reverse': props.reverse,\n 'v-number-input--split': controlVariant.value === 'split',\n 'v-number-input--stacked': controlVariant.value === 'stacked',\n },\n props.class,\n ]}\n { ...textFieldProps }\n style={ props.style }\n inputmode=\"decimal\"\n >\n {{\n ...slots,\n 'append-inner': hasAppendInner ? (...args) => (\n <>\n { slots['append-inner']?.(...args) }\n { appendInnerControl }\n </>\n ) : undefined,\n 'prepend-inner': hasPrependInner ? (...args) => (\n <>\n { prependInnerControl }\n { slots['prepend-inner']?.(...args) }\n </>\n ) : undefined,\n }}\n </VTextField>\n )\n })\n\n return forwardRefs({}, vTextFieldRef)\n },\n})\n\nexport type VNumberInput = InstanceType<typeof VNumberInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,QAAQ;AAAA,SACRC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,WAAW;AAAA,SACXC,eAAe,8CAExB;AACA,SA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AA;YAAJJ,IAAI,CAAAI,KAAA,IAAApD,SAAA,CAAAoD,KAAA;UAAA;UAAA,OAAAxB,YAAA,CAAAW,SAAA,SAErCE,mBAAmB,EACnBtE,KAAK,CAAC,eAAe,CAAC,GAAG,GAAG6E,IAAI,CAAC;QAAA,CAEtC,GAAG9C;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOjE,WAAW,CAAC,CAAC,CAAC,EAAEyC,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
|
1
|
+
{"version":3,"file":"VNumberInput.mjs","names":["VBtn","VDefaultsProvider","VDivider","makeVTextFieldProps","VTextField","useForm","forwardRefs","useProxiedModel","computed","nextTick","onMounted","ref","clamp","genericComponent","getDecimals","omit","propsFactory","useRender","makeVNumberInputProps","controlVariant","type","String","default","inset","Boolean","hideInput","modelValue","Number","min","MIN_SAFE_INTEGER","max","MAX_SAFE_INTEGER","step","VNumberInput","name","props","emits","val","setup","_ref","slots","_model","model","get","value","set","isNaN","vTextFieldRef","stepDecimals","modelDecimals","form","controlsDisabled","disabled","readonly","isReadonly","canIncrease","canDecrease","incrementIcon","decrementIcon","controlNodeSize","controlNodeDefaultHeight","incrementSlotProps","click","onClickUp","decrementSlotProps","onClickDown","clampModel","toggleUpDown","increment","arguments","length","undefined","decimals","Math","toFixed","e","stopPropagation","onBeforeinput","data","existingTxt","target","selectionStart","selectionEnd","potentialNewInputVal","slice","test","preventDefault","onKeydown","includes","key","ctrlKey","onControlMousedown","inputText","_","textFieldProps","filterProps","incrementControlNode","_createVNode","flat","height","size","icon","decrementControlNode","decrement","controlNode","dividerNode","appendInnerControl","reverse","_Fragment","hasAppendInner","prependInnerControl","hasPrependInner","_mergeProps","$event","class","style","_len","args","Array","_key","_len2","_key2"],"sources":["../../../src/labs/VNumberInput/VNumberInput.tsx"],"sourcesContent":["// Styles\nimport './VNumberInput.sass'\n\n// Components\nimport { VBtn } from '../../components/VBtn'\nimport { VDefaultsProvider } from '../../components/VDefaultsProvider'\nimport { VDivider } from '../../components/VDivider'\nimport { makeVTextFieldProps, VTextField } from '@/components/VTextField/VTextField'\n\n// Composables\nimport { useForm } from '@/composables/form'\nimport { forwardRefs } from '@/composables/forwardRefs'\nimport { useProxiedModel } from '@/composables/proxiedModel'\n\n// Utilities\nimport { computed, nextTick, onMounted, ref } from 'vue'\nimport { clamp, genericComponent, getDecimals, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { PropType } from 'vue'\nimport type { VTextFieldSlots } from '@/components/VTextField/VTextField'\n\ntype ControlSlot = {\n click: (e: MouseEvent) => void\n}\n\ntype VNumberInputSlots = Omit<VTextFieldSlots, 'default'> & {\n increment: ControlSlot\n decrement: ControlSlot\n}\n\ntype ControlVariant = 'default' | 'stacked' | 'split'\n\nconst makeVNumberInputProps = propsFactory({\n controlVariant: {\n type: String as PropType<ControlVariant>,\n default: 'default',\n },\n inset: Boolean,\n hideInput: Boolean,\n modelValue: {\n type: Number as PropType<Number | null>,\n default: null,\n },\n min: {\n type: Number,\n default: Number.MIN_SAFE_INTEGER,\n },\n max: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER,\n },\n step: {\n type: Number,\n default: 1,\n },\n\n ...omit(makeVTextFieldProps({}), ['appendInnerIcon', 'modelValue', 'prependInnerIcon']),\n}, 'VNumberInput')\n\nexport const VNumberInput = genericComponent<VNumberInputSlots>()({\n name: 'VNumberInput',\n\n props: {\n ...makeVNumberInputProps(),\n },\n\n emits: {\n 'update:modelValue': (val: number) => true,\n },\n\n setup (props, { slots }) {\n const _model = useProxiedModel(props, 'modelValue')\n\n const model = computed({\n get: () => _model.value,\n set (val) {\n if (val === null) {\n _model.value = null\n return\n }\n\n if (!isNaN(+val) && +val <= props.max && +val >= props.min) {\n _model.value = +val\n }\n },\n })\n\n const vTextFieldRef = ref<VTextField | undefined>()\n\n const stepDecimals = computed(() => getDecimals(props.step))\n const modelDecimals = computed(() => typeof model.value === 'number' ? getDecimals(model.value) : 0)\n\n const form = useForm()\n const controlsDisabled = computed(() => (\n props.disabled || props.readonly || form?.isReadonly.value\n ))\n\n const canIncrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number + props.step <= props.max\n })\n const canDecrease = computed(() => {\n if (controlsDisabled.value) return false\n return (model.value ?? 0) as number - props.step >= props.min\n })\n\n const controlVariant = computed(() => {\n return props.hideInput ? 'stacked' : props.controlVariant\n })\n\n const incrementIcon = computed(() => controlVariant.value === 'split' ? '$plus' : '$collapse')\n const decrementIcon = computed(() => controlVariant.value === 'split' ? '$minus' : '$expand')\n const controlNodeSize = computed(() => controlVariant.value === 'split' ? 'default' : 'small')\n const controlNodeDefaultHeight = computed(() => controlVariant.value === 'stacked' ? 'auto' : '100%')\n\n const incrementSlotProps = computed(() => ({ click: onClickUp }))\n\n const decrementSlotProps = computed(() => ({ click: onClickDown }))\n\n onMounted(() => {\n if (!props.readonly && !props.disabled) {\n clampModel()\n }\n })\n\n function toggleUpDown (increment = true) {\n if (controlsDisabled.value) return\n if (model.value == null) {\n model.value = clamp(0, props.min, props.max)\n return\n }\n\n const decimals = Math.max(modelDecimals.value, stepDecimals.value)\n if (increment) {\n if (canIncrease.value) model.value = +((((model.value as number) + props.step).toFixed(decimals)))\n } else {\n if (canDecrease.value) model.value = +((((model.value as number) - props.step).toFixed(decimals)))\n }\n }\n\n function onClickUp (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown()\n }\n\n function onClickDown (e: MouseEvent) {\n e.stopPropagation()\n toggleUpDown(false)\n }\n\n function onBeforeinput (e: InputEvent) {\n if (!e.data) return\n const existingTxt = (e.target as HTMLInputElement)?.value\n const selectionStart = (e.target as HTMLInputElement)?.selectionStart\n const selectionEnd = (e.target as HTMLInputElement)?.selectionEnd\n const potentialNewInputVal =\n existingTxt\n ? existingTxt.slice(0, selectionStart as number | undefined) + e.data + existingTxt.slice(selectionEnd as number | undefined)\n : e.data\n // Only numbers, \"-\", \".\" are allowed\n // AND \"-\", \".\" are allowed only once\n // AND \"-\" is only allowed at the start\n if (!/^-?(\\d+(\\.\\d*)?|(\\.\\d+)|\\d*|\\.)$/.test(potentialNewInputVal)) {\n e.preventDefault()\n }\n }\n\n async function onKeydown (e: KeyboardEvent) {\n if (\n ['Enter', 'ArrowLeft', 'ArrowRight', 'Backspace', 'Delete', 'Tab'].includes(e.key) ||\n e.ctrlKey\n ) return\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key)) {\n e.preventDefault()\n clampModel()\n // _model is controlled, so need to wait until props['modelValue'] is updated\n await nextTick()\n if (e.key === 'ArrowDown') {\n toggleUpDown(false)\n } else {\n toggleUpDown()\n }\n }\n }\n\n function onControlMousedown (e: MouseEvent) {\n e.stopPropagation()\n }\n\n function clampModel () {\n if (!vTextFieldRef.value) return\n const inputText = vTextFieldRef.value.value\n if (inputText && !isNaN(+inputText)) {\n model.value = clamp(+(inputText), props.min, props.max)\n } else {\n model.value = null\n }\n }\n\n useRender(() => {\n const { modelValue: _, ...textFieldProps } = VTextField.filterProps(props)\n\n function incrementControlNode () {\n return !slots.increment ? (\n <VBtn\n disabled={ !canIncrease.value }\n flat\n key=\"increment-btn\"\n height={ controlNodeDefaultHeight.value }\n data-testid=\"increment\"\n aria-hidden=\"true\"\n icon={ incrementIcon.value }\n onClick={ onClickUp }\n onMousedown={ onControlMousedown }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n />\n ) : (\n <VDefaultsProvider\n key=\"increment-defaults\"\n defaults={{\n VBtn: {\n disabled: !canIncrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: incrementIcon.value,\n },\n }}\n >\n { slots.increment(incrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function decrementControlNode () {\n return !slots.decrement ? (\n <VBtn\n disabled={ !canDecrease.value }\n flat\n key=\"decrement-btn\"\n height={ controlNodeDefaultHeight.value }\n data-testid=\"decrement\"\n aria-hidden=\"true\"\n icon={ decrementIcon.value }\n size={ controlNodeSize.value }\n tabindex=\"-1\"\n onClick={ onClickDown }\n onMousedown={ onControlMousedown }\n />\n ) : (\n <VDefaultsProvider\n key=\"decrement-defaults\"\n defaults={{\n VBtn: {\n disabled: !canDecrease.value,\n flat: true,\n height: controlNodeDefaultHeight.value,\n size: controlNodeSize.value,\n icon: decrementIcon.value,\n },\n }}\n >\n { slots.decrement(decrementSlotProps.value) }\n </VDefaultsProvider>\n )\n }\n\n function controlNode () {\n return (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider\n vertical={ controlVariant.value !== 'stacked' }\n />\n\n { incrementControlNode() }\n </div>\n )\n }\n\n function dividerNode () {\n return !props.hideInput && !props.inset ? <VDivider vertical /> : undefined\n }\n\n const appendInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n <VDivider vertical />\n\n { incrementControlNode() }\n </div>\n ) : (!props.reverse\n ? <>{ dividerNode() }{ controlNode() }</>\n : undefined)\n\n const hasAppendInner = slots['append-inner'] || appendInnerControl\n\n const prependInnerControl =\n controlVariant.value === 'split'\n ? (\n <div class=\"v-number-input__control\">\n { decrementControlNode() }\n\n <VDivider vertical />\n </div>\n ) : (props.reverse\n ? <>{ controlNode() }{ dividerNode() }</>\n : undefined)\n\n const hasPrependInner = slots['prepend-inner'] || prependInnerControl\n\n return (\n <VTextField\n ref={ vTextFieldRef }\n v-model={ model.value }\n onBeforeinput={ onBeforeinput }\n onChange={ clampModel }\n onKeydown={ onKeydown }\n class={[\n 'v-number-input',\n {\n 'v-number-input--default': controlVariant.value === 'default',\n 'v-number-input--hide-input': props.hideInput,\n 'v-number-input--inset': props.inset,\n 'v-number-input--reverse': props.reverse,\n 'v-number-input--split': controlVariant.value === 'split',\n 'v-number-input--stacked': controlVariant.value === 'stacked',\n },\n props.class,\n ]}\n { ...textFieldProps }\n style={ props.style }\n inputmode=\"decimal\"\n >\n {{\n ...slots,\n 'append-inner': hasAppendInner ? (...args) => (\n <>\n { slots['append-inner']?.(...args) }\n { appendInnerControl }\n </>\n ) : undefined,\n 'prepend-inner': hasPrependInner ? (...args) => (\n <>\n { prependInnerControl }\n { slots['prepend-inner']?.(...args) }\n </>\n ) : undefined,\n }}\n </VTextField>\n )\n })\n\n return forwardRefs({}, vTextFieldRef)\n },\n})\n\nexport type VNumberInput = InstanceType<typeof VNumberInput>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,IAAI;AAAA,SACJC,iBAAiB;AAAA,SACjBC,QAAQ;AAAA,SACRC,mBAAmB,EAAEC,UAAU,sDAExC;AAAA,SACSC,OAAO;AAAA,SACPC,WAAW;AAAA,SACXC,eAAe,8CAExB;AACA,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,GAAG,QAAQ,KAAK;AAAA,SAC/CC,KAAK,EAAEC,gBAAgB,EAAEC,WAAW,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAE5E;AAeA,MAAMC,qBAAqB,GAAGF,YAAY,CAAC;EACzCG,cAAc,EAAE;IACdC,IAAI,EAAEC,MAAkC;IACxCC,OAAO,EAAE;EACX,CAAC;EACDC,KAAK,EAAEC,OAAO;EACdC,SAAS,EAAED,OAAO;EAClBE,UAAU,EAAE;IACVN,IAAI,EAAEO,MAAiC;IACvCL,OAAO,EAAE;EACX,CAAC;EACDM,GAAG,EAAE;IACHR,IAAI,EAAEO,MAAM;IACZL,OAAO,EAAEK,MAAM,CAACE;EAClB,CAAC;EACDC,GAAG,EAAE;IACHV,IAAI,EAAEO,MAAM;IACZL,OAAO,EAAEK,MAAM,CAACI;EAClB,CAAC;EACDC,IAAI,EAAE;IACJZ,IAAI,EAAEO,MAAM;IACZL,OAAO,EAAE;EACX,CAAC;EAED,GAAGP,IAAI,CAACZ,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,iBAAiB,EAAE,YAAY,EAAE,kBAAkB,CAAC;AACxF,CAAC,EAAE,cAAc,CAAC;AAElB,OAAO,MAAM8B,YAAY,GAAGpB,gBAAgB,C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,MAAAA,IAAA,GAAAH,IAAA,EAAAG,IAAA;YAAJF,IAAI,CAAAE,IAAA,IAAAlD,SAAA,CAAAkD,IAAA;UAAA;UAAA,OAAAtB,YAAA,CAAAW,SAAA,SAEnCpE,KAAK,CAAC,cAAc,CAAC,GAAG,GAAG6E,IAAI,CAAC,EAChCX,kBAAkB;QAAA,CAEvB,GAAGnC,SAAS;QACb,eAAe,EAAEwC,eAAe,GAAG;UAAA,SAAAS,KAAA,GAAAnD,SAAA,CAAAC,MAAA,EAAI+C,IAAI,OAAAC,KAAA,CAAAE,KAAA,GAAAC,KAAA,MAAAA,KAAA,GAAAD,KAAA,EAAAC,KAAA;YAAJJ,IAAI,CAAAI,KAAA,IAAApD,SAAA,CAAAoD,KAAA;UAAA;UAAA,OAAAxB,YAAA,CAAAW,SAAA,SAErCE,mBAAmB,EACnBtE,KAAK,CAAC,eAAe,CAAC,GAAG,GAAG6E,IAAI,CAAC;QAAA,CAEtC,GAAG9C;MAAS;IAIrB,CAAC,CAAC;IAEF,OAAOjE,WAAW,CAAC,CAAC,CAAC,EAAEyC,aAAa,CAAC;EACvC;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/locale/fr.mjs
CHANGED
package/lib/locale/fr.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fr.mjs","names":["badge","open","close","dismiss","confirmEdit","ok","cancel","dataIterator","noResultsText","loadingText","dataTable","itemsPerPageText","ariaLabel","sortDescending","sortAscending","sortNone","activateNone","activateDescending","activateAscending","sortBy","dataFooter","itemsPerPageAll","nextPage","prevPage","firstPage","lastPage","pageText","dateRangeInput","divider","datePicker","itemsSelected","range","title","header","input","placeholder","noDataText","carousel","prev","next","delimiter","calendar","moreEvents","today","clear","prependAction","appendAction","otp","fileInput","counter","counterSize","timePicker","am","pm","pagination","root","previous","page","currentPage","first","last","stepper","rating","item","loading","infiniteScroll","loadMore","empty"],"sources":["../../src/locale/fr.ts"],"sourcesContent":["export default {\n badge: 'Badge',\n open: 'Ouvrir',\n close: 'Fermer',\n dismiss: 'Dismiss',\n confirmEdit: {\n ok: 'OK',\n cancel: 'Annuler',\n },\n dataIterator: {\n noResultsText: 'Aucun enregistrement correspondant trouvé',\n loadingText: `Chargement de l'élément...`,\n },\n dataTable: {\n itemsPerPageText: 'Lignes par page :',\n ariaLabel: {\n sortDescending: 'Tri décroissant.',\n sortAscending: 'Tri croissant.',\n sortNone: 'Non trié.',\n activateNone: 'Activer pour supprimer le tri.',\n activateDescending: 'Activer pour trier par ordre décroissant.',\n activateAscending: 'Activer pour trier par ordre croissant.',\n },\n sortBy: 'Trier par',\n },\n dataFooter: {\n itemsPerPageText: 'Éléments par page :',\n itemsPerPageAll: 'Tous',\n nextPage: 'Page suivante',\n prevPage: 'Page précédente',\n firstPage: 'Première page',\n lastPage: 'Dernière page',\n pageText: '{0}-{1} de {2}',\n },\n dateRangeInput: {\n divider: 'à',\n },\n datePicker: {\n itemsSelected: '{0} selected',\n range: {\n title: 'Sélectionner des dates',\n header: 'Entrer des dates',\n },\n title: 'Sélectionner une date',\n header: 'Entrer une date',\n input: {\n placeholder: 'Entrer une date',\n },\n },\n noDataText: 'Aucune donnée disponible',\n carousel: {\n prev: 'Visuel précédent',\n next: 'Visuel suivant',\n ariaLabel: {\n delimiter: 'Diapositive {0} de {1}',\n },\n },\n calendar: {\n moreEvents: '{0} de plus',\n today: '
|
1
|
+
{"version":3,"file":"fr.mjs","names":["badge","open","close","dismiss","confirmEdit","ok","cancel","dataIterator","noResultsText","loadingText","dataTable","itemsPerPageText","ariaLabel","sortDescending","sortAscending","sortNone","activateNone","activateDescending","activateAscending","sortBy","dataFooter","itemsPerPageAll","nextPage","prevPage","firstPage","lastPage","pageText","dateRangeInput","divider","datePicker","itemsSelected","range","title","header","input","placeholder","noDataText","carousel","prev","next","delimiter","calendar","moreEvents","today","clear","prependAction","appendAction","otp","fileInput","counter","counterSize","timePicker","am","pm","pagination","root","previous","page","currentPage","first","last","stepper","rating","item","loading","infiniteScroll","loadMore","empty"],"sources":["../../src/locale/fr.ts"],"sourcesContent":["export default {\n badge: 'Badge',\n open: 'Ouvrir',\n close: 'Fermer',\n dismiss: 'Dismiss',\n confirmEdit: {\n ok: 'OK',\n cancel: 'Annuler',\n },\n dataIterator: {\n noResultsText: 'Aucun enregistrement correspondant trouvé',\n loadingText: `Chargement de l'élément...`,\n },\n dataTable: {\n itemsPerPageText: 'Lignes par page :',\n ariaLabel: {\n sortDescending: 'Tri décroissant.',\n sortAscending: 'Tri croissant.',\n sortNone: 'Non trié.',\n activateNone: 'Activer pour supprimer le tri.',\n activateDescending: 'Activer pour trier par ordre décroissant.',\n activateAscending: 'Activer pour trier par ordre croissant.',\n },\n sortBy: 'Trier par',\n },\n dataFooter: {\n itemsPerPageText: 'Éléments par page :',\n itemsPerPageAll: 'Tous',\n nextPage: 'Page suivante',\n prevPage: 'Page précédente',\n firstPage: 'Première page',\n lastPage: 'Dernière page',\n pageText: '{0}-{1} de {2}',\n },\n dateRangeInput: {\n divider: 'à',\n },\n datePicker: {\n itemsSelected: '{0} selected',\n range: {\n title: 'Sélectionner des dates',\n header: 'Entrer des dates',\n },\n title: 'Sélectionner une date',\n header: 'Entrer une date',\n input: {\n placeholder: 'Entrer une date',\n },\n },\n noDataText: 'Aucune donnée disponible',\n carousel: {\n prev: 'Visuel précédent',\n next: 'Visuel suivant',\n ariaLabel: {\n delimiter: 'Diapositive {0} de {1}',\n },\n },\n calendar: {\n moreEvents: '{0} de plus',\n today: 'Aujourd\\'hui',\n },\n input: {\n clear: 'Vider {0}',\n prependAction: '{0} action avant',\n appendAction: '{0} action après',\n otp: 'Caractère {0} du mot de passe à usage unique',\n },\n fileInput: {\n counter: '{0} fichier(s)',\n counterSize: '{0} fichier(s) ({1} au total)',\n },\n timePicker: {\n am: 'AM',\n pm: 'PM',\n title: 'Select Time',\n },\n pagination: {\n ariaLabel: {\n root: 'Navigation de pagination',\n next: 'Page suivante',\n previous: 'Page précédente',\n page: 'Aller à la page {0}',\n currentPage: 'Page actuelle, Page {0}',\n first: 'Première page',\n last: 'Dernière page',\n },\n },\n stepper: {\n next: 'Suivant',\n prev: 'Précédent',\n },\n rating: {\n ariaLabel: {\n item: 'Note de {0} sur {1}',\n },\n },\n loading: 'Chargement...',\n infiniteScroll: {\n loadMore: 'Charger plus',\n empty: 'Aucune donnée supplémentaire',\n },\n}\n"],"mappings":"AAAA,eAAe;EACbA,KAAK,EAAE,OAAO;EACdC,IAAI,EAAE,QAAQ;EACdC,KAAK,EAAE,QAAQ;EACfC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE;IACXC,EAAE,EAAE,IAAI;IACRC,MAAM,EAAE;EACV,CAAC;EACDC,YAAY,EAAE;IACZC,aAAa,EAAE,2CAA2C;IAC1DC,WAAW,EAAE;EACf,CAAC;EACDC,SAAS,EAAE;IACTC,gBAAgB,EAAE,mBAAmB;IACrCC,SAAS,EAAE;MACTC,cAAc,EAAE,kBAAkB;MAClCC,aAAa,EAAE,gBAAgB;MAC/BC,QAAQ,EAAE,WAAW;MACrBC,YAAY,EAAE,gCAAgC;MAC9CC,kBAAkB,EAAE,2CAA2C;MAC/DC,iBAAiB,EAAE;IACrB,CAAC;IACDC,MAAM,EAAE;EACV,CAAC;EACDC,UAAU,EAAE;IACVT,gBAAgB,EAAE,qBAAqB;IACvCU,eAAe,EAAE,MAAM;IACvBC,QAAQ,EAAE,eAAe;IACzBC,QAAQ,EAAE,iBAAiB;IAC3BC,SAAS,EAAE,eAAe;IAC1BC,QAAQ,EAAE,eAAe;IACzBC,QAAQ,EAAE;EACZ,CAAC;EACDC,cAAc,EAAE;IACdC,OAAO,EAAE;EACX,CAAC;EACDC,UAAU,EAAE;IACVC,aAAa,EAAE,cAAc;IAC7BC,KAAK,EAAE;MACLC,KAAK,EAAE,wBAAwB;MAC/BC,MAAM,EAAE;IACV,CAAC;IACDD,KAAK,EAAE,uBAAuB;IAC9BC,MAAM,EAAE,iBAAiB;IACzBC,KAAK,EAAE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